Commit 9e74a7f4 authored by Lena Startseva's avatar Lena Startseva

Removing MDEV-27871 from tastcases because it is not a bug

parent 55db59f1
......@@ -1293,11 +1293,9 @@ INSERT INTO t1 (s1) VALUES
(_ucs2 0x101C1000103A10181000103A),
(_ucs2 0x101C103910181000103A /* tea */);
# enable view-protocol after fix MDEV-27871
--disable_view_protocol
SELECT id, IF(LEFT(s1,1)='-',s1,CONCAT(HEX(WEIGHT_STRING(s1)),'\t', HEX(CONVERT(s1 USING ucs2)))) FROM t1 ORDER BY id;
--enable_view_protocol
--disable_service_connection
SELECT id, IF(LEFT(s1,1)='-',s1,CONCAT(HEX(WEIGHT_STRING(s1)),'\t', HEX(CONVERT(s1 USING ucs2)))) as exp FROM t1 ORDER BY id;
--enable_service_connection
DROP TABLE t1;
......
#remove this include after fix MDEV-27871
# maybe some tests need to be excluded separately after fix
--source include/no_view_protocol.inc
SET TIME_ZONE = _latin1 '+03:00';
--echo #
......@@ -464,6 +460,7 @@ show create table t1;
drop table t1;
--disable_ps2_protocol
--disable_view_protocol
# Ensure that row_count() value is reset after drop table.
select 1;
select hex(concat(row_count()));
......@@ -475,6 +472,7 @@ select hex(concat(found_rows()));
create table t1 as select concat(found_rows()) as c1;
show create table t1;
drop table t1;
--enable_view_protocol
--enable_ps2_protocol
create table t1 as select concat(uuid_short()) as c1;
......@@ -664,71 +662,71 @@ create table t1 as select concat(Dimension(GeomFromText('LINSTRING(0 0,10 10)'))
show create table t1;
drop table t1;
select hex(concat(NumGeometries(MultiPointFromText('MULTIPOINT(0 0,10 10)'))));
select hex(concat(NumGeometries(MultiPointFromText('MULTIPOINT(0 0,10 10)')))) as exp;
create table t1 as select concat(NumGeometries(MultiPointFromText('MULTIPOINT(0 0,10 10)'))) as c1;
show create table t1;
drop table t1;
select hex(concat(NumPoints(MultiPointFromText('LINESTRING(0 0,10 10)'))));
select hex(concat(NumPoints(MultiPointFromText('LINESTRING(0 0,10 10)')))) as exp;
create table t1 as select concat(NumPoints(MultiPointFromText('LINESTRING(0 0,10 10)'))) as c1;
show create table t1;
drop table t1;
select hex(concat(SRID(MultiPointFromText('MULTIPOINT(0 0,10 10)'))));
select hex(concat(SRID(MultiPointFromText('MULTIPOINT(0 0,10 10)')))) as exp;
create table t1 as select concat(SRID(MultiPointFromText('MULTIPOINT(0 0,10 10)'))) as c1;
show create table t1;
drop table t1;
select hex(concat(NumInteriorRings(PolygonFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))'))));
select hex(concat(NumInteriorRings(PolygonFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')))) as exp;
create table t1 as select concat(NumInteriorRings(PolygonFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))'))) as c1;
show create table t1;
drop table t1;
select hex(concat(IsEmpty(GeomFromText('POINT(1 1)'))));
select hex(concat(IsEmpty(GeomFromText('POINT(1 1)')))) as exp;
create table t1 as select concat(IsEmpty(GeomFromText('Point(1 1)'))) as c1;
show create table t1;
drop table t1;
select hex(concat(IsSimple(GeomFromText('POINT(1 1)'))));
select hex(concat(IsSimple(GeomFromText('POINT(1 1)')))) as exp;
create table t1 as select concat(IsSimple(GeomFromText('Point(1 1)'))) as c1;
show create table t1;
drop table t1;
select hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))));
select hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)')))) as exp;
create table t1 as select concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))) as c1;
show create table t1;
drop table t1;
select hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))));
select hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)')))) as exp;
create table t1 as select concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))) as c1;
drop table t1;
select hex(concat(x(GeomFromText('Point(1 2)'))));
select hex(concat(x(GeomFromText('Point(1 2)')))) as exp;
create table t1 as select concat(x(GeomFromText('Point(1 2)'))) as c1;
show create table t1;
drop table t1;
select hex(concat(y(GeomFromText('Point(1 2)'))));
select hex(concat(y(GeomFromText('Point(1 2)')))) as exp;
create table t1 as select concat(x(GeomFromText('Point(1 2)'))) as c1;
show create table t1;
drop table t1;
select hex(concat(GLength(GeomFromText('LineString(1 2,2 2)'))));
select hex(concat(GLength(GeomFromText('LineString(1 2,2 2)')))) as exp;
create table t1 as select concat(GLength(GeomFromText('LineString(1 2, 2 2)'))) as c1;
show create table t1;
drop table t1;
select hex(concat(Area(GeomFromText('Polygon((0 0,1 0,1 1,0 1,0 0))'))));
select hex(concat(Area(GeomFromText('Polygon((0 0,1 0,1 1,0 1,0 0))')))) as exp;
create table t1 as select concat(Area(GeomFromText('Polygon((0 0,1 0,1 1,0 1,0 0))'))) as c1;
show create table t1;
drop table t1;
select hex(concat(GeometryType(GeomFromText('Point(1 2)'))));
select hex(concat(GeometryType(GeomFromText('Point(1 2)')))) as exp;
create table t1 as select concat(GeometryType(GeomFromText('Point(1 2)'))) as c1;
show create table t1;
drop table t1;
select hex(concat(AsText(GeomFromText('Point(1 2)'))));
select hex(concat(AsText(GeomFromText('Point(1 2)')))) as exp;
create table t1 as select concat(AsText(GeomFromText('Point(1 2)'))) as c1;
show create table t1;
drop table t1;
......@@ -874,7 +872,7 @@ create table t1 as select concat(sec_to_time(2378)) as c1;
show create table t1;
drop table t1;
select hex(concat(timediff('2001-01-02 00:00:00', '2001-01-01 00:00:00')));
select hex(concat(timediff('2001-01-02 00:00:00', '2001-01-01 00:00:00'))) as exp;
create table t1 as select concat(timediff('2001-01-02 00:00:00', '2001-01-01 00:00:00')) as c1;
show create table t1;
drop table t1;
......@@ -894,12 +892,12 @@ create table t1 as select concat(from_unixtime(1111885200)) as c1;
show create table t1;
drop table t1;
select hex(concat(convert_tz('2004-01-01 12:00:00','+10:00','-6:00')));
select hex(concat(convert_tz('2004-01-01 12:00:00','+10:00','-6:00'))) as exp;
create table t1 as select concat(convert_tz('2004-01-01 12:00:00','+10:00','-6:00')) as c1;
show create table t1;
drop table t1;
select hex(concat(date_add('2004-01-01 12:00:00', interval 1 day)));
select hex(concat(date_add('2004-01-01 12:00:00', interval 1 day))) as exp;
create table t1 as select concat(date_add('2004-01-01 12:00:00', interval 1 day)) as c1;
show create table t1;
select * from t1;
......@@ -1646,9 +1644,11 @@ INSERT INTO t1 VALUES (1234567);
SELECT GROUP_CONCAT(IFNULL(a,'')) FROM t1;
SELECT GROUP_CONCAT(IF(a,a,'')) FROM t1;
SELECT GROUP_CONCAT(CASE WHEN a THEN a ELSE '' END) FROM t1;
--disable_view_protocol
--enable_metadata
SELECT COALESCE(a,'') FROM t1 GROUP BY 1;
--disable_metadata
--enable_view_protocol
--echo # All columns must be VARCHAR(9) with the same length:
--disable_warnings
CREATE TABLE t2 AS
......@@ -1764,15 +1764,17 @@ SELECT
DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE) AS field_datetime;
SHOW CREATE TABLE t1;
DROP TABLE t1;
--enable_metadata
# PS protocol gives different "Max length" value for DATETIME.
--disable_ps_protocol
--disable_view_protocol
--enable_metadata
SELECT
DATE_SUB('2007-08-03', INTERVAL 1 DAY) AS field_str1,
DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE) AS field1_str2,
DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY) AS field_date,
DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE) AS field_datetime;
--disable_metadata
--enable_view_protocol
--enable_ps_protocol
SELECT
HEX(DATE_SUB('2007-08-03', INTERVAL 1 MINUTE)) AS field_str1,
......
......@@ -52,14 +52,13 @@ DROP TABLE t1;
--echo #
--echo # IF, CASE, LEAST
--echo #
#enable after fix MDEV-27871
--disable_view_protocol
eval SELECT IF('abc' COLLATE $coll = 'abc ', 'pad', 'nopad');
eval SELECT CASE 'abc' COLLATE $coll WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
eval SELECT CASE WHEN 'abc' COLLATE $coll = 'abc ' THEN 'pad' ELSE 'nopad' END;
eval SELECT HEX(LEAST('abc ' COLLATE $coll, 'abc '));
eval SELECT HEX(GREATEST('abc ' COLLATE $coll, 'abc '));
--enable_view_protocol
eval SELECT IF('abc' COLLATE $coll = 'abc ', 'pad', 'nopad') as exp;
eval SELECT CASE 'abc' COLLATE $coll WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
eval SELECT CASE WHEN 'abc' COLLATE $coll = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
eval SELECT HEX(LEAST('abc ' COLLATE $coll, 'abc ')) as exp;
eval SELECT HEX(GREATEST('abc ' COLLATE $coll, 'abc ')) as exp;
--echo #
--echo # Collation mix
--echo #
......
......@@ -3,10 +3,7 @@
--echo #
SELECT @@character_set_connection, HEX(CAST(_utf8'÷' AS CHAR));
# enable view-protocol after fix MDEV-27871
--disable_view_protocol
SELECT STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR));
--enable_view_protocol
SELECT STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR)) as exp;
CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0;
SHOW COLUMNS FROM t1;
INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d');
......
......@@ -2,11 +2,6 @@
# Tests with the utf8mb4 character set
#
# Tests will be skipped for the view protocol because the view protocol uses
# an additional util connection and don't use for this nessesary configurations
# Also need to resolve MDEV-27871
-- source include/no_view_protocol.inc
--source include/default_optimizer_switch.inc
--disable_warnings
drop table if exists t1,t2;
......@@ -31,26 +26,26 @@ select locate('HE','hello' collate utf8mb4_bin);
select locate('HE','hello' collate utf8mb4_bin,2);
select locate('LO','hello' collate utf8mb4_bin,2);
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2);
select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2);
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2);
select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin);
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin);
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2) as exp;
select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2) as exp;
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2) as exp;
select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin) as exp;
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin) as exp;
select length(_utf8mb4 0xD0B1), bit_length(_utf8mb4 0xD0B1), char_length(_utf8mb4 0xD0B1);
select length(_utf8mb4 0xD0B1), bit_length(_utf8mb4 0xD0B1), char_length(_utf8mb4 0xD0B1) as exp;
select 'a' like 'a';
select 'A' like 'a';
select 'A' like 'a' collate utf8mb4_bin;
select _utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%');
select _utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%') as exp;
# Bug #6040: can't retrieve records with umlaut
# characters in case insensitive manner.
# Case insensitive search LIKE comparison
# was broken for multibyte characters:
select convert(_latin1'Gnter Andr' using utf8mb4) like CONVERT(_latin1'GNTER%' USING utf8mb4);
select CONVERT(_koi8r'' USING utf8mb4) LIKE CONVERT(_koi8r'' USING utf8mb4);
select CONVERT(_koi8r'' USING utf8mb4) LIKE CONVERT(_koi8r'' USING utf8mb4);
select convert(_latin1'Gnter Andr' using utf8mb4) like CONVERT(_latin1'GNTER%' USING utf8mb4) as exp;
select CONVERT(_koi8r'' USING utf8mb4) LIKE CONVERT(_koi8r'' USING utf8mb4) as exp;
select CONVERT(_koi8r'' USING utf8mb4) LIKE CONVERT(_koi8r'' USING utf8mb4) as exp;
#
# Check the following:
......@@ -666,6 +661,7 @@ DROP TABLE t1;
#
# Bug #6043 erratic searching for diacriticals in indexed MyISAM UTF-8 table
#
--disable_service_connection
SET NAMES latin1;
eval CREATE TABLE t1 (
id int unsigned NOT NULL auto_increment,
......@@ -682,6 +678,7 @@ SELECT id, term FROM t1 where (list_id = 1) AND (term = "testetest");
SELECT id, term FROM t1 where (list_id = 1) AND (term = "testtest");
DROP TABLE t1;
}
--enable_service_connection
#
# Bug #6019 SELECT tries to use too short prefix index on utf8mb4 data
......@@ -747,10 +744,10 @@ drop table t1;
#
# Bug#22638 SOUNDEX broken for international characters
#
select soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB);
select hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB));
select soundex(_utf8mb4 0xD091D092D093);
select hex(soundex(_utf8mb4 0xD091D092D093));
select soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB) as exp;
select hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)) as exp;
select soundex(_utf8mb4 0xD091D092D093) as exp;
select hex(soundex(_utf8mb4 0xD091D092D093)) as exp;
SET collation_connection='utf8mb4_general_ci';
......@@ -786,7 +783,7 @@ drop table t1;
#
# Bug#8385: utf8mb4_general_ci treats Cyrillic letters I and SHORT I as the same
#
select convert(_koi8r'' using utf8mb4) < convert(_koi8r'' using utf8mb4);
select convert(_koi8r'' using utf8mb4) < convert(_koi8r'' using utf8mb4) as exp;
#
# Bugs#5980: NULL requires a characterset in a union
......@@ -1191,6 +1188,7 @@ DROP TABLE t1;
# (see bug #16674 as well)
#
--disable_service_connection
SET NAMES latin2;
if (!$is_heap)
......@@ -1220,6 +1218,7 @@ SELECT * FROM t1 WHERE tid=72 and val LIKE 'VOLN
DROP TABLE t1;
}
--enable_service_connection
#
# Bug 20709: problem with utf8mb4 fields in temporary tables
......@@ -1420,8 +1419,11 @@ set names utf8mb4;
eval create table t1 (a varchar(10) character set latin1, b int) engine $engine;
insert into t1 values ('a',1);
select concat(a, if(b>10, N'x', N'y')) from t1;
#Incorrect collation in error message with view protocol
--disable_view_protocol
--error 1267
select concat(a, if(b>10, N'æ', N'ß')) from t1;
--enable_view_protocol
drop table t1;
# Conversion tests for character set introducers
......
SET SESSION character_set_connection=latin2;
SET SESSION character_set_client=cp1250;
--disable_service_connection
--echo #
--echo # Test litteral
--echo #
#enable view protocol after fix MDEV-27871 and
# it is necessary that the view protocol uses the same connection,
# not util connection
# For "--view-protocol" NULLIF('','') converts to nullif(NULL,NULL)
# in view definition and CHARSET(nullif(NULL,NULL)) returns 'binary'.
# Also view does not allow columns with the same name,
# so it uses generated names
--disable_view_protocol
SET sql_mode=@mode;
select @@sql_mode;
SELECT '',CHARSET(''), null, CHARSET(null), CAST(null as char(10)), CHARSET(CAST(null as char(10))), 'x', CHARSET('x');
......@@ -21,7 +19,6 @@ SELECT '',CHARSET(''), null, CHARSET(null), CAST(null as char(10)), CHARSET(CAST
SELECT CHARSET(NULLIF('','')),NULLIF('','');
--echo #
--echo # Test NCHAR litteral
--echo #
......@@ -33,7 +30,6 @@ SELECT N'',CHARSET(N''), N'x', CHARSET(N'x');
SELECT CHARSET(NULLIF(N'',N'')),NULLIF(N'',N'');
--echo #
--echo # Test CHARSET prefix litteral
--echo #
......@@ -63,12 +59,12 @@ SELECT '' '' '';
SELECT '' '' '',CHARSET('' '' '');
SELECT _latin1'' '' '',CHARSET(_latin1'' '' '');
SELECT N'' '' '',CHARSET(N'' '' '');
--enable_view_protocol
--echo #
--echo # UNION - implicit group by
--echo #
--disable_service_connection
SELECT 1, null
UNION
SELECT 1 , ''
......@@ -84,16 +80,10 @@ UNION
SELECT 1 , _cp1250 ''
ORDER BY 1;
# it is necessary that the view protocol uses the same connection,
# not util connection
--disable_view_protocol
SELECT NULLIF(_cp1250 '',_cp1250 '')
UNION
SELECT NULLIF(N'',N'');
--enable_view_protocol
--error ER_CANT_AGGREGATE_2COLLATIONS
SELECT 1 , _latin2 ''
UNION
......@@ -131,5 +121,4 @@ EXPLAIN EXTENDED SELECT '';
EXPLAIN EXTENDED SELECT _latin1'';
EXPLAIN EXTENDED SELECT N'';
EXPLAIN EXTENDED SELECT '' '';
--enable_service_connection
......@@ -119,28 +119,25 @@ CALL p1(-1, 'GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,
--enable_query_log
#enable after fix MDEV-27871
--disable_view_protocol
SELECT ST_CONTAINS(
GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
GeomFromText('POINT(5 10)'));
GeomFromText('POINT(5 10)')) as geom;
SELECT AsText(ST_UNION(
GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
GeomFromText('POINT(5 10)')));
GeomFromText('POINT(5 10)'))) as geom;
DROP PROCEDURE p1;
--echo #
--echo # Bug #13833019 ASSERTION `T1->RESULT_RANGE' FAILED IN GCALC_OPERATION_REDUCER::END_COUPLE
--echo #
SELECT GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((0 0,9 4,3 3,0 0)),((2 2,2 2,8 8,2 3,2 2)))'), 3));
SELECT GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((0 0,9 4,3 3,0 0)),((2 2,2 2,8 8,2 3,2 2)))'), 3)) as geom;
--echo #
--echo # Bug #13832749 HANDLE_FATAL_SIGNAL IN GCALC_FUNCTION::COUNT_INTERNAL
--echo #
SELECT GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)), ((9 9,8 1,1 5,9 9)))'),1));
SELECT GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)), ((9 9,8 1,1 5,9 9)))'),1)) as geom;
--enable_view_protocol
--echo #
--echo # Bug#13358363 - ASSERTION: N > 0 && N < SINUSES_CALCULATED*2+1 | GET_N_SINCOS/ADD_EDGE_BUFFER
......@@ -148,22 +145,19 @@ SELECT GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3
DO ST_BUFFER(ST_GEOMCOLLFROMTEXT('linestring(1 1,2 2)'),'');
#enable after fix MDEV-27871
--disable_view_protocol
SELECT ST_WITHIN(
LINESTRINGFROMTEXT(' LINESTRING(3 8,9 2,3 8,3 3,7 6,4 7,4 7,8 1) '),
ST_BUFFER(MULTIPOLYGONFROMTEXT(' MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2),(4 4,4 6,6 6,6 4,4 4)),((0 5,3 5,3 2,1 2,1 1,3 1,3 0,0 0,0 3,2 3,2 4,0 4,0 5))) '),
ST_NUMINTERIORRINGS(POLYGONFROMTEXT('POLYGON((3 5,2 4,2 5,3 5)) '))));
ST_NUMINTERIORRINGS(POLYGONFROMTEXT('POLYGON((3 5,2 4,2 5,3 5)) ')))) as st;
SELECT ST_DIMENSION(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((3 5,2 5,2 4,3 4,3 5)) '),
ST_NUMINTERIORRINGS(POLYGONFROMTEXT(' POLYGON((0 0,9 3,4 2,0 0))'))));
ST_NUMINTERIORRINGS(POLYGONFROMTEXT(' POLYGON((0 0,9 3,4 2,0 0))')))) as st;
SELECT ST_NUMINTERIORRINGS(
ST_ENVELOPE(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5))) '),
SRID(MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 2,4 2,1 2,2 4,2 2)) ')))));
SRID(MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 2,4 2,1 2,2 4,2 2)) '))))) as st;
SELECT ASTEXT(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((9 9,5 2,4 5,9 9))'),
SRID(GEOMETRYFROMTEXT(' MULTIPOINT(8 4,5 0,7 8,6 9,3 4,7 3,5 5) '))));
SRID(GEOMETRYFROMTEXT(' MULTIPOINT(8 4,5 0,7 8,6 9,3 4,7 3,5 5) ')))) as st;
--enable_view_protocol
......@@ -301,31 +301,28 @@ select count(*) from t0;
# Test for BUG#4177
# enable view-protocol after fix MDEV-27871
--disable_view_protocol
drop table t4;
create table t4 (a int);
insert into t4 values (1),(4),(3);
set @save_join_buffer_size=@@join_buffer_size;
set join_buffer_size= 4096;
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) as exp
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
where (A.key1 < 500000 or A.key2 < 3)
and (B.key1 < 500000 or B.key2 < 3);
select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) as exp
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
where (A.key1 < 500000 or A.key2 < 3)
and (B.key1 < 500000 or B.key2 < 3);
update t0 set key1=1;
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) as exp
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
where (A.key1 = 1 or A.key2 = 1)
and (B.key1 = 1 or B.key2 = 1);
select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) as exp
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
where (A.key1 = 1 or A.key2 = 1)
and (B.key1 = 1 or B.key2 = 1);
......@@ -338,12 +335,12 @@ update t0 set key2=1, key3=1, key4=1, key5=1,key6=1,key7=1 where key7 < 500;
# scan cost estimates depend on ha_myisam::ref_length)
--replace_column 9 #
--replace_result "4,4,4,4,4,4,4" X "4,4,4,4,4,4" X "i6,i7" "i6,i7?" "i6" "i6,i7?"
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) as exp
from t0 as A straight_join t0 as B
where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7 = 1 or A.key8=1)
and (B.key1 = 1 and B.key2 = 1 and B.key3 = 1 and B.key4=1 and B.key5=1 and B.key6=1 and B.key7 = 1 or B.key8=1);
select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) as exp
from t0 as A straight_join t0 as B
where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7 = 1 or A.key8=1)
and (B.key1 = 1 and B.key2 = 1 and B.key3 = 1 and B.key4=1 and B.key5=1 and B.key6=1 and B.key7 = 1 or B.key8=1);
......@@ -353,8 +350,6 @@ set join_buffer_size= @save_join_buffer_size;
drop table t0, t1, t2, t3, t4;
--enable_view_protocol
# BUG#16166
CREATE TABLE t1 (
cola char(3) not null, colb char(3) not null, filler char(200),
......
......@@ -4927,20 +4927,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'big5_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'big5_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'big5_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -5065,20 +5065,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'big5_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'big5_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'big5_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -5204,20 +5204,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'big5_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'big5_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'big5_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'big5_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'big5_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'big5_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'big5_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'big5_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'big5_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'big5_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'big5_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'big5_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'big5_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'big5_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'big5_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -5342,20 +5342,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'big5_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'big5_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'big5_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'big5_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'big5_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'big5_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'big5_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'big5_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'big5_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'big5_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'big5_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'big5_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'big5_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'big5_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'big5_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......
......@@ -1131,8 +1131,8 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(NumGeometries(MultiPointFromText('MULTIPOINT(0 0,10 10)'))));
hex(concat(NumGeometries(MultiPointFromText('MULTIPOINT(0 0,10 10)'))))
select hex(concat(NumGeometries(MultiPointFromText('MULTIPOINT(0 0,10 10)')))) as exp;
exp
32
create table t1 as select concat(NumGeometries(MultiPointFromText('MULTIPOINT(0 0,10 10)'))) as c1;
show create table t1;
......@@ -1141,8 +1141,8 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(NumPoints(MultiPointFromText('LINESTRING(0 0,10 10)'))));
hex(concat(NumPoints(MultiPointFromText('LINESTRING(0 0,10 10)'))))
select hex(concat(NumPoints(MultiPointFromText('LINESTRING(0 0,10 10)')))) as exp;
exp
32
create table t1 as select concat(NumPoints(MultiPointFromText('LINESTRING(0 0,10 10)'))) as c1;
show create table t1;
......@@ -1151,8 +1151,8 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(SRID(MultiPointFromText('MULTIPOINT(0 0,10 10)'))));
hex(concat(SRID(MultiPointFromText('MULTIPOINT(0 0,10 10)'))))
select hex(concat(SRID(MultiPointFromText('MULTIPOINT(0 0,10 10)')))) as exp;
exp
30
create table t1 as select concat(SRID(MultiPointFromText('MULTIPOINT(0 0,10 10)'))) as c1;
show create table t1;
......@@ -1161,8 +1161,8 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(NumInteriorRings(PolygonFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))'))));
hex(concat(NumInteriorRings(PolygonFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))'))))
select hex(concat(NumInteriorRings(PolygonFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')))) as exp;
exp
31
create table t1 as select concat(NumInteriorRings(PolygonFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))'))) as c1;
show create table t1;
......@@ -1171,8 +1171,8 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(IsEmpty(GeomFromText('POINT(1 1)'))));
hex(concat(IsEmpty(GeomFromText('POINT(1 1)'))))
select hex(concat(IsEmpty(GeomFromText('POINT(1 1)')))) as exp;
exp
30
create table t1 as select concat(IsEmpty(GeomFromText('Point(1 1)'))) as c1;
show create table t1;
......@@ -1181,8 +1181,8 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(IsSimple(GeomFromText('POINT(1 1)'))));
hex(concat(IsSimple(GeomFromText('POINT(1 1)'))))
select hex(concat(IsSimple(GeomFromText('POINT(1 1)')))) as exp;
exp
31
create table t1 as select concat(IsSimple(GeomFromText('Point(1 1)'))) as c1;
show create table t1;
......@@ -1191,8 +1191,8 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))));
hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))))
select hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)')))) as exp;
exp
30
create table t1 as select concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))) as c1;
show create table t1;
......@@ -1201,13 +1201,13 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))));
hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))))
select hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)')))) as exp;
exp
31
create table t1 as select concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))) as c1;
drop table t1;
select hex(concat(x(GeomFromText('Point(1 2)'))));
hex(concat(x(GeomFromText('Point(1 2)'))))
select hex(concat(x(GeomFromText('Point(1 2)')))) as exp;
exp
31
create table t1 as select concat(x(GeomFromText('Point(1 2)'))) as c1;
show create table t1;
......@@ -1216,8 +1216,8 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(23) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(y(GeomFromText('Point(1 2)'))));
hex(concat(y(GeomFromText('Point(1 2)'))))
select hex(concat(y(GeomFromText('Point(1 2)')))) as exp;
exp
32
create table t1 as select concat(x(GeomFromText('Point(1 2)'))) as c1;
show create table t1;
......@@ -1226,8 +1226,8 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(23) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(GLength(GeomFromText('LineString(1 2,2 2)'))));
hex(concat(GLength(GeomFromText('LineString(1 2,2 2)'))))
select hex(concat(GLength(GeomFromText('LineString(1 2,2 2)')))) as exp;
exp
31
create table t1 as select concat(GLength(GeomFromText('LineString(1 2, 2 2)'))) as c1;
show create table t1;
......@@ -1236,8 +1236,8 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(23) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(Area(GeomFromText('Polygon((0 0,1 0,1 1,0 1,0 0))'))));
hex(concat(Area(GeomFromText('Polygon((0 0,1 0,1 1,0 1,0 0))'))))
select hex(concat(Area(GeomFromText('Polygon((0 0,1 0,1 1,0 1,0 0))')))) as exp;
exp
31
create table t1 as select concat(Area(GeomFromText('Polygon((0 0,1 0,1 1,0 1,0 0))'))) as c1;
show create table t1;
......@@ -1246,8 +1246,8 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(23) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(GeometryType(GeomFromText('Point(1 2)'))));
hex(concat(GeometryType(GeomFromText('Point(1 2)'))))
select hex(concat(GeometryType(GeomFromText('Point(1 2)')))) as exp;
exp
504F494E54
create table t1 as select concat(GeometryType(GeomFromText('Point(1 2)'))) as c1;
show create table t1;
......@@ -1256,8 +1256,8 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(AsText(GeomFromText('Point(1 2)'))));
hex(concat(AsText(GeomFromText('Point(1 2)'))))
select hex(concat(AsText(GeomFromText('Point(1 2)')))) as exp;
exp
504F494E542831203229
create table t1 as select concat(AsText(GeomFromText('Point(1 2)'))) as c1;
show create table t1;
......@@ -1526,8 +1526,8 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(timediff('2001-01-02 00:00:00', '2001-01-01 00:00:00')));
hex(concat(timediff('2001-01-02 00:00:00', '2001-01-01 00:00:00')))
select hex(concat(timediff('2001-01-02 00:00:00', '2001-01-01 00:00:00'))) as exp;
exp
32343A30303A3030
create table t1 as select concat(timediff('2001-01-02 00:00:00', '2001-01-01 00:00:00')) as c1;
show create table t1;
......@@ -1566,8 +1566,8 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(19) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(convert_tz('2004-01-01 12:00:00','+10:00','-6:00')));
hex(concat(convert_tz('2004-01-01 12:00:00','+10:00','-6:00')))
select hex(concat(convert_tz('2004-01-01 12:00:00','+10:00','-6:00'))) as exp;
exp
323030332D31322D33312032303A30303A3030
create table t1 as select concat(convert_tz('2004-01-01 12:00:00','+10:00','-6:00')) as c1;
show create table t1;
......@@ -1576,8 +1576,8 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(19) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(date_add('2004-01-01 12:00:00', interval 1 day)));
hex(concat(date_add('2004-01-01 12:00:00', interval 1 day)))
select hex(concat(date_add('2004-01-01 12:00:00', interval 1 day))) as exp;
exp
323030342D30312D30322031323A30303A3030
create table t1 as select concat(date_add('2004-01-01 12:00:00', interval 1 day)) as c1;
show create table t1;
......
#remove this include after fix MDEV-27871
--source include/no_view_protocol.inc
set names binary;
--source include/ctype_numconv.inc
......@@ -234,22 +230,30 @@ SET NAMES latin1,character_set_connection=binary;
--echo # Binary format, binary result
SELECT DATE_FORMAT('2004-02-02','%W');
SELECT HEX(DATE_FORMAT('2004-02-02','%W'));
#Enable after fix MDEV-33936
--disable_view_protocol
SELECT DATE_FORMAT(TIME'-01:01:01','%h');
SELECT HEX(DATE_FORMAT(TIME'-01:01:01','%h'));
--enable_view_protocol
--echo # latin1 format, binary result
SELECT DATE_FORMAT('2004-02-02',_latin1'%W');
SELECT HEX(DATE_FORMAT('2004-02-02',_latin1'%W'));
#Enable after fix MDEV-33936
--disable_view_protocol
SELECT DATE_FORMAT(TIME'-01:01:01',_latin1'%h');
SELECT HEX(DATE_FORMAT(TIME'-01:01:01',_latin1'%h'));
--enable_view_protocol
--echo # Binary format, latin1 result
SET NAMES latin1;
SELECT DATE_FORMAT('2004-02-02',_binary'%W');
SELECT HEX(DATE_FORMAT('2004-02-02',_binary'%W'));
#Enable after fix MDEV-33936
--disable_view_protocol
SELECT DATE_FORMAT(TIME'-01:01:01',_binary'%h');
SELECT HEX(DATE_FORMAT(TIME'-01:01:01',_binary'%h'));
--enable_view_protocol
--echo #
--echo # End of 10.4 tests
--echo #
......
......@@ -1543,8 +1543,8 @@ t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(NumGeometries(MultiPointFromText('MULTIPOINT(0 0,10 10)'))));
hex(concat(NumGeometries(MultiPointFromText('MULTIPOINT(0 0,10 10)'))))
select hex(concat(NumGeometries(MultiPointFromText('MULTIPOINT(0 0,10 10)')))) as exp;
exp
32
create table t1 as select concat(NumGeometries(MultiPointFromText('MULTIPOINT(0 0,10 10)'))) as c1;
show create table t1;
......@@ -1553,8 +1553,8 @@ t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(NumPoints(MultiPointFromText('LINESTRING(0 0,10 10)'))));
hex(concat(NumPoints(MultiPointFromText('LINESTRING(0 0,10 10)'))))
select hex(concat(NumPoints(MultiPointFromText('LINESTRING(0 0,10 10)')))) as exp;
exp
32
create table t1 as select concat(NumPoints(MultiPointFromText('LINESTRING(0 0,10 10)'))) as c1;
show create table t1;
......@@ -1563,8 +1563,8 @@ t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(SRID(MultiPointFromText('MULTIPOINT(0 0,10 10)'))));
hex(concat(SRID(MultiPointFromText('MULTIPOINT(0 0,10 10)'))))
select hex(concat(SRID(MultiPointFromText('MULTIPOINT(0 0,10 10)')))) as exp;
exp
30
create table t1 as select concat(SRID(MultiPointFromText('MULTIPOINT(0 0,10 10)'))) as c1;
show create table t1;
......@@ -1573,8 +1573,8 @@ t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(NumInteriorRings(PolygonFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))'))));
hex(concat(NumInteriorRings(PolygonFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))'))))
select hex(concat(NumInteriorRings(PolygonFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')))) as exp;
exp
31
create table t1 as select concat(NumInteriorRings(PolygonFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))'))) as c1;
show create table t1;
......@@ -1583,8 +1583,8 @@ t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(IsEmpty(GeomFromText('POINT(1 1)'))));
hex(concat(IsEmpty(GeomFromText('POINT(1 1)'))))
select hex(concat(IsEmpty(GeomFromText('POINT(1 1)')))) as exp;
exp
30
create table t1 as select concat(IsEmpty(GeomFromText('Point(1 1)'))) as c1;
show create table t1;
......@@ -1593,8 +1593,8 @@ t1 CREATE TABLE `t1` (
`c1` varchar(21) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(IsSimple(GeomFromText('POINT(1 1)'))));
hex(concat(IsSimple(GeomFromText('POINT(1 1)'))))
select hex(concat(IsSimple(GeomFromText('POINT(1 1)')))) as exp;
exp
31
create table t1 as select concat(IsSimple(GeomFromText('Point(1 1)'))) as c1;
show create table t1;
......@@ -1603,8 +1603,8 @@ t1 CREATE TABLE `t1` (
`c1` varchar(2) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))));
hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))))
select hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)')))) as exp;
exp
30
create table t1 as select concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))) as c1;
show create table t1;
......@@ -1613,13 +1613,13 @@ t1 CREATE TABLE `t1` (
`c1` varchar(2) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))));
hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))))
select hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)')))) as exp;
exp
31
create table t1 as select concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))) as c1;
drop table t1;
select hex(concat(x(GeomFromText('Point(1 2)'))));
hex(concat(x(GeomFromText('Point(1 2)'))))
select hex(concat(x(GeomFromText('Point(1 2)')))) as exp;
exp
31
create table t1 as select concat(x(GeomFromText('Point(1 2)'))) as c1;
show create table t1;
......@@ -1628,8 +1628,8 @@ t1 CREATE TABLE `t1` (
`c1` varchar(23) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(y(GeomFromText('Point(1 2)'))));
hex(concat(y(GeomFromText('Point(1 2)'))))
select hex(concat(y(GeomFromText('Point(1 2)')))) as exp;
exp
32
create table t1 as select concat(x(GeomFromText('Point(1 2)'))) as c1;
show create table t1;
......@@ -1638,8 +1638,8 @@ t1 CREATE TABLE `t1` (
`c1` varchar(23) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(GLength(GeomFromText('LineString(1 2,2 2)'))));
hex(concat(GLength(GeomFromText('LineString(1 2,2 2)'))))
select hex(concat(GLength(GeomFromText('LineString(1 2,2 2)')))) as exp;
exp
31
create table t1 as select concat(GLength(GeomFromText('LineString(1 2, 2 2)'))) as c1;
show create table t1;
......@@ -1648,8 +1648,8 @@ t1 CREATE TABLE `t1` (
`c1` varchar(23) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(Area(GeomFromText('Polygon((0 0,1 0,1 1,0 1,0 0))'))));
hex(concat(Area(GeomFromText('Polygon((0 0,1 0,1 1,0 1,0 0))'))))
select hex(concat(Area(GeomFromText('Polygon((0 0,1 0,1 1,0 1,0 0))')))) as exp;
exp
31
create table t1 as select concat(Area(GeomFromText('Polygon((0 0,1 0,1 1,0 1,0 0))'))) as c1;
show create table t1;
......@@ -1658,8 +1658,8 @@ t1 CREATE TABLE `t1` (
`c1` varchar(23) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(GeometryType(GeomFromText('Point(1 2)'))));
hex(concat(GeometryType(GeomFromText('Point(1 2)'))))
select hex(concat(GeometryType(GeomFromText('Point(1 2)')))) as exp;
exp
504F494E54
create table t1 as select concat(GeometryType(GeomFromText('Point(1 2)'))) as c1;
show create table t1;
......@@ -1668,8 +1668,8 @@ t1 CREATE TABLE `t1` (
`c1` varchar(20) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(AsText(GeomFromText('Point(1 2)'))));
hex(concat(AsText(GeomFromText('Point(1 2)'))))
select hex(concat(AsText(GeomFromText('Point(1 2)')))) as exp;
exp
504F494E542831203229
create table t1 as select concat(AsText(GeomFromText('Point(1 2)'))) as c1;
show create table t1;
......@@ -1938,8 +1938,8 @@ t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(timediff('2001-01-02 00:00:00', '2001-01-01 00:00:00')));
hex(concat(timediff('2001-01-02 00:00:00', '2001-01-01 00:00:00')))
select hex(concat(timediff('2001-01-02 00:00:00', '2001-01-01 00:00:00'))) as exp;
exp
32343A30303A3030
create table t1 as select concat(timediff('2001-01-02 00:00:00', '2001-01-01 00:00:00')) as c1;
show create table t1;
......@@ -1978,8 +1978,8 @@ t1 CREATE TABLE `t1` (
`c1` varchar(19) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(convert_tz('2004-01-01 12:00:00','+10:00','-6:00')));
hex(concat(convert_tz('2004-01-01 12:00:00','+10:00','-6:00')))
select hex(concat(convert_tz('2004-01-01 12:00:00','+10:00','-6:00'))) as exp;
exp
323030332D31322D33312032303A30303A3030
create table t1 as select concat(convert_tz('2004-01-01 12:00:00','+10:00','-6:00')) as c1;
show create table t1;
......@@ -1988,8 +1988,8 @@ t1 CREATE TABLE `t1` (
`c1` varchar(19) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
select hex(concat(date_add('2004-01-01 12:00:00', interval 1 day)));
hex(concat(date_add('2004-01-01 12:00:00', interval 1 day)))
select hex(concat(date_add('2004-01-01 12:00:00', interval 1 day))) as exp;
exp
323030342D30312D30322031323A30303A3030
create table t1 as select concat(date_add('2004-01-01 12:00:00', interval 1 day)) as c1;
show create table t1;
......
......@@ -135,20 +135,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'cp932_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'cp932_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'cp932_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -273,20 +273,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'cp932_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'cp932_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'cp932_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -412,20 +412,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'cp932_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'cp932_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'cp932_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'cp932_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'cp932_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'cp932_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'cp932_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'cp932_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'cp932_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'cp932_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'cp932_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'cp932_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'cp932_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'cp932_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'cp932_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -550,20 +550,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'cp932_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'cp932_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'cp932_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'cp932_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'cp932_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'cp932_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'cp932_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'cp932_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'cp932_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'cp932_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'cp932_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'cp932_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'cp932_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'cp932_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'cp932_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......
......@@ -4,9 +4,6 @@
--echo # USED.
--echo #
#remove this include in 10.6 version
--source include/no_view_protocol.inc
SET @old_character_set_client= @@character_set_client;
SET @old_character_set_connection= @@character_set_connection;
SET @old_character_set_results= @@character_set_results;
......
......@@ -34029,20 +34029,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'eucjpms_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'eucjpms_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'eucjpms_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -34167,20 +34167,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'eucjpms_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'eucjpms_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'eucjpms_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -34306,20 +34306,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'eucjpms_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'eucjpms_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'eucjpms_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'eucjpms_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'eucjpms_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'eucjpms_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'eucjpms_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'eucjpms_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'eucjpms_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -34444,20 +34444,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'eucjpms_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'eucjpms_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'eucjpms_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'eucjpms_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'eucjpms_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'eucjpms_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'eucjpms_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'eucjpms_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'eucjpms_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......
......@@ -25547,20 +25547,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'euckr_korean_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'euckr_korean_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'euckr_korean_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -25685,20 +25685,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'euckr_korean_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'euckr_korean_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'euckr_korean_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -25824,20 +25824,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'euckr_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'euckr_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'euckr_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'euckr_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'euckr_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'euckr_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'euckr_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'euckr_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'euckr_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'euckr_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'euckr_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'euckr_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'euckr_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'euckr_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'euckr_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -25962,20 +25962,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'euckr_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'euckr_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'euckr_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'euckr_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'euckr_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'euckr_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'euckr_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'euckr_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'euckr_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'euckr_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'euckr_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'euckr_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'euckr_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'euckr_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'euckr_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......
......@@ -4617,20 +4617,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'gb2312_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'gb2312_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'gb2312_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -4755,20 +4755,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'gb2312_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'gb2312_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'gb2312_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -4894,20 +4894,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'gb2312_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'gb2312_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'gb2312_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'gb2312_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'gb2312_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'gb2312_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'gb2312_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'gb2312_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'gb2312_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'gb2312_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'gb2312_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'gb2312_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'gb2312_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'gb2312_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'gb2312_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -5032,20 +5032,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'gb2312_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'gb2312_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'gb2312_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'gb2312_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'gb2312_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'gb2312_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'gb2312_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'gb2312_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'gb2312_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'gb2312_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'gb2312_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'gb2312_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'gb2312_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'gb2312_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'gb2312_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......
......@@ -6085,20 +6085,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'gbk_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'gbk_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'gbk_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -6223,20 +6223,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'gbk_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'gbk_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'gbk_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -6362,20 +6362,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'gbk_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'gbk_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'gbk_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'gbk_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'gbk_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'gbk_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'gbk_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'gbk_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'gbk_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'gbk_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'gbk_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'gbk_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'gbk_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'gbk_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'gbk_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -6500,20 +6500,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'gbk_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'gbk_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'gbk_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'gbk_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'gbk_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'gbk_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'gbk_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'gbk_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'gbk_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'gbk_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'gbk_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'gbk_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'gbk_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'gbk_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'gbk_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......
......@@ -446,13 +446,10 @@ DROP TABLE t1;
--echo #
--echo # MDEV-7661 Unexpected result for: CAST(0xHHHH AS CHAR CHARACTER SET xxx) for incorrect byte sequences
--echo #
#enable after fix MDEV-27871
--disable_view_protocol
set sql_mode='';
SELECT HEX(CAST(0xA341 AS CHAR CHARACTER SET gb2312)) as exp;
SELECT HEX(CONVERT(CAST(0xA341 AS CHAR CHARACTER SET gb2312) USING utf8)) as exp;
set sql_mode=default;
--enable_view_protocol
--echo #
--echo # End of 10.1 tests
......
This diff is collapsed.
......@@ -139,8 +139,10 @@ select hex(cast(_ascii 0x7f as char(1) character set latin1));
--echo #
--echo # Bug#58022 ... like ... escape export_set ( ... ) crashes when export_set returns warnings
--echo #
#view-protocol doubles warning message
--disable_view_protocol
SELECT '' LIKE '' ESCAPE EXPORT_SET(1, 1, 1, 1, '');
--enable_view_protocol
--echo End of 5.1 tests
......@@ -223,6 +225,8 @@ SET NAMES latin1 COLLATE latin1_bin;
--echo # MDEV-6752 Trailing incomplete characters are not replaced to question marks on conversion
--echo #
SET NAMES utf8, character_set_connection=latin1;
--disable_service_connection
SELECT '';
SELECT HEX('');
SELECT HEX(CAST('' AS CHAR CHARACTER SET utf8));
......@@ -241,6 +245,7 @@ INSERT IGNORE INTO t1 VALUES ('
SHOW WARNINGS;
SELECT HEX(a),a FROM t1;
DROP TABLE t1;
--enable_service_connection
--echo #
--echo # MDEV-7629 Regression: Bit and hex string literals changed column names in 10.0.14
......
......@@ -3,9 +3,6 @@
--source include/have_utf16.inc
--source include/have_utf32.inc
#remove this include after fix MDEV-27871
--source include/no_view_protocol.inc
--disable_query_log
call mtr.add_suppression("Charset id.*trying to replace");
--enable_query_log
......@@ -69,25 +66,25 @@ select * from t1 where c1='b';
drop table t1;
# make sure utf8_test_ci is Unicode-5.0.0
SELECT hex(weight_string(_utf8mb4'a' collate utf8mb4_test_ci));
SELECT hex(weight_string(convert(_utf32 0x10002 using utf8mb4) collate utf8mb4_test_ci));
SELECT hex(@a:=convert(_utf32 0x10400 using utf8mb4) collate utf8mb4_test_ci), hex(lower(@a));
SELECT hex(@a:=convert(_utf32 0x10428 using utf8mb4) collate utf8mb4_test_ci), hex(upper(@a));
SELECT hex(@a:=convert(_utf32 0x2C00 using utf8mb4) collate utf8mb4_test_ci), hex(lower(@a));
SELECT hex(@a:=convert(_utf32 0x2C30 using utf8mb4) collate utf8mb4_test_ci), hex(upper(@a));
SELECT hex(weight_string(_utf8mb4'a' collate utf8mb4_test_ci)) as exp;
SELECT hex(weight_string(convert(_utf32 0x10002 using utf8mb4) collate utf8mb4_test_ci)) as exp;
SELECT hex(@a:=convert(_utf32 0x10400 using utf8mb4) collate utf8mb4_test_ci), hex(lower(@a)) as exp;
SELECT hex(@a:=convert(_utf32 0x10428 using utf8mb4) collate utf8mb4_test_ci), hex(upper(@a)) as exp;
SELECT hex(@a:=convert(_utf32 0x2C00 using utf8mb4) collate utf8mb4_test_ci), hex(lower(@a)) as exp;
SELECT hex(@a:=convert(_utf32 0x2C30 using utf8mb4) collate utf8mb4_test_ci), hex(upper(@a)) as exp;
# check that it works with supplementary characters
SELECT hex(weight_string(convert(_utf32 0x61 using utf8mb4) collate utf8mb4_test_ci));
SELECT hex(weight_string(convert(_utf32 0x62 using utf8mb4) collate utf8mb4_test_ci));
SELECT hex(weight_string(convert(_utf32 0x10062 using utf8mb4) collate utf8mb4_test_ci));
SELECT hex(weight_string(convert(_utf32 0x10400 using utf8mb4) collate utf8mb4_test_ci));
SELECT hex(weight_string(convert(_utf32 0x100400 using utf8mb4) collate utf8mb4_test_ci));
SELECT hex(weight_string(convert(_utf32 0x61 using utf8mb4) collate utf8mb4_test_ci)) as exp;
SELECT hex(weight_string(convert(_utf32 0x62 using utf8mb4) collate utf8mb4_test_ci)) as exp;
SELECT hex(weight_string(convert(_utf32 0x10062 using utf8mb4) collate utf8mb4_test_ci)) as exp;
SELECT hex(weight_string(convert(_utf32 0x10400 using utf8mb4) collate utf8mb4_test_ci)) as exp;
SELECT hex(weight_string(convert(_utf32 0x100400 using utf8mb4) collate utf8mb4_test_ci)) as exp;
# check contractions with non-ascii characters
SELECT hex(weight_string(_utf8mb4 0x64 collate utf8mb4_test_ci));
SELECT hex(weight_string(convert(_ucs2 0x0064017e using utf8mb4) collate utf8mb4_test_ci));
SELECT hex(weight_string(convert(_ucs2 0x0044017e using utf8mb4) collate utf8mb4_test_ci));
SELECT hex(weight_string(convert(_ucs2 0x0044017d using utf8mb4) collate utf8mb4_test_ci));
SELECT hex(weight_string(_utf8mb4 0x64 collate utf8mb4_test_ci)) as exp;
SELECT hex(weight_string(convert(_ucs2 0x0064017e using utf8mb4) collate utf8mb4_test_ci)) as exp;
SELECT hex(weight_string(convert(_ucs2 0x0044017e using utf8mb4) collate utf8mb4_test_ci)) as exp;
SELECT hex(weight_string(convert(_ucs2 0x0044017d using utf8mb4) collate utf8mb4_test_ci)) as exp;
#
......@@ -188,10 +185,12 @@ show collation like '%test%';
show collation like 'ucs2_vn_ci';
create table t1 (c1 char(1) character set ucs2 collate ucs2_vn_ci);
insert into t1 values (0x0061);
--disable_view_protocol
--enable_metadata
set @@character_set_results=NULL;
select * from t1;
--disable_metadata
--enable_view_protocol
drop table t1;
#
......@@ -211,12 +210,12 @@ SHOW COLLATION LIKE 'utf8_phone_ci';
SET NAMES utf8;
# make sure utf8mb4_test_400_ci is Unicode-4.0.0 based
SELECT hex(weight_string(_utf8mb4'a' collate utf8mb4_test_400_ci));
SELECT hex(weight_string(convert(_utf32 0x10002 using utf8mb4) collate utf8mb4_test_400_ci));
SELECT hex(@a:=convert(_utf32 0x10400 using utf8mb4) collate utf8mb4_test_400_ci), hex(lower(@a));
SELECT hex(@a:=convert(_utf32 0x10428 using utf8mb4) collate utf8mb4_test_400_ci), hex(upper(@a));
SELECT hex(@a:=convert(_utf32 0x2C00 using utf8mb4) collate utf8mb4_test_400_ci), hex(lower(@a));
SELECT hex(@a:=convert(_utf32 0x2C30 using utf8mb4) collate utf8mb4_test_400_ci), hex(upper(@a));
SELECT hex(weight_string(_utf8mb4'a' collate utf8mb4_test_400_ci)) as exp;
SELECT hex(weight_string(convert(_utf32 0x10002 using utf8mb4) collate utf8mb4_test_400_ci)) as exp;
SELECT hex(@a:=convert(_utf32 0x10400 using utf8mb4) collate utf8mb4_test_400_ci), hex(lower(@a)) as exp;
SELECT hex(@a:=convert(_utf32 0x10428 using utf8mb4) collate utf8mb4_test_400_ci), hex(upper(@a)) as exp;
SELECT hex(@a:=convert(_utf32 0x2C00 using utf8mb4) collate utf8mb4_test_400_ci), hex(lower(@a)) as exp;
SELECT hex(@a:=convert(_utf32 0x2C30 using utf8mb4) collate utf8mb4_test_400_ci), hex(upper(@a)) as exp;
--echo #
--echo # WL#5624 Collation customization improvements
......@@ -280,9 +279,14 @@ DROP TABLE t1;
SET NAMES utf8 COLLATE utf8_5624_2;
SHOW WARNINGS;
# "--view-protocol" generates a dublicate error message in ctype_ldml_log.err
# In one of the following cases, the number of similar error messages is counted,
# so doubling the error causes the case to fail
--disable_view_protocol
--error ER_UNKNOWN_COLLATION
SELECT _utf8'test' COLLATE utf8_5624_2;
SHOW WARNINGS;
--enable_view_protocol
--echo #
--echo # WL#5624, reset before primary ignorable
......@@ -353,7 +357,7 @@ INSERT INTO t1 VALUES
SELECT HEX(WEIGHT_STRING(a)), HEX(CONVERT(a USING ucs2)), HEX(a)
FROM t1 ORDER BY a, BINARY(a);
SELECT HEX(WEIGHT_STRING(a)) as wa,
GROUP_CONCAT(HEX(CONVERT(a USING ucs2)) ORDER BY LENGTH(a), BINARY a)
GROUP_CONCAT(HEX(CONVERT(a USING ucs2)) ORDER BY LENGTH(a), BINARY a) as ha
FROM t1 GROUP BY a ORDER BY a;
DROP TABLE t1;
......@@ -405,7 +409,6 @@ perl;
close(FILE);
EOF
--echo #
--echo # MDEV-8686 A user defined collation utf8_confusables doesn't work
--echo #
......@@ -508,6 +511,7 @@ SELECT HEX(a), REPLACE(a,' ','<SP>') FROM t1 ORDER BY a DESC;
DROP TABLE t1;
--disable_service_connection
SET NAMES utf8 COLLATE utf8_czech_test_w2;
CREATE TABLE t1 AS SELECT SPACE(10) AS c1 LIMIT 0;
--source include/ctype_unicode_latin.inc
......@@ -609,6 +613,7 @@ SELECT 'chž'< 'i';
--error ER_UNKNOWN_COLLATION
SELECT 'a' COLLATE utf8_czech_test_bad_w2;
--enable_service_connection
--echo #
--echo # End of 10.2 tests
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -218,8 +218,8 @@ DROP TABLE t1;
SELECT @@character_set_connection, HEX(CAST(_utf8'÷' AS CHAR));
@@character_set_connection HEX(CAST(_utf8'÷' AS CHAR))
sjis 8180
SELECT STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR));
STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR))
SELECT STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR)) as exp;
exp
2001-01-01
CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0;
SHOW COLUMNS FROM t1;
......@@ -18839,20 +18839,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'sjis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'sjis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'sjis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -18977,20 +18977,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'sjis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'sjis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'sjis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -19116,20 +19116,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'sjis_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'sjis_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'sjis_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'sjis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'sjis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'sjis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'sjis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'sjis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'sjis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'sjis_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'sjis_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'sjis_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'sjis_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'sjis_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'sjis_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -19254,20 +19254,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'sjis_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'sjis_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'sjis_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'sjis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'sjis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'sjis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'sjis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'sjis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'sjis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'sjis_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'sjis_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'sjis_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'sjis_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'sjis_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'sjis_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......
......@@ -3173,20 +3173,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'swe7_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'swe7_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'swe7_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -3311,20 +3311,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'swe7_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'swe7_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'swe7_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -3450,20 +3450,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'swe7_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'swe7_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'swe7_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'swe7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'swe7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'swe7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'swe7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'swe7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'swe7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'swe7_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'swe7_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'swe7_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'swe7_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'swe7_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'swe7_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -3588,20 +3588,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'swe7_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'swe7_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'swe7_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'swe7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'swe7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'swe7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'swe7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'swe7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'swe7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'swe7_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'swe7_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'swe7_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'swe7_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'swe7_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'swe7_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......
......@@ -3961,20 +3961,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'tis620_thai_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'tis620_thai_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'tis620_thai_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -4099,20 +4099,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'tis620_thai_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'tis620_thai_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'tis620_thai_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -4238,20 +4238,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'tis620_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'tis620_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'tis620_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'tis620_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'tis620_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'tis620_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'tis620_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'tis620_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'tis620_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'tis620_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'tis620_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'tis620_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'tis620_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'tis620_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'tis620_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -4376,20 +4376,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'tis620_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'tis620_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'tis620_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'tis620_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'tis620_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'tis620_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'tis620_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'tis620_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'tis620_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'tis620_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'tis620_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'tis620_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'tis620_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'tis620_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'tis620_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......
......@@ -10021,8 +10021,8 @@ INSERT INTO t1 (s1) VALUES
(_ucs2 0x1011103910191004103A1038 /* cooked rice */),
(_ucs2 0x101C1000103A10181000103A),
(_ucs2 0x101C103910181000103A /* tea */);
SELECT id, IF(LEFT(s1,1)='-',s1,CONCAT(HEX(WEIGHT_STRING(s1)),'\t', HEX(CONVERT(s1 USING ucs2)))) FROM t1 ORDER BY id;
id IF(LEFT(s1,1)='-',s1,CONCAT(HEX(WEIGHT_STRING(s1)),'\t', HEX(CONVERT(s1 USING ucs2))))
SELECT id, IF(LEFT(s1,1)='-',s1,CONCAT(HEX(WEIGHT_STRING(s1)),'\t', HEX(CONVERT(s1 USING ucs2)))) as exp FROM t1 ORDER BY id;
id exp
1 2259 108C
2 22593ACB 1037
3 22593ACC 1038
......@@ -12597,8 +12597,8 @@ INSERT INTO t1 (s1) VALUES
(_ucs2 0x1011103910191004103A1038 /* cooked rice */),
(_ucs2 0x101C1000103A10181000103A),
(_ucs2 0x101C103910181000103A /* tea */);
SELECT id, IF(LEFT(s1,1)='-',s1,CONCAT(HEX(WEIGHT_STRING(s1)),'\t', HEX(CONVERT(s1 USING ucs2)))) FROM t1 ORDER BY id;
id IF(LEFT(s1,1)='-',s1,CONCAT(HEX(WEIGHT_STRING(s1)),'\t', HEX(CONVERT(s1 USING ucs2))))
SELECT id, IF(LEFT(s1,1)='-',s1,CONCAT(HEX(WEIGHT_STRING(s1)),'\t', HEX(CONVERT(s1 USING ucs2)))) as exp FROM t1 ORDER BY id;
id exp
1 2259 108C
2 22593ACB 1037
3 22593ACC 1038
......
This diff is collapsed.
......@@ -609,6 +609,7 @@ deallocate prepare stmt;
#
# Bug#22638 SOUNDEX broken for international characters
#
--disable_service_connection
set names latin1;
set character_set_connection=ucs2;
select soundex(''),soundex('he'),soundex('hello all folks'),soundex('#3556 in bugdb');
......@@ -619,6 +620,7 @@ select hex(soundex(_ucs2 0x041004110412));
# Make sure that "U+00BF INVERTED QUESTION MARK" is not considered as letter
select hex(soundex(_ucs2 0x00BF00C0));
set names latin1;
--enable_service_connection
#
# Bug #14290: character_maximum_length for text fields
......@@ -790,10 +792,12 @@ DROP TABLE t1;
--echo # Start of 5.5 tests
--echo #
--disable_service_connection
SET NAMES latin1;
SET collation_connection=ucs2_general_ci;
--source include/ctype_numconv.inc
SET NAMES latin1;
--enable_service_connection
--echo #
--echo # Bug #13832953 MY_STRNXFRM_UNICODE: ASSERTION `SRC' FAILED
......@@ -1031,8 +1035,10 @@ DROP TABLE t1;
--echo #
--echo # MDEV-9178 Wrong result for CAST(CONVERT('1IJ3' USING ucs2) AS SIGNED)
--echo #
--disable_service_connection
SET NAMES utf8;
SELECT CAST(CONVERT('1IJ3' USING ucs2) AS SIGNED);
--enable_service_connection
--echo #
--echo # End of 10.1 tests
......@@ -1066,6 +1072,7 @@ EXECUTE IMMEDIATE @stmt;
--echo #
--echo # MDEV-10866 Extend PREPARE and EXECUTE IMMEDIATE to understand expressions
--echo #
--disable_service_connection
SET NAMES utf8, collation_connection=ucs2_bin;
SET @stmt='SELECT COLLATION(''a'')';
EXECUTE IMMEDIATE @stmt;
......@@ -1093,6 +1100,7 @@ EXECUTE IMMEDIATE @stmt;
PREPARE stmt FROM @stmt;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
--enable_service_connection
--echo #
--echo # End of 10.2 tests
......
......@@ -100,20 +100,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'ucs2_unicode_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'ucs2_unicode_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'ucs2_unicode_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'ucs2_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'ucs2_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'ucs2_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'ucs2_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'ucs2_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'ucs2_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'ucs2_unicode_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'ucs2_unicode_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'ucs2_unicode_nopad_ci', 'abc ')) as exp;
exp
0061006200630020
SELECT HEX(GREATEST('abc ' COLLATE 'ucs2_unicode_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'ucs2_unicode_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'ucs2_unicode_nopad_ci', 'abc ')) as exp;
exp
00610062006300200020
#
# Collation mix
......@@ -238,20 +238,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'ucs2_unicode_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'ucs2_unicode_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'ucs2_unicode_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'ucs2_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'ucs2_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'ucs2_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'ucs2_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'ucs2_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'ucs2_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'ucs2_unicode_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'ucs2_unicode_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'ucs2_unicode_nopad_ci', 'abc ')) as exp;
exp
0061006200630020
SELECT HEX(GREATEST('abc ' COLLATE 'ucs2_unicode_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'ucs2_unicode_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'ucs2_unicode_nopad_ci', 'abc ')) as exp;
exp
00610062006300200020
#
# Collation mix
......@@ -377,20 +377,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'ucs2_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'ucs2_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'ucs2_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'ucs2_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'ucs2_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'ucs2_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'ucs2_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'ucs2_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'ucs2_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'ucs2_unicode_520_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'ucs2_unicode_520_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'ucs2_unicode_520_nopad_ci', 'abc ')) as exp;
exp
0061006200630020
SELECT HEX(GREATEST('abc ' COLLATE 'ucs2_unicode_520_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'ucs2_unicode_520_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'ucs2_unicode_520_nopad_ci', 'abc ')) as exp;
exp
00610062006300200020
#
# Collation mix
......@@ -515,20 +515,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'ucs2_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'ucs2_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'ucs2_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'ucs2_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'ucs2_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'ucs2_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'ucs2_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'ucs2_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'ucs2_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'ucs2_unicode_520_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'ucs2_unicode_520_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'ucs2_unicode_520_nopad_ci', 'abc ')) as exp;
exp
0061006200630020
SELECT HEX(GREATEST('abc ' COLLATE 'ucs2_unicode_520_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'ucs2_unicode_520_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'ucs2_unicode_520_nopad_ci', 'abc ')) as exp;
exp
00610062006300200020
#
# Collation mix
......
......@@ -46,14 +46,14 @@ locate('LO','hello' collate ujis_bin,2)
select locate(_ujis 0xa1a3,_ujis 0xa1a2a1a3);
locate(_ujis 0xa1a3,_ujis 0xa1a2a1a3)
2
select 0xa1a2a1a3 like concat(_binary'%',0xa2a1,_binary'%');
0xa1a2a1a3 like concat(_binary'%',0xa2a1,_binary'%')
select 0xa1a2a1a3 like concat(_binary'%',0xa2a1,_binary'%') as exp;
exp
1
select _ujis 0xa1a2a1a3 like concat(_ujis'%',_ujis 0xa2a1, _ujis'%');
_ujis 0xa1a2a1a3 like concat(_ujis'%',_ujis 0xa2a1, _ujis'%')
select _ujis 0xa1a2a1a3 like concat(_ujis'%',_ujis 0xa2a1, _ujis'%') as exp;
exp
0
select _ujis 0xa1a2a1a3 like concat(_ujis'%',_ujis 0xa2a1, _ujis'%') collate ujis_bin;
_ujis 0xa1a2a1a3 like concat(_ujis'%',_ujis 0xa2a1, _ujis'%') collate ujis_bin
select _ujis 0xa1a2a1a3 like concat(_ujis'%',_ujis 0xa2a1, _ujis'%') collate ujis_bin as exp;
exp
0
select 'a' like 'a';
'a' like 'a'
......@@ -2534,8 +2534,8 @@ DROP TABLE t2;
# Bug#57257 Replace(ExtractValue(...)) causes MySQL crash
#
SET NAMES utf8;
SELECT CONVERT(REPLACE(EXPORT_SET('a','a','a','','a'),'00','') USING ujis);
CONVERT(REPLACE(EXPORT_SET('a','a','a','','a'),'00','') USING ujis)
SELECT CONVERT(REPLACE(EXPORT_SET('a','a','a','','a'),'00','') USING ujis) as exp;
exp
Warnings:
Warning 1292 Truncated incorrect INTEGER value: 'a'
......@@ -26348,20 +26348,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'ujis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'ujis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'ujis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -26486,20 +26486,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'ujis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'ujis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'ujis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -26625,20 +26625,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'ujis_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'ujis_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'ujis_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'ujis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'ujis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'ujis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'ujis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'ujis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'ujis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'ujis_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'ujis_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'ujis_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'ujis_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'ujis_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'ujis_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -26763,20 +26763,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'ujis_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'ujis_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'ujis_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'ujis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'ujis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'ujis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'ujis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'ujis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'ujis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'ujis_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'ujis_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'ujis_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'ujis_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'ujis_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'ujis_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......
......@@ -35,13 +35,10 @@ select locate('HE','hello' collate ujis_bin,2);
select locate('LO','hello' collate ujis_bin,2);
select locate(_ujis 0xa1a3,_ujis 0xa1a2a1a3);
select 0xa1a2a1a3 like concat(_binary'%',0xa2a1,_binary'%');
select _ujis 0xa1a2a1a3 like concat(_ujis'%',_ujis 0xa2a1, _ujis'%');
select 0xa1a2a1a3 like concat(_binary'%',0xa2a1,_binary'%') as exp;
select _ujis 0xa1a2a1a3 like concat(_ujis'%',_ujis 0xa2a1, _ujis'%') as exp;
# enable view-protocol after fix MDEV-27871
--disable_view_protocol
select _ujis 0xa1a2a1a3 like concat(_ujis'%',_ujis 0xa2a1, _ujis'%') collate ujis_bin;
--disable_view_protocol
select _ujis 0xa1a2a1a3 like concat(_ujis'%',_ujis 0xa2a1, _ujis'%') collate ujis_bin as exp;
select 'a' like 'a';
select 'A' like 'a';
......@@ -1221,11 +1218,8 @@ DROP TABLE t2;
--echo #
--echo # Bug#57257 Replace(ExtractValue(...)) causes MySQL crash
--echo #
#enable after fix MDEV-27871
--disable_view_protocol
SET NAMES utf8;
SELECT CONVERT(REPLACE(EXPORT_SET('a','a','a','','a'),'00','') USING ujis);
--enable_view_protocol
SELECT CONVERT(REPLACE(EXPORT_SET('a','a','a','','a'),'00','') USING ujis) as exp;
set names default;
set character_set_database=@save_character_set_server;
......@@ -1347,8 +1341,6 @@ DROP TABLE t1;
--echo # WL#3664 WEIGHT_STRING
--echo #
# enable view-protocol after fix MDEV-27871
--disable_view_protocol
set names ujis;
--source include/weight_string.inc
--source include/weight_string_l1.inc
......@@ -1362,7 +1354,6 @@ set collation_connection=ujis_bin;
--source include/weight_string_A1A1.inc
--source include/weight_string_8EA1.inc
--source include/weight_string_8FA2C3.inc
--enable_view_protocol
--echo #
--echo # End of 5.6 tests
......
......@@ -2354,20 +2354,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf16_general_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf16_general_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf16_general_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf16_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf16_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf16_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf16_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf16_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf16_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc ')) as exp;
exp
0061006200630020
SELECT HEX(GREATEST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc ')) as exp;
exp
00610062006300200020
#
# Collation mix
......@@ -2492,20 +2492,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf16_general_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf16_general_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf16_general_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf16_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf16_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf16_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf16_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf16_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf16_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc ')) as exp;
exp
0061006200630020
SELECT HEX(GREATEST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc ')) as exp;
exp
00610062006300200020
#
# Collation mix
......@@ -2631,20 +2631,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf16_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf16_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf16_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf16_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf16_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf16_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf16_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf16_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf16_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf16_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf16_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf16_nopad_bin', 'abc ')) as exp;
exp
0061006200630020
SELECT HEX(GREATEST('abc ' COLLATE 'utf16_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf16_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf16_nopad_bin', 'abc ')) as exp;
exp
00610062006300200020
#
# Collation mix
......@@ -2769,20 +2769,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf16_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf16_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf16_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf16_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf16_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf16_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf16_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf16_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf16_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf16_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf16_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf16_nopad_bin', 'abc ')) as exp;
exp
0061006200630020
SELECT HEX(GREATEST('abc ' COLLATE 'utf16_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf16_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf16_nopad_bin', 'abc ')) as exp;
exp
00610062006300200020
#
# Collation mix
......
......@@ -5327,8 +5327,8 @@ INSERT INTO t1 (s1) VALUES
(_ucs2 0x1011103910191004103A1038 /* cooked rice */),
(_ucs2 0x101C1000103A10181000103A),
(_ucs2 0x101C103910181000103A /* tea */);
SELECT id, IF(LEFT(s1,1)='-',s1,CONCAT(HEX(WEIGHT_STRING(s1)),'\t', HEX(CONVERT(s1 USING ucs2)))) FROM t1 ORDER BY id;
id IF(LEFT(s1,1)='-',s1,CONCAT(HEX(WEIGHT_STRING(s1)),'\t', HEX(CONVERT(s1 USING ucs2))))
SELECT id, IF(LEFT(s1,1)='-',s1,CONCAT(HEX(WEIGHT_STRING(s1)),'\t', HEX(CONVERT(s1 USING ucs2)))) as exp FROM t1 ORDER BY id;
id exp
1 2259 108C
2 22593ACB 1037
3 22593ACC 1038
......@@ -7413,20 +7413,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf16_unicode_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf16_unicode_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf16_unicode_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf16_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf16_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf16_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf16_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf16_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf16_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf16_unicode_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf16_unicode_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf16_unicode_nopad_ci', 'abc ')) as exp;
exp
0061006200630020
SELECT HEX(GREATEST('abc ' COLLATE 'utf16_unicode_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf16_unicode_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf16_unicode_nopad_ci', 'abc ')) as exp;
exp
00610062006300200020
#
# Collation mix
......@@ -7551,20 +7551,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf16_unicode_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf16_unicode_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf16_unicode_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf16_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf16_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf16_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf16_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf16_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf16_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf16_unicode_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf16_unicode_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf16_unicode_nopad_ci', 'abc ')) as exp;
exp
0061006200630020
SELECT HEX(GREATEST('abc ' COLLATE 'utf16_unicode_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf16_unicode_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf16_unicode_nopad_ci', 'abc ')) as exp;
exp
00610062006300200020
#
# Collation mix
......@@ -7690,20 +7690,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf16_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf16_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf16_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf16_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf16_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf16_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf16_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf16_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf16_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf16_unicode_520_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf16_unicode_520_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf16_unicode_520_nopad_ci', 'abc ')) as exp;
exp
0061006200630020
SELECT HEX(GREATEST('abc ' COLLATE 'utf16_unicode_520_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf16_unicode_520_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf16_unicode_520_nopad_ci', 'abc ')) as exp;
exp
00610062006300200020
#
# Collation mix
......@@ -7828,20 +7828,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf16_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf16_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf16_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf16_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf16_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf16_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf16_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf16_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf16_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf16_unicode_520_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf16_unicode_520_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf16_unicode_520_nopad_ci', 'abc ')) as exp;
exp
0061006200630020
SELECT HEX(GREATEST('abc ' COLLATE 'utf16_unicode_520_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf16_unicode_520_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf16_unicode_520_nopad_ci', 'abc ')) as exp;
exp
00610062006300200020
#
# Collation mix
......
......@@ -2540,20 +2540,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf16le_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf16le_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf16le_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc ')) as exp;
exp
6100620063002000
SELECT HEX(GREATEST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc ')) as exp;
exp
61006200630020002000
#
# Collation mix
......@@ -2678,20 +2678,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf16le_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf16le_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf16le_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc ')) as exp;
exp
6100620063002000
SELECT HEX(GREATEST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc ')) as exp;
exp
61006200630020002000
#
# Collation mix
......@@ -2817,20 +2817,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf16le_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf16le_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf16le_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf16le_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf16le_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf16le_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf16le_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf16le_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf16le_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf16le_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf16le_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf16le_nopad_bin', 'abc ')) as exp;
exp
6100620063002000
SELECT HEX(GREATEST('abc ' COLLATE 'utf16le_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf16le_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf16le_nopad_bin', 'abc ')) as exp;
exp
61006200630020002000
#
# Collation mix
......@@ -2955,20 +2955,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf16le_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf16le_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf16le_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf16le_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf16le_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf16le_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf16le_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf16le_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf16le_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf16le_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf16le_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf16le_nopad_bin', 'abc ')) as exp;
exp
6100620063002000
SELECT HEX(GREATEST('abc ' COLLATE 'utf16le_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf16le_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf16le_nopad_bin', 'abc ')) as exp;
exp
61006200630020002000
#
# Collation mix
......
......@@ -70,29 +70,29 @@ hex(word2)
00000420
00002004
DROP TABLE t1;
SELECT hex(LPAD(_utf32 X'0420',10,_utf32 X'0421'));
hex(LPAD(_utf32 X'0420',10,_utf32 X'0421'))
SELECT hex(LPAD(_utf32 X'0420',10,_utf32 X'0421')) as exp;
exp
00000421000004210000042100000421000004210000042100000421000004210000042100000420
SELECT hex(LPAD(_utf32 X'0420',10,_utf32 X'0000042100000422'));
hex(LPAD(_utf32 X'0420',10,_utf32 X'0000042100000422'))
SELECT hex(LPAD(_utf32 X'0420',10,_utf32 X'0000042100000422')) as exp;
exp
00000421000004220000042100000422000004210000042200000421000004220000042100000420
SELECT hex(LPAD(_utf32 X'0420',10,_utf32 X'000004210000042200000423'));
hex(LPAD(_utf32 X'0420',10,_utf32 X'000004210000042200000423'))
SELECT hex(LPAD(_utf32 X'0420',10,_utf32 X'000004210000042200000423')) as exp;
exp
00000421000004220000042300000421000004220000042300000421000004220000042300000420
SELECT hex(LPAD(_utf32 X'000004200000042100000422000004230000042400000425000004260000042700000428000004290000042A0000042B',10,_utf32 X'000004210000042200000423'));
hex(LPAD(_utf32 X'000004200000042100000422000004230000042400000425000004260000042700000428000004290000042A0000042B',10,_utf32 X'000004210000042200000423'))
SELECT hex(LPAD(_utf32 X'000004200000042100000422000004230000042400000425000004260000042700000428000004290000042A0000042B',10,_utf32 X'000004210000042200000423')) as exp;
exp
00000420000004210000042200000423000004240000042500000426000004270000042800000429
SELECT hex(RPAD(_utf32 X'0420',10,_utf32 X'0421'));
hex(RPAD(_utf32 X'0420',10,_utf32 X'0421'))
SELECT hex(RPAD(_utf32 X'0420',10,_utf32 X'0421')) as exp;
exp
00000420000004210000042100000421000004210000042100000421000004210000042100000421
SELECT hex(RPAD(_utf32 X'0420',10,_utf32 X'0000042100000422'));
hex(RPAD(_utf32 X'0420',10,_utf32 X'0000042100000422'))
SELECT hex(RPAD(_utf32 X'0420',10,_utf32 X'0000042100000422')) as exp;
exp
00000420000004210000042200000421000004220000042100000422000004210000042200000421
SELECT hex(RPAD(_utf32 X'0420',10,_utf32 X'000004210000042200000423'));
hex(RPAD(_utf32 X'0420',10,_utf32 X'000004210000042200000423'))
SELECT hex(RPAD(_utf32 X'0420',10,_utf32 X'000004210000042200000423')) as exp;
exp
00000420000004210000042200000423000004210000042200000423000004210000042200000423
SELECT hex(RPAD(_utf32 X'000004200000042100000422000004230000042400000425000004260000042700000428000004290000042A0000042B',10,_utf32 X'000004210000042200000423'));
hex(RPAD(_utf32 X'000004200000042100000422000004230000042400000425000004260000042700000428000004290000042A0000042B',10,_utf32 X'000004210000042200000423'))
SELECT hex(RPAD(_utf32 X'000004200000042100000422000004230000042400000425000004260000042700000428000004290000042A0000042B',10,_utf32 X'000004210000042200000423')) as exp;
exp
00000420000004210000042200000423000004240000042500000426000004270000042800000429
CREATE TABLE t1 SELECT
LPAD(_utf32 X'0420',10,_utf32 X'0421') l,
......@@ -329,11 +329,11 @@ SELECT * FROM t1 WHERE word LIKE _utf32 x'00000063000000610000005F';
word
cat
DROP TABLE t1;
select insert(_utf32 0x000000610000006200000063,10,2,_utf32 0x000000640000006500000066);
insert(_utf32 0x000000610000006200000063,10,2,_utf32 0x000000640000006500000066)
select insert(_utf32 0x000000610000006200000063,10,2,_utf32 0x000000640000006500000066) as exp;
exp
abc
select insert(_utf32 0x000000610000006200000063,1,2,_utf32 0x000000640000006500000066);
insert(_utf32 0x000000610000006200000063,1,2,_utf32 0x000000640000006500000066)
select insert(_utf32 0x000000610000006200000063,1,2,_utf32 0x000000640000006500000066) as exp;
exp
defc
SET NAMES latin1;
CREATE TABLE t1 (
......@@ -1642,8 +1642,8 @@ Warning 1260 Row 1 was cut by GROUP_CONCAT()
#
# incorrect charset for val_str_ascii
#
SELECT '2010-10-10 10:10:10' + INTERVAL GeometryType(GeomFromText('POINT(1 1)')) hour_second;
'2010-10-10 10:10:10' + INTERVAL GeometryType(GeomFromText('POINT(1 1)')) hour_second
SELECT '2010-10-10 10:10:10' + INTERVAL GeometryType(GeomFromText('POINT(1 1)')) hour_second as exp;
exp
2010-10-10 10:10:10
#
# MDEV-5745 analyze MySQL fix for bug#12368495
......@@ -2410,20 +2410,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf32_general_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf32_general_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf32_general_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf32_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf32_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf32_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf32_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf32_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf32_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc ')) as exp;
exp
00000061000000620000006300000020
SELECT HEX(GREATEST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc ')) as exp;
exp
0000006100000062000000630000002000000020
#
# Collation mix
......@@ -2548,20 +2548,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf32_general_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf32_general_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf32_general_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf32_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf32_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf32_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf32_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf32_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf32_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc ')) as exp;
exp
00000061000000620000006300000020
SELECT HEX(GREATEST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc ')) as exp;
exp
0000006100000062000000630000002000000020
#
# Collation mix
......@@ -2687,20 +2687,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf32_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf32_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf32_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf32_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf32_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf32_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf32_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf32_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf32_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf32_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf32_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf32_nopad_bin', 'abc ')) as exp;
exp
00000061000000620000006300000020
SELECT HEX(GREATEST('abc ' COLLATE 'utf32_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf32_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf32_nopad_bin', 'abc ')) as exp;
exp
0000006100000062000000630000002000000020
#
# Collation mix
......@@ -2825,20 +2825,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf32_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf32_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf32_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf32_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf32_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf32_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf32_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf32_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf32_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf32_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf32_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf32_nopad_bin', 'abc ')) as exp;
exp
00000061000000620000006300000020
SELECT HEX(GREATEST('abc ' COLLATE 'utf32_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf32_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf32_nopad_bin', 'abc ')) as exp;
exp
0000006100000062000000630000002000000020
#
# Collation mix
......
......@@ -60,21 +60,15 @@ DROP TABLE t1;
#
# Check LPAD/RPAD
#
SELECT hex(LPAD(_utf32 X'0420',10,_utf32 X'0421'));
SELECT hex(LPAD(_utf32 X'0420',10,_utf32 X'0000042100000422'));
SELECT hex(LPAD(_utf32 X'0420',10,_utf32 X'000004210000042200000423'));
#enable after fix MDEV-27871
--disable_view_protocol
SELECT hex(LPAD(_utf32 X'000004200000042100000422000004230000042400000425000004260000042700000428000004290000042A0000042B',10,_utf32 X'000004210000042200000423'));
--enable_view_protocol
SELECT hex(LPAD(_utf32 X'0420',10,_utf32 X'0421')) as exp;
SELECT hex(LPAD(_utf32 X'0420',10,_utf32 X'0000042100000422')) as exp;
SELECT hex(LPAD(_utf32 X'0420',10,_utf32 X'000004210000042200000423')) as exp;
SELECT hex(LPAD(_utf32 X'000004200000042100000422000004230000042400000425000004260000042700000428000004290000042A0000042B',10,_utf32 X'000004210000042200000423')) as exp;
SELECT hex(RPAD(_utf32 X'0420',10,_utf32 X'0421'));
SELECT hex(RPAD(_utf32 X'0420',10,_utf32 X'0000042100000422'));
SELECT hex(RPAD(_utf32 X'0420',10,_utf32 X'000004210000042200000423'));
#enable after fix MDEV-27871
--disable_view_protocol
SELECT hex(RPAD(_utf32 X'000004200000042100000422000004230000042400000425000004260000042700000428000004290000042A0000042B',10,_utf32 X'000004210000042200000423'));
--enable_view_protocol
SELECT hex(RPAD(_utf32 X'0420',10,_utf32 X'0421')) as exp;
SELECT hex(RPAD(_utf32 X'0420',10,_utf32 X'0000042100000422')) as exp;
SELECT hex(RPAD(_utf32 X'0420',10,_utf32 X'000004210000042200000423')) as exp;
SELECT hex(RPAD(_utf32 X'000004200000042100000422000004230000042400000425000004260000042700000428000004290000042A0000042B',10,_utf32 X'000004210000042200000423')) as exp;
CREATE TABLE t1 SELECT
LPAD(_utf32 X'0420',10,_utf32 X'0421') l,
......@@ -124,11 +118,8 @@ DROP TABLE t1;
#
# Check that INSERT() works fine.
# This invokes charpos() function.
#enable after fix MDEV-27871
--disable_view_protocol
select insert(_utf32 0x000000610000006200000063,10,2,_utf32 0x000000640000006500000066);
select insert(_utf32 0x000000610000006200000063,1,2,_utf32 0x000000640000006500000066);
--enable_view_protocol
select insert(_utf32 0x000000610000006200000063,10,2,_utf32 0x000000640000006500000066) as exp;
select insert(_utf32 0x000000610000006200000063,1,2,_utf32 0x000000640000006500000066) as exp;
#######################################################
......@@ -884,10 +875,7 @@ ORDER BY l DESC;
--echo #
--echo # incorrect charset for val_str_ascii
--echo #
#enable after fix MDEV-27871
--disable_view_protocol
SELECT '2010-10-10 10:10:10' + INTERVAL GeometryType(GeomFromText('POINT(1 1)')) hour_second;
--enable_view_protocol
SELECT '2010-10-10 10:10:10' + INTERVAL GeometryType(GeomFromText('POINT(1 1)')) hour_second as exp;
--echo #
--echo # MDEV-5745 analyze MySQL fix for bug#12368495
......
......@@ -5347,8 +5347,8 @@ INSERT INTO t1 (s1) VALUES
(_ucs2 0x1011103910191004103A1038 /* cooked rice */),
(_ucs2 0x101C1000103A10181000103A),
(_ucs2 0x101C103910181000103A /* tea */);
SELECT id, IF(LEFT(s1,1)='-',s1,CONCAT(HEX(WEIGHT_STRING(s1)),'\t', HEX(CONVERT(s1 USING ucs2)))) FROM t1 ORDER BY id;
id IF(LEFT(s1,1)='-',s1,CONCAT(HEX(WEIGHT_STRING(s1)),'\t', HEX(CONVERT(s1 USING ucs2))))
SELECT id, IF(LEFT(s1,1)='-',s1,CONCAT(HEX(WEIGHT_STRING(s1)),'\t', HEX(CONVERT(s1 USING ucs2)))) as exp FROM t1 ORDER BY id;
id exp
1 2259 108C
2 22593ACB 1037
3 22593ACC 1038
......@@ -7433,20 +7433,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf32_unicode_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf32_unicode_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf32_unicode_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf32_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf32_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf32_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf32_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf32_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf32_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf32_unicode_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf32_unicode_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf32_unicode_nopad_ci', 'abc ')) as exp;
exp
00000061000000620000006300000020
SELECT HEX(GREATEST('abc ' COLLATE 'utf32_unicode_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf32_unicode_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf32_unicode_nopad_ci', 'abc ')) as exp;
exp
0000006100000062000000630000002000000020
#
# Collation mix
......@@ -7571,20 +7571,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf32_unicode_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf32_unicode_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf32_unicode_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf32_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf32_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf32_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf32_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf32_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf32_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf32_unicode_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf32_unicode_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf32_unicode_nopad_ci', 'abc ')) as exp;
exp
00000061000000620000006300000020
SELECT HEX(GREATEST('abc ' COLLATE 'utf32_unicode_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf32_unicode_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf32_unicode_nopad_ci', 'abc ')) as exp;
exp
0000006100000062000000630000002000000020
#
# Collation mix
......@@ -7710,20 +7710,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf32_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf32_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf32_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf32_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf32_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf32_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf32_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf32_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf32_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf32_unicode_520_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf32_unicode_520_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf32_unicode_520_nopad_ci', 'abc ')) as exp;
exp
00000061000000620000006300000020
SELECT HEX(GREATEST('abc ' COLLATE 'utf32_unicode_520_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf32_unicode_520_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf32_unicode_520_nopad_ci', 'abc ')) as exp;
exp
0000006100000062000000630000002000000020
#
# Collation mix
......@@ -7848,20 +7848,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf32_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf32_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf32_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf32_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf32_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf32_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf32_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf32_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf32_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf32_unicode_520_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf32_unicode_520_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf32_unicode_520_nopad_ci', 'abc ')) as exp;
exp
00000061000000620000006300000020
SELECT HEX(GREATEST('abc ' COLLATE 'utf32_unicode_520_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf32_unicode_520_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf32_unicode_520_nopad_ci', 'abc ')) as exp;
exp
0000006100000062000000630000002000000020
#
# Collation mix
......
This diff is collapsed.
......@@ -3,9 +3,6 @@
# Tests with the utf8 character set
#
# Enable after fix MDEV-27904
-- source include/no_view_protocol.inc
let $MYSQLD_DATADIR= `select @@datadir`;
let collation=utf8_unicode_ci;
......@@ -50,15 +47,15 @@ select length(_utf8 0xD0B1), bit_length(_utf8 0xD0B1), char_length(_utf8 0xD0B1)
select 'a' like 'a';
select 'A' like 'a';
select 'A' like 'a' collate utf8_bin;
select _utf8 0xD0B0D0B1D0B2 like concat(_utf8'%',_utf8 0xD0B1,_utf8 '%');
select _utf8 0xD0B0D0B1D0B2 like concat(_utf8'%',_utf8 0xD0B1,_utf8 '%') as exp;
# Bug #6040: can't retrieve records with umlaut
# characters in case insensitive manner.
# Case insensitive search LIKE comparison
# was broken for multibyte characters:
select convert(_latin1'Gnter Andr' using utf8) like CONVERT(_latin1'GNTER%' USING utf8);
select CONVERT(_koi8r'' USING utf8) LIKE CONVERT(_koi8r'' USING utf8);
select CONVERT(_koi8r'' USING utf8) LIKE CONVERT(_koi8r'' USING utf8);
select convert(_latin1'Gnter Andr' using utf8) like CONVERT(_latin1'GNTER%' USING utf8) as exp;
select CONVERT(_koi8r'' USING utf8) LIKE CONVERT(_koi8r'' USING utf8) as exp;
select CONVERT(_koi8r'' USING utf8) LIKE CONVERT(_koi8r'' USING utf8) as exp;
#
# Check the following:
......@@ -629,6 +626,7 @@ DROP TABLE t1;
#
# Bug #6043 erratic searching for diacriticals in indexed MyISAM UTF-8 table
#
--disable_service_connection
SET NAMES latin1;
CREATE TABLE t1 (
id int unsigned NOT NULL auto_increment,
......@@ -644,6 +642,7 @@ SELECT id, term FROM t1 where (list_id = 1) AND (term = "test
SELECT id, term FROM t1 where (list_id = 1) AND (term = "testetest");
SELECT id, term FROM t1 where (list_id = 1) AND (term = "testtest");
DROP TABLE t1;
--enable_service_connection
#
# Bug #6019 SELECT tries to use too short prefix index on utf8 data
......@@ -696,10 +695,10 @@ drop table t1;
#
# Bug#22638 SOUNDEX broken for international characters
#
select soundex(_utf8 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB);
select hex(soundex(_utf8 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB));
select soundex(_utf8 0xD091D092D093);
select hex(soundex(_utf8 0xD091D092D093));
select soundex(_utf8 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB) as exp;
select hex(soundex(_utf8 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)) as exp;
select soundex(_utf8 0xD091D092D093) as exp;
select hex(soundex(_utf8 0xD091D092D093)) as exp;
SET collation_connection='utf8_general_ci';
......@@ -735,7 +734,7 @@ drop table t1;
#
# Bug#8385: utf8_general_ci treats Cyrillic letters I and SHORT I as the same
#
select convert(_koi8r'' using utf8) < convert(_koi8r'' using utf8);
select convert(_koi8r'' using utf8) < convert(_koi8r'' using utf8) as exp;
#
# Bugs#5980: NULL requires a characterset in a union
......@@ -1113,6 +1112,7 @@ DROP TABLE t1;
# (see bug #16674 as well)
#
--disable_service_connection
SET NAMES latin2;
CREATE TABLE t1 (
......@@ -1139,6 +1139,7 @@ ALTER TABLE t1 ADD KEY idx (tid,val(11));
SELECT * FROM t1 WHERE tid=72 and val LIKE 'VOLN ADSL';
DROP TABLE t1;
--enable_service_connection
#
# Bug 20709: problem with utf8 fields in temporary tables
......@@ -1346,6 +1347,7 @@ drop table t1;
# Conversion is possible if string repertoire is ASCII.
# Conversion is not possible if the string have extended characters
#
--disable_service_connection
set names utf8;
create table t1 (a varchar(10) character set latin1, b int);
insert into t1 values ('a',1);
......@@ -1380,6 +1382,7 @@ select concat(a, if(b>10, 'x' 'x', 'y' 'y')) from t1;
--error 1267
select concat(a, if(b>10, 'x' 'æ', 'y' 'ß')) from t1;
drop table t1;
--enable_service_connection
#
# Bug#19960: Inconsistent results when joining
......@@ -1496,7 +1499,10 @@ SELECT HEX(RPAD(_utf8 0xD18F, 3, 0x20));
SELECT HEX(LPAD(_utf8 0xD18F, 3, 0x20));
SELECT HEX(INSERT(_utf8 0xD18F, 2, 1, 0x20));
#Enable view-protocol after fix MDEV-33942
--disable_view_protocol
SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
--enable_view_protocol
--echo #
--echo # Bug#11752408 - 43593: DUMP/BACKUP/RESTORE/UPGRADE TOOLS FAILS BECAUSE OF UTF8_GENERAL_CI
......@@ -1573,6 +1579,7 @@ CREATE TABLE t1 (
s3 MEDIUMTEXT CHARACTER SET utf8,
s4 LONGTEXT CHARACTER SET utf8
);
--disable_view_protocol
--enable_metadata
SET NAMES utf8, @@character_set_results=NULL;
SELECT *, HEX(s1) FROM t1;
......@@ -1581,6 +1588,7 @@ SELECT *, HEX(s1) FROM t1;
SET NAMES utf8;
SELECT *, HEX(s1) FROM t1;
--disable_metadata
--enable_view_protocol
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
SHOW CREATE TABLE t2;
DROP TABLE t1, t2;
......
......@@ -100,20 +100,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf8_unicode_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf8_unicode_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf8_unicode_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf8_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf8_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf8_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf8_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf8_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf8_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf8_unicode_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf8_unicode_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf8_unicode_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'utf8_unicode_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf8_unicode_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf8_unicode_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -238,20 +238,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf8_unicode_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf8_unicode_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf8_unicode_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf8_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf8_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf8_unicode_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf8_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf8_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf8_unicode_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf8_unicode_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf8_unicode_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf8_unicode_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'utf8_unicode_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf8_unicode_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf8_unicode_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -377,20 +377,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf8_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf8_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf8_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf8_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf8_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf8_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf8_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf8_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf8_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf8_unicode_520_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf8_unicode_520_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf8_unicode_520_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'utf8_unicode_520_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf8_unicode_520_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf8_unicode_520_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -515,20 +515,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf8_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf8_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf8_unicode_520_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf8_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf8_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf8_unicode_520_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf8_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf8_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf8_unicode_520_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf8_unicode_520_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf8_unicode_520_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf8_unicode_520_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'utf8_unicode_520_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf8_unicode_520_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf8_unicode_520_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......
......@@ -3665,20 +3665,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf8mb4_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf8mb4_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf8mb4_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -3803,20 +3803,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf8mb4_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf8mb4_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf8mb4_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -3942,20 +3942,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf8mb4_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf8mb4_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf8mb4_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......@@ -4080,20 +4080,20 @@ DROP TABLE t1;
#
# IF, CASE, LEAST
#
SELECT IF('abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ', 'pad', 'nopad');
IF('abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ', 'pad', 'nopad')
SELECT IF('abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ', 'pad', 'nopad') as exp;
exp
nopad
SELECT CASE 'abc' COLLATE 'utf8mb4_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE 'abc' COLLATE 'utf8mb4_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE 'abc' COLLATE 'utf8mb4_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT CASE WHEN 'abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
CASE WHEN 'abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
SELECT CASE WHEN 'abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END as exp;
exp
nopad
SELECT HEX(LEAST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc '));
HEX(LEAST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc '))
SELECT HEX(LEAST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc ')) as exp;
exp
61626320
SELECT HEX(GREATEST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc '));
HEX(GREATEST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc '))
SELECT HEX(GREATEST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc ')) as exp;
exp
6162632020
#
# Collation mix
......
......@@ -36,23 +36,23 @@ locate('HE','hello' collate utf8mb4_bin,2)
select locate('LO','hello' collate utf8mb4_bin,2);
locate('LO','hello' collate utf8mb4_bin,2)
0
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2);
locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2)
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2) as exp;
exp
2
select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2);
locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2)
select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2) as exp;
exp
2
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2);
locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2)
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2) as exp;
exp
2
select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin);
locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin)
select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin) as exp;
exp
0
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin);
locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin)
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin) as exp;
exp
0
select length(_utf8mb4 0xD0B1), bit_length(_utf8mb4 0xD0B1), char_length(_utf8mb4 0xD0B1);
length(_utf8mb4 0xD0B1) bit_length(_utf8mb4 0xD0B1) char_length(_utf8mb4 0xD0B1)
select length(_utf8mb4 0xD0B1), bit_length(_utf8mb4 0xD0B1), char_length(_utf8mb4 0xD0B1) as exp;
length(_utf8mb4 0xD0B1) bit_length(_utf8mb4 0xD0B1) exp
2 16 1
select 'a' like 'a';
'a' like 'a'
......@@ -63,17 +63,17 @@ select 'A' like 'a';
select 'A' like 'a' collate utf8mb4_bin;
'A' like 'a' collate utf8mb4_bin
0
select _utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%');
_utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%')
select _utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%') as exp;
exp
1
select convert(_latin1'Gnter Andr' using utf8mb4) like CONVERT(_latin1'GNTER%' USING utf8mb4);
convert(_latin1'G\xFCnter Andr\xE9' using utf8mb4) like CONVERT(_latin1'G\xDCNTER%' USING utf8mb4)
select convert(_latin1'Gnter Andr' using utf8mb4) like CONVERT(_latin1'GNTER%' USING utf8mb4) as exp;
exp
1
select CONVERT(_koi8r'' USING utf8mb4) LIKE CONVERT(_koi8r'' USING utf8mb4);
CONVERT(_koi8r'\xD7\xC1\xD3\xD1' USING utf8mb4) LIKE CONVERT(_koi8r'\xF7\xE1\xF3\xF1' USING utf8mb4)
select CONVERT(_koi8r'' USING utf8mb4) LIKE CONVERT(_koi8r'' USING utf8mb4) as exp;
exp
1
select CONVERT(_koi8r'' USING utf8mb4) LIKE CONVERT(_koi8r'' USING utf8mb4);
CONVERT(_koi8r'\xF7\xE1\xF3\xF1' USING utf8mb4) LIKE CONVERT(_koi8r'\xD7\xC1\xD3\xD1' USING utf8mb4)
select CONVERT(_koi8r'' USING utf8mb4) LIKE CONVERT(_koi8r'' USING utf8mb4) as exp;
exp
1
SELECT 'a' = 'a ';
'a' = 'a '
......@@ -863,17 +863,17 @@ select * from t1 where soundex(a) = soundex('test');
id a
1 Test
drop table t1;
select soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB);
soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)
select soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB) as exp;
exp
阅000
select hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB));
hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB))
select hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)) as exp;
exp
E99885303030
select soundex(_utf8mb4 0xD091D092D093);
soundex(_utf8mb4 0xD091D092D093)
select soundex(_utf8mb4 0xD091D092D093) as exp;
exp
Б000
select hex(soundex(_utf8mb4 0xD091D092D093));
hex(soundex(_utf8mb4 0xD091D092D093))
select hex(soundex(_utf8mb4 0xD091D092D093)) as exp;
exp
D091303030
SET collation_connection='utf8mb4_general_ci';
create table t1 select repeat('a',4000) a;
......@@ -1214,8 +1214,8 @@ concat(concat(_latin1'->',f1),_latin1'<-')
-><-
-><-
drop table t1;
select convert(_koi8r'' using utf8mb4) < convert(_koi8r'' using utf8mb4);
convert(_koi8r'\xC9' using utf8mb4) < convert(_koi8r'\xCA' using utf8mb4)
select convert(_koi8r'' using utf8mb4) < convert(_koi8r'' using utf8mb4) as exp;
exp
1
set names latin1;
create table t1 (a varchar(10)) character set utf8mb4 engine heap;
......
......@@ -36,23 +36,23 @@ locate('HE','hello' collate utf8mb4_bin,2)
select locate('LO','hello' collate utf8mb4_bin,2);
locate('LO','hello' collate utf8mb4_bin,2)
0
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2);
locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2)
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2) as exp;
exp
2
select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2);
locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2)
select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2) as exp;
exp
2
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2);
locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2)
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2) as exp;
exp
2
select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin);
locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin)
select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin) as exp;
exp
0
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin);
locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin)
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin) as exp;
exp
0
select length(_utf8mb4 0xD0B1), bit_length(_utf8mb4 0xD0B1), char_length(_utf8mb4 0xD0B1);
length(_utf8mb4 0xD0B1) bit_length(_utf8mb4 0xD0B1) char_length(_utf8mb4 0xD0B1)
select length(_utf8mb4 0xD0B1), bit_length(_utf8mb4 0xD0B1), char_length(_utf8mb4 0xD0B1) as exp;
length(_utf8mb4 0xD0B1) bit_length(_utf8mb4 0xD0B1) exp
2 16 1
select 'a' like 'a';
'a' like 'a'
......@@ -63,17 +63,17 @@ select 'A' like 'a';
select 'A' like 'a' collate utf8mb4_bin;
'A' like 'a' collate utf8mb4_bin
0
select _utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%');
_utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%')
select _utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%') as exp;
exp
1
select convert(_latin1'Gnter Andr' using utf8mb4) like CONVERT(_latin1'GNTER%' USING utf8mb4);
convert(_latin1'G\xFCnter Andr\xE9' using utf8mb4) like CONVERT(_latin1'G\xDCNTER%' USING utf8mb4)
select convert(_latin1'Gnter Andr' using utf8mb4) like CONVERT(_latin1'GNTER%' USING utf8mb4) as exp;
exp
1
select CONVERT(_koi8r'' USING utf8mb4) LIKE CONVERT(_koi8r'' USING utf8mb4);
CONVERT(_koi8r'\xD7\xC1\xD3\xD1' USING utf8mb4) LIKE CONVERT(_koi8r'\xF7\xE1\xF3\xF1' USING utf8mb4)
select CONVERT(_koi8r'' USING utf8mb4) LIKE CONVERT(_koi8r'' USING utf8mb4) as exp;
exp
1
select CONVERT(_koi8r'' USING utf8mb4) LIKE CONVERT(_koi8r'' USING utf8mb4);
CONVERT(_koi8r'\xF7\xE1\xF3\xF1' USING utf8mb4) LIKE CONVERT(_koi8r'\xD7\xC1\xD3\xD1' USING utf8mb4)
select CONVERT(_koi8r'' USING utf8mb4) LIKE CONVERT(_koi8r'' USING utf8mb4) as exp;
exp
1
SELECT 'a' = 'a ';
'a' = 'a '
......@@ -926,17 +926,17 @@ select * from t1 where soundex(a) = soundex('test');
id a
1 Test
drop table t1;
select soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB);
soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)
select soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB) as exp;
exp
阅000
select hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB));
hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB))
select hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)) as exp;
exp
E99885303030
select soundex(_utf8mb4 0xD091D092D093);
soundex(_utf8mb4 0xD091D092D093)
select soundex(_utf8mb4 0xD091D092D093) as exp;
exp
Б000
select hex(soundex(_utf8mb4 0xD091D092D093));
hex(soundex(_utf8mb4 0xD091D092D093))
select hex(soundex(_utf8mb4 0xD091D092D093)) as exp;
exp
D091303030
SET collation_connection='utf8mb4_general_ci';
create table t1 select repeat('a',4000) a;
......@@ -1277,8 +1277,8 @@ concat(concat(_latin1'->',f1),_latin1'<-')
-><-
-><-
drop table t1;
select convert(_koi8r'' using utf8mb4) < convert(_koi8r'' using utf8mb4);
convert(_koi8r'\xC9' using utf8mb4) < convert(_koi8r'\xCA' using utf8mb4)
select convert(_koi8r'' using utf8mb4) < convert(_koi8r'' using utf8mb4) as exp;
exp
1
set names latin1;
create table t1 (a varchar(10)) character set utf8mb4 engine InnoDB;
......
# Enable after fix MDEV-27904
-- source include/no_view_protocol.inc
--source include/have_utf8mb4.inc
--source include/have_innodb.inc
......
......@@ -36,23 +36,23 @@ locate('HE','hello' collate utf8mb4_bin,2)
select locate('LO','hello' collate utf8mb4_bin,2);
locate('LO','hello' collate utf8mb4_bin,2)
0
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2);
locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2)
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2) as exp;
exp
2
select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2);
locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2)
select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2) as exp;
exp
2
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2);
locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2)
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2) as exp;
exp
2
select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin);
locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin)
select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin) as exp;
exp
0
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin);
locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin)
select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin) as exp;
exp
0
select length(_utf8mb4 0xD0B1), bit_length(_utf8mb4 0xD0B1), char_length(_utf8mb4 0xD0B1);
length(_utf8mb4 0xD0B1) bit_length(_utf8mb4 0xD0B1) char_length(_utf8mb4 0xD0B1)
select length(_utf8mb4 0xD0B1), bit_length(_utf8mb4 0xD0B1), char_length(_utf8mb4 0xD0B1) as exp;
length(_utf8mb4 0xD0B1) bit_length(_utf8mb4 0xD0B1) exp
2 16 1
select 'a' like 'a';
'a' like 'a'
......@@ -63,17 +63,17 @@ select 'A' like 'a';
select 'A' like 'a' collate utf8mb4_bin;
'A' like 'a' collate utf8mb4_bin
0
select _utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%');
_utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%')
select _utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%') as exp;
exp
1
select convert(_latin1'Gnter Andr' using utf8mb4) like CONVERT(_latin1'GNTER%' USING utf8mb4);
convert(_latin1'G\xFCnter Andr\xE9' using utf8mb4) like CONVERT(_latin1'G\xDCNTER%' USING utf8mb4)
select convert(_latin1'Gnter Andr' using utf8mb4) like CONVERT(_latin1'GNTER%' USING utf8mb4) as exp;
exp
1
select CONVERT(_koi8r'' USING utf8mb4) LIKE CONVERT(_koi8r'' USING utf8mb4);
CONVERT(_koi8r'\xD7\xC1\xD3\xD1' USING utf8mb4) LIKE CONVERT(_koi8r'\xF7\xE1\xF3\xF1' USING utf8mb4)
select CONVERT(_koi8r'' USING utf8mb4) LIKE CONVERT(_koi8r'' USING utf8mb4) as exp;
exp
1
select CONVERT(_koi8r'' USING utf8mb4) LIKE CONVERT(_koi8r'' USING utf8mb4);
CONVERT(_koi8r'\xF7\xE1\xF3\xF1' USING utf8mb4) LIKE CONVERT(_koi8r'\xD7\xC1\xD3\xD1' USING utf8mb4)
select CONVERT(_koi8r'' USING utf8mb4) LIKE CONVERT(_koi8r'' USING utf8mb4) as exp;
exp
1
SELECT 'a' = 'a ';
'a' = 'a '
......@@ -929,17 +929,17 @@ select * from t1 where soundex(a) = soundex('test');
id a
1 Test
drop table t1;
select soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB);
soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)
select soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB) as exp;
exp
阅000
select hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB));
hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB))
select hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)) as exp;
exp
E99885303030
select soundex(_utf8mb4 0xD091D092D093);
soundex(_utf8mb4 0xD091D092D093)
select soundex(_utf8mb4 0xD091D092D093) as exp;
exp
Б000
select hex(soundex(_utf8mb4 0xD091D092D093));
hex(soundex(_utf8mb4 0xD091D092D093))
select hex(soundex(_utf8mb4 0xD091D092D093)) as exp;
exp
D091303030
SET collation_connection='utf8mb4_general_ci';
create table t1 select repeat('a',4000) a;
......@@ -1280,8 +1280,8 @@ concat(concat(_latin1'->',f1),_latin1'<-')
-><-
-><-
drop table t1;
select convert(_koi8r'' using utf8mb4) < convert(_koi8r'' using utf8mb4);
convert(_koi8r'\xC9' using utf8mb4) < convert(_koi8r'\xCA' using utf8mb4)
select convert(_koi8r'' using utf8mb4) < convert(_koi8r'' using utf8mb4) as exp;
exp
1
set names latin1;
create table t1 (a varchar(10)) character set utf8mb4 engine MyISAM;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -16,16 +16,16 @@ author VARCHAR(255) NOT NULL
INSERT INTO t2 VALUES('123', 'moi');
INSERT INTO t2 VALUES('123', 'lui');
INSERT INTO t2 VALUES('456', 'lui');
select round(match(t1.texte,t1.sujet,t1.motsclefs) against('droit'),5)
select round(match(t1.texte,t1.sujet,t1.motsclefs) against('droit'),5) as exp
from t1 left join t2 on t2.id=t1.id;
round(match(t1.texte,t1.sujet,t1.motsclefs) against('droit'),5)
exp
0.00000
0.00000
0.67003
0.00000
select match(t1.texte,t1.sujet,t1.motsclefs) against('droit' IN BOOLEAN MODE)
select match(t1.texte,t1.sujet,t1.motsclefs) against('droit' IN BOOLEAN MODE) as exp
from t1 left join t2 on t2.id=t1.id;
match(t1.texte,t1.sujet,t1.motsclefs) against('droit' IN BOOLEAN MODE)
exp
0
0
1
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment