mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
21 lines
818 B
Text
21 lines
818 B
Text
SET sql_mode=ORACLE;
|
|
#
|
|
# MDEV-12783 sql_mode=ORACLE: Functions LENGTH() and LENGTHB()
|
|
#
|
|
SELECT LENGTH(null), LENGTH('a'), LENGTH(123);
|
|
LENGTH(null) LENGTH('a') LENGTH(123)
|
|
NULL 1 3
|
|
SELECT LENGTHB(null), LENGTHB('a'), LENGTHB(123);
|
|
LENGTHB(null) LENGTHB('a') LENGTHB(123)
|
|
NULL 1 3
|
|
SELECT LENGTH(_utf8 0xC39F), LENGTH(CHAR(14844588 USING utf8));
|
|
LENGTH(_utf8 0xC39F) LENGTH(CHAR(14844588 USING utf8))
|
|
1 1
|
|
SELECT LENGTHB(_utf8 0xC39F), LENGTHB(CHAR(14844588 USING utf8));
|
|
LENGTHB(_utf8 0xC39F) LENGTHB(CHAR(14844588 USING utf8))
|
|
2 3
|
|
EXPLAIN EXTENDED SELECT LENGTH('a'), LENGTHB('a');
|
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select char_length('a') AS "LENGTH('a')",octet_length('a') AS "LENGTHB('a')"
|