blob: e260f5ad6da1fb54875da8c07a5da5ff71fc02db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
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')"
|