Files
MaxScale/query_classifier/test/oracle/func_length.test
Johan Wikman b635cc92ab MXS-1783 Add 10.4 support
qc_mysqlembedded can now be built using the embedded library from
MariaDB 10.4.
2019-05-31 15:12:57 +03:00

24 lines
901 B
Plaintext

SET sql_mode=ORACLE;
--echo #
--echo # MDEV-12783 sql_mode=ORACLE: Functions LENGTH() and LENGTHB()
--echo #
#
# Testing LENGTH / LENGTHB
#
# LENGTH : return the length of char
# LENGTHB : return the length of byte
SELECT LENGTH(null), LENGTH('a'), LENGTH(123);
# 10.4 based qc_mysqlembedded recognizes this as QUERY_TYPE_READ, while
# 10.3 based one recognizes it as QUERY_TYPE_WRITE (i.e. it does not
# recognize it). qc_sqlite now (May 2019) recognizes it always as READ.
#SELECT LENGTHB(null), LENGTHB('a'), LENGTHB(123);
# qc_sqlite: SELECT LENGTH(_utf8 0xC39F), LENGTH(CHAR(14844588 USING utf8));
# Sqlite3 error: SQL logic error or missing database, near "0xC39F": syntax error
# qc_sqlite: SELECT LENGTHB(_utf8 0xC39F), LENGTHB(CHAR(14844588 USING utf8));
# Sqlite3 error: SQL logic error or missing database, near "0xC39F": syntax error
EXPLAIN EXTENDED SELECT LENGTH('a'), LENGTHB('a');