diff options
Diffstat (limited to 'mysql-test/r')
459 files changed, 122061 insertions, 4378 deletions
diff --git a/mysql-test/r/1st.result b/mysql-test/r/1st.result index 792d9eaf2f1..f9e4b37aa94 100644 --- a/mysql-test/r/1st.result +++ b/mysql-test/r/1st.result @@ -7,23 +7,29 @@ performance_schema test show tables in mysql; Tables_in_mysql +column_stats columns_priv db event func general_log +gtid_slave_pos help_category help_keyword help_relation help_topic host -ndb_binlog_index +index_stats +innodb_index_stats +innodb_table_stats plugin proc procs_priv proxies_priv +roles_mapping servers slow_log +table_stats tables_priv time_zone time_zone_leap_second diff --git a/mysql-test/r/alter_table-big.result b/mysql-test/r/alter_table-big.result index 33af60938a1..f7a3ec6502e 100644 --- a/mysql-test/r/alter_table-big.result +++ b/mysql-test/r/alter_table-big.result @@ -14,13 +14,14 @@ set debug_sync='now WAIT_FOR parked'; insert into t2 values (1); insert into t1 values (1, 1, 1);; set debug_sync='now SIGNAL go'; -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; insert into t2 values (1) master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; alter table t1 enable keys -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; insert into t1 values (1, 1, 1) master-bin.000001 # Query # # COMMIT drop tables t1, t2; @@ -57,21 +58,30 @@ rename table t1 to t3; drop table t3; set debug_sync='alter_table_before_main_binlog SIGNAL parked WAIT_FOR go'; set debug_sync='RESET'; -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; alter table t1 change i c char(10) default 'Test1' -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; insert into t1 values () master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; alter table t1 change c vc varchar(100) default 'Test2' +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; rename table t1 to t2 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1 (i int) +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; alter table t1 change i c char(10) default 'Test3', rename to t2 -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; insert into t2 values() master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; alter table t2 change c vc varchar(100) default 'Test2', rename to t1 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; rename table t1 to t3 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TABLE `t3` /* generated by server */ End of 5.1 tests diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 8e61031f8ac..e32037c4be9 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -176,12 +176,12 @@ create table t1 (a int, b int); alter table t1 add unique (a,b), add key (b); show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 0 a 1 a A NULL NULL NULL YES BTREE -t1 0 a 2 b A NULL NULL NULL YES BTREE +t1 0 a 1 a A 3 NULL NULL YES BTREE +t1 0 a 2 b A 300 NULL NULL YES BTREE t1 1 b 1 b A 100 NULL NULL YES BTREE analyze table t1; Table Op Msg_type Msg_text -test.t1 analyze status OK +test.t1 analyze status Table is already up to date show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment t1 0 a 1 a A 3 NULL NULL YES BTREE @@ -270,8 +270,8 @@ ERROR 42000: Incorrect table name '' drop table t1; drop table if exists t1, t2; Warnings: -Note 1051 Unknown table 't1' -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t1' +Note 1051 Unknown table 'test.t2' create table t1 ( a varchar(10) not null primary key ) engine=myisam; create table t2 ( a varchar(10) not null primary key ) engine=merge union=(t1); flush tables; @@ -415,7 +415,7 @@ alter table t1 drop key a; drop table t1; CREATE TABLE T12207(a int) ENGINE=MYISAM; ALTER TABLE T12207 DISCARD TABLESPACE; -ERROR HY000: Table storage engine for 'T12207' doesn't have this option +ERROR HY000: Storage engine MyISAM of the table `test`.`T12207` doesn't have this option DROP TABLE T12207; create table t1 (a text) character set koi8r; insert into t1 values (_koi8r'ÔÅÓÔ'); @@ -556,7 +556,7 @@ create database mysqltest; create table t1 (c1 int); alter table t1 rename mysqltest.t1; drop table t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' alter table mysqltest.t1 rename t1; drop table t1; create table t1 (c1 int); @@ -1327,6 +1327,16 @@ CREATE DATABASE db1 CHARACTER SET utf8; CREATE TABLE db1.t1 (bar TINYTEXT, KEY (bar(100))); ALTER TABLE db1.t1 ADD baz INT; DROP DATABASE db1; +# Additional coverage for refactoring which is made as part +# of fix for bug #27480 "Extend CREATE TEMPORARY TABLES privilege +# to allow temp table operations". +# +# At some point the below test case failed on assertion. +DROP TABLE IF EXISTS t1; +CREATE TEMPORARY TABLE t1 (i int) ENGINE=MyISAM; +ALTER TABLE t1 DISCARD TABLESPACE; +ERROR HY000: Storage engine MyISAM of the table `test`.`t1` doesn't have this option +DROP TABLE t1; # # Bug#11938039 RE-EXECUTION OF FRM-ONLY ALTER TABLE WITH RENAME # CLAUSE FAILS OR ABORTS SERVER. @@ -1392,3 +1402,765 @@ t1 CREATE TABLE `t1` ( `consultant_id` bigint(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 DROP TABLE t1; +CREATE TABLE t1 ( +id INT(11) NOT NULL, +x_param INT(11) DEFAULT NULL, +PRIMARY KEY (id) +) ENGINE=MYISAM; +ALTER TABLE t1 ADD COLUMN IF NOT EXISTS id INT, +ADD COLUMN IF NOT EXISTS lol INT AFTER id; +Warnings: +Note 1060 Duplicate column name 'id' +ALTER TABLE t1 ADD COLUMN IF NOT EXISTS lol INT AFTER id; +Warnings: +Note 1060 Duplicate column name 'lol' +ALTER TABLE t1 DROP COLUMN IF EXISTS lol; +ALTER TABLE t1 DROP COLUMN IF EXISTS lol; +Warnings: +Note 1091 Can't DROP 'lol'; check that column/key exists +ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param); +ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param); +Warnings: +Note 1061 Duplicate key name 'x_param' +ALTER TABLE t1 MODIFY IF EXISTS lol INT; +Warnings: +Note 1054 Unknown column 'lol' in 't1' +DROP INDEX IF EXISTS x_param ON t1; +DROP INDEX IF EXISTS x_param ON t1; +Warnings: +Note 1091 Can't DROP 'x_param'; check that column/key exists +CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); +CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); +Warnings: +Note 1061 Duplicate key name 'x_param1' +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `x_param` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `x_param1` (`x_param`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( +id INT(11) NOT NULL, +x_param INT(11) DEFAULT NULL, +PRIMARY KEY (id) +) ENGINE=INNODB; +CREATE TABLE t2 ( +id INT(11) NOT NULL) ENGINE=INNODB; +ALTER TABLE t1 ADD COLUMN IF NOT EXISTS id INT, +ADD COLUMN IF NOT EXISTS lol INT AFTER id; +Warnings: +Note 1060 Duplicate column name 'id' +ALTER TABLE t1 ADD COLUMN IF NOT EXISTS lol INT AFTER id; +Warnings: +Note 1060 Duplicate column name 'lol' +ALTER TABLE t1 DROP COLUMN IF EXISTS lol; +ALTER TABLE t1 DROP COLUMN IF EXISTS lol; +Warnings: +Note 1091 Can't DROP 'lol'; check that column/key exists +ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param); +ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param); +Warnings: +Note 1061 Duplicate key name 'x_param' +ALTER TABLE t1 MODIFY IF EXISTS lol INT; +Warnings: +Note 1054 Unknown column 'lol' in 't1' +DROP INDEX IF EXISTS x_param ON t1; +DROP INDEX IF EXISTS x_param ON t1; +Warnings: +Note 1091 Can't DROP 'x_param'; check that column/key exists +CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); +CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); +Warnings: +Note 1061 Duplicate key name 'x_param1' +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `x_param` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `x_param1` (`x_param`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +ALTER TABLE t2 ADD FOREIGN KEY IF NOT EXISTS fk(id) REFERENCES t1(id); +ALTER TABLE t2 ADD FOREIGN KEY IF NOT EXISTS fk(id) REFERENCES t1(id); +Warnings: +Note 1061 Duplicate key name 'fk' +ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS fk; +ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS fk; +Warnings: +Note 1091 Can't DROP 'fk'; check that column/key exists +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `id` int(11) NOT NULL, + KEY `fk` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +ALTER TABLE t2 ADD FOREIGN KEY (id) REFERENCES t1(id); +ALTER TABLE t2 ADD FOREIGN KEY IF NOT EXISTS t2_ibfk_1(id) REFERENCES t1(id); +Warnings: +Note 1061 Duplicate key name 't2_ibfk_1' +ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS t2_ibfk_1; +ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS t2_ibfk_1; +Warnings: +Note 1091 Can't DROP 't2_ibfk_1'; check that column/key exists +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `id` int(11) NOT NULL, + KEY `id` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t2; +CREATE TABLE t2 ( +id INT(11) NOT NULL); +ALTER TABLE t2 ADD COLUMN a INT, ADD COLUMN IF NOT EXISTS a INT; +Warnings: +Note 1060 Duplicate column name 'a' +ALTER TABLE t2 ADD KEY k_id(id), ADD KEY IF NOT EXISTS k_id(id); +Warnings: +Note 1061 Duplicate key name 'k_id' +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `id` int(11) NOT NULL, + `a` int(11) DEFAULT NULL, + KEY `k_id` (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +ALTER TABLE t2 DROP KEY k_id, DROP KEY IF EXISTS k_id; +Warnings: +Note 1091 Can't DROP 'k_id'; check that column/key exists +ALTER TABLE t2 DROP COLUMN a, DROP COLUMN IF EXISTS a; +Warnings: +Note 1091 Can't DROP 'a'; check that column/key exists +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `id` int(11) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 ( +`transaction_id` int(11) NOT NULL DEFAULT '0', +KEY `transaction_id` (`transaction_id`)); +ALTER TABLE t1 DROP KEY IF EXISTS transaction_id, ADD PRIMARY KEY IF NOT EXISTS (transaction_id); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `transaction_id` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`transaction_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +# Bug#11748057 (formerly known as 34972): ALTER TABLE statement doesn't +# identify correct column name. +# +CREATE TABLE t1 (c1 int unsigned , c2 char(100) not null default ''); +ALTER TABLE t1 ADD c3 char(16) NOT NULL DEFAULT '' AFTER c2, +MODIFY c2 char(100) NOT NULL DEFAULT '' AFTER c1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(10) unsigned DEFAULT NULL, + `c2` char(100) NOT NULL DEFAULT '', + `c3` char(16) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +# +# WL#5534 Online ALTER, Phase 1 +# +# Single thread tests. +# See innodb_mysql_sync.test for multi thread tests. +DROP TABLE IF EXISTS t1; +CREATE TABLE t1(a INT PRIMARY KEY, b INT) engine=InnoDB; +CREATE TABLE m1(a INT PRIMARY KEY, b INT) engine=MyISAM; +INSERT INTO t1 VALUES (1,1), (2,2); +INSERT INTO m1 VALUES (1,1), (2,2); +# +# 1: Test ALGORITHM keyword +# +# --enable_info allows us to see how many rows were updated +# by ALTER TABLE. in-place will show 0 rows, while copy > 0. +ALTER TABLE t1 ADD INDEX i1(b); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 ADD INDEX i2(b), ALGORITHM= DEFAULT; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 1 +Warnings: +Note 1831 Duplicate index `i2`. This is deprecated and will be disallowed in a future release. +ALTER TABLE t1 ADD INDEX i3(b), ALGORITHM= COPY; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 1 +Warnings: +Note 1831 Duplicate index `i3`. This is deprecated and will be disallowed in a future release. +ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= INPLACE; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 1 +Warnings: +Note 1831 Duplicate index `i4`. This is deprecated and will be disallowed in a future release. +ALTER TABLE t1 ADD INDEX i5(b), ALGORITHM= INVALID; +ERROR HY000: Unknown ALGORITHM 'INVALID' +ALTER TABLE m1 ENABLE KEYS; +affected rows: 0 +ALTER TABLE m1 ENABLE KEYS, ALGORITHM= DEFAULT; +affected rows: 0 +ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE; +affected rows: 0 +ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4; +# +# 2: Test ALGORITHM + old_alter_table +# +SET SESSION old_alter_table= 1; +affected rows: 0 +ALTER TABLE t1 ADD INDEX i1(b); +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 ADD INDEX i2(b), ALGORITHM= DEFAULT; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 1 +Warnings: +Note 1831 Duplicate index `i2`. This is deprecated and will be disallowed in a future release. +ALTER TABLE t1 ADD INDEX i3(b), ALGORITHM= COPY; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 1 +Warnings: +Note 1831 Duplicate index `i3`. This is deprecated and will be disallowed in a future release. +ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= INPLACE; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 1 +Warnings: +Note 1831 Duplicate index `i4`. This is deprecated and will be disallowed in a future release. +SET SESSION old_alter_table= 0; +affected rows: 0 +ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4; +# +# 3: Test unsupported in-place operation +# +ALTER TABLE t1 ADD COLUMN (c1 INT); +ALTER TABLE t1 ADD COLUMN (c2 INT), ALGORITHM= DEFAULT; +ALTER TABLE t1 ADD COLUMN (c3 INT), ALGORITHM= COPY; +ALTER TABLE t1 ADD COLUMN (c4 INT), ALGORITHM= INPLACE; +ALTER TABLE t1 DROP COLUMN c1, DROP COLUMN c2, DROP COLUMN c3, DROP COLUMN c4; +# +# 4: Test LOCK keyword +# +ALTER TABLE t1 ADD INDEX i1(b), LOCK= DEFAULT; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 ADD INDEX i2(b), LOCK= NONE; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 1 +Warnings: +Note 1831 Duplicate index `i2`. This is deprecated and will be disallowed in a future release. +ALTER TABLE t1 ADD INDEX i3(b), LOCK= SHARED; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 1 +Warnings: +Note 1831 Duplicate index `i3`. This is deprecated and will be disallowed in a future release. +ALTER TABLE t1 ADD INDEX i4(b), LOCK= EXCLUSIVE; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 1 +Warnings: +Note 1831 Duplicate index `i4`. This is deprecated and will be disallowed in a future release. +ALTER TABLE t1 ADD INDEX i5(b), LOCK= INVALID; +ERROR HY000: Unknown LOCK type 'INVALID' +ALTER TABLE m1 ENABLE KEYS, LOCK= DEFAULT; +ALTER TABLE m1 ENABLE KEYS, LOCK= NONE; +ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE. +ALTER TABLE m1 ENABLE KEYS, LOCK= SHARED; +ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE. +ALTER TABLE m1 ENABLE KEYS, LOCK= EXCLUSIVE; +ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4; +# +# 5: Test ALGORITHM + LOCK +# +ALTER TABLE t1 ADD INDEX i1(b), ALGORITHM= INPLACE, LOCK= NONE; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 ADD INDEX i2(b), ALGORITHM= INPLACE, LOCK= SHARED; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 1 +Warnings: +Note 1831 Duplicate index `i2`. This is deprecated and will be disallowed in a future release. +ALTER TABLE t1 ADD INDEX i3(b), ALGORITHM= INPLACE, LOCK= EXCLUSIVE; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 1 +Warnings: +Note 1831 Duplicate index `i3`. This is deprecated and will be disallowed in a future release. +ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= COPY, LOCK= NONE; +ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED. +ALTER TABLE t1 ADD INDEX i5(b), ALGORITHM= COPY, LOCK= SHARED; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 1 +Warnings: +Note 1831 Duplicate index `i5`. This is deprecated and will be disallowed in a future release. +ALTER TABLE t1 ADD INDEX i6(b), ALGORITHM= COPY, LOCK= EXCLUSIVE; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 1 +Warnings: +Note 1831 Duplicate index `i6`. This is deprecated and will be disallowed in a future release. +ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= NONE; +ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE. +ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= SHARED; +ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE. +ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= EXCLUSIVE; +affected rows: 0 +ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= NONE; +ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED. +ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= SHARED; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= EXCLUSIVE; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +DROP TABLE t1, m1; +# +# 6: Possible deadlock involving thr_lock.c +# +CREATE TABLE t1(a INT PRIMARY KEY, b INT); +INSERT INTO t1 VALUES (1,1), (2,2); +START TRANSACTION; +INSERT INTO t1 VALUES (3,3); +# Connection con1 +# Sending: +ALTER TABLE t1 DISABLE KEYS; +# Connection default +# Waiting until ALTER TABLE is blocked. +UPDATE t1 SET b = 4; +COMMIT; +# Connection con1 +# Reaping: ALTER TABLE t1 DISABLE KEYS +# Connection default +DROP TABLE t1; +# +# 7: Which operations require copy and which can be done in-place? +# +# Test which ALTER TABLE operations are done in-place and +# which operations are done using temporary table copy. +# +# --enable_info allows us to see how many rows were updated +# by ALTER TABLE. in-place will show 0 rows, while copy > 0. +# +DROP TABLE IF EXISTS ti1, ti2, ti3, tm1, tm2, tm3; +# Single operation tests +CREATE TABLE ti1(a INT NOT NULL, b INT, c INT) engine=InnoDB; +CREATE TABLE tm1(a INT NOT NULL, b INT, c INT) engine=MyISAM; +CREATE TABLE ti2(a INT PRIMARY KEY AUTO_INCREMENT, b INT, c INT) engine=InnoDB; +CREATE TABLE tm2(a INT PRIMARY KEY AUTO_INCREMENT, b INT, c INT) engine=MyISAM; +INSERT INTO ti1 VALUES (1,1,1), (2,2,2); +INSERT INTO ti2 VALUES (1,1,1), (2,2,2); +INSERT INTO tm1 VALUES (1,1,1), (2,2,2); +INSERT INTO tm2 VALUES (1,1,1), (2,2,2); +ALTER TABLE ti1; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 ADD COLUMN d VARCHAR(200); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 ADD COLUMN d VARCHAR(200); +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 ADD COLUMN d2 VARCHAR(200); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 ADD COLUMN d2 VARCHAR(200); +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 ADD COLUMN e ENUM('a', 'b') FIRST; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 ADD COLUMN e ENUM('a', 'b') FIRST; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 ADD COLUMN f INT AFTER a; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 ADD COLUMN f INT AFTER a; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 ADD INDEX ii1(b); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 ADD INDEX im1(b); +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 ADD UNIQUE INDEX ii2 (c); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 ADD UNIQUE INDEX im2 (c); +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 ADD FULLTEXT INDEX ii3 (d); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 1 +Warnings: +Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID +ALTER TABLE tm1 ADD FULLTEXT INDEX im3 (d); +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 ADD FULLTEXT INDEX ii4 (d2); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 ADD FULLTEXT INDEX im4 (d2); +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 ADD PRIMARY KEY(a), ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY. +ALTER TABLE ti1 ADD PRIMARY KEY(a); +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 ADD PRIMARY KEY(a); +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 DROP INDEX ii3; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 DROP INDEX im3; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 DROP COLUMN d2; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 DROP COLUMN d2; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 ADD CONSTRAINT fi1 FOREIGN KEY (b) REFERENCES ti2(a); +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 ADD CONSTRAINT fm1 FOREIGN KEY (b) REFERENCES tm2(a); +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 ALTER COLUMN b SET DEFAULT 1; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 ALTER COLUMN b SET DEFAULT 1; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 ALTER COLUMN b DROP DEFAULT; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 ALTER COLUMN b DROP DEFAULT; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 CHANGE COLUMN f g INT; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 CHANGE COLUMN f g INT; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 CHANGE COLUMN g h VARCHAR(20); +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 CHANGE COLUMN g h VARCHAR(20); +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 MODIFY COLUMN e ENUM('a', 'b', 'c'); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 MODIFY COLUMN e ENUM('a', 'b', 'c'); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 MODIFY COLUMN e INT; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 MODIFY COLUMN e INT; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 MODIFY COLUMN e INT AFTER h; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 MODIFY COLUMN e INT AFTER h; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 MODIFY COLUMN e INT FIRST; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 MODIFY COLUMN e INT FIRST; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +SET @orig_sql_mode = @@sql_mode; +SET @@sql_mode = 'STRICT_TRANS_TABLES'; +ALTER TABLE ti1 MODIFY COLUMN c INT NOT NULL; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +SET @@sql_mode = @orig_sql_mode; +ALTER TABLE tm1 MODIFY COLUMN c INT NOT NULL; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 MODIFY COLUMN c INT NULL; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 MODIFY COLUMN c INT NULL; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 MODIFY COLUMN h VARCHAR(30); +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 MODIFY COLUMN h VARCHAR(30); +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 MODIFY COLUMN h VARCHAR(30) AFTER d; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 MODIFY COLUMN h VARCHAR(30) AFTER d; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 DROP COLUMN h; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 DROP COLUMN h; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 DROP INDEX ii2; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 DROP INDEX im2; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 DROP PRIMARY KEY; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 DROP PRIMARY KEY; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 DROP FOREIGN KEY fi1; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 DROP FOREIGN KEY fm1; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 RENAME TO ti3; +affected rows: 0 +ALTER TABLE tm1 RENAME TO tm3; +affected rows: 0 +ALTER TABLE ti3 RENAME TO ti1; +affected rows: 0 +ALTER TABLE tm3 RENAME TO tm1; +affected rows: 0 +ALTER TABLE ti1 ORDER BY b; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 ORDER BY b; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 CONVERT TO CHARACTER SET utf16; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 CONVERT TO CHARACTER SET utf16; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 DEFAULT CHARACTER SET utf8; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 DEFAULT CHARACTER SET utf8; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 FORCE; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 FORCE; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 AUTO_INCREMENT 3; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 AUTO_INCREMENT 3; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 AVG_ROW_LENGTH 10; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 AVG_ROW_LENGTH 10; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 CHECKSUM 1; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 CHECKSUM 1; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 COMMENT 'test'; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 COMMENT 'test'; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 MAX_ROWS 100; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 MAX_ROWS 100; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 MIN_ROWS 1; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 MIN_ROWS 1; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE ti1 PACK_KEYS 1; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE tm1 PACK_KEYS 1; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +DROP TABLE ti1, ti2, tm1, tm2; +# Tests of >1 operation (InnoDB) +CREATE TABLE ti1(a INT PRIMARY KEY AUTO_INCREMENT, b INT) engine=InnoDB; +INSERT INTO ti1(b) VALUES (1), (2); +ALTER TABLE ti1 RENAME TO ti3, ADD INDEX ii1(b); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE ti3 DROP INDEX ii1, AUTO_INCREMENT 5; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +INSERT INTO ti3(b) VALUES (5); +ALTER TABLE ti3 ADD INDEX ii1(b), AUTO_INCREMENT 7; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +INSERT INTO ti3(b) VALUES (7); +SELECT * FROM ti3; +a b +1 1 +2 2 +5 5 +7 7 +DROP TABLE ti3; +# +# 8: Scenario in which ALTER TABLE was returning an unwarranted +# ER_ILLEGAL_HA error at some point during work on this WL. +# +CREATE TABLE tm1(i INT DEFAULT 1) engine=MyISAM; +ALTER TABLE tm1 ADD INDEX ii1(i), ALTER COLUMN i DROP DEFAULT; +DROP TABLE tm1; +create table if not exists t1 (i int); +alter table t1 add key (i); +alter table t1 add key if not exists (i); +Warnings: +Note 1061 Duplicate key name 'i' +DROP TABLE t1; +create table t1 (a int); +alter table t1 change column if exists a b bigint; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +create table t1 (i int); +alter table t1 add unique index if not exists idx(i); +alter table t1 add unique index if not exists idx(i); +Warnings: +Note 1061 Duplicate key name 'idx' +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) DEFAULT NULL, + UNIQUE KEY `idx` (`i`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( +`event_id` bigint(20) unsigned NOT NULL DEFAULT '0', +`market_id` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`event_id`,`market_id`) +); +ALTER TABLE t1 ADD PRIMARY KEY IF NOT EXISTS event_id (event_id,market_id); +Warnings: +Note 1061 Multiple primary key defined +DROP TABLE t1; +# +# MDEV-11126 Crash while altering persistent virtual column +# +CREATE TABLE `tab1` ( +`id` bigint(20) NOT NULL AUTO_INCREMENT, +`field2` set('option1','option2','option3','option4') NOT NULL, +`field3` set('option1','option2','option3','option4','option5') NOT NULL, +`field4` set('option1','option2','option3','option4') NOT NULL, +`field5` varchar(32) NOT NULL, +`field6` varchar(32) NOT NULL, +`field7` varchar(32) NOT NULL, +`field8` varchar(32) NOT NULL, +`field9` int(11) NOT NULL DEFAULT '1', +`field10` varchar(16) NOT NULL, +`field11` enum('option1','option2','option3') NOT NULL DEFAULT 'option1', +`v_col` varchar(128) AS (IF(field11='option1',CONCAT_WS(":","field1",field2,field3,field4,field5,field6,field7,field8,field9,field10), CONCAT_WS(":","field1",field11,field2,field3,field4,field5,field6,field7,field8,field9,field10))) PERSISTENT, +PRIMARY KEY (`id`) +) DEFAULT CHARSET=latin1; +ALTER TABLE `tab1` CHANGE COLUMN v_col `v_col` varchar(128); +SHOW CREATE TABLE `tab1`; +Table Create Table +tab1 CREATE TABLE `tab1` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `field2` set('option1','option2','option3','option4') NOT NULL, + `field3` set('option1','option2','option3','option4','option5') NOT NULL, + `field4` set('option1','option2','option3','option4') NOT NULL, + `field5` varchar(32) NOT NULL, + `field6` varchar(32) NOT NULL, + `field7` varchar(32) NOT NULL, + `field8` varchar(32) NOT NULL, + `field9` int(11) NOT NULL DEFAULT '1', + `field10` varchar(16) NOT NULL, + `field11` enum('option1','option2','option3') NOT NULL DEFAULT 'option1', + `v_col` varchar(128) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +ALTER TABLE `tab1` CHANGE COLUMN v_col `v_col` varchar(128) AS (IF(field11='option1',CONCAT_WS(":","field1",field2,field3,field4,field5,field6,field7,field8,field9,field10), CONCAT_WS(":","field1",field11,field2,field3,field4,field5,field6,field7,field8,field9,field10))) PERSISTENT; +SHOW CREATE TABLE `tab1`; +Table Create Table +tab1 CREATE TABLE `tab1` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `field2` set('option1','option2','option3','option4') NOT NULL, + `field3` set('option1','option2','option3','option4','option5') NOT NULL, + `field4` set('option1','option2','option3','option4') NOT NULL, + `field5` varchar(32) NOT NULL, + `field6` varchar(32) NOT NULL, + `field7` varchar(32) NOT NULL, + `field8` varchar(32) NOT NULL, + `field9` int(11) NOT NULL DEFAULT '1', + `field10` varchar(16) NOT NULL, + `field11` enum('option1','option2','option3') NOT NULL DEFAULT 'option1', + `v_col` varchar(128) AS (IF(field11='option1',CONCAT_WS(":","field1",field2,field3,field4,field5,field6,field7,field8,field9,field10), CONCAT_WS(":","field1",field11,field2,field3,field4,field5,field6,field7,field8,field9,field10))) PERSISTENT, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE `tab1`; +# +# MDEV-11548 Reproducible server crash after the 2nd ALTER TABLE ADD FOREIGN KEY IF NOT EXISTS +# +CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY); +CREATE TABLE t2 (id1 INT UNSIGNED NOT NULL); +ALTER TABLE t2 +ADD FOREIGN KEY IF NOT EXISTS (id1) +REFERENCES t1 (id); +ALTER TABLE t2 +ADD FOREIGN KEY IF NOT EXISTS (id1) +REFERENCES t1 (id); +Warnings: +Note 1061 Duplicate key name 'id1' +DROP TABLE t2; +DROP TABLE t1; +# +# MDEV-6390 CONVERT TO CHARACTER SET utf8 doesn't change DEFAULT CHARSET. +# +CREATE TABLE t1 (id int(11) NOT NULL, a int(11) NOT NULL, b int(11)) +ENGINE=InnoDB DEFAULT CHARSET=latin1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `a` int(11) NOT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +ALTER TABLE t1 CONVERT TO CHARACTER SET utf8; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `a` int(11) NOT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 +DROP TABLE t1; diff --git a/mysql-test/r/alter_table_autoinc-5574.result b/mysql-test/r/alter_table_autoinc-5574.result new file mode 100644 index 00000000000..9476313c773 --- /dev/null +++ b/mysql-test/r/alter_table_autoinc-5574.result @@ -0,0 +1,11 @@ +create table t1(a int(10)unsigned not null auto_increment primary key, +b varchar(255) not null) engine=innodb default charset=utf8; +insert into t1 values(1,'aaa'),(2,'bbb'); +alter table t1 auto_increment=1; +insert into t1 values(NULL, 'ccc'); +select * from t1; +a b +1 aaa +2 bbb +3 ccc +drop table t1; diff --git a/mysql-test/r/alter_table_mdev539_maria.result b/mysql-test/r/alter_table_mdev539_maria.result new file mode 100644 index 00000000000..703908825d2 --- /dev/null +++ b/mysql-test/r/alter_table_mdev539_maria.result @@ -0,0 +1,252 @@ +# +set @@storage_engine= Aria; +# +# mdev-539: fast build of unique/primary indexes for MyISAM/Aria +# +DROP DATABASE IF EXISTS dbt3_s001; +CREATE DATABASE dbt3_s001; +use dbt3_s001; +drop index `primary` on lineitem; +show create table lineitem; +Table Create Table +lineitem CREATE TABLE `lineitem` ( + `l_orderkey` int(11) NOT NULL DEFAULT '0', + `l_partkey` int(11) DEFAULT NULL, + `l_suppkey` int(11) DEFAULT NULL, + `l_linenumber` int(11) NOT NULL DEFAULT '0', + `l_quantity` double DEFAULT NULL, + `l_extendedprice` double DEFAULT NULL, + `l_discount` double DEFAULT NULL, + `l_tax` double DEFAULT NULL, + `l_returnflag` char(1) DEFAULT NULL, + `l_linestatus` char(1) DEFAULT NULL, + `l_shipDATE` date DEFAULT NULL, + `l_commitDATE` date DEFAULT NULL, + `l_receiptDATE` date DEFAULT NULL, + `l_shipinstruct` char(25) DEFAULT NULL, + `l_shipmode` char(10) DEFAULT NULL, + `l_comment` varchar(44) DEFAULT NULL, + KEY `i_l_shipdate` (`l_shipDATE`), + KEY `i_l_suppkey_partkey` (`l_partkey`,`l_suppkey`), + KEY `i_l_partkey` (`l_partkey`), + KEY `i_l_suppkey` (`l_suppkey`), + KEY `i_l_receiptdate` (`l_receiptDATE`), + KEY `i_l_orderkey` (`l_orderkey`), + KEY `i_l_orderkey_quantity` (`l_orderkey`,`l_quantity`), + KEY `i_l_commitdate` (`l_commitDATE`) +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +alter table lineitem add primary key (l_orderkey, l_linenumber); +show create table lineitem; +Table Create Table +lineitem CREATE TABLE `lineitem` ( + `l_orderkey` int(11) NOT NULL DEFAULT '0', + `l_partkey` int(11) DEFAULT NULL, + `l_suppkey` int(11) DEFAULT NULL, + `l_linenumber` int(11) NOT NULL DEFAULT '0', + `l_quantity` double DEFAULT NULL, + `l_extendedprice` double DEFAULT NULL, + `l_discount` double DEFAULT NULL, + `l_tax` double DEFAULT NULL, + `l_returnflag` char(1) DEFAULT NULL, + `l_linestatus` char(1) DEFAULT NULL, + `l_shipDATE` date DEFAULT NULL, + `l_commitDATE` date DEFAULT NULL, + `l_receiptDATE` date DEFAULT NULL, + `l_shipinstruct` char(25) DEFAULT NULL, + `l_shipmode` char(10) DEFAULT NULL, + `l_comment` varchar(44) DEFAULT NULL, + PRIMARY KEY (`l_orderkey`,`l_linenumber`), + KEY `i_l_shipdate` (`l_shipDATE`), + KEY `i_l_suppkey_partkey` (`l_partkey`,`l_suppkey`), + KEY `i_l_partkey` (`l_partkey`), + KEY `i_l_suppkey` (`l_suppkey`), + KEY `i_l_receiptdate` (`l_receiptDATE`), + KEY `i_l_orderkey` (`l_orderkey`), + KEY `i_l_orderkey_quantity` (`l_orderkey`,`l_quantity`), + KEY `i_l_commitdate` (`l_commitDATE`) +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +drop index `primary` on lineitem; +select * from lineitem where l_orderkey=1 and l_linenumber=2; +l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment +1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +insert into lineitem values +(1,68,9,2,36,34850.16,0.07,0.06,'N','O','1996-04-12','1996-02-28','1996-04-20','TAKE BACK RETURN','MAIL','slyly bold pinto beans detect s'); +select * from lineitem where l_orderkey=1 and l_linenumber=2; +l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment +1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +1 68 9 2 36 34850.16 0.07 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +alter table lineitem add primary key (l_orderkey, l_linenumber); +ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY' +show create table lineitem; +Table Create Table +lineitem CREATE TABLE `lineitem` ( + `l_orderkey` int(11) NOT NULL DEFAULT '0', + `l_partkey` int(11) DEFAULT NULL, + `l_suppkey` int(11) DEFAULT NULL, + `l_linenumber` int(11) NOT NULL DEFAULT '0', + `l_quantity` double DEFAULT NULL, + `l_extendedprice` double DEFAULT NULL, + `l_discount` double DEFAULT NULL, + `l_tax` double DEFAULT NULL, + `l_returnflag` char(1) DEFAULT NULL, + `l_linestatus` char(1) DEFAULT NULL, + `l_shipDATE` date DEFAULT NULL, + `l_commitDATE` date DEFAULT NULL, + `l_receiptDATE` date DEFAULT NULL, + `l_shipinstruct` char(25) DEFAULT NULL, + `l_shipmode` char(10) DEFAULT NULL, + `l_comment` varchar(44) DEFAULT NULL, + KEY `i_l_shipdate` (`l_shipDATE`), + KEY `i_l_suppkey_partkey` (`l_partkey`,`l_suppkey`), + KEY `i_l_partkey` (`l_partkey`), + KEY `i_l_suppkey` (`l_suppkey`), + KEY `i_l_receiptdate` (`l_receiptDATE`), + KEY `i_l_orderkey` (`l_orderkey`), + KEY `i_l_orderkey_quantity` (`l_orderkey`,`l_quantity`), + KEY `i_l_commitdate` (`l_commitDATE`) +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +select * from lineitem where l_orderkey=1 and l_linenumber=2; +l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment +1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +1 68 9 2 36 34850.16 0.07 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +delete from lineitem where l_orderkey=1 and l_linenumber=2 and l_discount=0.07; +alter table lineitem add primary key (l_orderkey, l_linenumber); +show create table lineitem; +Table Create Table +lineitem CREATE TABLE `lineitem` ( + `l_orderkey` int(11) NOT NULL DEFAULT '0', + `l_partkey` int(11) DEFAULT NULL, + `l_suppkey` int(11) DEFAULT NULL, + `l_linenumber` int(11) NOT NULL DEFAULT '0', + `l_quantity` double DEFAULT NULL, + `l_extendedprice` double DEFAULT NULL, + `l_discount` double DEFAULT NULL, + `l_tax` double DEFAULT NULL, + `l_returnflag` char(1) DEFAULT NULL, + `l_linestatus` char(1) DEFAULT NULL, + `l_shipDATE` date DEFAULT NULL, + `l_commitDATE` date DEFAULT NULL, + `l_receiptDATE` date DEFAULT NULL, + `l_shipinstruct` char(25) DEFAULT NULL, + `l_shipmode` char(10) DEFAULT NULL, + `l_comment` varchar(44) DEFAULT NULL, + PRIMARY KEY (`l_orderkey`,`l_linenumber`), + KEY `i_l_shipdate` (`l_shipDATE`), + KEY `i_l_suppkey_partkey` (`l_partkey`,`l_suppkey`), + KEY `i_l_partkey` (`l_partkey`), + KEY `i_l_suppkey` (`l_suppkey`), + KEY `i_l_receiptdate` (`l_receiptDATE`), + KEY `i_l_orderkey` (`l_orderkey`), + KEY `i_l_orderkey_quantity` (`l_orderkey`,`l_quantity`), + KEY `i_l_commitdate` (`l_commitDATE`) +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +select * from lineitem where l_orderkey=1 and l_linenumber=2; +l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment +1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +create unique index i_c_name on customer(c_name); +show create table customer; +Table Create Table +customer CREATE TABLE `customer` ( + `c_custkey` int(11) NOT NULL, + `c_name` varchar(25) DEFAULT NULL, + `c_address` varchar(40) DEFAULT NULL, + `c_nationkey` int(11) DEFAULT NULL, + `c_phone` char(15) DEFAULT NULL, + `c_acctbal` double DEFAULT NULL, + `c_mktsegment` char(10) DEFAULT NULL, + `c_comment` varchar(117) DEFAULT NULL, + PRIMARY KEY (`c_custkey`), + UNIQUE KEY `i_c_name` (`c_name`), + KEY `i_c_nationkey` (`c_nationkey`) +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +select * from customer where c_name='Customer#000000003'; +c_custkey c_name c_address c_nationkey c_phone c_acctbal c_mktsegment c_comment +3 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg +drop index i_c_name on customer; +insert into customer values +(303,'Customer#000000003','MG9kdTD2WBHm',1,'11-719-748-3364',7498.12,'AUTOMOBILE','special packages wake. slyly reg'); +select * from customer where c_name='Customer#000000003'; +c_custkey c_name c_address c_nationkey c_phone c_acctbal c_mktsegment c_comment +3 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg +303 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg +alter table customer add unique index i_c_name(c_name); +ERROR 23000: Duplicate entry 'Customer#000000003' for key 'i_c_name' +show create table customer; +Table Create Table +customer CREATE TABLE `customer` ( + `c_custkey` int(11) NOT NULL, + `c_name` varchar(25) DEFAULT NULL, + `c_address` varchar(40) DEFAULT NULL, + `c_nationkey` int(11) DEFAULT NULL, + `c_phone` char(15) DEFAULT NULL, + `c_acctbal` double DEFAULT NULL, + `c_mktsegment` char(10) DEFAULT NULL, + `c_comment` varchar(117) DEFAULT NULL, + PRIMARY KEY (`c_custkey`), + KEY `i_c_nationkey` (`c_nationkey`) +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +select * from customer where c_name='Customer#000000003'; +c_custkey c_name c_address c_nationkey c_phone c_acctbal c_mktsegment c_comment +3 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg +303 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg +delete from customer where c_custkey=303; +select * from customer where c_name='Customer#000000003'; +c_custkey c_name c_address c_nationkey c_phone c_acctbal c_mktsegment c_comment +3 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg +alter table customer add unique index i_c_name(c_name); +show create table customer; +Table Create Table +customer CREATE TABLE `customer` ( + `c_custkey` int(11) NOT NULL, + `c_name` varchar(25) DEFAULT NULL, + `c_address` varchar(40) DEFAULT NULL, + `c_nationkey` int(11) DEFAULT NULL, + `c_phone` char(15) DEFAULT NULL, + `c_acctbal` double DEFAULT NULL, + `c_mktsegment` char(10) DEFAULT NULL, + `c_comment` varchar(117) DEFAULT NULL, + PRIMARY KEY (`c_custkey`), + UNIQUE KEY `i_c_name` (`c_name`), + KEY `i_c_nationkey` (`c_nationkey`) +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +select * from customer where c_name='Customer#000000003'; +c_custkey c_name c_address c_nationkey c_phone c_acctbal c_mktsegment c_comment +3 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg +drop index `primary` on customer; +show create table customer; +Table Create Table +customer CREATE TABLE `customer` ( + `c_custkey` int(11) NOT NULL, + `c_name` varchar(25) DEFAULT NULL, + `c_address` varchar(40) DEFAULT NULL, + `c_nationkey` int(11) DEFAULT NULL, + `c_phone` char(15) DEFAULT NULL, + `c_acctbal` double DEFAULT NULL, + `c_mktsegment` char(10) DEFAULT NULL, + `c_comment` varchar(117) DEFAULT NULL, + UNIQUE KEY `i_c_name` (`c_name`), + KEY `i_c_nationkey` (`c_nationkey`) +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +insert into customer values +(3,'Customer#000000303','MG9kdTD2WBHm',1,'11-719-748-3364',7498.12,'AUTOMOBILE','special packages wake. slyly reg'); +alter ignore table customer add primary key (c_custkey); +show create table customer; +Table Create Table +customer CREATE TABLE `customer` ( + `c_custkey` int(11) NOT NULL, + `c_name` varchar(25) DEFAULT NULL, + `c_address` varchar(40) DEFAULT NULL, + `c_nationkey` int(11) DEFAULT NULL, + `c_phone` char(15) DEFAULT NULL, + `c_acctbal` double DEFAULT NULL, + `c_mktsegment` char(10) DEFAULT NULL, + `c_comment` varchar(117) DEFAULT NULL, + PRIMARY KEY (`c_custkey`), + UNIQUE KEY `i_c_name` (`c_name`), + KEY `i_c_nationkey` (`c_nationkey`) +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +select * from customer where c_custkey=3; +c_custkey c_name c_address c_nationkey c_phone c_acctbal c_mktsegment c_comment +3 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg +DROP DATABASE dbt3_s001; +set @@storage_engine= default; diff --git a/mysql-test/r/alter_table_mdev539_myisam.result b/mysql-test/r/alter_table_mdev539_myisam.result new file mode 100644 index 00000000000..7140c544836 --- /dev/null +++ b/mysql-test/r/alter_table_mdev539_myisam.result @@ -0,0 +1,252 @@ +# +set @@storage_engine= MyISAM; +# +# mdev-539: fast build of unique/primary indexes for MyISAM/Aria +# +DROP DATABASE IF EXISTS dbt3_s001; +CREATE DATABASE dbt3_s001; +use dbt3_s001; +drop index `primary` on lineitem; +show create table lineitem; +Table Create Table +lineitem CREATE TABLE `lineitem` ( + `l_orderkey` int(11) NOT NULL DEFAULT '0', + `l_partkey` int(11) DEFAULT NULL, + `l_suppkey` int(11) DEFAULT NULL, + `l_linenumber` int(11) NOT NULL DEFAULT '0', + `l_quantity` double DEFAULT NULL, + `l_extendedprice` double DEFAULT NULL, + `l_discount` double DEFAULT NULL, + `l_tax` double DEFAULT NULL, + `l_returnflag` char(1) DEFAULT NULL, + `l_linestatus` char(1) DEFAULT NULL, + `l_shipDATE` date DEFAULT NULL, + `l_commitDATE` date DEFAULT NULL, + `l_receiptDATE` date DEFAULT NULL, + `l_shipinstruct` char(25) DEFAULT NULL, + `l_shipmode` char(10) DEFAULT NULL, + `l_comment` varchar(44) DEFAULT NULL, + KEY `i_l_shipdate` (`l_shipDATE`), + KEY `i_l_suppkey_partkey` (`l_partkey`,`l_suppkey`), + KEY `i_l_partkey` (`l_partkey`), + KEY `i_l_suppkey` (`l_suppkey`), + KEY `i_l_receiptdate` (`l_receiptDATE`), + KEY `i_l_orderkey` (`l_orderkey`), + KEY `i_l_orderkey_quantity` (`l_orderkey`,`l_quantity`), + KEY `i_l_commitdate` (`l_commitDATE`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +alter table lineitem add primary key (l_orderkey, l_linenumber); +show create table lineitem; +Table Create Table +lineitem CREATE TABLE `lineitem` ( + `l_orderkey` int(11) NOT NULL DEFAULT '0', + `l_partkey` int(11) DEFAULT NULL, + `l_suppkey` int(11) DEFAULT NULL, + `l_linenumber` int(11) NOT NULL DEFAULT '0', + `l_quantity` double DEFAULT NULL, + `l_extendedprice` double DEFAULT NULL, + `l_discount` double DEFAULT NULL, + `l_tax` double DEFAULT NULL, + `l_returnflag` char(1) DEFAULT NULL, + `l_linestatus` char(1) DEFAULT NULL, + `l_shipDATE` date DEFAULT NULL, + `l_commitDATE` date DEFAULT NULL, + `l_receiptDATE` date DEFAULT NULL, + `l_shipinstruct` char(25) DEFAULT NULL, + `l_shipmode` char(10) DEFAULT NULL, + `l_comment` varchar(44) DEFAULT NULL, + PRIMARY KEY (`l_orderkey`,`l_linenumber`), + KEY `i_l_shipdate` (`l_shipDATE`), + KEY `i_l_suppkey_partkey` (`l_partkey`,`l_suppkey`), + KEY `i_l_partkey` (`l_partkey`), + KEY `i_l_suppkey` (`l_suppkey`), + KEY `i_l_receiptdate` (`l_receiptDATE`), + KEY `i_l_orderkey` (`l_orderkey`), + KEY `i_l_orderkey_quantity` (`l_orderkey`,`l_quantity`), + KEY `i_l_commitdate` (`l_commitDATE`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop index `primary` on lineitem; +select * from lineitem where l_orderkey=1 and l_linenumber=2; +l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment +1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +insert into lineitem values +(1,68,9,2,36,34850.16,0.07,0.06,'N','O','1996-04-12','1996-02-28','1996-04-20','TAKE BACK RETURN','MAIL','slyly bold pinto beans detect s'); +select * from lineitem where l_orderkey=1 and l_linenumber=2; +l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment +1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +1 68 9 2 36 34850.16 0.07 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +alter table lineitem add primary key (l_orderkey, l_linenumber); +ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY' +show create table lineitem; +Table Create Table +lineitem CREATE TABLE `lineitem` ( + `l_orderkey` int(11) NOT NULL DEFAULT '0', + `l_partkey` int(11) DEFAULT NULL, + `l_suppkey` int(11) DEFAULT NULL, + `l_linenumber` int(11) NOT NULL DEFAULT '0', + `l_quantity` double DEFAULT NULL, + `l_extendedprice` double DEFAULT NULL, + `l_discount` double DEFAULT NULL, + `l_tax` double DEFAULT NULL, + `l_returnflag` char(1) DEFAULT NULL, + `l_linestatus` char(1) DEFAULT NULL, + `l_shipDATE` date DEFAULT NULL, + `l_commitDATE` date DEFAULT NULL, + `l_receiptDATE` date DEFAULT NULL, + `l_shipinstruct` char(25) DEFAULT NULL, + `l_shipmode` char(10) DEFAULT NULL, + `l_comment` varchar(44) DEFAULT NULL, + KEY `i_l_shipdate` (`l_shipDATE`), + KEY `i_l_suppkey_partkey` (`l_partkey`,`l_suppkey`), + KEY `i_l_partkey` (`l_partkey`), + KEY `i_l_suppkey` (`l_suppkey`), + KEY `i_l_receiptdate` (`l_receiptDATE`), + KEY `i_l_orderkey` (`l_orderkey`), + KEY `i_l_orderkey_quantity` (`l_orderkey`,`l_quantity`), + KEY `i_l_commitdate` (`l_commitDATE`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from lineitem where l_orderkey=1 and l_linenumber=2; +l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment +1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +1 68 9 2 36 34850.16 0.07 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +delete from lineitem where l_orderkey=1 and l_linenumber=2 and l_discount=0.07; +alter table lineitem add primary key (l_orderkey, l_linenumber); +show create table lineitem; +Table Create Table +lineitem CREATE TABLE `lineitem` ( + `l_orderkey` int(11) NOT NULL DEFAULT '0', + `l_partkey` int(11) DEFAULT NULL, + `l_suppkey` int(11) DEFAULT NULL, + `l_linenumber` int(11) NOT NULL DEFAULT '0', + `l_quantity` double DEFAULT NULL, + `l_extendedprice` double DEFAULT NULL, + `l_discount` double DEFAULT NULL, + `l_tax` double DEFAULT NULL, + `l_returnflag` char(1) DEFAULT NULL, + `l_linestatus` char(1) DEFAULT NULL, + `l_shipDATE` date DEFAULT NULL, + `l_commitDATE` date DEFAULT NULL, + `l_receiptDATE` date DEFAULT NULL, + `l_shipinstruct` char(25) DEFAULT NULL, + `l_shipmode` char(10) DEFAULT NULL, + `l_comment` varchar(44) DEFAULT NULL, + PRIMARY KEY (`l_orderkey`,`l_linenumber`), + KEY `i_l_shipdate` (`l_shipDATE`), + KEY `i_l_suppkey_partkey` (`l_partkey`,`l_suppkey`), + KEY `i_l_partkey` (`l_partkey`), + KEY `i_l_suppkey` (`l_suppkey`), + KEY `i_l_receiptdate` (`l_receiptDATE`), + KEY `i_l_orderkey` (`l_orderkey`), + KEY `i_l_orderkey_quantity` (`l_orderkey`,`l_quantity`), + KEY `i_l_commitdate` (`l_commitDATE`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from lineitem where l_orderkey=1 and l_linenumber=2; +l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment +1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +create unique index i_c_name on customer(c_name); +show create table customer; +Table Create Table +customer CREATE TABLE `customer` ( + `c_custkey` int(11) NOT NULL, + `c_name` varchar(25) DEFAULT NULL, + `c_address` varchar(40) DEFAULT NULL, + `c_nationkey` int(11) DEFAULT NULL, + `c_phone` char(15) DEFAULT NULL, + `c_acctbal` double DEFAULT NULL, + `c_mktsegment` char(10) DEFAULT NULL, + `c_comment` varchar(117) DEFAULT NULL, + PRIMARY KEY (`c_custkey`), + UNIQUE KEY `i_c_name` (`c_name`), + KEY `i_c_nationkey` (`c_nationkey`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from customer where c_name='Customer#000000003'; +c_custkey c_name c_address c_nationkey c_phone c_acctbal c_mktsegment c_comment +3 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg +drop index i_c_name on customer; +insert into customer values +(303,'Customer#000000003','MG9kdTD2WBHm',1,'11-719-748-3364',7498.12,'AUTOMOBILE','special packages wake. slyly reg'); +select * from customer where c_name='Customer#000000003'; +c_custkey c_name c_address c_nationkey c_phone c_acctbal c_mktsegment c_comment +3 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg +303 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg +alter table customer add unique index i_c_name(c_name); +ERROR 23000: Duplicate entry 'Customer#000000003' for key 'i_c_name' +show create table customer; +Table Create Table +customer CREATE TABLE `customer` ( + `c_custkey` int(11) NOT NULL, + `c_name` varchar(25) DEFAULT NULL, + `c_address` varchar(40) DEFAULT NULL, + `c_nationkey` int(11) DEFAULT NULL, + `c_phone` char(15) DEFAULT NULL, + `c_acctbal` double DEFAULT NULL, + `c_mktsegment` char(10) DEFAULT NULL, + `c_comment` varchar(117) DEFAULT NULL, + PRIMARY KEY (`c_custkey`), + KEY `i_c_nationkey` (`c_nationkey`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from customer where c_name='Customer#000000003'; +c_custkey c_name c_address c_nationkey c_phone c_acctbal c_mktsegment c_comment +3 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg +303 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg +delete from customer where c_custkey=303; +select * from customer where c_name='Customer#000000003'; +c_custkey c_name c_address c_nationkey c_phone c_acctbal c_mktsegment c_comment +3 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg +alter table customer add unique index i_c_name(c_name); +show create table customer; +Table Create Table +customer CREATE TABLE `customer` ( + `c_custkey` int(11) NOT NULL, + `c_name` varchar(25) DEFAULT NULL, + `c_address` varchar(40) DEFAULT NULL, + `c_nationkey` int(11) DEFAULT NULL, + `c_phone` char(15) DEFAULT NULL, + `c_acctbal` double DEFAULT NULL, + `c_mktsegment` char(10) DEFAULT NULL, + `c_comment` varchar(117) DEFAULT NULL, + PRIMARY KEY (`c_custkey`), + UNIQUE KEY `i_c_name` (`c_name`), + KEY `i_c_nationkey` (`c_nationkey`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from customer where c_name='Customer#000000003'; +c_custkey c_name c_address c_nationkey c_phone c_acctbal c_mktsegment c_comment +3 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg +drop index `primary` on customer; +show create table customer; +Table Create Table +customer CREATE TABLE `customer` ( + `c_custkey` int(11) NOT NULL, + `c_name` varchar(25) DEFAULT NULL, + `c_address` varchar(40) DEFAULT NULL, + `c_nationkey` int(11) DEFAULT NULL, + `c_phone` char(15) DEFAULT NULL, + `c_acctbal` double DEFAULT NULL, + `c_mktsegment` char(10) DEFAULT NULL, + `c_comment` varchar(117) DEFAULT NULL, + UNIQUE KEY `i_c_name` (`c_name`), + KEY `i_c_nationkey` (`c_nationkey`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into customer values +(3,'Customer#000000303','MG9kdTD2WBHm',1,'11-719-748-3364',7498.12,'AUTOMOBILE','special packages wake. slyly reg'); +alter ignore table customer add primary key (c_custkey); +show create table customer; +Table Create Table +customer CREATE TABLE `customer` ( + `c_custkey` int(11) NOT NULL, + `c_name` varchar(25) DEFAULT NULL, + `c_address` varchar(40) DEFAULT NULL, + `c_nationkey` int(11) DEFAULT NULL, + `c_phone` char(15) DEFAULT NULL, + `c_acctbal` double DEFAULT NULL, + `c_mktsegment` char(10) DEFAULT NULL, + `c_comment` varchar(117) DEFAULT NULL, + PRIMARY KEY (`c_custkey`), + UNIQUE KEY `i_c_name` (`c_name`), + KEY `i_c_nationkey` (`c_nationkey`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from customer where c_custkey=3; +c_custkey c_name c_address c_nationkey c_phone c_acctbal c_mktsegment c_comment +3 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg +DROP DATABASE dbt3_s001; +set @@storage_engine= default; diff --git a/mysql-test/r/alter_table_online.result b/mysql-test/r/alter_table_online.result index 83e82191541..d1fc4a3bd93 100644 --- a/mysql-test/r/alter_table_online.result +++ b/mysql-test/r/alter_table_online.result @@ -1,74 +1,186 @@ -drop table if exists t1,t2,t3; create table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b')); insert into t1 (a) values (1),(2),(3); alter online table t1 modify b int default 5; alter online table t1 change b new_name int; alter online table t1 modify e enum('a','b','c'); alter online table t1 comment "new comment"; -alter online table t1 rename to t2; -alter online table t2 rename to t1; +alter online table t1 algorithm=INPLACE, lock=NONE; +alter online table t1; +alter table t1 algorithm=INPLACE; +alter table t1 lock=NONE; drop table t1; create temporary table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b')); insert into t1 (a) values (1),(2),(3); alter online table t1 modify b int default 5; -ERROR HY000: Can't execute the given 'ALTER' command as online alter online table t1 change b new_name int; -ERROR HY000: Can't execute the given 'ALTER' command as online alter online table t1 modify e enum('a','b','c'); -ERROR HY000: Can't execute the given 'ALTER' command as online alter online table t1 comment "new comment"; -ERROR HY000: Can't execute the given 'ALTER' command as online alter online table t1 rename to t2; -ERROR HY000: Can't execute the given 'ALTER' command as online -drop table t1; +drop table t2; create table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b')); insert into t1 (a) values (1),(2),(3); alter online table t1 drop column b, add b int; -ERROR HY000: Can't execute the given 'ALTER' command as online +ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED. alter online table t1 modify b bigint; -ERROR HY000: Can't execute the given 'ALTER' command as online +ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED. alter online table t1 modify e enum('c','a','b'); -ERROR HY000: Can't execute the given 'ALTER' command as online +ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED. alter online table t1 modify c varchar(50); -ERROR HY000: Can't execute the given 'ALTER' command as online +ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED. alter online table t1 modify c varchar(100); -ERROR HY000: Can't execute the given 'ALTER' command as online +ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED. alter online table t1 add f int; -ERROR HY000: Can't execute the given 'ALTER' command as online +ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED. alter online table t1 engine=memory; -ERROR HY000: Can't execute the given 'ALTER' command as online +ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED. +alter online table t1 rename to t2; +ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE. alter table t1 engine=innodb; alter table t1 add index (b); alter online table t1 add index c (c); -ERROR HY000: Can't execute the given 'ALTER' command as online alter online table t1 drop index b; -ERROR HY000: Can't execute the given 'ALTER' command as online +alter online table t1 comment "new comment"; drop table t1; create temporary table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b')); insert into t1 (a) values (1),(2),(3); alter online table t1 drop column b, add b int; -ERROR HY000: Can't execute the given 'ALTER' command as online alter online table t1 modify b bigint; -ERROR HY000: Can't execute the given 'ALTER' command as online alter online table t1 modify e enum('c','a','b'); -ERROR HY000: Can't execute the given 'ALTER' command as online alter online table t1 modify c varchar(50); -ERROR HY000: Can't execute the given 'ALTER' command as online alter online table t1 modify c varchar(100); -ERROR HY000: Can't execute the given 'ALTER' command as online alter online table t1 add f int; -ERROR HY000: Can't execute the given 'ALTER' command as online alter online table t1 engine=memory; -ERROR HY000: Can't execute the given 'ALTER' command as online alter table t1 engine=innodb; alter table t1 add index (b); alter online table t1 add index c (c); -ERROR HY000: Can't execute the given 'ALTER' command as online alter online table t1 drop index b; -ERROR HY000: Can't execute the given 'ALTER' command as online drop table t1; create table t1 (a int not null primary key, b int, c varchar(80)); create table t2 (a int not null primary key, b int, c varchar(80)); create table t3 (a int not null primary key, b int, c varchar(80)) engine=merge UNION=(t1); alter online table t3 union=(t1,t2); +ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE. drop table t1,t2,t3; +create table t1 (i int) partition by hash(i) partitions 2; +alter online table t1 comment 'test'; +drop table t1; +create table t1 (a int); +alter online table t1 modify a int comment 'test'; +drop table t1; +create table t1 (a int) engine=innodb; +alter online table t1 modify a int comment 'test'; +drop table t1; +create table t1 (a int) partition by hash(a) partitions 2; +alter online table t1 modify a int comment 'test'; +drop table t1; +# +# MDEV-8948 ALTER ... INPLACE does work for BINARY, BLOB +# +CREATE TABLE t1 (a BINARY(10)); +ALTER TABLE t1 MODIFY a BINARY(10), ALGORITHM=INPLACE; +DROP TABLE t1; +CREATE TABLE t1 (a VARBINARY(10)); +ALTER TABLE t1 MODIFY a VARBINARY(10), ALGORITHM=INPLACE; +DROP TABLE t1; +CREATE TABLE t1 (a TINYBLOB); +ALTER TABLE t1 MODIFY a TINYBLOB, ALGORITHM=INPLACE; +DROP TABLE t1; +CREATE TABLE t1 (a MEDIUMBLOB); +ALTER TABLE t1 MODIFY a MEDIUMBLOB, ALGORITHM=INPLACE; +DROP TABLE t1; +CREATE TABLE t1 (a BLOB); +ALTER TABLE t1 MODIFY a BLOB, ALGORITHM=INPLACE; +DROP TABLE t1; +CREATE TABLE t1 (a LONGBLOB); +ALTER TABLE t1 MODIFY a LONGBLOB, ALGORITHM=INPLACE; +DROP TABLE t1; +CREATE TABLE t1 (a CHAR(10)); +ALTER TABLE t1 MODIFY a CHAR(10), ALGORITHM=INPLACE; +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(10)); +ALTER TABLE t1 MODIFY a VARCHAR(10), ALGORITHM=INPLACE; +DROP TABLE t1; +CREATE TABLE t1 (a TINYTEXT); +ALTER TABLE t1 MODIFY a TINYTEXT, ALGORITHM=INPLACE; +DROP TABLE t1; +CREATE TABLE t1 (a MEDIUMTEXT); +ALTER TABLE t1 MODIFY a MEDIUMTEXT, ALGORITHM=INPLACE; +DROP TABLE t1; +CREATE TABLE t1 (a TEXT); +ALTER TABLE t1 MODIFY a TEXT, ALGORITHM=INPLACE; +DROP TABLE t1; +CREATE TABLE t1 (a LONGTEXT); +ALTER TABLE t1 MODIFY a LONGTEXT, ALGORITHM=INPLACE; +DROP TABLE t1; +CREATE TABLE t1 (a CHAR(10)); +ALTER TABLE t1 MODIFY a CHAR(10) COLLATE latin1_bin, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(10)); +ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE latin1_bin, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a TINYTEXT); +ALTER TABLE t1 MODIFY a TINYTEXT COLLATE latin1_bin, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a MEDIUMTEXT); +ALTER TABLE t1 MODIFY a MEDIUMTEXT COLLATE latin1_bin, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a TEXT); +ALTER TABLE t1 MODIFY a TEXT COLLATE latin1_bin, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a LONGTEXT); +ALTER TABLE t1 MODIFY a LONGTEXT COLLATE latin1_bin, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a CHAR(10) COLLATE latin1_bin); +ALTER TABLE t1 MODIFY a CHAR(10) COLLATE latin1_swedish_ci, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(10) COLLATE latin1_bin); +ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE latin1_swedish_ci, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a TINYTEXT COLLATE latin1_bin); +ALTER TABLE t1 MODIFY a TINYTEXT COLLATE latin1_swedish_ci, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a MEDIUMTEXT COLLATE latin1_bin); +ALTER TABLE t1 MODIFY a MEDIUMTEXT COLLATE latin1_swedish_ci, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a TEXT COLLATE latin1_bin); +ALTER TABLE t1 MODIFY a TEXT COLLATE latin1_swedish_ci, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a LONGTEXT COLLATE latin1_bin); +ALTER TABLE t1 MODIFY a LONGTEXT COLLATE latin1_swedish_ci, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a CHAR(10) COLLATE latin1_general_ci); +ALTER TABLE t1 MODIFY a CHAR(10) COLLATE latin1_swedish_ci, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(10) COLLATE latin1_general_ci); +ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE latin1_swedish_ci, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a TINYTEXT COLLATE latin1_general_ci); +ALTER TABLE t1 MODIFY a TINYTEXT COLLATE latin1_swedish_ci, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a MEDIUMTEXT COLLATE latin1_general_ci); +ALTER TABLE t1 MODIFY a MEDIUMTEXT COLLATE latin1_swedish_ci, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a TEXT COLLATE latin1_general_ci); +ALTER TABLE t1 MODIFY a TEXT COLLATE latin1_swedish_ci, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a LONGTEXT COLLATE latin1_general_ci); +ALTER TABLE t1 MODIFY a LONGTEXT COLLATE latin1_swedish_ci, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; diff --git a/mysql-test/r/alter_table_trans.result b/mysql-test/r/alter_table_trans.result index 435f5abd9d0..eaae2039d4c 100644 --- a/mysql-test/r/alter_table_trans.result +++ b/mysql-test/r/alter_table_trans.result @@ -2,7 +2,7 @@ drop table if exists t1,t2; CREATE TABLE t1 (a INT, INDEX(a)) engine=innodb; ALTER TABLE t1 RENAME TO t2, DISABLE KEYS; Warnings: -Note 1031 Table storage engine for 't1' doesn't have this option +Note 1031 Storage engine InnoDB of the table `test`.`t1` doesn't have this option DROP TABLE t2; CREATE TABLE t1 ( col4 text NOT NULL, diff --git a/mysql-test/r/backup.result b/mysql-test/r/backup.result deleted file mode 100644 index 89be20aee70..00000000000 --- a/mysql-test/r/backup.result +++ /dev/null @@ -1,111 +0,0 @@ -set SQL_LOG_BIN=0; -drop table if exists t1, t2, t3, t4; -create table t4(n int); -backup table t4 to '../../bogus'; -Table Op Msg_type Msg_text -test.t4 backup error Failed copying .frm file (errno: X) -test.t4 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead -test.t4 backup Error Can't create/write to file 'MYSQLTEST_VARDIR/bogus/t4.frm' (Errcode: X) -test.t4 backup status Operation failed -backup table t4 to '../../tmp'; -Table Op Msg_type Msg_text -test.t4 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead -test.t4 backup status OK -backup table t4 to '../../tmp'; -Table Op Msg_type Msg_text -test.t4 backup error Failed copying .frm file (errno: X) -test.t4 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead -test.t4 backup Error Can't create/write to file 'MYSQLTEST_VARDIR/tmp/t4.frm' (Errcode: X) -test.t4 backup status Operation failed -drop table t4; -restore table t4 from '../../tmp'; -Table Op Msg_type Msg_text -test.t4 restore Warning 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead -test.t4 restore status OK -select count(*) from t4; -count(*) -0 -create table t1(n int); -insert into t1 values (23),(45),(67); -backup table t1 to '../../tmp'; -Table Op Msg_type Msg_text -test.t1 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead -test.t1 backup status OK -drop table t1; -restore table t1 from '../../bogus'; -Table Op Msg_type Msg_text -t1 restore error Failed copying .frm file -Warnings: -Warning 1287 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead -Error 29 File 'MYSQLTEST_VARDIR/bogus/t1.frm' not found (Errcode: X) -restore table t1 from '../../tmp'; -Table Op Msg_type Msg_text -test.t1 restore Warning 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead -test.t1 restore status OK -select n from t1; -n -23 -45 -67 -create table t2(m int not null primary key); -create table t3(k int not null primary key); -insert into t2 values (123),(145),(167); -insert into t3 values (223),(245),(267); -backup table t2,t3 to '../../tmp'; -Table Op Msg_type Msg_text -test.t2 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead -test.t2 backup status OK -test.t3 backup status OK -drop table t1,t2,t3; -restore table t1,t2,t3 from '../../tmp'; -Table Op Msg_type Msg_text -test.t1 restore Warning 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead -test.t1 restore status OK -test.t2 restore status OK -test.t3 restore status OK -select n from t1; -n -23 -45 -67 -select m from t2; -m -123 -145 -167 -select k from t3; -k -223 -245 -267 -drop table t1,t2,t3,t4; -restore table t1 from '../../tmp'; -Table Op Msg_type Msg_text -test.t1 restore Warning 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead -test.t1 restore status OK -rename table t1 to t5; -lock tables t5 write; -backup table t5 to '../../tmp'; -unlock tables; -Table Op Msg_type Msg_text -test.t5 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead -test.t5 backup status OK -drop table t5; -DROP TABLE IF EXISTS `t+1`; -CREATE TABLE `t+1` (c1 INT); -INSERT INTO `t+1` VALUES (1), (2), (3); -BACKUP TABLE `t+1` TO '../../tmp'; -Table Op Msg_type Msg_text -test.t+1 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead -test.t+1 backup status OK -DROP TABLE `t+1`; -RESTORE TABLE `t+1` FROM '../../tmp'; -Table Op Msg_type Msg_text -test.t+1 restore Warning 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead -test.t+1 restore status OK -SELECT * FROM `t+1`; -c1 -1 -2 -3 -DROP TABLE `t+1`; diff --git a/mysql-test/r/binlog_tx_isolation.result b/mysql-test/r/binlog_tx_isolation.result deleted file mode 100644 index 39aba22758d..00000000000 --- a/mysql-test/r/binlog_tx_isolation.result +++ /dev/null @@ -1,48 +0,0 @@ -CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=INNODB; -INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6); -SET BINLOG_FORMAT=STATEMENT; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; -ERROR HY000: Transaction isolation level 'READ-COMMITTED' is not safe for 'STATEMENT' binlog mode -UPDATE t1 SET b = a*a WHERE a > 1; -COMMIT; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -UPDATE t1 SET b = a*a WHERE a > 1; -COMMIT; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; -UPDATE t1 SET b = a*a WHERE a > 1; -COMMIT; -SET BINLOG_FORMAT=MIXED; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; -ERROR HY000: Transaction isolation level 'READ-COMMITTED' is not safe for 'MIXED' binlog mode -UPDATE t1 SET b = a*a*a WHERE a > 2; -COMMIT; -SET BINLOG_FORMAT=ROW; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; -UPDATE t1 SET b = a*a*a*a WHERE a > 3; -COMMIT; -SELECT @@session.tx_isolation, @@session.binlog_format; -@@session.tx_isolation READ-COMMITTED -@@session.binlog_format ROW -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; -SET BINLOG_FORMAT=MIXED; -ERROR HY000: Transaction isolation level 'READ-COMMITTED' prevents leaving 'ROW' binlog mode -UPDATE t1 SET b = a*a*a*a WHERE a > 3; -COMMIT; -SELECT @@session.tx_isolation, @@session.binlog_format; -@@session.tx_isolation READ-COMMITTED -@@session.binlog_format ROW -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; -SET BINLOG_FORMAT=STATEMENT; -ERROR HY000: Transaction isolation level 'READ-COMMITTED' prevents leaving 'ROW' binlog mode -UPDATE t1 SET b = a*a*a*a WHERE a > 3; -COMMIT; -SELECT @@session.tx_isolation, @@session.binlog_format; -@@session.tx_isolation READ-COMMITTED -@@session.binlog_format ROW diff --git a/mysql-test/r/blackhole.result b/mysql-test/r/blackhole.result index 1e8ea3888d1..36f5459ff85 100644 --- a/mysql-test/r/blackhole.result +++ b/mysql-test/r/blackhole.result @@ -16,3 +16,11 @@ a unlock tables; drop temporary table t1; End of 5.5 tests +# +# Bug#13948247 DIVISION BY 0 IN GET_BEST_DISJUNCT_QUICK WITH FORCE INDEX GROUP BY +# +CREATE TABLE t1(a INT, b INT, c INT, KEY(c), UNIQUE(a)) ENGINE = BLACKHOLE; +SELECT 0 FROM t1 FORCE INDEX FOR GROUP BY(a) WHERE a = 0 OR b = 0 AND c = 0; +0 +DROP TABLE t1; +End of 5.6 tests diff --git a/mysql-test/r/blackhole_plugin.result b/mysql-test/r/blackhole_plugin.result index 4ef9fa0fa47..dd1b95ab0d9 100644 --- a/mysql-test/r/blackhole_plugin.result +++ b/mysql-test/r/blackhole_plugin.result @@ -5,7 +5,7 @@ Warning 1266 Using storage engine MyISAM for table 't1' DROP TABLE t1; INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so'; INSTALL PLUGIN BLACKHOLE SONAME 'ha_blackhole.so'; -ERROR HY000: Function 'BLACKHOLE' already exists +ERROR HY000: Plugin 'BLACKHOLE' already installed UNINSTALL PLUGIN blackhole; INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so'; CREATE TABLE t1(a int) ENGINE=BLACKHOLE; diff --git a/mysql-test/r/bootstrap.result b/mysql-test/r/bootstrap.result index 8bef6f90ab4..bb80cf28b56 100644 --- a/mysql-test/r/bootstrap.result +++ b/mysql-test/r/bootstrap.result @@ -1,7 +1,7 @@ drop table if exists t1; drop table t1; drop table t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' set @my_max_allowed_packet= @@max_allowed_packet; set global max_allowed_packet=100*@@max_allowed_packet; set global max_allowed_packet=@my_max_allowed_packet; @@ -11,10 +11,18 @@ End of 5.1 tests # Bug #11766306: 59393: HAVE_INNODB=YES WHEN MYSQLD # STARTED WITH --SKIP-INNODB # -SHOW VARIABLES LIKE 'have_innodb'; -Variable_name Value -have_innodb DISABLED SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb' and SUPPORT='YES'; End of 5.5 tests +flush tables; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +select * from mysql.plugin; +name dl +EXAMPLE ha_example.so +truncate table mysql.plugin; diff --git a/mysql-test/r/bug46261.result b/mysql-test/r/bug46261.result deleted file mode 100644 index dcc950d1baf..00000000000 --- a/mysql-test/r/bug46261.result +++ /dev/null @@ -1,8 +0,0 @@ -# -# Bug#46261 Plugins can be installed with --skip-grant-tables -# -INSTALL PLUGIN example SONAME 'ha_example.so'; -ERROR HY000: The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement -UNINSTALL PLUGIN example; -ERROR HY000: The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement -End of 5.1 tests diff --git a/mysql-test/r/bug58669.result b/mysql-test/r/bug58669.result index 03032e27e94..c9bd43e244b 100644 --- a/mysql-test/r/bug58669.result +++ b/mysql-test/r/bug58669.result @@ -8,7 +8,7 @@ CREATE TABLE db1.t1(a INT); SELECT CURRENT_USER(); CURRENT_USER() user1@localhost -SHOW VARIABLES LIKE "%read_only%"; +SHOW VARIABLES LIKE "read_only%"; Variable_name Value read_only ON INSERT INTO db1.t1 VALUES (1); diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index e50beb54014..c81af134add 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -1,3 +1,4 @@ +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); select CAST(1-2 AS UNSIGNED); CAST(1-2 AS UNSIGNED) 18446744073709551615 @@ -62,7 +63,7 @@ cast(12.444 as double) 12.444 select cast(cast("20:01:01" as time) as datetime); cast(cast("20:01:01" as time) as datetime) -0000-00-00 20:01:01 +2001-02-03 20:01:01 select cast(cast("8:46:06.23434" AS time) as decimal(32,10)); cast(cast("8:46:06.23434" AS time) as decimal(32,10)) 84606.0000000000 @@ -180,24 +181,24 @@ select 10.0+'10'; select 10E+0+'10'; 10E+0+'10' 20 -select CONVERT(DATE "2004-01-22 21:45:33" USING latin1); -CONVERT(DATE "2004-01-22 21:45:33" USING latin1) +select CONVERT(TIMESTAMP "2004-01-22 21:45:33" USING latin1); +CONVERT(TIMESTAMP "2004-01-22 21:45:33" USING latin1) 2004-01-22 21:45:33 -select CONVERT(DATE "2004-01-22 21:45:33",CHAR); -CONVERT(DATE "2004-01-22 21:45:33",CHAR) +select CONVERT(TIMESTAMP "2004-01-22 21:45:33",CHAR); +CONVERT(TIMESTAMP "2004-01-22 21:45:33",CHAR) 2004-01-22 21:45:33 -select CONVERT(DATE "2004-01-22 21:45:33",CHAR(4)); -CONVERT(DATE "2004-01-22 21:45:33",CHAR(4)) +select CONVERT(TIMESTAMP "2004-01-22 21:45:33",CHAR(4)); +CONVERT(TIMESTAMP "2004-01-22 21:45:33",CHAR(4)) 2004 Warnings: Warning 1292 Truncated incorrect CHAR(4) value: '2004-01-22 21:45:33' -select CONVERT(DATE "2004-01-22 21:45:33",BINARY(4)); -CONVERT(DATE "2004-01-22 21:45:33",BINARY(4)) +select CONVERT(TIMESTAMP "2004-01-22 21:45:33",BINARY(4)); +CONVERT(TIMESTAMP "2004-01-22 21:45:33",BINARY(4)) 2004 Warnings: Warning 1292 Truncated incorrect BINARY(4) value: '2004-01-22 21:45:33' -select CAST(DATE "2004-01-22 21:45:33" AS BINARY(4)); -CAST(DATE "2004-01-22 21:45:33" AS BINARY(4)) +select CAST(TIMESTAMP "2004-01-22 21:45:33" AS BINARY(4)); +CAST(TIMESTAMP "2004-01-22 21:45:33" AS BINARY(4)) 2004 Warnings: Warning 1292 Truncated incorrect BINARY(4) value: '2004-01-22 21:45:33' @@ -764,17 +765,21 @@ cast(cast("2101-00-01 02:03:04" as datetime) as time) 02:03:04 SELECT CAST(CAST('20:05:05' AS TIME) as date); CAST(CAST('20:05:05' AS TIME) as date) -0000-00-00 +2001-02-03 set sql_mode= TRADITIONAL; select cast("2101-00-01 02:03:04" as datetime); cast("2101-00-01 02:03:04" as datetime) -2101-00-01 02:03:04 +NULL +Warnings: +Warning 1292 Incorrect datetime value: '2101-00-01 02:03:04' select cast(cast("2101-00-01 02:03:04" as datetime) as time); cast(cast("2101-00-01 02:03:04" as datetime) as time) -02:03:04 +NULL +Warnings: +Warning 1292 Incorrect datetime value: '2101-00-01 02:03:04' SELECT CAST(CAST('20:05:05' AS TIME) as date); CAST(CAST('20:05:05' AS TIME) as date) -0000-00-00 +2001-02-03 set sql_mode=DEFAULT; create table t1 (f1 time, f2 date, f3 datetime); insert into t1 values ('11:22:33','2011-12-13','2011-12-13 11:22:33'); @@ -784,9 +789,7 @@ cast(f1 as unsigned) cast(f2 as unsigned) cast(f3 as unsigned) drop table t1; SELECT CAST(TIME('10:20:30') AS DATE) + INTERVAL 1 DAY; CAST(TIME('10:20:30') AS DATE) + INTERVAL 1 DAY -NULL -Warnings: -Warning 1292 Incorrect datetime value: '0000-00-00' +2001-02-04 SET SQL_MODE=ALLOW_INVALID_DATES; SELECT DATE("foo"); DATE("foo") diff --git a/mysql-test/r/change_user_notembedded.result b/mysql-test/r/change_user_notembedded.result index 60579d15ec2..896a6045481 100644 --- a/mysql-test/r/change_user_notembedded.result +++ b/mysql-test/r/change_user_notembedded.result @@ -3,3 +3,4 @@ ERROR 28000: Access denied for user 'foo'@'localhost' (using password: NO) ERROR 28000: Access denied for user 'foo'@'localhost' (using password: YES) ERROR 08S01: Unknown command ERROR 08S01: Unknown command +that's all diff --git a/mysql-test/r/check.result b/mysql-test/r/check.result index ac9c7bca9d7..715fe032b53 100644 --- a/mysql-test/r/check.result +++ b/mysql-test/r/check.result @@ -1,6 +1,10 @@ drop table if exists t1,t2; drop view if exists v1; create table t1(n int not null, key(n), key(n), key(n), key(n)); +Warnings: +Note 1831 Duplicate index `n_2`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `n_3`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `n_4`. This is deprecated and will be disallowed in a future release. check table t1 extended; insert into t1 values (200000); Table Op Msg_type Msg_text diff --git a/mysql-test/r/comment_column.result b/mysql-test/r/comment_column.result index 6ddd9eaf3de..552a83da472 100644 --- a/mysql-test/r/comment_column.result +++ b/mysql-test/r/comment_column.result @@ -408,4 +408,7 @@ Warning 1688 Comment for index 'i1' is too long (max = 1024) CREATE INDEX i2 ON t1_toupg(c2) COMMENT '01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234'; Warnings: Warning 1688 Comment for index 'i2' is too long (max = 1024) +ALTER TABLE t1_toupg drop column c1, drop column c2, drop column c3, add column c4 int, COMMENT='012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012301234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234'; +Warnings: +Warning 1628 Comment for table 't1_toupg' is too long (max = 2048) drop table t1_toupg; diff --git a/mysql-test/r/comments.result b/mysql-test/r/comments.result index 3a752221780..c13eb510326 100644 --- a/mysql-test/r/comments.result +++ b/mysql-test/r/comments.result @@ -10,7 +10,7 @@ ERROR 42000: Query was empty select 1 /*!32301 +1 */; 1 +1 2 -select 1 /*!52301 +1 */; +select 1 /*!952301 +1 */; 1 1 select 1--1; @@ -36,13 +36,59 @@ select 1 /*M!50300 +1 */; 1 +1 2 select 2 /*M!99999 +1 */; -2 -2 +2 +1 +3 select 2 /*M!100000 +1 */; +2 +1 +3 +select 2 /*M!999999 +1 */; 2 2 select 2 /*M!0000 +1 */; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '0000 +1 */' at line 1 +# +# Testing that MySQL versions >= 5.7.x and < 10.0.0 are ignored (MDEV-5009) +# +SELECT 1 /*!50699 +1*/; +1 +1 +2 +SELECT 1 /*!50700 +1*/; +1 +1 +SELECT 1 /*!50999 +1*/; +1 +1 +SELECT 1 /*!99999 +1*/; +1 +1 +SELECT 1 /*!100000 +1*/; +1 +1 +2 +SELECT 1 /*!110000 +1*/; +1 +1 +# +# Tesing that versions >= 5.7.x and < 10.0.0 are not ignored +# when used with the MariaDB executable comment syntax. +# +SELECT 1 /*M!50699 +1*/; +1 +1 +2 +SELECT 1 /*M!50700 +1*/; +1 +1 +2 +SELECT 1 /*M!50999 +1*/; +1 +1 +2 +SELECT 1 /*M!99999 +1*/; +1 +1 +2 +SELECT 1 /*M!100000 +1*/; +1 +1 +2 +SELECT 1 /*M!110000 +1*/; +1 +1 select 1/*!2*/; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '2*/' at line 1 select 1/*!0000002*/; @@ -50,7 +96,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp select 1/*!999992*/; 1 1 -select 1 + /*!00000 2 */ + 3 /*!99999 noise*/ + 4; +select 1 + /*!00000 2 */ + 3 /*!999999 noise*/ + 4; 1 + 2 + 3 + 4 10 drop table if exists table_28779; @@ -63,8 +109,8 @@ prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*! AND 2=2;"; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*! AND 2=2;*"; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '*' at line 1 -prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!98765' AND b = 'bar';"; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '/*!98765' AND b = 'bar'' at line 1 -prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!98765' AND b = 'bar';*"; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '/*!98765' AND b = 'bar';*' at line 1 +prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!998765' AND b = 'bar';"; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '/*!998765' AND b = 'bar'' at line 1 +prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!998765' AND b = 'bar';*"; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '/*!998765' AND b = 'bar';*' at line 1 drop table table_28779; diff --git a/mysql-test/r/commit.result b/mysql-test/r/commit.result index 8620d2077c6..a62d2940d85 100644 --- a/mysql-test/r/commit.result +++ b/mysql-test/r/commit.result @@ -12,7 +12,7 @@ INSERT INTO t1 VALUES (1),(2); COMMIT; START TRANSACTION; SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; -ERROR 25001: Transaction isolation level can't be changed while a transaction is in progress +ERROR 25001: Transaction characteristics can't be changed while a transaction is in progress COMMIT; SET @@autocommit=0; COMMIT; @@ -264,9 +264,313 @@ Should only read the '1000' as this transaction is now in REP READ COMMIT AND NO CHAIN; SET @@completion_type=0; COMMIT AND NO CHAIN; -SET @autocommit=1; +SET @@autocommit=1; COMMIT; DROP TABLE t1; # # End of test cases for Bug#20837 # +# +# WL#5968 Implement START TRANSACTION READ (WRITE|ONLY); +# +# +# Test 1: Check supported syntax +START TRANSACTION; +COMMIT; +START TRANSACTION READ ONLY; +COMMIT; +START TRANSACTION READ WRITE; +COMMIT; +START TRANSACTION READ ONLY, READ WRITE; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 +START TRANSACTION READ ONLY, WITH CONSISTENT SNAPSHOT; +COMMIT; +START TRANSACTION READ WRITE, WITH CONSISTENT SNAPSHOT; +COMMIT; +START TRANSACTION WITH CONSISTENT SNAPSHOT, READ ONLY; +COMMIT; +START TRANSACTION WITH CONSISTENT SNAPSHOT, READ WRITE; +COMMIT; +START TRANSACTION READ ONLY, WITH CONSISTENT SNAPSHOT, READ WRITE; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 +SET TRANSACTION READ ONLY; +SET TRANSACTION READ WRITE; +SET TRANSACTION ISOLATION LEVEL SERIALIZABLE, READ ONLY; +SET TRANSACTION ISOLATION LEVEL SERIALIZABLE, READ WRITE; +SET TRANSACTION READ ONLY, ISOLATION LEVEL READ COMMITTED; +SET TRANSACTION READ WRITE, ISOLATION LEVEL READ COMMITTED; +SET TRANSACTION READ ONLY, READ WRITE; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'READ WRITE' at line 1 +COMMIT; +# +# Test 2: Check setting of variable. +SET SESSION TRANSACTION READ WRITE; +SELECT @@tx_read_only; +@@tx_read_only +0 +SET SESSION TRANSACTION READ ONLY; +SELECT @@tx_read_only; +@@tx_read_only +1 +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE; +SELECT @@tx_read_only; +@@tx_read_only +0 +SET SESSION TRANSACTION READ ONLY, ISOLATION LEVEL REPEATABLE READ; +SELECT @@tx_read_only; +@@tx_read_only +1 +START TRANSACTION; +# Not allowed inside a transaction +SET TRANSACTION READ ONLY; +ERROR 25001: Transaction characteristics can't be changed while a transaction is in progress +# But these are allowed. +SET SESSION TRANSACTION READ ONLY; +SET GLOBAL TRANSACTION READ ONLY; +COMMIT; +SET SESSION TRANSACTION READ WRITE; +SET GLOBAL TRANSACTION READ WRITE; +# +# Test 3: Test that write operations are properly blocked. +CREATE TABLE t1(a INT); +CREATE TEMPORARY TABLE temp_t2(a INT); +SET SESSION TRANSACTION READ ONLY; +# 1: DDL should be blocked, also on temporary tables. +CREATE TABLE t3(a INT); +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +ALTER TABLE t1 COMMENT "Test"; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +DROP TABLE t1; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +CREATE TEMPORARY TABLE temp_t3(a INT); +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +ALTER TABLE temp_t2 COMMENT "Test"; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +DROP TEMPORARY TABLE temp_t2; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +CREATE FUNCTION f1() RETURNS INT RETURN 1; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +DROP FUNCTION f1; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +CREATE PROCEDURE p1() BEGIN END; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +DROP PROCEDURE p1; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +CREATE VIEW v1 AS SELECT 1; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +SET SESSION TRANSACTION READ WRITE; +CREATE VIEW v1 AS SELECT 1; +SET SESSION TRANSACTION READ ONLY; +DROP VIEW v1; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +SET SESSION TRANSACTION READ WRITE; +DROP VIEW v1; +SET SESSION TRANSACTION READ ONLY; +RENAME TABLE t1 TO t2; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +RENAME TABLE temp_t2 TO temp_t3; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +TRUNCATE TABLE t1; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +CREATE DATABASE db1; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +DROP DATABASE db1; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +SET SESSION TRANSACTION READ WRITE; +# 2: DML should be blocked on non-temporary tables. +START TRANSACTION READ ONLY; +INSERT INTO t1 VALUES (1), (2); +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +UPDATE t1 SET a= 3; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +DELETE FROM t1; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +# 3: DML should be allowed on temporary tables. +INSERT INTO temp_t2 VALUES (1), (2); +UPDATE temp_t2 SET a= 3; +DELETE FROM temp_t2; +# 4: Queries should not be blocked. +SELECT * FROM t1; +a +SELECT * FROM temp_t2; +a +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +a +HANDLER t1 CLOSE; +HANDLER temp_t2 OPEN; +HANDLER temp_t2 READ FIRST; +a +HANDLER temp_t2 CLOSE; +# 5: Prepared statements +PREPARE stmt FROM "DELETE FROM t1"; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +PREPARE stmt FROM "DELETE FROM temp_t2"; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; +COMMIT; +# 6: Stored routines +CREATE FUNCTION f1() RETURNS INT +BEGIN +DELETE FROM t1; +RETURN 1; +END| +CREATE FUNCTION f2() RETURNS INT +BEGIN +DELETE FROM temp_t2; +RETURN 1; +END| +CREATE PROCEDURE p1() DELETE FROM t1; +CREATE PROCEDURE p2() DELETE FROM temp_t2; +START TRANSACTION READ ONLY; +SELECT f1(); +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +SELECT f2(); +f2() +1 +CALL p1(); +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +CALL p2(); +COMMIT; +DROP FUNCTION f1; +DROP FUNCTION f2; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +# 7: Views +CREATE VIEW v1 AS SELECT a FROM t1; +START TRANSACTION READ ONLY; +INSERT INTO v1 VALUES (1), (2); +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +SELECT * FROM v1; +a +COMMIT; +DROP VIEW v1; +# 8: LOCK TABLE +SET SESSION TRANSACTION READ ONLY; +LOCK TABLE t1 WRITE; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +LOCK TABLE t1 READ; +UNLOCK TABLES; +SET SESSION TRANSACTION READ WRITE; +DROP TABLE temp_t2, t1; +# +# Test 4: SET TRANSACTION, CHAINing transactions +CREATE TABLE t1(a INT); +SET SESSION TRANSACTION READ ONLY; +START TRANSACTION; +DELETE FROM t1; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +COMMIT; +START TRANSACTION READ WRITE; +DELETE FROM t1; +COMMIT; +SET SESSION TRANSACTION READ WRITE; +SET TRANSACTION READ ONLY; +START TRANSACTION; +DELETE FROM t1; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +COMMIT; +START TRANSACTION READ WRITE; +DELETE FROM t1; +COMMIT; +START TRANSACTION READ ONLY; +SELECT * FROM t1; +a +COMMIT AND CHAIN; +DELETE FROM t1; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +COMMIT; +START TRANSACTION READ ONLY; +SELECT * FROM t1; +a +ROLLBACK AND CHAIN; +DELETE FROM t1; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +COMMIT; +DROP TABLE t1; +# +# Test 5: Test that reserved keyword ONLY is still allowed as +# identifier - both directly and in SPs. +SET @only= 1; +CREATE TABLE t1 (only INT); +INSERT INTO t1 (only) values (1); +SELECT only FROM t1 WHERE only = 1; +only +1 +DROP TABLE t1; +CREATE PROCEDURE p1() +BEGIN +DECLARE only INT DEFAULT 1; +END| +CALL p1(); +DROP PROCEDURE p1; +# +# Test 6: Check that XA transactions obey default access mode. +CREATE TABLE t1(a INT); +SET TRANSACTION READ ONLY; +XA START 'test1'; +INSERT INTO t1 VALUES (1); +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +UPDATE t1 SET a=2; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +DELETE FROM t1; +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +XA END 'test1'; +XA PREPARE 'test1'; +XA COMMIT 'test1'; +DROP TABLE t1; +# +# Test 7: SET TRANSACTION inside stored routines +CREATE PROCEDURE p1() SET SESSION TRANSACTION READ ONLY; +CALL p1(); +SELECT @@tx_read_only; +@@tx_read_only +1 +SET SESSION TRANSACTION READ WRITE; +DROP PROCEDURE p1; +CREATE PROCEDURE p1() SET SESSION TRANSACTION READ ONLY, +ISOLATION LEVEL SERIALIZABLE; +CALL p1(); +SELECT @@tx_read_only; +@@tx_read_only +1 +SET SESSION TRANSACTION READ WRITE, ISOLATION LEVEL REPEATABLE READ; +DROP PROCEDURE p1; +CREATE FUNCTION f1() RETURNS INT +BEGIN +SET SESSION TRANSACTION READ ONLY; +RETURN 1; +END| +SELECT f1(); +f1() +1 +SELECT @@tx_read_only; +@@tx_read_only +1 +SET SESSION TRANSACTION READ WRITE; +DROP FUNCTION f1; +CREATE FUNCTION f1() RETURNS INT +BEGIN +SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE, READ ONLY; +RETURN 1; +END| +SELECT f1(); +f1() +1 +SELECT @@tx_read_only; +@@tx_read_only +1 +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE; +DROP FUNCTION f1; +# +# Test 8: SET TRANSACTION and auto-commit +SELECT @@autocommit; +@@autocommit +1 +CREATE TABLE t1(a INT) engine=InnoDB; +SET TRANSACTION READ ONLY; +SELECT * FROM t1; +a +# This statement should work, since last statement committed. +INSERT INTO t1 VALUES (1); +DROP TABLE t1; diff --git a/mysql-test/r/commit_1innodb.result b/mysql-test/r/commit_1innodb.result index af198edc4ca..1e173221b15 100644 --- a/mysql-test/r/commit_1innodb.result +++ b/mysql-test/r/commit_1innodb.result @@ -1,6 +1,6 @@ call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); set sql_mode=no_engine_substitution; -set storage_engine = InnoDB; +set default_storage_engine = InnoDB; set autocommit=1; drop table if exists t1; drop table if exists t2; @@ -830,7 +830,7 @@ create table if not exists t2 (a int) select 6 union select 7; Warnings: Note 1050 Table 't2' already exists # Sic: first commits the statement, and then the transaction. -call p_verify_status_increment(2, 0, 2, 0); +call p_verify_status_increment(0, 0, 0, 0); SUCCESS create table t3 select a from t2; @@ -842,7 +842,7 @@ call p_verify_status_increment(2, 0, 2, 0); SUCCESS alter table t3 rename t4; -call p_verify_status_increment(2, 0, 2, 0); +call p_verify_status_increment(0, 0, 0, 0); SUCCESS rename table t4 to t3; diff --git a/mysql-test/r/compress.result b/mysql-test/r/compress.result index ff99f1da32f..83b50351ba9 100644 --- a/mysql-test/r/compress.result +++ b/mysql-test/r/compress.result @@ -514,7 +514,7 @@ insert into tmp select * from t3; insert into t3 select * from tmp; alter table t3 add t2nr int not null auto_increment primary key first; drop table tmp; -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10; namn Abraham Abraham @@ -527,7 +527,7 @@ ammonium ammonium analyzable analyzable animals animals animized animized -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10; concat(fld3," ",fld3) Abraham Abraham @@ -564,7 +564,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10; fld3 count(*) affixed 1 @@ -577,7 +577,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10; fld3 repeat("a",length(fld3)) count(*) circus aaaaaa 1 diff --git a/mysql-test/r/connect.result b/mysql-test/r/connect.result index 09eaf9855b0..32c7bdfcf12 100644 --- a/mysql-test/r/connect.result +++ b/mysql-test/r/connect.result @@ -1,23 +1,29 @@ drop table if exists t1,t2; show tables; Tables_in_mysql +column_stats columns_priv db event func general_log +gtid_slave_pos help_category help_keyword help_relation help_topic host -ndb_binlog_index +index_stats +innodb_index_stats +innodb_table_stats plugin proc procs_priv proxies_priv +roles_mapping servers slow_log +table_stats tables_priv time_zone time_zone_leap_second @@ -35,23 +41,29 @@ grant ALL on *.* to test@localhost identified by "gambling"; grant ALL on *.* to test@127.0.0.1 identified by "gambling"; show tables; Tables_in_mysql +column_stats columns_priv db event func general_log +gtid_slave_pos help_category help_keyword help_relation help_topic host -ndb_binlog_index +index_stats +innodb_index_stats +innodb_table_stats plugin proc procs_priv proxies_priv +roles_mapping servers slow_log +table_stats tables_priv time_zone time_zone_leap_second @@ -77,23 +89,29 @@ ERROR HY000: Password hash should be a 41-digit hexadecimal number set password=old_password('gambling3'); show tables; Tables_in_mysql +column_stats columns_priv db event func general_log +gtid_slave_pos help_category help_keyword help_relation help_topic host -ndb_binlog_index +index_stats +innodb_index_stats +innodb_table_stats plugin proc procs_priv proxies_priv +roles_mapping servers slow_log +table_stats tables_priv time_zone time_zone_leap_second @@ -229,9 +247,9 @@ Connection on extra port 2 ok # -- Bug#49752: 2469.126.2 unintentionally breaks authentication # against MySQL 5.1 server # -GRANT ALL ON test.* TO 'Azundris12345678'@'localhost' IDENTIFIED BY 'test123'; +GRANT ALL ON test.* TO 'O1234567890123456789012345678901234567890123456789012345678901234567890123456789'@'localhost' IDENTIFIED BY 'test123'; FLUSH PRIVILEGES; -DROP USER 'Azundris12345678'@'localhost'; +DROP USER 'O1234567890123456789012345678901234567890123456789012345678901234567890123456789'@'localhost'; FLUSH PRIVILEGES; # # -- End of Bug#49752 @@ -255,6 +273,20 @@ connect(localhost,mysqltest_nouser,newpw,test,MASTER_PORT,MASTER_SOCKET); ERROR 28000: Access denied for user 'mysqltest_nouser'@'localhost' (using password: YES) connect(localhost,mysqltest_nouser,,test,MASTER_PORT,MASTER_SOCKET); ERROR 28000: Access denied for user 'mysqltest_nouser'@'localhost' (using password: NO) +update mysql.user set password=authentication_string, authentication_string='' + where user like 'mysqltest_up_'; +select user, password, plugin, authentication_string from mysql.user +where user like 'mysqltest_up_'; +user password plugin authentication_string +mysqltest_up1 *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB mysql_native_password +mysqltest_up2 09301740536db389 mysql_old_password +flush privileges; +select user(), current_user(); +user() current_user() +mysqltest_up1@localhost mysqltest_up1@% +select user(), current_user(); +user() current_user() +mysqltest_up2@localhost mysqltest_up2@% DROP USER mysqltest_up1@'%'; DROP USER mysqltest_up2@'%'; # diff --git a/mysql-test/r/constraints.result b/mysql-test/r/constraints.result index 3821a18b072..891f12915cb 100644 --- a/mysql-test/r/constraints.result +++ b/mysql-test/r/constraints.result @@ -17,7 +17,11 @@ drop table t1; create table t1 (a int null); alter table t1 add constraint constraint_1 unique (a); alter table t1 add constraint unique key_1(a); +Warnings: +Note 1831 Duplicate index `key_1`. This is deprecated and will be disallowed in a future release. alter table t1 add constraint constraint_2 unique key_2(a); +Warnings: +Note 1831 Duplicate index `key_2`. This is deprecated and will be disallowed in a future release. show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/r/contributors.result b/mysql-test/r/contributors.result index 19fdd96b4fb..5d92184f191 100644 --- a/mysql-test/r/contributors.result +++ b/mysql-test/r/contributors.result @@ -1,7 +1,21 @@ SHOW CONTRIBUTORS; Name Location Comment +Booking.com https://www.booking.com Founding member, Platinum Sponsor of the MariaDB Foundation +Alibaba Cloud https://intl.aliyun.com Platinum Sponsor of the MariaDB Foundation +Tencent Cloud https://cloud.tencent.com Platinum Sponsor of the MariaDB Foundation +MariaDB Corporation https://mariadb.com Founding member, Gold Sponsor of the MariaDB Foundation +Visma https://visma.com Gold Sponsor of the MariaDB Foundation +DBS https://dbs.com Gold Sponsor of the MariaDB Foundation +IBM https://www.ibm.com Gold Sponsor of the MariaDB Foundation +Nexedi https://www.nexedi.com Silver Sponsor of the MariaDB Foundation +Acronis http://www.acronis.com Silver Sponsor of the MariaDB Foundation +Auttomattic https://automattic.com Bronze Sponsor of the MariaDB Foundation +Verkkokauppa.com https://www.verkkokauppa.com Bronze Sponsor of the MariaDB Foundation +Virtuozzo https://virtuozzo.com Bronze Sponsor of the MariaDB Foundation +Tencent Game DBA http://tencentdba.com/about Bronze Sponsor of the MariaDB Foundation +Tencent TDSQL http://tdsql.org Bronze Sponsor of the MariaDB Foundation +Google USA Sponsoring encryption, parallel replication and GTID +Facebook USA Sponsoring non-blocking API, LIMIT ROWS EXAMINED etc Ronald Bradford Brisbane, Australia EFF contribution for UC2006 Auction Sheeri Kritzer Boston, Mass. USA EFF contribution for UC2006 Auction Mark Shuttleworth London, UK. EFF contribution for UC2006 Auction -Warnings: -Warning 1681 'SHOW CONTRIBUTORS' is deprecated and will be removed in a future release. diff --git a/mysql-test/r/create-big.result b/mysql-test/r/create-big.result index 4cce5d8618c..5aa44c2941d 100644 --- a/mysql-test/r/create-big.result +++ b/mysql-test/r/create-big.result @@ -161,7 +161,9 @@ create table t1 (i int); set @a:=0; set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go'; create table if not exists t1 select 1 as i;; -create trigger t1_bi before insert on t1 for each row set @a:=1; +set debug_sync='now WAIT_FOR parked'; +create trigger t1_bi before insert on t1 for each row set @a:=1;; +set debug_sync='now SIGNAL go'; Warnings: Note 1050 Table 't1' already exists select @a; @@ -186,13 +188,16 @@ t2 CREATE TABLE `t2` ( `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2; -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; insert into t1 values (1) master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t2 like t1 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ create table t1 (i int); set debug_sync='create_table_like_before_binlog SIGNAL parked WAIT_FOR go'; @@ -214,15 +219,22 @@ drop table t1;; set debug_sync='now SIGNAL go'; drop table t2; set debug_sync='RESET'; -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t2 like t1 -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; insert into t2 values (1) master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t2 like t1 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t2 like t1 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 829b54dea49..a664801a310 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("table or database name 't-1'"); drop table if exists t1,t2,t3,t4,t5; drop database if exists mysqltest; drop view if exists v1; @@ -28,15 +29,15 @@ create table t2 select auto+1 from t1; ERROR 42S02: Table 'test.t1' doesn't exist drop table if exists t1,t2; Warnings: -Note 1051 Unknown table 't1' -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t1' +Note 1051 Unknown table 'test.t2' create table t1 (b char(0) not null, index(b)); -ERROR 42000: The used storage engine can't index column 'b' +ERROR 42000: The storage engine MyISAM can't index column `b` create table t1 (a int not null,b text) engine=heap; -ERROR 42000: The used table type doesn't support BLOB/TEXT columns +ERROR 42000: Storage engine MEMORY doesn't support BLOB/TEXT columns drop table if exists t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap; ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key create table not_existing_database.test (a int); @@ -55,9 +56,9 @@ ERROR 42000: Incorrect table name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa create table a (`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` int); ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long create table t1 (a datetime default now()); -ERROR 42000: Invalid default value for 'a' +drop table t1; create table t1 (a datetime on update now()); -ERROR HY000: Invalid ON UPDATE clause for 'a' column +drop table t1; create table t1 (a int default 100 auto_increment); ERROR 42000: Invalid default value for 'a' create table t1 (a tinyint default 1000); @@ -157,17 +158,17 @@ create table t2 (a int, a float) select * from t1; ERROR 42S21: Duplicate column name 'a' drop table if exists t2; Warnings: -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t2' create table t2 (a int) select a as b, a+1 as b from t1; ERROR 42S21: Duplicate column name 'b' drop table if exists t2; Warnings: -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t2' create table t2 (b int) select a as b, a+1 as b from t1; ERROR 42S21: Duplicate column name 'b' drop table if exists t1,t2; Warnings: -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t2' CREATE TABLE t1 (a int not null); INSERT INTO t1 values (1),(2),(1); CREATE TABLE t2 (primary key(a)) SELECT * FROM t1; @@ -177,8 +178,39 @@ ERROR 42S02: Table 'test.t2' doesn't exist DROP TABLE t1; DROP TABLE IF EXISTS t2; Warnings: -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t2' create table t1 (a int not null, b int, primary key(a), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b)); +Warnings: +Note 1831 Duplicate index `b_2`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_3`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_4`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_5`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_6`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_7`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_8`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_9`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_10`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_11`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_12`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_13`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_14`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_15`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_16`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_17`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_18`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_19`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_20`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_21`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_22`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_23`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_24`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_25`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_26`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_27`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_28`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_29`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_30`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_31`. This is deprecated and will be disallowed in a future release. show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -1012,6 +1044,70 @@ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16), key a064_long_123456789_123456789_123456789_123456789_123456789_1234 ( c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16) ); +Warnings: +Note 1831 Duplicate index `a002_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a003_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a004_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a005_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a006_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a007_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a008_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a009_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a010_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a011_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a012_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a013_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a014_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a015_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a016_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a017_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a018_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a019_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a020_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a021_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a022_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a023_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a024_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a025_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a026_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a027_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a028_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a029_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a030_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a031_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a032_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a033_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a034_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a035_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a036_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a037_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a038_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a039_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a040_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a041_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a042_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a043_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a044_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a045_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a046_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a047_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a048_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a049_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a050_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a051_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a052_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a053_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a054_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a055_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a056_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a057_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a058_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a059_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a060_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a061_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a062_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a063_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a064_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -1313,6 +1409,70 @@ add key a063_long_123456789_123456789_123456789_123456789_123456789_1234 ( c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16), add key a064_long_123456789_123456789_123456789_123456789_123456789_1234 ( c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16); +Warnings: +Note 1831 Duplicate index `a002_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a003_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a004_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a005_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a006_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a007_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a008_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a009_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a010_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a011_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a012_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a013_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a014_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a015_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a016_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a017_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a018_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a019_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a020_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a021_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a022_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a023_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a024_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a025_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a026_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a027_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a028_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a029_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a030_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a031_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a032_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a033_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a034_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a035_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a036_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a037_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a038_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a039_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a040_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a041_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a042_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a043_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a044_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a045_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a046_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a047_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a048_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a049_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a050_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a051_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a052_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a053_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a054_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a055_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a056_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a057_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a058_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a059_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a060_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a061_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a062_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a063_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a064_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release. show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -1561,6 +1721,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 7 @@ -1610,12 +1771,12 @@ CREATE TABLE t2 (primary key (a)) select * from t1; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' drop table if exists t2; Warnings: -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t2' CREATE TEMPORARY TABLE t2 (primary key (a)) select * from t1; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' drop table if exists t2; Warnings: -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t2' CREATE TABLE t2 (a int, b int, primary key (a)); INSERT INTO t2 select * from t1; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' @@ -1762,7 +1923,10 @@ t1 CREATE TABLE `t1` ( `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000', `STAGE` tinyint(2) NOT NULL DEFAULT '0', `MAX_STAGE` tinyint(2) NOT NULL DEFAULT '0', - `PROGRESS` decimal(7,3) NOT NULL DEFAULT '0.000' + `PROGRESS` decimal(7,3) NOT NULL DEFAULT '0.000', + `MEMORY_USED` int(7) NOT NULL DEFAULT '0', + `EXAMINED_ROWS` int(7) NOT NULL DEFAULT '0', + `QUERY_ID` bigint(4) NOT NULL DEFAULT '0' ) DEFAULT CHARSET=utf8 drop table t1; create temporary table t1 like information_schema.processlist; @@ -1780,7 +1944,10 @@ t1 CREATE TEMPORARY TABLE `t1` ( `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000', `STAGE` tinyint(2) NOT NULL DEFAULT '0', `MAX_STAGE` tinyint(2) NOT NULL DEFAULT '0', - `PROGRESS` decimal(7,3) NOT NULL DEFAULT '0.000' + `PROGRESS` decimal(7,3) NOT NULL DEFAULT '0.000', + `MEMORY_USED` int(7) NOT NULL DEFAULT '0', + `EXAMINED_ROWS` int(7) NOT NULL DEFAULT '0', + `QUERY_ID` bigint(4) NOT NULL DEFAULT '0' ) DEFAULT CHARSET=utf8 drop table t1; create table t1 like information_schema.character_sets; @@ -1895,25 +2062,36 @@ create table t3 (a int) row_format=page; drop table t1,t2,t3; # -- End of Bug#45829 -# new table creation/renaming blocked if old encoded table present -create table `t-1` (a int) engine=myisam; -insert into `t-1` values (1); +create table `#mysql50#t-1` (a int) engine=myisam; +insert into `#mysql50#t-1` values (1); show tables; Tables_in_test -t-1 -flush tables; -convert table files in mysql 5.0 file name encoding +#mysql50#t-1 +create table `t-1` (a int); show tables; Tables_in_test #mysql50#t-1 -create table `t-1` (a int); -ERROR 42S01: Table '#mysql50#t-1' already exists +t-1 +select * from `t-1`; +a +select * from `#mysql50#t-1`; +a +1 +drop table `t-1`; create table t1 (a int); alter table t1 rename `t-1`; -ERROR 42S01: Table '#mysql50#t-1' already exists +show tables; +Tables_in_test +#mysql50#t-1 +t-1 +drop table `t-1`; +create table t1 (a int); rename table t1 to `t-1`; -ERROR 42S01: Table '#mysql50#t-1' already exists -drop table `#mysql50#t-1`, t1; +show tables; +Tables_in_test +#mysql50#t-1 +t-1 +drop table `#mysql50#t-1`, `t-1`; End of 5.1 tests @@ -2425,6 +2603,8 @@ create table t1 (a int, b int) select 2,2; ERROR 42S01: Table 't1' already exists create table t1 like t2; ERROR 42S01: Table 't1' already exists +create or replace table t1 (a int, b int) select 2,2; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction select * from t1; a b 1 1 @@ -2506,3 +2686,9 @@ create table t1(ID decimal(2,1) unsigned NOT NULL, PRIMARY KEY (ID))engine=memor select 2.1 ID; drop table t1; End of 5.5 tests +create table t1; +ERROR 42000: A table must have at least 1 column +create table t1 (i int, j int, key(i), key(i)) as select 1 as i, 2 as j; +Warnings: +Note 1831 Duplicate index `i_2`. This is deprecated and will be disallowed in a future release. +drop table t1; diff --git a/mysql-test/r/create_or_replace.result b/mysql-test/r/create_or_replace.result new file mode 100644 index 00000000000..a43dc2eaca4 --- /dev/null +++ b/mysql-test/r/create_or_replace.result @@ -0,0 +1,455 @@ +drop table if exists t1,t2,t3; +CREATE TABLE t2 (a int); +INSERT INTO t2 VALUES(1),(2),(3); +# +# Check first syntax and wrong usage +# +CREATE OR REPLACE TABLE IF NOT EXISTS t1 (a int); +ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS +create or replace trigger trg before insert on t1 for each row set @a:=1; +ERROR HY000: Incorrect usage of OR REPLACE and TRIGGERS / SP / EVENT +create or replace table mysql.general_log (a int); +ERROR HY000: You cannot 'CREATE OR REPLACE' a log table if logging is enabled +create or replace table mysql.slow_log (a int); +ERROR HY000: You cannot 'CREATE OR REPLACE' a log table if logging is enabled +# +# Usage when table doesn't exist +# +CREATE OR REPLACE TABLE t1 (a int); +CREATE TABLE t1 (a int); +ERROR 42S01: Table 't1' already exists +DROP TABLE t1; +CREATE OR REPLACE TEMPORARY TABLE t1 (a int); +CREATE TEMPORARY TABLE t1 (a int, b int, c int); +ERROR 42S01: Table 't1' already exists +DROP TEMPORARY TABLE t1; +# +# Testing with temporary tables +# +CREATE OR REPLACE TABLE t1 (a int); +CREATE OR REPLACE TEMPORARY TABLE t1 (a int); +CREATE OR REPLACE TEMPORARY TABLE t1 (a int, b int); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TEMPORARY TABLE t1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +create temporary table t1 (i int) engine=InnoDB; +create or replace temporary table t1 (a int, b int) engine=InnoDB; +create or replace temporary table t1 (j int); +show create table t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `j` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +CREATE OR REPLACE TABLE t1 (a int); +LOCK TABLES t1 write; +CREATE OR REPLACE TEMPORARY TABLE t1 (a int); +CREATE OR REPLACE TEMPORARY TABLE t1 (a int, b int); +CREATE OR REPLACE TEMPORARY TABLE t1 (a int, b int) engine= innodb; +CREATE OR REPLACE TEMPORARY TABLE t1 (a int) engine= innodb; +CREATE OR REPLACE TEMPORARY TABLE t1 (a int, b int) engine=myisam; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TEMPORARY TABLE t1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE OR REPLACE TABLE t2 (a int); +ERROR HY000: Table 't2' was not locked with LOCK TABLES +DROP TABLE t1; +UNLOCK TABLES; +CREATE OR REPLACE TEMPORARY TABLE t1 (a int) SELECT * from t2; +SELECT * FROM t1; +a +1 +2 +3 +CREATE OR REPLACE TEMPORARY TABLE t1 (b int) SELECT * from t2; +SELECT * FROM t1; +b a +NULL 1 +NULL 2 +NULL 3 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `b` int(11) DEFAULT NULL, + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TEMPORARY TABLE t1 AS SELECT a FROM t2; +CREATE TEMPORARY TABLE IF NOT EXISTS t1(a int, b int) SELECT 1,2 FROM t2; +Warnings: +Note 1050 Table 't1' already exists +DROP TABLE t1; +CREATE TABLE t1 (a int); +CREATE OR REPLACE TABLE t1 AS SELECT 1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `1` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +create table t1 (a int); +create or replace table t1 as select * from t1; +ERROR HY000: Table 't1' is specified twice, both as a target for 'CREATE' and as a separate source for data +create or replace table t1 as select a from (select a from t1) as t3; +ERROR HY000: Table 't1' is specified twice, both as a target for 'CREATE' and as a separate source for data +create or replace table t1 as select a from t2 where t2.a in (select a from t1); +ERROR HY000: Table 't1' is specified twice, both as a target for 'CREATE' and as a separate source for data +drop table t1; +# +# Testing with normal tables +# +CREATE OR REPLACE TABLE t1 (a int); +CREATE OR REPLACE TABLE t1 (a int, b int); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 (a int) SELECT * from t2; +SELECT * FROM t1; +a +1 +2 +3 +TRUNCATE TABLE t1; +CREATE TABLE IF NOT EXISTS t1 (a int) SELECT * from t2; +Warnings: +Note 1050 Table 't1' already exists +SELECT * FROM t1; +a +DROP TABLE t1; +CREATE TABLE t1 (i int); +CREATE OR REPLACE TABLE t1 AS SELECT 1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `1` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE OR REPLACE TABLE t1 (a int); +LOCK TABLES t1 write,t2 write; +CREATE OR REPLACE TABLE t1 (a int, b int); +SELECT * FROM t1; +a b +INSERT INTO t1 values(1,1); +CREATE OR REPLACE TABLE t1 (a int, b int, c int); +INSERT INTO t1 values(1,1,1); +CREATE OR REPLACE TABLE t3 (a int); +ERROR HY000: Table 't3' was not locked with LOCK TABLES +UNLOCK TABLES; +DROP TABLE t1; +CREATE OR REPLACE TABLE t1 (a int); +LOCK TABLES t1 write,t2 write; +CREATE OR REPLACE TABLE t1 (a int, b int) select a,1 from t2; +SELECT * FROM t2; +a +1 +2 +3 +SELECT * FROM t1; +b a 1 +NULL 1 1 +NULL 2 1 +NULL 3 1 +SELECT * FROM t1; +b a 1 +NULL 1 1 +NULL 2 1 +NULL 3 1 +INSERT INTO t1 values(1,1,1); +CREATE OR REPLACE TABLE t1 (a int, b int, c int, d int); +INSERT INTO t1 values(1,1,1,1); +CREATE OR REPLACE TABLE t3 (a int); +ERROR HY000: Table 't3' was not locked with LOCK TABLES +UNLOCK TABLES; +DROP TABLE t1; +CREATE OR REPLACE TABLE t1 (a int); +LOCK TABLES t1 write,t2 write, t1 as t1_read read; +CREATE OR REPLACE TABLE t1 (a int, b int) select a,1 from t2; +SELECT * FROM t1; +b a 1 +NULL 1 1 +NULL 2 1 +NULL 3 1 +SELECT * FROM t2; +a +1 +2 +3 +SELECT * FROM t1 as t1_read; +ERROR HY000: Table 't1_read' was not locked with LOCK TABLES +DROP TABLE t1; +UNLOCK TABLES; +CREATE OR REPLACE TABLE t1 (a int); +LOCK TABLE t1 WRITE; +CREATE OR REPLACE TABLE t1 AS SELECT 1; +SELECT * from t1; +1 +1 +SELECT * from t2; +ERROR HY000: Table 't2' was not locked with LOCK TABLES +DROP TABLE t1; +# +# Test also with InnoDB (transactional engine) +# +create table t1 (i int) engine=innodb; +lock table t1 write; +create or replace table t1 (j int); +unlock tables; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `j` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (i int) engine=InnoDB; +lock table t1 write, t2 write; +create or replace table t1 (j int) engine=innodb; +unlock tables; +drop table t1; +create table t1 (i int) engine=InnoDB; +create table t3 (i int) engine=InnoDB; +insert into t3 values(1),(2),(3); +create table t4 (i int) engine=InnoDB; +insert into t4 values(1); +lock table t1 write, t2 write, t3 write, t4 write; +create or replace table t1 (a int, i int) engine=innodb select t2.a,t3.i from t2,t3; +select * from t4; +i +1 +unlock tables; +select * from t1 order by a,i; +a i +1 1 +1 2 +1 3 +2 1 +2 2 +2 3 +3 1 +3 2 +3 3 +drop table t1,t3,t4; +# +# Test the meta data locks are freed properly +# +create database mysqltest2; +drop table if exists test.t1,mysqltest2.t2; +Warnings: +Note 1051 Unknown table 'test.t1' +Note 1051 Unknown table 'mysqltest2.t2' +create table test.t1 (i int); +create table mysqltest2.t2 like test.t1; +lock table test.t1 write, mysqltest2.t2 write; +select * from information_schema.metadata_lock_info; +THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME +# MDL_INTENTION_EXCLUSIVE NULL Global read lock +# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2 +# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test +# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2 +# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1 +create or replace table test.t1; +ERROR 42000: A table must have at least 1 column +show tables; +Tables_in_test +t2 +select * from information_schema.metadata_lock_info; +THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME +# MDL_INTENTION_EXCLUSIVE NULL Global read lock +# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2 +# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test +# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2 +create or replace table mysqltest2.t2; +ERROR 42000: A table must have at least 1 column +select * from information_schema.metadata_lock_info; +THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME +create table t1 (i int); +drop table t1; +create table test.t1 (i int); +create table mysqltest2.t2 like test.t1; +lock table test.t1 write, mysqltest2.t2 write; +select * from information_schema.metadata_lock_info; +THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME +# MDL_INTENTION_EXCLUSIVE NULL Global read lock +# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2 +# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test +# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2 +# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1 +create or replace table test.t1 (a int) select 1 as 'a', 2 as 'a'; +ERROR 42S21: Duplicate column name 'a' +show tables; +Tables_in_test +t2 +select * from information_schema.metadata_lock_info; +THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME +# MDL_INTENTION_EXCLUSIVE NULL Global read lock +# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2 +# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test +# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2 +create or replace table mysqltest2.t2 (a int) select 1 as 'a', 2 as 'a'; +ERROR 42S21: Duplicate column name 'a' +select * from information_schema.metadata_lock_info; +THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME +create table t1 (i int); +drop table t1; +drop database mysqltest2; +# +# Testing CREATE .. LIKE +# +create or replace table t1 like t2; +create or replace table t1 like t2; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (b int); +lock tables t1 write, t2 read; +create or replace table t1 like t2; +SELECT * FROM t1; +a +INSERT INTO t1 values(1); +CREATE OR REPLACE TABLE t1 like t2; +INSERT INTO t1 values(2); +unlock tables; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create or replace table t1 like t2; +create or replace table t1 like t1; +ERROR 42000: Not unique table/alias: 't1' +drop table t1; +CREATE TEMPORARY TABLE t1 like t2; +CREATE OR REPLACE TABLE t1 like t1; +ERROR 42000: Not unique table/alias: 't1' +CREATE OR REPLACE TABLE t1 like t1; +ERROR 42000: Not unique table/alias: 't1' +drop table t1; +CREATE TEMPORARY TABLE t1 like t2; +CREATE OR REPLACE TEMPORARY TABLE t3 like t1; +CREATE OR REPLACE TEMPORARY TABLE t3 like t3; +ERROR 42000: Not unique table/alias: 't3' +drop table t1,t3; +# +# Test with prepared statements +# +prepare stmt1 from 'create or replace table t1 select * from t2'; +execute stmt1; +select * from t1; +a +1 +2 +3 +execute stmt1; +select * from t1; +a +1 +2 +3 +drop table t1; +execute stmt1; +select * from t1; +a +1 +2 +3 +deallocate prepare stmt1; +drop table t1; +# +# Test with views +# +create view t1 as select 1; +create table if not exists t1 (a int); +Warnings: +Note 1050 Table 't1' already exists +create or replace table t1 (a int); +ERROR 42S02: 'test.t1' is a view +drop table t1; +ERROR 42S02: 'test.t1' is a view +drop view t1; +# +# MDEV-5602 CREATE OR REPLACE obtains stricter locks than the +# connection had before +# +create table t1 (a int); +lock table t1 write, t2 read; +select * from information_schema.metadata_lock_info; +THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME +# MDL_INTENTION_EXCLUSIVE NULL Global read lock +# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test +# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1 +# MDL_SHARED_READ NULL Table metadata lock test t2 +create or replace table t1 (i int); +select * from information_schema.metadata_lock_info; +THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME +# MDL_INTENTION_EXCLUSIVE NULL Global read lock +# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test +# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1 +# MDL_SHARED_READ NULL Table metadata lock test t2 +create or replace table t1 like t2; +select * from information_schema.metadata_lock_info; +THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME +# MDL_INTENTION_EXCLUSIVE NULL Global read lock +# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test +# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1 +# MDL_SHARED_READ NULL Table metadata lock test t2 +create or replace table t1 select 1 as f1; +select * from information_schema.metadata_lock_info; +THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME +# MDL_INTENTION_EXCLUSIVE NULL Global read lock +# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test +# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1 +# MDL_SHARED_READ NULL Table metadata lock test t2 +drop table t1; +unlock tables; +# +# MDEV-6560 +# Assertion `! is_set() ' failed in Diagnostics_area::set_ok_status +# +CREATE TABLE t1 (col_int_nokey INT) ENGINE=InnoDB; +CREATE OR REPLACE TEMPORARY TABLE tmp LIKE t1; +LOCK TABLE t1 WRITE; +CREATE OR REPLACE TABLE t1 LIKE tmp; +KILL QUERY con_id; +ERROR 70100: Query execution was interrupted +CREATE OR REPLACE TABLE t1 (a int); +KILL QUERY con_id; +ERROR 70100: Query execution was interrupted +drop table t1; +DROP TABLE t2; +# +# MDEV-10824 - Crash in CREATE OR REPLACE TABLE t1 AS SELECT spfunc() +# +CREATE TABLE t1(a INT); +CREATE FUNCTION f1() RETURNS VARCHAR(16383) RETURN 'test'; +CREATE OR REPLACE TABLE t1 AS SELECT f1(); +LOCK TABLE t1 WRITE; +CREATE OR REPLACE TABLE t1 AS SELECT f1(); +UNLOCK TABLES; +DROP FUNCTION f1; +DROP TABLE t1; diff --git a/mysql-test/r/create_or_replace2.result b/mysql-test/r/create_or_replace2.result new file mode 100644 index 00000000000..6f5e412b91c --- /dev/null +++ b/mysql-test/r/create_or_replace2.result @@ -0,0 +1,25 @@ +include/master-slave.inc +[connection master] +drop table if exists t1; +SET @old_debug= @@session.debug; +CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB; +CREATE OR REPLACE TEMPORARY TABLE tmp (a int, b int, key(a)) engine=myisam; +set debug_dbug='+d,send_kill_after_delete'; +CREATE OR REPLACE TABLE t1 LIKE tmp; +set debug_dbug=@old_debug; +SHOW TABLES; +Tables_in_test +t1 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + KEY `a` (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW TABLES; +Tables_in_test +t1 +drop temporary table if exists tmp; +drop table t1; +include/rpl_end.inc diff --git a/mysql-test/r/ctype_big5.result b/mysql-test/r/ctype_big5.result index 55ed8ed6c95..175bbf0f09f 100644 --- a/mysql-test/r/ctype_big5.result +++ b/mysql-test/r/ctype_big5.result @@ -129,6 +129,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +big5_chinese_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; create table t1 engine=innodb select repeat('a',50) as c1; alter table t1 add index(c1(5)); insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111'); @@ -186,6 +237,86 @@ a hex(b) c 3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 DROP TABLE t1; +drop table if exists t1; +create table t1 select repeat('a',10) as c1; +delete from t1; +insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F); +insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F); +insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F); +insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F); +insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F); +insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F); +SELECT GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM t1 GROUP BY c1; +GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) + 20 +! 21 +" 22 +# 23 +$ 24 +% 25 +& 26 +' 27 +( 28 +) 29 +* 2A ++ 2B +, 2C +- 2D +. 2E +/ 2F +0 30 +1 31 +2 32 +3 33 +4 34 +5 35 +6 36 +7 37 +8 38 +9 39 +: 3A +; 3B +< 3C += 3D +> 3E +? 3F +@ 40 +Aa 41,61 +Bb 42,62 +Cc 43,63 +Dd 44,64 +E`e 45,60,65 +Ff 46,66 +Gg 47,67 +Hh 48,68 +Ii 49,69 +Jj 4A,6A +Kk 4B,6B +Ll 4C,6C +Mm 4D,6D +Nn 4E,6E +Oo 4F,6F +Pp 50,70 +Qq 51,71 +Rr 52,72 +Ss 53,73 +Tt 54,74 +Uu 55,75 +Vv 56,76 +Ww 57,77 +Xx 58,78 +Yy~ 59,79,7E +Zz 5A,7A +] 5D +[ 5B +\ 5C +^ 5E +_ 5F +{ 7B +| 7C +} 7D + 7F +drop table t1; SET collation_connection='big5_bin'; create table t1 select repeat('a',4000) a; delete from t1; @@ -213,6 +344,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +big5_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; create table t1 engine=innodb select repeat('a',50) as c1; alter table t1 add index(c1(5)); insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111'); @@ -598,3 +780,3867 @@ DROP TABLE t1; # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set names big5; +select @@collation_connection; +@@collation_connection +big5_chinese_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET big5 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +41 +SELECT HEX(ws) FROM t2; +HEX(ws) +41 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET big5 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +4141414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +4141414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +41414141412020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +41414141412020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +41 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +414243 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +4142 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +414243 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +4142432020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +41 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +4142 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +414220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +41422020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +4142202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +41422020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +41 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +4142 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +414243 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +41424320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +41 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +4142 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +414243 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +41424320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +big5_chinese_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +41 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +414243 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +4142 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +414243 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +4142432020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020434241 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +BEBDBCDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDFBCBDBE +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +big5_chinese_ci +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +4141 +select hex(weight_string(cast(0xA1A1 as char))); +hex(weight_string(cast(0xA1A1 as char))) +A140 +select hex(weight_string(cast(0xA1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1 as char) as char(1))) +A140 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))) +A140 +select hex(weight_string(cast(0xA1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1 as char) as char(3))) +A1402020 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))) +A140A14020 +select hex(weight_string(cast(0x40A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1 as char) as char(3))) +40A14020 +select hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))) +40A140A140 +select hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))) +40A140A140 +select hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))) +4040A140 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)) +A140 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)) +A140A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)) +A140A140 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)) +A140A14020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)) +A140A140202020202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)) +A140 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)) +A140A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)) +A140A140 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)) +A140A140A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)) +A140A140A14020202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)) +A140 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)) +A140A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)) +A140A140 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)) +A140A140A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)) +A140A140A14020202020202020202020202020202020202020 +set collation_connection=big5_bin; +select @@collation_connection; +@@collation_connection +big5_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET big5 COLLATE big5_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +61 +SELECT HEX(ws) FROM t2; +HEX(ws) +61 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET big5 COLLATE big5_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +6161616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +6161616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +61616161612020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +61616161612020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +61 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +616263 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +6162 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +616263 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +6162632020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +61 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +6162 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +616220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +61622020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +6162202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +61622020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +61 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +6162 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +616263 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +61626320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +61 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +6162 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +616263 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +61626320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +big5_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +61 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +616263 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +6162 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +616263 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +6162632020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020636261 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +9E9D9CDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDF9C9D9E +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +big5_bin +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +6141 +select hex(weight_string(cast(0xA1A1 as char))); +hex(weight_string(cast(0xA1A1 as char))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1 as char) as char(3))) +A1A12020 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))) +A1A1A1A120 +select hex(weight_string(cast(0x40A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1 as char) as char(3))) +40A1A120 +select hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))) +4040A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)) +A1A1A1A120 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)) +A1A1A1A1202020202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +# +# End of 5.6 tests +# +# +# Start of 10.0 tests +# +# Start of ctype_unescape.inc +SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection'; +PREPARE stmt FROM @query; +EXECUTE stmt; +CHARSET('test') @@character_set_client @@character_set_connection +big5 big5 big5 +DEALLOCATE PREPARE stmt; +CREATE TABLE allbytes (a VARBINARY(10)); +# Using selected bytes combinations +CREATE TABLE halfs (a INT); +INSERT INTO halfs VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07); +INSERT INTO halfs VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +CREATE TEMPORARY TABLE bytes (a BINARY(1), KEY(a)) ENGINE=MyISAM; +INSERT INTO bytes SELECT CHAR((t1.a << 4) | t2.a USING BINARY) FROM halfs t1, halfs t2; +DROP TABLE halfs; +CREATE TABLE selected_bytes (a VARBINARY(10)); +INSERT INTO selected_bytes (a) VALUES ('\0'),('\b'),('\t'),('\r'),('\n'),('\Z'); +INSERT INTO selected_bytes (a) VALUES ('0'),('b'),('t'),('r'),('n'),('Z'); +INSERT INTO selected_bytes (a) VALUES ('\\'),('_'),('%'),(0x22),(0x27); +INSERT INTO selected_bytes (a) VALUES ('a'); +INSERT INTO selected_bytes (a) VALUES +(0x3F), # 7bit +(0x40), # 7bit mbtail +(0x7E), # 7bit mbtail nonascii-8bit +(0x7F), # 7bit nonascii-8bit +(0x80), # mbtail bad-mb +(0x81), # mbhead mbtail +(0x9F), # mbhead mbtail bad-mb +(0xA0), # mbhead mbtail bad-mb +(0xA1), # mbhead mbtail nonascii-8bit +(0xE0), # mbhead mbtai +(0xEF), # mbhead mbtail +(0xF9), # mbhead mbtail +(0xFA), # mbhead mbtail bad-mb +(0xFC), # mbhead mbtail bad-mb +(0xFD), # mbhead mbtail bad-mb +(0xFE), # mbhead mbtial bad-mb +(0xFF); +INSERT INTO allbytes (a) SELECT a FROM bytes; +INSERT INTO allbytes (a) SELECT CONCAT(t1.a,t2.a) FROM selected_bytes t1,selected_bytes t2; +INSERT INTO allbytes (a) SELECT CONCAT(0x5C,t1.a,t2.a) FROM selected_bytes t1,selected_bytes t2; +INSERT INTO allbytes (a) SELECT CONCAT(0x5C,t1.a,0x5C,t2.a) FROM selected_bytes t1,selected_bytes t2; +DROP TABLE selected_bytes; +DELETE FROM allbytes WHERE +OCTET_LENGTH(a)>1 AND +LOCATE(0x5C,a)=0 AND +a NOT LIKE '%\'%' AND + a NOT LIKE '%"%'; +CREATE PROCEDURE p1(val VARBINARY(10)) +BEGIN +DECLARE EXIT HANDLER FOR SQLSTATE '42000' INSERT INTO t1 (a,b) VALUES(val,NULL); +SET @query=CONCAT(_binary"INSERT INTO t1 (a,b) VALUES (0x",HEX(val),",'",val,"')"); +PREPARE stmt FROM @query; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; +END// +CREATE PROCEDURE p2() +BEGIN +DECLARE val VARBINARY(10); +DECLARE done INT DEFAULT FALSE; +DECLARE stmt CURSOR FOR SELECT a FROM allbytes; +DECLARE CONTINUE HANDLER FOR NOT FOUND SET done=TRUE; +OPEN stmt; +read_loop1: LOOP +FETCH stmt INTO val; +IF done THEN +LEAVE read_loop1; +END IF; +CALL p1(val); +END LOOP; +CLOSE stmt; +END// +CREATE FUNCTION iswellformed(a VARBINARY(256)) RETURNS INT RETURN a=BINARY CONVERT(a USING big5);// +CREATE FUNCTION unescape(a VARBINARY(256)) RETURNS VARBINARY(256) +BEGIN +# We need to do it in a way to avoid producing new escape sequences +# First, enclose all known escsape sequences to '{{xx}}' + # - Backslash not followed by a LIKE pattern characters _ and % +# - Double escapes +# This uses PCRE Branch Reset Groups: (?|(alt1)|(alt2)|(alt3)). +# So '\\1' in the last argument always means the match, no matter +# which alternative it came from. +SET a=REGEXP_REPLACE(a,'(?|(\\\\[^_%])|(\\x{27}\\x{27}))','{{\\1}}'); +# Now unescape all enclosed standard escape sequences +SET a=REPLACE(a,'{{\\0}}', '\0'); +SET a=REPLACE(a,'{{\\b}}', '\b'); +SET a=REPLACE(a,'{{\\t}}', '\t'); +SET a=REPLACE(a,'{{\\r}}', '\r'); +SET a=REPLACE(a,'{{\\n}}', '\n'); +SET a=REPLACE(a,'{{\\Z}}', '\Z'); +SET a=REPLACE(a,'{{\\\'}}', '\''); +# Unescape double quotes +SET a=REPLACE(a,'{{\'\'}}', '\''); + # Unescape the rest: all other \x sequences mean just 'x' + SET a=REGEXP_REPLACE(a, '{{\\\\(.|\\R)}}', '\\1'); + RETURN a; +END// +CREATE FUNCTION unescape_type(a VARBINARY(256),b VARBINARY(256)) RETURNS VARBINARY(256) +BEGIN +RETURN CASE +WHEN b IS NULL THEN '[SyntErr]' + WHEN a=b THEN CASE +WHEN OCTET_LENGTH(a)=1 THEN '[Preserve]' + WHEN a RLIKE '\\\\[_%]' THEN '[Preserve][LIKE]' + WHEN a RLIKE '^[[:ascii:]]+$' THEN '[Preserve][ASCII]' + ELSE '[Preserv][MB]' END +WHEN REPLACE(a,0x5C,'')=b THEN '[Trivial]' + WHEN UNESCAPE(a)=b THEN '[Regular]' + ELSE '[Special]' END; +END// +CREATE FUNCTION wellformedness(a VARBINARY(256), b VARBINARY(256)) +RETURNS VARBINARY(256) +BEGIN +RETURN CASE +WHEN b IS NULL THEN '' + WHEN NOT iswellformed(a) AND iswellformed(b) THEN '[FIXED]' + WHEN iswellformed(a) AND NOT iswellformed(b) THEN '[BROKE]' + WHEN NOT iswellformed(a) AND NOT iswellformed(b) THEN '[ILSEQ]' + ELSE '' + END; +END// +CREATE FUNCTION mysql_real_escape_string_generated(a VARBINARY(256)) +RETURNS VARBINARY(256) +BEGIN +DECLARE a1 BINARY(1) DEFAULT SUBSTR(a,1,1); +DECLARE a2 BINARY(1) DEFAULT SUBSTR(a,2,1); +DECLARE a3 BINARY(1) DEFAULT SUBSTR(a,3,1); +DECLARE a4 BINARY(1) DEFAULT SUBSTR(a,4,1); +DECLARE a2a4 BINARY(2) DEFAULT CONCAT(a2,a4); +RETURN CASE +WHEN (a1=0x5C) AND +(a3=0x5C) AND +(a2>0x7F) AND +(a4 NOT IN ('_','%','0','t','r','n','Z')) AND +iswellformed(a2a4) THEN '[USER]' + ELSE '' + END; +END// +CREATE TABLE t1 (a VARBINARY(10),b VARBINARY(10)); +CALL p2(); +SELECT HEX(a),HEX(b), +CONCAT(unescape_type(a,b), +wellformedness(a,b), +mysql_real_escape_string_generated(a), +IF(UNESCAPE(a)<>b,CONCAT('[BAD',HEX(UNESCAPE(a)),']'),'')) AS comment +FROM t1 ORDER BY LENGTH(a),a; +HEX(a) HEX(b) comment +00 00 [Preserve] +01 01 [Preserve] +02 02 [Preserve] +03 03 [Preserve] +04 04 [Preserve] +05 05 [Preserve] +06 06 [Preserve] +07 07 [Preserve] +08 08 [Preserve] +09 09 [Preserve] +0A 0A [Preserve] +0B 0B [Preserve] +0C 0C [Preserve] +0D 0D [Preserve] +0E 0E [Preserve] +0F 0F [Preserve] +10 10 [Preserve] +11 11 [Preserve] +12 12 [Preserve] +13 13 [Preserve] +14 14 [Preserve] +15 15 [Preserve] +16 16 [Preserve] +17 17 [Preserve] +18 18 [Preserve] +19 19 [Preserve] +1A 1A [Preserve] +1B 1B [Preserve] +1C 1C [Preserve] +1D 1D [Preserve] +1E 1E [Preserve] +1F 1F [Preserve] +20 20 [Preserve] +21 21 [Preserve] +22 22 [Preserve] +23 23 [Preserve] +24 24 [Preserve] +25 25 [Preserve] +26 26 [Preserve] +27 NULL [SyntErr] +28 28 [Preserve] +29 29 [Preserve] +2A 2A [Preserve] +2B 2B [Preserve] +2C 2C [Preserve] +2D 2D [Preserve] +2E 2E [Preserve] +2F 2F [Preserve] +30 30 [Preserve] +31 31 [Preserve] +32 32 [Preserve] +33 33 [Preserve] +34 34 [Preserve] +35 35 [Preserve] +36 36 [Preserve] +37 37 [Preserve] +38 38 [Preserve] +39 39 [Preserve] +3A 3A [Preserve] +3B 3B [Preserve] +3C 3C [Preserve] +3D 3D [Preserve] +3E 3E [Preserve] +3F 3F [Preserve] +40 40 [Preserve] +41 41 [Preserve] +42 42 [Preserve] +43 43 [Preserve] +44 44 [Preserve] +45 45 [Preserve] +46 46 [Preserve] +47 47 [Preserve] +48 48 [Preserve] +49 49 [Preserve] +4A 4A [Preserve] +4B 4B [Preserve] +4C 4C [Preserve] +4D 4D [Preserve] +4E 4E [Preserve] +4F 4F [Preserve] +50 50 [Preserve] +51 51 [Preserve] +52 52 [Preserve] +53 53 [Preserve] +54 54 [Preserve] +55 55 [Preserve] +56 56 [Preserve] +57 57 [Preserve] +58 58 [Preserve] +59 59 [Preserve] +5A 5A [Preserve] +5B 5B [Preserve] +5C NULL [SyntErr] +5D 5D [Preserve] +5E 5E [Preserve] +5F 5F [Preserve] +60 60 [Preserve] +61 61 [Preserve] +62 62 [Preserve] +63 63 [Preserve] +64 64 [Preserve] +65 65 [Preserve] +66 66 [Preserve] +67 67 [Preserve] +68 68 [Preserve] +69 69 [Preserve] +6A 6A [Preserve] +6B 6B [Preserve] +6C 6C [Preserve] +6D 6D [Preserve] +6E 6E [Preserve] +6F 6F [Preserve] +70 70 [Preserve] +71 71 [Preserve] +72 72 [Preserve] +73 73 [Preserve] +74 74 [Preserve] +75 75 [Preserve] +76 76 [Preserve] +77 77 [Preserve] +78 78 [Preserve] +79 79 [Preserve] +7A 7A [Preserve] +7B 7B [Preserve] +7C 7C [Preserve] +7D 7D [Preserve] +7E 7E [Preserve] +7F 7F [Preserve] +80 80 [Preserve][ILSEQ] +81 81 [Preserve][ILSEQ] +82 82 [Preserve][ILSEQ] +83 83 [Preserve][ILSEQ] +84 84 [Preserve][ILSEQ] +85 85 [Preserve][ILSEQ] +86 86 [Preserve][ILSEQ] +87 87 [Preserve][ILSEQ] +88 88 [Preserve][ILSEQ] +89 89 [Preserve][ILSEQ] +8A 8A [Preserve][ILSEQ] +8B 8B [Preserve][ILSEQ] +8C 8C [Preserve][ILSEQ] +8D 8D [Preserve][ILSEQ] +8E 8E [Preserve][ILSEQ] +8F 8F [Preserve][ILSEQ] +90 90 [Preserve][ILSEQ] +91 91 [Preserve][ILSEQ] +92 92 [Preserve][ILSEQ] +93 93 [Preserve][ILSEQ] +94 94 [Preserve][ILSEQ] +95 95 [Preserve][ILSEQ] +96 96 [Preserve][ILSEQ] +97 97 [Preserve][ILSEQ] +98 98 [Preserve][ILSEQ] +99 99 [Preserve][ILSEQ] +9A 9A [Preserve][ILSEQ] +9B 9B [Preserve][ILSEQ] +9C 9C [Preserve][ILSEQ] +9D 9D [Preserve][ILSEQ] +9E 9E [Preserve][ILSEQ] +9F 9F [Preserve][ILSEQ] +A0 A0 [Preserve][ILSEQ] +A1 A1 [Preserve][ILSEQ] +A2 A2 [Preserve][ILSEQ] +A3 A3 [Preserve][ILSEQ] +A4 A4 [Preserve][ILSEQ] +A5 A5 [Preserve][ILSEQ] +A6 A6 [Preserve][ILSEQ] +A7 A7 [Preserve][ILSEQ] +A8 A8 [Preserve][ILSEQ] +A9 A9 [Preserve][ILSEQ] +AA AA [Preserve][ILSEQ] +AB AB [Preserve][ILSEQ] +AC AC [Preserve][ILSEQ] +AD AD [Preserve][ILSEQ] +AE AE [Preserve][ILSEQ] +AF AF [Preserve][ILSEQ] +B0 B0 [Preserve][ILSEQ] +B1 B1 [Preserve][ILSEQ] +B2 B2 [Preserve][ILSEQ] +B3 B3 [Preserve][ILSEQ] +B4 B4 [Preserve][ILSEQ] +B5 B5 [Preserve][ILSEQ] +B6 B6 [Preserve][ILSEQ] +B7 B7 [Preserve][ILSEQ] +B8 B8 [Preserve][ILSEQ] +B9 B9 [Preserve][ILSEQ] +BA BA [Preserve][ILSEQ] +BB BB [Preserve][ILSEQ] +BC BC [Preserve][ILSEQ] +BD BD [Preserve][ILSEQ] +BE BE [Preserve][ILSEQ] +BF BF [Preserve][ILSEQ] +C0 C0 [Preserve][ILSEQ] +C1 C1 [Preserve][ILSEQ] +C2 C2 [Preserve][ILSEQ] +C3 C3 [Preserve][ILSEQ] +C4 C4 [Preserve][ILSEQ] +C5 C5 [Preserve][ILSEQ] +C6 C6 [Preserve][ILSEQ] +C7 C7 [Preserve][ILSEQ] +C8 C8 [Preserve][ILSEQ] +C9 C9 [Preserve][ILSEQ] +CA CA [Preserve][ILSEQ] +CB CB [Preserve][ILSEQ] +CC CC [Preserve][ILSEQ] +CD CD [Preserve][ILSEQ] +CE CE [Preserve][ILSEQ] +CF CF [Preserve][ILSEQ] +D0 D0 [Preserve][ILSEQ] +D1 D1 [Preserve][ILSEQ] +D2 D2 [Preserve][ILSEQ] +D3 D3 [Preserve][ILSEQ] +D4 D4 [Preserve][ILSEQ] +D5 D5 [Preserve][ILSEQ] +D6 D6 [Preserve][ILSEQ] +D7 D7 [Preserve][ILSEQ] +D8 D8 [Preserve][ILSEQ] +D9 D9 [Preserve][ILSEQ] +DA DA [Preserve][ILSEQ] +DB DB [Preserve][ILSEQ] +DC DC [Preserve][ILSEQ] +DD DD [Preserve][ILSEQ] +DE DE [Preserve][ILSEQ] +DF DF [Preserve][ILSEQ] +E0 E0 [Preserve][ILSEQ] +E1 E1 [Preserve][ILSEQ] +E2 E2 [Preserve][ILSEQ] +E3 E3 [Preserve][ILSEQ] +E4 E4 [Preserve][ILSEQ] +E5 E5 [Preserve][ILSEQ] +E6 E6 [Preserve][ILSEQ] +E7 E7 [Preserve][ILSEQ] +E8 E8 [Preserve][ILSEQ] +E9 E9 [Preserve][ILSEQ] +EA EA [Preserve][ILSEQ] +EB EB [Preserve][ILSEQ] +EC EC [Preserve][ILSEQ] +ED ED [Preserve][ILSEQ] +EE EE [Preserve][ILSEQ] +EF EF [Preserve][ILSEQ] +F0 F0 [Preserve][ILSEQ] +F1 F1 [Preserve][ILSEQ] +F2 F2 [Preserve][ILSEQ] +F3 F3 [Preserve][ILSEQ] +F4 F4 [Preserve][ILSEQ] +F5 F5 [Preserve][ILSEQ] +F6 F6 [Preserve][ILSEQ] +F7 F7 [Preserve][ILSEQ] +F8 F8 [Preserve][ILSEQ] +F9 F9 [Preserve][ILSEQ] +FA FA [Preserve][ILSEQ] +FB FB [Preserve][ILSEQ] +FC FC [Preserve][ILSEQ] +FD FD [Preserve][ILSEQ] +FE FE [Preserve][ILSEQ] +FF FF [Preserve][ILSEQ] +0022 0022 [Preserve][ASCII] +0027 NULL [SyntErr] +005C NULL [SyntErr] +0822 0822 [Preserve][ASCII] +0827 NULL [SyntErr] +085C NULL [SyntErr] +0922 0922 [Preserve][ASCII] +0927 NULL [SyntErr] +095C NULL [SyntErr] +0A22 0A22 [Preserve][ASCII] +0A27 NULL [SyntErr] +0A5C NULL [SyntErr] +0D22 0D22 [Preserve][ASCII] +0D27 NULL [SyntErr] +0D5C NULL [SyntErr] +1A22 1A22 [Preserve][ASCII] +1A27 NULL [SyntErr] +1A5C NULL [SyntErr] +2200 2200 [Preserve][ASCII] +2208 2208 [Preserve][ASCII] +2209 2209 [Preserve][ASCII] +220A 220A [Preserve][ASCII] +220D 220D [Preserve][ASCII] +221A 221A [Preserve][ASCII] +2222 2222 [Preserve][ASCII] +2225 2225 [Preserve][ASCII] +2227 NULL [SyntErr] +2230 2230 [Preserve][ASCII] +223F 223F [Preserve][ASCII] +2240 2240 [Preserve][ASCII] +225A 225A [Preserve][ASCII] +225C NULL [SyntErr] +225F 225F [Preserve][ASCII] +2261 2261 [Preserve][ASCII] +2262 2262 [Preserve][ASCII] +226E 226E [Preserve][ASCII] +2272 2272 [Preserve][ASCII] +2274 2274 [Preserve][ASCII] +227E 227E [Preserve][ASCII] +227F 227F [Preserve][ASCII] +2280 2280 [Preserv][MB][ILSEQ] +2281 2281 [Preserv][MB][ILSEQ] +229F 229F [Preserv][MB][ILSEQ] +22A0 22A0 [Preserv][MB][ILSEQ] +22A1 22A1 [Preserv][MB][ILSEQ] +22E0 22E0 [Preserv][MB][ILSEQ] +22EF 22EF [Preserv][MB][ILSEQ] +22F9 22F9 [Preserv][MB][ILSEQ] +22FA 22FA [Preserv][MB][ILSEQ] +22FC 22FC [Preserv][MB][ILSEQ] +22FD 22FD [Preserv][MB][ILSEQ] +22FE 22FE [Preserv][MB][ILSEQ] +22FF 22FF [Preserv][MB][ILSEQ] +2522 2522 [Preserve][ASCII] +2527 NULL [SyntErr] +255C NULL [SyntErr] +2700 NULL [SyntErr] +2708 NULL [SyntErr] +2709 NULL [SyntErr] +270A NULL [SyntErr] +270D NULL [SyntErr] +271A NULL [SyntErr] +2722 NULL [SyntErr] +2725 NULL [SyntErr] +2727 27 [Regular] +2730 NULL [SyntErr] +273F NULL [SyntErr] +2740 NULL [SyntErr] +275A NULL [SyntErr] +275C NULL [SyntErr] +275F NULL [SyntErr] +2761 NULL [SyntErr] +2762 NULL [SyntErr] +276E NULL [SyntErr] +2772 NULL [SyntErr] +2774 NULL [SyntErr] +277E NULL [SyntErr] +277F NULL [SyntErr] +2780 NULL [SyntErr] +2781 NULL [SyntErr] +279F NULL [SyntErr] +27A0 NULL [SyntErr] +27A1 NULL [SyntErr] +27E0 NULL [SyntErr] +27EF NULL [SyntErr] +27F9 NULL [SyntErr] +27FA NULL [SyntErr] +27FC NULL [SyntErr] +27FD NULL [SyntErr] +27FE NULL [SyntErr] +27FF NULL [SyntErr] +3022 3022 [Preserve][ASCII] +3027 NULL [SyntErr] +305C NULL [SyntErr] +3F22 3F22 [Preserve][ASCII] +3F27 NULL [SyntErr] +3F5C NULL [SyntErr] +4022 4022 [Preserve][ASCII] +4027 NULL [SyntErr] +405C NULL [SyntErr] +5A22 5A22 [Preserve][ASCII] +5A27 NULL [SyntErr] +5A5C NULL [SyntErr] +5C00 00 [Trivial] +5C08 08 [Trivial] +5C09 09 [Trivial] +5C0A 0A [Trivial] +5C0D 0D [Trivial] +5C1A 1A [Trivial] +5C22 22 [Trivial] +5C25 5C25 [Preserve][LIKE] +5C27 27 [Trivial] +5C30 00 [Regular] +5C3F 3F [Trivial] +5C40 40 [Trivial] +5C5A 1A [Regular] +5C5C 5C [Regular] +5C5F 5C5F [Preserve][LIKE] +5C61 61 [Trivial] +5C62 08 [Regular] +5C6E 0A [Regular] +5C72 0D [Regular] +5C74 09 [Regular] +5C7E 7E [Trivial] +5C7F 7F [Trivial] +5C80 80 [Trivial][ILSEQ] +5C81 81 [Trivial][ILSEQ] +5C9F 9F [Trivial][ILSEQ] +5CA0 A0 [Trivial][ILSEQ] +5CA1 A1 [Trivial][ILSEQ] +5CE0 E0 [Trivial][ILSEQ] +5CEF EF [Trivial][ILSEQ] +5CF9 F9 [Trivial][ILSEQ] +5CFA FA [Trivial][ILSEQ] +5CFC FC [Trivial][ILSEQ] +5CFD FD [Trivial][ILSEQ] +5CFE FE [Trivial][ILSEQ] +5CFF FF [Trivial][ILSEQ] +5F22 5F22 [Preserve][ASCII] +5F27 NULL [SyntErr] +5F5C NULL [SyntErr] +6122 6122 [Preserve][ASCII] +6127 NULL [SyntErr] +615C NULL [SyntErr] +6222 6222 [Preserve][ASCII] +6227 NULL [SyntErr] +625C NULL [SyntErr] +6E22 6E22 [Preserve][ASCII] +6E27 NULL [SyntErr] +6E5C NULL [SyntErr] +7222 7222 [Preserve][ASCII] +7227 NULL [SyntErr] +725C NULL [SyntErr] +7422 7422 [Preserve][ASCII] +7427 NULL [SyntErr] +745C NULL [SyntErr] +7E22 7E22 [Preserve][ASCII] +7E27 NULL [SyntErr] +7E5C NULL [SyntErr] +7F22 7F22 [Preserve][ASCII] +7F27 NULL [SyntErr] +7F5C NULL [SyntErr] +8022 8022 [Preserv][MB][ILSEQ] +8027 NULL [SyntErr] +805C NULL [SyntErr] +8122 8122 [Preserv][MB][ILSEQ] +8127 NULL [SyntErr] +815C NULL [SyntErr] +9F22 9F22 [Preserv][MB][ILSEQ] +9F27 NULL [SyntErr] +9F5C NULL [SyntErr] +A022 A022 [Preserv][MB][ILSEQ] +A027 NULL [SyntErr] +A05C NULL [SyntErr] +A122 A122 [Preserv][MB][ILSEQ] +A127 NULL [SyntErr] +A15C A15C [Preserv][MB] +E022 E022 [Preserv][MB][ILSEQ] +E027 NULL [SyntErr] +E05C E05C [Preserv][MB] +EF22 EF22 [Preserv][MB][ILSEQ] +EF27 NULL [SyntErr] +EF5C EF5C [Preserv][MB] +F922 F922 [Preserv][MB][ILSEQ] +F927 NULL [SyntErr] +F95C F95C [Preserv][MB] +FA22 FA22 [Preserv][MB][ILSEQ] +FA27 NULL [SyntErr] +FA5C NULL [SyntErr] +FC22 FC22 [Preserv][MB][ILSEQ] +FC27 NULL [SyntErr] +FC5C NULL [SyntErr] +FD22 FD22 [Preserv][MB][ILSEQ] +FD27 NULL [SyntErr] +FD5C NULL [SyntErr] +FE22 FE22 [Preserv][MB][ILSEQ] +FE27 NULL [SyntErr] +FE5C NULL [SyntErr] +FF22 FF22 [Preserv][MB][ILSEQ] +FF27 NULL [SyntErr] +FF5C NULL [SyntErr] +5C0000 0000 [Trivial] +5C0008 0008 [Trivial] +5C0009 0009 [Trivial] +5C000A 000A [Trivial] +5C000D 000D [Trivial] +5C001A 001A [Trivial] +5C0022 0022 [Trivial] +5C0025 0025 [Trivial] +5C0027 NULL [SyntErr] +5C0030 0030 [Trivial] +5C003F 003F [Trivial] +5C0040 0040 [Trivial] +5C005A 005A [Trivial] +5C005C NULL [SyntErr] +5C005F 005F [Trivial] +5C0061 0061 [Trivial] +5C0062 0062 [Trivial] +5C006E 006E [Trivial] +5C0072 0072 [Trivial] +5C0074 0074 [Trivial] +5C007E 007E [Trivial] +5C007F 007F [Trivial] +5C0080 0080 [Trivial][ILSEQ] +5C0081 0081 [Trivial][ILSEQ] +5C009F 009F [Trivial][ILSEQ] +5C00A0 00A0 [Trivial][ILSEQ] +5C00A1 00A1 [Trivial][ILSEQ] +5C00E0 00E0 [Trivial][ILSEQ] +5C00EF 00EF [Trivial][ILSEQ] +5C00F9 00F9 [Trivial][ILSEQ] +5C00FA 00FA [Trivial][ILSEQ] +5C00FC 00FC [Trivial][ILSEQ] +5C00FD 00FD [Trivial][ILSEQ] +5C00FE 00FE [Trivial][ILSEQ] +5C00FF 00FF [Trivial][ILSEQ] +5C0800 0800 [Trivial] +5C0808 0808 [Trivial] +5C0809 0809 [Trivial] +5C080A 080A [Trivial] +5C080D 080D [Trivial] +5C081A 081A [Trivial] +5C0822 0822 [Trivial] +5C0825 0825 [Trivial] +5C0827 NULL [SyntErr] +5C0830 0830 [Trivial] +5C083F 083F [Trivial] +5C0840 0840 [Trivial] +5C085A 085A [Trivial] +5C085C NULL [SyntErr] +5C085F 085F [Trivial] +5C0861 0861 [Trivial] +5C0862 0862 [Trivial] +5C086E 086E [Trivial] +5C0872 0872 [Trivial] +5C0874 0874 [Trivial] +5C087E 087E [Trivial] +5C087F 087F [Trivial] +5C0880 0880 [Trivial][ILSEQ] +5C0881 0881 [Trivial][ILSEQ] +5C089F 089F [Trivial][ILSEQ] +5C08A0 08A0 [Trivial][ILSEQ] +5C08A1 08A1 [Trivial][ILSEQ] +5C08E0 08E0 [Trivial][ILSEQ] +5C08EF 08EF [Trivial][ILSEQ] +5C08F9 08F9 [Trivial][ILSEQ] +5C08FA 08FA [Trivial][ILSEQ] +5C08FC 08FC [Trivial][ILSEQ] +5C08FD 08FD [Trivial][ILSEQ] +5C08FE 08FE [Trivial][ILSEQ] +5C08FF 08FF [Trivial][ILSEQ] +5C0900 0900 [Trivial] +5C0908 0908 [Trivial] +5C0909 0909 [Trivial] +5C090A 090A [Trivial] +5C090D 090D [Trivial] +5C091A 091A [Trivial] +5C0922 0922 [Trivial] +5C0925 0925 [Trivial] +5C0927 NULL [SyntErr] +5C0930 0930 [Trivial] +5C093F 093F [Trivial] +5C0940 0940 [Trivial] +5C095A 095A [Trivial] +5C095C NULL [SyntErr] +5C095F 095F [Trivial] +5C0961 0961 [Trivial] +5C0962 0962 [Trivial] +5C096E 096E [Trivial] +5C0972 0972 [Trivial] +5C0974 0974 [Trivial] +5C097E 097E [Trivial] +5C097F 097F [Trivial] +5C0980 0980 [Trivial][ILSEQ] +5C0981 0981 [Trivial][ILSEQ] +5C099F 099F [Trivial][ILSEQ] +5C09A0 09A0 [Trivial][ILSEQ] +5C09A1 09A1 [Trivial][ILSEQ] +5C09E0 09E0 [Trivial][ILSEQ] +5C09EF 09EF [Trivial][ILSEQ] +5C09F9 09F9 [Trivial][ILSEQ] +5C09FA 09FA [Trivial][ILSEQ] +5C09FC 09FC [Trivial][ILSEQ] +5C09FD 09FD [Trivial][ILSEQ] +5C09FE 09FE [Trivial][ILSEQ] +5C09FF 09FF [Trivial][ILSEQ] +5C0A00 0A00 [Trivial] +5C0A08 0A08 [Trivial] +5C0A09 0A09 [Trivial] +5C0A0A 0A0A [Trivial] +5C0A0D 0A0D [Trivial] +5C0A1A 0A1A [Trivial] +5C0A22 0A22 [Trivial] +5C0A25 0A25 [Trivial] +5C0A27 NULL [SyntErr] +5C0A30 0A30 [Trivial] +5C0A3F 0A3F [Trivial] +5C0A40 0A40 [Trivial] +5C0A5A 0A5A [Trivial] +5C0A5C NULL [SyntErr] +5C0A5F 0A5F [Trivial] +5C0A61 0A61 [Trivial] +5C0A62 0A62 [Trivial] +5C0A6E 0A6E [Trivial] +5C0A72 0A72 [Trivial] +5C0A74 0A74 [Trivial] +5C0A7E 0A7E [Trivial] +5C0A7F 0A7F [Trivial] +5C0A80 0A80 [Trivial][ILSEQ] +5C0A81 0A81 [Trivial][ILSEQ] +5C0A9F 0A9F [Trivial][ILSEQ] +5C0AA0 0AA0 [Trivial][ILSEQ] +5C0AA1 0AA1 [Trivial][ILSEQ] +5C0AE0 0AE0 [Trivial][ILSEQ] +5C0AEF 0AEF [Trivial][ILSEQ] +5C0AF9 0AF9 [Trivial][ILSEQ] +5C0AFA 0AFA [Trivial][ILSEQ] +5C0AFC 0AFC [Trivial][ILSEQ] +5C0AFD 0AFD [Trivial][ILSEQ] +5C0AFE 0AFE [Trivial][ILSEQ] +5C0AFF 0AFF [Trivial][ILSEQ] +5C0D00 0D00 [Trivial] +5C0D08 0D08 [Trivial] +5C0D09 0D09 [Trivial] +5C0D0A 0D0A [Trivial] +5C0D0D 0D0D [Trivial] +5C0D1A 0D1A [Trivial] +5C0D22 0D22 [Trivial] +5C0D25 0D25 [Trivial] +5C0D27 NULL [SyntErr] +5C0D30 0D30 [Trivial] +5C0D3F 0D3F [Trivial] +5C0D40 0D40 [Trivial] +5C0D5A 0D5A [Trivial] +5C0D5C NULL [SyntErr] +5C0D5F 0D5F [Trivial] +5C0D61 0D61 [Trivial] +5C0D62 0D62 [Trivial] +5C0D6E 0D6E [Trivial] +5C0D72 0D72 [Trivial] +5C0D74 0D74 [Trivial] +5C0D7E 0D7E [Trivial] +5C0D7F 0D7F [Trivial] +5C0D80 0D80 [Trivial][ILSEQ] +5C0D81 0D81 [Trivial][ILSEQ] +5C0D9F 0D9F [Trivial][ILSEQ] +5C0DA0 0DA0 [Trivial][ILSEQ] +5C0DA1 0DA1 [Trivial][ILSEQ] +5C0DE0 0DE0 [Trivial][ILSEQ] +5C0DEF 0DEF [Trivial][ILSEQ] +5C0DF9 0DF9 [Trivial][ILSEQ] +5C0DFA 0DFA [Trivial][ILSEQ] +5C0DFC 0DFC [Trivial][ILSEQ] +5C0DFD 0DFD [Trivial][ILSEQ] +5C0DFE 0DFE [Trivial][ILSEQ] +5C0DFF 0DFF [Trivial][ILSEQ] +5C1A00 1A00 [Trivial] +5C1A08 1A08 [Trivial] +5C1A09 1A09 [Trivial] +5C1A0A 1A0A [Trivial] +5C1A0D 1A0D [Trivial] +5C1A1A 1A1A [Trivial] +5C1A22 1A22 [Trivial] +5C1A25 1A25 [Trivial] +5C1A27 NULL [SyntErr] +5C1A30 1A30 [Trivial] +5C1A3F 1A3F [Trivial] +5C1A40 1A40 [Trivial] +5C1A5A 1A5A [Trivial] +5C1A5C NULL [SyntErr] +5C1A5F 1A5F [Trivial] +5C1A61 1A61 [Trivial] +5C1A62 1A62 [Trivial] +5C1A6E 1A6E [Trivial] +5C1A72 1A72 [Trivial] +5C1A74 1A74 [Trivial] +5C1A7E 1A7E [Trivial] +5C1A7F 1A7F [Trivial] +5C1A80 1A80 [Trivial][ILSEQ] +5C1A81 1A81 [Trivial][ILSEQ] +5C1A9F 1A9F [Trivial][ILSEQ] +5C1AA0 1AA0 [Trivial][ILSEQ] +5C1AA1 1AA1 [Trivial][ILSEQ] +5C1AE0 1AE0 [Trivial][ILSEQ] +5C1AEF 1AEF [Trivial][ILSEQ] +5C1AF9 1AF9 [Trivial][ILSEQ] +5C1AFA 1AFA [Trivial][ILSEQ] +5C1AFC 1AFC [Trivial][ILSEQ] +5C1AFD 1AFD [Trivial][ILSEQ] +5C1AFE 1AFE [Trivial][ILSEQ] +5C1AFF 1AFF [Trivial][ILSEQ] +5C2200 2200 [Trivial] +5C2208 2208 [Trivial] +5C2209 2209 [Trivial] +5C220A 220A [Trivial] +5C220D 220D [Trivial] +5C221A 221A [Trivial] +5C2222 2222 [Trivial] +5C2225 2225 [Trivial] +5C2227 NULL [SyntErr] +5C2230 2230 [Trivial] +5C223F 223F [Trivial] +5C2240 2240 [Trivial] +5C225A 225A [Trivial] +5C225C NULL [SyntErr] +5C225F 225F [Trivial] +5C2261 2261 [Trivial] +5C2262 2262 [Trivial] +5C226E 226E [Trivial] +5C2272 2272 [Trivial] +5C2274 2274 [Trivial] +5C227E 227E [Trivial] +5C227F 227F [Trivial] +5C2280 2280 [Trivial][ILSEQ] +5C2281 2281 [Trivial][ILSEQ] +5C229F 229F [Trivial][ILSEQ] +5C22A0 22A0 [Trivial][ILSEQ] +5C22A1 22A1 [Trivial][ILSEQ] +5C22E0 22E0 [Trivial][ILSEQ] +5C22EF 22EF [Trivial][ILSEQ] +5C22F9 22F9 [Trivial][ILSEQ] +5C22FA 22FA [Trivial][ILSEQ] +5C22FC 22FC [Trivial][ILSEQ] +5C22FD 22FD [Trivial][ILSEQ] +5C22FE 22FE [Trivial][ILSEQ] +5C22FF 22FF [Trivial][ILSEQ] +5C2500 5C2500 [Preserve][LIKE] +5C2508 5C2508 [Preserve][LIKE] +5C2509 5C2509 [Preserve][LIKE] +5C250A 5C250A [Preserve][LIKE] +5C250D 5C250D [Preserve][LIKE] +5C251A 5C251A [Preserve][LIKE] +5C2522 5C2522 [Preserve][LIKE] +5C2525 5C2525 [Preserve][LIKE] +5C2527 NULL [SyntErr] +5C2530 5C2530 [Preserve][LIKE] +5C253F 5C253F [Preserve][LIKE] +5C2540 5C2540 [Preserve][LIKE] +5C255A 5C255A [Preserve][LIKE] +5C255C NULL [SyntErr] +5C255F 5C255F [Preserve][LIKE] +5C2561 5C2561 [Preserve][LIKE] +5C2562 5C2562 [Preserve][LIKE] +5C256E 5C256E [Preserve][LIKE] +5C2572 5C2572 [Preserve][LIKE] +5C2574 5C2574 [Preserve][LIKE] +5C257E 5C257E [Preserve][LIKE] +5C257F 5C257F [Preserve][LIKE] +5C2580 5C2580 [Preserve][LIKE][ILSEQ] +5C2581 5C2581 [Preserve][LIKE][ILSEQ] +5C259F 5C259F [Preserve][LIKE][ILSEQ] +5C25A0 5C25A0 [Preserve][LIKE][ILSEQ] +5C25A1 5C25A1 [Preserve][LIKE][ILSEQ] +5C25E0 5C25E0 [Preserve][LIKE][ILSEQ] +5C25EF 5C25EF [Preserve][LIKE][ILSEQ] +5C25F9 5C25F9 [Preserve][LIKE][ILSEQ] +5C25FA 5C25FA [Preserve][LIKE][ILSEQ] +5C25FC 5C25FC [Preserve][LIKE][ILSEQ] +5C25FD 5C25FD [Preserve][LIKE][ILSEQ] +5C25FE 5C25FE [Preserve][LIKE][ILSEQ] +5C25FF 5C25FF [Preserve][LIKE][ILSEQ] +5C2700 2700 [Trivial] +5C2708 2708 [Trivial] +5C2709 2709 [Trivial] +5C270A 270A [Trivial] +5C270D 270D [Trivial] +5C271A 271A [Trivial] +5C2722 2722 [Trivial] +5C2725 2725 [Trivial] +5C2727 NULL [SyntErr] +5C2730 2730 [Trivial] +5C273F 273F [Trivial] +5C2740 2740 [Trivial] +5C275A 275A [Trivial] +5C275C NULL [SyntErr] +5C275F 275F [Trivial] +5C2761 2761 [Trivial] +5C2762 2762 [Trivial] +5C276E 276E [Trivial] +5C2772 2772 [Trivial] +5C2774 2774 [Trivial] +5C277E 277E [Trivial] +5C277F 277F [Trivial] +5C2780 2780 [Trivial][ILSEQ] +5C2781 2781 [Trivial][ILSEQ] +5C279F 279F [Trivial][ILSEQ] +5C27A0 27A0 [Trivial][ILSEQ] +5C27A1 27A1 [Trivial][ILSEQ] +5C27E0 27E0 [Trivial][ILSEQ] +5C27EF 27EF [Trivial][ILSEQ] +5C27F9 27F9 [Trivial][ILSEQ] +5C27FA 27FA [Trivial][ILSEQ] +5C27FC 27FC [Trivial][ILSEQ] +5C27FD 27FD [Trivial][ILSEQ] +5C27FE 27FE [Trivial][ILSEQ] +5C27FF 27FF [Trivial][ILSEQ] +5C3000 0000 [Regular] +5C3008 0008 [Regular] +5C3009 0009 [Regular] +5C300A 000A [Regular] +5C300D 000D [Regular] +5C301A 001A [Regular] +5C3022 0022 [Regular] +5C3025 0025 [Regular] +5C3027 NULL [SyntErr] +5C3030 0030 [Regular] +5C303F 003F [Regular] +5C3040 0040 [Regular] +5C305A 005A [Regular] +5C305C NULL [SyntErr] +5C305F 005F [Regular] +5C3061 0061 [Regular] +5C3062 0062 [Regular] +5C306E 006E [Regular] +5C3072 0072 [Regular] +5C3074 0074 [Regular] +5C307E 007E [Regular] +5C307F 007F [Regular] +5C3080 0080 [Regular][ILSEQ] +5C3081 0081 [Regular][ILSEQ] +5C309F 009F [Regular][ILSEQ] +5C30A0 00A0 [Regular][ILSEQ] +5C30A1 00A1 [Regular][ILSEQ] +5C30E0 00E0 [Regular][ILSEQ] +5C30EF 00EF [Regular][ILSEQ] +5C30F9 00F9 [Regular][ILSEQ] +5C30FA 00FA [Regular][ILSEQ] +5C30FC 00FC [Regular][ILSEQ] +5C30FD 00FD [Regular][ILSEQ] +5C30FE 00FE [Regular][ILSEQ] +5C30FF 00FF [Regular][ILSEQ] +5C3F00 3F00 [Trivial] +5C3F08 3F08 [Trivial] +5C3F09 3F09 [Trivial] +5C3F0A 3F0A [Trivial] +5C3F0D 3F0D [Trivial] +5C3F1A 3F1A [Trivial] +5C3F22 3F22 [Trivial] +5C3F25 3F25 [Trivial] +5C3F27 NULL [SyntErr] +5C3F30 3F30 [Trivial] +5C3F3F 3F3F [Trivial] +5C3F40 3F40 [Trivial] +5C3F5A 3F5A [Trivial] +5C3F5C NULL [SyntErr] +5C3F5F 3F5F [Trivial] +5C3F61 3F61 [Trivial] +5C3F62 3F62 [Trivial] +5C3F6E 3F6E [Trivial] +5C3F72 3F72 [Trivial] +5C3F74 3F74 [Trivial] +5C3F7E 3F7E [Trivial] +5C3F7F 3F7F [Trivial] +5C3F80 3F80 [Trivial][ILSEQ] +5C3F81 3F81 [Trivial][ILSEQ] +5C3F9F 3F9F [Trivial][ILSEQ] +5C3FA0 3FA0 [Trivial][ILSEQ] +5C3FA1 3FA1 [Trivial][ILSEQ] +5C3FE0 3FE0 [Trivial][ILSEQ] +5C3FEF 3FEF [Trivial][ILSEQ] +5C3FF9 3FF9 [Trivial][ILSEQ] +5C3FFA 3FFA [Trivial][ILSEQ] +5C3FFC 3FFC [Trivial][ILSEQ] +5C3FFD 3FFD [Trivial][ILSEQ] +5C3FFE 3FFE [Trivial][ILSEQ] +5C3FFF 3FFF [Trivial][ILSEQ] +5C4000 4000 [Trivial] +5C4008 4008 [Trivial] +5C4009 4009 [Trivial] +5C400A 400A [Trivial] +5C400D 400D [Trivial] +5C401A 401A [Trivial] +5C4022 4022 [Trivial] +5C4025 4025 [Trivial] +5C4027 NULL [SyntErr] +5C4030 4030 [Trivial] +5C403F 403F [Trivial] +5C4040 4040 [Trivial] +5C405A 405A [Trivial] +5C405C NULL [SyntErr] +5C405F 405F [Trivial] +5C4061 4061 [Trivial] +5C4062 4062 [Trivial] +5C406E 406E [Trivial] +5C4072 4072 [Trivial] +5C4074 4074 [Trivial] +5C407E 407E [Trivial] +5C407F 407F [Trivial] +5C4080 4080 [Trivial][ILSEQ] +5C4081 4081 [Trivial][ILSEQ] +5C409F 409F [Trivial][ILSEQ] +5C40A0 40A0 [Trivial][ILSEQ] +5C40A1 40A1 [Trivial][ILSEQ] +5C40E0 40E0 [Trivial][ILSEQ] +5C40EF 40EF [Trivial][ILSEQ] +5C40F9 40F9 [Trivial][ILSEQ] +5C40FA 40FA [Trivial][ILSEQ] +5C40FC 40FC [Trivial][ILSEQ] +5C40FD 40FD [Trivial][ILSEQ] +5C40FE 40FE [Trivial][ILSEQ] +5C40FF 40FF [Trivial][ILSEQ] +5C5A00 1A00 [Regular] +5C5A08 1A08 [Regular] +5C5A09 1A09 [Regular] +5C5A0A 1A0A [Regular] +5C5A0D 1A0D [Regular] +5C5A1A 1A1A [Regular] +5C5A22 1A22 [Regular] +5C5A25 1A25 [Regular] +5C5A27 NULL [SyntErr] +5C5A30 1A30 [Regular] +5C5A3F 1A3F [Regular] +5C5A40 1A40 [Regular] +5C5A5A 1A5A [Regular] +5C5A5C NULL [SyntErr] +5C5A5F 1A5F [Regular] +5C5A61 1A61 [Regular] +5C5A62 1A62 [Regular] +5C5A6E 1A6E [Regular] +5C5A72 1A72 [Regular] +5C5A74 1A74 [Regular] +5C5A7E 1A7E [Regular] +5C5A7F 1A7F [Regular] +5C5A80 1A80 [Regular][ILSEQ] +5C5A81 1A81 [Regular][ILSEQ] +5C5A9F 1A9F [Regular][ILSEQ] +5C5AA0 1AA0 [Regular][ILSEQ] +5C5AA1 1AA1 [Regular][ILSEQ] +5C5AE0 1AE0 [Regular][ILSEQ] +5C5AEF 1AEF [Regular][ILSEQ] +5C5AF9 1AF9 [Regular][ILSEQ] +5C5AFA 1AFA [Regular][ILSEQ] +5C5AFC 1AFC [Regular][ILSEQ] +5C5AFD 1AFD [Regular][ILSEQ] +5C5AFE 1AFE [Regular][ILSEQ] +5C5AFF 1AFF [Regular][ILSEQ] +5C5C00 5C00 [Regular] +5C5C08 5C08 [Regular] +5C5C09 5C09 [Regular] +5C5C0A 5C0A [Regular] +5C5C0D 5C0D [Regular] +5C5C1A 5C1A [Regular] +5C5C22 5C22 [Regular] +5C5C25 5C25 [Regular] +5C5C27 NULL [SyntErr] +5C5C30 5C30 [Regular] +5C5C3F 5C3F [Regular] +5C5C40 5C40 [Regular] +5C5C5A 5C5A [Regular] +5C5C5C NULL [SyntErr] +5C5C5F 5C5F [Regular] +5C5C61 5C61 [Regular] +5C5C62 5C62 [Regular] +5C5C6E 5C6E [Regular] +5C5C72 5C72 [Regular] +5C5C74 5C74 [Regular] +5C5C7E 5C7E [Regular] +5C5C7F 5C7F [Regular] +5C5C80 5C80 [Regular][ILSEQ] +5C5C81 5C81 [Regular][ILSEQ] +5C5C9F 5C9F [Regular][ILSEQ] +5C5CA0 5CA0 [Regular][ILSEQ] +5C5CA1 5CA1 [Regular][ILSEQ] +5C5CE0 5CE0 [Regular][ILSEQ] +5C5CEF 5CEF [Regular][ILSEQ] +5C5CF9 5CF9 [Regular][ILSEQ] +5C5CFA 5CFA [Regular][ILSEQ] +5C5CFC 5CFC [Regular][ILSEQ] +5C5CFD 5CFD [Regular][ILSEQ] +5C5CFE 5CFE [Regular][ILSEQ] +5C5CFF 5CFF [Regular][ILSEQ] +5C5F00 5C5F00 [Preserve][LIKE] +5C5F08 5C5F08 [Preserve][LIKE] +5C5F09 5C5F09 [Preserve][LIKE] +5C5F0A 5C5F0A [Preserve][LIKE] +5C5F0D 5C5F0D [Preserve][LIKE] +5C5F1A 5C5F1A [Preserve][LIKE] +5C5F22 5C5F22 [Preserve][LIKE] +5C5F25 5C5F25 [Preserve][LIKE] +5C5F27 NULL [SyntErr] +5C5F30 5C5F30 [Preserve][LIKE] +5C5F3F 5C5F3F [Preserve][LIKE] +5C5F40 5C5F40 [Preserve][LIKE] +5C5F5A 5C5F5A [Preserve][LIKE] +5C5F5C NULL [SyntErr] +5C5F5F 5C5F5F [Preserve][LIKE] +5C5F61 5C5F61 [Preserve][LIKE] +5C5F62 5C5F62 [Preserve][LIKE] +5C5F6E 5C5F6E [Preserve][LIKE] +5C5F72 5C5F72 [Preserve][LIKE] +5C5F74 5C5F74 [Preserve][LIKE] +5C5F7E 5C5F7E [Preserve][LIKE] +5C5F7F 5C5F7F [Preserve][LIKE] +5C5F80 5C5F80 [Preserve][LIKE][ILSEQ] +5C5F81 5C5F81 [Preserve][LIKE][ILSEQ] +5C5F9F 5C5F9F [Preserve][LIKE][ILSEQ] +5C5FA0 5C5FA0 [Preserve][LIKE][ILSEQ] +5C5FA1 5C5FA1 [Preserve][LIKE][ILSEQ] +5C5FE0 5C5FE0 [Preserve][LIKE][ILSEQ] +5C5FEF 5C5FEF [Preserve][LIKE][ILSEQ] +5C5FF9 5C5FF9 [Preserve][LIKE][ILSEQ] +5C5FFA 5C5FFA [Preserve][LIKE][ILSEQ] +5C5FFC 5C5FFC [Preserve][LIKE][ILSEQ] +5C5FFD 5C5FFD [Preserve][LIKE][ILSEQ] +5C5FFE 5C5FFE [Preserve][LIKE][ILSEQ] +5C5FFF 5C5FFF [Preserve][LIKE][ILSEQ] +5C6100 6100 [Trivial] +5C6108 6108 [Trivial] +5C6109 6109 [Trivial] +5C610A 610A [Trivial] +5C610D 610D [Trivial] +5C611A 611A [Trivial] +5C6122 6122 [Trivial] +5C6125 6125 [Trivial] +5C6127 NULL [SyntErr] +5C6130 6130 [Trivial] +5C613F 613F [Trivial] +5C6140 6140 [Trivial] +5C615A 615A [Trivial] +5C615C NULL [SyntErr] +5C615F 615F [Trivial] +5C6161 6161 [Trivial] +5C6162 6162 [Trivial] +5C616E 616E [Trivial] +5C6172 6172 [Trivial] +5C6174 6174 [Trivial] +5C617E 617E [Trivial] +5C617F 617F [Trivial] +5C6180 6180 [Trivial][ILSEQ] +5C6181 6181 [Trivial][ILSEQ] +5C619F 619F [Trivial][ILSEQ] +5C61A0 61A0 [Trivial][ILSEQ] +5C61A1 61A1 [Trivial][ILSEQ] +5C61E0 61E0 [Trivial][ILSEQ] +5C61EF 61EF [Trivial][ILSEQ] +5C61F9 61F9 [Trivial][ILSEQ] +5C61FA 61FA [Trivial][ILSEQ] +5C61FC 61FC [Trivial][ILSEQ] +5C61FD 61FD [Trivial][ILSEQ] +5C61FE 61FE [Trivial][ILSEQ] +5C61FF 61FF [Trivial][ILSEQ] +5C6200 0800 [Regular] +5C6208 0808 [Regular] +5C6209 0809 [Regular] +5C620A 080A [Regular] +5C620D 080D [Regular] +5C621A 081A [Regular] +5C6222 0822 [Regular] +5C6225 0825 [Regular] +5C6227 NULL [SyntErr] +5C6230 0830 [Regular] +5C623F 083F [Regular] +5C6240 0840 [Regular] +5C625A 085A [Regular] +5C625C NULL [SyntErr] +5C625F 085F [Regular] +5C6261 0861 [Regular] +5C6262 0862 [Regular] +5C626E 086E [Regular] +5C6272 0872 [Regular] +5C6274 0874 [Regular] +5C627E 087E [Regular] +5C627F 087F [Regular] +5C6280 0880 [Regular][ILSEQ] +5C6281 0881 [Regular][ILSEQ] +5C629F 089F [Regular][ILSEQ] +5C62A0 08A0 [Regular][ILSEQ] +5C62A1 08A1 [Regular][ILSEQ] +5C62E0 08E0 [Regular][ILSEQ] +5C62EF 08EF [Regular][ILSEQ] +5C62F9 08F9 [Regular][ILSEQ] +5C62FA 08FA [Regular][ILSEQ] +5C62FC 08FC [Regular][ILSEQ] +5C62FD 08FD [Regular][ILSEQ] +5C62FE 08FE [Regular][ILSEQ] +5C62FF 08FF [Regular][ILSEQ] +5C6E00 0A00 [Regular] +5C6E08 0A08 [Regular] +5C6E09 0A09 [Regular] +5C6E0A 0A0A [Regular] +5C6E0D 0A0D [Regular] +5C6E1A 0A1A [Regular] +5C6E22 0A22 [Regular] +5C6E25 0A25 [Regular] +5C6E27 NULL [SyntErr] +5C6E30 0A30 [Regular] +5C6E3F 0A3F [Regular] +5C6E40 0A40 [Regular] +5C6E5A 0A5A [Regular] +5C6E5C NULL [SyntErr] +5C6E5F 0A5F [Regular] +5C6E61 0A61 [Regular] +5C6E62 0A62 [Regular] +5C6E6E 0A6E [Regular] +5C6E72 0A72 [Regular] +5C6E74 0A74 [Regular] +5C6E7E 0A7E [Regular] +5C6E7F 0A7F [Regular] +5C6E80 0A80 [Regular][ILSEQ] +5C6E81 0A81 [Regular][ILSEQ] +5C6E9F 0A9F [Regular][ILSEQ] +5C6EA0 0AA0 [Regular][ILSEQ] +5C6EA1 0AA1 [Regular][ILSEQ] +5C6EE0 0AE0 [Regular][ILSEQ] +5C6EEF 0AEF [Regular][ILSEQ] +5C6EF9 0AF9 [Regular][ILSEQ] +5C6EFA 0AFA [Regular][ILSEQ] +5C6EFC 0AFC [Regular][ILSEQ] +5C6EFD 0AFD [Regular][ILSEQ] +5C6EFE 0AFE [Regular][ILSEQ] +5C6EFF 0AFF [Regular][ILSEQ] +5C7200 0D00 [Regular] +5C7208 0D08 [Regular] +5C7209 0D09 [Regular] +5C720A 0D0A [Regular] +5C720D 0D0D [Regular] +5C721A 0D1A [Regular] +5C7222 0D22 [Regular] +5C7225 0D25 [Regular] +5C7227 NULL [SyntErr] +5C7230 0D30 [Regular] +5C723F 0D3F [Regular] +5C7240 0D40 [Regular] +5C725A 0D5A [Regular] +5C725C NULL [SyntErr] +5C725F 0D5F [Regular] +5C7261 0D61 [Regular] +5C7262 0D62 [Regular] +5C726E 0D6E [Regular] +5C7272 0D72 [Regular] +5C7274 0D74 [Regular] +5C727E 0D7E [Regular] +5C727F 0D7F [Regular] +5C7280 0D80 [Regular][ILSEQ] +5C7281 0D81 [Regular][ILSEQ] +5C729F 0D9F [Regular][ILSEQ] +5C72A0 0DA0 [Regular][ILSEQ] +5C72A1 0DA1 [Regular][ILSEQ] +5C72E0 0DE0 [Regular][ILSEQ] +5C72EF 0DEF [Regular][ILSEQ] +5C72F9 0DF9 [Regular][ILSEQ] +5C72FA 0DFA [Regular][ILSEQ] +5C72FC 0DFC [Regular][ILSEQ] +5C72FD 0DFD [Regular][ILSEQ] +5C72FE 0DFE [Regular][ILSEQ] +5C72FF 0DFF [Regular][ILSEQ] +5C7400 0900 [Regular] +5C7408 0908 [Regular] +5C7409 0909 [Regular] +5C740A 090A [Regular] +5C740D 090D [Regular] +5C741A 091A [Regular] +5C7422 0922 [Regular] +5C7425 0925 [Regular] +5C7427 NULL [SyntErr] +5C7430 0930 [Regular] +5C743F 093F [Regular] +5C7440 0940 [Regular] +5C745A 095A [Regular] +5C745C NULL [SyntErr] +5C745F 095F [Regular] +5C7461 0961 [Regular] +5C7462 0962 [Regular] +5C746E 096E [Regular] +5C7472 0972 [Regular] +5C7474 0974 [Regular] +5C747E 097E [Regular] +5C747F 097F [Regular] +5C7480 0980 [Regular][ILSEQ] +5C7481 0981 [Regular][ILSEQ] +5C749F 099F [Regular][ILSEQ] +5C74A0 09A0 [Regular][ILSEQ] +5C74A1 09A1 [Regular][ILSEQ] +5C74E0 09E0 [Regular][ILSEQ] +5C74EF 09EF [Regular][ILSEQ] +5C74F9 09F9 [Regular][ILSEQ] +5C74FA 09FA [Regular][ILSEQ] +5C74FC 09FC [Regular][ILSEQ] +5C74FD 09FD [Regular][ILSEQ] +5C74FE 09FE [Regular][ILSEQ] +5C74FF 09FF [Regular][ILSEQ] +5C7E00 7E00 [Trivial] +5C7E08 7E08 [Trivial] +5C7E09 7E09 [Trivial] +5C7E0A 7E0A [Trivial] +5C7E0D 7E0D [Trivial] +5C7E1A 7E1A [Trivial] +5C7E22 7E22 [Trivial] +5C7E25 7E25 [Trivial] +5C7E27 NULL [SyntErr] +5C7E30 7E30 [Trivial] +5C7E3F 7E3F [Trivial] +5C7E40 7E40 [Trivial] +5C7E5A 7E5A [Trivial] +5C7E5C NULL [SyntErr] +5C7E5F 7E5F [Trivial] +5C7E61 7E61 [Trivial] +5C7E62 7E62 [Trivial] +5C7E6E 7E6E [Trivial] +5C7E72 7E72 [Trivial] +5C7E74 7E74 [Trivial] +5C7E7E 7E7E [Trivial] +5C7E7F 7E7F [Trivial] +5C7E80 7E80 [Trivial][ILSEQ] +5C7E81 7E81 [Trivial][ILSEQ] +5C7E9F 7E9F [Trivial][ILSEQ] +5C7EA0 7EA0 [Trivial][ILSEQ] +5C7EA1 7EA1 [Trivial][ILSEQ] +5C7EE0 7EE0 [Trivial][ILSEQ] +5C7EEF 7EEF [Trivial][ILSEQ] +5C7EF9 7EF9 [Trivial][ILSEQ] +5C7EFA 7EFA [Trivial][ILSEQ] +5C7EFC 7EFC [Trivial][ILSEQ] +5C7EFD 7EFD [Trivial][ILSEQ] +5C7EFE 7EFE [Trivial][ILSEQ] +5C7EFF 7EFF [Trivial][ILSEQ] +5C7F00 7F00 [Trivial] +5C7F08 7F08 [Trivial] +5C7F09 7F09 [Trivial] +5C7F0A 7F0A [Trivial] +5C7F0D 7F0D [Trivial] +5C7F1A 7F1A [Trivial] +5C7F22 7F22 [Trivial] +5C7F25 7F25 [Trivial] +5C7F27 NULL [SyntErr] +5C7F30 7F30 [Trivial] +5C7F3F 7F3F [Trivial] +5C7F40 7F40 [Trivial] +5C7F5A 7F5A [Trivial] +5C7F5C NULL [SyntErr] +5C7F5F 7F5F [Trivial] +5C7F61 7F61 [Trivial] +5C7F62 7F62 [Trivial] +5C7F6E 7F6E [Trivial] +5C7F72 7F72 [Trivial] +5C7F74 7F74 [Trivial] +5C7F7E 7F7E [Trivial] +5C7F7F 7F7F [Trivial] +5C7F80 7F80 [Trivial][ILSEQ] +5C7F81 7F81 [Trivial][ILSEQ] +5C7F9F 7F9F [Trivial][ILSEQ] +5C7FA0 7FA0 [Trivial][ILSEQ] +5C7FA1 7FA1 [Trivial][ILSEQ] +5C7FE0 7FE0 [Trivial][ILSEQ] +5C7FEF 7FEF [Trivial][ILSEQ] +5C7FF9 7FF9 [Trivial][ILSEQ] +5C7FFA 7FFA [Trivial][ILSEQ] +5C7FFC 7FFC [Trivial][ILSEQ] +5C7FFD 7FFD [Trivial][ILSEQ] +5C7FFE 7FFE [Trivial][ILSEQ] +5C7FFF 7FFF [Trivial][ILSEQ] +5C8000 8000 [Trivial][ILSEQ] +5C8008 8008 [Trivial][ILSEQ] +5C8009 8009 [Trivial][ILSEQ] +5C800A 800A [Trivial][ILSEQ] +5C800D 800D [Trivial][ILSEQ] +5C801A 801A [Trivial][ILSEQ] +5C8022 8022 [Trivial][ILSEQ] +5C8025 8025 [Trivial][ILSEQ] +5C8027 NULL [SyntErr] +5C8030 8030 [Trivial][ILSEQ] +5C803F 803F [Trivial][ILSEQ] +5C8040 8040 [Trivial][ILSEQ] +5C805A 805A [Trivial][ILSEQ] +5C805C NULL [SyntErr] +5C805F 805F [Trivial][ILSEQ] +5C8061 8061 [Trivial][ILSEQ] +5C8062 8062 [Trivial][ILSEQ] +5C806E 806E [Trivial][ILSEQ] +5C8072 8072 [Trivial][ILSEQ] +5C8074 8074 [Trivial][ILSEQ] +5C807E 807E [Trivial][ILSEQ] +5C807F 807F [Trivial][ILSEQ] +5C8080 8080 [Trivial][ILSEQ] +5C8081 8081 [Trivial][ILSEQ] +5C809F 809F [Trivial][ILSEQ] +5C80A0 80A0 [Trivial][ILSEQ] +5C80A1 80A1 [Trivial][ILSEQ] +5C80E0 80E0 [Trivial][ILSEQ] +5C80EF 80EF [Trivial][ILSEQ] +5C80F9 80F9 [Trivial][ILSEQ] +5C80FA 80FA [Trivial][ILSEQ] +5C80FC 80FC [Trivial][ILSEQ] +5C80FD 80FD [Trivial][ILSEQ] +5C80FE 80FE [Trivial][ILSEQ] +5C80FF 80FF [Trivial][ILSEQ] +5C8100 8100 [Trivial][ILSEQ] +5C8108 8108 [Trivial][ILSEQ] +5C8109 8109 [Trivial][ILSEQ] +5C810A 810A [Trivial][ILSEQ] +5C810D 810D [Trivial][ILSEQ] +5C811A 811A [Trivial][ILSEQ] +5C8122 8122 [Trivial][ILSEQ] +5C8125 8125 [Trivial][ILSEQ] +5C8127 NULL [SyntErr] +5C8130 8130 [Trivial][ILSEQ] +5C813F 813F [Trivial][ILSEQ] +5C8140 8140 [Trivial][ILSEQ] +5C815A 815A [Trivial][ILSEQ] +5C815C NULL [SyntErr] +5C815F 815F [Trivial][ILSEQ] +5C8161 8161 [Trivial][ILSEQ] +5C8162 8162 [Trivial][ILSEQ] +5C816E 816E [Trivial][ILSEQ] +5C8172 8172 [Trivial][ILSEQ] +5C8174 8174 [Trivial][ILSEQ] +5C817E 817E [Trivial][ILSEQ] +5C817F 817F [Trivial][ILSEQ] +5C8180 8180 [Trivial][ILSEQ] +5C8181 8181 [Trivial][ILSEQ] +5C819F 819F [Trivial][ILSEQ] +5C81A0 81A0 [Trivial][ILSEQ] +5C81A1 81A1 [Trivial][ILSEQ] +5C81E0 81E0 [Trivial][ILSEQ] +5C81EF 81EF [Trivial][ILSEQ] +5C81F9 81F9 [Trivial][ILSEQ] +5C81FA 81FA [Trivial][ILSEQ] +5C81FC 81FC [Trivial][ILSEQ] +5C81FD 81FD [Trivial][ILSEQ] +5C81FE 81FE [Trivial][ILSEQ] +5C81FF 81FF [Trivial][ILSEQ] +5C9F00 9F00 [Trivial][ILSEQ] +5C9F08 9F08 [Trivial][ILSEQ] +5C9F09 9F09 [Trivial][ILSEQ] +5C9F0A 9F0A [Trivial][ILSEQ] +5C9F0D 9F0D [Trivial][ILSEQ] +5C9F1A 9F1A [Trivial][ILSEQ] +5C9F22 9F22 [Trivial][ILSEQ] +5C9F25 9F25 [Trivial][ILSEQ] +5C9F27 NULL [SyntErr] +5C9F30 9F30 [Trivial][ILSEQ] +5C9F3F 9F3F [Trivial][ILSEQ] +5C9F40 9F40 [Trivial][ILSEQ] +5C9F5A 9F5A [Trivial][ILSEQ] +5C9F5C NULL [SyntErr] +5C9F5F 9F5F [Trivial][ILSEQ] +5C9F61 9F61 [Trivial][ILSEQ] +5C9F62 9F62 [Trivial][ILSEQ] +5C9F6E 9F6E [Trivial][ILSEQ] +5C9F72 9F72 [Trivial][ILSEQ] +5C9F74 9F74 [Trivial][ILSEQ] +5C9F7E 9F7E [Trivial][ILSEQ] +5C9F7F 9F7F [Trivial][ILSEQ] +5C9F80 9F80 [Trivial][ILSEQ] +5C9F81 9F81 [Trivial][ILSEQ] +5C9F9F 9F9F [Trivial][ILSEQ] +5C9FA0 9FA0 [Trivial][ILSEQ] +5C9FA1 9FA1 [Trivial][ILSEQ] +5C9FE0 9FE0 [Trivial][ILSEQ] +5C9FEF 9FEF [Trivial][ILSEQ] +5C9FF9 9FF9 [Trivial][ILSEQ] +5C9FFA 9FFA [Trivial][ILSEQ] +5C9FFC 9FFC [Trivial][ILSEQ] +5C9FFD 9FFD [Trivial][ILSEQ] +5C9FFE 9FFE [Trivial][ILSEQ] +5C9FFF 9FFF [Trivial][ILSEQ] +5CA000 A000 [Trivial][ILSEQ] +5CA008 A008 [Trivial][ILSEQ] +5CA009 A009 [Trivial][ILSEQ] +5CA00A A00A [Trivial][ILSEQ] +5CA00D A00D [Trivial][ILSEQ] +5CA01A A01A [Trivial][ILSEQ] +5CA022 A022 [Trivial][ILSEQ] +5CA025 A025 [Trivial][ILSEQ] +5CA027 NULL [SyntErr] +5CA030 A030 [Trivial][ILSEQ] +5CA03F A03F [Trivial][ILSEQ] +5CA040 A040 [Trivial][ILSEQ] +5CA05A A05A [Trivial][ILSEQ] +5CA05C NULL [SyntErr] +5CA05F A05F [Trivial][ILSEQ] +5CA061 A061 [Trivial][ILSEQ] +5CA062 A062 [Trivial][ILSEQ] +5CA06E A06E [Trivial][ILSEQ] +5CA072 A072 [Trivial][ILSEQ] +5CA074 A074 [Trivial][ILSEQ] +5CA07E A07E [Trivial][ILSEQ] +5CA07F A07F [Trivial][ILSEQ] +5CA080 A080 [Trivial][ILSEQ] +5CA081 A081 [Trivial][ILSEQ] +5CA09F A09F [Trivial][ILSEQ] +5CA0A0 A0A0 [Trivial][ILSEQ] +5CA0A1 A0A1 [Trivial][ILSEQ] +5CA0E0 A0E0 [Trivial][ILSEQ] +5CA0EF A0EF [Trivial][ILSEQ] +5CA0F9 A0F9 [Trivial][ILSEQ] +5CA0FA A0FA [Trivial][ILSEQ] +5CA0FC A0FC [Trivial][ILSEQ] +5CA0FD A0FD [Trivial][ILSEQ] +5CA0FE A0FE [Trivial][ILSEQ] +5CA0FF A0FF [Trivial][ILSEQ] +5CA100 A100 [Trivial][ILSEQ] +5CA108 A108 [Trivial][ILSEQ] +5CA109 A109 [Trivial][ILSEQ] +5CA10A A10A [Trivial][ILSEQ] +5CA10D A10D [Trivial][ILSEQ] +5CA11A A11A [Trivial][ILSEQ] +5CA122 A122 [Trivial][ILSEQ] +5CA125 A125 [Trivial][ILSEQ] +5CA127 NULL [SyntErr] +5CA130 A130 [Trivial][ILSEQ] +5CA13F A13F [Trivial][ILSEQ] +5CA140 A140 [Trivial] +5CA15A A15A [Trivial] +5CA15C NULL [SyntErr] +5CA15F A15F [Trivial] +5CA161 A161 [Trivial] +5CA162 A162 [Trivial] +5CA16E A16E [Trivial] +5CA172 A172 [Trivial] +5CA174 A174 [Trivial] +5CA17E A17E [Trivial] +5CA17F A17F [Trivial][ILSEQ] +5CA180 A180 [Trivial][ILSEQ] +5CA181 A181 [Trivial][ILSEQ] +5CA19F A19F [Trivial][ILSEQ] +5CA1A0 A1A0 [Trivial][ILSEQ] +5CA1A1 A1A1 [Trivial] +5CA1E0 A1E0 [Trivial] +5CA1EF A1EF [Trivial] +5CA1F9 A1F9 [Trivial] +5CA1FA A1FA [Trivial] +5CA1FC A1FC [Trivial] +5CA1FD A1FD [Trivial] +5CA1FE A1FE [Trivial] +5CA1FF A1FF [Trivial][ILSEQ] +5CE000 E000 [Trivial][ILSEQ] +5CE008 E008 [Trivial][ILSEQ] +5CE009 E009 [Trivial][ILSEQ] +5CE00A E00A [Trivial][ILSEQ] +5CE00D E00D [Trivial][ILSEQ] +5CE01A E01A [Trivial][ILSEQ] +5CE022 E022 [Trivial][ILSEQ] +5CE025 E025 [Trivial][ILSEQ] +5CE027 NULL [SyntErr] +5CE030 E030 [Trivial][ILSEQ] +5CE03F E03F [Trivial][ILSEQ] +5CE040 E040 [Trivial] +5CE05A E05A [Trivial] +5CE05C NULL [SyntErr] +5CE05F E05F [Trivial] +5CE061 E061 [Trivial] +5CE062 E062 [Trivial] +5CE06E E06E [Trivial] +5CE072 E072 [Trivial] +5CE074 E074 [Trivial] +5CE07E E07E [Trivial] +5CE07F E07F [Trivial][ILSEQ] +5CE080 E080 [Trivial][ILSEQ] +5CE081 E081 [Trivial][ILSEQ] +5CE09F E09F [Trivial][ILSEQ] +5CE0A0 E0A0 [Trivial][ILSEQ] +5CE0A1 E0A1 [Trivial] +5CE0E0 E0E0 [Trivial] +5CE0EF E0EF [Trivial] +5CE0F9 E0F9 [Trivial] +5CE0FA E0FA [Trivial] +5CE0FC E0FC [Trivial] +5CE0FD E0FD [Trivial] +5CE0FE E0FE [Trivial] +5CE0FF E0FF [Trivial][ILSEQ] +5CEF00 EF00 [Trivial][ILSEQ] +5CEF08 EF08 [Trivial][ILSEQ] +5CEF09 EF09 [Trivial][ILSEQ] +5CEF0A EF0A [Trivial][ILSEQ] +5CEF0D EF0D [Trivial][ILSEQ] +5CEF1A EF1A [Trivial][ILSEQ] +5CEF22 EF22 [Trivial][ILSEQ] +5CEF25 EF25 [Trivial][ILSEQ] +5CEF27 NULL [SyntErr] +5CEF30 EF30 [Trivial][ILSEQ] +5CEF3F EF3F [Trivial][ILSEQ] +5CEF40 EF40 [Trivial] +5CEF5A EF5A [Trivial] +5CEF5C NULL [SyntErr] +5CEF5F EF5F [Trivial] +5CEF61 EF61 [Trivial] +5CEF62 EF62 [Trivial] +5CEF6E EF6E [Trivial] +5CEF72 EF72 [Trivial] +5CEF74 EF74 [Trivial] +5CEF7E EF7E [Trivial] +5CEF7F EF7F [Trivial][ILSEQ] +5CEF80 EF80 [Trivial][ILSEQ] +5CEF81 EF81 [Trivial][ILSEQ] +5CEF9F EF9F [Trivial][ILSEQ] +5CEFA0 EFA0 [Trivial][ILSEQ] +5CEFA1 EFA1 [Trivial] +5CEFE0 EFE0 [Trivial] +5CEFEF EFEF [Trivial] +5CEFF9 EFF9 [Trivial] +5CEFFA EFFA [Trivial] +5CEFFC EFFC [Trivial] +5CEFFD EFFD [Trivial] +5CEFFE EFFE [Trivial] +5CEFFF EFFF [Trivial][ILSEQ] +5CF900 F900 [Trivial][ILSEQ] +5CF908 F908 [Trivial][ILSEQ] +5CF909 F909 [Trivial][ILSEQ] +5CF90A F90A [Trivial][ILSEQ] +5CF90D F90D [Trivial][ILSEQ] +5CF91A F91A [Trivial][ILSEQ] +5CF922 F922 [Trivial][ILSEQ] +5CF925 F925 [Trivial][ILSEQ] +5CF927 NULL [SyntErr] +5CF930 F930 [Trivial][ILSEQ] +5CF93F F93F [Trivial][ILSEQ] +5CF940 F940 [Trivial] +5CF95A F95A [Trivial] +5CF95C NULL [SyntErr] +5CF95F F95F [Trivial] +5CF961 F961 [Trivial] +5CF962 F962 [Trivial] +5CF96E F96E [Trivial] +5CF972 F972 [Trivial] +5CF974 F974 [Trivial] +5CF97E F97E [Trivial] +5CF97F F97F [Trivial][ILSEQ] +5CF980 F980 [Trivial][ILSEQ] +5CF981 F981 [Trivial][ILSEQ] +5CF99F F99F [Trivial][ILSEQ] +5CF9A0 F9A0 [Trivial][ILSEQ] +5CF9A1 F9A1 [Trivial] +5CF9E0 F9E0 [Trivial] +5CF9EF F9EF [Trivial] +5CF9F9 F9F9 [Trivial] +5CF9FA F9FA [Trivial] +5CF9FC F9FC [Trivial] +5CF9FD F9FD [Trivial] +5CF9FE F9FE [Trivial] +5CF9FF F9FF [Trivial][ILSEQ] +5CFA00 FA00 [Trivial][ILSEQ] +5CFA08 FA08 [Trivial][ILSEQ] +5CFA09 FA09 [Trivial][ILSEQ] +5CFA0A FA0A [Trivial][ILSEQ] +5CFA0D FA0D [Trivial][ILSEQ] +5CFA1A FA1A [Trivial][ILSEQ] +5CFA22 FA22 [Trivial][ILSEQ] +5CFA25 FA25 [Trivial][ILSEQ] +5CFA27 NULL [SyntErr] +5CFA30 FA30 [Trivial][ILSEQ] +5CFA3F FA3F [Trivial][ILSEQ] +5CFA40 FA40 [Trivial][ILSEQ] +5CFA5A FA5A [Trivial][ILSEQ] +5CFA5C NULL [SyntErr] +5CFA5F FA5F [Trivial][ILSEQ] +5CFA61 FA61 [Trivial][ILSEQ] +5CFA62 FA62 [Trivial][ILSEQ] +5CFA6E FA6E [Trivial][ILSEQ] +5CFA72 FA72 [Trivial][ILSEQ] +5CFA74 FA74 [Trivial][ILSEQ] +5CFA7E FA7E [Trivial][ILSEQ] +5CFA7F FA7F [Trivial][ILSEQ] +5CFA80 FA80 [Trivial][ILSEQ] +5CFA81 FA81 [Trivial][ILSEQ] +5CFA9F FA9F [Trivial][ILSEQ] +5CFAA0 FAA0 [Trivial][ILSEQ] +5CFAA1 FAA1 [Trivial][ILSEQ] +5CFAE0 FAE0 [Trivial][ILSEQ] +5CFAEF FAEF [Trivial][ILSEQ] +5CFAF9 FAF9 [Trivial][ILSEQ] +5CFAFA FAFA [Trivial][ILSEQ] +5CFAFC FAFC [Trivial][ILSEQ] +5CFAFD FAFD [Trivial][ILSEQ] +5CFAFE FAFE [Trivial][ILSEQ] +5CFAFF FAFF [Trivial][ILSEQ] +5CFC00 FC00 [Trivial][ILSEQ] +5CFC08 FC08 [Trivial][ILSEQ] +5CFC09 FC09 [Trivial][ILSEQ] +5CFC0A FC0A [Trivial][ILSEQ] +5CFC0D FC0D [Trivial][ILSEQ] +5CFC1A FC1A [Trivial][ILSEQ] +5CFC22 FC22 [Trivial][ILSEQ] +5CFC25 FC25 [Trivial][ILSEQ] +5CFC27 NULL [SyntErr] +5CFC30 FC30 [Trivial][ILSEQ] +5CFC3F FC3F [Trivial][ILSEQ] +5CFC40 FC40 [Trivial][ILSEQ] +5CFC5A FC5A [Trivial][ILSEQ] +5CFC5C NULL [SyntErr] +5CFC5F FC5F [Trivial][ILSEQ] +5CFC61 FC61 [Trivial][ILSEQ] +5CFC62 FC62 [Trivial][ILSEQ] +5CFC6E FC6E [Trivial][ILSEQ] +5CFC72 FC72 [Trivial][ILSEQ] +5CFC74 FC74 [Trivial][ILSEQ] +5CFC7E FC7E [Trivial][ILSEQ] +5CFC7F FC7F [Trivial][ILSEQ] +5CFC80 FC80 [Trivial][ILSEQ] +5CFC81 FC81 [Trivial][ILSEQ] +5CFC9F FC9F [Trivial][ILSEQ] +5CFCA0 FCA0 [Trivial][ILSEQ] +5CFCA1 FCA1 [Trivial][ILSEQ] +5CFCE0 FCE0 [Trivial][ILSEQ] +5CFCEF FCEF [Trivial][ILSEQ] +5CFCF9 FCF9 [Trivial][ILSEQ] +5CFCFA FCFA [Trivial][ILSEQ] +5CFCFC FCFC [Trivial][ILSEQ] +5CFCFD FCFD [Trivial][ILSEQ] +5CFCFE FCFE [Trivial][ILSEQ] +5CFCFF FCFF [Trivial][ILSEQ] +5CFD00 FD00 [Trivial][ILSEQ] +5CFD08 FD08 [Trivial][ILSEQ] +5CFD09 FD09 [Trivial][ILSEQ] +5CFD0A FD0A [Trivial][ILSEQ] +5CFD0D FD0D [Trivial][ILSEQ] +5CFD1A FD1A [Trivial][ILSEQ] +5CFD22 FD22 [Trivial][ILSEQ] +5CFD25 FD25 [Trivial][ILSEQ] +5CFD27 NULL [SyntErr] +5CFD30 FD30 [Trivial][ILSEQ] +5CFD3F FD3F [Trivial][ILSEQ] +5CFD40 FD40 [Trivial][ILSEQ] +5CFD5A FD5A [Trivial][ILSEQ] +5CFD5C NULL [SyntErr] +5CFD5F FD5F [Trivial][ILSEQ] +5CFD61 FD61 [Trivial][ILSEQ] +5CFD62 FD62 [Trivial][ILSEQ] +5CFD6E FD6E [Trivial][ILSEQ] +5CFD72 FD72 [Trivial][ILSEQ] +5CFD74 FD74 [Trivial][ILSEQ] +5CFD7E FD7E [Trivial][ILSEQ] +5CFD7F FD7F [Trivial][ILSEQ] +5CFD80 FD80 [Trivial][ILSEQ] +5CFD81 FD81 [Trivial][ILSEQ] +5CFD9F FD9F [Trivial][ILSEQ] +5CFDA0 FDA0 [Trivial][ILSEQ] +5CFDA1 FDA1 [Trivial][ILSEQ] +5CFDE0 FDE0 [Trivial][ILSEQ] +5CFDEF FDEF [Trivial][ILSEQ] +5CFDF9 FDF9 [Trivial][ILSEQ] +5CFDFA FDFA [Trivial][ILSEQ] +5CFDFC FDFC [Trivial][ILSEQ] +5CFDFD FDFD [Trivial][ILSEQ] +5CFDFE FDFE [Trivial][ILSEQ] +5CFDFF FDFF [Trivial][ILSEQ] +5CFE00 FE00 [Trivial][ILSEQ] +5CFE08 FE08 [Trivial][ILSEQ] +5CFE09 FE09 [Trivial][ILSEQ] +5CFE0A FE0A [Trivial][ILSEQ] +5CFE0D FE0D [Trivial][ILSEQ] +5CFE1A FE1A [Trivial][ILSEQ] +5CFE22 FE22 [Trivial][ILSEQ] +5CFE25 FE25 [Trivial][ILSEQ] +5CFE27 NULL [SyntErr] +5CFE30 FE30 [Trivial][ILSEQ] +5CFE3F FE3F [Trivial][ILSEQ] +5CFE40 FE40 [Trivial][ILSEQ] +5CFE5A FE5A [Trivial][ILSEQ] +5CFE5C NULL [SyntErr] +5CFE5F FE5F [Trivial][ILSEQ] +5CFE61 FE61 [Trivial][ILSEQ] +5CFE62 FE62 [Trivial][ILSEQ] +5CFE6E FE6E [Trivial][ILSEQ] +5CFE72 FE72 [Trivial][ILSEQ] +5CFE74 FE74 [Trivial][ILSEQ] +5CFE7E FE7E [Trivial][ILSEQ] +5CFE7F FE7F [Trivial][ILSEQ] +5CFE80 FE80 [Trivial][ILSEQ] +5CFE81 FE81 [Trivial][ILSEQ] +5CFE9F FE9F [Trivial][ILSEQ] +5CFEA0 FEA0 [Trivial][ILSEQ] +5CFEA1 FEA1 [Trivial][ILSEQ] +5CFEE0 FEE0 [Trivial][ILSEQ] +5CFEEF FEEF [Trivial][ILSEQ] +5CFEF9 FEF9 [Trivial][ILSEQ] +5CFEFA FEFA [Trivial][ILSEQ] +5CFEFC FEFC [Trivial][ILSEQ] +5CFEFD FEFD [Trivial][ILSEQ] +5CFEFE FEFE [Trivial][ILSEQ] +5CFEFF FEFF [Trivial][ILSEQ] +5CFF00 FF00 [Trivial][ILSEQ] +5CFF08 FF08 [Trivial][ILSEQ] +5CFF09 FF09 [Trivial][ILSEQ] +5CFF0A FF0A [Trivial][ILSEQ] +5CFF0D FF0D [Trivial][ILSEQ] +5CFF1A FF1A [Trivial][ILSEQ] +5CFF22 FF22 [Trivial][ILSEQ] +5CFF25 FF25 [Trivial][ILSEQ] +5CFF27 NULL [SyntErr] +5CFF30 FF30 [Trivial][ILSEQ] +5CFF3F FF3F [Trivial][ILSEQ] +5CFF40 FF40 [Trivial][ILSEQ] +5CFF5A FF5A [Trivial][ILSEQ] +5CFF5C NULL [SyntErr] +5CFF5F FF5F [Trivial][ILSEQ] +5CFF61 FF61 [Trivial][ILSEQ] +5CFF62 FF62 [Trivial][ILSEQ] +5CFF6E FF6E [Trivial][ILSEQ] +5CFF72 FF72 [Trivial][ILSEQ] +5CFF74 FF74 [Trivial][ILSEQ] +5CFF7E FF7E [Trivial][ILSEQ] +5CFF7F FF7F [Trivial][ILSEQ] +5CFF80 FF80 [Trivial][ILSEQ] +5CFF81 FF81 [Trivial][ILSEQ] +5CFF9F FF9F [Trivial][ILSEQ] +5CFFA0 FFA0 [Trivial][ILSEQ] +5CFFA1 FFA1 [Trivial][ILSEQ] +5CFFE0 FFE0 [Trivial][ILSEQ] +5CFFEF FFEF [Trivial][ILSEQ] +5CFFF9 FFF9 [Trivial][ILSEQ] +5CFFFA FFFA [Trivial][ILSEQ] +5CFFFC FFFC [Trivial][ILSEQ] +5CFFFD FFFD [Trivial][ILSEQ] +5CFFFE FFFE [Trivial][ILSEQ] +5CFFFF FFFF [Trivial][ILSEQ] +5C005C00 0000 [Trivial] +5C005C08 0008 [Trivial] +5C005C09 0009 [Trivial] +5C005C0A 000A [Trivial] +5C005C0D 000D [Trivial] +5C005C1A 001A [Trivial] +5C005C22 0022 [Trivial] +5C005C25 005C25 [Regular] +5C005C27 0027 [Trivial] +5C005C30 0000 [Regular] +5C005C3F 003F [Trivial] +5C005C40 0040 [Trivial] +5C005C5A 001A [Regular] +5C005C5C 005C [Regular] +5C005C5F 005C5F [Regular] +5C005C61 0061 [Trivial] +5C005C62 0008 [Regular] +5C005C6E 000A [Regular] +5C005C72 000D [Regular] +5C005C74 0009 [Regular] +5C005C7E 007E [Trivial] +5C005C7F 007F [Trivial] +5C005C80 0080 [Trivial][ILSEQ] +5C005C81 0081 [Trivial][ILSEQ] +5C005C9F 009F [Trivial][ILSEQ] +5C005CA0 00A0 [Trivial][ILSEQ] +5C005CA1 00A1 [Trivial][ILSEQ] +5C005CE0 00E0 [Trivial][ILSEQ] +5C005CEF 00EF [Trivial][ILSEQ] +5C005CF9 00F9 [Trivial][ILSEQ] +5C005CFA 00FA [Trivial][ILSEQ] +5C005CFC 00FC [Trivial][ILSEQ] +5C005CFD 00FD [Trivial][ILSEQ] +5C005CFE 00FE [Trivial][ILSEQ] +5C005CFF 00FF [Trivial][ILSEQ] +5C085C00 0800 [Trivial] +5C085C08 0808 [Trivial] +5C085C09 0809 [Trivial] +5C085C0A 080A [Trivial] +5C085C0D 080D [Trivial] +5C085C1A 081A [Trivial] +5C085C22 0822 [Trivial] +5C085C25 085C25 [Regular] +5C085C27 0827 [Trivial] +5C085C30 0800 [Regular] +5C085C3F 083F [Trivial] +5C085C40 0840 [Trivial] +5C085C5A 081A [Regular] +5C085C5C 085C [Regular] +5C085C5F 085C5F [Regular] +5C085C61 0861 [Trivial] +5C085C62 0808 [Regular] +5C085C6E 080A [Regular] +5C085C72 080D [Regular] +5C085C74 0809 [Regular] +5C085C7E 087E [Trivial] +5C085C7F 087F [Trivial] +5C085C80 0880 [Trivial][ILSEQ] +5C085C81 0881 [Trivial][ILSEQ] +5C085C9F 089F [Trivial][ILSEQ] +5C085CA0 08A0 [Trivial][ILSEQ] +5C085CA1 08A1 [Trivial][ILSEQ] +5C085CE0 08E0 [Trivial][ILSEQ] +5C085CEF 08EF [Trivial][ILSEQ] +5C085CF9 08F9 [Trivial][ILSEQ] +5C085CFA 08FA [Trivial][ILSEQ] +5C085CFC 08FC [Trivial][ILSEQ] +5C085CFD 08FD [Trivial][ILSEQ] +5C085CFE 08FE [Trivial][ILSEQ] +5C085CFF 08FF [Trivial][ILSEQ] +5C095C00 0900 [Trivial] +5C095C08 0908 [Trivial] +5C095C09 0909 [Trivial] +5C095C0A 090A [Trivial] +5C095C0D 090D [Trivial] +5C095C1A 091A [Trivial] +5C095C22 0922 [Trivial] +5C095C25 095C25 [Regular] +5C095C27 0927 [Trivial] +5C095C30 0900 [Regular] +5C095C3F 093F [Trivial] +5C095C40 0940 [Trivial] +5C095C5A 091A [Regular] +5C095C5C 095C [Regular] +5C095C5F 095C5F [Regular] +5C095C61 0961 [Trivial] +5C095C62 0908 [Regular] +5C095C6E 090A [Regular] +5C095C72 090D [Regular] +5C095C74 0909 [Regular] +5C095C7E 097E [Trivial] +5C095C7F 097F [Trivial] +5C095C80 0980 [Trivial][ILSEQ] +5C095C81 0981 [Trivial][ILSEQ] +5C095C9F 099F [Trivial][ILSEQ] +5C095CA0 09A0 [Trivial][ILSEQ] +5C095CA1 09A1 [Trivial][ILSEQ] +5C095CE0 09E0 [Trivial][ILSEQ] +5C095CEF 09EF [Trivial][ILSEQ] +5C095CF9 09F9 [Trivial][ILSEQ] +5C095CFA 09FA [Trivial][ILSEQ] +5C095CFC 09FC [Trivial][ILSEQ] +5C095CFD 09FD [Trivial][ILSEQ] +5C095CFE 09FE [Trivial][ILSEQ] +5C095CFF 09FF [Trivial][ILSEQ] +5C0A5C00 0A00 [Trivial] +5C0A5C08 0A08 [Trivial] +5C0A5C09 0A09 [Trivial] +5C0A5C0A 0A0A [Trivial] +5C0A5C0D 0A0D [Trivial] +5C0A5C1A 0A1A [Trivial] +5C0A5C22 0A22 [Trivial] +5C0A5C25 0A5C25 [Regular] +5C0A5C27 0A27 [Trivial] +5C0A5C30 0A00 [Regular] +5C0A5C3F 0A3F [Trivial] +5C0A5C40 0A40 [Trivial] +5C0A5C5A 0A1A [Regular] +5C0A5C5C 0A5C [Regular] +5C0A5C5F 0A5C5F [Regular] +5C0A5C61 0A61 [Trivial] +5C0A5C62 0A08 [Regular] +5C0A5C6E 0A0A [Regular] +5C0A5C72 0A0D [Regular] +5C0A5C74 0A09 [Regular] +5C0A5C7E 0A7E [Trivial] +5C0A5C7F 0A7F [Trivial] +5C0A5C80 0A80 [Trivial][ILSEQ] +5C0A5C81 0A81 [Trivial][ILSEQ] +5C0A5C9F 0A9F [Trivial][ILSEQ] +5C0A5CA0 0AA0 [Trivial][ILSEQ] +5C0A5CA1 0AA1 [Trivial][ILSEQ] +5C0A5CE0 0AE0 [Trivial][ILSEQ] +5C0A5CEF 0AEF [Trivial][ILSEQ] +5C0A5CF9 0AF9 [Trivial][ILSEQ] +5C0A5CFA 0AFA [Trivial][ILSEQ] +5C0A5CFC 0AFC [Trivial][ILSEQ] +5C0A5CFD 0AFD [Trivial][ILSEQ] +5C0A5CFE 0AFE [Trivial][ILSEQ] +5C0A5CFF 0AFF [Trivial][ILSEQ] +5C0D5C00 0D00 [Trivial] +5C0D5C08 0D08 [Trivial] +5C0D5C09 0D09 [Trivial] +5C0D5C0A 0D0A [Trivial] +5C0D5C0D 0D0D [Trivial] +5C0D5C1A 0D1A [Trivial] +5C0D5C22 0D22 [Trivial] +5C0D5C25 0D5C25 [Regular] +5C0D5C27 0D27 [Trivial] +5C0D5C30 0D00 [Regular] +5C0D5C3F 0D3F [Trivial] +5C0D5C40 0D40 [Trivial] +5C0D5C5A 0D1A [Regular] +5C0D5C5C 0D5C [Regular] +5C0D5C5F 0D5C5F [Regular] +5C0D5C61 0D61 [Trivial] +5C0D5C62 0D08 [Regular] +5C0D5C6E 0D0A [Regular] +5C0D5C72 0D0D [Regular] +5C0D5C74 0D09 [Regular] +5C0D5C7E 0D7E [Trivial] +5C0D5C7F 0D7F [Trivial] +5C0D5C80 0D80 [Trivial][ILSEQ] +5C0D5C81 0D81 [Trivial][ILSEQ] +5C0D5C9F 0D9F [Trivial][ILSEQ] +5C0D5CA0 0DA0 [Trivial][ILSEQ] +5C0D5CA1 0DA1 [Trivial][ILSEQ] +5C0D5CE0 0DE0 [Trivial][ILSEQ] +5C0D5CEF 0DEF [Trivial][ILSEQ] +5C0D5CF9 0DF9 [Trivial][ILSEQ] +5C0D5CFA 0DFA [Trivial][ILSEQ] +5C0D5CFC 0DFC [Trivial][ILSEQ] +5C0D5CFD 0DFD [Trivial][ILSEQ] +5C0D5CFE 0DFE [Trivial][ILSEQ] +5C0D5CFF 0DFF [Trivial][ILSEQ] +5C1A5C00 1A00 [Trivial] +5C1A5C08 1A08 [Trivial] +5C1A5C09 1A09 [Trivial] +5C1A5C0A 1A0A [Trivial] +5C1A5C0D 1A0D [Trivial] +5C1A5C1A 1A1A [Trivial] +5C1A5C22 1A22 [Trivial] +5C1A5C25 1A5C25 [Regular] +5C1A5C27 1A27 [Trivial] +5C1A5C30 1A00 [Regular] +5C1A5C3F 1A3F [Trivial] +5C1A5C40 1A40 [Trivial] +5C1A5C5A 1A1A [Regular] +5C1A5C5C 1A5C [Regular] +5C1A5C5F 1A5C5F [Regular] +5C1A5C61 1A61 [Trivial] +5C1A5C62 1A08 [Regular] +5C1A5C6E 1A0A [Regular] +5C1A5C72 1A0D [Regular] +5C1A5C74 1A09 [Regular] +5C1A5C7E 1A7E [Trivial] +5C1A5C7F 1A7F [Trivial] +5C1A5C80 1A80 [Trivial][ILSEQ] +5C1A5C81 1A81 [Trivial][ILSEQ] +5C1A5C9F 1A9F [Trivial][ILSEQ] +5C1A5CA0 1AA0 [Trivial][ILSEQ] +5C1A5CA1 1AA1 [Trivial][ILSEQ] +5C1A5CE0 1AE0 [Trivial][ILSEQ] +5C1A5CEF 1AEF [Trivial][ILSEQ] +5C1A5CF9 1AF9 [Trivial][ILSEQ] +5C1A5CFA 1AFA [Trivial][ILSEQ] +5C1A5CFC 1AFC [Trivial][ILSEQ] +5C1A5CFD 1AFD [Trivial][ILSEQ] +5C1A5CFE 1AFE [Trivial][ILSEQ] +5C1A5CFF 1AFF [Trivial][ILSEQ] +5C225C00 2200 [Trivial] +5C225C08 2208 [Trivial] +5C225C09 2209 [Trivial] +5C225C0A 220A [Trivial] +5C225C0D 220D [Trivial] +5C225C1A 221A [Trivial] +5C225C22 2222 [Trivial] +5C225C25 225C25 [Regular] +5C225C27 2227 [Trivial] +5C225C30 2200 [Regular] +5C225C3F 223F [Trivial] +5C225C40 2240 [Trivial] +5C225C5A 221A [Regular] +5C225C5C 225C [Regular] +5C225C5F 225C5F [Regular] +5C225C61 2261 [Trivial] +5C225C62 2208 [Regular] +5C225C6E 220A [Regular] +5C225C72 220D [Regular] +5C225C74 2209 [Regular] +5C225C7E 227E [Trivial] +5C225C7F 227F [Trivial] +5C225C80 2280 [Trivial][ILSEQ] +5C225C81 2281 [Trivial][ILSEQ] +5C225C9F 229F [Trivial][ILSEQ] +5C225CA0 22A0 [Trivial][ILSEQ] +5C225CA1 22A1 [Trivial][ILSEQ] +5C225CE0 22E0 [Trivial][ILSEQ] +5C225CEF 22EF [Trivial][ILSEQ] +5C225CF9 22F9 [Trivial][ILSEQ] +5C225CFA 22FA [Trivial][ILSEQ] +5C225CFC 22FC [Trivial][ILSEQ] +5C225CFD 22FD [Trivial][ILSEQ] +5C225CFE 22FE [Trivial][ILSEQ] +5C225CFF 22FF [Trivial][ILSEQ] +5C255C00 5C2500 [Regular] +5C255C08 5C2508 [Regular] +5C255C09 5C2509 [Regular] +5C255C0A 5C250A [Regular] +5C255C0D 5C250D [Regular] +5C255C1A 5C251A [Regular] +5C255C22 5C2522 [Regular] +5C255C25 5C255C25 [Preserve][LIKE] +5C255C27 5C2527 [Regular] +5C255C30 5C2500 [Regular] +5C255C3F 5C253F [Regular] +5C255C40 5C2540 [Regular] +5C255C5A 5C251A [Regular] +5C255C5C 5C255C [Regular] +5C255C5F 5C255C5F [Preserve][LIKE] +5C255C61 5C2561 [Regular] +5C255C62 5C2508 [Regular] +5C255C6E 5C250A [Regular] +5C255C72 5C250D [Regular] +5C255C74 5C2509 [Regular] +5C255C7E 5C257E [Regular] +5C255C7F 5C257F [Regular] +5C255C80 5C2580 [Regular][ILSEQ] +5C255C81 5C2581 [Regular][ILSEQ] +5C255C9F 5C259F [Regular][ILSEQ] +5C255CA0 5C25A0 [Regular][ILSEQ] +5C255CA1 5C25A1 [Regular][ILSEQ] +5C255CE0 5C25E0 [Regular][ILSEQ] +5C255CEF 5C25EF [Regular][ILSEQ] +5C255CF9 5C25F9 [Regular][ILSEQ] +5C255CFA 5C25FA [Regular][ILSEQ] +5C255CFC 5C25FC [Regular][ILSEQ] +5C255CFD 5C25FD [Regular][ILSEQ] +5C255CFE 5C25FE [Regular][ILSEQ] +5C255CFF 5C25FF [Regular][ILSEQ] +5C275C00 2700 [Trivial] +5C275C08 2708 [Trivial] +5C275C09 2709 [Trivial] +5C275C0A 270A [Trivial] +5C275C0D 270D [Trivial] +5C275C1A 271A [Trivial] +5C275C22 2722 [Trivial] +5C275C25 275C25 [Regular] +5C275C27 2727 [Trivial] +5C275C30 2700 [Regular] +5C275C3F 273F [Trivial] +5C275C40 2740 [Trivial] +5C275C5A 271A [Regular] +5C275C5C 275C [Regular] +5C275C5F 275C5F [Regular] +5C275C61 2761 [Trivial] +5C275C62 2708 [Regular] +5C275C6E 270A [Regular] +5C275C72 270D [Regular] +5C275C74 2709 [Regular] +5C275C7E 277E [Trivial] +5C275C7F 277F [Trivial] +5C275C80 2780 [Trivial][ILSEQ] +5C275C81 2781 [Trivial][ILSEQ] +5C275C9F 279F [Trivial][ILSEQ] +5C275CA0 27A0 [Trivial][ILSEQ] +5C275CA1 27A1 [Trivial][ILSEQ] +5C275CE0 27E0 [Trivial][ILSEQ] +5C275CEF 27EF [Trivial][ILSEQ] +5C275CF9 27F9 [Trivial][ILSEQ] +5C275CFA 27FA [Trivial][ILSEQ] +5C275CFC 27FC [Trivial][ILSEQ] +5C275CFD 27FD [Trivial][ILSEQ] +5C275CFE 27FE [Trivial][ILSEQ] +5C275CFF 27FF [Trivial][ILSEQ] +5C305C00 0000 [Regular] +5C305C08 0008 [Regular] +5C305C09 0009 [Regular] +5C305C0A 000A [Regular] +5C305C0D 000D [Regular] +5C305C1A 001A [Regular] +5C305C22 0022 [Regular] +5C305C25 005C25 [Regular] +5C305C27 0027 [Regular] +5C305C30 0000 [Regular] +5C305C3F 003F [Regular] +5C305C40 0040 [Regular] +5C305C5A 001A [Regular] +5C305C5C 005C [Regular] +5C305C5F 005C5F [Regular] +5C305C61 0061 [Regular] +5C305C62 0008 [Regular] +5C305C6E 000A [Regular] +5C305C72 000D [Regular] +5C305C74 0009 [Regular] +5C305C7E 007E [Regular] +5C305C7F 007F [Regular] +5C305C80 0080 [Regular][ILSEQ] +5C305C81 0081 [Regular][ILSEQ] +5C305C9F 009F [Regular][ILSEQ] +5C305CA0 00A0 [Regular][ILSEQ] +5C305CA1 00A1 [Regular][ILSEQ] +5C305CE0 00E0 [Regular][ILSEQ] +5C305CEF 00EF [Regular][ILSEQ] +5C305CF9 00F9 [Regular][ILSEQ] +5C305CFA 00FA [Regular][ILSEQ] +5C305CFC 00FC [Regular][ILSEQ] +5C305CFD 00FD [Regular][ILSEQ] +5C305CFE 00FE [Regular][ILSEQ] +5C305CFF 00FF [Regular][ILSEQ] +5C3F5C00 3F00 [Trivial] +5C3F5C08 3F08 [Trivial] +5C3F5C09 3F09 [Trivial] +5C3F5C0A 3F0A [Trivial] +5C3F5C0D 3F0D [Trivial] +5C3F5C1A 3F1A [Trivial] +5C3F5C22 3F22 [Trivial] +5C3F5C25 3F5C25 [Regular] +5C3F5C27 3F27 [Trivial] +5C3F5C30 3F00 [Regular] +5C3F5C3F 3F3F [Trivial] +5C3F5C40 3F40 [Trivial] +5C3F5C5A 3F1A [Regular] +5C3F5C5C 3F5C [Regular] +5C3F5C5F 3F5C5F [Regular] +5C3F5C61 3F61 [Trivial] +5C3F5C62 3F08 [Regular] +5C3F5C6E 3F0A [Regular] +5C3F5C72 3F0D [Regular] +5C3F5C74 3F09 [Regular] +5C3F5C7E 3F7E [Trivial] +5C3F5C7F 3F7F [Trivial] +5C3F5C80 3F80 [Trivial][ILSEQ] +5C3F5C81 3F81 [Trivial][ILSEQ] +5C3F5C9F 3F9F [Trivial][ILSEQ] +5C3F5CA0 3FA0 [Trivial][ILSEQ] +5C3F5CA1 3FA1 [Trivial][ILSEQ] +5C3F5CE0 3FE0 [Trivial][ILSEQ] +5C3F5CEF 3FEF [Trivial][ILSEQ] +5C3F5CF9 3FF9 [Trivial][ILSEQ] +5C3F5CFA 3FFA [Trivial][ILSEQ] +5C3F5CFC 3FFC [Trivial][ILSEQ] +5C3F5CFD 3FFD [Trivial][ILSEQ] +5C3F5CFE 3FFE [Trivial][ILSEQ] +5C3F5CFF 3FFF [Trivial][ILSEQ] +5C405C00 4000 [Trivial] +5C405C08 4008 [Trivial] +5C405C09 4009 [Trivial] +5C405C0A 400A [Trivial] +5C405C0D 400D [Trivial] +5C405C1A 401A [Trivial] +5C405C22 4022 [Trivial] +5C405C25 405C25 [Regular] +5C405C27 4027 [Trivial] +5C405C30 4000 [Regular] +5C405C3F 403F [Trivial] +5C405C40 4040 [Trivial] +5C405C5A 401A [Regular] +5C405C5C 405C [Regular] +5C405C5F 405C5F [Regular] +5C405C61 4061 [Trivial] +5C405C62 4008 [Regular] +5C405C6E 400A [Regular] +5C405C72 400D [Regular] +5C405C74 4009 [Regular] +5C405C7E 407E [Trivial] +5C405C7F 407F [Trivial] +5C405C80 4080 [Trivial][ILSEQ] +5C405C81 4081 [Trivial][ILSEQ] +5C405C9F 409F [Trivial][ILSEQ] +5C405CA0 40A0 [Trivial][ILSEQ] +5C405CA1 40A1 [Trivial][ILSEQ] +5C405CE0 40E0 [Trivial][ILSEQ] +5C405CEF 40EF [Trivial][ILSEQ] +5C405CF9 40F9 [Trivial][ILSEQ] +5C405CFA 40FA [Trivial][ILSEQ] +5C405CFC 40FC [Trivial][ILSEQ] +5C405CFD 40FD [Trivial][ILSEQ] +5C405CFE 40FE [Trivial][ILSEQ] +5C405CFF 40FF [Trivial][ILSEQ] +5C5A5C00 1A00 [Regular] +5C5A5C08 1A08 [Regular] +5C5A5C09 1A09 [Regular] +5C5A5C0A 1A0A [Regular] +5C5A5C0D 1A0D [Regular] +5C5A5C1A 1A1A [Regular] +5C5A5C22 1A22 [Regular] +5C5A5C25 1A5C25 [Regular] +5C5A5C27 1A27 [Regular] +5C5A5C30 1A00 [Regular] +5C5A5C3F 1A3F [Regular] +5C5A5C40 1A40 [Regular] +5C5A5C5A 1A1A [Regular] +5C5A5C5C 1A5C [Regular] +5C5A5C5F 1A5C5F [Regular] +5C5A5C61 1A61 [Regular] +5C5A5C62 1A08 [Regular] +5C5A5C6E 1A0A [Regular] +5C5A5C72 1A0D [Regular] +5C5A5C74 1A09 [Regular] +5C5A5C7E 1A7E [Regular] +5C5A5C7F 1A7F [Regular] +5C5A5C80 1A80 [Regular][ILSEQ] +5C5A5C81 1A81 [Regular][ILSEQ] +5C5A5C9F 1A9F [Regular][ILSEQ] +5C5A5CA0 1AA0 [Regular][ILSEQ] +5C5A5CA1 1AA1 [Regular][ILSEQ] +5C5A5CE0 1AE0 [Regular][ILSEQ] +5C5A5CEF 1AEF [Regular][ILSEQ] +5C5A5CF9 1AF9 [Regular][ILSEQ] +5C5A5CFA 1AFA [Regular][ILSEQ] +5C5A5CFC 1AFC [Regular][ILSEQ] +5C5A5CFD 1AFD [Regular][ILSEQ] +5C5A5CFE 1AFE [Regular][ILSEQ] +5C5A5CFF 1AFF [Regular][ILSEQ] +5C5C5C00 5C00 [Regular] +5C5C5C08 5C08 [Regular] +5C5C5C09 5C09 [Regular] +5C5C5C0A 5C0A [Regular] +5C5C5C0D 5C0D [Regular] +5C5C5C1A 5C1A [Regular] +5C5C5C22 5C22 [Regular] +5C5C5C25 5C5C25 [Regular] +5C5C5C27 5C27 [Regular] +5C5C5C30 5C00 [Regular] +5C5C5C3F 5C3F [Regular] +5C5C5C40 5C40 [Regular] +5C5C5C5A 5C1A [Regular] +5C5C5C5C 5C5C [Regular] +5C5C5C5F 5C5C5F [Regular] +5C5C5C61 5C61 [Regular] +5C5C5C62 5C08 [Regular] +5C5C5C6E 5C0A [Regular] +5C5C5C72 5C0D [Regular] +5C5C5C74 5C09 [Regular] +5C5C5C7E 5C7E [Regular] +5C5C5C7F 5C7F [Regular] +5C5C5C80 5C80 [Regular][ILSEQ] +5C5C5C81 5C81 [Regular][ILSEQ] +5C5C5C9F 5C9F [Regular][ILSEQ] +5C5C5CA0 5CA0 [Regular][ILSEQ] +5C5C5CA1 5CA1 [Regular][ILSEQ] +5C5C5CE0 5CE0 [Regular][ILSEQ] +5C5C5CEF 5CEF [Regular][ILSEQ] +5C5C5CF9 5CF9 [Regular][ILSEQ] +5C5C5CFA 5CFA [Regular][ILSEQ] +5C5C5CFC 5CFC [Regular][ILSEQ] +5C5C5CFD 5CFD [Regular][ILSEQ] +5C5C5CFE 5CFE [Regular][ILSEQ] +5C5C5CFF 5CFF [Regular][ILSEQ] +5C5F5C00 5C5F00 [Regular] +5C5F5C08 5C5F08 [Regular] +5C5F5C09 5C5F09 [Regular] +5C5F5C0A 5C5F0A [Regular] +5C5F5C0D 5C5F0D [Regular] +5C5F5C1A 5C5F1A [Regular] +5C5F5C22 5C5F22 [Regular] +5C5F5C25 5C5F5C25 [Preserve][LIKE] +5C5F5C27 5C5F27 [Regular] +5C5F5C30 5C5F00 [Regular] +5C5F5C3F 5C5F3F [Regular] +5C5F5C40 5C5F40 [Regular] +5C5F5C5A 5C5F1A [Regular] +5C5F5C5C 5C5F5C [Regular] +5C5F5C5F 5C5F5C5F [Preserve][LIKE] +5C5F5C61 5C5F61 [Regular] +5C5F5C62 5C5F08 [Regular] +5C5F5C6E 5C5F0A [Regular] +5C5F5C72 5C5F0D [Regular] +5C5F5C74 5C5F09 [Regular] +5C5F5C7E 5C5F7E [Regular] +5C5F5C7F 5C5F7F [Regular] +5C5F5C80 5C5F80 [Regular][ILSEQ] +5C5F5C81 5C5F81 [Regular][ILSEQ] +5C5F5C9F 5C5F9F [Regular][ILSEQ] +5C5F5CA0 5C5FA0 [Regular][ILSEQ] +5C5F5CA1 5C5FA1 [Regular][ILSEQ] +5C5F5CE0 5C5FE0 [Regular][ILSEQ] +5C5F5CEF 5C5FEF [Regular][ILSEQ] +5C5F5CF9 5C5FF9 [Regular][ILSEQ] +5C5F5CFA 5C5FFA [Regular][ILSEQ] +5C5F5CFC 5C5FFC [Regular][ILSEQ] +5C5F5CFD 5C5FFD [Regular][ILSEQ] +5C5F5CFE 5C5FFE [Regular][ILSEQ] +5C5F5CFF 5C5FFF [Regular][ILSEQ] +5C615C00 6100 [Trivial] +5C615C08 6108 [Trivial] +5C615C09 6109 [Trivial] +5C615C0A 610A [Trivial] +5C615C0D 610D [Trivial] +5C615C1A 611A [Trivial] +5C615C22 6122 [Trivial] +5C615C25 615C25 [Regular] +5C615C27 6127 [Trivial] +5C615C30 6100 [Regular] +5C615C3F 613F [Trivial] +5C615C40 6140 [Trivial] +5C615C5A 611A [Regular] +5C615C5C 615C [Regular] +5C615C5F 615C5F [Regular] +5C615C61 6161 [Trivial] +5C615C62 6108 [Regular] +5C615C6E 610A [Regular] +5C615C72 610D [Regular] +5C615C74 6109 [Regular] +5C615C7E 617E [Trivial] +5C615C7F 617F [Trivial] +5C615C80 6180 [Trivial][ILSEQ] +5C615C81 6181 [Trivial][ILSEQ] +5C615C9F 619F [Trivial][ILSEQ] +5C615CA0 61A0 [Trivial][ILSEQ] +5C615CA1 61A1 [Trivial][ILSEQ] +5C615CE0 61E0 [Trivial][ILSEQ] +5C615CEF 61EF [Trivial][ILSEQ] +5C615CF9 61F9 [Trivial][ILSEQ] +5C615CFA 61FA [Trivial][ILSEQ] +5C615CFC 61FC [Trivial][ILSEQ] +5C615CFD 61FD [Trivial][ILSEQ] +5C615CFE 61FE [Trivial][ILSEQ] +5C615CFF 61FF [Trivial][ILSEQ] +5C625C00 0800 [Regular] +5C625C08 0808 [Regular] +5C625C09 0809 [Regular] +5C625C0A 080A [Regular] +5C625C0D 080D [Regular] +5C625C1A 081A [Regular] +5C625C22 0822 [Regular] +5C625C25 085C25 [Regular] +5C625C27 0827 [Regular] +5C625C30 0800 [Regular] +5C625C3F 083F [Regular] +5C625C40 0840 [Regular] +5C625C5A 081A [Regular] +5C625C5C 085C [Regular] +5C625C5F 085C5F [Regular] +5C625C61 0861 [Regular] +5C625C62 0808 [Regular] +5C625C6E 080A [Regular] +5C625C72 080D [Regular] +5C625C74 0809 [Regular] +5C625C7E 087E [Regular] +5C625C7F 087F [Regular] +5C625C80 0880 [Regular][ILSEQ] +5C625C81 0881 [Regular][ILSEQ] +5C625C9F 089F [Regular][ILSEQ] +5C625CA0 08A0 [Regular][ILSEQ] +5C625CA1 08A1 [Regular][ILSEQ] +5C625CE0 08E0 [Regular][ILSEQ] +5C625CEF 08EF [Regular][ILSEQ] +5C625CF9 08F9 [Regular][ILSEQ] +5C625CFA 08FA [Regular][ILSEQ] +5C625CFC 08FC [Regular][ILSEQ] +5C625CFD 08FD [Regular][ILSEQ] +5C625CFE 08FE [Regular][ILSEQ] +5C625CFF 08FF [Regular][ILSEQ] +5C6E5C00 0A00 [Regular] +5C6E5C08 0A08 [Regular] +5C6E5C09 0A09 [Regular] +5C6E5C0A 0A0A [Regular] +5C6E5C0D 0A0D [Regular] +5C6E5C1A 0A1A [Regular] +5C6E5C22 0A22 [Regular] +5C6E5C25 0A5C25 [Regular] +5C6E5C27 0A27 [Regular] +5C6E5C30 0A00 [Regular] +5C6E5C3F 0A3F [Regular] +5C6E5C40 0A40 [Regular] +5C6E5C5A 0A1A [Regular] +5C6E5C5C 0A5C [Regular] +5C6E5C5F 0A5C5F [Regular] +5C6E5C61 0A61 [Regular] +5C6E5C62 0A08 [Regular] +5C6E5C6E 0A0A [Regular] +5C6E5C72 0A0D [Regular] +5C6E5C74 0A09 [Regular] +5C6E5C7E 0A7E [Regular] +5C6E5C7F 0A7F [Regular] +5C6E5C80 0A80 [Regular][ILSEQ] +5C6E5C81 0A81 [Regular][ILSEQ] +5C6E5C9F 0A9F [Regular][ILSEQ] +5C6E5CA0 0AA0 [Regular][ILSEQ] +5C6E5CA1 0AA1 [Regular][ILSEQ] +5C6E5CE0 0AE0 [Regular][ILSEQ] +5C6E5CEF 0AEF [Regular][ILSEQ] +5C6E5CF9 0AF9 [Regular][ILSEQ] +5C6E5CFA 0AFA [Regular][ILSEQ] +5C6E5CFC 0AFC [Regular][ILSEQ] +5C6E5CFD 0AFD [Regular][ILSEQ] +5C6E5CFE 0AFE [Regular][ILSEQ] +5C6E5CFF 0AFF [Regular][ILSEQ] +5C725C00 0D00 [Regular] +5C725C08 0D08 [Regular] +5C725C09 0D09 [Regular] +5C725C0A 0D0A [Regular] +5C725C0D 0D0D [Regular] +5C725C1A 0D1A [Regular] +5C725C22 0D22 [Regular] +5C725C25 0D5C25 [Regular] +5C725C27 0D27 [Regular] +5C725C30 0D00 [Regular] +5C725C3F 0D3F [Regular] +5C725C40 0D40 [Regular] +5C725C5A 0D1A [Regular] +5C725C5C 0D5C [Regular] +5C725C5F 0D5C5F [Regular] +5C725C61 0D61 [Regular] +5C725C62 0D08 [Regular] +5C725C6E 0D0A [Regular] +5C725C72 0D0D [Regular] +5C725C74 0D09 [Regular] +5C725C7E 0D7E [Regular] +5C725C7F 0D7F [Regular] +5C725C80 0D80 [Regular][ILSEQ] +5C725C81 0D81 [Regular][ILSEQ] +5C725C9F 0D9F [Regular][ILSEQ] +5C725CA0 0DA0 [Regular][ILSEQ] +5C725CA1 0DA1 [Regular][ILSEQ] +5C725CE0 0DE0 [Regular][ILSEQ] +5C725CEF 0DEF [Regular][ILSEQ] +5C725CF9 0DF9 [Regular][ILSEQ] +5C725CFA 0DFA [Regular][ILSEQ] +5C725CFC 0DFC [Regular][ILSEQ] +5C725CFD 0DFD [Regular][ILSEQ] +5C725CFE 0DFE [Regular][ILSEQ] +5C725CFF 0DFF [Regular][ILSEQ] +5C745C00 0900 [Regular] +5C745C08 0908 [Regular] +5C745C09 0909 [Regular] +5C745C0A 090A [Regular] +5C745C0D 090D [Regular] +5C745C1A 091A [Regular] +5C745C22 0922 [Regular] +5C745C25 095C25 [Regular] +5C745C27 0927 [Regular] +5C745C30 0900 [Regular] +5C745C3F 093F [Regular] +5C745C40 0940 [Regular] +5C745C5A 091A [Regular] +5C745C5C 095C [Regular] +5C745C5F 095C5F [Regular] +5C745C61 0961 [Regular] +5C745C62 0908 [Regular] +5C745C6E 090A [Regular] +5C745C72 090D [Regular] +5C745C74 0909 [Regular] +5C745C7E 097E [Regular] +5C745C7F 097F [Regular] +5C745C80 0980 [Regular][ILSEQ] +5C745C81 0981 [Regular][ILSEQ] +5C745C9F 099F [Regular][ILSEQ] +5C745CA0 09A0 [Regular][ILSEQ] +5C745CA1 09A1 [Regular][ILSEQ] +5C745CE0 09E0 [Regular][ILSEQ] +5C745CEF 09EF [Regular][ILSEQ] +5C745CF9 09F9 [Regular][ILSEQ] +5C745CFA 09FA [Regular][ILSEQ] +5C745CFC 09FC [Regular][ILSEQ] +5C745CFD 09FD [Regular][ILSEQ] +5C745CFE 09FE [Regular][ILSEQ] +5C745CFF 09FF [Regular][ILSEQ] +5C7E5C00 7E00 [Trivial] +5C7E5C08 7E08 [Trivial] +5C7E5C09 7E09 [Trivial] +5C7E5C0A 7E0A [Trivial] +5C7E5C0D 7E0D [Trivial] +5C7E5C1A 7E1A [Trivial] +5C7E5C22 7E22 [Trivial] +5C7E5C25 7E5C25 [Regular] +5C7E5C27 7E27 [Trivial] +5C7E5C30 7E00 [Regular] +5C7E5C3F 7E3F [Trivial] +5C7E5C40 7E40 [Trivial] +5C7E5C5A 7E1A [Regular] +5C7E5C5C 7E5C [Regular] +5C7E5C5F 7E5C5F [Regular] +5C7E5C61 7E61 [Trivial] +5C7E5C62 7E08 [Regular] +5C7E5C6E 7E0A [Regular] +5C7E5C72 7E0D [Regular] +5C7E5C74 7E09 [Regular] +5C7E5C7E 7E7E [Trivial] +5C7E5C7F 7E7F [Trivial] +5C7E5C80 7E80 [Trivial][ILSEQ] +5C7E5C81 7E81 [Trivial][ILSEQ] +5C7E5C9F 7E9F [Trivial][ILSEQ] +5C7E5CA0 7EA0 [Trivial][ILSEQ] +5C7E5CA1 7EA1 [Trivial][ILSEQ] +5C7E5CE0 7EE0 [Trivial][ILSEQ] +5C7E5CEF 7EEF [Trivial][ILSEQ] +5C7E5CF9 7EF9 [Trivial][ILSEQ] +5C7E5CFA 7EFA [Trivial][ILSEQ] +5C7E5CFC 7EFC [Trivial][ILSEQ] +5C7E5CFD 7EFD [Trivial][ILSEQ] +5C7E5CFE 7EFE [Trivial][ILSEQ] +5C7E5CFF 7EFF [Trivial][ILSEQ] +5C7F5C00 7F00 [Trivial] +5C7F5C08 7F08 [Trivial] +5C7F5C09 7F09 [Trivial] +5C7F5C0A 7F0A [Trivial] +5C7F5C0D 7F0D [Trivial] +5C7F5C1A 7F1A [Trivial] +5C7F5C22 7F22 [Trivial] +5C7F5C25 7F5C25 [Regular] +5C7F5C27 7F27 [Trivial] +5C7F5C30 7F00 [Regular] +5C7F5C3F 7F3F [Trivial] +5C7F5C40 7F40 [Trivial] +5C7F5C5A 7F1A [Regular] +5C7F5C5C 7F5C [Regular] +5C7F5C5F 7F5C5F [Regular] +5C7F5C61 7F61 [Trivial] +5C7F5C62 7F08 [Regular] +5C7F5C6E 7F0A [Regular] +5C7F5C72 7F0D [Regular] +5C7F5C74 7F09 [Regular] +5C7F5C7E 7F7E [Trivial] +5C7F5C7F 7F7F [Trivial] +5C7F5C80 7F80 [Trivial][ILSEQ] +5C7F5C81 7F81 [Trivial][ILSEQ] +5C7F5C9F 7F9F [Trivial][ILSEQ] +5C7F5CA0 7FA0 [Trivial][ILSEQ] +5C7F5CA1 7FA1 [Trivial][ILSEQ] +5C7F5CE0 7FE0 [Trivial][ILSEQ] +5C7F5CEF 7FEF [Trivial][ILSEQ] +5C7F5CF9 7FF9 [Trivial][ILSEQ] +5C7F5CFA 7FFA [Trivial][ILSEQ] +5C7F5CFC 7FFC [Trivial][ILSEQ] +5C7F5CFD 7FFD [Trivial][ILSEQ] +5C7F5CFE 7FFE [Trivial][ILSEQ] +5C7F5CFF 7FFF [Trivial][ILSEQ] +5C805C00 8000 [Trivial][ILSEQ] +5C805C08 8008 [Trivial][ILSEQ] +5C805C09 8009 [Trivial][ILSEQ] +5C805C0A 800A [Trivial][ILSEQ] +5C805C0D 800D [Trivial][ILSEQ] +5C805C1A 801A [Trivial][ILSEQ] +5C805C22 8022 [Trivial][ILSEQ] +5C805C25 805C25 [Regular][ILSEQ] +5C805C27 8027 [Trivial][ILSEQ] +5C805C30 8000 [Regular][ILSEQ] +5C805C3F 803F [Trivial][ILSEQ] +5C805C40 8040 [Trivial][ILSEQ] +5C805C5A 801A [Regular][ILSEQ] +5C805C5C 805C [Regular][ILSEQ] +5C805C5F 805C5F [Regular][ILSEQ] +5C805C61 8061 [Trivial][ILSEQ] +5C805C62 8008 [Regular][ILSEQ] +5C805C6E 800A [Regular][ILSEQ] +5C805C72 800D [Regular][ILSEQ] +5C805C74 8009 [Regular][ILSEQ] +5C805C7E 807E [Trivial][ILSEQ] +5C805C7F 807F [Trivial][ILSEQ] +5C805C80 8080 [Trivial][ILSEQ] +5C805C81 8081 [Trivial][ILSEQ] +5C805C9F 809F [Trivial][ILSEQ] +5C805CA0 80A0 [Trivial][ILSEQ] +5C805CA1 80A1 [Trivial][ILSEQ] +5C805CE0 80E0 [Trivial][ILSEQ] +5C805CEF 80EF [Trivial][ILSEQ] +5C805CF9 80F9 [Trivial][ILSEQ] +5C805CFA 80FA [Trivial][ILSEQ] +5C805CFC 80FC [Trivial][ILSEQ] +5C805CFD 80FD [Trivial][ILSEQ] +5C805CFE 80FE [Trivial][ILSEQ] +5C805CFF 80FF [Trivial][ILSEQ] +5C815C00 8100 [Trivial][ILSEQ] +5C815C08 8108 [Trivial][ILSEQ] +5C815C09 8109 [Trivial][ILSEQ] +5C815C0A 810A [Trivial][ILSEQ] +5C815C0D 810D [Trivial][ILSEQ] +5C815C1A 811A [Trivial][ILSEQ] +5C815C22 8122 [Trivial][ILSEQ] +5C815C25 815C25 [Regular][ILSEQ] +5C815C27 8127 [Trivial][ILSEQ] +5C815C30 8100 [Regular][ILSEQ] +5C815C3F 813F [Trivial][ILSEQ] +5C815C40 8140 [Trivial][ILSEQ] +5C815C5A 811A [Regular][ILSEQ] +5C815C5C 815C [Regular][ILSEQ] +5C815C5F 815C5F [Regular][ILSEQ] +5C815C61 8161 [Trivial][ILSEQ] +5C815C62 8108 [Regular][ILSEQ] +5C815C6E 810A [Regular][ILSEQ] +5C815C72 810D [Regular][ILSEQ] +5C815C74 8109 [Regular][ILSEQ] +5C815C7E 817E [Trivial][ILSEQ] +5C815C7F 817F [Trivial][ILSEQ] +5C815C80 8180 [Trivial][ILSEQ] +5C815C81 8181 [Trivial][ILSEQ] +5C815C9F 819F [Trivial][ILSEQ] +5C815CA0 81A0 [Trivial][ILSEQ] +5C815CA1 81A1 [Trivial][ILSEQ] +5C815CE0 81E0 [Trivial][ILSEQ] +5C815CEF 81EF [Trivial][ILSEQ] +5C815CF9 81F9 [Trivial][ILSEQ] +5C815CFA 81FA [Trivial][ILSEQ] +5C815CFC 81FC [Trivial][ILSEQ] +5C815CFD 81FD [Trivial][ILSEQ] +5C815CFE 81FE [Trivial][ILSEQ] +5C815CFF 81FF [Trivial][ILSEQ] +5C9F5C00 9F00 [Trivial][ILSEQ] +5C9F5C08 9F08 [Trivial][ILSEQ] +5C9F5C09 9F09 [Trivial][ILSEQ] +5C9F5C0A 9F0A [Trivial][ILSEQ] +5C9F5C0D 9F0D [Trivial][ILSEQ] +5C9F5C1A 9F1A [Trivial][ILSEQ] +5C9F5C22 9F22 [Trivial][ILSEQ] +5C9F5C25 9F5C25 [Regular][ILSEQ] +5C9F5C27 9F27 [Trivial][ILSEQ] +5C9F5C30 9F00 [Regular][ILSEQ] +5C9F5C3F 9F3F [Trivial][ILSEQ] +5C9F5C40 9F40 [Trivial][ILSEQ] +5C9F5C5A 9F1A [Regular][ILSEQ] +5C9F5C5C 9F5C [Regular][ILSEQ] +5C9F5C5F 9F5C5F [Regular][ILSEQ] +5C9F5C61 9F61 [Trivial][ILSEQ] +5C9F5C62 9F08 [Regular][ILSEQ] +5C9F5C6E 9F0A [Regular][ILSEQ] +5C9F5C72 9F0D [Regular][ILSEQ] +5C9F5C74 9F09 [Regular][ILSEQ] +5C9F5C7E 9F7E [Trivial][ILSEQ] +5C9F5C7F 9F7F [Trivial][ILSEQ] +5C9F5C80 9F80 [Trivial][ILSEQ] +5C9F5C81 9F81 [Trivial][ILSEQ] +5C9F5C9F 9F9F [Trivial][ILSEQ] +5C9F5CA0 9FA0 [Trivial][ILSEQ] +5C9F5CA1 9FA1 [Trivial][ILSEQ] +5C9F5CE0 9FE0 [Trivial][ILSEQ] +5C9F5CEF 9FEF [Trivial][ILSEQ] +5C9F5CF9 9FF9 [Trivial][ILSEQ] +5C9F5CFA 9FFA [Trivial][ILSEQ] +5C9F5CFC 9FFC [Trivial][ILSEQ] +5C9F5CFD 9FFD [Trivial][ILSEQ] +5C9F5CFE 9FFE [Trivial][ILSEQ] +5C9F5CFF 9FFF [Trivial][ILSEQ] +5CA05C00 A000 [Trivial][ILSEQ] +5CA05C08 A008 [Trivial][ILSEQ] +5CA05C09 A009 [Trivial][ILSEQ] +5CA05C0A A00A [Trivial][ILSEQ] +5CA05C0D A00D [Trivial][ILSEQ] +5CA05C1A A01A [Trivial][ILSEQ] +5CA05C22 A022 [Trivial][ILSEQ] +5CA05C25 A05C25 [Regular][ILSEQ] +5CA05C27 A027 [Trivial][ILSEQ] +5CA05C30 A000 [Regular][ILSEQ] +5CA05C3F A03F [Trivial][ILSEQ] +5CA05C40 A040 [Trivial][ILSEQ] +5CA05C5A A01A [Regular][ILSEQ] +5CA05C5C A05C [Regular][ILSEQ] +5CA05C5F A05C5F [Regular][ILSEQ] +5CA05C61 A061 [Trivial][ILSEQ] +5CA05C62 A008 [Regular][ILSEQ] +5CA05C6E A00A [Regular][ILSEQ] +5CA05C72 A00D [Regular][ILSEQ] +5CA05C74 A009 [Regular][ILSEQ] +5CA05C7E A07E [Trivial][ILSEQ] +5CA05C7F A07F [Trivial][ILSEQ] +5CA05C80 A080 [Trivial][ILSEQ] +5CA05C81 A081 [Trivial][ILSEQ] +5CA05C9F A09F [Trivial][ILSEQ] +5CA05CA0 A0A0 [Trivial][ILSEQ] +5CA05CA1 A0A1 [Trivial][ILSEQ] +5CA05CE0 A0E0 [Trivial][ILSEQ] +5CA05CEF A0EF [Trivial][ILSEQ] +5CA05CF9 A0F9 [Trivial][ILSEQ] +5CA05CFA A0FA [Trivial][ILSEQ] +5CA05CFC A0FC [Trivial][ILSEQ] +5CA05CFD A0FD [Trivial][ILSEQ] +5CA05CFE A0FE [Trivial][ILSEQ] +5CA05CFF A0FF [Trivial][ILSEQ] +5CA15C00 A100 [Trivial][BROKE] +5CA15C08 A108 [Trivial][BROKE] +5CA15C09 A109 [Trivial][BROKE] +5CA15C0A A10A [Trivial][BROKE] +5CA15C0D A10D [Trivial][BROKE] +5CA15C1A A11A [Trivial][BROKE] +5CA15C22 A122 [Trivial][BROKE] +5CA15C25 A15C25 [Regular] +5CA15C27 A127 [Trivial][BROKE] +5CA15C30 A100 [Regular][BROKE] +5CA15C3F A13F [Trivial][BROKE] +5CA15C40 A140 [Trivial][USER] +5CA15C5A A11A [Regular][BROKE] +5CA15C5C A15C [Regular][USER] +5CA15C5F A15C5F [Regular] +5CA15C61 A161 [Trivial][USER] +5CA15C62 A108 [Regular][BROKE][USER] +5CA15C6E A10A [Regular][BROKE] +5CA15C72 A10D [Regular][BROKE] +5CA15C74 A109 [Regular][BROKE] +5CA15C7E A17E [Trivial][USER] +5CA15C7F A17F [Trivial][BROKE] +5CA15C80 A180 [Trivial][ILSEQ] +5CA15C81 A181 [Trivial][ILSEQ] +5CA15C9F A19F [Trivial][ILSEQ] +5CA15CA0 A1A0 [Trivial][ILSEQ] +5CA15CA1 A1A1 [Trivial][FIXED][USER] +5CA15CE0 A1E0 [Trivial][FIXED][USER] +5CA15CEF A1EF [Trivial][FIXED][USER] +5CA15CF9 A1F9 [Trivial][FIXED][USER] +5CA15CFA A1FA [Trivial][FIXED][USER] +5CA15CFC A1FC [Trivial][FIXED][USER] +5CA15CFD A1FD [Trivial][FIXED][USER] +5CA15CFE A1FE [Trivial][FIXED][USER] +5CA15CFF A1FF [Trivial][ILSEQ] +5CE05C00 E000 [Trivial][BROKE] +5CE05C08 E008 [Trivial][BROKE] +5CE05C09 E009 [Trivial][BROKE] +5CE05C0A E00A [Trivial][BROKE] +5CE05C0D E00D [Trivial][BROKE] +5CE05C1A E01A [Trivial][BROKE] +5CE05C22 E022 [Trivial][BROKE] +5CE05C25 E05C25 [Regular] +5CE05C27 E027 [Trivial][BROKE] +5CE05C30 E000 [Regular][BROKE] +5CE05C3F E03F [Trivial][BROKE] +5CE05C40 E040 [Trivial][USER] +5CE05C5A E01A [Regular][BROKE] +5CE05C5C E05C [Regular][USER] +5CE05C5F E05C5F [Regular] +5CE05C61 E061 [Trivial][USER] +5CE05C62 E008 [Regular][BROKE][USER] +5CE05C6E E00A [Regular][BROKE] +5CE05C72 E00D [Regular][BROKE] +5CE05C74 E009 [Regular][BROKE] +5CE05C7E E07E [Trivial][USER] +5CE05C7F E07F [Trivial][BROKE] +5CE05C80 E080 [Trivial][ILSEQ] +5CE05C81 E081 [Trivial][ILSEQ] +5CE05C9F E09F [Trivial][ILSEQ] +5CE05CA0 E0A0 [Trivial][ILSEQ] +5CE05CA1 E0A1 [Trivial][FIXED][USER] +5CE05CE0 E0E0 [Trivial][FIXED][USER] +5CE05CEF E0EF [Trivial][FIXED][USER] +5CE05CF9 E0F9 [Trivial][FIXED][USER] +5CE05CFA E0FA [Trivial][FIXED][USER] +5CE05CFC E0FC [Trivial][FIXED][USER] +5CE05CFD E0FD [Trivial][FIXED][USER] +5CE05CFE E0FE [Trivial][FIXED][USER] +5CE05CFF E0FF [Trivial][ILSEQ] +5CEF5C00 EF00 [Trivial][BROKE] +5CEF5C08 EF08 [Trivial][BROKE] +5CEF5C09 EF09 [Trivial][BROKE] +5CEF5C0A EF0A [Trivial][BROKE] +5CEF5C0D EF0D [Trivial][BROKE] +5CEF5C1A EF1A [Trivial][BROKE] +5CEF5C22 EF22 [Trivial][BROKE] +5CEF5C25 EF5C25 [Regular] +5CEF5C27 EF27 [Trivial][BROKE] +5CEF5C30 EF00 [Regular][BROKE] +5CEF5C3F EF3F [Trivial][BROKE] +5CEF5C40 EF40 [Trivial][USER] +5CEF5C5A EF1A [Regular][BROKE] +5CEF5C5C EF5C [Regular][USER] +5CEF5C5F EF5C5F [Regular] +5CEF5C61 EF61 [Trivial][USER] +5CEF5C62 EF08 [Regular][BROKE][USER] +5CEF5C6E EF0A [Regular][BROKE] +5CEF5C72 EF0D [Regular][BROKE] +5CEF5C74 EF09 [Regular][BROKE] +5CEF5C7E EF7E [Trivial][USER] +5CEF5C7F EF7F [Trivial][BROKE] +5CEF5C80 EF80 [Trivial][ILSEQ] +5CEF5C81 EF81 [Trivial][ILSEQ] +5CEF5C9F EF9F [Trivial][ILSEQ] +5CEF5CA0 EFA0 [Trivial][ILSEQ] +5CEF5CA1 EFA1 [Trivial][FIXED][USER] +5CEF5CE0 EFE0 [Trivial][FIXED][USER] +5CEF5CEF EFEF [Trivial][FIXED][USER] +5CEF5CF9 EFF9 [Trivial][FIXED][USER] +5CEF5CFA EFFA [Trivial][FIXED][USER] +5CEF5CFC EFFC [Trivial][FIXED][USER] +5CEF5CFD EFFD [Trivial][FIXED][USER] +5CEF5CFE EFFE [Trivial][FIXED][USER] +5CEF5CFF EFFF [Trivial][ILSEQ] +5CF95C00 F900 [Trivial][BROKE] +5CF95C08 F908 [Trivial][BROKE] +5CF95C09 F909 [Trivial][BROKE] +5CF95C0A F90A [Trivial][BROKE] +5CF95C0D F90D [Trivial][BROKE] +5CF95C1A F91A [Trivial][BROKE] +5CF95C22 F922 [Trivial][BROKE] +5CF95C25 F95C25 [Regular] +5CF95C27 F927 [Trivial][BROKE] +5CF95C30 F900 [Regular][BROKE] +5CF95C3F F93F [Trivial][BROKE] +5CF95C40 F940 [Trivial][USER] +5CF95C5A F91A [Regular][BROKE] +5CF95C5C F95C [Regular][USER] +5CF95C5F F95C5F [Regular] +5CF95C61 F961 [Trivial][USER] +5CF95C62 F908 [Regular][BROKE][USER] +5CF95C6E F90A [Regular][BROKE] +5CF95C72 F90D [Regular][BROKE] +5CF95C74 F909 [Regular][BROKE] +5CF95C7E F97E [Trivial][USER] +5CF95C7F F97F [Trivial][BROKE] +5CF95C80 F980 [Trivial][ILSEQ] +5CF95C81 F981 [Trivial][ILSEQ] +5CF95C9F F99F [Trivial][ILSEQ] +5CF95CA0 F9A0 [Trivial][ILSEQ] +5CF95CA1 F9A1 [Trivial][FIXED][USER] +5CF95CE0 F9E0 [Trivial][FIXED][USER] +5CF95CEF F9EF [Trivial][FIXED][USER] +5CF95CF9 F9F9 [Trivial][FIXED][USER] +5CF95CFA F9FA [Trivial][FIXED][USER] +5CF95CFC F9FC [Trivial][FIXED][USER] +5CF95CFD F9FD [Trivial][FIXED][USER] +5CF95CFE F9FE [Trivial][FIXED][USER] +5CF95CFF F9FF [Trivial][ILSEQ] +5CFA5C00 FA00 [Trivial][ILSEQ] +5CFA5C08 FA08 [Trivial][ILSEQ] +5CFA5C09 FA09 [Trivial][ILSEQ] +5CFA5C0A FA0A [Trivial][ILSEQ] +5CFA5C0D FA0D [Trivial][ILSEQ] +5CFA5C1A FA1A [Trivial][ILSEQ] +5CFA5C22 FA22 [Trivial][ILSEQ] +5CFA5C25 FA5C25 [Regular][ILSEQ] +5CFA5C27 FA27 [Trivial][ILSEQ] +5CFA5C30 FA00 [Regular][ILSEQ] +5CFA5C3F FA3F [Trivial][ILSEQ] +5CFA5C40 FA40 [Trivial][ILSEQ] +5CFA5C5A FA1A [Regular][ILSEQ] +5CFA5C5C FA5C [Regular][ILSEQ] +5CFA5C5F FA5C5F [Regular][ILSEQ] +5CFA5C61 FA61 [Trivial][ILSEQ] +5CFA5C62 FA08 [Regular][ILSEQ] +5CFA5C6E FA0A [Regular][ILSEQ] +5CFA5C72 FA0D [Regular][ILSEQ] +5CFA5C74 FA09 [Regular][ILSEQ] +5CFA5C7E FA7E [Trivial][ILSEQ] +5CFA5C7F FA7F [Trivial][ILSEQ] +5CFA5C80 FA80 [Trivial][ILSEQ] +5CFA5C81 FA81 [Trivial][ILSEQ] +5CFA5C9F FA9F [Trivial][ILSEQ] +5CFA5CA0 FAA0 [Trivial][ILSEQ] +5CFA5CA1 FAA1 [Trivial][ILSEQ] +5CFA5CE0 FAE0 [Trivial][ILSEQ] +5CFA5CEF FAEF [Trivial][ILSEQ] +5CFA5CF9 FAF9 [Trivial][ILSEQ] +5CFA5CFA FAFA [Trivial][ILSEQ] +5CFA5CFC FAFC [Trivial][ILSEQ] +5CFA5CFD FAFD [Trivial][ILSEQ] +5CFA5CFE FAFE [Trivial][ILSEQ] +5CFA5CFF FAFF [Trivial][ILSEQ] +5CFC5C00 FC00 [Trivial][ILSEQ] +5CFC5C08 FC08 [Trivial][ILSEQ] +5CFC5C09 FC09 [Trivial][ILSEQ] +5CFC5C0A FC0A [Trivial][ILSEQ] +5CFC5C0D FC0D [Trivial][ILSEQ] +5CFC5C1A FC1A [Trivial][ILSEQ] +5CFC5C22 FC22 [Trivial][ILSEQ] +5CFC5C25 FC5C25 [Regular][ILSEQ] +5CFC5C27 FC27 [Trivial][ILSEQ] +5CFC5C30 FC00 [Regular][ILSEQ] +5CFC5C3F FC3F [Trivial][ILSEQ] +5CFC5C40 FC40 [Trivial][ILSEQ] +5CFC5C5A FC1A [Regular][ILSEQ] +5CFC5C5C FC5C [Regular][ILSEQ] +5CFC5C5F FC5C5F [Regular][ILSEQ] +5CFC5C61 FC61 [Trivial][ILSEQ] +5CFC5C62 FC08 [Regular][ILSEQ] +5CFC5C6E FC0A [Regular][ILSEQ] +5CFC5C72 FC0D [Regular][ILSEQ] +5CFC5C74 FC09 [Regular][ILSEQ] +5CFC5C7E FC7E [Trivial][ILSEQ] +5CFC5C7F FC7F [Trivial][ILSEQ] +5CFC5C80 FC80 [Trivial][ILSEQ] +5CFC5C81 FC81 [Trivial][ILSEQ] +5CFC5C9F FC9F [Trivial][ILSEQ] +5CFC5CA0 FCA0 [Trivial][ILSEQ] +5CFC5CA1 FCA1 [Trivial][ILSEQ] +5CFC5CE0 FCE0 [Trivial][ILSEQ] +5CFC5CEF FCEF [Trivial][ILSEQ] +5CFC5CF9 FCF9 [Trivial][ILSEQ] +5CFC5CFA FCFA [Trivial][ILSEQ] +5CFC5CFC FCFC [Trivial][ILSEQ] +5CFC5CFD FCFD [Trivial][ILSEQ] +5CFC5CFE FCFE [Trivial][ILSEQ] +5CFC5CFF FCFF [Trivial][ILSEQ] +5CFD5C00 FD00 [Trivial][ILSEQ] +5CFD5C08 FD08 [Trivial][ILSEQ] +5CFD5C09 FD09 [Trivial][ILSEQ] +5CFD5C0A FD0A [Trivial][ILSEQ] +5CFD5C0D FD0D [Trivial][ILSEQ] +5CFD5C1A FD1A [Trivial][ILSEQ] +5CFD5C22 FD22 [Trivial][ILSEQ] +5CFD5C25 FD5C25 [Regular][ILSEQ] +5CFD5C27 FD27 [Trivial][ILSEQ] +5CFD5C30 FD00 [Regular][ILSEQ] +5CFD5C3F FD3F [Trivial][ILSEQ] +5CFD5C40 FD40 [Trivial][ILSEQ] +5CFD5C5A FD1A [Regular][ILSEQ] +5CFD5C5C FD5C [Regular][ILSEQ] +5CFD5C5F FD5C5F [Regular][ILSEQ] +5CFD5C61 FD61 [Trivial][ILSEQ] +5CFD5C62 FD08 [Regular][ILSEQ] +5CFD5C6E FD0A [Regular][ILSEQ] +5CFD5C72 FD0D [Regular][ILSEQ] +5CFD5C74 FD09 [Regular][ILSEQ] +5CFD5C7E FD7E [Trivial][ILSEQ] +5CFD5C7F FD7F [Trivial][ILSEQ] +5CFD5C80 FD80 [Trivial][ILSEQ] +5CFD5C81 FD81 [Trivial][ILSEQ] +5CFD5C9F FD9F [Trivial][ILSEQ] +5CFD5CA0 FDA0 [Trivial][ILSEQ] +5CFD5CA1 FDA1 [Trivial][ILSEQ] +5CFD5CE0 FDE0 [Trivial][ILSEQ] +5CFD5CEF FDEF [Trivial][ILSEQ] +5CFD5CF9 FDF9 [Trivial][ILSEQ] +5CFD5CFA FDFA [Trivial][ILSEQ] +5CFD5CFC FDFC [Trivial][ILSEQ] +5CFD5CFD FDFD [Trivial][ILSEQ] +5CFD5CFE FDFE [Trivial][ILSEQ] +5CFD5CFF FDFF [Trivial][ILSEQ] +5CFE5C00 FE00 [Trivial][ILSEQ] +5CFE5C08 FE08 [Trivial][ILSEQ] +5CFE5C09 FE09 [Trivial][ILSEQ] +5CFE5C0A FE0A [Trivial][ILSEQ] +5CFE5C0D FE0D [Trivial][ILSEQ] +5CFE5C1A FE1A [Trivial][ILSEQ] +5CFE5C22 FE22 [Trivial][ILSEQ] +5CFE5C25 FE5C25 [Regular][ILSEQ] +5CFE5C27 FE27 [Trivial][ILSEQ] +5CFE5C30 FE00 [Regular][ILSEQ] +5CFE5C3F FE3F [Trivial][ILSEQ] +5CFE5C40 FE40 [Trivial][ILSEQ] +5CFE5C5A FE1A [Regular][ILSEQ] +5CFE5C5C FE5C [Regular][ILSEQ] +5CFE5C5F FE5C5F [Regular][ILSEQ] +5CFE5C61 FE61 [Trivial][ILSEQ] +5CFE5C62 FE08 [Regular][ILSEQ] +5CFE5C6E FE0A [Regular][ILSEQ] +5CFE5C72 FE0D [Regular][ILSEQ] +5CFE5C74 FE09 [Regular][ILSEQ] +5CFE5C7E FE7E [Trivial][ILSEQ] +5CFE5C7F FE7F [Trivial][ILSEQ] +5CFE5C80 FE80 [Trivial][ILSEQ] +5CFE5C81 FE81 [Trivial][ILSEQ] +5CFE5C9F FE9F [Trivial][ILSEQ] +5CFE5CA0 FEA0 [Trivial][ILSEQ] +5CFE5CA1 FEA1 [Trivial][ILSEQ] +5CFE5CE0 FEE0 [Trivial][ILSEQ] +5CFE5CEF FEEF [Trivial][ILSEQ] +5CFE5CF9 FEF9 [Trivial][ILSEQ] +5CFE5CFA FEFA [Trivial][ILSEQ] +5CFE5CFC FEFC [Trivial][ILSEQ] +5CFE5CFD FEFD [Trivial][ILSEQ] +5CFE5CFE FEFE [Trivial][ILSEQ] +5CFE5CFF FEFF [Trivial][ILSEQ] +5CFF5C00 FF00 [Trivial][ILSEQ] +5CFF5C08 FF08 [Trivial][ILSEQ] +5CFF5C09 FF09 [Trivial][ILSEQ] +5CFF5C0A FF0A [Trivial][ILSEQ] +5CFF5C0D FF0D [Trivial][ILSEQ] +5CFF5C1A FF1A [Trivial][ILSEQ] +5CFF5C22 FF22 [Trivial][ILSEQ] +5CFF5C25 FF5C25 [Regular][ILSEQ] +5CFF5C27 FF27 [Trivial][ILSEQ] +5CFF5C30 FF00 [Regular][ILSEQ] +5CFF5C3F FF3F [Trivial][ILSEQ] +5CFF5C40 FF40 [Trivial][ILSEQ] +5CFF5C5A FF1A [Regular][ILSEQ] +5CFF5C5C FF5C [Regular][ILSEQ] +5CFF5C5F FF5C5F [Regular][ILSEQ] +5CFF5C61 FF61 [Trivial][ILSEQ] +5CFF5C62 FF08 [Regular][ILSEQ] +5CFF5C6E FF0A [Regular][ILSEQ] +5CFF5C72 FF0D [Regular][ILSEQ] +5CFF5C74 FF09 [Regular][ILSEQ] +5CFF5C7E FF7E [Trivial][ILSEQ] +5CFF5C7F FF7F [Trivial][ILSEQ] +5CFF5C80 FF80 [Trivial][ILSEQ] +5CFF5C81 FF81 [Trivial][ILSEQ] +5CFF5C9F FF9F [Trivial][ILSEQ] +5CFF5CA0 FFA0 [Trivial][ILSEQ] +5CFF5CA1 FFA1 [Trivial][ILSEQ] +5CFF5CE0 FFE0 [Trivial][ILSEQ] +5CFF5CEF FFEF [Trivial][ILSEQ] +5CFF5CF9 FFF9 [Trivial][ILSEQ] +5CFF5CFA FFFA [Trivial][ILSEQ] +5CFF5CFC FFFC [Trivial][ILSEQ] +5CFF5CFD FFFD [Trivial][ILSEQ] +5CFF5CFE FFFE [Trivial][ILSEQ] +5CFF5CFF FFFF [Trivial][ILSEQ] +DROP TABLE t1; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP FUNCTION unescape; +DROP FUNCTION unescape_type; +DROP FUNCTION wellformedness; +DROP FUNCTION mysql_real_escape_string_generated; +DROP FUNCTION iswellformed; +DROP TABLE allbytes; +# End of ctype_backslash.inc +SET NAMES big5; +# Start of ctype_E05C.inc +SELECT HEX('à\'),HEX('à\t'); +HEX('à\') HEX('à\t') +E05C E05C74 +SELECT HEX('\\à\'),HEX('\\à\t'),HEX('\\à\t\t'); +HEX('\\à\') HEX('\\à\t') HEX('\\à\t\t') +5CE05C 5CE05C74 5CE05C7409 +SELECT HEX('''à\'),HEX('à\'''); +HEX('''à\') HEX('à\''') +27E05C E05C27 +SELECT HEX('\\''à\'),HEX('à\''\\'); +HEX('\\''à\') HEX('à\''\\') +5C27E05C E05C275C +SELECT HEX(BINARY('à\')),HEX(BINARY('à\t')); +HEX(BINARY('à\')) HEX(BINARY('à\t')) +E05C E05C74 +SELECT HEX(BINARY('\\à\')),HEX(BINARY('\\à\t')),HEX(BINARY('\\à\t\t')); +HEX(BINARY('\\à\')) HEX(BINARY('\\à\t')) HEX(BINARY('\\à\t\t')) +5CE05C 5CE05C74 5CE05C7409 +SELECT HEX(BINARY('''à\')),HEX(BINARY('à\''')); +HEX(BINARY('''à\')) HEX(BINARY('à\''')) +27E05C E05C27 +SELECT HEX(BINARY('\\''à\')),HEX(BINARY('à\''\\')); +HEX(BINARY('\\''à\')) HEX(BINARY('à\''\\')) +5C27E05C E05C275C +SELECT HEX(_BINARY'à\'),HEX(_BINARY'à\t'); +HEX(_BINARY'à\') HEX(_BINARY'à\t') +E05C E05C74 +SELECT HEX(_BINARY'\\à\'),HEX(_BINARY'\\à\t'),HEX(_BINARY'\\à\t\t'); +HEX(_BINARY'\\à\') HEX(_BINARY'\\à\t') HEX(_BINARY'\\à\t\t') +5CE05C 5CE05C74 5CE05C7409 +SELECT HEX(_BINARY'''à\'),HEX(_BINARY'à\'''); +HEX(_BINARY'''à\') HEX(_BINARY'à\''') +27E05C E05C27 +SELECT HEX(_BINARY'\\''à\'),HEX(_BINARY'à\''\\'); +HEX(_BINARY'\\''à\') HEX(_BINARY'à\''\\') +5C27E05C E05C275C +CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET big5 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('à\'),('à\t'); +INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t'); +INSERT INTO t1 VALUES ('''à\'),('à\'''); +INSERT INTO t1 VALUES ('\\''à\'),('à\''\\'); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 (a BLOB); +INSERT INTO t1 VALUES ('à\'),('à\t'); +INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t'); +INSERT INTO t1 VALUES ('''à\'),('à\'''); +INSERT INTO t1 VALUES ('\\''à\'),('à\''\\'); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET big5 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t')); +INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t')); +INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\''')); +INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\')); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 (a BLOB); +INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t')); +INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t')); +INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\''')); +INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\')); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET big5 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t'); +INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t'); +INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\'''); +INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\'); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 (a BLOB); +INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t'); +INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t'); +INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\'''); +INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\'); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +SET character_set_client=binary, character_set_results=binary; +SELECT @@character_set_client, @@character_set_connection, @@character_set_results; +@@character_set_client @@character_set_connection @@character_set_results +binary big5 binary +SELECT HEX('à\['), HEX('\à\['); +HEX('à\[') HEX('\à\[') +E05B E05B +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET big5 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('à\['),('\à\['); +SELECT HEX(a) FROM t1; +HEX(a) +E05B +E05B +DROP TABLE t1; +SET character_set_client=@@character_set_connection, character_set_results=@@character_set_connection; +SET character_set_connection=binary; +SELECT @@character_set_client, @@character_set_connection, @@character_set_results; +@@character_set_client @@character_set_connection @@character_set_results +big5 binary big5 +SELECT HEX('à\['), HEX('\à\['); +HEX('à\[') HEX('\à\[') +E05C5B E05B +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varbinary(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('à\['),('\à\['); +SELECT HEX(a) FROM t1; +HEX(a) +E05C5B +E05B +DROP TABLE t1; +# Start of ctype_E05C.inc +SET NAMES big5; +CREATE TABLE t1 (a ENUM('È@') CHARACTER SET big5); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` enum('?') CHARACTER SET big5 DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('È@'); +INSERT INTO t1 VALUES (_big5 0xC840); +INSERT INTO t1 VALUES (0xC840); +SELECT HEX(a),a FROM t1; +HEX(a) a +C840 È@ +C840 È@ +C840 È@ +DROP TABLE t1; +SET NAMES binary; +CREATE TABLE t1 (a ENUM('È@') CHARACTER SET big5); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` enum('?') CHARACTER SET big5 DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('È@'); +INSERT INTO t1 VALUES (_big5 0xC840); +INSERT INTO t1 VALUES (0xC840); +SELECT HEX(a),a FROM t1; +HEX(a) a +C840 È@ +C840 È@ +C840 È@ +DROP TABLE t1; +SET NAMES big5; +CREATE TABLE t1 ( +c1 CHAR(10) CHARACTER SET big5, +c2 VARCHAR(10) CHARACTER SET big5, +c3 TEXT CHARACTER SET big5 +); +INSERT INTO t1 VALUES ('È@','È@','È@'); +INSERT INTO t1 VALUES (_big5 0xC840,_big5 0xC840,_big5 0xC840); +INSERT INTO t1 VALUES (0xC840,0xC840,0xC840); +SELECT HEX(c1),HEX(c2),HEX(c3) FROM t1; +HEX(c1) HEX(c2) HEX(c3) +C840 C840 C840 +C840 C840 C840 +C840 C840 C840 +DROP TABLE t1; +SET NAMES binary; +CREATE TABLE t1 ( +c1 CHAR(10) CHARACTER SET big5, +c2 VARCHAR(10) CHARACTER SET big5, +c3 TEXT CHARACTER SET big5 +); +INSERT INTO t1 VALUES ('È@','È@','È@'); +INSERT INTO t1 VALUES (_big5 0xC840,_big5 0xC840,_big5 0xC840); +INSERT INTO t1 VALUES (0xC840,0xC840,0xC840); +SELECT HEX(c1),HEX(c2),HEX(c3) FROM t1; +HEX(c1) HEX(c2) HEX(c3) +C840 C840 C840 +C840 C840 C840 +C840 C840 C840 +DROP TABLE t1; +SET NAMES binary; +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET big5, KEY(a)); +INSERT INTO t1 VALUES (0xC840),(0xC841),(0xC842); +SELECT HEX(a) FROM t1 WHERE a='È@'; +HEX(a) +C840 +SELECT HEX(a) FROM t1 IGNORE KEY(a) WHERE a='È@'; +HEX(a) +C840 +DROP TABLE t1; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/ctype_binary.result b/mysql-test/r/ctype_binary.result index 3fc440b8354..48b481883ca 100644 --- a/mysql-test/r/ctype_binary.result +++ b/mysql-test/r/ctype_binary.result @@ -2924,3 +2924,104 @@ SET sql_mode=default; # # End of 5.5 tests # +# +# Start of 10.0 tests +# +SET NAMES binary; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varbinary(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where 0 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varbinary(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where 0 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varbinary(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where 0 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varbinary(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ('%' = concat(`test`.`t1`.`c1`)) +DROP TABLE t1; +# +# MDEV-7629 Regression: Bit and hex string literals changed column names in 10.0.14 +# +SELECT _binary 0x7E, _binary X'7E', _binary B'01111110'; +_binary 0x7E _binary X'7E' _binary B'01111110' +~ ~ ~ +# +# End of 10.0 tests +# diff --git a/mysql-test/r/ctype_collate.result b/mysql-test/r/ctype_collate.result index 453119f0412..6cb1876c3ad 100644 --- a/mysql-test/r/ctype_collate.result +++ b/mysql-test/r/ctype_collate.result @@ -660,3 +660,62 @@ latin5_turkish_ci then 2 else 3 end select concat(_latin1'a',_latin2'b',_latin5'c' collate latin5_turkish_ci); concat(_latin1'a',_latin2'b',_latin5'c' collate latin5_turkish_ci) abc +# +# Bug#11765016 57926: ILLEGAL MIX OF COLLATIONS FOR OPERATION 'UNION' .. USING CONCAT/FUNCTION/ +# Not a bug: only adding coverage tests +# +SET NAMES latin1 COLLATE latin1_german2_ci; +CREATE DATABASE test1 DEFAULT CHARACTER SET latin1 COLLATE latin1_german2_ci; +USE test1; +# +# Using "COLLATE latin1_swedish_ci" as the default collation for latin1 +# +CREATE FUNCTION `getText`() RETURNS varchar(20) CHARSET latin1 +BEGIN +RETURN "Testtext"; +END;// +SELECT getText(), CHARSET(getText()), COLLATION(getText()), COERCIBILITY(getText()); +getText() CHARSET(getText()) COLLATION(getText()) COERCIBILITY(getText()) +Testtext latin1 latin1_swedish_ci 4 +CREATE TABLE t1 AS SELECT ' - ' AS a UNION SELECT getText(); +ERROR HY000: Illegal mix of collations for operation 'UNION' +DROP FUNCTION getText; +# +# Using "CHARACTER SET latin1 COLLATE latin1_german2_ci" as the database defaults +# +CREATE FUNCTION `getText`() RETURNS varchar(20) +BEGIN +RETURN "Testtext"; +END;// +SELECT getText(), CHARSET(getText()), COLLATION(getText()), COERCIBILITY(getText()); +getText() CHARSET(getText()) COLLATION(getText()) COERCIBILITY(getText()) +Testtext latin1 latin1_german2_ci 4 +CREATE TABLE t1 AS SELECT ' - ' AS a UNION SELECT getText(); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(20) COLLATE latin1_german2_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci +DROP TABLE t1; +DROP FUNCTION getText; +# +# Using explicit "CHARACTER SET latin1 COLLATE latin1_german2_ci" +# +CREATE FUNCTION `getText`() RETURNS varchar(20) CHARACTER SET latin1 COLLATE latin1_german2_ci +BEGIN +RETURN "Testtext"; +END;// +SELECT getText(), CHARSET(getText()), COLLATION(getText()), COERCIBILITY(getText()); +getText() CHARSET(getText()) COLLATION(getText()) COERCIBILITY(getText()) +Testtext latin1 latin1_german2_ci 4 +CREATE TABLE t1 AS SELECT ' - ' AS a UNION SELECT getText(); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(20) COLLATE latin1_german2_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci +DROP TABLE t1; +DROP FUNCTION getText; +DROP DATABASE test1; +USE test; +SET NAMES latin1; diff --git a/mysql-test/r/ctype_cp1250_ch.result b/mysql-test/r/ctype_cp1250_ch.result index 6ec4c46086d..063cec289ab 100644 --- a/mysql-test/r/ctype_cp1250_ch.result +++ b/mysql-test/r/ctype_cp1250_ch.result @@ -256,6 +256,539 @@ select a from t1 where a like "abcdefghá"; a abcdefghá drop table t1; +set names cp1250 collate cp1250_czech_cs; +SELECT strcmp('a','a '); +strcmp('a','a ') +0 +SELECT strcmp('a\0','a' ); +strcmp('a\0','a' ) +1 +SELECT strcmp('a\0','a '); +strcmp('a\0','a ') +1 +SELECT strcmp('a\t','a' ); +strcmp('a\t','a' ) +1 +SELECT strcmp('a\t','a '); +strcmp('a\t','a ') +1 +create table t1 select repeat('a',4000) a; +delete from t1; +insert into t1 values ('a'), ('a '), ('a\t'); +select collation(a),hex(a) from t1 order by a; +collation(a) hex(a) +cp1250_czech_cs 61 +cp1250_czech_cs 6109 +cp1250_czech_cs 6120 +drop table t1; +# +# MDEV-5453 Assertion `src' fails in my_strnxfrm_unicode on GROUP BY MID(..) WITH ROLLUP +# +SELECT @@collation_connection; +@@collation_connection +cp1250_czech_cs +CREATE TABLE t1 (i INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +SELECT * FROM t1 GROUP BY MID(CURRENT_USER,0) WITH ROLLUP; +i +1 +1 +SELECT * FROM t1 GROUP BY MID('test',0) WITH ROLLUP; +i +1 +1 +DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +cp1250_czech_cs +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; set global LC_MESSAGES=convert((@@global.log_bin_trust_function_creators) using cp1250); ERROR HY000: Unknown locale: '1' +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +# +# Note: +# cp1250_czech_cs does not support WEIGHT_STRING in full extent +# +set names cp1250 collate cp1250_czech_cs; +select @@collation_connection; +@@collation_connection +cp1250_czech_cs +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET cp1250 COLLATE cp1250_czech_cs NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +A402 +SELECT HEX(ws) FROM t2; +HEX(ws) +A402 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET cp1250 COLLATE cp1250_czech_cs NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +A4A4A4A4A40202020202 +SELECT HEX(ws) FROM t2; +HEX(ws) +A4A4A4A4A40202020202 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +A4A4A4A4A40202020202 +SELECT HEX(ws) FROM t2; +HEX(ws) +A4A4A4A4A40202020202 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +A4A4A4A4A40202020202 +SELECT HEX(ws) FROM t2; +HEX(ws) +A4A4A4A4A40202020202 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +A402 +select hex(weight_string('A')); +hex(weight_string('A')) +A401 +select hex(weight_string('abc')); +hex(weight_string('abc')) +A4A5A6020202 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +A4A5A6020202 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +A4A5A6020202 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +A4A5A6020202 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +A4 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +A4A5 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +A4A5A6 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +A4A5A602 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +A4A5A60202 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +A4A5A602020200000000000000000000000000000000000000 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +A4 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +A4A5 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +A4A5A6 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +A4A5A602 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +A4A5A60202 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +A4A5A602020200000000000000000000000000000000000000 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +A4 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +A4A5 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +A4A5A6 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +A4A5A602 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +A4A5A60202 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +A4A5A602020200000000000000000000000000000000000000 +select @@collation_connection; +@@collation_connection +cp1250_czech_cs +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +8123 +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +818181232323 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +818181232323 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +818181232323 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +818181232323 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +81 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +8181 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +818181 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +81818123 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +8181812323 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +81818123232300000000000000000000000000000000000000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +81 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +8181 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +818181 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +81818123 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +8181812323 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +81818123232300000000000000000000000000000000000000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +81 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +8181 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +818181 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +81818123 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +8181812323 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +81818123232300000000000000000000000000000000000000 +select @@collation_connection; +@@collation_connection +cp1250_czech_cs +select collation(cast(_latin1 0xDF as char)); +collation(cast(_latin1 0xDF as char)) +cp1250_czech_cs +select hex(weight_string('s')); +hex(weight_string('s')) +B902 +select hex(weight_string(cast(_latin1 0xDF as char))); +hex(weight_string(cast(_latin1 0xDF as char))) +BB01 +select hex(weight_string(cast(_latin1 0xDF as char) as char(1))); +hex(weight_string(cast(_latin1 0xDF as char) as char(1))) +BB01 +select hex(weight_string('c')); +hex(weight_string('c')) +A602 +select hex(weight_string('h')); +hex(weight_string('h')) +AC02 +select hex(weight_string('ch')); +hex(weight_string('ch')) +AD03 +select hex(weight_string('i')); +hex(weight_string('i')) +AE02 +select hex(weight_string(cast(_latin1 0x6368DF as char))); +hex(weight_string(cast(_latin1 0x6368DF as char))) +ADBB0301 +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(1))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(1))) +ADBB0301 +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(2))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(2))) +ADBB0301 +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(3))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(3))) +ADBB0301 +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(4))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(4))) +ADBB0301 +select hex(weight_string(cast(_latin1 0xDF6368 as char))); +hex(weight_string(cast(_latin1 0xDF6368 as char))) +BBAD0103 +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(1))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(1))) +BBAD0103 +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(2))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(2))) +BBAD0103 +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(3))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(3))) +BBAD0103 +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(4))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(4))) +BBAD0103 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 2, 0xC0)) +AD +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 2, 0xC0)) +ADBB +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 2, 0xC0)) +ADBB03 +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 2, 0xC0)) +ADBB0301 +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 2, 0xC0)) +ADBB0301000000000000000000000000000000000000000000 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 3, 0xC0)) +AD +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 3, 0xC0)) +ADBB +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 3, 0xC0)) +ADBB03 +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 3, 0xC0)) +ADBB0301 +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 3, 0xC0)) +ADBB0301000000000000000000000000000000000000000000 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 4, 0xC0)) +AD +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 4, 0xC0)) +ADBB +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 4, 0xC0)) +ADBB03 +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 4, 0xC0)) +ADBB0301 +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 4, 0xC0)) +ADBB0301000000000000000000000000000000000000000000 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 2,0xC0)) +BB +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 2,0xC0)) +BBAD +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 2,0xC0)) +BBAD01 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 2,0xC0)) +BBAD0103 +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 2,0xC0)) +BBAD0103000000000000000000000000000000000000000000 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 3,0xC0)) +BB +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 3,0xC0)) +BBAD +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 3,0xC0)) +BBAD01 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 3,0xC0)) +BBAD0103 +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 3,0xC0)) +BBAD0103000000000000000000000000000000000000000000 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 4,0xC0)) +BB +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 4,0xC0)) +BBAD +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 4,0xC0)) +BBAD01 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 4,0xC0)) +BBAD0103 +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0)) +BBAD0103000000000000000000000000000000000000000000 +select @@collation_connection; +@@collation_connection +cp1250_czech_cs +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +A4 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +A4 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +A4A5A6 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +A4A5A6 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +A4A5A6 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +A4A5A6 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +A4A5A6 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +A4A5A6 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +A4A5A6 +select @@collation_connection; +@@collation_connection +cp1250_czech_cs +select hex(weight_string('a' LEVEL 2)); +hex(weight_string('a' LEVEL 2)) +02 +select hex(weight_string('A' LEVEL 2)); +hex(weight_string('A' LEVEL 2)) +01 +select hex(weight_string('abc' LEVEL 2)); +hex(weight_string('abc' LEVEL 2)) +020202 +select hex(weight_string('abc' as char(2) LEVEL 2)); +hex(weight_string('abc' as char(2) LEVEL 2)) +020202 +select hex(weight_string('abc' as char(3) LEVEL 2)); +hex(weight_string('abc' as char(3) LEVEL 2)) +020202 +select hex(weight_string('abc' as char(5) LEVEL 2)); +hex(weight_string('abc' as char(5) LEVEL 2)) +020202 +select @@collation_connection; +@@collation_connection +cp1250_czech_cs +select hex(weight_string('a' LEVEL 1,2)); +hex(weight_string('a' LEVEL 1,2)) +A402 +select hex(weight_string('a' LEVEL 1-2)); +hex(weight_string('a' LEVEL 1-2)) +A402 +select hex(weight_string('A' LEVEL 1,2)); +hex(weight_string('A' LEVEL 1,2)) +A401 +select hex(weight_string('A' LEVEL 1-2)); +hex(weight_string('A' LEVEL 1-2)) +A401 +# +# End of 5.6 tests +# diff --git a/mysql-test/r/ctype_cp932_binlog_row.result b/mysql-test/r/ctype_cp932_binlog_row.result index cbac6b14669..6eebea87928 100644 --- a/mysql-test/r/ctype_cp932_binlog_row.result +++ b/mysql-test/r/ctype_cp932_binlog_row.result @@ -6,12 +6,13 @@ CREATE TABLE t1(f1 blob); PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)'; SET @var1= x'8300'; EXECUTE stmt1 USING @var1; -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1(f1 blob) -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT SELECT HEX(f1) FROM t1; HEX(f1) diff --git a/mysql-test/r/ctype_cp932_binlog_stm.result b/mysql-test/r/ctype_cp932_binlog_stm.result index deca926a69c..0e6ae25a395 100644 --- a/mysql-test/r/ctype_cp932_binlog_stm.result +++ b/mysql-test/r/ctype_cp932_binlog_stm.result @@ -6,10 +6,11 @@ CREATE TABLE t1(f1 blob); PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)'; SET @var1= x'8300'; EXECUTE stmt1 USING @var1; -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1(f1 blob) -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES(X'8300') master-bin.000001 # Query # # COMMIT SELECT HEX(f1) FROM t1; @@ -32,21 +33,25 @@ HEX(s1) HEX(s2) d 466F6F2773206120426172 ED40ED41ED42 47.93 DROP PROCEDURE bug18293| DROP TABLE t4| -show binlog events from <binlog_start>| +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1, s2 CHAR(50) CHARACTER SET cp932, d DECIMAL(10,2)) +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `bug18293`(IN ins1 CHAR(50), IN ins2 CHAR(50) CHARACTER SET cp932, IN ind DECIMAL(10,2)) BEGIN INSERT INTO t4 VALUES (ins1, ins2, ind); END -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 X'466F6F2773206120426172' COLLATE 'latin1_swedish_ci'), NAME_CONST('ins2',_cp932 X'ED40ED41ED42' COLLATE 'cp932_japanese_ci'), NAME_CONST('ind',47.93)) master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP PROCEDURE bug18293 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TABLE `t4` /* generated by server */ End of 5.0 tests call mtr.add_suppression("Error in Log_event::read_log_event\\\(\\\): 'Found invalid"); @@ -19510,19 +19515,749 @@ cp932 EXECUTE stmt USING @a; DROP PREPARE stmt; DROP TABLE t1; -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (0x31) master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (X'31') master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO t1 (a) VALUES (X'31') master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set names cp932; +select @@collation_connection; +@@collation_connection +cp932_japanese_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET cp932 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +41 +SELECT HEX(ws) FROM t2; +HEX(ws) +41 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET cp932 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +4141414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +4141414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +41414141412020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +41414141412020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +41 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +414243 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +4142 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +414243 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +4142432020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +41 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +4142 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +414220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +41422020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +4142202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +41422020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +41 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +4142 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +414243 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +41424320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +41 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +4142 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +414243 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +41424320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +cp932_japanese_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +41 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +414243 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +4142 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +414243 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +4142432020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020434241 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +BEBDBCDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDFBCBDBE +select collation(cast(0x8140 as char)); +collation(cast(0x8140 as char)) +cp932_japanese_ci +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +4141 +select hex(weight_string(cast(0x8140 as char))); +hex(weight_string(cast(0x8140 as char))) +8140 +select hex(weight_string(cast(0x8140 as char) as char(1))); +hex(weight_string(cast(0x8140 as char) as char(1))) +8140 +select hex(weight_string(cast(0x81408140 as char) as char(1))); +hex(weight_string(cast(0x81408140 as char) as char(1))) +8140 +select hex(weight_string(cast(0x8140 as char) as char(3))); +hex(weight_string(cast(0x8140 as char) as char(3))) +81402020 +select hex(weight_string(cast(0x81408140 as char) as char(3))); +hex(weight_string(cast(0x81408140 as char) as char(3))) +8140814020 +select hex(weight_string(cast(0x408140 as char) as char(3))); +hex(weight_string(cast(0x408140 as char) as char(3))) +40814020 +select hex(weight_string(cast(0x4081408140 as char) as char(3))); +hex(weight_string(cast(0x4081408140 as char) as char(3))) +4081408140 +select hex(weight_string(cast(0x40814081408140 as char) as char(3))); +hex(weight_string(cast(0x40814081408140 as char) as char(3))) +4081408140 +select hex(weight_string(cast(0x4040814081408140 as char) as char(3))); +hex(weight_string(cast(0x4040814081408140 as char) as char(3))) +40408140 +select hex(weight_string(cast(0x814081408140 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 2, 0xC0)) +81 +select hex(weight_string(cast(0x814081408140 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 2, 0xC0)) +8140 +select hex(weight_string(cast(0x814081408140 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 2, 0xC0)) +814081 +select hex(weight_string(cast(0x814081408140 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 2, 0xC0)) +81408140 +select hex(weight_string(cast(0x814081408140 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 2, 0xC0)) +8140814020 +select hex(weight_string(cast(0x814081408140 as char),25, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 2, 0xC0)) +81408140202020202020202020202020202020202020202020 +select hex(weight_string(cast(0x814081408140 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 3, 0xC0)) +81 +select hex(weight_string(cast(0x814081408140 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 3, 0xC0)) +8140 +select hex(weight_string(cast(0x814081408140 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 3, 0xC0)) +814081 +select hex(weight_string(cast(0x814081408140 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 3, 0xC0)) +81408140 +select hex(weight_string(cast(0x814081408140 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 3, 0xC0)) +8140814081 +select hex(weight_string(cast(0x814081408140 as char),25, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 3, 0xC0)) +81408140814020202020202020202020202020202020202020 +select hex(weight_string(cast(0x814081408140 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 4, 0xC0)) +81 +select hex(weight_string(cast(0x814081408140 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 4, 0xC0)) +8140 +select hex(weight_string(cast(0x814081408140 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 4, 0xC0)) +814081 +select hex(weight_string(cast(0x814081408140 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 4, 0xC0)) +81408140 +select hex(weight_string(cast(0x814081408140 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 4, 0xC0)) +8140814081 +select hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0)) +81408140814020202020202020202020202020202020202020 +set collation_connection=cp932_bin; +select @@collation_connection; +@@collation_connection +cp932_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET cp932 COLLATE cp932_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +61 +SELECT HEX(ws) FROM t2; +HEX(ws) +61 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET cp932 COLLATE cp932_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +6161616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +6161616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +61616161612020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +61616161612020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +61 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +616263 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +6162 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +616263 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +6162632020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +61 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +6162 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +616220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +61622020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +6162202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +61622020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +61 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +6162 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +616263 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +61626320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +61 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +6162 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +616263 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +61626320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +cp932_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +61 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +616263 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +6162 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +616263 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +6162632020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020636261 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +9E9D9CDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDF9C9D9E +select collation(cast(0x8140 as char)); +collation(cast(0x8140 as char)) +cp932_bin +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +6141 +select hex(weight_string(cast(0x8140 as char))); +hex(weight_string(cast(0x8140 as char))) +8140 +select hex(weight_string(cast(0x8140 as char) as char(1))); +hex(weight_string(cast(0x8140 as char) as char(1))) +8140 +select hex(weight_string(cast(0x81408140 as char) as char(1))); +hex(weight_string(cast(0x81408140 as char) as char(1))) +8140 +select hex(weight_string(cast(0x8140 as char) as char(3))); +hex(weight_string(cast(0x8140 as char) as char(3))) +81402020 +select hex(weight_string(cast(0x81408140 as char) as char(3))); +hex(weight_string(cast(0x81408140 as char) as char(3))) +8140814020 +select hex(weight_string(cast(0x408140 as char) as char(3))); +hex(weight_string(cast(0x408140 as char) as char(3))) +40814020 +select hex(weight_string(cast(0x4081408140 as char) as char(3))); +hex(weight_string(cast(0x4081408140 as char) as char(3))) +4081408140 +select hex(weight_string(cast(0x40814081408140 as char) as char(3))); +hex(weight_string(cast(0x40814081408140 as char) as char(3))) +4081408140 +select hex(weight_string(cast(0x4040814081408140 as char) as char(3))); +hex(weight_string(cast(0x4040814081408140 as char) as char(3))) +40408140 +select hex(weight_string(cast(0x814081408140 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 2, 0xC0)) +81 +select hex(weight_string(cast(0x814081408140 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 2, 0xC0)) +8140 +select hex(weight_string(cast(0x814081408140 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 2, 0xC0)) +814081 +select hex(weight_string(cast(0x814081408140 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 2, 0xC0)) +81408140 +select hex(weight_string(cast(0x814081408140 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 2, 0xC0)) +8140814020 +select hex(weight_string(cast(0x814081408140 as char),25, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 2, 0xC0)) +81408140202020202020202020202020202020202020202020 +select hex(weight_string(cast(0x814081408140 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 3, 0xC0)) +81 +select hex(weight_string(cast(0x814081408140 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 3, 0xC0)) +8140 +select hex(weight_string(cast(0x814081408140 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 3, 0xC0)) +814081 +select hex(weight_string(cast(0x814081408140 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 3, 0xC0)) +81408140 +select hex(weight_string(cast(0x814081408140 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 3, 0xC0)) +8140814081 +select hex(weight_string(cast(0x814081408140 as char),25, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 3, 0xC0)) +81408140814020202020202020202020202020202020202020 +select hex(weight_string(cast(0x814081408140 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 4, 0xC0)) +81 +select hex(weight_string(cast(0x814081408140 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 4, 0xC0)) +8140 +select hex(weight_string(cast(0x814081408140 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 4, 0xC0)) +814081 +select hex(weight_string(cast(0x814081408140 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 4, 0xC0)) +81408140 +select hex(weight_string(cast(0x814081408140 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 4, 0xC0)) +8140814081 +select hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0)) +81408140814020202020202020202020202020202020202020 +# +# End of 5.6 tests +# +# +# Start of 10.0 tests +# +SET NAMES cp932; +# Start of ctype_E05C.inc +SELECT HEX('à\'),HEX('à\t'); +HEX('à\') HEX('à\t') +E05C E05C74 +SELECT HEX('\\à\'),HEX('\\à\t'),HEX('\\à\t\t'); +HEX('\\à\') HEX('\\à\t') HEX('\\à\t\t') +5CE05C 5CE05C74 5CE05C7409 +SELECT HEX('''à\'),HEX('à\'''); +HEX('''à\') HEX('à\''') +27E05C E05C27 +SELECT HEX('\\''à\'),HEX('à\''\\'); +HEX('\\''à\') HEX('à\''\\') +5C27E05C E05C275C +SELECT HEX(BINARY('à\')),HEX(BINARY('à\t')); +HEX(BINARY('à\')) HEX(BINARY('à\t')) +E05C E05C74 +SELECT HEX(BINARY('\\à\')),HEX(BINARY('\\à\t')),HEX(BINARY('\\à\t\t')); +HEX(BINARY('\\à\')) HEX(BINARY('\\à\t')) HEX(BINARY('\\à\t\t')) +5CE05C 5CE05C74 5CE05C7409 +SELECT HEX(BINARY('''à\')),HEX(BINARY('à\''')); +HEX(BINARY('''à\')) HEX(BINARY('à\''')) +27E05C E05C27 +SELECT HEX(BINARY('\\''à\')),HEX(BINARY('à\''\\')); +HEX(BINARY('\\''à\')) HEX(BINARY('à\''\\')) +5C27E05C E05C275C +SELECT HEX(_BINARY'à\'),HEX(_BINARY'à\t'); +HEX(_BINARY'à\') HEX(_BINARY'à\t') +E05C E05C74 +SELECT HEX(_BINARY'\\à\'),HEX(_BINARY'\\à\t'),HEX(_BINARY'\\à\t\t'); +HEX(_BINARY'\\à\') HEX(_BINARY'\\à\t') HEX(_BINARY'\\à\t\t') +5CE05C 5CE05C74 5CE05C7409 +SELECT HEX(_BINARY'''à\'),HEX(_BINARY'à\'''); +HEX(_BINARY'''à\') HEX(_BINARY'à\''') +27E05C E05C27 +SELECT HEX(_BINARY'\\''à\'),HEX(_BINARY'à\''\\'); +HEX(_BINARY'\\''à\') HEX(_BINARY'à\''\\') +5C27E05C E05C275C +CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET cp932 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('à\'),('à\t'); +INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t'); +INSERT INTO t1 VALUES ('''à\'),('à\'''); +INSERT INTO t1 VALUES ('\\''à\'),('à\''\\'); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 (a BLOB); +INSERT INTO t1 VALUES ('à\'),('à\t'); +INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t'); +INSERT INTO t1 VALUES ('''à\'),('à\'''); +INSERT INTO t1 VALUES ('\\''à\'),('à\''\\'); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET cp932 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t')); +INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t')); +INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\''')); +INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\')); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 (a BLOB); +INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t')); +INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t')); +INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\''')); +INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\')); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET cp932 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t'); +INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t'); +INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\'''); +INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\'); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 (a BLOB); +INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t'); +INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t'); +INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\'''); +INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\'); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +SET character_set_client=binary, character_set_results=binary; +SELECT @@character_set_client, @@character_set_connection, @@character_set_results; +@@character_set_client @@character_set_connection @@character_set_results +binary cp932 binary +SELECT HEX('à\['), HEX('\à\['); +HEX('à\[') HEX('\à\[') +E05B E05B +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET cp932 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('à\['),('\à\['); +SELECT HEX(a) FROM t1; +HEX(a) +E05B +E05B +DROP TABLE t1; +SET character_set_client=@@character_set_connection, character_set_results=@@character_set_connection; +SET character_set_connection=binary; +SELECT @@character_set_client, @@character_set_connection, @@character_set_results; +@@character_set_client @@character_set_connection @@character_set_results +cp932 binary cp932 +SELECT HEX('à\['), HEX('\à\['); +HEX('à\[') HEX('\à\[') +E05C5B E05B +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varbinary(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('à\['),('\à\['); +SELECT HEX(a) FROM t1; +HEX(a) +E05C5B +E05B +DROP TABLE t1; +# Start of ctype_E05C.inc +# +# End of 10.0 tests +# diff --git a/mysql-test/r/ctype_create.result b/mysql-test/r/ctype_create.result index 35461fce45a..4128be82c23 100644 --- a/mysql-test/r/ctype_create.result +++ b/mysql-test/r/ctype_create.result @@ -76,3 +76,35 @@ ALTER DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ALTER DATABASE `` DEFAULT CHARACTER SET latin2; ERROR 42000: Incorrect database name '' +USE test; +# +# Start of 10.0 tests +# +# +# MDEV-7387 Alter table xxx CHARACTER SET utf8, CONVERT TO CHARACTER SET latin1 should fail +# +CREATE TABLE t1 (a VARCHAR(10)) CHARACTER SET DEFAULT, CHARACTER SET utf8; +ERROR HY000: Conflicting declarations: 'CHARACTER SET DEFAULT' and 'CHARACTER SET utf8' +CREATE TABLE t1 (a VARCHAR(10)) CHARACTER SET utf8, CHARACTER SET DEFAULT; +ERROR HY000: Conflicting declarations: 'CHARACTER SET utf8' and 'CHARACTER SET DEFAULT' +CREATE TABLE t1 (a VARCHAR(10)) CHARACTER SET utf8, CHARACTER SET utf8; +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(10)) CHARACTER SET DEFAULT, CHARACTER SET DEFAULT; +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1, b VARCHAR(10) CHARACTER SET utf8); +ALTER TABLE t1 CONVERT TO CHARACTER SET utf8, CHARACTER SET latin1; +ERROR HY000: Conflicting declarations: 'CHARACTER SET utf8' and 'CHARACTER SET latin1' +ALTER TABLE t1 CONVERT TO CHARACTER SET utf8, CHARACTER SET DEFAULT; +ERROR HY000: Conflicting declarations: 'CHARACTER SET utf8' and 'CHARACTER SET DEFAULT' +ALTER TABLE t1 CONVERT TO CHARACTER SET latin1, CHARACTER SET utf8; +ERROR HY000: Conflicting declarations: 'CHARACTER SET latin1' and 'CHARACTER SET utf8' +ALTER TABLE t1 CONVERT TO CHARACTER SET latin1, CHARACTER SET DEFAULT; +ERROR HY000: Conflicting declarations: 'CHARACTER SET latin1' and 'CHARACTER SET DEFAULT' +ALTER TABLE t1 CONVERT TO CHARACTER SET DEFAULT, CHARACTER SET utf8; +ERROR HY000: Conflicting declarations: 'CHARACTER SET latin5' and 'CHARACTER SET utf8' +ALTER TABLE t1 CONVERT TO CHARACTER SET DEFAULT, CHARACTER SET latin1; +ERROR HY000: Conflicting declarations: 'CHARACTER SET latin5' and 'CHARACTER SET latin1' +DROP TABLE t1; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/ctype_errors.result b/mysql-test/r/ctype_errors.result index 90d0c28eebf..5ae8c53ce8b 100644 --- a/mysql-test/r/ctype_errors.result +++ b/mysql-test/r/ctype_errors.result @@ -24,11 +24,11 @@ lc_messages ru_RU SET GLOBAL lc_messages=en_US; DROP TABLE t1; drop table `×§`; -ERROR 42S02: Unknown table '×§' +ERROR 42S02: Unknown table 'test.×§' SET lc_messages=cs_CZ; SET NAMES UTF8; USE nonexistant; -ERROR 42000: Nezn-Bámá databáze 'nonexistant' +ERROR 42000: Neznámá databáze 'nonexistant' # # Bug#12736295: Buffer overflow for variable converted_err # with non-latin1 server error message diff --git a/mysql-test/r/ctype_eucjpms.result b/mysql-test/r/ctype_eucjpms.result index 9171d4dd30b..a1232c115e9 100644 --- a/mysql-test/r/ctype_eucjpms.result +++ b/mysql-test/r/ctype_eucjpms.result @@ -9826,6 +9826,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +eucjpms_japanese_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); @@ -9870,6 +9921,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +eucjpms_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); @@ -32645,3 +32747,895 @@ DROP TABLE t1; # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set names eucjpms; +select @@collation_connection; +@@collation_connection +eucjpms_japanese_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET eucjpms NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +41 +SELECT HEX(ws) FROM t2; +HEX(ws) +41 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET eucjpms NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(15) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +4141414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +4141414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(9) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(30) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +41414141412020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +41414141412020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +41 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +414243 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +4142 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +414243 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +4142432020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +41 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +4142 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +414220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +41422020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +4142202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +41422020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +41 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +4142 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +414243 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +41424320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +41 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +4142 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +414243 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +41424320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +eucjpms_japanese_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +41 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +414243 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +4142 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +414243 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +4142432020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020434241 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +BEBDBCDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDFBCBDBE +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +eucjpms_japanese_ci +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +4141 +select hex(weight_string(cast(0xA1A1 as char))); +hex(weight_string(cast(0xA1A1 as char))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1 as char) as char(3))) +A1A12020 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))) +A1A1A1A120 +select hex(weight_string(cast(0x40A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1 as char) as char(3))) +40A1A120 +select hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))) +4040A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)) +A1A1A1A120 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)) +A1A1A1A1202020202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +eucjpms_japanese_ci +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +4141 +select hex(weight_string(cast(0x8EA1 as char))); +hex(weight_string(cast(0x8EA1 as char))) +8EA1 +select hex(weight_string(cast(0x8EA1 as char) as char(1))); +hex(weight_string(cast(0x8EA1 as char) as char(1))) +8EA1 +select hex(weight_string(cast(0x8EA18EA1 as char) as char(1))); +hex(weight_string(cast(0x8EA18EA1 as char) as char(1))) +8EA1 +select hex(weight_string(cast(0x8EA1 as char) as char(3))); +hex(weight_string(cast(0x8EA1 as char) as char(3))) +8EA12020 +select hex(weight_string(cast(0x8EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x8EA18EA1 as char) as char(3))) +8EA18EA120 +select hex(weight_string(cast(0x408EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA1 as char) as char(3))) +408EA120 +select hex(weight_string(cast(0x408EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA18EA1 as char) as char(3))) +408EA18EA1 +select hex(weight_string(cast(0x408EA18EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA18EA18EA1 as char) as char(3))) +408EA18EA1 +select hex(weight_string(cast(0x40408EA18EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x40408EA18EA18EA1 as char) as char(3))) +40408EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 2, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 2, 0xC0)) +8EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 2, 0xC0)) +8EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 2, 0xC0)) +8EA18EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 2, 0xC0)) +8EA18EA120 +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 2, 0xC0)) +8EA18EA1202020202020202020202020202020202020202020 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 3, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 3, 0xC0)) +8EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 3, 0xC0)) +8EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 3, 0xC0)) +8EA18EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 3, 0xC0)) +8EA18EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 3, 0xC0)) +8EA18EA18EA120202020202020202020202020202020202020 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 4, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 4, 0xC0)) +8EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 4, 0xC0)) +8EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 4, 0xC0)) +8EA18EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 4, 0xC0)) +8EA18EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0)) +8EA18EA18EA120202020202020202020202020202020202020 +select collation(cast(0x8FA2C3 as char)); +collation(cast(0x8FA2C3 as char)) +eucjpms_japanese_ci +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +4141 +select hex(weight_string(cast(0x8FA2C3 as char))); +hex(weight_string(cast(0x8FA2C3 as char))) +8FA2C3 +select hex(weight_string(cast(0x8FA2C3 as char) as char(1))); +hex(weight_string(cast(0x8FA2C3 as char) as char(1))) +8FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C3 as char) as char(1))); +hex(weight_string(cast(0x8FA2C38FA2C3 as char) as char(1))) +8FA2C3 +select hex(weight_string(cast(0x8FA2C3 as char) as char(3))); +hex(weight_string(cast(0x8FA2C3 as char) as char(3))) +8FA2C32020 +select hex(weight_string(cast(0x8FA2C38FA2C3 as char) as char(3))); +hex(weight_string(cast(0x8FA2C38FA2C3 as char) as char(3))) +8FA2C38FA2C320 +select hex(weight_string(cast(0x408FA2C3 as char) as char(3))); +hex(weight_string(cast(0x408FA2C3 as char) as char(3))) +408FA2C320 +select hex(weight_string(cast(0x408FA2C38FA2C3 as char) as char(3))); +hex(weight_string(cast(0x408FA2C38FA2C3 as char) as char(3))) +408FA2C38FA2C3 +select hex(weight_string(cast(0x408FA2C38FA2C38FA2C3 as char) as char(3))); +hex(weight_string(cast(0x408FA2C38FA2C38FA2C3 as char) as char(3))) +408FA2C38FA2C3 +select hex(weight_string(cast(0x40408FA2C38FA2C38FA2C3 as char) as char(3))); +hex(weight_string(cast(0x40408FA2C38FA2C38FA2C3 as char) as char(3))) +40408FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 2, 0xC0)) +8F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 2, 0xC0)) +8FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 2, 0xC0)) +8FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 2, 0xC0)) +8FA2C38F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 2, 0xC0)) +8FA2C38FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 2, 0xC0)) +8FA2C38FA2C320202020202020202020202020202020202020 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 3, 0xC0)) +8F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 3, 0xC0)) +8FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 3, 0xC0)) +8FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 3, 0xC0)) +8FA2C38F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 3, 0xC0)) +8FA2C38FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 3, 0xC0)) +8FA2C38FA2C38FA2C320202020202020202020202020202020 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 4, 0xC0)) +8F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 4, 0xC0)) +8FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 4, 0xC0)) +8FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 4, 0xC0)) +8FA2C38F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 4, 0xC0)) +8FA2C38FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 4, 0xC0)) +8FA2C38FA2C38FA2C320202020202020202020202020202020 +set collation_connection=eucjpms_bin; +select @@collation_connection; +@@collation_connection +eucjpms_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET eucjpms COLLATE eucjpms_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +61 +SELECT HEX(ws) FROM t2; +HEX(ws) +61 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET eucjpms COLLATE eucjpms_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(15) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +6161616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +6161616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(9) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(30) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +61616161612020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +61616161612020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +61 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +616263 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +6162 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +616263 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +6162632020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +61 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +6162 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +616220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +61622020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +6162202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +61622020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +61 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +6162 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +616263 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +61626320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +61 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +6162 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +616263 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +61626320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +eucjpms_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +61 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +616263 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +6162 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +616263 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +6162632020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020636261 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +9E9D9CDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDF9C9D9E +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +eucjpms_bin +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +6141 +select hex(weight_string(cast(0xA1A1 as char))); +hex(weight_string(cast(0xA1A1 as char))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1 as char) as char(3))) +A1A12020 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))) +A1A1A1A120 +select hex(weight_string(cast(0x40A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1 as char) as char(3))) +40A1A120 +select hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))) +4040A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)) +A1A1A1A120 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)) +A1A1A1A1202020202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +eucjpms_bin +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +6141 +select hex(weight_string(cast(0x8EA1 as char))); +hex(weight_string(cast(0x8EA1 as char))) +8EA1 +select hex(weight_string(cast(0x8EA1 as char) as char(1))); +hex(weight_string(cast(0x8EA1 as char) as char(1))) +8EA1 +select hex(weight_string(cast(0x8EA18EA1 as char) as char(1))); +hex(weight_string(cast(0x8EA18EA1 as char) as char(1))) +8EA1 +select hex(weight_string(cast(0x8EA1 as char) as char(3))); +hex(weight_string(cast(0x8EA1 as char) as char(3))) +8EA12020 +select hex(weight_string(cast(0x8EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x8EA18EA1 as char) as char(3))) +8EA18EA120 +select hex(weight_string(cast(0x408EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA1 as char) as char(3))) +408EA120 +select hex(weight_string(cast(0x408EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA18EA1 as char) as char(3))) +408EA18EA1 +select hex(weight_string(cast(0x408EA18EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA18EA18EA1 as char) as char(3))) +408EA18EA1 +select hex(weight_string(cast(0x40408EA18EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x40408EA18EA18EA1 as char) as char(3))) +40408EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 2, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 2, 0xC0)) +8EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 2, 0xC0)) +8EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 2, 0xC0)) +8EA18EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 2, 0xC0)) +8EA18EA120 +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 2, 0xC0)) +8EA18EA1202020202020202020202020202020202020202020 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 3, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 3, 0xC0)) +8EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 3, 0xC0)) +8EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 3, 0xC0)) +8EA18EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 3, 0xC0)) +8EA18EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 3, 0xC0)) +8EA18EA18EA120202020202020202020202020202020202020 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 4, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 4, 0xC0)) +8EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 4, 0xC0)) +8EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 4, 0xC0)) +8EA18EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 4, 0xC0)) +8EA18EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0)) +8EA18EA18EA120202020202020202020202020202020202020 +select collation(cast(0x8FA2C3 as char)); +collation(cast(0x8FA2C3 as char)) +eucjpms_bin +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +6141 +select hex(weight_string(cast(0x8FA2C3 as char))); +hex(weight_string(cast(0x8FA2C3 as char))) +8FA2C3 +select hex(weight_string(cast(0x8FA2C3 as char) as char(1))); +hex(weight_string(cast(0x8FA2C3 as char) as char(1))) +8FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C3 as char) as char(1))); +hex(weight_string(cast(0x8FA2C38FA2C3 as char) as char(1))) +8FA2C3 +select hex(weight_string(cast(0x8FA2C3 as char) as char(3))); +hex(weight_string(cast(0x8FA2C3 as char) as char(3))) +8FA2C32020 +select hex(weight_string(cast(0x8FA2C38FA2C3 as char) as char(3))); +hex(weight_string(cast(0x8FA2C38FA2C3 as char) as char(3))) +8FA2C38FA2C320 +select hex(weight_string(cast(0x408FA2C3 as char) as char(3))); +hex(weight_string(cast(0x408FA2C3 as char) as char(3))) +408FA2C320 +select hex(weight_string(cast(0x408FA2C38FA2C3 as char) as char(3))); +hex(weight_string(cast(0x408FA2C38FA2C3 as char) as char(3))) +408FA2C38FA2C3 +select hex(weight_string(cast(0x408FA2C38FA2C38FA2C3 as char) as char(3))); +hex(weight_string(cast(0x408FA2C38FA2C38FA2C3 as char) as char(3))) +408FA2C38FA2C3 +select hex(weight_string(cast(0x40408FA2C38FA2C38FA2C3 as char) as char(3))); +hex(weight_string(cast(0x40408FA2C38FA2C38FA2C3 as char) as char(3))) +40408FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 2, 0xC0)) +8F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 2, 0xC0)) +8FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 2, 0xC0)) +8FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 2, 0xC0)) +8FA2C38F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 2, 0xC0)) +8FA2C38FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 2, 0xC0)) +8FA2C38FA2C320202020202020202020202020202020202020 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 3, 0xC0)) +8F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 3, 0xC0)) +8FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 3, 0xC0)) +8FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 3, 0xC0)) +8FA2C38F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 3, 0xC0)) +8FA2C38FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 3, 0xC0)) +8FA2C38FA2C38FA2C320202020202020202020202020202020 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 4, 0xC0)) +8F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 4, 0xC0)) +8FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 4, 0xC0)) +8FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 4, 0xC0)) +8FA2C38F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 4, 0xC0)) +8FA2C38FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 4, 0xC0)) +8FA2C38FA2C38FA2C320202020202020202020202020202020 +# +# End of 5.6 tests +# +# +# Start of 10.0 tests +# +# +# MDEV-6776 ujis and eucjmps erroneously accept 0x8EA0 as a valid byte sequence +# +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET eucjpms); +INSERT INTO t1 VALUES (0x8EA0); +SELECT HEX(a), CHAR_LENGTH(a) FROM t1; +HEX(a) CHAR_LENGTH(a) + 0 +DROP TABLE t1; +SELECT _eucjpms 0x8EA0; +ERROR HY000: Invalid eucjpms character string: '8EA0' +# +# End of 10.0 tests +# diff --git a/mysql-test/r/ctype_euckr.result b/mysql-test/r/ctype_euckr.result index ff49c87d1e6..dcb68cfe60b 100644 --- a/mysql-test/r/ctype_euckr.result +++ b/mysql-test/r/ctype_euckr.result @@ -129,6 +129,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +euckr_korean_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; create table t1 engine=innodb select repeat('a',50) as c1; alter table t1 add index(c1(5)); insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111'); @@ -213,6 +264,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +euckr_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; create table t1 engine=innodb select repeat('a',50) as c1; alter table t1 add index(c1(5)); insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111'); @@ -24645,3 +24747,530 @@ DROP TABLE t1; # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set names euckr; +select @@collation_connection; +@@collation_connection +euckr_korean_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET euckr NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +41 +SELECT HEX(ws) FROM t2; +HEX(ws) +41 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET euckr NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +4141414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +4141414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +41414141412020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +41414141412020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +41 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +414243 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +4142 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +414243 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +4142432020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +41 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +4142 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +414220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +41422020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +4142202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +41422020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +41 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +4142 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +414243 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +41424320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +41 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +4142 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +414243 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +41424320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +euckr_korean_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +41 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +414243 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +4142 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +414243 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +4142432020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020434241 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +BEBDBCDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDFBCBDBE +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +euckr_korean_ci +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +4141 +select hex(weight_string(cast(0xA1A1 as char))); +hex(weight_string(cast(0xA1A1 as char))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1 as char) as char(3))) +A1A12020 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))) +A1A1A1A120 +select hex(weight_string(cast(0x40A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1 as char) as char(3))) +40A1A120 +select hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))) +4040A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)) +A1A1A1A120 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)) +A1A1A1A1202020202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +set collation_connection=euckr_bin; +select @@collation_connection; +@@collation_connection +euckr_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET euckr COLLATE euckr_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +61 +SELECT HEX(ws) FROM t2; +HEX(ws) +61 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET euckr COLLATE euckr_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +6161616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +6161616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +61616161612020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +61616161612020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +61 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +616263 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +6162 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +616263 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +6162632020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +61 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +6162 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +616220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +61622020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +6162202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +61622020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +61 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +6162 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +616263 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +61626320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +61 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +6162 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +616263 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +61626320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +euckr_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +61 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +616263 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +6162 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +616263 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +6162632020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020636261 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +9E9D9CDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDF9C9D9E +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +euckr_bin +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +6141 +select hex(weight_string(cast(0xA1A1 as char))); +hex(weight_string(cast(0xA1A1 as char))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1 as char) as char(3))) +A1A12020 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))) +A1A1A1A120 +select hex(weight_string(cast(0x40A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1 as char) as char(3))) +40A1A120 +select hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))) +4040A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)) +A1A1A1A120 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)) +A1A1A1A1202020202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +# +# End of 5.6 tests +# diff --git a/mysql-test/r/ctype_gb2312.result b/mysql-test/r/ctype_gb2312.result index 550d4fee0d6..5db6e2d3035 100644 --- a/mysql-test/r/ctype_gb2312.result +++ b/mysql-test/r/ctype_gb2312.result @@ -129,6 +129,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +gb2312_chinese_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; create table t1 engine=innodb select repeat('a',50) as c1; alter table t1 add index(c1(5)); insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111'); @@ -186,6 +237,87 @@ a hex(b) c 3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 DROP TABLE t1; +drop table if exists t1; +create table t1 select repeat('a',10) as c1; +delete from t1; +insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F); +insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F); +insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F); +insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F); +insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F); +insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F); +SELECT GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM t1 GROUP BY c1; +GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) + 20 +! 21 +" 22 +# 23 +$ 24 +% 25 +& 26 +' 27 +( 28 +) 29 +* 2A ++ 2B +, 2C +- 2D +. 2E +/ 2F +0 30 +1 31 +2 32 +3 33 +4 34 +5 35 +6 36 +7 37 +8 38 +9 39 +: 3A +; 3B +< 3C += 3D +> 3E +? 3F +@ 40 +Aa 41,61 +Bb 42,62 +Cc 43,63 +Dd 44,64 +Ee 45,65 +Ff 46,66 +Gg 47,67 +Hh 48,68 +Ii 49,69 +Jj 4A,6A +Kk 4B,6B +Ll 4C,6C +Mm 4D,6D +Nn 4E,6E +Oo 4F,6F +Pp 50,70 +Qq 51,71 +Rr 52,72 +Ss 53,73 +Tt 54,74 +Uu 55,75 +Vv 56,76 +Ww 57,77 +Xx 58,78 +Yy~ 59,79,7E +Zz 5A,7A +] 5D +[ 5B +\ 5C +^ 5E +_ 5F +` 60 +{ 7B +| 7C +} 7D + 7F +drop table t1; SET collation_connection='gb2312_bin'; create table t1 select repeat('a',4000) a; delete from t1; @@ -213,6 +345,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +gb2312_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; create table t1 engine=innodb select repeat('a',50) as c1; alter table t1 add index(c1(5)); insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111'); @@ -591,3 +774,3600 @@ DROP TABLE t1; # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set names gb2312; +select @@collation_connection; +@@collation_connection +gb2312_chinese_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET gb2312 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +41 +SELECT HEX(ws) FROM t2; +HEX(ws) +41 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET gb2312 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +4141414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +4141414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +41414141412020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +41414141412020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +41 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +414243 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +4142 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +414243 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +4142432020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +41 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +4142 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +414220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +41422020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +4142202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +41422020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +41 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +4142 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +414243 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +41424320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +41 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +4142 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +414243 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +41424320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +gb2312_chinese_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +41 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +414243 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +4142 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +414243 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +4142432020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020434241 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +BEBDBCDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDFBCBDBE +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +gb2312_chinese_ci +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +4141 +select hex(weight_string(cast(0xA1A1 as char))); +hex(weight_string(cast(0xA1A1 as char))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1 as char) as char(3))) +A1A12020 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))) +A1A1A1A120 +select hex(weight_string(cast(0x40A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1 as char) as char(3))) +40A1A120 +select hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))) +4040A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)) +A1A1A1A120 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)) +A1A1A1A1202020202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +set collation_connection=gb2312_bin; +select @@collation_connection; +@@collation_connection +gb2312_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET gb2312 COLLATE gb2312_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +61 +SELECT HEX(ws) FROM t2; +HEX(ws) +61 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET gb2312 COLLATE gb2312_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +6161616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +6161616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +61616161612020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +61616161612020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +61 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +616263 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +6162 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +616263 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +6162632020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +61 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +6162 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +616220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +61622020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +6162202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +61622020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +61 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +6162 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +616263 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +61626320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +61 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +6162 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +616263 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +61626320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +gb2312_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +61 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +616263 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +6162 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +616263 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +6162632020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020636261 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +9E9D9CDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDF9C9D9E +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +gb2312_bin +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +6141 +select hex(weight_string(cast(0xA1A1 as char))); +hex(weight_string(cast(0xA1A1 as char))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1 as char) as char(3))) +A1A12020 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))) +A1A1A1A120 +select hex(weight_string(cast(0x40A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1 as char) as char(3))) +40A1A120 +select hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))) +4040A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)) +A1A1A1A120 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)) +A1A1A1A1202020202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +# +# End of 5.6 tests +# +# +# Start of 10.0 tests +# +# Start of ctype_unescape.inc +SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection'; +PREPARE stmt FROM @query; +EXECUTE stmt; +CHARSET('test') @@character_set_client @@character_set_connection +gb2312 gb2312 gb2312 +DEALLOCATE PREPARE stmt; +CREATE TABLE allbytes (a VARBINARY(10)); +# Using selected bytes combinations +CREATE TABLE halfs (a INT); +INSERT INTO halfs VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07); +INSERT INTO halfs VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +CREATE TEMPORARY TABLE bytes (a BINARY(1), KEY(a)) ENGINE=MyISAM; +INSERT INTO bytes SELECT CHAR((t1.a << 4) | t2.a USING BINARY) FROM halfs t1, halfs t2; +DROP TABLE halfs; +CREATE TABLE selected_bytes (a VARBINARY(10)); +INSERT INTO selected_bytes (a) VALUES ('\0'),('\b'),('\t'),('\r'),('\n'),('\Z'); +INSERT INTO selected_bytes (a) VALUES ('0'),('b'),('t'),('r'),('n'),('Z'); +INSERT INTO selected_bytes (a) VALUES ('\\'),('_'),('%'),(0x22),(0x27); +INSERT INTO selected_bytes (a) VALUES ('a'); +INSERT INTO selected_bytes (a) VALUES +(0x3F), # 7bit +(0x40), # 7bit mbtail +(0x7E), # 7bit mbtail nonascii-8bit +(0x7F), # 7bit nonascii-8bit +(0x80), # mbtail bad-mb +(0x81), # mbhead mbtail +(0x9F), # mbhead mbtail bad-mb +(0xA0), # mbhead mbtail bad-mb +(0xA1), # mbhead mbtail nonascii-8bit +(0xE0), # mbhead mbtai +(0xEF), # mbhead mbtail +(0xF9), # mbhead mbtail +(0xFA), # mbhead mbtail bad-mb +(0xFC), # mbhead mbtail bad-mb +(0xFD), # mbhead mbtail bad-mb +(0xFE), # mbhead mbtial bad-mb +(0xFF); +INSERT INTO allbytes (a) SELECT a FROM bytes; +INSERT INTO allbytes (a) SELECT CONCAT(t1.a,t2.a) FROM selected_bytes t1,selected_bytes t2; +INSERT INTO allbytes (a) SELECT CONCAT(0x5C,t1.a,t2.a) FROM selected_bytes t1,selected_bytes t2; +INSERT INTO allbytes (a) SELECT CONCAT(0x5C,t1.a,0x5C,t2.a) FROM selected_bytes t1,selected_bytes t2; +DROP TABLE selected_bytes; +DELETE FROM allbytes WHERE +OCTET_LENGTH(a)>1 AND +LOCATE(0x5C,a)=0 AND +a NOT LIKE '%\'%' AND + a NOT LIKE '%"%'; +CREATE PROCEDURE p1(val VARBINARY(10)) +BEGIN +DECLARE EXIT HANDLER FOR SQLSTATE '42000' INSERT INTO t1 (a,b) VALUES(val,NULL); +SET @query=CONCAT(_binary"INSERT INTO t1 (a,b) VALUES (0x",HEX(val),",'",val,"')"); +PREPARE stmt FROM @query; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; +END// +CREATE PROCEDURE p2() +BEGIN +DECLARE val VARBINARY(10); +DECLARE done INT DEFAULT FALSE; +DECLARE stmt CURSOR FOR SELECT a FROM allbytes; +DECLARE CONTINUE HANDLER FOR NOT FOUND SET done=TRUE; +OPEN stmt; +read_loop1: LOOP +FETCH stmt INTO val; +IF done THEN +LEAVE read_loop1; +END IF; +CALL p1(val); +END LOOP; +CLOSE stmt; +END// +CREATE FUNCTION iswellformed(a VARBINARY(256)) RETURNS INT RETURN a=BINARY CONVERT(a USING gb2312);// +CREATE FUNCTION unescape(a VARBINARY(256)) RETURNS VARBINARY(256) +BEGIN +# We need to do it in a way to avoid producing new escape sequences +# First, enclose all known escsape sequences to '{{xx}}' + # - Backslash not followed by a LIKE pattern characters _ and % +# - Double escapes +# This uses PCRE Branch Reset Groups: (?|(alt1)|(alt2)|(alt3)). +# So '\\1' in the last argument always means the match, no matter +# which alternative it came from. +SET a=REGEXP_REPLACE(a,'(?|(\\\\[^_%])|(\\x{27}\\x{27}))','{{\\1}}'); +# Now unescape all enclosed standard escape sequences +SET a=REPLACE(a,'{{\\0}}', '\0'); +SET a=REPLACE(a,'{{\\b}}', '\b'); +SET a=REPLACE(a,'{{\\t}}', '\t'); +SET a=REPLACE(a,'{{\\r}}', '\r'); +SET a=REPLACE(a,'{{\\n}}', '\n'); +SET a=REPLACE(a,'{{\\Z}}', '\Z'); +SET a=REPLACE(a,'{{\\\'}}', '\''); +# Unescape double quotes +SET a=REPLACE(a,'{{\'\'}}', '\''); + # Unescape the rest: all other \x sequences mean just 'x' + SET a=REGEXP_REPLACE(a, '{{\\\\(.|\\R)}}', '\\1'); + RETURN a; +END// +CREATE FUNCTION unescape_type(a VARBINARY(256),b VARBINARY(256)) RETURNS VARBINARY(256) +BEGIN +RETURN CASE +WHEN b IS NULL THEN '[SyntErr]' + WHEN a=b THEN CASE +WHEN OCTET_LENGTH(a)=1 THEN '[Preserve]' + WHEN a RLIKE '\\\\[_%]' THEN '[Preserve][LIKE]' + WHEN a RLIKE '^[[:ascii:]]+$' THEN '[Preserve][ASCII]' + ELSE '[Preserv][MB]' END +WHEN REPLACE(a,0x5C,'')=b THEN '[Trivial]' + WHEN UNESCAPE(a)=b THEN '[Regular]' + ELSE '[Special]' END; +END// +CREATE FUNCTION wellformedness(a VARBINARY(256), b VARBINARY(256)) +RETURNS VARBINARY(256) +BEGIN +RETURN CASE +WHEN b IS NULL THEN '' + WHEN NOT iswellformed(a) AND iswellformed(b) THEN '[FIXED]' + WHEN iswellformed(a) AND NOT iswellformed(b) THEN '[BROKE]' + WHEN NOT iswellformed(a) AND NOT iswellformed(b) THEN '[ILSEQ]' + ELSE '' + END; +END// +CREATE FUNCTION mysql_real_escape_string_generated(a VARBINARY(256)) +RETURNS VARBINARY(256) +BEGIN +DECLARE a1 BINARY(1) DEFAULT SUBSTR(a,1,1); +DECLARE a2 BINARY(1) DEFAULT SUBSTR(a,2,1); +DECLARE a3 BINARY(1) DEFAULT SUBSTR(a,3,1); +DECLARE a4 BINARY(1) DEFAULT SUBSTR(a,4,1); +DECLARE a2a4 BINARY(2) DEFAULT CONCAT(a2,a4); +RETURN CASE +WHEN (a1=0x5C) AND +(a3=0x5C) AND +(a2>0x7F) AND +(a4 NOT IN ('_','%','0','t','r','n','Z')) AND +iswellformed(a2a4) THEN '[USER]' + ELSE '' + END; +END// +CREATE TABLE t1 (a VARBINARY(10),b VARBINARY(10)); +CALL p2(); +SELECT HEX(a),HEX(b), +CONCAT(unescape_type(a,b), +wellformedness(a,b), +mysql_real_escape_string_generated(a), +IF(UNESCAPE(a)<>b,CONCAT('[BAD',HEX(UNESCAPE(a)),']'),'')) AS comment +FROM t1 ORDER BY LENGTH(a),a; +HEX(a) HEX(b) comment +00 00 [Preserve] +01 01 [Preserve] +02 02 [Preserve] +03 03 [Preserve] +04 04 [Preserve] +05 05 [Preserve] +06 06 [Preserve] +07 07 [Preserve] +08 08 [Preserve] +09 09 [Preserve] +0A 0A [Preserve] +0B 0B [Preserve] +0C 0C [Preserve] +0D 0D [Preserve] +0E 0E [Preserve] +0F 0F [Preserve] +10 10 [Preserve] +11 11 [Preserve] +12 12 [Preserve] +13 13 [Preserve] +14 14 [Preserve] +15 15 [Preserve] +16 16 [Preserve] +17 17 [Preserve] +18 18 [Preserve] +19 19 [Preserve] +1A 1A [Preserve] +1B 1B [Preserve] +1C 1C [Preserve] +1D 1D [Preserve] +1E 1E [Preserve] +1F 1F [Preserve] +20 20 [Preserve] +21 21 [Preserve] +22 22 [Preserve] +23 23 [Preserve] +24 24 [Preserve] +25 25 [Preserve] +26 26 [Preserve] +27 NULL [SyntErr] +28 28 [Preserve] +29 29 [Preserve] +2A 2A [Preserve] +2B 2B [Preserve] +2C 2C [Preserve] +2D 2D [Preserve] +2E 2E [Preserve] +2F 2F [Preserve] +30 30 [Preserve] +31 31 [Preserve] +32 32 [Preserve] +33 33 [Preserve] +34 34 [Preserve] +35 35 [Preserve] +36 36 [Preserve] +37 37 [Preserve] +38 38 [Preserve] +39 39 [Preserve] +3A 3A [Preserve] +3B 3B [Preserve] +3C 3C [Preserve] +3D 3D [Preserve] +3E 3E [Preserve] +3F 3F [Preserve] +40 40 [Preserve] +41 41 [Preserve] +42 42 [Preserve] +43 43 [Preserve] +44 44 [Preserve] +45 45 [Preserve] +46 46 [Preserve] +47 47 [Preserve] +48 48 [Preserve] +49 49 [Preserve] +4A 4A [Preserve] +4B 4B [Preserve] +4C 4C [Preserve] +4D 4D [Preserve] +4E 4E [Preserve] +4F 4F [Preserve] +50 50 [Preserve] +51 51 [Preserve] +52 52 [Preserve] +53 53 [Preserve] +54 54 [Preserve] +55 55 [Preserve] +56 56 [Preserve] +57 57 [Preserve] +58 58 [Preserve] +59 59 [Preserve] +5A 5A [Preserve] +5B 5B [Preserve] +5C NULL [SyntErr] +5D 5D [Preserve] +5E 5E [Preserve] +5F 5F [Preserve] +60 60 [Preserve] +61 61 [Preserve] +62 62 [Preserve] +63 63 [Preserve] +64 64 [Preserve] +65 65 [Preserve] +66 66 [Preserve] +67 67 [Preserve] +68 68 [Preserve] +69 69 [Preserve] +6A 6A [Preserve] +6B 6B [Preserve] +6C 6C [Preserve] +6D 6D [Preserve] +6E 6E [Preserve] +6F 6F [Preserve] +70 70 [Preserve] +71 71 [Preserve] +72 72 [Preserve] +73 73 [Preserve] +74 74 [Preserve] +75 75 [Preserve] +76 76 [Preserve] +77 77 [Preserve] +78 78 [Preserve] +79 79 [Preserve] +7A 7A [Preserve] +7B 7B [Preserve] +7C 7C [Preserve] +7D 7D [Preserve] +7E 7E [Preserve] +7F 7F [Preserve] +80 80 [Preserve][ILSEQ] +81 81 [Preserve][ILSEQ] +82 82 [Preserve][ILSEQ] +83 83 [Preserve][ILSEQ] +84 84 [Preserve][ILSEQ] +85 85 [Preserve][ILSEQ] +86 86 [Preserve][ILSEQ] +87 87 [Preserve][ILSEQ] +88 88 [Preserve][ILSEQ] +89 89 [Preserve][ILSEQ] +8A 8A [Preserve][ILSEQ] +8B 8B [Preserve][ILSEQ] +8C 8C [Preserve][ILSEQ] +8D 8D [Preserve][ILSEQ] +8E 8E [Preserve][ILSEQ] +8F 8F [Preserve][ILSEQ] +90 90 [Preserve][ILSEQ] +91 91 [Preserve][ILSEQ] +92 92 [Preserve][ILSEQ] +93 93 [Preserve][ILSEQ] +94 94 [Preserve][ILSEQ] +95 95 [Preserve][ILSEQ] +96 96 [Preserve][ILSEQ] +97 97 [Preserve][ILSEQ] +98 98 [Preserve][ILSEQ] +99 99 [Preserve][ILSEQ] +9A 9A [Preserve][ILSEQ] +9B 9B [Preserve][ILSEQ] +9C 9C [Preserve][ILSEQ] +9D 9D [Preserve][ILSEQ] +9E 9E [Preserve][ILSEQ] +9F 9F [Preserve][ILSEQ] +A0 A0 [Preserve][ILSEQ] +A1 A1 [Preserve][ILSEQ] +A2 A2 [Preserve][ILSEQ] +A3 A3 [Preserve][ILSEQ] +A4 A4 [Preserve][ILSEQ] +A5 A5 [Preserve][ILSEQ] +A6 A6 [Preserve][ILSEQ] +A7 A7 [Preserve][ILSEQ] +A8 A8 [Preserve][ILSEQ] +A9 A9 [Preserve][ILSEQ] +AA AA [Preserve][ILSEQ] +AB AB [Preserve][ILSEQ] +AC AC [Preserve][ILSEQ] +AD AD [Preserve][ILSEQ] +AE AE [Preserve][ILSEQ] +AF AF [Preserve][ILSEQ] +B0 B0 [Preserve][ILSEQ] +B1 B1 [Preserve][ILSEQ] +B2 B2 [Preserve][ILSEQ] +B3 B3 [Preserve][ILSEQ] +B4 B4 [Preserve][ILSEQ] +B5 B5 [Preserve][ILSEQ] +B6 B6 [Preserve][ILSEQ] +B7 B7 [Preserve][ILSEQ] +B8 B8 [Preserve][ILSEQ] +B9 B9 [Preserve][ILSEQ] +BA BA [Preserve][ILSEQ] +BB BB [Preserve][ILSEQ] +BC BC [Preserve][ILSEQ] +BD BD [Preserve][ILSEQ] +BE BE [Preserve][ILSEQ] +BF BF [Preserve][ILSEQ] +C0 C0 [Preserve][ILSEQ] +C1 C1 [Preserve][ILSEQ] +C2 C2 [Preserve][ILSEQ] +C3 C3 [Preserve][ILSEQ] +C4 C4 [Preserve][ILSEQ] +C5 C5 [Preserve][ILSEQ] +C6 C6 [Preserve][ILSEQ] +C7 C7 [Preserve][ILSEQ] +C8 C8 [Preserve][ILSEQ] +C9 C9 [Preserve][ILSEQ] +CA CA [Preserve][ILSEQ] +CB CB [Preserve][ILSEQ] +CC CC [Preserve][ILSEQ] +CD CD [Preserve][ILSEQ] +CE CE [Preserve][ILSEQ] +CF CF [Preserve][ILSEQ] +D0 D0 [Preserve][ILSEQ] +D1 D1 [Preserve][ILSEQ] +D2 D2 [Preserve][ILSEQ] +D3 D3 [Preserve][ILSEQ] +D4 D4 [Preserve][ILSEQ] +D5 D5 [Preserve][ILSEQ] +D6 D6 [Preserve][ILSEQ] +D7 D7 [Preserve][ILSEQ] +D8 D8 [Preserve][ILSEQ] +D9 D9 [Preserve][ILSEQ] +DA DA [Preserve][ILSEQ] +DB DB [Preserve][ILSEQ] +DC DC [Preserve][ILSEQ] +DD DD [Preserve][ILSEQ] +DE DE [Preserve][ILSEQ] +DF DF [Preserve][ILSEQ] +E0 E0 [Preserve][ILSEQ] +E1 E1 [Preserve][ILSEQ] +E2 E2 [Preserve][ILSEQ] +E3 E3 [Preserve][ILSEQ] +E4 E4 [Preserve][ILSEQ] +E5 E5 [Preserve][ILSEQ] +E6 E6 [Preserve][ILSEQ] +E7 E7 [Preserve][ILSEQ] +E8 E8 [Preserve][ILSEQ] +E9 E9 [Preserve][ILSEQ] +EA EA [Preserve][ILSEQ] +EB EB [Preserve][ILSEQ] +EC EC [Preserve][ILSEQ] +ED ED [Preserve][ILSEQ] +EE EE [Preserve][ILSEQ] +EF EF [Preserve][ILSEQ] +F0 F0 [Preserve][ILSEQ] +F1 F1 [Preserve][ILSEQ] +F2 F2 [Preserve][ILSEQ] +F3 F3 [Preserve][ILSEQ] +F4 F4 [Preserve][ILSEQ] +F5 F5 [Preserve][ILSEQ] +F6 F6 [Preserve][ILSEQ] +F7 F7 [Preserve][ILSEQ] +F8 F8 [Preserve][ILSEQ] +F9 F9 [Preserve][ILSEQ] +FA FA [Preserve][ILSEQ] +FB FB [Preserve][ILSEQ] +FC FC [Preserve][ILSEQ] +FD FD [Preserve][ILSEQ] +FE FE [Preserve][ILSEQ] +FF FF [Preserve][ILSEQ] +0022 0022 [Preserve][ASCII] +0027 NULL [SyntErr] +005C NULL [SyntErr] +0822 0822 [Preserve][ASCII] +0827 NULL [SyntErr] +085C NULL [SyntErr] +0922 0922 [Preserve][ASCII] +0927 NULL [SyntErr] +095C NULL [SyntErr] +0A22 0A22 [Preserve][ASCII] +0A27 NULL [SyntErr] +0A5C NULL [SyntErr] +0D22 0D22 [Preserve][ASCII] +0D27 NULL [SyntErr] +0D5C NULL [SyntErr] +1A22 1A22 [Preserve][ASCII] +1A27 NULL [SyntErr] +1A5C NULL [SyntErr] +2200 2200 [Preserve][ASCII] +2208 2208 [Preserve][ASCII] +2209 2209 [Preserve][ASCII] +220A 220A [Preserve][ASCII] +220D 220D [Preserve][ASCII] +221A 221A [Preserve][ASCII] +2222 2222 [Preserve][ASCII] +2225 2225 [Preserve][ASCII] +2227 NULL [SyntErr] +2230 2230 [Preserve][ASCII] +223F 223F [Preserve][ASCII] +2240 2240 [Preserve][ASCII] +225A 225A [Preserve][ASCII] +225C NULL [SyntErr] +225F 225F [Preserve][ASCII] +2261 2261 [Preserve][ASCII] +2262 2262 [Preserve][ASCII] +226E 226E [Preserve][ASCII] +2272 2272 [Preserve][ASCII] +2274 2274 [Preserve][ASCII] +227E 227E [Preserve][ASCII] +227F 227F [Preserve][ASCII] +2280 2280 [Preserv][MB][ILSEQ] +2281 2281 [Preserv][MB][ILSEQ] +229F 229F [Preserv][MB][ILSEQ] +22A0 22A0 [Preserv][MB][ILSEQ] +22A1 22A1 [Preserv][MB][ILSEQ] +22E0 22E0 [Preserv][MB][ILSEQ] +22EF 22EF [Preserv][MB][ILSEQ] +22F9 22F9 [Preserv][MB][ILSEQ] +22FA 22FA [Preserv][MB][ILSEQ] +22FC 22FC [Preserv][MB][ILSEQ] +22FD 22FD [Preserv][MB][ILSEQ] +22FE 22FE [Preserv][MB][ILSEQ] +22FF 22FF [Preserv][MB][ILSEQ] +2522 2522 [Preserve][ASCII] +2527 NULL [SyntErr] +255C NULL [SyntErr] +2700 NULL [SyntErr] +2708 NULL [SyntErr] +2709 NULL [SyntErr] +270A NULL [SyntErr] +270D NULL [SyntErr] +271A NULL [SyntErr] +2722 NULL [SyntErr] +2725 NULL [SyntErr] +2727 27 [Regular] +2730 NULL [SyntErr] +273F NULL [SyntErr] +2740 NULL [SyntErr] +275A NULL [SyntErr] +275C NULL [SyntErr] +275F NULL [SyntErr] +2761 NULL [SyntErr] +2762 NULL [SyntErr] +276E NULL [SyntErr] +2772 NULL [SyntErr] +2774 NULL [SyntErr] +277E NULL [SyntErr] +277F NULL [SyntErr] +2780 NULL [SyntErr] +2781 NULL [SyntErr] +279F NULL [SyntErr] +27A0 NULL [SyntErr] +27A1 NULL [SyntErr] +27E0 NULL [SyntErr] +27EF NULL [SyntErr] +27F9 NULL [SyntErr] +27FA NULL [SyntErr] +27FC NULL [SyntErr] +27FD NULL [SyntErr] +27FE NULL [SyntErr] +27FF NULL [SyntErr] +3022 3022 [Preserve][ASCII] +3027 NULL [SyntErr] +305C NULL [SyntErr] +3F22 3F22 [Preserve][ASCII] +3F27 NULL [SyntErr] +3F5C NULL [SyntErr] +4022 4022 [Preserve][ASCII] +4027 NULL [SyntErr] +405C NULL [SyntErr] +5A22 5A22 [Preserve][ASCII] +5A27 NULL [SyntErr] +5A5C NULL [SyntErr] +5C00 00 [Trivial] +5C08 08 [Trivial] +5C09 09 [Trivial] +5C0A 0A [Trivial] +5C0D 0D [Trivial] +5C1A 1A [Trivial] +5C22 22 [Trivial] +5C25 5C25 [Preserve][LIKE] +5C27 27 [Trivial] +5C30 00 [Regular] +5C3F 3F [Trivial] +5C40 40 [Trivial] +5C5A 1A [Regular] +5C5C 5C [Regular] +5C5F 5C5F [Preserve][LIKE] +5C61 61 [Trivial] +5C62 08 [Regular] +5C6E 0A [Regular] +5C72 0D [Regular] +5C74 09 [Regular] +5C7E 7E [Trivial] +5C7F 7F [Trivial] +5C80 80 [Trivial][ILSEQ] +5C81 81 [Trivial][ILSEQ] +5C9F 9F [Trivial][ILSEQ] +5CA0 A0 [Trivial][ILSEQ] +5CA1 A1 [Trivial][ILSEQ] +5CE0 E0 [Trivial][ILSEQ] +5CEF EF [Trivial][ILSEQ] +5CF9 F9 [Trivial][ILSEQ] +5CFA FA [Trivial][ILSEQ] +5CFC FC [Trivial][ILSEQ] +5CFD FD [Trivial][ILSEQ] +5CFE FE [Trivial][ILSEQ] +5CFF FF [Trivial][ILSEQ] +5F22 5F22 [Preserve][ASCII] +5F27 NULL [SyntErr] +5F5C NULL [SyntErr] +6122 6122 [Preserve][ASCII] +6127 NULL [SyntErr] +615C NULL [SyntErr] +6222 6222 [Preserve][ASCII] +6227 NULL [SyntErr] +625C NULL [SyntErr] +6E22 6E22 [Preserve][ASCII] +6E27 NULL [SyntErr] +6E5C NULL [SyntErr] +7222 7222 [Preserve][ASCII] +7227 NULL [SyntErr] +725C NULL [SyntErr] +7422 7422 [Preserve][ASCII] +7427 NULL [SyntErr] +745C NULL [SyntErr] +7E22 7E22 [Preserve][ASCII] +7E27 NULL [SyntErr] +7E5C NULL [SyntErr] +7F22 7F22 [Preserve][ASCII] +7F27 NULL [SyntErr] +7F5C NULL [SyntErr] +8022 8022 [Preserv][MB][ILSEQ] +8027 NULL [SyntErr] +805C NULL [SyntErr] +8122 8122 [Preserv][MB][ILSEQ] +8127 NULL [SyntErr] +815C NULL [SyntErr] +9F22 9F22 [Preserv][MB][ILSEQ] +9F27 NULL [SyntErr] +9F5C NULL [SyntErr] +A022 A022 [Preserv][MB][ILSEQ] +A027 NULL [SyntErr] +A05C NULL [SyntErr] +A122 A122 [Preserv][MB][ILSEQ] +A127 NULL [SyntErr] +A15C NULL [SyntErr] +E022 E022 [Preserv][MB][ILSEQ] +E027 NULL [SyntErr] +E05C NULL [SyntErr] +EF22 EF22 [Preserv][MB][ILSEQ] +EF27 NULL [SyntErr] +EF5C NULL [SyntErr] +F922 F922 [Preserv][MB][ILSEQ] +F927 NULL [SyntErr] +F95C NULL [SyntErr] +FA22 FA22 [Preserv][MB][ILSEQ] +FA27 NULL [SyntErr] +FA5C NULL [SyntErr] +FC22 FC22 [Preserv][MB][ILSEQ] +FC27 NULL [SyntErr] +FC5C NULL [SyntErr] +FD22 FD22 [Preserv][MB][ILSEQ] +FD27 NULL [SyntErr] +FD5C NULL [SyntErr] +FE22 FE22 [Preserv][MB][ILSEQ] +FE27 NULL [SyntErr] +FE5C NULL [SyntErr] +FF22 FF22 [Preserv][MB][ILSEQ] +FF27 NULL [SyntErr] +FF5C NULL [SyntErr] +5C0000 0000 [Trivial] +5C0008 0008 [Trivial] +5C0009 0009 [Trivial] +5C000A 000A [Trivial] +5C000D 000D [Trivial] +5C001A 001A [Trivial] +5C0022 0022 [Trivial] +5C0025 0025 [Trivial] +5C0027 NULL [SyntErr] +5C0030 0030 [Trivial] +5C003F 003F [Trivial] +5C0040 0040 [Trivial] +5C005A 005A [Trivial] +5C005C NULL [SyntErr] +5C005F 005F [Trivial] +5C0061 0061 [Trivial] +5C0062 0062 [Trivial] +5C006E 006E [Trivial] +5C0072 0072 [Trivial] +5C0074 0074 [Trivial] +5C007E 007E [Trivial] +5C007F 007F [Trivial] +5C0080 0080 [Trivial][ILSEQ] +5C0081 0081 [Trivial][ILSEQ] +5C009F 009F [Trivial][ILSEQ] +5C00A0 00A0 [Trivial][ILSEQ] +5C00A1 00A1 [Trivial][ILSEQ] +5C00E0 00E0 [Trivial][ILSEQ] +5C00EF 00EF [Trivial][ILSEQ] +5C00F9 00F9 [Trivial][ILSEQ] +5C00FA 00FA [Trivial][ILSEQ] +5C00FC 00FC [Trivial][ILSEQ] +5C00FD 00FD [Trivial][ILSEQ] +5C00FE 00FE [Trivial][ILSEQ] +5C00FF 00FF [Trivial][ILSEQ] +5C0800 0800 [Trivial] +5C0808 0808 [Trivial] +5C0809 0809 [Trivial] +5C080A 080A [Trivial] +5C080D 080D [Trivial] +5C081A 081A [Trivial] +5C0822 0822 [Trivial] +5C0825 0825 [Trivial] +5C0827 NULL [SyntErr] +5C0830 0830 [Trivial] +5C083F 083F [Trivial] +5C0840 0840 [Trivial] +5C085A 085A [Trivial] +5C085C NULL [SyntErr] +5C085F 085F [Trivial] +5C0861 0861 [Trivial] +5C0862 0862 [Trivial] +5C086E 086E [Trivial] +5C0872 0872 [Trivial] +5C0874 0874 [Trivial] +5C087E 087E [Trivial] +5C087F 087F [Trivial] +5C0880 0880 [Trivial][ILSEQ] +5C0881 0881 [Trivial][ILSEQ] +5C089F 089F [Trivial][ILSEQ] +5C08A0 08A0 [Trivial][ILSEQ] +5C08A1 08A1 [Trivial][ILSEQ] +5C08E0 08E0 [Trivial][ILSEQ] +5C08EF 08EF [Trivial][ILSEQ] +5C08F9 08F9 [Trivial][ILSEQ] +5C08FA 08FA [Trivial][ILSEQ] +5C08FC 08FC [Trivial][ILSEQ] +5C08FD 08FD [Trivial][ILSEQ] +5C08FE 08FE [Trivial][ILSEQ] +5C08FF 08FF [Trivial][ILSEQ] +5C0900 0900 [Trivial] +5C0908 0908 [Trivial] +5C0909 0909 [Trivial] +5C090A 090A [Trivial] +5C090D 090D [Trivial] +5C091A 091A [Trivial] +5C0922 0922 [Trivial] +5C0925 0925 [Trivial] +5C0927 NULL [SyntErr] +5C0930 0930 [Trivial] +5C093F 093F [Trivial] +5C0940 0940 [Trivial] +5C095A 095A [Trivial] +5C095C NULL [SyntErr] +5C095F 095F [Trivial] +5C0961 0961 [Trivial] +5C0962 0962 [Trivial] +5C096E 096E [Trivial] +5C0972 0972 [Trivial] +5C0974 0974 [Trivial] +5C097E 097E [Trivial] +5C097F 097F [Trivial] +5C0980 0980 [Trivial][ILSEQ] +5C0981 0981 [Trivial][ILSEQ] +5C099F 099F [Trivial][ILSEQ] +5C09A0 09A0 [Trivial][ILSEQ] +5C09A1 09A1 [Trivial][ILSEQ] +5C09E0 09E0 [Trivial][ILSEQ] +5C09EF 09EF [Trivial][ILSEQ] +5C09F9 09F9 [Trivial][ILSEQ] +5C09FA 09FA [Trivial][ILSEQ] +5C09FC 09FC [Trivial][ILSEQ] +5C09FD 09FD [Trivial][ILSEQ] +5C09FE 09FE [Trivial][ILSEQ] +5C09FF 09FF [Trivial][ILSEQ] +5C0A00 0A00 [Trivial] +5C0A08 0A08 [Trivial] +5C0A09 0A09 [Trivial] +5C0A0A 0A0A [Trivial] +5C0A0D 0A0D [Trivial] +5C0A1A 0A1A [Trivial] +5C0A22 0A22 [Trivial] +5C0A25 0A25 [Trivial] +5C0A27 NULL [SyntErr] +5C0A30 0A30 [Trivial] +5C0A3F 0A3F [Trivial] +5C0A40 0A40 [Trivial] +5C0A5A 0A5A [Trivial] +5C0A5C NULL [SyntErr] +5C0A5F 0A5F [Trivial] +5C0A61 0A61 [Trivial] +5C0A62 0A62 [Trivial] +5C0A6E 0A6E [Trivial] +5C0A72 0A72 [Trivial] +5C0A74 0A74 [Trivial] +5C0A7E 0A7E [Trivial] +5C0A7F 0A7F [Trivial] +5C0A80 0A80 [Trivial][ILSEQ] +5C0A81 0A81 [Trivial][ILSEQ] +5C0A9F 0A9F [Trivial][ILSEQ] +5C0AA0 0AA0 [Trivial][ILSEQ] +5C0AA1 0AA1 [Trivial][ILSEQ] +5C0AE0 0AE0 [Trivial][ILSEQ] +5C0AEF 0AEF [Trivial][ILSEQ] +5C0AF9 0AF9 [Trivial][ILSEQ] +5C0AFA 0AFA [Trivial][ILSEQ] +5C0AFC 0AFC [Trivial][ILSEQ] +5C0AFD 0AFD [Trivial][ILSEQ] +5C0AFE 0AFE [Trivial][ILSEQ] +5C0AFF 0AFF [Trivial][ILSEQ] +5C0D00 0D00 [Trivial] +5C0D08 0D08 [Trivial] +5C0D09 0D09 [Trivial] +5C0D0A 0D0A [Trivial] +5C0D0D 0D0D [Trivial] +5C0D1A 0D1A [Trivial] +5C0D22 0D22 [Trivial] +5C0D25 0D25 [Trivial] +5C0D27 NULL [SyntErr] +5C0D30 0D30 [Trivial] +5C0D3F 0D3F [Trivial] +5C0D40 0D40 [Trivial] +5C0D5A 0D5A [Trivial] +5C0D5C NULL [SyntErr] +5C0D5F 0D5F [Trivial] +5C0D61 0D61 [Trivial] +5C0D62 0D62 [Trivial] +5C0D6E 0D6E [Trivial] +5C0D72 0D72 [Trivial] +5C0D74 0D74 [Trivial] +5C0D7E 0D7E [Trivial] +5C0D7F 0D7F [Trivial] +5C0D80 0D80 [Trivial][ILSEQ] +5C0D81 0D81 [Trivial][ILSEQ] +5C0D9F 0D9F [Trivial][ILSEQ] +5C0DA0 0DA0 [Trivial][ILSEQ] +5C0DA1 0DA1 [Trivial][ILSEQ] +5C0DE0 0DE0 [Trivial][ILSEQ] +5C0DEF 0DEF [Trivial][ILSEQ] +5C0DF9 0DF9 [Trivial][ILSEQ] +5C0DFA 0DFA [Trivial][ILSEQ] +5C0DFC 0DFC [Trivial][ILSEQ] +5C0DFD 0DFD [Trivial][ILSEQ] +5C0DFE 0DFE [Trivial][ILSEQ] +5C0DFF 0DFF [Trivial][ILSEQ] +5C1A00 1A00 [Trivial] +5C1A08 1A08 [Trivial] +5C1A09 1A09 [Trivial] +5C1A0A 1A0A [Trivial] +5C1A0D 1A0D [Trivial] +5C1A1A 1A1A [Trivial] +5C1A22 1A22 [Trivial] +5C1A25 1A25 [Trivial] +5C1A27 NULL [SyntErr] +5C1A30 1A30 [Trivial] +5C1A3F 1A3F [Trivial] +5C1A40 1A40 [Trivial] +5C1A5A 1A5A [Trivial] +5C1A5C NULL [SyntErr] +5C1A5F 1A5F [Trivial] +5C1A61 1A61 [Trivial] +5C1A62 1A62 [Trivial] +5C1A6E 1A6E [Trivial] +5C1A72 1A72 [Trivial] +5C1A74 1A74 [Trivial] +5C1A7E 1A7E [Trivial] +5C1A7F 1A7F [Trivial] +5C1A80 1A80 [Trivial][ILSEQ] +5C1A81 1A81 [Trivial][ILSEQ] +5C1A9F 1A9F [Trivial][ILSEQ] +5C1AA0 1AA0 [Trivial][ILSEQ] +5C1AA1 1AA1 [Trivial][ILSEQ] +5C1AE0 1AE0 [Trivial][ILSEQ] +5C1AEF 1AEF [Trivial][ILSEQ] +5C1AF9 1AF9 [Trivial][ILSEQ] +5C1AFA 1AFA [Trivial][ILSEQ] +5C1AFC 1AFC [Trivial][ILSEQ] +5C1AFD 1AFD [Trivial][ILSEQ] +5C1AFE 1AFE [Trivial][ILSEQ] +5C1AFF 1AFF [Trivial][ILSEQ] +5C2200 2200 [Trivial] +5C2208 2208 [Trivial] +5C2209 2209 [Trivial] +5C220A 220A [Trivial] +5C220D 220D [Trivial] +5C221A 221A [Trivial] +5C2222 2222 [Trivial] +5C2225 2225 [Trivial] +5C2227 NULL [SyntErr] +5C2230 2230 [Trivial] +5C223F 223F [Trivial] +5C2240 2240 [Trivial] +5C225A 225A [Trivial] +5C225C NULL [SyntErr] +5C225F 225F [Trivial] +5C2261 2261 [Trivial] +5C2262 2262 [Trivial] +5C226E 226E [Trivial] +5C2272 2272 [Trivial] +5C2274 2274 [Trivial] +5C227E 227E [Trivial] +5C227F 227F [Trivial] +5C2280 2280 [Trivial][ILSEQ] +5C2281 2281 [Trivial][ILSEQ] +5C229F 229F [Trivial][ILSEQ] +5C22A0 22A0 [Trivial][ILSEQ] +5C22A1 22A1 [Trivial][ILSEQ] +5C22E0 22E0 [Trivial][ILSEQ] +5C22EF 22EF [Trivial][ILSEQ] +5C22F9 22F9 [Trivial][ILSEQ] +5C22FA 22FA [Trivial][ILSEQ] +5C22FC 22FC [Trivial][ILSEQ] +5C22FD 22FD [Trivial][ILSEQ] +5C22FE 22FE [Trivial][ILSEQ] +5C22FF 22FF [Trivial][ILSEQ] +5C2500 5C2500 [Preserve][LIKE] +5C2508 5C2508 [Preserve][LIKE] +5C2509 5C2509 [Preserve][LIKE] +5C250A 5C250A [Preserve][LIKE] +5C250D 5C250D [Preserve][LIKE] +5C251A 5C251A [Preserve][LIKE] +5C2522 5C2522 [Preserve][LIKE] +5C2525 5C2525 [Preserve][LIKE] +5C2527 NULL [SyntErr] +5C2530 5C2530 [Preserve][LIKE] +5C253F 5C253F [Preserve][LIKE] +5C2540 5C2540 [Preserve][LIKE] +5C255A 5C255A [Preserve][LIKE] +5C255C NULL [SyntErr] +5C255F 5C255F [Preserve][LIKE] +5C2561 5C2561 [Preserve][LIKE] +5C2562 5C2562 [Preserve][LIKE] +5C256E 5C256E [Preserve][LIKE] +5C2572 5C2572 [Preserve][LIKE] +5C2574 5C2574 [Preserve][LIKE] +5C257E 5C257E [Preserve][LIKE] +5C257F 5C257F [Preserve][LIKE] +5C2580 5C2580 [Preserve][LIKE][ILSEQ] +5C2581 5C2581 [Preserve][LIKE][ILSEQ] +5C259F 5C259F [Preserve][LIKE][ILSEQ] +5C25A0 5C25A0 [Preserve][LIKE][ILSEQ] +5C25A1 5C25A1 [Preserve][LIKE][ILSEQ] +5C25E0 5C25E0 [Preserve][LIKE][ILSEQ] +5C25EF 5C25EF [Preserve][LIKE][ILSEQ] +5C25F9 5C25F9 [Preserve][LIKE][ILSEQ] +5C25FA 5C25FA [Preserve][LIKE][ILSEQ] +5C25FC 5C25FC [Preserve][LIKE][ILSEQ] +5C25FD 5C25FD [Preserve][LIKE][ILSEQ] +5C25FE 5C25FE [Preserve][LIKE][ILSEQ] +5C25FF 5C25FF [Preserve][LIKE][ILSEQ] +5C2700 2700 [Trivial] +5C2708 2708 [Trivial] +5C2709 2709 [Trivial] +5C270A 270A [Trivial] +5C270D 270D [Trivial] +5C271A 271A [Trivial] +5C2722 2722 [Trivial] +5C2725 2725 [Trivial] +5C2727 NULL [SyntErr] +5C2730 2730 [Trivial] +5C273F 273F [Trivial] +5C2740 2740 [Trivial] +5C275A 275A [Trivial] +5C275C NULL [SyntErr] +5C275F 275F [Trivial] +5C2761 2761 [Trivial] +5C2762 2762 [Trivial] +5C276E 276E [Trivial] +5C2772 2772 [Trivial] +5C2774 2774 [Trivial] +5C277E 277E [Trivial] +5C277F 277F [Trivial] +5C2780 2780 [Trivial][ILSEQ] +5C2781 2781 [Trivial][ILSEQ] +5C279F 279F [Trivial][ILSEQ] +5C27A0 27A0 [Trivial][ILSEQ] +5C27A1 27A1 [Trivial][ILSEQ] +5C27E0 27E0 [Trivial][ILSEQ] +5C27EF 27EF [Trivial][ILSEQ] +5C27F9 27F9 [Trivial][ILSEQ] +5C27FA 27FA [Trivial][ILSEQ] +5C27FC 27FC [Trivial][ILSEQ] +5C27FD 27FD [Trivial][ILSEQ] +5C27FE 27FE [Trivial][ILSEQ] +5C27FF 27FF [Trivial][ILSEQ] +5C3000 0000 [Regular] +5C3008 0008 [Regular] +5C3009 0009 [Regular] +5C300A 000A [Regular] +5C300D 000D [Regular] +5C301A 001A [Regular] +5C3022 0022 [Regular] +5C3025 0025 [Regular] +5C3027 NULL [SyntErr] +5C3030 0030 [Regular] +5C303F 003F [Regular] +5C3040 0040 [Regular] +5C305A 005A [Regular] +5C305C NULL [SyntErr] +5C305F 005F [Regular] +5C3061 0061 [Regular] +5C3062 0062 [Regular] +5C306E 006E [Regular] +5C3072 0072 [Regular] +5C3074 0074 [Regular] +5C307E 007E [Regular] +5C307F 007F [Regular] +5C3080 0080 [Regular][ILSEQ] +5C3081 0081 [Regular][ILSEQ] +5C309F 009F [Regular][ILSEQ] +5C30A0 00A0 [Regular][ILSEQ] +5C30A1 00A1 [Regular][ILSEQ] +5C30E0 00E0 [Regular][ILSEQ] +5C30EF 00EF [Regular][ILSEQ] +5C30F9 00F9 [Regular][ILSEQ] +5C30FA 00FA [Regular][ILSEQ] +5C30FC 00FC [Regular][ILSEQ] +5C30FD 00FD [Regular][ILSEQ] +5C30FE 00FE [Regular][ILSEQ] +5C30FF 00FF [Regular][ILSEQ] +5C3F00 3F00 [Trivial] +5C3F08 3F08 [Trivial] +5C3F09 3F09 [Trivial] +5C3F0A 3F0A [Trivial] +5C3F0D 3F0D [Trivial] +5C3F1A 3F1A [Trivial] +5C3F22 3F22 [Trivial] +5C3F25 3F25 [Trivial] +5C3F27 NULL [SyntErr] +5C3F30 3F30 [Trivial] +5C3F3F 3F3F [Trivial] +5C3F40 3F40 [Trivial] +5C3F5A 3F5A [Trivial] +5C3F5C NULL [SyntErr] +5C3F5F 3F5F [Trivial] +5C3F61 3F61 [Trivial] +5C3F62 3F62 [Trivial] +5C3F6E 3F6E [Trivial] +5C3F72 3F72 [Trivial] +5C3F74 3F74 [Trivial] +5C3F7E 3F7E [Trivial] +5C3F7F 3F7F [Trivial] +5C3F80 3F80 [Trivial][ILSEQ] +5C3F81 3F81 [Trivial][ILSEQ] +5C3F9F 3F9F [Trivial][ILSEQ] +5C3FA0 3FA0 [Trivial][ILSEQ] +5C3FA1 3FA1 [Trivial][ILSEQ] +5C3FE0 3FE0 [Trivial][ILSEQ] +5C3FEF 3FEF [Trivial][ILSEQ] +5C3FF9 3FF9 [Trivial][ILSEQ] +5C3FFA 3FFA [Trivial][ILSEQ] +5C3FFC 3FFC [Trivial][ILSEQ] +5C3FFD 3FFD [Trivial][ILSEQ] +5C3FFE 3FFE [Trivial][ILSEQ] +5C3FFF 3FFF [Trivial][ILSEQ] +5C4000 4000 [Trivial] +5C4008 4008 [Trivial] +5C4009 4009 [Trivial] +5C400A 400A [Trivial] +5C400D 400D [Trivial] +5C401A 401A [Trivial] +5C4022 4022 [Trivial] +5C4025 4025 [Trivial] +5C4027 NULL [SyntErr] +5C4030 4030 [Trivial] +5C403F 403F [Trivial] +5C4040 4040 [Trivial] +5C405A 405A [Trivial] +5C405C NULL [SyntErr] +5C405F 405F [Trivial] +5C4061 4061 [Trivial] +5C4062 4062 [Trivial] +5C406E 406E [Trivial] +5C4072 4072 [Trivial] +5C4074 4074 [Trivial] +5C407E 407E [Trivial] +5C407F 407F [Trivial] +5C4080 4080 [Trivial][ILSEQ] +5C4081 4081 [Trivial][ILSEQ] +5C409F 409F [Trivial][ILSEQ] +5C40A0 40A0 [Trivial][ILSEQ] +5C40A1 40A1 [Trivial][ILSEQ] +5C40E0 40E0 [Trivial][ILSEQ] +5C40EF 40EF [Trivial][ILSEQ] +5C40F9 40F9 [Trivial][ILSEQ] +5C40FA 40FA [Trivial][ILSEQ] +5C40FC 40FC [Trivial][ILSEQ] +5C40FD 40FD [Trivial][ILSEQ] +5C40FE 40FE [Trivial][ILSEQ] +5C40FF 40FF [Trivial][ILSEQ] +5C5A00 1A00 [Regular] +5C5A08 1A08 [Regular] +5C5A09 1A09 [Regular] +5C5A0A 1A0A [Regular] +5C5A0D 1A0D [Regular] +5C5A1A 1A1A [Regular] +5C5A22 1A22 [Regular] +5C5A25 1A25 [Regular] +5C5A27 NULL [SyntErr] +5C5A30 1A30 [Regular] +5C5A3F 1A3F [Regular] +5C5A40 1A40 [Regular] +5C5A5A 1A5A [Regular] +5C5A5C NULL [SyntErr] +5C5A5F 1A5F [Regular] +5C5A61 1A61 [Regular] +5C5A62 1A62 [Regular] +5C5A6E 1A6E [Regular] +5C5A72 1A72 [Regular] +5C5A74 1A74 [Regular] +5C5A7E 1A7E [Regular] +5C5A7F 1A7F [Regular] +5C5A80 1A80 [Regular][ILSEQ] +5C5A81 1A81 [Regular][ILSEQ] +5C5A9F 1A9F [Regular][ILSEQ] +5C5AA0 1AA0 [Regular][ILSEQ] +5C5AA1 1AA1 [Regular][ILSEQ] +5C5AE0 1AE0 [Regular][ILSEQ] +5C5AEF 1AEF [Regular][ILSEQ] +5C5AF9 1AF9 [Regular][ILSEQ] +5C5AFA 1AFA [Regular][ILSEQ] +5C5AFC 1AFC [Regular][ILSEQ] +5C5AFD 1AFD [Regular][ILSEQ] +5C5AFE 1AFE [Regular][ILSEQ] +5C5AFF 1AFF [Regular][ILSEQ] +5C5C00 5C00 [Regular] +5C5C08 5C08 [Regular] +5C5C09 5C09 [Regular] +5C5C0A 5C0A [Regular] +5C5C0D 5C0D [Regular] +5C5C1A 5C1A [Regular] +5C5C22 5C22 [Regular] +5C5C25 5C25 [Regular] +5C5C27 NULL [SyntErr] +5C5C30 5C30 [Regular] +5C5C3F 5C3F [Regular] +5C5C40 5C40 [Regular] +5C5C5A 5C5A [Regular] +5C5C5C NULL [SyntErr] +5C5C5F 5C5F [Regular] +5C5C61 5C61 [Regular] +5C5C62 5C62 [Regular] +5C5C6E 5C6E [Regular] +5C5C72 5C72 [Regular] +5C5C74 5C74 [Regular] +5C5C7E 5C7E [Regular] +5C5C7F 5C7F [Regular] +5C5C80 5C80 [Regular][ILSEQ] +5C5C81 5C81 [Regular][ILSEQ] +5C5C9F 5C9F [Regular][ILSEQ] +5C5CA0 5CA0 [Regular][ILSEQ] +5C5CA1 5CA1 [Regular][ILSEQ] +5C5CE0 5CE0 [Regular][ILSEQ] +5C5CEF 5CEF [Regular][ILSEQ] +5C5CF9 5CF9 [Regular][ILSEQ] +5C5CFA 5CFA [Regular][ILSEQ] +5C5CFC 5CFC [Regular][ILSEQ] +5C5CFD 5CFD [Regular][ILSEQ] +5C5CFE 5CFE [Regular][ILSEQ] +5C5CFF 5CFF [Regular][ILSEQ] +5C5F00 5C5F00 [Preserve][LIKE] +5C5F08 5C5F08 [Preserve][LIKE] +5C5F09 5C5F09 [Preserve][LIKE] +5C5F0A 5C5F0A [Preserve][LIKE] +5C5F0D 5C5F0D [Preserve][LIKE] +5C5F1A 5C5F1A [Preserve][LIKE] +5C5F22 5C5F22 [Preserve][LIKE] +5C5F25 5C5F25 [Preserve][LIKE] +5C5F27 NULL [SyntErr] +5C5F30 5C5F30 [Preserve][LIKE] +5C5F3F 5C5F3F [Preserve][LIKE] +5C5F40 5C5F40 [Preserve][LIKE] +5C5F5A 5C5F5A [Preserve][LIKE] +5C5F5C NULL [SyntErr] +5C5F5F 5C5F5F [Preserve][LIKE] +5C5F61 5C5F61 [Preserve][LIKE] +5C5F62 5C5F62 [Preserve][LIKE] +5C5F6E 5C5F6E [Preserve][LIKE] +5C5F72 5C5F72 [Preserve][LIKE] +5C5F74 5C5F74 [Preserve][LIKE] +5C5F7E 5C5F7E [Preserve][LIKE] +5C5F7F 5C5F7F [Preserve][LIKE] +5C5F80 5C5F80 [Preserve][LIKE][ILSEQ] +5C5F81 5C5F81 [Preserve][LIKE][ILSEQ] +5C5F9F 5C5F9F [Preserve][LIKE][ILSEQ] +5C5FA0 5C5FA0 [Preserve][LIKE][ILSEQ] +5C5FA1 5C5FA1 [Preserve][LIKE][ILSEQ] +5C5FE0 5C5FE0 [Preserve][LIKE][ILSEQ] +5C5FEF 5C5FEF [Preserve][LIKE][ILSEQ] +5C5FF9 5C5FF9 [Preserve][LIKE][ILSEQ] +5C5FFA 5C5FFA [Preserve][LIKE][ILSEQ] +5C5FFC 5C5FFC [Preserve][LIKE][ILSEQ] +5C5FFD 5C5FFD [Preserve][LIKE][ILSEQ] +5C5FFE 5C5FFE [Preserve][LIKE][ILSEQ] +5C5FFF 5C5FFF [Preserve][LIKE][ILSEQ] +5C6100 6100 [Trivial] +5C6108 6108 [Trivial] +5C6109 6109 [Trivial] +5C610A 610A [Trivial] +5C610D 610D [Trivial] +5C611A 611A [Trivial] +5C6122 6122 [Trivial] +5C6125 6125 [Trivial] +5C6127 NULL [SyntErr] +5C6130 6130 [Trivial] +5C613F 613F [Trivial] +5C6140 6140 [Trivial] +5C615A 615A [Trivial] +5C615C NULL [SyntErr] +5C615F 615F [Trivial] +5C6161 6161 [Trivial] +5C6162 6162 [Trivial] +5C616E 616E [Trivial] +5C6172 6172 [Trivial] +5C6174 6174 [Trivial] +5C617E 617E [Trivial] +5C617F 617F [Trivial] +5C6180 6180 [Trivial][ILSEQ] +5C6181 6181 [Trivial][ILSEQ] +5C619F 619F [Trivial][ILSEQ] +5C61A0 61A0 [Trivial][ILSEQ] +5C61A1 61A1 [Trivial][ILSEQ] +5C61E0 61E0 [Trivial][ILSEQ] +5C61EF 61EF [Trivial][ILSEQ] +5C61F9 61F9 [Trivial][ILSEQ] +5C61FA 61FA [Trivial][ILSEQ] +5C61FC 61FC [Trivial][ILSEQ] +5C61FD 61FD [Trivial][ILSEQ] +5C61FE 61FE [Trivial][ILSEQ] +5C61FF 61FF [Trivial][ILSEQ] +5C6200 0800 [Regular] +5C6208 0808 [Regular] +5C6209 0809 [Regular] +5C620A 080A [Regular] +5C620D 080D [Regular] +5C621A 081A [Regular] +5C6222 0822 [Regular] +5C6225 0825 [Regular] +5C6227 NULL [SyntErr] +5C6230 0830 [Regular] +5C623F 083F [Regular] +5C6240 0840 [Regular] +5C625A 085A [Regular] +5C625C NULL [SyntErr] +5C625F 085F [Regular] +5C6261 0861 [Regular] +5C6262 0862 [Regular] +5C626E 086E [Regular] +5C6272 0872 [Regular] +5C6274 0874 [Regular] +5C627E 087E [Regular] +5C627F 087F [Regular] +5C6280 0880 [Regular][ILSEQ] +5C6281 0881 [Regular][ILSEQ] +5C629F 089F [Regular][ILSEQ] +5C62A0 08A0 [Regular][ILSEQ] +5C62A1 08A1 [Regular][ILSEQ] +5C62E0 08E0 [Regular][ILSEQ] +5C62EF 08EF [Regular][ILSEQ] +5C62F9 08F9 [Regular][ILSEQ] +5C62FA 08FA [Regular][ILSEQ] +5C62FC 08FC [Regular][ILSEQ] +5C62FD 08FD [Regular][ILSEQ] +5C62FE 08FE [Regular][ILSEQ] +5C62FF 08FF [Regular][ILSEQ] +5C6E00 0A00 [Regular] +5C6E08 0A08 [Regular] +5C6E09 0A09 [Regular] +5C6E0A 0A0A [Regular] +5C6E0D 0A0D [Regular] +5C6E1A 0A1A [Regular] +5C6E22 0A22 [Regular] +5C6E25 0A25 [Regular] +5C6E27 NULL [SyntErr] +5C6E30 0A30 [Regular] +5C6E3F 0A3F [Regular] +5C6E40 0A40 [Regular] +5C6E5A 0A5A [Regular] +5C6E5C NULL [SyntErr] +5C6E5F 0A5F [Regular] +5C6E61 0A61 [Regular] +5C6E62 0A62 [Regular] +5C6E6E 0A6E [Regular] +5C6E72 0A72 [Regular] +5C6E74 0A74 [Regular] +5C6E7E 0A7E [Regular] +5C6E7F 0A7F [Regular] +5C6E80 0A80 [Regular][ILSEQ] +5C6E81 0A81 [Regular][ILSEQ] +5C6E9F 0A9F [Regular][ILSEQ] +5C6EA0 0AA0 [Regular][ILSEQ] +5C6EA1 0AA1 [Regular][ILSEQ] +5C6EE0 0AE0 [Regular][ILSEQ] +5C6EEF 0AEF [Regular][ILSEQ] +5C6EF9 0AF9 [Regular][ILSEQ] +5C6EFA 0AFA [Regular][ILSEQ] +5C6EFC 0AFC [Regular][ILSEQ] +5C6EFD 0AFD [Regular][ILSEQ] +5C6EFE 0AFE [Regular][ILSEQ] +5C6EFF 0AFF [Regular][ILSEQ] +5C7200 0D00 [Regular] +5C7208 0D08 [Regular] +5C7209 0D09 [Regular] +5C720A 0D0A [Regular] +5C720D 0D0D [Regular] +5C721A 0D1A [Regular] +5C7222 0D22 [Regular] +5C7225 0D25 [Regular] +5C7227 NULL [SyntErr] +5C7230 0D30 [Regular] +5C723F 0D3F [Regular] +5C7240 0D40 [Regular] +5C725A 0D5A [Regular] +5C725C NULL [SyntErr] +5C725F 0D5F [Regular] +5C7261 0D61 [Regular] +5C7262 0D62 [Regular] +5C726E 0D6E [Regular] +5C7272 0D72 [Regular] +5C7274 0D74 [Regular] +5C727E 0D7E [Regular] +5C727F 0D7F [Regular] +5C7280 0D80 [Regular][ILSEQ] +5C7281 0D81 [Regular][ILSEQ] +5C729F 0D9F [Regular][ILSEQ] +5C72A0 0DA0 [Regular][ILSEQ] +5C72A1 0DA1 [Regular][ILSEQ] +5C72E0 0DE0 [Regular][ILSEQ] +5C72EF 0DEF [Regular][ILSEQ] +5C72F9 0DF9 [Regular][ILSEQ] +5C72FA 0DFA [Regular][ILSEQ] +5C72FC 0DFC [Regular][ILSEQ] +5C72FD 0DFD [Regular][ILSEQ] +5C72FE 0DFE [Regular][ILSEQ] +5C72FF 0DFF [Regular][ILSEQ] +5C7400 0900 [Regular] +5C7408 0908 [Regular] +5C7409 0909 [Regular] +5C740A 090A [Regular] +5C740D 090D [Regular] +5C741A 091A [Regular] +5C7422 0922 [Regular] +5C7425 0925 [Regular] +5C7427 NULL [SyntErr] +5C7430 0930 [Regular] +5C743F 093F [Regular] +5C7440 0940 [Regular] +5C745A 095A [Regular] +5C745C NULL [SyntErr] +5C745F 095F [Regular] +5C7461 0961 [Regular] +5C7462 0962 [Regular] +5C746E 096E [Regular] +5C7472 0972 [Regular] +5C7474 0974 [Regular] +5C747E 097E [Regular] +5C747F 097F [Regular] +5C7480 0980 [Regular][ILSEQ] +5C7481 0981 [Regular][ILSEQ] +5C749F 099F [Regular][ILSEQ] +5C74A0 09A0 [Regular][ILSEQ] +5C74A1 09A1 [Regular][ILSEQ] +5C74E0 09E0 [Regular][ILSEQ] +5C74EF 09EF [Regular][ILSEQ] +5C74F9 09F9 [Regular][ILSEQ] +5C74FA 09FA [Regular][ILSEQ] +5C74FC 09FC [Regular][ILSEQ] +5C74FD 09FD [Regular][ILSEQ] +5C74FE 09FE [Regular][ILSEQ] +5C74FF 09FF [Regular][ILSEQ] +5C7E00 7E00 [Trivial] +5C7E08 7E08 [Trivial] +5C7E09 7E09 [Trivial] +5C7E0A 7E0A [Trivial] +5C7E0D 7E0D [Trivial] +5C7E1A 7E1A [Trivial] +5C7E22 7E22 [Trivial] +5C7E25 7E25 [Trivial] +5C7E27 NULL [SyntErr] +5C7E30 7E30 [Trivial] +5C7E3F 7E3F [Trivial] +5C7E40 7E40 [Trivial] +5C7E5A 7E5A [Trivial] +5C7E5C NULL [SyntErr] +5C7E5F 7E5F [Trivial] +5C7E61 7E61 [Trivial] +5C7E62 7E62 [Trivial] +5C7E6E 7E6E [Trivial] +5C7E72 7E72 [Trivial] +5C7E74 7E74 [Trivial] +5C7E7E 7E7E [Trivial] +5C7E7F 7E7F [Trivial] +5C7E80 7E80 [Trivial][ILSEQ] +5C7E81 7E81 [Trivial][ILSEQ] +5C7E9F 7E9F [Trivial][ILSEQ] +5C7EA0 7EA0 [Trivial][ILSEQ] +5C7EA1 7EA1 [Trivial][ILSEQ] +5C7EE0 7EE0 [Trivial][ILSEQ] +5C7EEF 7EEF [Trivial][ILSEQ] +5C7EF9 7EF9 [Trivial][ILSEQ] +5C7EFA 7EFA [Trivial][ILSEQ] +5C7EFC 7EFC [Trivial][ILSEQ] +5C7EFD 7EFD [Trivial][ILSEQ] +5C7EFE 7EFE [Trivial][ILSEQ] +5C7EFF 7EFF [Trivial][ILSEQ] +5C7F00 7F00 [Trivial] +5C7F08 7F08 [Trivial] +5C7F09 7F09 [Trivial] +5C7F0A 7F0A [Trivial] +5C7F0D 7F0D [Trivial] +5C7F1A 7F1A [Trivial] +5C7F22 7F22 [Trivial] +5C7F25 7F25 [Trivial] +5C7F27 NULL [SyntErr] +5C7F30 7F30 [Trivial] +5C7F3F 7F3F [Trivial] +5C7F40 7F40 [Trivial] +5C7F5A 7F5A [Trivial] +5C7F5C NULL [SyntErr] +5C7F5F 7F5F [Trivial] +5C7F61 7F61 [Trivial] +5C7F62 7F62 [Trivial] +5C7F6E 7F6E [Trivial] +5C7F72 7F72 [Trivial] +5C7F74 7F74 [Trivial] +5C7F7E 7F7E [Trivial] +5C7F7F 7F7F [Trivial] +5C7F80 7F80 [Trivial][ILSEQ] +5C7F81 7F81 [Trivial][ILSEQ] +5C7F9F 7F9F [Trivial][ILSEQ] +5C7FA0 7FA0 [Trivial][ILSEQ] +5C7FA1 7FA1 [Trivial][ILSEQ] +5C7FE0 7FE0 [Trivial][ILSEQ] +5C7FEF 7FEF [Trivial][ILSEQ] +5C7FF9 7FF9 [Trivial][ILSEQ] +5C7FFA 7FFA [Trivial][ILSEQ] +5C7FFC 7FFC [Trivial][ILSEQ] +5C7FFD 7FFD [Trivial][ILSEQ] +5C7FFE 7FFE [Trivial][ILSEQ] +5C7FFF 7FFF [Trivial][ILSEQ] +5C8000 8000 [Trivial][ILSEQ] +5C8008 8008 [Trivial][ILSEQ] +5C8009 8009 [Trivial][ILSEQ] +5C800A 800A [Trivial][ILSEQ] +5C800D 800D [Trivial][ILSEQ] +5C801A 801A [Trivial][ILSEQ] +5C8022 8022 [Trivial][ILSEQ] +5C8025 8025 [Trivial][ILSEQ] +5C8027 NULL [SyntErr] +5C8030 8030 [Trivial][ILSEQ] +5C803F 803F [Trivial][ILSEQ] +5C8040 8040 [Trivial][ILSEQ] +5C805A 805A [Trivial][ILSEQ] +5C805C NULL [SyntErr] +5C805F 805F [Trivial][ILSEQ] +5C8061 8061 [Trivial][ILSEQ] +5C8062 8062 [Trivial][ILSEQ] +5C806E 806E [Trivial][ILSEQ] +5C8072 8072 [Trivial][ILSEQ] +5C8074 8074 [Trivial][ILSEQ] +5C807E 807E [Trivial][ILSEQ] +5C807F 807F [Trivial][ILSEQ] +5C8080 8080 [Trivial][ILSEQ] +5C8081 8081 [Trivial][ILSEQ] +5C809F 809F [Trivial][ILSEQ] +5C80A0 80A0 [Trivial][ILSEQ] +5C80A1 80A1 [Trivial][ILSEQ] +5C80E0 80E0 [Trivial][ILSEQ] +5C80EF 80EF [Trivial][ILSEQ] +5C80F9 80F9 [Trivial][ILSEQ] +5C80FA 80FA [Trivial][ILSEQ] +5C80FC 80FC [Trivial][ILSEQ] +5C80FD 80FD [Trivial][ILSEQ] +5C80FE 80FE [Trivial][ILSEQ] +5C80FF 80FF [Trivial][ILSEQ] +5C8100 8100 [Trivial][ILSEQ] +5C8108 8108 [Trivial][ILSEQ] +5C8109 8109 [Trivial][ILSEQ] +5C810A 810A [Trivial][ILSEQ] +5C810D 810D [Trivial][ILSEQ] +5C811A 811A [Trivial][ILSEQ] +5C8122 8122 [Trivial][ILSEQ] +5C8125 8125 [Trivial][ILSEQ] +5C8127 NULL [SyntErr] +5C8130 8130 [Trivial][ILSEQ] +5C813F 813F [Trivial][ILSEQ] +5C8140 8140 [Trivial][ILSEQ] +5C815A 815A [Trivial][ILSEQ] +5C815C NULL [SyntErr] +5C815F 815F [Trivial][ILSEQ] +5C8161 8161 [Trivial][ILSEQ] +5C8162 8162 [Trivial][ILSEQ] +5C816E 816E [Trivial][ILSEQ] +5C8172 8172 [Trivial][ILSEQ] +5C8174 8174 [Trivial][ILSEQ] +5C817E 817E [Trivial][ILSEQ] +5C817F 817F [Trivial][ILSEQ] +5C8180 8180 [Trivial][ILSEQ] +5C8181 8181 [Trivial][ILSEQ] +5C819F 819F [Trivial][ILSEQ] +5C81A0 81A0 [Trivial][ILSEQ] +5C81A1 81A1 [Trivial][ILSEQ] +5C81E0 81E0 [Trivial][ILSEQ] +5C81EF 81EF [Trivial][ILSEQ] +5C81F9 81F9 [Trivial][ILSEQ] +5C81FA 81FA [Trivial][ILSEQ] +5C81FC 81FC [Trivial][ILSEQ] +5C81FD 81FD [Trivial][ILSEQ] +5C81FE 81FE [Trivial][ILSEQ] +5C81FF 81FF [Trivial][ILSEQ] +5C9F00 9F00 [Trivial][ILSEQ] +5C9F08 9F08 [Trivial][ILSEQ] +5C9F09 9F09 [Trivial][ILSEQ] +5C9F0A 9F0A [Trivial][ILSEQ] +5C9F0D 9F0D [Trivial][ILSEQ] +5C9F1A 9F1A [Trivial][ILSEQ] +5C9F22 9F22 [Trivial][ILSEQ] +5C9F25 9F25 [Trivial][ILSEQ] +5C9F27 NULL [SyntErr] +5C9F30 9F30 [Trivial][ILSEQ] +5C9F3F 9F3F [Trivial][ILSEQ] +5C9F40 9F40 [Trivial][ILSEQ] +5C9F5A 9F5A [Trivial][ILSEQ] +5C9F5C NULL [SyntErr] +5C9F5F 9F5F [Trivial][ILSEQ] +5C9F61 9F61 [Trivial][ILSEQ] +5C9F62 9F62 [Trivial][ILSEQ] +5C9F6E 9F6E [Trivial][ILSEQ] +5C9F72 9F72 [Trivial][ILSEQ] +5C9F74 9F74 [Trivial][ILSEQ] +5C9F7E 9F7E [Trivial][ILSEQ] +5C9F7F 9F7F [Trivial][ILSEQ] +5C9F80 9F80 [Trivial][ILSEQ] +5C9F81 9F81 [Trivial][ILSEQ] +5C9F9F 9F9F [Trivial][ILSEQ] +5C9FA0 9FA0 [Trivial][ILSEQ] +5C9FA1 9FA1 [Trivial][ILSEQ] +5C9FE0 9FE0 [Trivial][ILSEQ] +5C9FEF 9FEF [Trivial][ILSEQ] +5C9FF9 9FF9 [Trivial][ILSEQ] +5C9FFA 9FFA [Trivial][ILSEQ] +5C9FFC 9FFC [Trivial][ILSEQ] +5C9FFD 9FFD [Trivial][ILSEQ] +5C9FFE 9FFE [Trivial][ILSEQ] +5C9FFF 9FFF [Trivial][ILSEQ] +5CA000 A000 [Trivial][ILSEQ] +5CA008 A008 [Trivial][ILSEQ] +5CA009 A009 [Trivial][ILSEQ] +5CA00A A00A [Trivial][ILSEQ] +5CA00D A00D [Trivial][ILSEQ] +5CA01A A01A [Trivial][ILSEQ] +5CA022 A022 [Trivial][ILSEQ] +5CA025 A025 [Trivial][ILSEQ] +5CA027 NULL [SyntErr] +5CA030 A030 [Trivial][ILSEQ] +5CA03F A03F [Trivial][ILSEQ] +5CA040 A040 [Trivial][ILSEQ] +5CA05A A05A [Trivial][ILSEQ] +5CA05C NULL [SyntErr] +5CA05F A05F [Trivial][ILSEQ] +5CA061 A061 [Trivial][ILSEQ] +5CA062 A062 [Trivial][ILSEQ] +5CA06E A06E [Trivial][ILSEQ] +5CA072 A072 [Trivial][ILSEQ] +5CA074 A074 [Trivial][ILSEQ] +5CA07E A07E [Trivial][ILSEQ] +5CA07F A07F [Trivial][ILSEQ] +5CA080 A080 [Trivial][ILSEQ] +5CA081 A081 [Trivial][ILSEQ] +5CA09F A09F [Trivial][ILSEQ] +5CA0A0 A0A0 [Trivial][ILSEQ] +5CA0A1 A0A1 [Trivial][ILSEQ] +5CA0E0 A0E0 [Trivial][ILSEQ] +5CA0EF A0EF [Trivial][ILSEQ] +5CA0F9 A0F9 [Trivial][ILSEQ] +5CA0FA A0FA [Trivial][ILSEQ] +5CA0FC A0FC [Trivial][ILSEQ] +5CA0FD A0FD [Trivial][ILSEQ] +5CA0FE A0FE [Trivial][ILSEQ] +5CA0FF A0FF [Trivial][ILSEQ] +5CA100 A100 [Trivial][ILSEQ] +5CA108 A108 [Trivial][ILSEQ] +5CA109 A109 [Trivial][ILSEQ] +5CA10A A10A [Trivial][ILSEQ] +5CA10D A10D [Trivial][ILSEQ] +5CA11A A11A [Trivial][ILSEQ] +5CA122 A122 [Trivial][ILSEQ] +5CA125 A125 [Trivial][ILSEQ] +5CA127 NULL [SyntErr] +5CA130 A130 [Trivial][ILSEQ] +5CA13F A13F [Trivial][ILSEQ] +5CA140 A140 [Trivial][ILSEQ] +5CA15A A15A [Trivial][ILSEQ] +5CA15C NULL [SyntErr] +5CA15F A15F [Trivial][ILSEQ] +5CA161 A161 [Trivial][ILSEQ] +5CA162 A162 [Trivial][ILSEQ] +5CA16E A16E [Trivial][ILSEQ] +5CA172 A172 [Trivial][ILSEQ] +5CA174 A174 [Trivial][ILSEQ] +5CA17E A17E [Trivial][ILSEQ] +5CA17F A17F [Trivial][ILSEQ] +5CA180 A180 [Trivial][ILSEQ] +5CA181 A181 [Trivial][ILSEQ] +5CA19F A19F [Trivial][ILSEQ] +5CA1A0 A1A0 [Trivial][ILSEQ] +5CA1A1 A1A1 [Trivial] +5CA1E0 A1E0 [Trivial] +5CA1EF A1EF [Trivial] +5CA1F9 A1F9 [Trivial] +5CA1FA A1FA [Trivial] +5CA1FC A1FC [Trivial] +5CA1FD A1FD [Trivial] +5CA1FE A1FE [Trivial] +5CA1FF A1FF [Trivial][ILSEQ] +5CE000 E000 [Trivial][ILSEQ] +5CE008 E008 [Trivial][ILSEQ] +5CE009 E009 [Trivial][ILSEQ] +5CE00A E00A [Trivial][ILSEQ] +5CE00D E00D [Trivial][ILSEQ] +5CE01A E01A [Trivial][ILSEQ] +5CE022 E022 [Trivial][ILSEQ] +5CE025 E025 [Trivial][ILSEQ] +5CE027 NULL [SyntErr] +5CE030 E030 [Trivial][ILSEQ] +5CE03F E03F [Trivial][ILSEQ] +5CE040 E040 [Trivial][ILSEQ] +5CE05A E05A [Trivial][ILSEQ] +5CE05C NULL [SyntErr] +5CE05F E05F [Trivial][ILSEQ] +5CE061 E061 [Trivial][ILSEQ] +5CE062 E062 [Trivial][ILSEQ] +5CE06E E06E [Trivial][ILSEQ] +5CE072 E072 [Trivial][ILSEQ] +5CE074 E074 [Trivial][ILSEQ] +5CE07E E07E [Trivial][ILSEQ] +5CE07F E07F [Trivial][ILSEQ] +5CE080 E080 [Trivial][ILSEQ] +5CE081 E081 [Trivial][ILSEQ] +5CE09F E09F [Trivial][ILSEQ] +5CE0A0 E0A0 [Trivial][ILSEQ] +5CE0A1 E0A1 [Trivial] +5CE0E0 E0E0 [Trivial] +5CE0EF E0EF [Trivial] +5CE0F9 E0F9 [Trivial] +5CE0FA E0FA [Trivial] +5CE0FC E0FC [Trivial] +5CE0FD E0FD [Trivial] +5CE0FE E0FE [Trivial] +5CE0FF E0FF [Trivial][ILSEQ] +5CEF00 EF00 [Trivial][ILSEQ] +5CEF08 EF08 [Trivial][ILSEQ] +5CEF09 EF09 [Trivial][ILSEQ] +5CEF0A EF0A [Trivial][ILSEQ] +5CEF0D EF0D [Trivial][ILSEQ] +5CEF1A EF1A [Trivial][ILSEQ] +5CEF22 EF22 [Trivial][ILSEQ] +5CEF25 EF25 [Trivial][ILSEQ] +5CEF27 NULL [SyntErr] +5CEF30 EF30 [Trivial][ILSEQ] +5CEF3F EF3F [Trivial][ILSEQ] +5CEF40 EF40 [Trivial][ILSEQ] +5CEF5A EF5A [Trivial][ILSEQ] +5CEF5C NULL [SyntErr] +5CEF5F EF5F [Trivial][ILSEQ] +5CEF61 EF61 [Trivial][ILSEQ] +5CEF62 EF62 [Trivial][ILSEQ] +5CEF6E EF6E [Trivial][ILSEQ] +5CEF72 EF72 [Trivial][ILSEQ] +5CEF74 EF74 [Trivial][ILSEQ] +5CEF7E EF7E [Trivial][ILSEQ] +5CEF7F EF7F [Trivial][ILSEQ] +5CEF80 EF80 [Trivial][ILSEQ] +5CEF81 EF81 [Trivial][ILSEQ] +5CEF9F EF9F [Trivial][ILSEQ] +5CEFA0 EFA0 [Trivial][ILSEQ] +5CEFA1 EFA1 [Trivial] +5CEFE0 EFE0 [Trivial] +5CEFEF EFEF [Trivial] +5CEFF9 EFF9 [Trivial] +5CEFFA EFFA [Trivial] +5CEFFC EFFC [Trivial] +5CEFFD EFFD [Trivial] +5CEFFE EFFE [Trivial] +5CEFFF EFFF [Trivial][ILSEQ] +5CF900 F900 [Trivial][ILSEQ] +5CF908 F908 [Trivial][ILSEQ] +5CF909 F909 [Trivial][ILSEQ] +5CF90A F90A [Trivial][ILSEQ] +5CF90D F90D [Trivial][ILSEQ] +5CF91A F91A [Trivial][ILSEQ] +5CF922 F922 [Trivial][ILSEQ] +5CF925 F925 [Trivial][ILSEQ] +5CF927 NULL [SyntErr] +5CF930 F930 [Trivial][ILSEQ] +5CF93F F93F [Trivial][ILSEQ] +5CF940 F940 [Trivial][ILSEQ] +5CF95A F95A [Trivial][ILSEQ] +5CF95C NULL [SyntErr] +5CF95F F95F [Trivial][ILSEQ] +5CF961 F961 [Trivial][ILSEQ] +5CF962 F962 [Trivial][ILSEQ] +5CF96E F96E [Trivial][ILSEQ] +5CF972 F972 [Trivial][ILSEQ] +5CF974 F974 [Trivial][ILSEQ] +5CF97E F97E [Trivial][ILSEQ] +5CF97F F97F [Trivial][ILSEQ] +5CF980 F980 [Trivial][ILSEQ] +5CF981 F981 [Trivial][ILSEQ] +5CF99F F99F [Trivial][ILSEQ] +5CF9A0 F9A0 [Trivial][ILSEQ] +5CF9A1 F9A1 [Trivial][ILSEQ] +5CF9E0 F9E0 [Trivial][ILSEQ] +5CF9EF F9EF [Trivial][ILSEQ] +5CF9F9 F9F9 [Trivial][ILSEQ] +5CF9FA F9FA [Trivial][ILSEQ] +5CF9FC F9FC [Trivial][ILSEQ] +5CF9FD F9FD [Trivial][ILSEQ] +5CF9FE F9FE [Trivial][ILSEQ] +5CF9FF F9FF [Trivial][ILSEQ] +5CFA00 FA00 [Trivial][ILSEQ] +5CFA08 FA08 [Trivial][ILSEQ] +5CFA09 FA09 [Trivial][ILSEQ] +5CFA0A FA0A [Trivial][ILSEQ] +5CFA0D FA0D [Trivial][ILSEQ] +5CFA1A FA1A [Trivial][ILSEQ] +5CFA22 FA22 [Trivial][ILSEQ] +5CFA25 FA25 [Trivial][ILSEQ] +5CFA27 NULL [SyntErr] +5CFA30 FA30 [Trivial][ILSEQ] +5CFA3F FA3F [Trivial][ILSEQ] +5CFA40 FA40 [Trivial][ILSEQ] +5CFA5A FA5A [Trivial][ILSEQ] +5CFA5C NULL [SyntErr] +5CFA5F FA5F [Trivial][ILSEQ] +5CFA61 FA61 [Trivial][ILSEQ] +5CFA62 FA62 [Trivial][ILSEQ] +5CFA6E FA6E [Trivial][ILSEQ] +5CFA72 FA72 [Trivial][ILSEQ] +5CFA74 FA74 [Trivial][ILSEQ] +5CFA7E FA7E [Trivial][ILSEQ] +5CFA7F FA7F [Trivial][ILSEQ] +5CFA80 FA80 [Trivial][ILSEQ] +5CFA81 FA81 [Trivial][ILSEQ] +5CFA9F FA9F [Trivial][ILSEQ] +5CFAA0 FAA0 [Trivial][ILSEQ] +5CFAA1 FAA1 [Trivial][ILSEQ] +5CFAE0 FAE0 [Trivial][ILSEQ] +5CFAEF FAEF [Trivial][ILSEQ] +5CFAF9 FAF9 [Trivial][ILSEQ] +5CFAFA FAFA [Trivial][ILSEQ] +5CFAFC FAFC [Trivial][ILSEQ] +5CFAFD FAFD [Trivial][ILSEQ] +5CFAFE FAFE [Trivial][ILSEQ] +5CFAFF FAFF [Trivial][ILSEQ] +5CFC00 FC00 [Trivial][ILSEQ] +5CFC08 FC08 [Trivial][ILSEQ] +5CFC09 FC09 [Trivial][ILSEQ] +5CFC0A FC0A [Trivial][ILSEQ] +5CFC0D FC0D [Trivial][ILSEQ] +5CFC1A FC1A [Trivial][ILSEQ] +5CFC22 FC22 [Trivial][ILSEQ] +5CFC25 FC25 [Trivial][ILSEQ] +5CFC27 NULL [SyntErr] +5CFC30 FC30 [Trivial][ILSEQ] +5CFC3F FC3F [Trivial][ILSEQ] +5CFC40 FC40 [Trivial][ILSEQ] +5CFC5A FC5A [Trivial][ILSEQ] +5CFC5C NULL [SyntErr] +5CFC5F FC5F [Trivial][ILSEQ] +5CFC61 FC61 [Trivial][ILSEQ] +5CFC62 FC62 [Trivial][ILSEQ] +5CFC6E FC6E [Trivial][ILSEQ] +5CFC72 FC72 [Trivial][ILSEQ] +5CFC74 FC74 [Trivial][ILSEQ] +5CFC7E FC7E [Trivial][ILSEQ] +5CFC7F FC7F [Trivial][ILSEQ] +5CFC80 FC80 [Trivial][ILSEQ] +5CFC81 FC81 [Trivial][ILSEQ] +5CFC9F FC9F [Trivial][ILSEQ] +5CFCA0 FCA0 [Trivial][ILSEQ] +5CFCA1 FCA1 [Trivial][ILSEQ] +5CFCE0 FCE0 [Trivial][ILSEQ] +5CFCEF FCEF [Trivial][ILSEQ] +5CFCF9 FCF9 [Trivial][ILSEQ] +5CFCFA FCFA [Trivial][ILSEQ] +5CFCFC FCFC [Trivial][ILSEQ] +5CFCFD FCFD [Trivial][ILSEQ] +5CFCFE FCFE [Trivial][ILSEQ] +5CFCFF FCFF [Trivial][ILSEQ] +5CFD00 FD00 [Trivial][ILSEQ] +5CFD08 FD08 [Trivial][ILSEQ] +5CFD09 FD09 [Trivial][ILSEQ] +5CFD0A FD0A [Trivial][ILSEQ] +5CFD0D FD0D [Trivial][ILSEQ] +5CFD1A FD1A [Trivial][ILSEQ] +5CFD22 FD22 [Trivial][ILSEQ] +5CFD25 FD25 [Trivial][ILSEQ] +5CFD27 NULL [SyntErr] +5CFD30 FD30 [Trivial][ILSEQ] +5CFD3F FD3F [Trivial][ILSEQ] +5CFD40 FD40 [Trivial][ILSEQ] +5CFD5A FD5A [Trivial][ILSEQ] +5CFD5C NULL [SyntErr] +5CFD5F FD5F [Trivial][ILSEQ] +5CFD61 FD61 [Trivial][ILSEQ] +5CFD62 FD62 [Trivial][ILSEQ] +5CFD6E FD6E [Trivial][ILSEQ] +5CFD72 FD72 [Trivial][ILSEQ] +5CFD74 FD74 [Trivial][ILSEQ] +5CFD7E FD7E [Trivial][ILSEQ] +5CFD7F FD7F [Trivial][ILSEQ] +5CFD80 FD80 [Trivial][ILSEQ] +5CFD81 FD81 [Trivial][ILSEQ] +5CFD9F FD9F [Trivial][ILSEQ] +5CFDA0 FDA0 [Trivial][ILSEQ] +5CFDA1 FDA1 [Trivial][ILSEQ] +5CFDE0 FDE0 [Trivial][ILSEQ] +5CFDEF FDEF [Trivial][ILSEQ] +5CFDF9 FDF9 [Trivial][ILSEQ] +5CFDFA FDFA [Trivial][ILSEQ] +5CFDFC FDFC [Trivial][ILSEQ] +5CFDFD FDFD [Trivial][ILSEQ] +5CFDFE FDFE [Trivial][ILSEQ] +5CFDFF FDFF [Trivial][ILSEQ] +5CFE00 FE00 [Trivial][ILSEQ] +5CFE08 FE08 [Trivial][ILSEQ] +5CFE09 FE09 [Trivial][ILSEQ] +5CFE0A FE0A [Trivial][ILSEQ] +5CFE0D FE0D [Trivial][ILSEQ] +5CFE1A FE1A [Trivial][ILSEQ] +5CFE22 FE22 [Trivial][ILSEQ] +5CFE25 FE25 [Trivial][ILSEQ] +5CFE27 NULL [SyntErr] +5CFE30 FE30 [Trivial][ILSEQ] +5CFE3F FE3F [Trivial][ILSEQ] +5CFE40 FE40 [Trivial][ILSEQ] +5CFE5A FE5A [Trivial][ILSEQ] +5CFE5C NULL [SyntErr] +5CFE5F FE5F [Trivial][ILSEQ] +5CFE61 FE61 [Trivial][ILSEQ] +5CFE62 FE62 [Trivial][ILSEQ] +5CFE6E FE6E [Trivial][ILSEQ] +5CFE72 FE72 [Trivial][ILSEQ] +5CFE74 FE74 [Trivial][ILSEQ] +5CFE7E FE7E [Trivial][ILSEQ] +5CFE7F FE7F [Trivial][ILSEQ] +5CFE80 FE80 [Trivial][ILSEQ] +5CFE81 FE81 [Trivial][ILSEQ] +5CFE9F FE9F [Trivial][ILSEQ] +5CFEA0 FEA0 [Trivial][ILSEQ] +5CFEA1 FEA1 [Trivial][ILSEQ] +5CFEE0 FEE0 [Trivial][ILSEQ] +5CFEEF FEEF [Trivial][ILSEQ] +5CFEF9 FEF9 [Trivial][ILSEQ] +5CFEFA FEFA [Trivial][ILSEQ] +5CFEFC FEFC [Trivial][ILSEQ] +5CFEFD FEFD [Trivial][ILSEQ] +5CFEFE FEFE [Trivial][ILSEQ] +5CFEFF FEFF [Trivial][ILSEQ] +5CFF00 FF00 [Trivial][ILSEQ] +5CFF08 FF08 [Trivial][ILSEQ] +5CFF09 FF09 [Trivial][ILSEQ] +5CFF0A FF0A [Trivial][ILSEQ] +5CFF0D FF0D [Trivial][ILSEQ] +5CFF1A FF1A [Trivial][ILSEQ] +5CFF22 FF22 [Trivial][ILSEQ] +5CFF25 FF25 [Trivial][ILSEQ] +5CFF27 NULL [SyntErr] +5CFF30 FF30 [Trivial][ILSEQ] +5CFF3F FF3F [Trivial][ILSEQ] +5CFF40 FF40 [Trivial][ILSEQ] +5CFF5A FF5A [Trivial][ILSEQ] +5CFF5C NULL [SyntErr] +5CFF5F FF5F [Trivial][ILSEQ] +5CFF61 FF61 [Trivial][ILSEQ] +5CFF62 FF62 [Trivial][ILSEQ] +5CFF6E FF6E [Trivial][ILSEQ] +5CFF72 FF72 [Trivial][ILSEQ] +5CFF74 FF74 [Trivial][ILSEQ] +5CFF7E FF7E [Trivial][ILSEQ] +5CFF7F FF7F [Trivial][ILSEQ] +5CFF80 FF80 [Trivial][ILSEQ] +5CFF81 FF81 [Trivial][ILSEQ] +5CFF9F FF9F [Trivial][ILSEQ] +5CFFA0 FFA0 [Trivial][ILSEQ] +5CFFA1 FFA1 [Trivial][ILSEQ] +5CFFE0 FFE0 [Trivial][ILSEQ] +5CFFEF FFEF [Trivial][ILSEQ] +5CFFF9 FFF9 [Trivial][ILSEQ] +5CFFFA FFFA [Trivial][ILSEQ] +5CFFFC FFFC [Trivial][ILSEQ] +5CFFFD FFFD [Trivial][ILSEQ] +5CFFFE FFFE [Trivial][ILSEQ] +5CFFFF FFFF [Trivial][ILSEQ] +5C005C00 0000 [Trivial] +5C005C08 0008 [Trivial] +5C005C09 0009 [Trivial] +5C005C0A 000A [Trivial] +5C005C0D 000D [Trivial] +5C005C1A 001A [Trivial] +5C005C22 0022 [Trivial] +5C005C25 005C25 [Regular] +5C005C27 0027 [Trivial] +5C005C30 0000 [Regular] +5C005C3F 003F [Trivial] +5C005C40 0040 [Trivial] +5C005C5A 001A [Regular] +5C005C5C 005C [Regular] +5C005C5F 005C5F [Regular] +5C005C61 0061 [Trivial] +5C005C62 0008 [Regular] +5C005C6E 000A [Regular] +5C005C72 000D [Regular] +5C005C74 0009 [Regular] +5C005C7E 007E [Trivial] +5C005C7F 007F [Trivial] +5C005C80 0080 [Trivial][ILSEQ] +5C005C81 0081 [Trivial][ILSEQ] +5C005C9F 009F [Trivial][ILSEQ] +5C005CA0 00A0 [Trivial][ILSEQ] +5C005CA1 00A1 [Trivial][ILSEQ] +5C005CE0 00E0 [Trivial][ILSEQ] +5C005CEF 00EF [Trivial][ILSEQ] +5C005CF9 00F9 [Trivial][ILSEQ] +5C005CFA 00FA [Trivial][ILSEQ] +5C005CFC 00FC [Trivial][ILSEQ] +5C005CFD 00FD [Trivial][ILSEQ] +5C005CFE 00FE [Trivial][ILSEQ] +5C005CFF 00FF [Trivial][ILSEQ] +5C085C00 0800 [Trivial] +5C085C08 0808 [Trivial] +5C085C09 0809 [Trivial] +5C085C0A 080A [Trivial] +5C085C0D 080D [Trivial] +5C085C1A 081A [Trivial] +5C085C22 0822 [Trivial] +5C085C25 085C25 [Regular] +5C085C27 0827 [Trivial] +5C085C30 0800 [Regular] +5C085C3F 083F [Trivial] +5C085C40 0840 [Trivial] +5C085C5A 081A [Regular] +5C085C5C 085C [Regular] +5C085C5F 085C5F [Regular] +5C085C61 0861 [Trivial] +5C085C62 0808 [Regular] +5C085C6E 080A [Regular] +5C085C72 080D [Regular] +5C085C74 0809 [Regular] +5C085C7E 087E [Trivial] +5C085C7F 087F [Trivial] +5C085C80 0880 [Trivial][ILSEQ] +5C085C81 0881 [Trivial][ILSEQ] +5C085C9F 089F [Trivial][ILSEQ] +5C085CA0 08A0 [Trivial][ILSEQ] +5C085CA1 08A1 [Trivial][ILSEQ] +5C085CE0 08E0 [Trivial][ILSEQ] +5C085CEF 08EF [Trivial][ILSEQ] +5C085CF9 08F9 [Trivial][ILSEQ] +5C085CFA 08FA [Trivial][ILSEQ] +5C085CFC 08FC [Trivial][ILSEQ] +5C085CFD 08FD [Trivial][ILSEQ] +5C085CFE 08FE [Trivial][ILSEQ] +5C085CFF 08FF [Trivial][ILSEQ] +5C095C00 0900 [Trivial] +5C095C08 0908 [Trivial] +5C095C09 0909 [Trivial] +5C095C0A 090A [Trivial] +5C095C0D 090D [Trivial] +5C095C1A 091A [Trivial] +5C095C22 0922 [Trivial] +5C095C25 095C25 [Regular] +5C095C27 0927 [Trivial] +5C095C30 0900 [Regular] +5C095C3F 093F [Trivial] +5C095C40 0940 [Trivial] +5C095C5A 091A [Regular] +5C095C5C 095C [Regular] +5C095C5F 095C5F [Regular] +5C095C61 0961 [Trivial] +5C095C62 0908 [Regular] +5C095C6E 090A [Regular] +5C095C72 090D [Regular] +5C095C74 0909 [Regular] +5C095C7E 097E [Trivial] +5C095C7F 097F [Trivial] +5C095C80 0980 [Trivial][ILSEQ] +5C095C81 0981 [Trivial][ILSEQ] +5C095C9F 099F [Trivial][ILSEQ] +5C095CA0 09A0 [Trivial][ILSEQ] +5C095CA1 09A1 [Trivial][ILSEQ] +5C095CE0 09E0 [Trivial][ILSEQ] +5C095CEF 09EF [Trivial][ILSEQ] +5C095CF9 09F9 [Trivial][ILSEQ] +5C095CFA 09FA [Trivial][ILSEQ] +5C095CFC 09FC [Trivial][ILSEQ] +5C095CFD 09FD [Trivial][ILSEQ] +5C095CFE 09FE [Trivial][ILSEQ] +5C095CFF 09FF [Trivial][ILSEQ] +5C0A5C00 0A00 [Trivial] +5C0A5C08 0A08 [Trivial] +5C0A5C09 0A09 [Trivial] +5C0A5C0A 0A0A [Trivial] +5C0A5C0D 0A0D [Trivial] +5C0A5C1A 0A1A [Trivial] +5C0A5C22 0A22 [Trivial] +5C0A5C25 0A5C25 [Regular] +5C0A5C27 0A27 [Trivial] +5C0A5C30 0A00 [Regular] +5C0A5C3F 0A3F [Trivial] +5C0A5C40 0A40 [Trivial] +5C0A5C5A 0A1A [Regular] +5C0A5C5C 0A5C [Regular] +5C0A5C5F 0A5C5F [Regular] +5C0A5C61 0A61 [Trivial] +5C0A5C62 0A08 [Regular] +5C0A5C6E 0A0A [Regular] +5C0A5C72 0A0D [Regular] +5C0A5C74 0A09 [Regular] +5C0A5C7E 0A7E [Trivial] +5C0A5C7F 0A7F [Trivial] +5C0A5C80 0A80 [Trivial][ILSEQ] +5C0A5C81 0A81 [Trivial][ILSEQ] +5C0A5C9F 0A9F [Trivial][ILSEQ] +5C0A5CA0 0AA0 [Trivial][ILSEQ] +5C0A5CA1 0AA1 [Trivial][ILSEQ] +5C0A5CE0 0AE0 [Trivial][ILSEQ] +5C0A5CEF 0AEF [Trivial][ILSEQ] +5C0A5CF9 0AF9 [Trivial][ILSEQ] +5C0A5CFA 0AFA [Trivial][ILSEQ] +5C0A5CFC 0AFC [Trivial][ILSEQ] +5C0A5CFD 0AFD [Trivial][ILSEQ] +5C0A5CFE 0AFE [Trivial][ILSEQ] +5C0A5CFF 0AFF [Trivial][ILSEQ] +5C0D5C00 0D00 [Trivial] +5C0D5C08 0D08 [Trivial] +5C0D5C09 0D09 [Trivial] +5C0D5C0A 0D0A [Trivial] +5C0D5C0D 0D0D [Trivial] +5C0D5C1A 0D1A [Trivial] +5C0D5C22 0D22 [Trivial] +5C0D5C25 0D5C25 [Regular] +5C0D5C27 0D27 [Trivial] +5C0D5C30 0D00 [Regular] +5C0D5C3F 0D3F [Trivial] +5C0D5C40 0D40 [Trivial] +5C0D5C5A 0D1A [Regular] +5C0D5C5C 0D5C [Regular] +5C0D5C5F 0D5C5F [Regular] +5C0D5C61 0D61 [Trivial] +5C0D5C62 0D08 [Regular] +5C0D5C6E 0D0A [Regular] +5C0D5C72 0D0D [Regular] +5C0D5C74 0D09 [Regular] +5C0D5C7E 0D7E [Trivial] +5C0D5C7F 0D7F [Trivial] +5C0D5C80 0D80 [Trivial][ILSEQ] +5C0D5C81 0D81 [Trivial][ILSEQ] +5C0D5C9F 0D9F [Trivial][ILSEQ] +5C0D5CA0 0DA0 [Trivial][ILSEQ] +5C0D5CA1 0DA1 [Trivial][ILSEQ] +5C0D5CE0 0DE0 [Trivial][ILSEQ] +5C0D5CEF 0DEF [Trivial][ILSEQ] +5C0D5CF9 0DF9 [Trivial][ILSEQ] +5C0D5CFA 0DFA [Trivial][ILSEQ] +5C0D5CFC 0DFC [Trivial][ILSEQ] +5C0D5CFD 0DFD [Trivial][ILSEQ] +5C0D5CFE 0DFE [Trivial][ILSEQ] +5C0D5CFF 0DFF [Trivial][ILSEQ] +5C1A5C00 1A00 [Trivial] +5C1A5C08 1A08 [Trivial] +5C1A5C09 1A09 [Trivial] +5C1A5C0A 1A0A [Trivial] +5C1A5C0D 1A0D [Trivial] +5C1A5C1A 1A1A [Trivial] +5C1A5C22 1A22 [Trivial] +5C1A5C25 1A5C25 [Regular] +5C1A5C27 1A27 [Trivial] +5C1A5C30 1A00 [Regular] +5C1A5C3F 1A3F [Trivial] +5C1A5C40 1A40 [Trivial] +5C1A5C5A 1A1A [Regular] +5C1A5C5C 1A5C [Regular] +5C1A5C5F 1A5C5F [Regular] +5C1A5C61 1A61 [Trivial] +5C1A5C62 1A08 [Regular] +5C1A5C6E 1A0A [Regular] +5C1A5C72 1A0D [Regular] +5C1A5C74 1A09 [Regular] +5C1A5C7E 1A7E [Trivial] +5C1A5C7F 1A7F [Trivial] +5C1A5C80 1A80 [Trivial][ILSEQ] +5C1A5C81 1A81 [Trivial][ILSEQ] +5C1A5C9F 1A9F [Trivial][ILSEQ] +5C1A5CA0 1AA0 [Trivial][ILSEQ] +5C1A5CA1 1AA1 [Trivial][ILSEQ] +5C1A5CE0 1AE0 [Trivial][ILSEQ] +5C1A5CEF 1AEF [Trivial][ILSEQ] +5C1A5CF9 1AF9 [Trivial][ILSEQ] +5C1A5CFA 1AFA [Trivial][ILSEQ] +5C1A5CFC 1AFC [Trivial][ILSEQ] +5C1A5CFD 1AFD [Trivial][ILSEQ] +5C1A5CFE 1AFE [Trivial][ILSEQ] +5C1A5CFF 1AFF [Trivial][ILSEQ] +5C225C00 2200 [Trivial] +5C225C08 2208 [Trivial] +5C225C09 2209 [Trivial] +5C225C0A 220A [Trivial] +5C225C0D 220D [Trivial] +5C225C1A 221A [Trivial] +5C225C22 2222 [Trivial] +5C225C25 225C25 [Regular] +5C225C27 2227 [Trivial] +5C225C30 2200 [Regular] +5C225C3F 223F [Trivial] +5C225C40 2240 [Trivial] +5C225C5A 221A [Regular] +5C225C5C 225C [Regular] +5C225C5F 225C5F [Regular] +5C225C61 2261 [Trivial] +5C225C62 2208 [Regular] +5C225C6E 220A [Regular] +5C225C72 220D [Regular] +5C225C74 2209 [Regular] +5C225C7E 227E [Trivial] +5C225C7F 227F [Trivial] +5C225C80 2280 [Trivial][ILSEQ] +5C225C81 2281 [Trivial][ILSEQ] +5C225C9F 229F [Trivial][ILSEQ] +5C225CA0 22A0 [Trivial][ILSEQ] +5C225CA1 22A1 [Trivial][ILSEQ] +5C225CE0 22E0 [Trivial][ILSEQ] +5C225CEF 22EF [Trivial][ILSEQ] +5C225CF9 22F9 [Trivial][ILSEQ] +5C225CFA 22FA [Trivial][ILSEQ] +5C225CFC 22FC [Trivial][ILSEQ] +5C225CFD 22FD [Trivial][ILSEQ] +5C225CFE 22FE [Trivial][ILSEQ] +5C225CFF 22FF [Trivial][ILSEQ] +5C255C00 5C2500 [Regular] +5C255C08 5C2508 [Regular] +5C255C09 5C2509 [Regular] +5C255C0A 5C250A [Regular] +5C255C0D 5C250D [Regular] +5C255C1A 5C251A [Regular] +5C255C22 5C2522 [Regular] +5C255C25 5C255C25 [Preserve][LIKE] +5C255C27 5C2527 [Regular] +5C255C30 5C2500 [Regular] +5C255C3F 5C253F [Regular] +5C255C40 5C2540 [Regular] +5C255C5A 5C251A [Regular] +5C255C5C 5C255C [Regular] +5C255C5F 5C255C5F [Preserve][LIKE] +5C255C61 5C2561 [Regular] +5C255C62 5C2508 [Regular] +5C255C6E 5C250A [Regular] +5C255C72 5C250D [Regular] +5C255C74 5C2509 [Regular] +5C255C7E 5C257E [Regular] +5C255C7F 5C257F [Regular] +5C255C80 5C2580 [Regular][ILSEQ] +5C255C81 5C2581 [Regular][ILSEQ] +5C255C9F 5C259F [Regular][ILSEQ] +5C255CA0 5C25A0 [Regular][ILSEQ] +5C255CA1 5C25A1 [Regular][ILSEQ] +5C255CE0 5C25E0 [Regular][ILSEQ] +5C255CEF 5C25EF [Regular][ILSEQ] +5C255CF9 5C25F9 [Regular][ILSEQ] +5C255CFA 5C25FA [Regular][ILSEQ] +5C255CFC 5C25FC [Regular][ILSEQ] +5C255CFD 5C25FD [Regular][ILSEQ] +5C255CFE 5C25FE [Regular][ILSEQ] +5C255CFF 5C25FF [Regular][ILSEQ] +5C275C00 2700 [Trivial] +5C275C08 2708 [Trivial] +5C275C09 2709 [Trivial] +5C275C0A 270A [Trivial] +5C275C0D 270D [Trivial] +5C275C1A 271A [Trivial] +5C275C22 2722 [Trivial] +5C275C25 275C25 [Regular] +5C275C27 2727 [Trivial] +5C275C30 2700 [Regular] +5C275C3F 273F [Trivial] +5C275C40 2740 [Trivial] +5C275C5A 271A [Regular] +5C275C5C 275C [Regular] +5C275C5F 275C5F [Regular] +5C275C61 2761 [Trivial] +5C275C62 2708 [Regular] +5C275C6E 270A [Regular] +5C275C72 270D [Regular] +5C275C74 2709 [Regular] +5C275C7E 277E [Trivial] +5C275C7F 277F [Trivial] +5C275C80 2780 [Trivial][ILSEQ] +5C275C81 2781 [Trivial][ILSEQ] +5C275C9F 279F [Trivial][ILSEQ] +5C275CA0 27A0 [Trivial][ILSEQ] +5C275CA1 27A1 [Trivial][ILSEQ] +5C275CE0 27E0 [Trivial][ILSEQ] +5C275CEF 27EF [Trivial][ILSEQ] +5C275CF9 27F9 [Trivial][ILSEQ] +5C275CFA 27FA [Trivial][ILSEQ] +5C275CFC 27FC [Trivial][ILSEQ] +5C275CFD 27FD [Trivial][ILSEQ] +5C275CFE 27FE [Trivial][ILSEQ] +5C275CFF 27FF [Trivial][ILSEQ] +5C305C00 0000 [Regular] +5C305C08 0008 [Regular] +5C305C09 0009 [Regular] +5C305C0A 000A [Regular] +5C305C0D 000D [Regular] +5C305C1A 001A [Regular] +5C305C22 0022 [Regular] +5C305C25 005C25 [Regular] +5C305C27 0027 [Regular] +5C305C30 0000 [Regular] +5C305C3F 003F [Regular] +5C305C40 0040 [Regular] +5C305C5A 001A [Regular] +5C305C5C 005C [Regular] +5C305C5F 005C5F [Regular] +5C305C61 0061 [Regular] +5C305C62 0008 [Regular] +5C305C6E 000A [Regular] +5C305C72 000D [Regular] +5C305C74 0009 [Regular] +5C305C7E 007E [Regular] +5C305C7F 007F [Regular] +5C305C80 0080 [Regular][ILSEQ] +5C305C81 0081 [Regular][ILSEQ] +5C305C9F 009F [Regular][ILSEQ] +5C305CA0 00A0 [Regular][ILSEQ] +5C305CA1 00A1 [Regular][ILSEQ] +5C305CE0 00E0 [Regular][ILSEQ] +5C305CEF 00EF [Regular][ILSEQ] +5C305CF9 00F9 [Regular][ILSEQ] +5C305CFA 00FA [Regular][ILSEQ] +5C305CFC 00FC [Regular][ILSEQ] +5C305CFD 00FD [Regular][ILSEQ] +5C305CFE 00FE [Regular][ILSEQ] +5C305CFF 00FF [Regular][ILSEQ] +5C3F5C00 3F00 [Trivial] +5C3F5C08 3F08 [Trivial] +5C3F5C09 3F09 [Trivial] +5C3F5C0A 3F0A [Trivial] +5C3F5C0D 3F0D [Trivial] +5C3F5C1A 3F1A [Trivial] +5C3F5C22 3F22 [Trivial] +5C3F5C25 3F5C25 [Regular] +5C3F5C27 3F27 [Trivial] +5C3F5C30 3F00 [Regular] +5C3F5C3F 3F3F [Trivial] +5C3F5C40 3F40 [Trivial] +5C3F5C5A 3F1A [Regular] +5C3F5C5C 3F5C [Regular] +5C3F5C5F 3F5C5F [Regular] +5C3F5C61 3F61 [Trivial] +5C3F5C62 3F08 [Regular] +5C3F5C6E 3F0A [Regular] +5C3F5C72 3F0D [Regular] +5C3F5C74 3F09 [Regular] +5C3F5C7E 3F7E [Trivial] +5C3F5C7F 3F7F [Trivial] +5C3F5C80 3F80 [Trivial][ILSEQ] +5C3F5C81 3F81 [Trivial][ILSEQ] +5C3F5C9F 3F9F [Trivial][ILSEQ] +5C3F5CA0 3FA0 [Trivial][ILSEQ] +5C3F5CA1 3FA1 [Trivial][ILSEQ] +5C3F5CE0 3FE0 [Trivial][ILSEQ] +5C3F5CEF 3FEF [Trivial][ILSEQ] +5C3F5CF9 3FF9 [Trivial][ILSEQ] +5C3F5CFA 3FFA [Trivial][ILSEQ] +5C3F5CFC 3FFC [Trivial][ILSEQ] +5C3F5CFD 3FFD [Trivial][ILSEQ] +5C3F5CFE 3FFE [Trivial][ILSEQ] +5C3F5CFF 3FFF [Trivial][ILSEQ] +5C405C00 4000 [Trivial] +5C405C08 4008 [Trivial] +5C405C09 4009 [Trivial] +5C405C0A 400A [Trivial] +5C405C0D 400D [Trivial] +5C405C1A 401A [Trivial] +5C405C22 4022 [Trivial] +5C405C25 405C25 [Regular] +5C405C27 4027 [Trivial] +5C405C30 4000 [Regular] +5C405C3F 403F [Trivial] +5C405C40 4040 [Trivial] +5C405C5A 401A [Regular] +5C405C5C 405C [Regular] +5C405C5F 405C5F [Regular] +5C405C61 4061 [Trivial] +5C405C62 4008 [Regular] +5C405C6E 400A [Regular] +5C405C72 400D [Regular] +5C405C74 4009 [Regular] +5C405C7E 407E [Trivial] +5C405C7F 407F [Trivial] +5C405C80 4080 [Trivial][ILSEQ] +5C405C81 4081 [Trivial][ILSEQ] +5C405C9F 409F [Trivial][ILSEQ] +5C405CA0 40A0 [Trivial][ILSEQ] +5C405CA1 40A1 [Trivial][ILSEQ] +5C405CE0 40E0 [Trivial][ILSEQ] +5C405CEF 40EF [Trivial][ILSEQ] +5C405CF9 40F9 [Trivial][ILSEQ] +5C405CFA 40FA [Trivial][ILSEQ] +5C405CFC 40FC [Trivial][ILSEQ] +5C405CFD 40FD [Trivial][ILSEQ] +5C405CFE 40FE [Trivial][ILSEQ] +5C405CFF 40FF [Trivial][ILSEQ] +5C5A5C00 1A00 [Regular] +5C5A5C08 1A08 [Regular] +5C5A5C09 1A09 [Regular] +5C5A5C0A 1A0A [Regular] +5C5A5C0D 1A0D [Regular] +5C5A5C1A 1A1A [Regular] +5C5A5C22 1A22 [Regular] +5C5A5C25 1A5C25 [Regular] +5C5A5C27 1A27 [Regular] +5C5A5C30 1A00 [Regular] +5C5A5C3F 1A3F [Regular] +5C5A5C40 1A40 [Regular] +5C5A5C5A 1A1A [Regular] +5C5A5C5C 1A5C [Regular] +5C5A5C5F 1A5C5F [Regular] +5C5A5C61 1A61 [Regular] +5C5A5C62 1A08 [Regular] +5C5A5C6E 1A0A [Regular] +5C5A5C72 1A0D [Regular] +5C5A5C74 1A09 [Regular] +5C5A5C7E 1A7E [Regular] +5C5A5C7F 1A7F [Regular] +5C5A5C80 1A80 [Regular][ILSEQ] +5C5A5C81 1A81 [Regular][ILSEQ] +5C5A5C9F 1A9F [Regular][ILSEQ] +5C5A5CA0 1AA0 [Regular][ILSEQ] +5C5A5CA1 1AA1 [Regular][ILSEQ] +5C5A5CE0 1AE0 [Regular][ILSEQ] +5C5A5CEF 1AEF [Regular][ILSEQ] +5C5A5CF9 1AF9 [Regular][ILSEQ] +5C5A5CFA 1AFA [Regular][ILSEQ] +5C5A5CFC 1AFC [Regular][ILSEQ] +5C5A5CFD 1AFD [Regular][ILSEQ] +5C5A5CFE 1AFE [Regular][ILSEQ] +5C5A5CFF 1AFF [Regular][ILSEQ] +5C5C5C00 5C00 [Regular] +5C5C5C08 5C08 [Regular] +5C5C5C09 5C09 [Regular] +5C5C5C0A 5C0A [Regular] +5C5C5C0D 5C0D [Regular] +5C5C5C1A 5C1A [Regular] +5C5C5C22 5C22 [Regular] +5C5C5C25 5C5C25 [Regular] +5C5C5C27 5C27 [Regular] +5C5C5C30 5C00 [Regular] +5C5C5C3F 5C3F [Regular] +5C5C5C40 5C40 [Regular] +5C5C5C5A 5C1A [Regular] +5C5C5C5C 5C5C [Regular] +5C5C5C5F 5C5C5F [Regular] +5C5C5C61 5C61 [Regular] +5C5C5C62 5C08 [Regular] +5C5C5C6E 5C0A [Regular] +5C5C5C72 5C0D [Regular] +5C5C5C74 5C09 [Regular] +5C5C5C7E 5C7E [Regular] +5C5C5C7F 5C7F [Regular] +5C5C5C80 5C80 [Regular][ILSEQ] +5C5C5C81 5C81 [Regular][ILSEQ] +5C5C5C9F 5C9F [Regular][ILSEQ] +5C5C5CA0 5CA0 [Regular][ILSEQ] +5C5C5CA1 5CA1 [Regular][ILSEQ] +5C5C5CE0 5CE0 [Regular][ILSEQ] +5C5C5CEF 5CEF [Regular][ILSEQ] +5C5C5CF9 5CF9 [Regular][ILSEQ] +5C5C5CFA 5CFA [Regular][ILSEQ] +5C5C5CFC 5CFC [Regular][ILSEQ] +5C5C5CFD 5CFD [Regular][ILSEQ] +5C5C5CFE 5CFE [Regular][ILSEQ] +5C5C5CFF 5CFF [Regular][ILSEQ] +5C5F5C00 5C5F00 [Regular] +5C5F5C08 5C5F08 [Regular] +5C5F5C09 5C5F09 [Regular] +5C5F5C0A 5C5F0A [Regular] +5C5F5C0D 5C5F0D [Regular] +5C5F5C1A 5C5F1A [Regular] +5C5F5C22 5C5F22 [Regular] +5C5F5C25 5C5F5C25 [Preserve][LIKE] +5C5F5C27 5C5F27 [Regular] +5C5F5C30 5C5F00 [Regular] +5C5F5C3F 5C5F3F [Regular] +5C5F5C40 5C5F40 [Regular] +5C5F5C5A 5C5F1A [Regular] +5C5F5C5C 5C5F5C [Regular] +5C5F5C5F 5C5F5C5F [Preserve][LIKE] +5C5F5C61 5C5F61 [Regular] +5C5F5C62 5C5F08 [Regular] +5C5F5C6E 5C5F0A [Regular] +5C5F5C72 5C5F0D [Regular] +5C5F5C74 5C5F09 [Regular] +5C5F5C7E 5C5F7E [Regular] +5C5F5C7F 5C5F7F [Regular] +5C5F5C80 5C5F80 [Regular][ILSEQ] +5C5F5C81 5C5F81 [Regular][ILSEQ] +5C5F5C9F 5C5F9F [Regular][ILSEQ] +5C5F5CA0 5C5FA0 [Regular][ILSEQ] +5C5F5CA1 5C5FA1 [Regular][ILSEQ] +5C5F5CE0 5C5FE0 [Regular][ILSEQ] +5C5F5CEF 5C5FEF [Regular][ILSEQ] +5C5F5CF9 5C5FF9 [Regular][ILSEQ] +5C5F5CFA 5C5FFA [Regular][ILSEQ] +5C5F5CFC 5C5FFC [Regular][ILSEQ] +5C5F5CFD 5C5FFD [Regular][ILSEQ] +5C5F5CFE 5C5FFE [Regular][ILSEQ] +5C5F5CFF 5C5FFF [Regular][ILSEQ] +5C615C00 6100 [Trivial] +5C615C08 6108 [Trivial] +5C615C09 6109 [Trivial] +5C615C0A 610A [Trivial] +5C615C0D 610D [Trivial] +5C615C1A 611A [Trivial] +5C615C22 6122 [Trivial] +5C615C25 615C25 [Regular] +5C615C27 6127 [Trivial] +5C615C30 6100 [Regular] +5C615C3F 613F [Trivial] +5C615C40 6140 [Trivial] +5C615C5A 611A [Regular] +5C615C5C 615C [Regular] +5C615C5F 615C5F [Regular] +5C615C61 6161 [Trivial] +5C615C62 6108 [Regular] +5C615C6E 610A [Regular] +5C615C72 610D [Regular] +5C615C74 6109 [Regular] +5C615C7E 617E [Trivial] +5C615C7F 617F [Trivial] +5C615C80 6180 [Trivial][ILSEQ] +5C615C81 6181 [Trivial][ILSEQ] +5C615C9F 619F [Trivial][ILSEQ] +5C615CA0 61A0 [Trivial][ILSEQ] +5C615CA1 61A1 [Trivial][ILSEQ] +5C615CE0 61E0 [Trivial][ILSEQ] +5C615CEF 61EF [Trivial][ILSEQ] +5C615CF9 61F9 [Trivial][ILSEQ] +5C615CFA 61FA [Trivial][ILSEQ] +5C615CFC 61FC [Trivial][ILSEQ] +5C615CFD 61FD [Trivial][ILSEQ] +5C615CFE 61FE [Trivial][ILSEQ] +5C615CFF 61FF [Trivial][ILSEQ] +5C625C00 0800 [Regular] +5C625C08 0808 [Regular] +5C625C09 0809 [Regular] +5C625C0A 080A [Regular] +5C625C0D 080D [Regular] +5C625C1A 081A [Regular] +5C625C22 0822 [Regular] +5C625C25 085C25 [Regular] +5C625C27 0827 [Regular] +5C625C30 0800 [Regular] +5C625C3F 083F [Regular] +5C625C40 0840 [Regular] +5C625C5A 081A [Regular] +5C625C5C 085C [Regular] +5C625C5F 085C5F [Regular] +5C625C61 0861 [Regular] +5C625C62 0808 [Regular] +5C625C6E 080A [Regular] +5C625C72 080D [Regular] +5C625C74 0809 [Regular] +5C625C7E 087E [Regular] +5C625C7F 087F [Regular] +5C625C80 0880 [Regular][ILSEQ] +5C625C81 0881 [Regular][ILSEQ] +5C625C9F 089F [Regular][ILSEQ] +5C625CA0 08A0 [Regular][ILSEQ] +5C625CA1 08A1 [Regular][ILSEQ] +5C625CE0 08E0 [Regular][ILSEQ] +5C625CEF 08EF [Regular][ILSEQ] +5C625CF9 08F9 [Regular][ILSEQ] +5C625CFA 08FA [Regular][ILSEQ] +5C625CFC 08FC [Regular][ILSEQ] +5C625CFD 08FD [Regular][ILSEQ] +5C625CFE 08FE [Regular][ILSEQ] +5C625CFF 08FF [Regular][ILSEQ] +5C6E5C00 0A00 [Regular] +5C6E5C08 0A08 [Regular] +5C6E5C09 0A09 [Regular] +5C6E5C0A 0A0A [Regular] +5C6E5C0D 0A0D [Regular] +5C6E5C1A 0A1A [Regular] +5C6E5C22 0A22 [Regular] +5C6E5C25 0A5C25 [Regular] +5C6E5C27 0A27 [Regular] +5C6E5C30 0A00 [Regular] +5C6E5C3F 0A3F [Regular] +5C6E5C40 0A40 [Regular] +5C6E5C5A 0A1A [Regular] +5C6E5C5C 0A5C [Regular] +5C6E5C5F 0A5C5F [Regular] +5C6E5C61 0A61 [Regular] +5C6E5C62 0A08 [Regular] +5C6E5C6E 0A0A [Regular] +5C6E5C72 0A0D [Regular] +5C6E5C74 0A09 [Regular] +5C6E5C7E 0A7E [Regular] +5C6E5C7F 0A7F [Regular] +5C6E5C80 0A80 [Regular][ILSEQ] +5C6E5C81 0A81 [Regular][ILSEQ] +5C6E5C9F 0A9F [Regular][ILSEQ] +5C6E5CA0 0AA0 [Regular][ILSEQ] +5C6E5CA1 0AA1 [Regular][ILSEQ] +5C6E5CE0 0AE0 [Regular][ILSEQ] +5C6E5CEF 0AEF [Regular][ILSEQ] +5C6E5CF9 0AF9 [Regular][ILSEQ] +5C6E5CFA 0AFA [Regular][ILSEQ] +5C6E5CFC 0AFC [Regular][ILSEQ] +5C6E5CFD 0AFD [Regular][ILSEQ] +5C6E5CFE 0AFE [Regular][ILSEQ] +5C6E5CFF 0AFF [Regular][ILSEQ] +5C725C00 0D00 [Regular] +5C725C08 0D08 [Regular] +5C725C09 0D09 [Regular] +5C725C0A 0D0A [Regular] +5C725C0D 0D0D [Regular] +5C725C1A 0D1A [Regular] +5C725C22 0D22 [Regular] +5C725C25 0D5C25 [Regular] +5C725C27 0D27 [Regular] +5C725C30 0D00 [Regular] +5C725C3F 0D3F [Regular] +5C725C40 0D40 [Regular] +5C725C5A 0D1A [Regular] +5C725C5C 0D5C [Regular] +5C725C5F 0D5C5F [Regular] +5C725C61 0D61 [Regular] +5C725C62 0D08 [Regular] +5C725C6E 0D0A [Regular] +5C725C72 0D0D [Regular] +5C725C74 0D09 [Regular] +5C725C7E 0D7E [Regular] +5C725C7F 0D7F [Regular] +5C725C80 0D80 [Regular][ILSEQ] +5C725C81 0D81 [Regular][ILSEQ] +5C725C9F 0D9F [Regular][ILSEQ] +5C725CA0 0DA0 [Regular][ILSEQ] +5C725CA1 0DA1 [Regular][ILSEQ] +5C725CE0 0DE0 [Regular][ILSEQ] +5C725CEF 0DEF [Regular][ILSEQ] +5C725CF9 0DF9 [Regular][ILSEQ] +5C725CFA 0DFA [Regular][ILSEQ] +5C725CFC 0DFC [Regular][ILSEQ] +5C725CFD 0DFD [Regular][ILSEQ] +5C725CFE 0DFE [Regular][ILSEQ] +5C725CFF 0DFF [Regular][ILSEQ] +5C745C00 0900 [Regular] +5C745C08 0908 [Regular] +5C745C09 0909 [Regular] +5C745C0A 090A [Regular] +5C745C0D 090D [Regular] +5C745C1A 091A [Regular] +5C745C22 0922 [Regular] +5C745C25 095C25 [Regular] +5C745C27 0927 [Regular] +5C745C30 0900 [Regular] +5C745C3F 093F [Regular] +5C745C40 0940 [Regular] +5C745C5A 091A [Regular] +5C745C5C 095C [Regular] +5C745C5F 095C5F [Regular] +5C745C61 0961 [Regular] +5C745C62 0908 [Regular] +5C745C6E 090A [Regular] +5C745C72 090D [Regular] +5C745C74 0909 [Regular] +5C745C7E 097E [Regular] +5C745C7F 097F [Regular] +5C745C80 0980 [Regular][ILSEQ] +5C745C81 0981 [Regular][ILSEQ] +5C745C9F 099F [Regular][ILSEQ] +5C745CA0 09A0 [Regular][ILSEQ] +5C745CA1 09A1 [Regular][ILSEQ] +5C745CE0 09E0 [Regular][ILSEQ] +5C745CEF 09EF [Regular][ILSEQ] +5C745CF9 09F9 [Regular][ILSEQ] +5C745CFA 09FA [Regular][ILSEQ] +5C745CFC 09FC [Regular][ILSEQ] +5C745CFD 09FD [Regular][ILSEQ] +5C745CFE 09FE [Regular][ILSEQ] +5C745CFF 09FF [Regular][ILSEQ] +5C7E5C00 7E00 [Trivial] +5C7E5C08 7E08 [Trivial] +5C7E5C09 7E09 [Trivial] +5C7E5C0A 7E0A [Trivial] +5C7E5C0D 7E0D [Trivial] +5C7E5C1A 7E1A [Trivial] +5C7E5C22 7E22 [Trivial] +5C7E5C25 7E5C25 [Regular] +5C7E5C27 7E27 [Trivial] +5C7E5C30 7E00 [Regular] +5C7E5C3F 7E3F [Trivial] +5C7E5C40 7E40 [Trivial] +5C7E5C5A 7E1A [Regular] +5C7E5C5C 7E5C [Regular] +5C7E5C5F 7E5C5F [Regular] +5C7E5C61 7E61 [Trivial] +5C7E5C62 7E08 [Regular] +5C7E5C6E 7E0A [Regular] +5C7E5C72 7E0D [Regular] +5C7E5C74 7E09 [Regular] +5C7E5C7E 7E7E [Trivial] +5C7E5C7F 7E7F [Trivial] +5C7E5C80 7E80 [Trivial][ILSEQ] +5C7E5C81 7E81 [Trivial][ILSEQ] +5C7E5C9F 7E9F [Trivial][ILSEQ] +5C7E5CA0 7EA0 [Trivial][ILSEQ] +5C7E5CA1 7EA1 [Trivial][ILSEQ] +5C7E5CE0 7EE0 [Trivial][ILSEQ] +5C7E5CEF 7EEF [Trivial][ILSEQ] +5C7E5CF9 7EF9 [Trivial][ILSEQ] +5C7E5CFA 7EFA [Trivial][ILSEQ] +5C7E5CFC 7EFC [Trivial][ILSEQ] +5C7E5CFD 7EFD [Trivial][ILSEQ] +5C7E5CFE 7EFE [Trivial][ILSEQ] +5C7E5CFF 7EFF [Trivial][ILSEQ] +5C7F5C00 7F00 [Trivial] +5C7F5C08 7F08 [Trivial] +5C7F5C09 7F09 [Trivial] +5C7F5C0A 7F0A [Trivial] +5C7F5C0D 7F0D [Trivial] +5C7F5C1A 7F1A [Trivial] +5C7F5C22 7F22 [Trivial] +5C7F5C25 7F5C25 [Regular] +5C7F5C27 7F27 [Trivial] +5C7F5C30 7F00 [Regular] +5C7F5C3F 7F3F [Trivial] +5C7F5C40 7F40 [Trivial] +5C7F5C5A 7F1A [Regular] +5C7F5C5C 7F5C [Regular] +5C7F5C5F 7F5C5F [Regular] +5C7F5C61 7F61 [Trivial] +5C7F5C62 7F08 [Regular] +5C7F5C6E 7F0A [Regular] +5C7F5C72 7F0D [Regular] +5C7F5C74 7F09 [Regular] +5C7F5C7E 7F7E [Trivial] +5C7F5C7F 7F7F [Trivial] +5C7F5C80 7F80 [Trivial][ILSEQ] +5C7F5C81 7F81 [Trivial][ILSEQ] +5C7F5C9F 7F9F [Trivial][ILSEQ] +5C7F5CA0 7FA0 [Trivial][ILSEQ] +5C7F5CA1 7FA1 [Trivial][ILSEQ] +5C7F5CE0 7FE0 [Trivial][ILSEQ] +5C7F5CEF 7FEF [Trivial][ILSEQ] +5C7F5CF9 7FF9 [Trivial][ILSEQ] +5C7F5CFA 7FFA [Trivial][ILSEQ] +5C7F5CFC 7FFC [Trivial][ILSEQ] +5C7F5CFD 7FFD [Trivial][ILSEQ] +5C7F5CFE 7FFE [Trivial][ILSEQ] +5C7F5CFF 7FFF [Trivial][ILSEQ] +5C805C00 8000 [Trivial][ILSEQ] +5C805C08 8008 [Trivial][ILSEQ] +5C805C09 8009 [Trivial][ILSEQ] +5C805C0A 800A [Trivial][ILSEQ] +5C805C0D 800D [Trivial][ILSEQ] +5C805C1A 801A [Trivial][ILSEQ] +5C805C22 8022 [Trivial][ILSEQ] +5C805C25 805C25 [Regular][ILSEQ] +5C805C27 8027 [Trivial][ILSEQ] +5C805C30 8000 [Regular][ILSEQ] +5C805C3F 803F [Trivial][ILSEQ] +5C805C40 8040 [Trivial][ILSEQ] +5C805C5A 801A [Regular][ILSEQ] +5C805C5C 805C [Regular][ILSEQ] +5C805C5F 805C5F [Regular][ILSEQ] +5C805C61 8061 [Trivial][ILSEQ] +5C805C62 8008 [Regular][ILSEQ] +5C805C6E 800A [Regular][ILSEQ] +5C805C72 800D [Regular][ILSEQ] +5C805C74 8009 [Regular][ILSEQ] +5C805C7E 807E [Trivial][ILSEQ] +5C805C7F 807F [Trivial][ILSEQ] +5C805C80 8080 [Trivial][ILSEQ] +5C805C81 8081 [Trivial][ILSEQ] +5C805C9F 809F [Trivial][ILSEQ] +5C805CA0 80A0 [Trivial][ILSEQ] +5C805CA1 80A1 [Trivial][ILSEQ] +5C805CE0 80E0 [Trivial][ILSEQ] +5C805CEF 80EF [Trivial][ILSEQ] +5C805CF9 80F9 [Trivial][ILSEQ] +5C805CFA 80FA [Trivial][ILSEQ] +5C805CFC 80FC [Trivial][ILSEQ] +5C805CFD 80FD [Trivial][ILSEQ] +5C805CFE 80FE [Trivial][ILSEQ] +5C805CFF 80FF [Trivial][ILSEQ] +5C815C00 8100 [Trivial][ILSEQ] +5C815C08 8108 [Trivial][ILSEQ] +5C815C09 8109 [Trivial][ILSEQ] +5C815C0A 810A [Trivial][ILSEQ] +5C815C0D 810D [Trivial][ILSEQ] +5C815C1A 811A [Trivial][ILSEQ] +5C815C22 8122 [Trivial][ILSEQ] +5C815C25 815C25 [Regular][ILSEQ] +5C815C27 8127 [Trivial][ILSEQ] +5C815C30 8100 [Regular][ILSEQ] +5C815C3F 813F [Trivial][ILSEQ] +5C815C40 8140 [Trivial][ILSEQ] +5C815C5A 811A [Regular][ILSEQ] +5C815C5C 815C [Regular][ILSEQ] +5C815C5F 815C5F [Regular][ILSEQ] +5C815C61 8161 [Trivial][ILSEQ] +5C815C62 8108 [Regular][ILSEQ] +5C815C6E 810A [Regular][ILSEQ] +5C815C72 810D [Regular][ILSEQ] +5C815C74 8109 [Regular][ILSEQ] +5C815C7E 817E [Trivial][ILSEQ] +5C815C7F 817F [Trivial][ILSEQ] +5C815C80 8180 [Trivial][ILSEQ] +5C815C81 8181 [Trivial][ILSEQ] +5C815C9F 819F [Trivial][ILSEQ] +5C815CA0 81A0 [Trivial][ILSEQ] +5C815CA1 81A1 [Trivial][ILSEQ] +5C815CE0 81E0 [Trivial][ILSEQ] +5C815CEF 81EF [Trivial][ILSEQ] +5C815CF9 81F9 [Trivial][ILSEQ] +5C815CFA 81FA [Trivial][ILSEQ] +5C815CFC 81FC [Trivial][ILSEQ] +5C815CFD 81FD [Trivial][ILSEQ] +5C815CFE 81FE [Trivial][ILSEQ] +5C815CFF 81FF [Trivial][ILSEQ] +5C9F5C00 9F00 [Trivial][ILSEQ] +5C9F5C08 9F08 [Trivial][ILSEQ] +5C9F5C09 9F09 [Trivial][ILSEQ] +5C9F5C0A 9F0A [Trivial][ILSEQ] +5C9F5C0D 9F0D [Trivial][ILSEQ] +5C9F5C1A 9F1A [Trivial][ILSEQ] +5C9F5C22 9F22 [Trivial][ILSEQ] +5C9F5C25 9F5C25 [Regular][ILSEQ] +5C9F5C27 9F27 [Trivial][ILSEQ] +5C9F5C30 9F00 [Regular][ILSEQ] +5C9F5C3F 9F3F [Trivial][ILSEQ] +5C9F5C40 9F40 [Trivial][ILSEQ] +5C9F5C5A 9F1A [Regular][ILSEQ] +5C9F5C5C 9F5C [Regular][ILSEQ] +5C9F5C5F 9F5C5F [Regular][ILSEQ] +5C9F5C61 9F61 [Trivial][ILSEQ] +5C9F5C62 9F08 [Regular][ILSEQ] +5C9F5C6E 9F0A [Regular][ILSEQ] +5C9F5C72 9F0D [Regular][ILSEQ] +5C9F5C74 9F09 [Regular][ILSEQ] +5C9F5C7E 9F7E [Trivial][ILSEQ] +5C9F5C7F 9F7F [Trivial][ILSEQ] +5C9F5C80 9F80 [Trivial][ILSEQ] +5C9F5C81 9F81 [Trivial][ILSEQ] +5C9F5C9F 9F9F [Trivial][ILSEQ] +5C9F5CA0 9FA0 [Trivial][ILSEQ] +5C9F5CA1 9FA1 [Trivial][ILSEQ] +5C9F5CE0 9FE0 [Trivial][ILSEQ] +5C9F5CEF 9FEF [Trivial][ILSEQ] +5C9F5CF9 9FF9 [Trivial][ILSEQ] +5C9F5CFA 9FFA [Trivial][ILSEQ] +5C9F5CFC 9FFC [Trivial][ILSEQ] +5C9F5CFD 9FFD [Trivial][ILSEQ] +5C9F5CFE 9FFE [Trivial][ILSEQ] +5C9F5CFF 9FFF [Trivial][ILSEQ] +5CA05C00 A000 [Trivial][ILSEQ] +5CA05C08 A008 [Trivial][ILSEQ] +5CA05C09 A009 [Trivial][ILSEQ] +5CA05C0A A00A [Trivial][ILSEQ] +5CA05C0D A00D [Trivial][ILSEQ] +5CA05C1A A01A [Trivial][ILSEQ] +5CA05C22 A022 [Trivial][ILSEQ] +5CA05C25 A05C25 [Regular][ILSEQ] +5CA05C27 A027 [Trivial][ILSEQ] +5CA05C30 A000 [Regular][ILSEQ] +5CA05C3F A03F [Trivial][ILSEQ] +5CA05C40 A040 [Trivial][ILSEQ] +5CA05C5A A01A [Regular][ILSEQ] +5CA05C5C A05C [Regular][ILSEQ] +5CA05C5F A05C5F [Regular][ILSEQ] +5CA05C61 A061 [Trivial][ILSEQ] +5CA05C62 A008 [Regular][ILSEQ] +5CA05C6E A00A [Regular][ILSEQ] +5CA05C72 A00D [Regular][ILSEQ] +5CA05C74 A009 [Regular][ILSEQ] +5CA05C7E A07E [Trivial][ILSEQ] +5CA05C7F A07F [Trivial][ILSEQ] +5CA05C80 A080 [Trivial][ILSEQ] +5CA05C81 A081 [Trivial][ILSEQ] +5CA05C9F A09F [Trivial][ILSEQ] +5CA05CA0 A0A0 [Trivial][ILSEQ] +5CA05CA1 A0A1 [Trivial][ILSEQ] +5CA05CE0 A0E0 [Trivial][ILSEQ] +5CA05CEF A0EF [Trivial][ILSEQ] +5CA05CF9 A0F9 [Trivial][ILSEQ] +5CA05CFA A0FA [Trivial][ILSEQ] +5CA05CFC A0FC [Trivial][ILSEQ] +5CA05CFD A0FD [Trivial][ILSEQ] +5CA05CFE A0FE [Trivial][ILSEQ] +5CA05CFF A0FF [Trivial][ILSEQ] +5CA15C00 A100 [Trivial][ILSEQ] +5CA15C08 A108 [Trivial][ILSEQ] +5CA15C09 A109 [Trivial][ILSEQ] +5CA15C0A A10A [Trivial][ILSEQ] +5CA15C0D A10D [Trivial][ILSEQ] +5CA15C1A A11A [Trivial][ILSEQ] +5CA15C22 A122 [Trivial][ILSEQ] +5CA15C25 A15C25 [Regular][ILSEQ] +5CA15C27 A127 [Trivial][ILSEQ] +5CA15C30 A100 [Regular][ILSEQ] +5CA15C3F A13F [Trivial][ILSEQ] +5CA15C40 A140 [Trivial][ILSEQ] +5CA15C5A A11A [Regular][ILSEQ] +5CA15C5C A15C [Regular][ILSEQ] +5CA15C5F A15C5F [Regular][ILSEQ] +5CA15C61 A161 [Trivial][ILSEQ] +5CA15C62 A108 [Regular][ILSEQ] +5CA15C6E A10A [Regular][ILSEQ] +5CA15C72 A10D [Regular][ILSEQ] +5CA15C74 A109 [Regular][ILSEQ] +5CA15C7E A17E [Trivial][ILSEQ] +5CA15C7F A17F [Trivial][ILSEQ] +5CA15C80 A180 [Trivial][ILSEQ] +5CA15C81 A181 [Trivial][ILSEQ] +5CA15C9F A19F [Trivial][ILSEQ] +5CA15CA0 A1A0 [Trivial][ILSEQ] +5CA15CA1 A1A1 [Trivial][FIXED][USER] +5CA15CE0 A1E0 [Trivial][FIXED][USER] +5CA15CEF A1EF [Trivial][FIXED][USER] +5CA15CF9 A1F9 [Trivial][FIXED][USER] +5CA15CFA A1FA [Trivial][FIXED][USER] +5CA15CFC A1FC [Trivial][FIXED][USER] +5CA15CFD A1FD [Trivial][FIXED][USER] +5CA15CFE A1FE [Trivial][FIXED][USER] +5CA15CFF A1FF [Trivial][ILSEQ] +5CE05C00 E000 [Trivial][ILSEQ] +5CE05C08 E008 [Trivial][ILSEQ] +5CE05C09 E009 [Trivial][ILSEQ] +5CE05C0A E00A [Trivial][ILSEQ] +5CE05C0D E00D [Trivial][ILSEQ] +5CE05C1A E01A [Trivial][ILSEQ] +5CE05C22 E022 [Trivial][ILSEQ] +5CE05C25 E05C25 [Regular][ILSEQ] +5CE05C27 E027 [Trivial][ILSEQ] +5CE05C30 E000 [Regular][ILSEQ] +5CE05C3F E03F [Trivial][ILSEQ] +5CE05C40 E040 [Trivial][ILSEQ] +5CE05C5A E01A [Regular][ILSEQ] +5CE05C5C E05C [Regular][ILSEQ] +5CE05C5F E05C5F [Regular][ILSEQ] +5CE05C61 E061 [Trivial][ILSEQ] +5CE05C62 E008 [Regular][ILSEQ] +5CE05C6E E00A [Regular][ILSEQ] +5CE05C72 E00D [Regular][ILSEQ] +5CE05C74 E009 [Regular][ILSEQ] +5CE05C7E E07E [Trivial][ILSEQ] +5CE05C7F E07F [Trivial][ILSEQ] +5CE05C80 E080 [Trivial][ILSEQ] +5CE05C81 E081 [Trivial][ILSEQ] +5CE05C9F E09F [Trivial][ILSEQ] +5CE05CA0 E0A0 [Trivial][ILSEQ] +5CE05CA1 E0A1 [Trivial][FIXED][USER] +5CE05CE0 E0E0 [Trivial][FIXED][USER] +5CE05CEF E0EF [Trivial][FIXED][USER] +5CE05CF9 E0F9 [Trivial][FIXED][USER] +5CE05CFA E0FA [Trivial][FIXED][USER] +5CE05CFC E0FC [Trivial][FIXED][USER] +5CE05CFD E0FD [Trivial][FIXED][USER] +5CE05CFE E0FE [Trivial][FIXED][USER] +5CE05CFF E0FF [Trivial][ILSEQ] +5CEF5C00 EF00 [Trivial][ILSEQ] +5CEF5C08 EF08 [Trivial][ILSEQ] +5CEF5C09 EF09 [Trivial][ILSEQ] +5CEF5C0A EF0A [Trivial][ILSEQ] +5CEF5C0D EF0D [Trivial][ILSEQ] +5CEF5C1A EF1A [Trivial][ILSEQ] +5CEF5C22 EF22 [Trivial][ILSEQ] +5CEF5C25 EF5C25 [Regular][ILSEQ] +5CEF5C27 EF27 [Trivial][ILSEQ] +5CEF5C30 EF00 [Regular][ILSEQ] +5CEF5C3F EF3F [Trivial][ILSEQ] +5CEF5C40 EF40 [Trivial][ILSEQ] +5CEF5C5A EF1A [Regular][ILSEQ] +5CEF5C5C EF5C [Regular][ILSEQ] +5CEF5C5F EF5C5F [Regular][ILSEQ] +5CEF5C61 EF61 [Trivial][ILSEQ] +5CEF5C62 EF08 [Regular][ILSEQ] +5CEF5C6E EF0A [Regular][ILSEQ] +5CEF5C72 EF0D [Regular][ILSEQ] +5CEF5C74 EF09 [Regular][ILSEQ] +5CEF5C7E EF7E [Trivial][ILSEQ] +5CEF5C7F EF7F [Trivial][ILSEQ] +5CEF5C80 EF80 [Trivial][ILSEQ] +5CEF5C81 EF81 [Trivial][ILSEQ] +5CEF5C9F EF9F [Trivial][ILSEQ] +5CEF5CA0 EFA0 [Trivial][ILSEQ] +5CEF5CA1 EFA1 [Trivial][FIXED][USER] +5CEF5CE0 EFE0 [Trivial][FIXED][USER] +5CEF5CEF EFEF [Trivial][FIXED][USER] +5CEF5CF9 EFF9 [Trivial][FIXED][USER] +5CEF5CFA EFFA [Trivial][FIXED][USER] +5CEF5CFC EFFC [Trivial][FIXED][USER] +5CEF5CFD EFFD [Trivial][FIXED][USER] +5CEF5CFE EFFE [Trivial][FIXED][USER] +5CEF5CFF EFFF [Trivial][ILSEQ] +5CF95C00 F900 [Trivial][ILSEQ] +5CF95C08 F908 [Trivial][ILSEQ] +5CF95C09 F909 [Trivial][ILSEQ] +5CF95C0A F90A [Trivial][ILSEQ] +5CF95C0D F90D [Trivial][ILSEQ] +5CF95C1A F91A [Trivial][ILSEQ] +5CF95C22 F922 [Trivial][ILSEQ] +5CF95C25 F95C25 [Regular][ILSEQ] +5CF95C27 F927 [Trivial][ILSEQ] +5CF95C30 F900 [Regular][ILSEQ] +5CF95C3F F93F [Trivial][ILSEQ] +5CF95C40 F940 [Trivial][ILSEQ] +5CF95C5A F91A [Regular][ILSEQ] +5CF95C5C F95C [Regular][ILSEQ] +5CF95C5F F95C5F [Regular][ILSEQ] +5CF95C61 F961 [Trivial][ILSEQ] +5CF95C62 F908 [Regular][ILSEQ] +5CF95C6E F90A [Regular][ILSEQ] +5CF95C72 F90D [Regular][ILSEQ] +5CF95C74 F909 [Regular][ILSEQ] +5CF95C7E F97E [Trivial][ILSEQ] +5CF95C7F F97F [Trivial][ILSEQ] +5CF95C80 F980 [Trivial][ILSEQ] +5CF95C81 F981 [Trivial][ILSEQ] +5CF95C9F F99F [Trivial][ILSEQ] +5CF95CA0 F9A0 [Trivial][ILSEQ] +5CF95CA1 F9A1 [Trivial][ILSEQ] +5CF95CE0 F9E0 [Trivial][ILSEQ] +5CF95CEF F9EF [Trivial][ILSEQ] +5CF95CF9 F9F9 [Trivial][ILSEQ] +5CF95CFA F9FA [Trivial][ILSEQ] +5CF95CFC F9FC [Trivial][ILSEQ] +5CF95CFD F9FD [Trivial][ILSEQ] +5CF95CFE F9FE [Trivial][ILSEQ] +5CF95CFF F9FF [Trivial][ILSEQ] +5CFA5C00 FA00 [Trivial][ILSEQ] +5CFA5C08 FA08 [Trivial][ILSEQ] +5CFA5C09 FA09 [Trivial][ILSEQ] +5CFA5C0A FA0A [Trivial][ILSEQ] +5CFA5C0D FA0D [Trivial][ILSEQ] +5CFA5C1A FA1A [Trivial][ILSEQ] +5CFA5C22 FA22 [Trivial][ILSEQ] +5CFA5C25 FA5C25 [Regular][ILSEQ] +5CFA5C27 FA27 [Trivial][ILSEQ] +5CFA5C30 FA00 [Regular][ILSEQ] +5CFA5C3F FA3F [Trivial][ILSEQ] +5CFA5C40 FA40 [Trivial][ILSEQ] +5CFA5C5A FA1A [Regular][ILSEQ] +5CFA5C5C FA5C [Regular][ILSEQ] +5CFA5C5F FA5C5F [Regular][ILSEQ] +5CFA5C61 FA61 [Trivial][ILSEQ] +5CFA5C62 FA08 [Regular][ILSEQ] +5CFA5C6E FA0A [Regular][ILSEQ] +5CFA5C72 FA0D [Regular][ILSEQ] +5CFA5C74 FA09 [Regular][ILSEQ] +5CFA5C7E FA7E [Trivial][ILSEQ] +5CFA5C7F FA7F [Trivial][ILSEQ] +5CFA5C80 FA80 [Trivial][ILSEQ] +5CFA5C81 FA81 [Trivial][ILSEQ] +5CFA5C9F FA9F [Trivial][ILSEQ] +5CFA5CA0 FAA0 [Trivial][ILSEQ] +5CFA5CA1 FAA1 [Trivial][ILSEQ] +5CFA5CE0 FAE0 [Trivial][ILSEQ] +5CFA5CEF FAEF [Trivial][ILSEQ] +5CFA5CF9 FAF9 [Trivial][ILSEQ] +5CFA5CFA FAFA [Trivial][ILSEQ] +5CFA5CFC FAFC [Trivial][ILSEQ] +5CFA5CFD FAFD [Trivial][ILSEQ] +5CFA5CFE FAFE [Trivial][ILSEQ] +5CFA5CFF FAFF [Trivial][ILSEQ] +5CFC5C00 FC00 [Trivial][ILSEQ] +5CFC5C08 FC08 [Trivial][ILSEQ] +5CFC5C09 FC09 [Trivial][ILSEQ] +5CFC5C0A FC0A [Trivial][ILSEQ] +5CFC5C0D FC0D [Trivial][ILSEQ] +5CFC5C1A FC1A [Trivial][ILSEQ] +5CFC5C22 FC22 [Trivial][ILSEQ] +5CFC5C25 FC5C25 [Regular][ILSEQ] +5CFC5C27 FC27 [Trivial][ILSEQ] +5CFC5C30 FC00 [Regular][ILSEQ] +5CFC5C3F FC3F [Trivial][ILSEQ] +5CFC5C40 FC40 [Trivial][ILSEQ] +5CFC5C5A FC1A [Regular][ILSEQ] +5CFC5C5C FC5C [Regular][ILSEQ] +5CFC5C5F FC5C5F [Regular][ILSEQ] +5CFC5C61 FC61 [Trivial][ILSEQ] +5CFC5C62 FC08 [Regular][ILSEQ] +5CFC5C6E FC0A [Regular][ILSEQ] +5CFC5C72 FC0D [Regular][ILSEQ] +5CFC5C74 FC09 [Regular][ILSEQ] +5CFC5C7E FC7E [Trivial][ILSEQ] +5CFC5C7F FC7F [Trivial][ILSEQ] +5CFC5C80 FC80 [Trivial][ILSEQ] +5CFC5C81 FC81 [Trivial][ILSEQ] +5CFC5C9F FC9F [Trivial][ILSEQ] +5CFC5CA0 FCA0 [Trivial][ILSEQ] +5CFC5CA1 FCA1 [Trivial][ILSEQ] +5CFC5CE0 FCE0 [Trivial][ILSEQ] +5CFC5CEF FCEF [Trivial][ILSEQ] +5CFC5CF9 FCF9 [Trivial][ILSEQ] +5CFC5CFA FCFA [Trivial][ILSEQ] +5CFC5CFC FCFC [Trivial][ILSEQ] +5CFC5CFD FCFD [Trivial][ILSEQ] +5CFC5CFE FCFE [Trivial][ILSEQ] +5CFC5CFF FCFF [Trivial][ILSEQ] +5CFD5C00 FD00 [Trivial][ILSEQ] +5CFD5C08 FD08 [Trivial][ILSEQ] +5CFD5C09 FD09 [Trivial][ILSEQ] +5CFD5C0A FD0A [Trivial][ILSEQ] +5CFD5C0D FD0D [Trivial][ILSEQ] +5CFD5C1A FD1A [Trivial][ILSEQ] +5CFD5C22 FD22 [Trivial][ILSEQ] +5CFD5C25 FD5C25 [Regular][ILSEQ] +5CFD5C27 FD27 [Trivial][ILSEQ] +5CFD5C30 FD00 [Regular][ILSEQ] +5CFD5C3F FD3F [Trivial][ILSEQ] +5CFD5C40 FD40 [Trivial][ILSEQ] +5CFD5C5A FD1A [Regular][ILSEQ] +5CFD5C5C FD5C [Regular][ILSEQ] +5CFD5C5F FD5C5F [Regular][ILSEQ] +5CFD5C61 FD61 [Trivial][ILSEQ] +5CFD5C62 FD08 [Regular][ILSEQ] +5CFD5C6E FD0A [Regular][ILSEQ] +5CFD5C72 FD0D [Regular][ILSEQ] +5CFD5C74 FD09 [Regular][ILSEQ] +5CFD5C7E FD7E [Trivial][ILSEQ] +5CFD5C7F FD7F [Trivial][ILSEQ] +5CFD5C80 FD80 [Trivial][ILSEQ] +5CFD5C81 FD81 [Trivial][ILSEQ] +5CFD5C9F FD9F [Trivial][ILSEQ] +5CFD5CA0 FDA0 [Trivial][ILSEQ] +5CFD5CA1 FDA1 [Trivial][ILSEQ] +5CFD5CE0 FDE0 [Trivial][ILSEQ] +5CFD5CEF FDEF [Trivial][ILSEQ] +5CFD5CF9 FDF9 [Trivial][ILSEQ] +5CFD5CFA FDFA [Trivial][ILSEQ] +5CFD5CFC FDFC [Trivial][ILSEQ] +5CFD5CFD FDFD [Trivial][ILSEQ] +5CFD5CFE FDFE [Trivial][ILSEQ] +5CFD5CFF FDFF [Trivial][ILSEQ] +5CFE5C00 FE00 [Trivial][ILSEQ] +5CFE5C08 FE08 [Trivial][ILSEQ] +5CFE5C09 FE09 [Trivial][ILSEQ] +5CFE5C0A FE0A [Trivial][ILSEQ] +5CFE5C0D FE0D [Trivial][ILSEQ] +5CFE5C1A FE1A [Trivial][ILSEQ] +5CFE5C22 FE22 [Trivial][ILSEQ] +5CFE5C25 FE5C25 [Regular][ILSEQ] +5CFE5C27 FE27 [Trivial][ILSEQ] +5CFE5C30 FE00 [Regular][ILSEQ] +5CFE5C3F FE3F [Trivial][ILSEQ] +5CFE5C40 FE40 [Trivial][ILSEQ] +5CFE5C5A FE1A [Regular][ILSEQ] +5CFE5C5C FE5C [Regular][ILSEQ] +5CFE5C5F FE5C5F [Regular][ILSEQ] +5CFE5C61 FE61 [Trivial][ILSEQ] +5CFE5C62 FE08 [Regular][ILSEQ] +5CFE5C6E FE0A [Regular][ILSEQ] +5CFE5C72 FE0D [Regular][ILSEQ] +5CFE5C74 FE09 [Regular][ILSEQ] +5CFE5C7E FE7E [Trivial][ILSEQ] +5CFE5C7F FE7F [Trivial][ILSEQ] +5CFE5C80 FE80 [Trivial][ILSEQ] +5CFE5C81 FE81 [Trivial][ILSEQ] +5CFE5C9F FE9F [Trivial][ILSEQ] +5CFE5CA0 FEA0 [Trivial][ILSEQ] +5CFE5CA1 FEA1 [Trivial][ILSEQ] +5CFE5CE0 FEE0 [Trivial][ILSEQ] +5CFE5CEF FEEF [Trivial][ILSEQ] +5CFE5CF9 FEF9 [Trivial][ILSEQ] +5CFE5CFA FEFA [Trivial][ILSEQ] +5CFE5CFC FEFC [Trivial][ILSEQ] +5CFE5CFD FEFD [Trivial][ILSEQ] +5CFE5CFE FEFE [Trivial][ILSEQ] +5CFE5CFF FEFF [Trivial][ILSEQ] +5CFF5C00 FF00 [Trivial][ILSEQ] +5CFF5C08 FF08 [Trivial][ILSEQ] +5CFF5C09 FF09 [Trivial][ILSEQ] +5CFF5C0A FF0A [Trivial][ILSEQ] +5CFF5C0D FF0D [Trivial][ILSEQ] +5CFF5C1A FF1A [Trivial][ILSEQ] +5CFF5C22 FF22 [Trivial][ILSEQ] +5CFF5C25 FF5C25 [Regular][ILSEQ] +5CFF5C27 FF27 [Trivial][ILSEQ] +5CFF5C30 FF00 [Regular][ILSEQ] +5CFF5C3F FF3F [Trivial][ILSEQ] +5CFF5C40 FF40 [Trivial][ILSEQ] +5CFF5C5A FF1A [Regular][ILSEQ] +5CFF5C5C FF5C [Regular][ILSEQ] +5CFF5C5F FF5C5F [Regular][ILSEQ] +5CFF5C61 FF61 [Trivial][ILSEQ] +5CFF5C62 FF08 [Regular][ILSEQ] +5CFF5C6E FF0A [Regular][ILSEQ] +5CFF5C72 FF0D [Regular][ILSEQ] +5CFF5C74 FF09 [Regular][ILSEQ] +5CFF5C7E FF7E [Trivial][ILSEQ] +5CFF5C7F FF7F [Trivial][ILSEQ] +5CFF5C80 FF80 [Trivial][ILSEQ] +5CFF5C81 FF81 [Trivial][ILSEQ] +5CFF5C9F FF9F [Trivial][ILSEQ] +5CFF5CA0 FFA0 [Trivial][ILSEQ] +5CFF5CA1 FFA1 [Trivial][ILSEQ] +5CFF5CE0 FFE0 [Trivial][ILSEQ] +5CFF5CEF FFEF [Trivial][ILSEQ] +5CFF5CF9 FFF9 [Trivial][ILSEQ] +5CFF5CFA FFFA [Trivial][ILSEQ] +5CFF5CFC FFFC [Trivial][ILSEQ] +5CFF5CFD FFFD [Trivial][ILSEQ] +5CFF5CFE FFFE [Trivial][ILSEQ] +5CFF5CFF FFFF [Trivial][ILSEQ] +DROP TABLE t1; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP FUNCTION unescape; +DROP FUNCTION unescape_type; +DROP FUNCTION wellformedness; +DROP FUNCTION mysql_real_escape_string_generated; +DROP FUNCTION iswellformed; +DROP TABLE allbytes; +# End of ctype_backslash.inc +# +# End of 10.0 tests +# diff --git a/mysql-test/r/ctype_gbk.result b/mysql-test/r/ctype_gbk.result index 9da3cf92b1f..2d31a15bb62 100644 --- a/mysql-test/r/ctype_gbk.result +++ b/mysql-test/r/ctype_gbk.result @@ -129,6 +129,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +gbk_chinese_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; create table t1 engine=innodb select repeat('a',50) as c1; alter table t1 add index(c1(5)); insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111'); @@ -186,6 +237,87 @@ a hex(b) c 3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 DROP TABLE t1; +drop table if exists t1; +create table t1 select repeat('a',10) as c1; +delete from t1; +insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F); +insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F); +insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F); +insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F); +insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F); +insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F); +SELECT GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM t1 GROUP BY c1; +GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) + 20 +! 21 +" 22 +# 23 +$ 24 +% 25 +& 26 +' 27 +( 28 +) 29 +* 2A ++ 2B +, 2C +- 2D +. 2E +/ 2F +0 30 +1 31 +2 32 +3 33 +4 34 +5 35 +6 36 +7 37 +8 38 +9 39 +: 3A +; 3B +< 3C += 3D +> 3E +? 3F +@ 40 +Aa 41,61 +Bb 42,62 +Cc 43,63 +Dd 44,64 +Ee 45,65 +Ff 46,66 +Gg 47,67 +Hh 48,68 +Ii 49,69 +Jj 4A,6A +Kk 4B,6B +Ll 4C,6C +Mm 4D,6D +Nn 4E,6E +Oo 4F,6F +Pp 50,70 +Qq 51,71 +Rr 52,72 +Ss 53,73 +Tt 54,74 +Uu 55,75 +Vv 56,76 +Ww 57,77 +Xx 58,78 +Yy~ 59,79,7E +Zz 5A,7A +] 5D +[ 5B +\ 5C +^ 5E +_ 5F +` 60 +{ 7B +| 7C +} 7D + 7F +drop table t1; SET collation_connection='gbk_bin'; create table t1 select repeat('a',4000) a; delete from t1; @@ -213,6 +345,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +gbk_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; create table t1 engine=innodb select repeat('a',50) as c1; alter table t1 add index(c1(5)); insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111'); @@ -623,3 +806,4161 @@ DROP TABLE t1; # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set names gbk; +select @@collation_connection; +@@collation_connection +gbk_chinese_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET gbk NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +41 +SELECT HEX(ws) FROM t2; +HEX(ws) +41 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET gbk NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +4141414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +4141414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +41414141412020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +41414141412020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +41 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +414243 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +4142 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +414243 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +4142432020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +41 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +4142 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +414220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +41422020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +4142202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +41422020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +41 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +4142 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +414243 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +41424320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +41 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +4142 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +414243 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +41424320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +gbk_chinese_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +41 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +414243 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +4142 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +414243 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +4142432020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020434241 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +BEBDBCDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDFBCBDBE +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +gbk_chinese_ci +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +4141 +select hex(weight_string(cast(0xA1A1 as char))); +hex(weight_string(cast(0xA1A1 as char))) +810B +select hex(weight_string(cast(0xA1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1 as char) as char(1))) +810B +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))) +810B +select hex(weight_string(cast(0xA1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1 as char) as char(3))) +810B2020 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))) +810B810B20 +select hex(weight_string(cast(0x40A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1 as char) as char(3))) +40810B20 +select hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))) +40810B810B +select hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))) +40810B810B +select hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))) +4040810B +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)) +81 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)) +810B +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)) +810B81 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)) +810B810B +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)) +810B810B20 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)) +810B810B202020202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)) +81 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)) +810B +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)) +810B81 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)) +810B810B +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)) +810B810B81 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)) +810B810B810B20202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)) +81 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)) +810B +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)) +810B81 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)) +810B810B +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)) +810B810B81 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)) +810B810B810B20202020202020202020202020202020202020 +select collation(cast(0x8140 as char)); +collation(cast(0x8140 as char)) +gbk_chinese_ci +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +4141 +select hex(weight_string(cast(0x8140 as char))); +hex(weight_string(cast(0x8140 as char))) +A2CD +select hex(weight_string(cast(0x8140 as char) as char(1))); +hex(weight_string(cast(0x8140 as char) as char(1))) +A2CD +select hex(weight_string(cast(0x81408140 as char) as char(1))); +hex(weight_string(cast(0x81408140 as char) as char(1))) +A2CD +select hex(weight_string(cast(0x8140 as char) as char(3))); +hex(weight_string(cast(0x8140 as char) as char(3))) +A2CD2020 +select hex(weight_string(cast(0x81408140 as char) as char(3))); +hex(weight_string(cast(0x81408140 as char) as char(3))) +A2CDA2CD20 +select hex(weight_string(cast(0x408140 as char) as char(3))); +hex(weight_string(cast(0x408140 as char) as char(3))) +40A2CD20 +select hex(weight_string(cast(0x4081408140 as char) as char(3))); +hex(weight_string(cast(0x4081408140 as char) as char(3))) +40A2CDA2CD +select hex(weight_string(cast(0x40814081408140 as char) as char(3))); +hex(weight_string(cast(0x40814081408140 as char) as char(3))) +40A2CDA2CD +select hex(weight_string(cast(0x4040814081408140 as char) as char(3))); +hex(weight_string(cast(0x4040814081408140 as char) as char(3))) +4040A2CD +select hex(weight_string(cast(0x814081408140 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 2, 0xC0)) +A2 +select hex(weight_string(cast(0x814081408140 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 2, 0xC0)) +A2CD +select hex(weight_string(cast(0x814081408140 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 2, 0xC0)) +A2CDA2 +select hex(weight_string(cast(0x814081408140 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 2, 0xC0)) +A2CDA2CD +select hex(weight_string(cast(0x814081408140 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 2, 0xC0)) +A2CDA2CD20 +select hex(weight_string(cast(0x814081408140 as char),25, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 2, 0xC0)) +A2CDA2CD202020202020202020202020202020202020202020 +select hex(weight_string(cast(0x814081408140 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 3, 0xC0)) +A2 +select hex(weight_string(cast(0x814081408140 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 3, 0xC0)) +A2CD +select hex(weight_string(cast(0x814081408140 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 3, 0xC0)) +A2CDA2 +select hex(weight_string(cast(0x814081408140 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 3, 0xC0)) +A2CDA2CD +select hex(weight_string(cast(0x814081408140 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 3, 0xC0)) +A2CDA2CDA2 +select hex(weight_string(cast(0x814081408140 as char),25, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 3, 0xC0)) +A2CDA2CDA2CD20202020202020202020202020202020202020 +select hex(weight_string(cast(0x814081408140 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 4, 0xC0)) +A2 +select hex(weight_string(cast(0x814081408140 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 4, 0xC0)) +A2CD +select hex(weight_string(cast(0x814081408140 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 4, 0xC0)) +A2CDA2 +select hex(weight_string(cast(0x814081408140 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 4, 0xC0)) +A2CDA2CD +select hex(weight_string(cast(0x814081408140 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 4, 0xC0)) +A2CDA2CDA2 +select hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0)) +A2CDA2CDA2CD20202020202020202020202020202020202020 +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +gbk_chinese_ci +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +4141 +select hex(weight_string(cast(0x8EA1 as char))); +hex(weight_string(cast(0x8EA1 as char))) +8E08 +select hex(weight_string(cast(0x8EA1 as char) as char(1))); +hex(weight_string(cast(0x8EA1 as char) as char(1))) +8E08 +select hex(weight_string(cast(0x8EA18EA1 as char) as char(1))); +hex(weight_string(cast(0x8EA18EA1 as char) as char(1))) +8E08 +select hex(weight_string(cast(0x8EA1 as char) as char(3))); +hex(weight_string(cast(0x8EA1 as char) as char(3))) +8E082020 +select hex(weight_string(cast(0x8EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x8EA18EA1 as char) as char(3))) +8E088E0820 +select hex(weight_string(cast(0x408EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA1 as char) as char(3))) +408E0820 +select hex(weight_string(cast(0x408EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA18EA1 as char) as char(3))) +408E088E08 +select hex(weight_string(cast(0x408EA18EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA18EA18EA1 as char) as char(3))) +408E088E08 +select hex(weight_string(cast(0x40408EA18EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x40408EA18EA18EA1 as char) as char(3))) +40408E08 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 2, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 2, 0xC0)) +8E08 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 2, 0xC0)) +8E088E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 2, 0xC0)) +8E088E08 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 2, 0xC0)) +8E088E0820 +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 2, 0xC0)) +8E088E08202020202020202020202020202020202020202020 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 3, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 3, 0xC0)) +8E08 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 3, 0xC0)) +8E088E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 3, 0xC0)) +8E088E08 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 3, 0xC0)) +8E088E088E +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 3, 0xC0)) +8E088E088E0820202020202020202020202020202020202020 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 4, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 4, 0xC0)) +8E08 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 4, 0xC0)) +8E088E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 4, 0xC0)) +8E088E08 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 4, 0xC0)) +8E088E088E +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0)) +8E088E088E0820202020202020202020202020202020202020 +set collation_connection=gbk_bin; +select @@collation_connection; +@@collation_connection +gbk_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET gbk COLLATE gbk_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +61 +SELECT HEX(ws) FROM t2; +HEX(ws) +61 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET gbk COLLATE gbk_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +6161616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +6161616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +61616161612020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +61616161612020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +61 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +616263 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +6162 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +616263 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +6162632020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +61 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +6162 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +616220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +61622020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +6162202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +61622020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +61 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +6162 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +616263 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +61626320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +61 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +6162 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +616263 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +61626320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +gbk_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +61 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +616263 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +6162 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +616263 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +6162632020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020636261 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +9E9D9CDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDF9C9D9E +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +gbk_bin +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +6141 +select hex(weight_string(cast(0xA1A1 as char))); +hex(weight_string(cast(0xA1A1 as char))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1 as char) as char(3))) +A1A12020 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))) +A1A1A1A120 +select hex(weight_string(cast(0x40A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1 as char) as char(3))) +40A1A120 +select hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))) +4040A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)) +A1A1A1A120 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)) +A1A1A1A1202020202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +select collation(cast(0x8140 as char)); +collation(cast(0x8140 as char)) +gbk_bin +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +6141 +select hex(weight_string(cast(0x8140 as char))); +hex(weight_string(cast(0x8140 as char))) +8140 +select hex(weight_string(cast(0x8140 as char) as char(1))); +hex(weight_string(cast(0x8140 as char) as char(1))) +8140 +select hex(weight_string(cast(0x81408140 as char) as char(1))); +hex(weight_string(cast(0x81408140 as char) as char(1))) +8140 +select hex(weight_string(cast(0x8140 as char) as char(3))); +hex(weight_string(cast(0x8140 as char) as char(3))) +81402020 +select hex(weight_string(cast(0x81408140 as char) as char(3))); +hex(weight_string(cast(0x81408140 as char) as char(3))) +8140814020 +select hex(weight_string(cast(0x408140 as char) as char(3))); +hex(weight_string(cast(0x408140 as char) as char(3))) +40814020 +select hex(weight_string(cast(0x4081408140 as char) as char(3))); +hex(weight_string(cast(0x4081408140 as char) as char(3))) +4081408140 +select hex(weight_string(cast(0x40814081408140 as char) as char(3))); +hex(weight_string(cast(0x40814081408140 as char) as char(3))) +4081408140 +select hex(weight_string(cast(0x4040814081408140 as char) as char(3))); +hex(weight_string(cast(0x4040814081408140 as char) as char(3))) +40408140 +select hex(weight_string(cast(0x814081408140 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 2, 0xC0)) +81 +select hex(weight_string(cast(0x814081408140 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 2, 0xC0)) +8140 +select hex(weight_string(cast(0x814081408140 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 2, 0xC0)) +814081 +select hex(weight_string(cast(0x814081408140 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 2, 0xC0)) +81408140 +select hex(weight_string(cast(0x814081408140 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 2, 0xC0)) +8140814020 +select hex(weight_string(cast(0x814081408140 as char),25, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 2, 0xC0)) +81408140202020202020202020202020202020202020202020 +select hex(weight_string(cast(0x814081408140 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 3, 0xC0)) +81 +select hex(weight_string(cast(0x814081408140 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 3, 0xC0)) +8140 +select hex(weight_string(cast(0x814081408140 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 3, 0xC0)) +814081 +select hex(weight_string(cast(0x814081408140 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 3, 0xC0)) +81408140 +select hex(weight_string(cast(0x814081408140 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 3, 0xC0)) +8140814081 +select hex(weight_string(cast(0x814081408140 as char),25, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 3, 0xC0)) +81408140814020202020202020202020202020202020202020 +select hex(weight_string(cast(0x814081408140 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 4, 0xC0)) +81 +select hex(weight_string(cast(0x814081408140 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 4, 0xC0)) +8140 +select hex(weight_string(cast(0x814081408140 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 4, 0xC0)) +814081 +select hex(weight_string(cast(0x814081408140 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 4, 0xC0)) +81408140 +select hex(weight_string(cast(0x814081408140 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 4, 0xC0)) +8140814081 +select hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0)) +81408140814020202020202020202020202020202020202020 +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +gbk_bin +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +6141 +select hex(weight_string(cast(0x8EA1 as char))); +hex(weight_string(cast(0x8EA1 as char))) +8EA1 +select hex(weight_string(cast(0x8EA1 as char) as char(1))); +hex(weight_string(cast(0x8EA1 as char) as char(1))) +8EA1 +select hex(weight_string(cast(0x8EA18EA1 as char) as char(1))); +hex(weight_string(cast(0x8EA18EA1 as char) as char(1))) +8EA1 +select hex(weight_string(cast(0x8EA1 as char) as char(3))); +hex(weight_string(cast(0x8EA1 as char) as char(3))) +8EA12020 +select hex(weight_string(cast(0x8EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x8EA18EA1 as char) as char(3))) +8EA18EA120 +select hex(weight_string(cast(0x408EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA1 as char) as char(3))) +408EA120 +select hex(weight_string(cast(0x408EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA18EA1 as char) as char(3))) +408EA18EA1 +select hex(weight_string(cast(0x408EA18EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA18EA18EA1 as char) as char(3))) +408EA18EA1 +select hex(weight_string(cast(0x40408EA18EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x40408EA18EA18EA1 as char) as char(3))) +40408EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 2, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 2, 0xC0)) +8EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 2, 0xC0)) +8EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 2, 0xC0)) +8EA18EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 2, 0xC0)) +8EA18EA120 +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 2, 0xC0)) +8EA18EA1202020202020202020202020202020202020202020 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 3, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 3, 0xC0)) +8EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 3, 0xC0)) +8EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 3, 0xC0)) +8EA18EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 3, 0xC0)) +8EA18EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 3, 0xC0)) +8EA18EA18EA120202020202020202020202020202020202020 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 4, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 4, 0xC0)) +8EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 4, 0xC0)) +8EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 4, 0xC0)) +8EA18EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 4, 0xC0)) +8EA18EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0)) +8EA18EA18EA120202020202020202020202020202020202020 +# +# End of 5.6 tests +# +# +# Start of 10.0 tests +# +# Start of ctype_unescape.inc +SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection'; +PREPARE stmt FROM @query; +EXECUTE stmt; +CHARSET('test') @@character_set_client @@character_set_connection +gbk gbk gbk +DEALLOCATE PREPARE stmt; +CREATE TABLE allbytes (a VARBINARY(10)); +# Using selected bytes combinations +CREATE TABLE halfs (a INT); +INSERT INTO halfs VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07); +INSERT INTO halfs VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +CREATE TEMPORARY TABLE bytes (a BINARY(1), KEY(a)) ENGINE=MyISAM; +INSERT INTO bytes SELECT CHAR((t1.a << 4) | t2.a USING BINARY) FROM halfs t1, halfs t2; +DROP TABLE halfs; +CREATE TABLE selected_bytes (a VARBINARY(10)); +INSERT INTO selected_bytes (a) VALUES ('\0'),('\b'),('\t'),('\r'),('\n'),('\Z'); +INSERT INTO selected_bytes (a) VALUES ('0'),('b'),('t'),('r'),('n'),('Z'); +INSERT INTO selected_bytes (a) VALUES ('\\'),('_'),('%'),(0x22),(0x27); +INSERT INTO selected_bytes (a) VALUES ('a'); +INSERT INTO selected_bytes (a) VALUES +(0x3F), # 7bit +(0x40), # 7bit mbtail +(0x7E), # 7bit mbtail nonascii-8bit +(0x7F), # 7bit nonascii-8bit +(0x80), # mbtail bad-mb +(0x81), # mbhead mbtail +(0x9F), # mbhead mbtail bad-mb +(0xA0), # mbhead mbtail bad-mb +(0xA1), # mbhead mbtail nonascii-8bit +(0xE0), # mbhead mbtai +(0xEF), # mbhead mbtail +(0xF9), # mbhead mbtail +(0xFA), # mbhead mbtail bad-mb +(0xFC), # mbhead mbtail bad-mb +(0xFD), # mbhead mbtail bad-mb +(0xFE), # mbhead mbtial bad-mb +(0xFF); +INSERT INTO allbytes (a) SELECT a FROM bytes; +INSERT INTO allbytes (a) SELECT CONCAT(t1.a,t2.a) FROM selected_bytes t1,selected_bytes t2; +INSERT INTO allbytes (a) SELECT CONCAT(0x5C,t1.a,t2.a) FROM selected_bytes t1,selected_bytes t2; +INSERT INTO allbytes (a) SELECT CONCAT(0x5C,t1.a,0x5C,t2.a) FROM selected_bytes t1,selected_bytes t2; +DROP TABLE selected_bytes; +DELETE FROM allbytes WHERE +OCTET_LENGTH(a)>1 AND +LOCATE(0x5C,a)=0 AND +a NOT LIKE '%\'%' AND + a NOT LIKE '%"%'; +CREATE PROCEDURE p1(val VARBINARY(10)) +BEGIN +DECLARE EXIT HANDLER FOR SQLSTATE '42000' INSERT INTO t1 (a,b) VALUES(val,NULL); +SET @query=CONCAT(_binary"INSERT INTO t1 (a,b) VALUES (0x",HEX(val),",'",val,"')"); +PREPARE stmt FROM @query; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; +END// +CREATE PROCEDURE p2() +BEGIN +DECLARE val VARBINARY(10); +DECLARE done INT DEFAULT FALSE; +DECLARE stmt CURSOR FOR SELECT a FROM allbytes; +DECLARE CONTINUE HANDLER FOR NOT FOUND SET done=TRUE; +OPEN stmt; +read_loop1: LOOP +FETCH stmt INTO val; +IF done THEN +LEAVE read_loop1; +END IF; +CALL p1(val); +END LOOP; +CLOSE stmt; +END// +CREATE FUNCTION iswellformed(a VARBINARY(256)) RETURNS INT RETURN a=BINARY CONVERT(a USING gbk);// +CREATE FUNCTION unescape(a VARBINARY(256)) RETURNS VARBINARY(256) +BEGIN +# We need to do it in a way to avoid producing new escape sequences +# First, enclose all known escsape sequences to '{{xx}}' + # - Backslash not followed by a LIKE pattern characters _ and % +# - Double escapes +# This uses PCRE Branch Reset Groups: (?|(alt1)|(alt2)|(alt3)). +# So '\\1' in the last argument always means the match, no matter +# which alternative it came from. +SET a=REGEXP_REPLACE(a,'(?|(\\\\[^_%])|(\\x{27}\\x{27}))','{{\\1}}'); +# Now unescape all enclosed standard escape sequences +SET a=REPLACE(a,'{{\\0}}', '\0'); +SET a=REPLACE(a,'{{\\b}}', '\b'); +SET a=REPLACE(a,'{{\\t}}', '\t'); +SET a=REPLACE(a,'{{\\r}}', '\r'); +SET a=REPLACE(a,'{{\\n}}', '\n'); +SET a=REPLACE(a,'{{\\Z}}', '\Z'); +SET a=REPLACE(a,'{{\\\'}}', '\''); +# Unescape double quotes +SET a=REPLACE(a,'{{\'\'}}', '\''); + # Unescape the rest: all other \x sequences mean just 'x' + SET a=REGEXP_REPLACE(a, '{{\\\\(.|\\R)}}', '\\1'); + RETURN a; +END// +CREATE FUNCTION unescape_type(a VARBINARY(256),b VARBINARY(256)) RETURNS VARBINARY(256) +BEGIN +RETURN CASE +WHEN b IS NULL THEN '[SyntErr]' + WHEN a=b THEN CASE +WHEN OCTET_LENGTH(a)=1 THEN '[Preserve]' + WHEN a RLIKE '\\\\[_%]' THEN '[Preserve][LIKE]' + WHEN a RLIKE '^[[:ascii:]]+$' THEN '[Preserve][ASCII]' + ELSE '[Preserv][MB]' END +WHEN REPLACE(a,0x5C,'')=b THEN '[Trivial]' + WHEN UNESCAPE(a)=b THEN '[Regular]' + ELSE '[Special]' END; +END// +CREATE FUNCTION wellformedness(a VARBINARY(256), b VARBINARY(256)) +RETURNS VARBINARY(256) +BEGIN +RETURN CASE +WHEN b IS NULL THEN '' + WHEN NOT iswellformed(a) AND iswellformed(b) THEN '[FIXED]' + WHEN iswellformed(a) AND NOT iswellformed(b) THEN '[BROKE]' + WHEN NOT iswellformed(a) AND NOT iswellformed(b) THEN '[ILSEQ]' + ELSE '' + END; +END// +CREATE FUNCTION mysql_real_escape_string_generated(a VARBINARY(256)) +RETURNS VARBINARY(256) +BEGIN +DECLARE a1 BINARY(1) DEFAULT SUBSTR(a,1,1); +DECLARE a2 BINARY(1) DEFAULT SUBSTR(a,2,1); +DECLARE a3 BINARY(1) DEFAULT SUBSTR(a,3,1); +DECLARE a4 BINARY(1) DEFAULT SUBSTR(a,4,1); +DECLARE a2a4 BINARY(2) DEFAULT CONCAT(a2,a4); +RETURN CASE +WHEN (a1=0x5C) AND +(a3=0x5C) AND +(a2>0x7F) AND +(a4 NOT IN ('_','%','0','t','r','n','Z')) AND +iswellformed(a2a4) THEN '[USER]' + ELSE '' + END; +END// +CREATE TABLE t1 (a VARBINARY(10),b VARBINARY(10)); +CALL p2(); +SELECT HEX(a),HEX(b), +CONCAT(unescape_type(a,b), +wellformedness(a,b), +mysql_real_escape_string_generated(a), +IF(UNESCAPE(a)<>b,CONCAT('[BAD',HEX(UNESCAPE(a)),']'),'')) AS comment +FROM t1 ORDER BY LENGTH(a),a; +HEX(a) HEX(b) comment +00 00 [Preserve] +01 01 [Preserve] +02 02 [Preserve] +03 03 [Preserve] +04 04 [Preserve] +05 05 [Preserve] +06 06 [Preserve] +07 07 [Preserve] +08 08 [Preserve] +09 09 [Preserve] +0A 0A [Preserve] +0B 0B [Preserve] +0C 0C [Preserve] +0D 0D [Preserve] +0E 0E [Preserve] +0F 0F [Preserve] +10 10 [Preserve] +11 11 [Preserve] +12 12 [Preserve] +13 13 [Preserve] +14 14 [Preserve] +15 15 [Preserve] +16 16 [Preserve] +17 17 [Preserve] +18 18 [Preserve] +19 19 [Preserve] +1A 1A [Preserve] +1B 1B [Preserve] +1C 1C [Preserve] +1D 1D [Preserve] +1E 1E [Preserve] +1F 1F [Preserve] +20 20 [Preserve] +21 21 [Preserve] +22 22 [Preserve] +23 23 [Preserve] +24 24 [Preserve] +25 25 [Preserve] +26 26 [Preserve] +27 NULL [SyntErr] +28 28 [Preserve] +29 29 [Preserve] +2A 2A [Preserve] +2B 2B [Preserve] +2C 2C [Preserve] +2D 2D [Preserve] +2E 2E [Preserve] +2F 2F [Preserve] +30 30 [Preserve] +31 31 [Preserve] +32 32 [Preserve] +33 33 [Preserve] +34 34 [Preserve] +35 35 [Preserve] +36 36 [Preserve] +37 37 [Preserve] +38 38 [Preserve] +39 39 [Preserve] +3A 3A [Preserve] +3B 3B [Preserve] +3C 3C [Preserve] +3D 3D [Preserve] +3E 3E [Preserve] +3F 3F [Preserve] +40 40 [Preserve] +41 41 [Preserve] +42 42 [Preserve] +43 43 [Preserve] +44 44 [Preserve] +45 45 [Preserve] +46 46 [Preserve] +47 47 [Preserve] +48 48 [Preserve] +49 49 [Preserve] +4A 4A [Preserve] +4B 4B [Preserve] +4C 4C [Preserve] +4D 4D [Preserve] +4E 4E [Preserve] +4F 4F [Preserve] +50 50 [Preserve] +51 51 [Preserve] +52 52 [Preserve] +53 53 [Preserve] +54 54 [Preserve] +55 55 [Preserve] +56 56 [Preserve] +57 57 [Preserve] +58 58 [Preserve] +59 59 [Preserve] +5A 5A [Preserve] +5B 5B [Preserve] +5C NULL [SyntErr] +5D 5D [Preserve] +5E 5E [Preserve] +5F 5F [Preserve] +60 60 [Preserve] +61 61 [Preserve] +62 62 [Preserve] +63 63 [Preserve] +64 64 [Preserve] +65 65 [Preserve] +66 66 [Preserve] +67 67 [Preserve] +68 68 [Preserve] +69 69 [Preserve] +6A 6A [Preserve] +6B 6B [Preserve] +6C 6C [Preserve] +6D 6D [Preserve] +6E 6E [Preserve] +6F 6F [Preserve] +70 70 [Preserve] +71 71 [Preserve] +72 72 [Preserve] +73 73 [Preserve] +74 74 [Preserve] +75 75 [Preserve] +76 76 [Preserve] +77 77 [Preserve] +78 78 [Preserve] +79 79 [Preserve] +7A 7A [Preserve] +7B 7B [Preserve] +7C 7C [Preserve] +7D 7D [Preserve] +7E 7E [Preserve] +7F 7F [Preserve] +80 80 [Preserve][ILSEQ] +81 81 [Preserve][ILSEQ] +82 82 [Preserve][ILSEQ] +83 83 [Preserve][ILSEQ] +84 84 [Preserve][ILSEQ] +85 85 [Preserve][ILSEQ] +86 86 [Preserve][ILSEQ] +87 87 [Preserve][ILSEQ] +88 88 [Preserve][ILSEQ] +89 89 [Preserve][ILSEQ] +8A 8A [Preserve][ILSEQ] +8B 8B [Preserve][ILSEQ] +8C 8C [Preserve][ILSEQ] +8D 8D [Preserve][ILSEQ] +8E 8E [Preserve][ILSEQ] +8F 8F [Preserve][ILSEQ] +90 90 [Preserve][ILSEQ] +91 91 [Preserve][ILSEQ] +92 92 [Preserve][ILSEQ] +93 93 [Preserve][ILSEQ] +94 94 [Preserve][ILSEQ] +95 95 [Preserve][ILSEQ] +96 96 [Preserve][ILSEQ] +97 97 [Preserve][ILSEQ] +98 98 [Preserve][ILSEQ] +99 99 [Preserve][ILSEQ] +9A 9A [Preserve][ILSEQ] +9B 9B [Preserve][ILSEQ] +9C 9C [Preserve][ILSEQ] +9D 9D [Preserve][ILSEQ] +9E 9E [Preserve][ILSEQ] +9F 9F [Preserve][ILSEQ] +A0 A0 [Preserve][ILSEQ] +A1 A1 [Preserve][ILSEQ] +A2 A2 [Preserve][ILSEQ] +A3 A3 [Preserve][ILSEQ] +A4 A4 [Preserve][ILSEQ] +A5 A5 [Preserve][ILSEQ] +A6 A6 [Preserve][ILSEQ] +A7 A7 [Preserve][ILSEQ] +A8 A8 [Preserve][ILSEQ] +A9 A9 [Preserve][ILSEQ] +AA AA [Preserve][ILSEQ] +AB AB [Preserve][ILSEQ] +AC AC [Preserve][ILSEQ] +AD AD [Preserve][ILSEQ] +AE AE [Preserve][ILSEQ] +AF AF [Preserve][ILSEQ] +B0 B0 [Preserve][ILSEQ] +B1 B1 [Preserve][ILSEQ] +B2 B2 [Preserve][ILSEQ] +B3 B3 [Preserve][ILSEQ] +B4 B4 [Preserve][ILSEQ] +B5 B5 [Preserve][ILSEQ] +B6 B6 [Preserve][ILSEQ] +B7 B7 [Preserve][ILSEQ] +B8 B8 [Preserve][ILSEQ] +B9 B9 [Preserve][ILSEQ] +BA BA [Preserve][ILSEQ] +BB BB [Preserve][ILSEQ] +BC BC [Preserve][ILSEQ] +BD BD [Preserve][ILSEQ] +BE BE [Preserve][ILSEQ] +BF BF [Preserve][ILSEQ] +C0 C0 [Preserve][ILSEQ] +C1 C1 [Preserve][ILSEQ] +C2 C2 [Preserve][ILSEQ] +C3 C3 [Preserve][ILSEQ] +C4 C4 [Preserve][ILSEQ] +C5 C5 [Preserve][ILSEQ] +C6 C6 [Preserve][ILSEQ] +C7 C7 [Preserve][ILSEQ] +C8 C8 [Preserve][ILSEQ] +C9 C9 [Preserve][ILSEQ] +CA CA [Preserve][ILSEQ] +CB CB [Preserve][ILSEQ] +CC CC [Preserve][ILSEQ] +CD CD [Preserve][ILSEQ] +CE CE [Preserve][ILSEQ] +CF CF [Preserve][ILSEQ] +D0 D0 [Preserve][ILSEQ] +D1 D1 [Preserve][ILSEQ] +D2 D2 [Preserve][ILSEQ] +D3 D3 [Preserve][ILSEQ] +D4 D4 [Preserve][ILSEQ] +D5 D5 [Preserve][ILSEQ] +D6 D6 [Preserve][ILSEQ] +D7 D7 [Preserve][ILSEQ] +D8 D8 [Preserve][ILSEQ] +D9 D9 [Preserve][ILSEQ] +DA DA [Preserve][ILSEQ] +DB DB [Preserve][ILSEQ] +DC DC [Preserve][ILSEQ] +DD DD [Preserve][ILSEQ] +DE DE [Preserve][ILSEQ] +DF DF [Preserve][ILSEQ] +E0 E0 [Preserve][ILSEQ] +E1 E1 [Preserve][ILSEQ] +E2 E2 [Preserve][ILSEQ] +E3 E3 [Preserve][ILSEQ] +E4 E4 [Preserve][ILSEQ] +E5 E5 [Preserve][ILSEQ] +E6 E6 [Preserve][ILSEQ] +E7 E7 [Preserve][ILSEQ] +E8 E8 [Preserve][ILSEQ] +E9 E9 [Preserve][ILSEQ] +EA EA [Preserve][ILSEQ] +EB EB [Preserve][ILSEQ] +EC EC [Preserve][ILSEQ] +ED ED [Preserve][ILSEQ] +EE EE [Preserve][ILSEQ] +EF EF [Preserve][ILSEQ] +F0 F0 [Preserve][ILSEQ] +F1 F1 [Preserve][ILSEQ] +F2 F2 [Preserve][ILSEQ] +F3 F3 [Preserve][ILSEQ] +F4 F4 [Preserve][ILSEQ] +F5 F5 [Preserve][ILSEQ] +F6 F6 [Preserve][ILSEQ] +F7 F7 [Preserve][ILSEQ] +F8 F8 [Preserve][ILSEQ] +F9 F9 [Preserve][ILSEQ] +FA FA [Preserve][ILSEQ] +FB FB [Preserve][ILSEQ] +FC FC [Preserve][ILSEQ] +FD FD [Preserve][ILSEQ] +FE FE [Preserve][ILSEQ] +FF FF [Preserve][ILSEQ] +0022 0022 [Preserve][ASCII] +0027 NULL [SyntErr] +005C NULL [SyntErr] +0822 0822 [Preserve][ASCII] +0827 NULL [SyntErr] +085C NULL [SyntErr] +0922 0922 [Preserve][ASCII] +0927 NULL [SyntErr] +095C NULL [SyntErr] +0A22 0A22 [Preserve][ASCII] +0A27 NULL [SyntErr] +0A5C NULL [SyntErr] +0D22 0D22 [Preserve][ASCII] +0D27 NULL [SyntErr] +0D5C NULL [SyntErr] +1A22 1A22 [Preserve][ASCII] +1A27 NULL [SyntErr] +1A5C NULL [SyntErr] +2200 2200 [Preserve][ASCII] +2208 2208 [Preserve][ASCII] +2209 2209 [Preserve][ASCII] +220A 220A [Preserve][ASCII] +220D 220D [Preserve][ASCII] +221A 221A [Preserve][ASCII] +2222 2222 [Preserve][ASCII] +2225 2225 [Preserve][ASCII] +2227 NULL [SyntErr] +2230 2230 [Preserve][ASCII] +223F 223F [Preserve][ASCII] +2240 2240 [Preserve][ASCII] +225A 225A [Preserve][ASCII] +225C NULL [SyntErr] +225F 225F [Preserve][ASCII] +2261 2261 [Preserve][ASCII] +2262 2262 [Preserve][ASCII] +226E 226E [Preserve][ASCII] +2272 2272 [Preserve][ASCII] +2274 2274 [Preserve][ASCII] +227E 227E [Preserve][ASCII] +227F 227F [Preserve][ASCII] +2280 2280 [Preserv][MB][ILSEQ] +2281 2281 [Preserv][MB][ILSEQ] +229F 229F [Preserv][MB][ILSEQ] +22A0 22A0 [Preserv][MB][ILSEQ] +22A1 22A1 [Preserv][MB][ILSEQ] +22E0 22E0 [Preserv][MB][ILSEQ] +22EF 22EF [Preserv][MB][ILSEQ] +22F9 22F9 [Preserv][MB][ILSEQ] +22FA 22FA [Preserv][MB][ILSEQ] +22FC 22FC [Preserv][MB][ILSEQ] +22FD 22FD [Preserv][MB][ILSEQ] +22FE 22FE [Preserv][MB][ILSEQ] +22FF 22FF [Preserv][MB][ILSEQ] +2522 2522 [Preserve][ASCII] +2527 NULL [SyntErr] +255C NULL [SyntErr] +2700 NULL [SyntErr] +2708 NULL [SyntErr] +2709 NULL [SyntErr] +270A NULL [SyntErr] +270D NULL [SyntErr] +271A NULL [SyntErr] +2722 NULL [SyntErr] +2725 NULL [SyntErr] +2727 27 [Regular] +2730 NULL [SyntErr] +273F NULL [SyntErr] +2740 NULL [SyntErr] +275A NULL [SyntErr] +275C NULL [SyntErr] +275F NULL [SyntErr] +2761 NULL [SyntErr] +2762 NULL [SyntErr] +276E NULL [SyntErr] +2772 NULL [SyntErr] +2774 NULL [SyntErr] +277E NULL [SyntErr] +277F NULL [SyntErr] +2780 NULL [SyntErr] +2781 NULL [SyntErr] +279F NULL [SyntErr] +27A0 NULL [SyntErr] +27A1 NULL [SyntErr] +27E0 NULL [SyntErr] +27EF NULL [SyntErr] +27F9 NULL [SyntErr] +27FA NULL [SyntErr] +27FC NULL [SyntErr] +27FD NULL [SyntErr] +27FE NULL [SyntErr] +27FF NULL [SyntErr] +3022 3022 [Preserve][ASCII] +3027 NULL [SyntErr] +305C NULL [SyntErr] +3F22 3F22 [Preserve][ASCII] +3F27 NULL [SyntErr] +3F5C NULL [SyntErr] +4022 4022 [Preserve][ASCII] +4027 NULL [SyntErr] +405C NULL [SyntErr] +5A22 5A22 [Preserve][ASCII] +5A27 NULL [SyntErr] +5A5C NULL [SyntErr] +5C00 00 [Trivial] +5C08 08 [Trivial] +5C09 09 [Trivial] +5C0A 0A [Trivial] +5C0D 0D [Trivial] +5C1A 1A [Trivial] +5C22 22 [Trivial] +5C25 5C25 [Preserve][LIKE] +5C27 27 [Trivial] +5C30 00 [Regular] +5C3F 3F [Trivial] +5C40 40 [Trivial] +5C5A 1A [Regular] +5C5C 5C [Regular] +5C5F 5C5F [Preserve][LIKE] +5C61 61 [Trivial] +5C62 08 [Regular] +5C6E 0A [Regular] +5C72 0D [Regular] +5C74 09 [Regular] +5C7E 7E [Trivial] +5C7F 7F [Trivial] +5C80 80 [Trivial][ILSEQ] +5C81 81 [Trivial][ILSEQ] +5C9F 9F [Trivial][ILSEQ] +5CA0 A0 [Trivial][ILSEQ] +5CA1 A1 [Trivial][ILSEQ] +5CE0 E0 [Trivial][ILSEQ] +5CEF EF [Trivial][ILSEQ] +5CF9 F9 [Trivial][ILSEQ] +5CFA FA [Trivial][ILSEQ] +5CFC FC [Trivial][ILSEQ] +5CFD FD [Trivial][ILSEQ] +5CFE FE [Trivial][ILSEQ] +5CFF FF [Trivial][ILSEQ] +5F22 5F22 [Preserve][ASCII] +5F27 NULL [SyntErr] +5F5C NULL [SyntErr] +6122 6122 [Preserve][ASCII] +6127 NULL [SyntErr] +615C NULL [SyntErr] +6222 6222 [Preserve][ASCII] +6227 NULL [SyntErr] +625C NULL [SyntErr] +6E22 6E22 [Preserve][ASCII] +6E27 NULL [SyntErr] +6E5C NULL [SyntErr] +7222 7222 [Preserve][ASCII] +7227 NULL [SyntErr] +725C NULL [SyntErr] +7422 7422 [Preserve][ASCII] +7427 NULL [SyntErr] +745C NULL [SyntErr] +7E22 7E22 [Preserve][ASCII] +7E27 NULL [SyntErr] +7E5C NULL [SyntErr] +7F22 7F22 [Preserve][ASCII] +7F27 NULL [SyntErr] +7F5C NULL [SyntErr] +8022 8022 [Preserv][MB][ILSEQ] +8027 NULL [SyntErr] +805C NULL [SyntErr] +8122 8122 [Preserv][MB][ILSEQ] +8127 NULL [SyntErr] +815C 815C [Preserv][MB] +9F22 9F22 [Preserv][MB][ILSEQ] +9F27 NULL [SyntErr] +9F5C 9F5C [Preserv][MB] +A022 A022 [Preserv][MB][ILSEQ] +A027 NULL [SyntErr] +A05C A05C [Preserv][MB] +A122 A122 [Preserv][MB][ILSEQ] +A127 NULL [SyntErr] +A15C A15C [Preserv][MB] +E022 E022 [Preserv][MB][ILSEQ] +E027 NULL [SyntErr] +E05C E05C [Preserv][MB] +EF22 EF22 [Preserv][MB][ILSEQ] +EF27 NULL [SyntErr] +EF5C EF5C [Preserv][MB] +F922 F922 [Preserv][MB][ILSEQ] +F927 NULL [SyntErr] +F95C F95C [Preserv][MB] +FA22 FA22 [Preserv][MB][ILSEQ] +FA27 NULL [SyntErr] +FA5C FA5C [Preserv][MB] +FC22 FC22 [Preserv][MB][ILSEQ] +FC27 NULL [SyntErr] +FC5C FC5C [Preserv][MB] +FD22 FD22 [Preserv][MB][ILSEQ] +FD27 NULL [SyntErr] +FD5C FD5C [Preserv][MB] +FE22 FE22 [Preserv][MB][ILSEQ] +FE27 NULL [SyntErr] +FE5C FE5C [Preserv][MB] +FF22 FF22 [Preserv][MB][ILSEQ] +FF27 NULL [SyntErr] +FF5C NULL [SyntErr] +5C0000 0000 [Trivial] +5C0008 0008 [Trivial] +5C0009 0009 [Trivial] +5C000A 000A [Trivial] +5C000D 000D [Trivial] +5C001A 001A [Trivial] +5C0022 0022 [Trivial] +5C0025 0025 [Trivial] +5C0027 NULL [SyntErr] +5C0030 0030 [Trivial] +5C003F 003F [Trivial] +5C0040 0040 [Trivial] +5C005A 005A [Trivial] +5C005C NULL [SyntErr] +5C005F 005F [Trivial] +5C0061 0061 [Trivial] +5C0062 0062 [Trivial] +5C006E 006E [Trivial] +5C0072 0072 [Trivial] +5C0074 0074 [Trivial] +5C007E 007E [Trivial] +5C007F 007F [Trivial] +5C0080 0080 [Trivial][ILSEQ] +5C0081 0081 [Trivial][ILSEQ] +5C009F 009F [Trivial][ILSEQ] +5C00A0 00A0 [Trivial][ILSEQ] +5C00A1 00A1 [Trivial][ILSEQ] +5C00E0 00E0 [Trivial][ILSEQ] +5C00EF 00EF [Trivial][ILSEQ] +5C00F9 00F9 [Trivial][ILSEQ] +5C00FA 00FA [Trivial][ILSEQ] +5C00FC 00FC [Trivial][ILSEQ] +5C00FD 00FD [Trivial][ILSEQ] +5C00FE 00FE [Trivial][ILSEQ] +5C00FF 00FF [Trivial][ILSEQ] +5C0800 0800 [Trivial] +5C0808 0808 [Trivial] +5C0809 0809 [Trivial] +5C080A 080A [Trivial] +5C080D 080D [Trivial] +5C081A 081A [Trivial] +5C0822 0822 [Trivial] +5C0825 0825 [Trivial] +5C0827 NULL [SyntErr] +5C0830 0830 [Trivial] +5C083F 083F [Trivial] +5C0840 0840 [Trivial] +5C085A 085A [Trivial] +5C085C NULL [SyntErr] +5C085F 085F [Trivial] +5C0861 0861 [Trivial] +5C0862 0862 [Trivial] +5C086E 086E [Trivial] +5C0872 0872 [Trivial] +5C0874 0874 [Trivial] +5C087E 087E [Trivial] +5C087F 087F [Trivial] +5C0880 0880 [Trivial][ILSEQ] +5C0881 0881 [Trivial][ILSEQ] +5C089F 089F [Trivial][ILSEQ] +5C08A0 08A0 [Trivial][ILSEQ] +5C08A1 08A1 [Trivial][ILSEQ] +5C08E0 08E0 [Trivial][ILSEQ] +5C08EF 08EF [Trivial][ILSEQ] +5C08F9 08F9 [Trivial][ILSEQ] +5C08FA 08FA [Trivial][ILSEQ] +5C08FC 08FC [Trivial][ILSEQ] +5C08FD 08FD [Trivial][ILSEQ] +5C08FE 08FE [Trivial][ILSEQ] +5C08FF 08FF [Trivial][ILSEQ] +5C0900 0900 [Trivial] +5C0908 0908 [Trivial] +5C0909 0909 [Trivial] +5C090A 090A [Trivial] +5C090D 090D [Trivial] +5C091A 091A [Trivial] +5C0922 0922 [Trivial] +5C0925 0925 [Trivial] +5C0927 NULL [SyntErr] +5C0930 0930 [Trivial] +5C093F 093F [Trivial] +5C0940 0940 [Trivial] +5C095A 095A [Trivial] +5C095C NULL [SyntErr] +5C095F 095F [Trivial] +5C0961 0961 [Trivial] +5C0962 0962 [Trivial] +5C096E 096E [Trivial] +5C0972 0972 [Trivial] +5C0974 0974 [Trivial] +5C097E 097E [Trivial] +5C097F 097F [Trivial] +5C0980 0980 [Trivial][ILSEQ] +5C0981 0981 [Trivial][ILSEQ] +5C099F 099F [Trivial][ILSEQ] +5C09A0 09A0 [Trivial][ILSEQ] +5C09A1 09A1 [Trivial][ILSEQ] +5C09E0 09E0 [Trivial][ILSEQ] +5C09EF 09EF [Trivial][ILSEQ] +5C09F9 09F9 [Trivial][ILSEQ] +5C09FA 09FA [Trivial][ILSEQ] +5C09FC 09FC [Trivial][ILSEQ] +5C09FD 09FD [Trivial][ILSEQ] +5C09FE 09FE [Trivial][ILSEQ] +5C09FF 09FF [Trivial][ILSEQ] +5C0A00 0A00 [Trivial] +5C0A08 0A08 [Trivial] +5C0A09 0A09 [Trivial] +5C0A0A 0A0A [Trivial] +5C0A0D 0A0D [Trivial] +5C0A1A 0A1A [Trivial] +5C0A22 0A22 [Trivial] +5C0A25 0A25 [Trivial] +5C0A27 NULL [SyntErr] +5C0A30 0A30 [Trivial] +5C0A3F 0A3F [Trivial] +5C0A40 0A40 [Trivial] +5C0A5A 0A5A [Trivial] +5C0A5C NULL [SyntErr] +5C0A5F 0A5F [Trivial] +5C0A61 0A61 [Trivial] +5C0A62 0A62 [Trivial] +5C0A6E 0A6E [Trivial] +5C0A72 0A72 [Trivial] +5C0A74 0A74 [Trivial] +5C0A7E 0A7E [Trivial] +5C0A7F 0A7F [Trivial] +5C0A80 0A80 [Trivial][ILSEQ] +5C0A81 0A81 [Trivial][ILSEQ] +5C0A9F 0A9F [Trivial][ILSEQ] +5C0AA0 0AA0 [Trivial][ILSEQ] +5C0AA1 0AA1 [Trivial][ILSEQ] +5C0AE0 0AE0 [Trivial][ILSEQ] +5C0AEF 0AEF [Trivial][ILSEQ] +5C0AF9 0AF9 [Trivial][ILSEQ] +5C0AFA 0AFA [Trivial][ILSEQ] +5C0AFC 0AFC [Trivial][ILSEQ] +5C0AFD 0AFD [Trivial][ILSEQ] +5C0AFE 0AFE [Trivial][ILSEQ] +5C0AFF 0AFF [Trivial][ILSEQ] +5C0D00 0D00 [Trivial] +5C0D08 0D08 [Trivial] +5C0D09 0D09 [Trivial] +5C0D0A 0D0A [Trivial] +5C0D0D 0D0D [Trivial] +5C0D1A 0D1A [Trivial] +5C0D22 0D22 [Trivial] +5C0D25 0D25 [Trivial] +5C0D27 NULL [SyntErr] +5C0D30 0D30 [Trivial] +5C0D3F 0D3F [Trivial] +5C0D40 0D40 [Trivial] +5C0D5A 0D5A [Trivial] +5C0D5C NULL [SyntErr] +5C0D5F 0D5F [Trivial] +5C0D61 0D61 [Trivial] +5C0D62 0D62 [Trivial] +5C0D6E 0D6E [Trivial] +5C0D72 0D72 [Trivial] +5C0D74 0D74 [Trivial] +5C0D7E 0D7E [Trivial] +5C0D7F 0D7F [Trivial] +5C0D80 0D80 [Trivial][ILSEQ] +5C0D81 0D81 [Trivial][ILSEQ] +5C0D9F 0D9F [Trivial][ILSEQ] +5C0DA0 0DA0 [Trivial][ILSEQ] +5C0DA1 0DA1 [Trivial][ILSEQ] +5C0DE0 0DE0 [Trivial][ILSEQ] +5C0DEF 0DEF [Trivial][ILSEQ] +5C0DF9 0DF9 [Trivial][ILSEQ] +5C0DFA 0DFA [Trivial][ILSEQ] +5C0DFC 0DFC [Trivial][ILSEQ] +5C0DFD 0DFD [Trivial][ILSEQ] +5C0DFE 0DFE [Trivial][ILSEQ] +5C0DFF 0DFF [Trivial][ILSEQ] +5C1A00 1A00 [Trivial] +5C1A08 1A08 [Trivial] +5C1A09 1A09 [Trivial] +5C1A0A 1A0A [Trivial] +5C1A0D 1A0D [Trivial] +5C1A1A 1A1A [Trivial] +5C1A22 1A22 [Trivial] +5C1A25 1A25 [Trivial] +5C1A27 NULL [SyntErr] +5C1A30 1A30 [Trivial] +5C1A3F 1A3F [Trivial] +5C1A40 1A40 [Trivial] +5C1A5A 1A5A [Trivial] +5C1A5C NULL [SyntErr] +5C1A5F 1A5F [Trivial] +5C1A61 1A61 [Trivial] +5C1A62 1A62 [Trivial] +5C1A6E 1A6E [Trivial] +5C1A72 1A72 [Trivial] +5C1A74 1A74 [Trivial] +5C1A7E 1A7E [Trivial] +5C1A7F 1A7F [Trivial] +5C1A80 1A80 [Trivial][ILSEQ] +5C1A81 1A81 [Trivial][ILSEQ] +5C1A9F 1A9F [Trivial][ILSEQ] +5C1AA0 1AA0 [Trivial][ILSEQ] +5C1AA1 1AA1 [Trivial][ILSEQ] +5C1AE0 1AE0 [Trivial][ILSEQ] +5C1AEF 1AEF [Trivial][ILSEQ] +5C1AF9 1AF9 [Trivial][ILSEQ] +5C1AFA 1AFA [Trivial][ILSEQ] +5C1AFC 1AFC [Trivial][ILSEQ] +5C1AFD 1AFD [Trivial][ILSEQ] +5C1AFE 1AFE [Trivial][ILSEQ] +5C1AFF 1AFF [Trivial][ILSEQ] +5C2200 2200 [Trivial] +5C2208 2208 [Trivial] +5C2209 2209 [Trivial] +5C220A 220A [Trivial] +5C220D 220D [Trivial] +5C221A 221A [Trivial] +5C2222 2222 [Trivial] +5C2225 2225 [Trivial] +5C2227 NULL [SyntErr] +5C2230 2230 [Trivial] +5C223F 223F [Trivial] +5C2240 2240 [Trivial] +5C225A 225A [Trivial] +5C225C NULL [SyntErr] +5C225F 225F [Trivial] +5C2261 2261 [Trivial] +5C2262 2262 [Trivial] +5C226E 226E [Trivial] +5C2272 2272 [Trivial] +5C2274 2274 [Trivial] +5C227E 227E [Trivial] +5C227F 227F [Trivial] +5C2280 2280 [Trivial][ILSEQ] +5C2281 2281 [Trivial][ILSEQ] +5C229F 229F [Trivial][ILSEQ] +5C22A0 22A0 [Trivial][ILSEQ] +5C22A1 22A1 [Trivial][ILSEQ] +5C22E0 22E0 [Trivial][ILSEQ] +5C22EF 22EF [Trivial][ILSEQ] +5C22F9 22F9 [Trivial][ILSEQ] +5C22FA 22FA [Trivial][ILSEQ] +5C22FC 22FC [Trivial][ILSEQ] +5C22FD 22FD [Trivial][ILSEQ] +5C22FE 22FE [Trivial][ILSEQ] +5C22FF 22FF [Trivial][ILSEQ] +5C2500 5C2500 [Preserve][LIKE] +5C2508 5C2508 [Preserve][LIKE] +5C2509 5C2509 [Preserve][LIKE] +5C250A 5C250A [Preserve][LIKE] +5C250D 5C250D [Preserve][LIKE] +5C251A 5C251A [Preserve][LIKE] +5C2522 5C2522 [Preserve][LIKE] +5C2525 5C2525 [Preserve][LIKE] +5C2527 NULL [SyntErr] +5C2530 5C2530 [Preserve][LIKE] +5C253F 5C253F [Preserve][LIKE] +5C2540 5C2540 [Preserve][LIKE] +5C255A 5C255A [Preserve][LIKE] +5C255C NULL [SyntErr] +5C255F 5C255F [Preserve][LIKE] +5C2561 5C2561 [Preserve][LIKE] +5C2562 5C2562 [Preserve][LIKE] +5C256E 5C256E [Preserve][LIKE] +5C2572 5C2572 [Preserve][LIKE] +5C2574 5C2574 [Preserve][LIKE] +5C257E 5C257E [Preserve][LIKE] +5C257F 5C257F [Preserve][LIKE] +5C2580 5C2580 [Preserve][LIKE][ILSEQ] +5C2581 5C2581 [Preserve][LIKE][ILSEQ] +5C259F 5C259F [Preserve][LIKE][ILSEQ] +5C25A0 5C25A0 [Preserve][LIKE][ILSEQ] +5C25A1 5C25A1 [Preserve][LIKE][ILSEQ] +5C25E0 5C25E0 [Preserve][LIKE][ILSEQ] +5C25EF 5C25EF [Preserve][LIKE][ILSEQ] +5C25F9 5C25F9 [Preserve][LIKE][ILSEQ] +5C25FA 5C25FA [Preserve][LIKE][ILSEQ] +5C25FC 5C25FC [Preserve][LIKE][ILSEQ] +5C25FD 5C25FD [Preserve][LIKE][ILSEQ] +5C25FE 5C25FE [Preserve][LIKE][ILSEQ] +5C25FF 5C25FF [Preserve][LIKE][ILSEQ] +5C2700 2700 [Trivial] +5C2708 2708 [Trivial] +5C2709 2709 [Trivial] +5C270A 270A [Trivial] +5C270D 270D [Trivial] +5C271A 271A [Trivial] +5C2722 2722 [Trivial] +5C2725 2725 [Trivial] +5C2727 NULL [SyntErr] +5C2730 2730 [Trivial] +5C273F 273F [Trivial] +5C2740 2740 [Trivial] +5C275A 275A [Trivial] +5C275C NULL [SyntErr] +5C275F 275F [Trivial] +5C2761 2761 [Trivial] +5C2762 2762 [Trivial] +5C276E 276E [Trivial] +5C2772 2772 [Trivial] +5C2774 2774 [Trivial] +5C277E 277E [Trivial] +5C277F 277F [Trivial] +5C2780 2780 [Trivial][ILSEQ] +5C2781 2781 [Trivial][ILSEQ] +5C279F 279F [Trivial][ILSEQ] +5C27A0 27A0 [Trivial][ILSEQ] +5C27A1 27A1 [Trivial][ILSEQ] +5C27E0 27E0 [Trivial][ILSEQ] +5C27EF 27EF [Trivial][ILSEQ] +5C27F9 27F9 [Trivial][ILSEQ] +5C27FA 27FA [Trivial][ILSEQ] +5C27FC 27FC [Trivial][ILSEQ] +5C27FD 27FD [Trivial][ILSEQ] +5C27FE 27FE [Trivial][ILSEQ] +5C27FF 27FF [Trivial][ILSEQ] +5C3000 0000 [Regular] +5C3008 0008 [Regular] +5C3009 0009 [Regular] +5C300A 000A [Regular] +5C300D 000D [Regular] +5C301A 001A [Regular] +5C3022 0022 [Regular] +5C3025 0025 [Regular] +5C3027 NULL [SyntErr] +5C3030 0030 [Regular] +5C303F 003F [Regular] +5C3040 0040 [Regular] +5C305A 005A [Regular] +5C305C NULL [SyntErr] +5C305F 005F [Regular] +5C3061 0061 [Regular] +5C3062 0062 [Regular] +5C306E 006E [Regular] +5C3072 0072 [Regular] +5C3074 0074 [Regular] +5C307E 007E [Regular] +5C307F 007F [Regular] +5C3080 0080 [Regular][ILSEQ] +5C3081 0081 [Regular][ILSEQ] +5C309F 009F [Regular][ILSEQ] +5C30A0 00A0 [Regular][ILSEQ] +5C30A1 00A1 [Regular][ILSEQ] +5C30E0 00E0 [Regular][ILSEQ] +5C30EF 00EF [Regular][ILSEQ] +5C30F9 00F9 [Regular][ILSEQ] +5C30FA 00FA [Regular][ILSEQ] +5C30FC 00FC [Regular][ILSEQ] +5C30FD 00FD [Regular][ILSEQ] +5C30FE 00FE [Regular][ILSEQ] +5C30FF 00FF [Regular][ILSEQ] +5C3F00 3F00 [Trivial] +5C3F08 3F08 [Trivial] +5C3F09 3F09 [Trivial] +5C3F0A 3F0A [Trivial] +5C3F0D 3F0D [Trivial] +5C3F1A 3F1A [Trivial] +5C3F22 3F22 [Trivial] +5C3F25 3F25 [Trivial] +5C3F27 NULL [SyntErr] +5C3F30 3F30 [Trivial] +5C3F3F 3F3F [Trivial] +5C3F40 3F40 [Trivial] +5C3F5A 3F5A [Trivial] +5C3F5C NULL [SyntErr] +5C3F5F 3F5F [Trivial] +5C3F61 3F61 [Trivial] +5C3F62 3F62 [Trivial] +5C3F6E 3F6E [Trivial] +5C3F72 3F72 [Trivial] +5C3F74 3F74 [Trivial] +5C3F7E 3F7E [Trivial] +5C3F7F 3F7F [Trivial] +5C3F80 3F80 [Trivial][ILSEQ] +5C3F81 3F81 [Trivial][ILSEQ] +5C3F9F 3F9F [Trivial][ILSEQ] +5C3FA0 3FA0 [Trivial][ILSEQ] +5C3FA1 3FA1 [Trivial][ILSEQ] +5C3FE0 3FE0 [Trivial][ILSEQ] +5C3FEF 3FEF [Trivial][ILSEQ] +5C3FF9 3FF9 [Trivial][ILSEQ] +5C3FFA 3FFA [Trivial][ILSEQ] +5C3FFC 3FFC [Trivial][ILSEQ] +5C3FFD 3FFD [Trivial][ILSEQ] +5C3FFE 3FFE [Trivial][ILSEQ] +5C3FFF 3FFF [Trivial][ILSEQ] +5C4000 4000 [Trivial] +5C4008 4008 [Trivial] +5C4009 4009 [Trivial] +5C400A 400A [Trivial] +5C400D 400D [Trivial] +5C401A 401A [Trivial] +5C4022 4022 [Trivial] +5C4025 4025 [Trivial] +5C4027 NULL [SyntErr] +5C4030 4030 [Trivial] +5C403F 403F [Trivial] +5C4040 4040 [Trivial] +5C405A 405A [Trivial] +5C405C NULL [SyntErr] +5C405F 405F [Trivial] +5C4061 4061 [Trivial] +5C4062 4062 [Trivial] +5C406E 406E [Trivial] +5C4072 4072 [Trivial] +5C4074 4074 [Trivial] +5C407E 407E [Trivial] +5C407F 407F [Trivial] +5C4080 4080 [Trivial][ILSEQ] +5C4081 4081 [Trivial][ILSEQ] +5C409F 409F [Trivial][ILSEQ] +5C40A0 40A0 [Trivial][ILSEQ] +5C40A1 40A1 [Trivial][ILSEQ] +5C40E0 40E0 [Trivial][ILSEQ] +5C40EF 40EF [Trivial][ILSEQ] +5C40F9 40F9 [Trivial][ILSEQ] +5C40FA 40FA [Trivial][ILSEQ] +5C40FC 40FC [Trivial][ILSEQ] +5C40FD 40FD [Trivial][ILSEQ] +5C40FE 40FE [Trivial][ILSEQ] +5C40FF 40FF [Trivial][ILSEQ] +5C5A00 1A00 [Regular] +5C5A08 1A08 [Regular] +5C5A09 1A09 [Regular] +5C5A0A 1A0A [Regular] +5C5A0D 1A0D [Regular] +5C5A1A 1A1A [Regular] +5C5A22 1A22 [Regular] +5C5A25 1A25 [Regular] +5C5A27 NULL [SyntErr] +5C5A30 1A30 [Regular] +5C5A3F 1A3F [Regular] +5C5A40 1A40 [Regular] +5C5A5A 1A5A [Regular] +5C5A5C NULL [SyntErr] +5C5A5F 1A5F [Regular] +5C5A61 1A61 [Regular] +5C5A62 1A62 [Regular] +5C5A6E 1A6E [Regular] +5C5A72 1A72 [Regular] +5C5A74 1A74 [Regular] +5C5A7E 1A7E [Regular] +5C5A7F 1A7F [Regular] +5C5A80 1A80 [Regular][ILSEQ] +5C5A81 1A81 [Regular][ILSEQ] +5C5A9F 1A9F [Regular][ILSEQ] +5C5AA0 1AA0 [Regular][ILSEQ] +5C5AA1 1AA1 [Regular][ILSEQ] +5C5AE0 1AE0 [Regular][ILSEQ] +5C5AEF 1AEF [Regular][ILSEQ] +5C5AF9 1AF9 [Regular][ILSEQ] +5C5AFA 1AFA [Regular][ILSEQ] +5C5AFC 1AFC [Regular][ILSEQ] +5C5AFD 1AFD [Regular][ILSEQ] +5C5AFE 1AFE [Regular][ILSEQ] +5C5AFF 1AFF [Regular][ILSEQ] +5C5C00 5C00 [Regular] +5C5C08 5C08 [Regular] +5C5C09 5C09 [Regular] +5C5C0A 5C0A [Regular] +5C5C0D 5C0D [Regular] +5C5C1A 5C1A [Regular] +5C5C22 5C22 [Regular] +5C5C25 5C25 [Regular] +5C5C27 NULL [SyntErr] +5C5C30 5C30 [Regular] +5C5C3F 5C3F [Regular] +5C5C40 5C40 [Regular] +5C5C5A 5C5A [Regular] +5C5C5C NULL [SyntErr] +5C5C5F 5C5F [Regular] +5C5C61 5C61 [Regular] +5C5C62 5C62 [Regular] +5C5C6E 5C6E [Regular] +5C5C72 5C72 [Regular] +5C5C74 5C74 [Regular] +5C5C7E 5C7E [Regular] +5C5C7F 5C7F [Regular] +5C5C80 5C80 [Regular][ILSEQ] +5C5C81 5C81 [Regular][ILSEQ] +5C5C9F 5C9F [Regular][ILSEQ] +5C5CA0 5CA0 [Regular][ILSEQ] +5C5CA1 5CA1 [Regular][ILSEQ] +5C5CE0 5CE0 [Regular][ILSEQ] +5C5CEF 5CEF [Regular][ILSEQ] +5C5CF9 5CF9 [Regular][ILSEQ] +5C5CFA 5CFA [Regular][ILSEQ] +5C5CFC 5CFC [Regular][ILSEQ] +5C5CFD 5CFD [Regular][ILSEQ] +5C5CFE 5CFE [Regular][ILSEQ] +5C5CFF 5CFF [Regular][ILSEQ] +5C5F00 5C5F00 [Preserve][LIKE] +5C5F08 5C5F08 [Preserve][LIKE] +5C5F09 5C5F09 [Preserve][LIKE] +5C5F0A 5C5F0A [Preserve][LIKE] +5C5F0D 5C5F0D [Preserve][LIKE] +5C5F1A 5C5F1A [Preserve][LIKE] +5C5F22 5C5F22 [Preserve][LIKE] +5C5F25 5C5F25 [Preserve][LIKE] +5C5F27 NULL [SyntErr] +5C5F30 5C5F30 [Preserve][LIKE] +5C5F3F 5C5F3F [Preserve][LIKE] +5C5F40 5C5F40 [Preserve][LIKE] +5C5F5A 5C5F5A [Preserve][LIKE] +5C5F5C NULL [SyntErr] +5C5F5F 5C5F5F [Preserve][LIKE] +5C5F61 5C5F61 [Preserve][LIKE] +5C5F62 5C5F62 [Preserve][LIKE] +5C5F6E 5C5F6E [Preserve][LIKE] +5C5F72 5C5F72 [Preserve][LIKE] +5C5F74 5C5F74 [Preserve][LIKE] +5C5F7E 5C5F7E [Preserve][LIKE] +5C5F7F 5C5F7F [Preserve][LIKE] +5C5F80 5C5F80 [Preserve][LIKE][ILSEQ] +5C5F81 5C5F81 [Preserve][LIKE][ILSEQ] +5C5F9F 5C5F9F [Preserve][LIKE][ILSEQ] +5C5FA0 5C5FA0 [Preserve][LIKE][ILSEQ] +5C5FA1 5C5FA1 [Preserve][LIKE][ILSEQ] +5C5FE0 5C5FE0 [Preserve][LIKE][ILSEQ] +5C5FEF 5C5FEF [Preserve][LIKE][ILSEQ] +5C5FF9 5C5FF9 [Preserve][LIKE][ILSEQ] +5C5FFA 5C5FFA [Preserve][LIKE][ILSEQ] +5C5FFC 5C5FFC [Preserve][LIKE][ILSEQ] +5C5FFD 5C5FFD [Preserve][LIKE][ILSEQ] +5C5FFE 5C5FFE [Preserve][LIKE][ILSEQ] +5C5FFF 5C5FFF [Preserve][LIKE][ILSEQ] +5C6100 6100 [Trivial] +5C6108 6108 [Trivial] +5C6109 6109 [Trivial] +5C610A 610A [Trivial] +5C610D 610D [Trivial] +5C611A 611A [Trivial] +5C6122 6122 [Trivial] +5C6125 6125 [Trivial] +5C6127 NULL [SyntErr] +5C6130 6130 [Trivial] +5C613F 613F [Trivial] +5C6140 6140 [Trivial] +5C615A 615A [Trivial] +5C615C NULL [SyntErr] +5C615F 615F [Trivial] +5C6161 6161 [Trivial] +5C6162 6162 [Trivial] +5C616E 616E [Trivial] +5C6172 6172 [Trivial] +5C6174 6174 [Trivial] +5C617E 617E [Trivial] +5C617F 617F [Trivial] +5C6180 6180 [Trivial][ILSEQ] +5C6181 6181 [Trivial][ILSEQ] +5C619F 619F [Trivial][ILSEQ] +5C61A0 61A0 [Trivial][ILSEQ] +5C61A1 61A1 [Trivial][ILSEQ] +5C61E0 61E0 [Trivial][ILSEQ] +5C61EF 61EF [Trivial][ILSEQ] +5C61F9 61F9 [Trivial][ILSEQ] +5C61FA 61FA [Trivial][ILSEQ] +5C61FC 61FC [Trivial][ILSEQ] +5C61FD 61FD [Trivial][ILSEQ] +5C61FE 61FE [Trivial][ILSEQ] +5C61FF 61FF [Trivial][ILSEQ] +5C6200 0800 [Regular] +5C6208 0808 [Regular] +5C6209 0809 [Regular] +5C620A 080A [Regular] +5C620D 080D [Regular] +5C621A 081A [Regular] +5C6222 0822 [Regular] +5C6225 0825 [Regular] +5C6227 NULL [SyntErr] +5C6230 0830 [Regular] +5C623F 083F [Regular] +5C6240 0840 [Regular] +5C625A 085A [Regular] +5C625C NULL [SyntErr] +5C625F 085F [Regular] +5C6261 0861 [Regular] +5C6262 0862 [Regular] +5C626E 086E [Regular] +5C6272 0872 [Regular] +5C6274 0874 [Regular] +5C627E 087E [Regular] +5C627F 087F [Regular] +5C6280 0880 [Regular][ILSEQ] +5C6281 0881 [Regular][ILSEQ] +5C629F 089F [Regular][ILSEQ] +5C62A0 08A0 [Regular][ILSEQ] +5C62A1 08A1 [Regular][ILSEQ] +5C62E0 08E0 [Regular][ILSEQ] +5C62EF 08EF [Regular][ILSEQ] +5C62F9 08F9 [Regular][ILSEQ] +5C62FA 08FA [Regular][ILSEQ] +5C62FC 08FC [Regular][ILSEQ] +5C62FD 08FD [Regular][ILSEQ] +5C62FE 08FE [Regular][ILSEQ] +5C62FF 08FF [Regular][ILSEQ] +5C6E00 0A00 [Regular] +5C6E08 0A08 [Regular] +5C6E09 0A09 [Regular] +5C6E0A 0A0A [Regular] +5C6E0D 0A0D [Regular] +5C6E1A 0A1A [Regular] +5C6E22 0A22 [Regular] +5C6E25 0A25 [Regular] +5C6E27 NULL [SyntErr] +5C6E30 0A30 [Regular] +5C6E3F 0A3F [Regular] +5C6E40 0A40 [Regular] +5C6E5A 0A5A [Regular] +5C6E5C NULL [SyntErr] +5C6E5F 0A5F [Regular] +5C6E61 0A61 [Regular] +5C6E62 0A62 [Regular] +5C6E6E 0A6E [Regular] +5C6E72 0A72 [Regular] +5C6E74 0A74 [Regular] +5C6E7E 0A7E [Regular] +5C6E7F 0A7F [Regular] +5C6E80 0A80 [Regular][ILSEQ] +5C6E81 0A81 [Regular][ILSEQ] +5C6E9F 0A9F [Regular][ILSEQ] +5C6EA0 0AA0 [Regular][ILSEQ] +5C6EA1 0AA1 [Regular][ILSEQ] +5C6EE0 0AE0 [Regular][ILSEQ] +5C6EEF 0AEF [Regular][ILSEQ] +5C6EF9 0AF9 [Regular][ILSEQ] +5C6EFA 0AFA [Regular][ILSEQ] +5C6EFC 0AFC [Regular][ILSEQ] +5C6EFD 0AFD [Regular][ILSEQ] +5C6EFE 0AFE [Regular][ILSEQ] +5C6EFF 0AFF [Regular][ILSEQ] +5C7200 0D00 [Regular] +5C7208 0D08 [Regular] +5C7209 0D09 [Regular] +5C720A 0D0A [Regular] +5C720D 0D0D [Regular] +5C721A 0D1A [Regular] +5C7222 0D22 [Regular] +5C7225 0D25 [Regular] +5C7227 NULL [SyntErr] +5C7230 0D30 [Regular] +5C723F 0D3F [Regular] +5C7240 0D40 [Regular] +5C725A 0D5A [Regular] +5C725C NULL [SyntErr] +5C725F 0D5F [Regular] +5C7261 0D61 [Regular] +5C7262 0D62 [Regular] +5C726E 0D6E [Regular] +5C7272 0D72 [Regular] +5C7274 0D74 [Regular] +5C727E 0D7E [Regular] +5C727F 0D7F [Regular] +5C7280 0D80 [Regular][ILSEQ] +5C7281 0D81 [Regular][ILSEQ] +5C729F 0D9F [Regular][ILSEQ] +5C72A0 0DA0 [Regular][ILSEQ] +5C72A1 0DA1 [Regular][ILSEQ] +5C72E0 0DE0 [Regular][ILSEQ] +5C72EF 0DEF [Regular][ILSEQ] +5C72F9 0DF9 [Regular][ILSEQ] +5C72FA 0DFA [Regular][ILSEQ] +5C72FC 0DFC [Regular][ILSEQ] +5C72FD 0DFD [Regular][ILSEQ] +5C72FE 0DFE [Regular][ILSEQ] +5C72FF 0DFF [Regular][ILSEQ] +5C7400 0900 [Regular] +5C7408 0908 [Regular] +5C7409 0909 [Regular] +5C740A 090A [Regular] +5C740D 090D [Regular] +5C741A 091A [Regular] +5C7422 0922 [Regular] +5C7425 0925 [Regular] +5C7427 NULL [SyntErr] +5C7430 0930 [Regular] +5C743F 093F [Regular] +5C7440 0940 [Regular] +5C745A 095A [Regular] +5C745C NULL [SyntErr] +5C745F 095F [Regular] +5C7461 0961 [Regular] +5C7462 0962 [Regular] +5C746E 096E [Regular] +5C7472 0972 [Regular] +5C7474 0974 [Regular] +5C747E 097E [Regular] +5C747F 097F [Regular] +5C7480 0980 [Regular][ILSEQ] +5C7481 0981 [Regular][ILSEQ] +5C749F 099F [Regular][ILSEQ] +5C74A0 09A0 [Regular][ILSEQ] +5C74A1 09A1 [Regular][ILSEQ] +5C74E0 09E0 [Regular][ILSEQ] +5C74EF 09EF [Regular][ILSEQ] +5C74F9 09F9 [Regular][ILSEQ] +5C74FA 09FA [Regular][ILSEQ] +5C74FC 09FC [Regular][ILSEQ] +5C74FD 09FD [Regular][ILSEQ] +5C74FE 09FE [Regular][ILSEQ] +5C74FF 09FF [Regular][ILSEQ] +5C7E00 7E00 [Trivial] +5C7E08 7E08 [Trivial] +5C7E09 7E09 [Trivial] +5C7E0A 7E0A [Trivial] +5C7E0D 7E0D [Trivial] +5C7E1A 7E1A [Trivial] +5C7E22 7E22 [Trivial] +5C7E25 7E25 [Trivial] +5C7E27 NULL [SyntErr] +5C7E30 7E30 [Trivial] +5C7E3F 7E3F [Trivial] +5C7E40 7E40 [Trivial] +5C7E5A 7E5A [Trivial] +5C7E5C NULL [SyntErr] +5C7E5F 7E5F [Trivial] +5C7E61 7E61 [Trivial] +5C7E62 7E62 [Trivial] +5C7E6E 7E6E [Trivial] +5C7E72 7E72 [Trivial] +5C7E74 7E74 [Trivial] +5C7E7E 7E7E [Trivial] +5C7E7F 7E7F [Trivial] +5C7E80 7E80 [Trivial][ILSEQ] +5C7E81 7E81 [Trivial][ILSEQ] +5C7E9F 7E9F [Trivial][ILSEQ] +5C7EA0 7EA0 [Trivial][ILSEQ] +5C7EA1 7EA1 [Trivial][ILSEQ] +5C7EE0 7EE0 [Trivial][ILSEQ] +5C7EEF 7EEF [Trivial][ILSEQ] +5C7EF9 7EF9 [Trivial][ILSEQ] +5C7EFA 7EFA [Trivial][ILSEQ] +5C7EFC 7EFC [Trivial][ILSEQ] +5C7EFD 7EFD [Trivial][ILSEQ] +5C7EFE 7EFE [Trivial][ILSEQ] +5C7EFF 7EFF [Trivial][ILSEQ] +5C7F00 7F00 [Trivial] +5C7F08 7F08 [Trivial] +5C7F09 7F09 [Trivial] +5C7F0A 7F0A [Trivial] +5C7F0D 7F0D [Trivial] +5C7F1A 7F1A [Trivial] +5C7F22 7F22 [Trivial] +5C7F25 7F25 [Trivial] +5C7F27 NULL [SyntErr] +5C7F30 7F30 [Trivial] +5C7F3F 7F3F [Trivial] +5C7F40 7F40 [Trivial] +5C7F5A 7F5A [Trivial] +5C7F5C NULL [SyntErr] +5C7F5F 7F5F [Trivial] +5C7F61 7F61 [Trivial] +5C7F62 7F62 [Trivial] +5C7F6E 7F6E [Trivial] +5C7F72 7F72 [Trivial] +5C7F74 7F74 [Trivial] +5C7F7E 7F7E [Trivial] +5C7F7F 7F7F [Trivial] +5C7F80 7F80 [Trivial][ILSEQ] +5C7F81 7F81 [Trivial][ILSEQ] +5C7F9F 7F9F [Trivial][ILSEQ] +5C7FA0 7FA0 [Trivial][ILSEQ] +5C7FA1 7FA1 [Trivial][ILSEQ] +5C7FE0 7FE0 [Trivial][ILSEQ] +5C7FEF 7FEF [Trivial][ILSEQ] +5C7FF9 7FF9 [Trivial][ILSEQ] +5C7FFA 7FFA [Trivial][ILSEQ] +5C7FFC 7FFC [Trivial][ILSEQ] +5C7FFD 7FFD [Trivial][ILSEQ] +5C7FFE 7FFE [Trivial][ILSEQ] +5C7FFF 7FFF [Trivial][ILSEQ] +5C8000 8000 [Trivial][ILSEQ] +5C8008 8008 [Trivial][ILSEQ] +5C8009 8009 [Trivial][ILSEQ] +5C800A 800A [Trivial][ILSEQ] +5C800D 800D [Trivial][ILSEQ] +5C801A 801A [Trivial][ILSEQ] +5C8022 8022 [Trivial][ILSEQ] +5C8025 8025 [Trivial][ILSEQ] +5C8027 NULL [SyntErr] +5C8030 8030 [Trivial][ILSEQ] +5C803F 803F [Trivial][ILSEQ] +5C8040 8040 [Trivial][ILSEQ] +5C805A 805A [Trivial][ILSEQ] +5C805C NULL [SyntErr] +5C805F 805F [Trivial][ILSEQ] +5C8061 8061 [Trivial][ILSEQ] +5C8062 8062 [Trivial][ILSEQ] +5C806E 806E [Trivial][ILSEQ] +5C8072 8072 [Trivial][ILSEQ] +5C8074 8074 [Trivial][ILSEQ] +5C807E 807E [Trivial][ILSEQ] +5C807F 807F [Trivial][ILSEQ] +5C8080 8080 [Trivial][ILSEQ] +5C8081 8081 [Trivial][ILSEQ] +5C809F 809F [Trivial][ILSEQ] +5C80A0 80A0 [Trivial][ILSEQ] +5C80A1 80A1 [Trivial][ILSEQ] +5C80E0 80E0 [Trivial][ILSEQ] +5C80EF 80EF [Trivial][ILSEQ] +5C80F9 80F9 [Trivial][ILSEQ] +5C80FA 80FA [Trivial][ILSEQ] +5C80FC 80FC [Trivial][ILSEQ] +5C80FD 80FD [Trivial][ILSEQ] +5C80FE 80FE [Trivial][ILSEQ] +5C80FF 80FF [Trivial][ILSEQ] +5C8100 8100 [Trivial][ILSEQ] +5C8108 8108 [Trivial][ILSEQ] +5C8109 8109 [Trivial][ILSEQ] +5C810A 810A [Trivial][ILSEQ] +5C810D 810D [Trivial][ILSEQ] +5C811A 811A [Trivial][ILSEQ] +5C8122 8122 [Trivial][ILSEQ] +5C8125 8125 [Trivial][ILSEQ] +5C8127 NULL [SyntErr] +5C8130 8130 [Trivial][ILSEQ] +5C813F 813F [Trivial][ILSEQ] +5C8140 8140 [Trivial] +5C815A 815A [Trivial] +5C815C NULL [SyntErr] +5C815F 815F [Trivial] +5C8161 8161 [Trivial] +5C8162 8162 [Trivial] +5C816E 816E [Trivial] +5C8172 8172 [Trivial] +5C8174 8174 [Trivial] +5C817E 817E [Trivial] +5C817F 817F [Trivial][ILSEQ] +5C8180 8180 [Trivial] +5C8181 8181 [Trivial] +5C819F 819F [Trivial] +5C81A0 81A0 [Trivial] +5C81A1 81A1 [Trivial] +5C81E0 81E0 [Trivial] +5C81EF 81EF [Trivial] +5C81F9 81F9 [Trivial] +5C81FA 81FA [Trivial] +5C81FC 81FC [Trivial] +5C81FD 81FD [Trivial] +5C81FE 81FE [Trivial] +5C81FF 81FF [Trivial][ILSEQ] +5C9F00 9F00 [Trivial][ILSEQ] +5C9F08 9F08 [Trivial][ILSEQ] +5C9F09 9F09 [Trivial][ILSEQ] +5C9F0A 9F0A [Trivial][ILSEQ] +5C9F0D 9F0D [Trivial][ILSEQ] +5C9F1A 9F1A [Trivial][ILSEQ] +5C9F22 9F22 [Trivial][ILSEQ] +5C9F25 9F25 [Trivial][ILSEQ] +5C9F27 NULL [SyntErr] +5C9F30 9F30 [Trivial][ILSEQ] +5C9F3F 9F3F [Trivial][ILSEQ] +5C9F40 9F40 [Trivial] +5C9F5A 9F5A [Trivial] +5C9F5C NULL [SyntErr] +5C9F5F 9F5F [Trivial] +5C9F61 9F61 [Trivial] +5C9F62 9F62 [Trivial] +5C9F6E 9F6E [Trivial] +5C9F72 9F72 [Trivial] +5C9F74 9F74 [Trivial] +5C9F7E 9F7E [Trivial] +5C9F7F 9F7F [Trivial][ILSEQ] +5C9F80 9F80 [Trivial] +5C9F81 9F81 [Trivial] +5C9F9F 9F9F [Trivial] +5C9FA0 9FA0 [Trivial] +5C9FA1 9FA1 [Trivial] +5C9FE0 9FE0 [Trivial] +5C9FEF 9FEF [Trivial] +5C9FF9 9FF9 [Trivial] +5C9FFA 9FFA [Trivial] +5C9FFC 9FFC [Trivial] +5C9FFD 9FFD [Trivial] +5C9FFE 9FFE [Trivial] +5C9FFF 9FFF [Trivial][ILSEQ] +5CA000 A000 [Trivial][ILSEQ] +5CA008 A008 [Trivial][ILSEQ] +5CA009 A009 [Trivial][ILSEQ] +5CA00A A00A [Trivial][ILSEQ] +5CA00D A00D [Trivial][ILSEQ] +5CA01A A01A [Trivial][ILSEQ] +5CA022 A022 [Trivial][ILSEQ] +5CA025 A025 [Trivial][ILSEQ] +5CA027 NULL [SyntErr] +5CA030 A030 [Trivial][ILSEQ] +5CA03F A03F [Trivial][ILSEQ] +5CA040 A040 [Trivial] +5CA05A A05A [Trivial] +5CA05C NULL [SyntErr] +5CA05F A05F [Trivial] +5CA061 A061 [Trivial] +5CA062 A062 [Trivial] +5CA06E A06E [Trivial] +5CA072 A072 [Trivial] +5CA074 A074 [Trivial] +5CA07E A07E [Trivial] +5CA07F A07F [Trivial][ILSEQ] +5CA080 A080 [Trivial] +5CA081 A081 [Trivial] +5CA09F A09F [Trivial] +5CA0A0 A0A0 [Trivial] +5CA0A1 A0A1 [Trivial] +5CA0E0 A0E0 [Trivial] +5CA0EF A0EF [Trivial] +5CA0F9 A0F9 [Trivial] +5CA0FA A0FA [Trivial] +5CA0FC A0FC [Trivial] +5CA0FD A0FD [Trivial] +5CA0FE A0FE [Trivial] +5CA0FF A0FF [Trivial][ILSEQ] +5CA100 A100 [Trivial][ILSEQ] +5CA108 A108 [Trivial][ILSEQ] +5CA109 A109 [Trivial][ILSEQ] +5CA10A A10A [Trivial][ILSEQ] +5CA10D A10D [Trivial][ILSEQ] +5CA11A A11A [Trivial][ILSEQ] +5CA122 A122 [Trivial][ILSEQ] +5CA125 A125 [Trivial][ILSEQ] +5CA127 NULL [SyntErr] +5CA130 A130 [Trivial][ILSEQ] +5CA13F A13F [Trivial][ILSEQ] +5CA140 A140 [Trivial] +5CA15A A15A [Trivial] +5CA15C NULL [SyntErr] +5CA15F A15F [Trivial] +5CA161 A161 [Trivial] +5CA162 A162 [Trivial] +5CA16E A16E [Trivial] +5CA172 A172 [Trivial] +5CA174 A174 [Trivial] +5CA17E A17E [Trivial] +5CA17F A17F [Trivial][ILSEQ] +5CA180 A180 [Trivial] +5CA181 A181 [Trivial] +5CA19F A19F [Trivial] +5CA1A0 A1A0 [Trivial] +5CA1A1 A1A1 [Trivial] +5CA1E0 A1E0 [Trivial] +5CA1EF A1EF [Trivial] +5CA1F9 A1F9 [Trivial] +5CA1FA A1FA [Trivial] +5CA1FC A1FC [Trivial] +5CA1FD A1FD [Trivial] +5CA1FE A1FE [Trivial] +5CA1FF A1FF [Trivial][ILSEQ] +5CE000 E000 [Trivial][ILSEQ] +5CE008 E008 [Trivial][ILSEQ] +5CE009 E009 [Trivial][ILSEQ] +5CE00A E00A [Trivial][ILSEQ] +5CE00D E00D [Trivial][ILSEQ] +5CE01A E01A [Trivial][ILSEQ] +5CE022 E022 [Trivial][ILSEQ] +5CE025 E025 [Trivial][ILSEQ] +5CE027 NULL [SyntErr] +5CE030 E030 [Trivial][ILSEQ] +5CE03F E03F [Trivial][ILSEQ] +5CE040 E040 [Trivial] +5CE05A E05A [Trivial] +5CE05C NULL [SyntErr] +5CE05F E05F [Trivial] +5CE061 E061 [Trivial] +5CE062 E062 [Trivial] +5CE06E E06E [Trivial] +5CE072 E072 [Trivial] +5CE074 E074 [Trivial] +5CE07E E07E [Trivial] +5CE07F E07F [Trivial][ILSEQ] +5CE080 E080 [Trivial] +5CE081 E081 [Trivial] +5CE09F E09F [Trivial] +5CE0A0 E0A0 [Trivial] +5CE0A1 E0A1 [Trivial] +5CE0E0 E0E0 [Trivial] +5CE0EF E0EF [Trivial] +5CE0F9 E0F9 [Trivial] +5CE0FA E0FA [Trivial] +5CE0FC E0FC [Trivial] +5CE0FD E0FD [Trivial] +5CE0FE E0FE [Trivial] +5CE0FF E0FF [Trivial][ILSEQ] +5CEF00 EF00 [Trivial][ILSEQ] +5CEF08 EF08 [Trivial][ILSEQ] +5CEF09 EF09 [Trivial][ILSEQ] +5CEF0A EF0A [Trivial][ILSEQ] +5CEF0D EF0D [Trivial][ILSEQ] +5CEF1A EF1A [Trivial][ILSEQ] +5CEF22 EF22 [Trivial][ILSEQ] +5CEF25 EF25 [Trivial][ILSEQ] +5CEF27 NULL [SyntErr] +5CEF30 EF30 [Trivial][ILSEQ] +5CEF3F EF3F [Trivial][ILSEQ] +5CEF40 EF40 [Trivial] +5CEF5A EF5A [Trivial] +5CEF5C NULL [SyntErr] +5CEF5F EF5F [Trivial] +5CEF61 EF61 [Trivial] +5CEF62 EF62 [Trivial] +5CEF6E EF6E [Trivial] +5CEF72 EF72 [Trivial] +5CEF74 EF74 [Trivial] +5CEF7E EF7E [Trivial] +5CEF7F EF7F [Trivial][ILSEQ] +5CEF80 EF80 [Trivial] +5CEF81 EF81 [Trivial] +5CEF9F EF9F [Trivial] +5CEFA0 EFA0 [Trivial] +5CEFA1 EFA1 [Trivial] +5CEFE0 EFE0 [Trivial] +5CEFEF EFEF [Trivial] +5CEFF9 EFF9 [Trivial] +5CEFFA EFFA [Trivial] +5CEFFC EFFC [Trivial] +5CEFFD EFFD [Trivial] +5CEFFE EFFE [Trivial] +5CEFFF EFFF [Trivial][ILSEQ] +5CF900 F900 [Trivial][ILSEQ] +5CF908 F908 [Trivial][ILSEQ] +5CF909 F909 [Trivial][ILSEQ] +5CF90A F90A [Trivial][ILSEQ] +5CF90D F90D [Trivial][ILSEQ] +5CF91A F91A [Trivial][ILSEQ] +5CF922 F922 [Trivial][ILSEQ] +5CF925 F925 [Trivial][ILSEQ] +5CF927 NULL [SyntErr] +5CF930 F930 [Trivial][ILSEQ] +5CF93F F93F [Trivial][ILSEQ] +5CF940 F940 [Trivial] +5CF95A F95A [Trivial] +5CF95C NULL [SyntErr] +5CF95F F95F [Trivial] +5CF961 F961 [Trivial] +5CF962 F962 [Trivial] +5CF96E F96E [Trivial] +5CF972 F972 [Trivial] +5CF974 F974 [Trivial] +5CF97E F97E [Trivial] +5CF97F F97F [Trivial][ILSEQ] +5CF980 F980 [Trivial] +5CF981 F981 [Trivial] +5CF99F F99F [Trivial] +5CF9A0 F9A0 [Trivial] +5CF9A1 F9A1 [Trivial] +5CF9E0 F9E0 [Trivial] +5CF9EF F9EF [Trivial] +5CF9F9 F9F9 [Trivial] +5CF9FA F9FA [Trivial] +5CF9FC F9FC [Trivial] +5CF9FD F9FD [Trivial] +5CF9FE F9FE [Trivial] +5CF9FF F9FF [Trivial][ILSEQ] +5CFA00 FA00 [Trivial][ILSEQ] +5CFA08 FA08 [Trivial][ILSEQ] +5CFA09 FA09 [Trivial][ILSEQ] +5CFA0A FA0A [Trivial][ILSEQ] +5CFA0D FA0D [Trivial][ILSEQ] +5CFA1A FA1A [Trivial][ILSEQ] +5CFA22 FA22 [Trivial][ILSEQ] +5CFA25 FA25 [Trivial][ILSEQ] +5CFA27 NULL [SyntErr] +5CFA30 FA30 [Trivial][ILSEQ] +5CFA3F FA3F [Trivial][ILSEQ] +5CFA40 FA40 [Trivial] +5CFA5A FA5A [Trivial] +5CFA5C NULL [SyntErr] +5CFA5F FA5F [Trivial] +5CFA61 FA61 [Trivial] +5CFA62 FA62 [Trivial] +5CFA6E FA6E [Trivial] +5CFA72 FA72 [Trivial] +5CFA74 FA74 [Trivial] +5CFA7E FA7E [Trivial] +5CFA7F FA7F [Trivial][ILSEQ] +5CFA80 FA80 [Trivial] +5CFA81 FA81 [Trivial] +5CFA9F FA9F [Trivial] +5CFAA0 FAA0 [Trivial] +5CFAA1 FAA1 [Trivial] +5CFAE0 FAE0 [Trivial] +5CFAEF FAEF [Trivial] +5CFAF9 FAF9 [Trivial] +5CFAFA FAFA [Trivial] +5CFAFC FAFC [Trivial] +5CFAFD FAFD [Trivial] +5CFAFE FAFE [Trivial] +5CFAFF FAFF [Trivial][ILSEQ] +5CFC00 FC00 [Trivial][ILSEQ] +5CFC08 FC08 [Trivial][ILSEQ] +5CFC09 FC09 [Trivial][ILSEQ] +5CFC0A FC0A [Trivial][ILSEQ] +5CFC0D FC0D [Trivial][ILSEQ] +5CFC1A FC1A [Trivial][ILSEQ] +5CFC22 FC22 [Trivial][ILSEQ] +5CFC25 FC25 [Trivial][ILSEQ] +5CFC27 NULL [SyntErr] +5CFC30 FC30 [Trivial][ILSEQ] +5CFC3F FC3F [Trivial][ILSEQ] +5CFC40 FC40 [Trivial] +5CFC5A FC5A [Trivial] +5CFC5C NULL [SyntErr] +5CFC5F FC5F [Trivial] +5CFC61 FC61 [Trivial] +5CFC62 FC62 [Trivial] +5CFC6E FC6E [Trivial] +5CFC72 FC72 [Trivial] +5CFC74 FC74 [Trivial] +5CFC7E FC7E [Trivial] +5CFC7F FC7F [Trivial][ILSEQ] +5CFC80 FC80 [Trivial] +5CFC81 FC81 [Trivial] +5CFC9F FC9F [Trivial] +5CFCA0 FCA0 [Trivial] +5CFCA1 FCA1 [Trivial] +5CFCE0 FCE0 [Trivial] +5CFCEF FCEF [Trivial] +5CFCF9 FCF9 [Trivial] +5CFCFA FCFA [Trivial] +5CFCFC FCFC [Trivial] +5CFCFD FCFD [Trivial] +5CFCFE FCFE [Trivial] +5CFCFF FCFF [Trivial][ILSEQ] +5CFD00 FD00 [Trivial][ILSEQ] +5CFD08 FD08 [Trivial][ILSEQ] +5CFD09 FD09 [Trivial][ILSEQ] +5CFD0A FD0A [Trivial][ILSEQ] +5CFD0D FD0D [Trivial][ILSEQ] +5CFD1A FD1A [Trivial][ILSEQ] +5CFD22 FD22 [Trivial][ILSEQ] +5CFD25 FD25 [Trivial][ILSEQ] +5CFD27 NULL [SyntErr] +5CFD30 FD30 [Trivial][ILSEQ] +5CFD3F FD3F [Trivial][ILSEQ] +5CFD40 FD40 [Trivial] +5CFD5A FD5A [Trivial] +5CFD5C NULL [SyntErr] +5CFD5F FD5F [Trivial] +5CFD61 FD61 [Trivial] +5CFD62 FD62 [Trivial] +5CFD6E FD6E [Trivial] +5CFD72 FD72 [Trivial] +5CFD74 FD74 [Trivial] +5CFD7E FD7E [Trivial] +5CFD7F FD7F [Trivial][ILSEQ] +5CFD80 FD80 [Trivial] +5CFD81 FD81 [Trivial] +5CFD9F FD9F [Trivial] +5CFDA0 FDA0 [Trivial] +5CFDA1 FDA1 [Trivial] +5CFDE0 FDE0 [Trivial] +5CFDEF FDEF [Trivial] +5CFDF9 FDF9 [Trivial] +5CFDFA FDFA [Trivial] +5CFDFC FDFC [Trivial] +5CFDFD FDFD [Trivial] +5CFDFE FDFE [Trivial] +5CFDFF FDFF [Trivial][ILSEQ] +5CFE00 FE00 [Trivial][ILSEQ] +5CFE08 FE08 [Trivial][ILSEQ] +5CFE09 FE09 [Trivial][ILSEQ] +5CFE0A FE0A [Trivial][ILSEQ] +5CFE0D FE0D [Trivial][ILSEQ] +5CFE1A FE1A [Trivial][ILSEQ] +5CFE22 FE22 [Trivial][ILSEQ] +5CFE25 FE25 [Trivial][ILSEQ] +5CFE27 NULL [SyntErr] +5CFE30 FE30 [Trivial][ILSEQ] +5CFE3F FE3F [Trivial][ILSEQ] +5CFE40 FE40 [Trivial] +5CFE5A FE5A [Trivial] +5CFE5C NULL [SyntErr] +5CFE5F FE5F [Trivial] +5CFE61 FE61 [Trivial] +5CFE62 FE62 [Trivial] +5CFE6E FE6E [Trivial] +5CFE72 FE72 [Trivial] +5CFE74 FE74 [Trivial] +5CFE7E FE7E [Trivial] +5CFE7F FE7F [Trivial][ILSEQ] +5CFE80 FE80 [Trivial] +5CFE81 FE81 [Trivial] +5CFE9F FE9F [Trivial] +5CFEA0 FEA0 [Trivial] +5CFEA1 FEA1 [Trivial] +5CFEE0 FEE0 [Trivial] +5CFEEF FEEF [Trivial] +5CFEF9 FEF9 [Trivial] +5CFEFA FEFA [Trivial] +5CFEFC FEFC [Trivial] +5CFEFD FEFD [Trivial] +5CFEFE FEFE [Trivial] +5CFEFF FEFF [Trivial][ILSEQ] +5CFF00 FF00 [Trivial][ILSEQ] +5CFF08 FF08 [Trivial][ILSEQ] +5CFF09 FF09 [Trivial][ILSEQ] +5CFF0A FF0A [Trivial][ILSEQ] +5CFF0D FF0D [Trivial][ILSEQ] +5CFF1A FF1A [Trivial][ILSEQ] +5CFF22 FF22 [Trivial][ILSEQ] +5CFF25 FF25 [Trivial][ILSEQ] +5CFF27 NULL [SyntErr] +5CFF30 FF30 [Trivial][ILSEQ] +5CFF3F FF3F [Trivial][ILSEQ] +5CFF40 FF40 [Trivial][ILSEQ] +5CFF5A FF5A [Trivial][ILSEQ] +5CFF5C NULL [SyntErr] +5CFF5F FF5F [Trivial][ILSEQ] +5CFF61 FF61 [Trivial][ILSEQ] +5CFF62 FF62 [Trivial][ILSEQ] +5CFF6E FF6E [Trivial][ILSEQ] +5CFF72 FF72 [Trivial][ILSEQ] +5CFF74 FF74 [Trivial][ILSEQ] +5CFF7E FF7E [Trivial][ILSEQ] +5CFF7F FF7F [Trivial][ILSEQ] +5CFF80 FF80 [Trivial][ILSEQ] +5CFF81 FF81 [Trivial][ILSEQ] +5CFF9F FF9F [Trivial][ILSEQ] +5CFFA0 FFA0 [Trivial][ILSEQ] +5CFFA1 FFA1 [Trivial][ILSEQ] +5CFFE0 FFE0 [Trivial][ILSEQ] +5CFFEF FFEF [Trivial][ILSEQ] +5CFFF9 FFF9 [Trivial][ILSEQ] +5CFFFA FFFA [Trivial][ILSEQ] +5CFFFC FFFC [Trivial][ILSEQ] +5CFFFD FFFD [Trivial][ILSEQ] +5CFFFE FFFE [Trivial][ILSEQ] +5CFFFF FFFF [Trivial][ILSEQ] +5C005C00 0000 [Trivial] +5C005C08 0008 [Trivial] +5C005C09 0009 [Trivial] +5C005C0A 000A [Trivial] +5C005C0D 000D [Trivial] +5C005C1A 001A [Trivial] +5C005C22 0022 [Trivial] +5C005C25 005C25 [Regular] +5C005C27 0027 [Trivial] +5C005C30 0000 [Regular] +5C005C3F 003F [Trivial] +5C005C40 0040 [Trivial] +5C005C5A 001A [Regular] +5C005C5C 005C [Regular] +5C005C5F 005C5F [Regular] +5C005C61 0061 [Trivial] +5C005C62 0008 [Regular] +5C005C6E 000A [Regular] +5C005C72 000D [Regular] +5C005C74 0009 [Regular] +5C005C7E 007E [Trivial] +5C005C7F 007F [Trivial] +5C005C80 0080 [Trivial][ILSEQ] +5C005C81 0081 [Trivial][ILSEQ] +5C005C9F 009F [Trivial][ILSEQ] +5C005CA0 00A0 [Trivial][ILSEQ] +5C005CA1 00A1 [Trivial][ILSEQ] +5C005CE0 00E0 [Trivial][ILSEQ] +5C005CEF 00EF [Trivial][ILSEQ] +5C005CF9 00F9 [Trivial][ILSEQ] +5C005CFA 00FA [Trivial][ILSEQ] +5C005CFC 00FC [Trivial][ILSEQ] +5C005CFD 00FD [Trivial][ILSEQ] +5C005CFE 00FE [Trivial][ILSEQ] +5C005CFF 00FF [Trivial][ILSEQ] +5C085C00 0800 [Trivial] +5C085C08 0808 [Trivial] +5C085C09 0809 [Trivial] +5C085C0A 080A [Trivial] +5C085C0D 080D [Trivial] +5C085C1A 081A [Trivial] +5C085C22 0822 [Trivial] +5C085C25 085C25 [Regular] +5C085C27 0827 [Trivial] +5C085C30 0800 [Regular] +5C085C3F 083F [Trivial] +5C085C40 0840 [Trivial] +5C085C5A 081A [Regular] +5C085C5C 085C [Regular] +5C085C5F 085C5F [Regular] +5C085C61 0861 [Trivial] +5C085C62 0808 [Regular] +5C085C6E 080A [Regular] +5C085C72 080D [Regular] +5C085C74 0809 [Regular] +5C085C7E 087E [Trivial] +5C085C7F 087F [Trivial] +5C085C80 0880 [Trivial][ILSEQ] +5C085C81 0881 [Trivial][ILSEQ] +5C085C9F 089F [Trivial][ILSEQ] +5C085CA0 08A0 [Trivial][ILSEQ] +5C085CA1 08A1 [Trivial][ILSEQ] +5C085CE0 08E0 [Trivial][ILSEQ] +5C085CEF 08EF [Trivial][ILSEQ] +5C085CF9 08F9 [Trivial][ILSEQ] +5C085CFA 08FA [Trivial][ILSEQ] +5C085CFC 08FC [Trivial][ILSEQ] +5C085CFD 08FD [Trivial][ILSEQ] +5C085CFE 08FE [Trivial][ILSEQ] +5C085CFF 08FF [Trivial][ILSEQ] +5C095C00 0900 [Trivial] +5C095C08 0908 [Trivial] +5C095C09 0909 [Trivial] +5C095C0A 090A [Trivial] +5C095C0D 090D [Trivial] +5C095C1A 091A [Trivial] +5C095C22 0922 [Trivial] +5C095C25 095C25 [Regular] +5C095C27 0927 [Trivial] +5C095C30 0900 [Regular] +5C095C3F 093F [Trivial] +5C095C40 0940 [Trivial] +5C095C5A 091A [Regular] +5C095C5C 095C [Regular] +5C095C5F 095C5F [Regular] +5C095C61 0961 [Trivial] +5C095C62 0908 [Regular] +5C095C6E 090A [Regular] +5C095C72 090D [Regular] +5C095C74 0909 [Regular] +5C095C7E 097E [Trivial] +5C095C7F 097F [Trivial] +5C095C80 0980 [Trivial][ILSEQ] +5C095C81 0981 [Trivial][ILSEQ] +5C095C9F 099F [Trivial][ILSEQ] +5C095CA0 09A0 [Trivial][ILSEQ] +5C095CA1 09A1 [Trivial][ILSEQ] +5C095CE0 09E0 [Trivial][ILSEQ] +5C095CEF 09EF [Trivial][ILSEQ] +5C095CF9 09F9 [Trivial][ILSEQ] +5C095CFA 09FA [Trivial][ILSEQ] +5C095CFC 09FC [Trivial][ILSEQ] +5C095CFD 09FD [Trivial][ILSEQ] +5C095CFE 09FE [Trivial][ILSEQ] +5C095CFF 09FF [Trivial][ILSEQ] +5C0A5C00 0A00 [Trivial] +5C0A5C08 0A08 [Trivial] +5C0A5C09 0A09 [Trivial] +5C0A5C0A 0A0A [Trivial] +5C0A5C0D 0A0D [Trivial] +5C0A5C1A 0A1A [Trivial] +5C0A5C22 0A22 [Trivial] +5C0A5C25 0A5C25 [Regular] +5C0A5C27 0A27 [Trivial] +5C0A5C30 0A00 [Regular] +5C0A5C3F 0A3F [Trivial] +5C0A5C40 0A40 [Trivial] +5C0A5C5A 0A1A [Regular] +5C0A5C5C 0A5C [Regular] +5C0A5C5F 0A5C5F [Regular] +5C0A5C61 0A61 [Trivial] +5C0A5C62 0A08 [Regular] +5C0A5C6E 0A0A [Regular] +5C0A5C72 0A0D [Regular] +5C0A5C74 0A09 [Regular] +5C0A5C7E 0A7E [Trivial] +5C0A5C7F 0A7F [Trivial] +5C0A5C80 0A80 [Trivial][ILSEQ] +5C0A5C81 0A81 [Trivial][ILSEQ] +5C0A5C9F 0A9F [Trivial][ILSEQ] +5C0A5CA0 0AA0 [Trivial][ILSEQ] +5C0A5CA1 0AA1 [Trivial][ILSEQ] +5C0A5CE0 0AE0 [Trivial][ILSEQ] +5C0A5CEF 0AEF [Trivial][ILSEQ] +5C0A5CF9 0AF9 [Trivial][ILSEQ] +5C0A5CFA 0AFA [Trivial][ILSEQ] +5C0A5CFC 0AFC [Trivial][ILSEQ] +5C0A5CFD 0AFD [Trivial][ILSEQ] +5C0A5CFE 0AFE [Trivial][ILSEQ] +5C0A5CFF 0AFF [Trivial][ILSEQ] +5C0D5C00 0D00 [Trivial] +5C0D5C08 0D08 [Trivial] +5C0D5C09 0D09 [Trivial] +5C0D5C0A 0D0A [Trivial] +5C0D5C0D 0D0D [Trivial] +5C0D5C1A 0D1A [Trivial] +5C0D5C22 0D22 [Trivial] +5C0D5C25 0D5C25 [Regular] +5C0D5C27 0D27 [Trivial] +5C0D5C30 0D00 [Regular] +5C0D5C3F 0D3F [Trivial] +5C0D5C40 0D40 [Trivial] +5C0D5C5A 0D1A [Regular] +5C0D5C5C 0D5C [Regular] +5C0D5C5F 0D5C5F [Regular] +5C0D5C61 0D61 [Trivial] +5C0D5C62 0D08 [Regular] +5C0D5C6E 0D0A [Regular] +5C0D5C72 0D0D [Regular] +5C0D5C74 0D09 [Regular] +5C0D5C7E 0D7E [Trivial] +5C0D5C7F 0D7F [Trivial] +5C0D5C80 0D80 [Trivial][ILSEQ] +5C0D5C81 0D81 [Trivial][ILSEQ] +5C0D5C9F 0D9F [Trivial][ILSEQ] +5C0D5CA0 0DA0 [Trivial][ILSEQ] +5C0D5CA1 0DA1 [Trivial][ILSEQ] +5C0D5CE0 0DE0 [Trivial][ILSEQ] +5C0D5CEF 0DEF [Trivial][ILSEQ] +5C0D5CF9 0DF9 [Trivial][ILSEQ] +5C0D5CFA 0DFA [Trivial][ILSEQ] +5C0D5CFC 0DFC [Trivial][ILSEQ] +5C0D5CFD 0DFD [Trivial][ILSEQ] +5C0D5CFE 0DFE [Trivial][ILSEQ] +5C0D5CFF 0DFF [Trivial][ILSEQ] +5C1A5C00 1A00 [Trivial] +5C1A5C08 1A08 [Trivial] +5C1A5C09 1A09 [Trivial] +5C1A5C0A 1A0A [Trivial] +5C1A5C0D 1A0D [Trivial] +5C1A5C1A 1A1A [Trivial] +5C1A5C22 1A22 [Trivial] +5C1A5C25 1A5C25 [Regular] +5C1A5C27 1A27 [Trivial] +5C1A5C30 1A00 [Regular] +5C1A5C3F 1A3F [Trivial] +5C1A5C40 1A40 [Trivial] +5C1A5C5A 1A1A [Regular] +5C1A5C5C 1A5C [Regular] +5C1A5C5F 1A5C5F [Regular] +5C1A5C61 1A61 [Trivial] +5C1A5C62 1A08 [Regular] +5C1A5C6E 1A0A [Regular] +5C1A5C72 1A0D [Regular] +5C1A5C74 1A09 [Regular] +5C1A5C7E 1A7E [Trivial] +5C1A5C7F 1A7F [Trivial] +5C1A5C80 1A80 [Trivial][ILSEQ] +5C1A5C81 1A81 [Trivial][ILSEQ] +5C1A5C9F 1A9F [Trivial][ILSEQ] +5C1A5CA0 1AA0 [Trivial][ILSEQ] +5C1A5CA1 1AA1 [Trivial][ILSEQ] +5C1A5CE0 1AE0 [Trivial][ILSEQ] +5C1A5CEF 1AEF [Trivial][ILSEQ] +5C1A5CF9 1AF9 [Trivial][ILSEQ] +5C1A5CFA 1AFA [Trivial][ILSEQ] +5C1A5CFC 1AFC [Trivial][ILSEQ] +5C1A5CFD 1AFD [Trivial][ILSEQ] +5C1A5CFE 1AFE [Trivial][ILSEQ] +5C1A5CFF 1AFF [Trivial][ILSEQ] +5C225C00 2200 [Trivial] +5C225C08 2208 [Trivial] +5C225C09 2209 [Trivial] +5C225C0A 220A [Trivial] +5C225C0D 220D [Trivial] +5C225C1A 221A [Trivial] +5C225C22 2222 [Trivial] +5C225C25 225C25 [Regular] +5C225C27 2227 [Trivial] +5C225C30 2200 [Regular] +5C225C3F 223F [Trivial] +5C225C40 2240 [Trivial] +5C225C5A 221A [Regular] +5C225C5C 225C [Regular] +5C225C5F 225C5F [Regular] +5C225C61 2261 [Trivial] +5C225C62 2208 [Regular] +5C225C6E 220A [Regular] +5C225C72 220D [Regular] +5C225C74 2209 [Regular] +5C225C7E 227E [Trivial] +5C225C7F 227F [Trivial] +5C225C80 2280 [Trivial][ILSEQ] +5C225C81 2281 [Trivial][ILSEQ] +5C225C9F 229F [Trivial][ILSEQ] +5C225CA0 22A0 [Trivial][ILSEQ] +5C225CA1 22A1 [Trivial][ILSEQ] +5C225CE0 22E0 [Trivial][ILSEQ] +5C225CEF 22EF [Trivial][ILSEQ] +5C225CF9 22F9 [Trivial][ILSEQ] +5C225CFA 22FA [Trivial][ILSEQ] +5C225CFC 22FC [Trivial][ILSEQ] +5C225CFD 22FD [Trivial][ILSEQ] +5C225CFE 22FE [Trivial][ILSEQ] +5C225CFF 22FF [Trivial][ILSEQ] +5C255C00 5C2500 [Regular] +5C255C08 5C2508 [Regular] +5C255C09 5C2509 [Regular] +5C255C0A 5C250A [Regular] +5C255C0D 5C250D [Regular] +5C255C1A 5C251A [Regular] +5C255C22 5C2522 [Regular] +5C255C25 5C255C25 [Preserve][LIKE] +5C255C27 5C2527 [Regular] +5C255C30 5C2500 [Regular] +5C255C3F 5C253F [Regular] +5C255C40 5C2540 [Regular] +5C255C5A 5C251A [Regular] +5C255C5C 5C255C [Regular] +5C255C5F 5C255C5F [Preserve][LIKE] +5C255C61 5C2561 [Regular] +5C255C62 5C2508 [Regular] +5C255C6E 5C250A [Regular] +5C255C72 5C250D [Regular] +5C255C74 5C2509 [Regular] +5C255C7E 5C257E [Regular] +5C255C7F 5C257F [Regular] +5C255C80 5C2580 [Regular][ILSEQ] +5C255C81 5C2581 [Regular][ILSEQ] +5C255C9F 5C259F [Regular][ILSEQ] +5C255CA0 5C25A0 [Regular][ILSEQ] +5C255CA1 5C25A1 [Regular][ILSEQ] +5C255CE0 5C25E0 [Regular][ILSEQ] +5C255CEF 5C25EF [Regular][ILSEQ] +5C255CF9 5C25F9 [Regular][ILSEQ] +5C255CFA 5C25FA [Regular][ILSEQ] +5C255CFC 5C25FC [Regular][ILSEQ] +5C255CFD 5C25FD [Regular][ILSEQ] +5C255CFE 5C25FE [Regular][ILSEQ] +5C255CFF 5C25FF [Regular][ILSEQ] +5C275C00 2700 [Trivial] +5C275C08 2708 [Trivial] +5C275C09 2709 [Trivial] +5C275C0A 270A [Trivial] +5C275C0D 270D [Trivial] +5C275C1A 271A [Trivial] +5C275C22 2722 [Trivial] +5C275C25 275C25 [Regular] +5C275C27 2727 [Trivial] +5C275C30 2700 [Regular] +5C275C3F 273F [Trivial] +5C275C40 2740 [Trivial] +5C275C5A 271A [Regular] +5C275C5C 275C [Regular] +5C275C5F 275C5F [Regular] +5C275C61 2761 [Trivial] +5C275C62 2708 [Regular] +5C275C6E 270A [Regular] +5C275C72 270D [Regular] +5C275C74 2709 [Regular] +5C275C7E 277E [Trivial] +5C275C7F 277F [Trivial] +5C275C80 2780 [Trivial][ILSEQ] +5C275C81 2781 [Trivial][ILSEQ] +5C275C9F 279F [Trivial][ILSEQ] +5C275CA0 27A0 [Trivial][ILSEQ] +5C275CA1 27A1 [Trivial][ILSEQ] +5C275CE0 27E0 [Trivial][ILSEQ] +5C275CEF 27EF [Trivial][ILSEQ] +5C275CF9 27F9 [Trivial][ILSEQ] +5C275CFA 27FA [Trivial][ILSEQ] +5C275CFC 27FC [Trivial][ILSEQ] +5C275CFD 27FD [Trivial][ILSEQ] +5C275CFE 27FE [Trivial][ILSEQ] +5C275CFF 27FF [Trivial][ILSEQ] +5C305C00 0000 [Regular] +5C305C08 0008 [Regular] +5C305C09 0009 [Regular] +5C305C0A 000A [Regular] +5C305C0D 000D [Regular] +5C305C1A 001A [Regular] +5C305C22 0022 [Regular] +5C305C25 005C25 [Regular] +5C305C27 0027 [Regular] +5C305C30 0000 [Regular] +5C305C3F 003F [Regular] +5C305C40 0040 [Regular] +5C305C5A 001A [Regular] +5C305C5C 005C [Regular] +5C305C5F 005C5F [Regular] +5C305C61 0061 [Regular] +5C305C62 0008 [Regular] +5C305C6E 000A [Regular] +5C305C72 000D [Regular] +5C305C74 0009 [Regular] +5C305C7E 007E [Regular] +5C305C7F 007F [Regular] +5C305C80 0080 [Regular][ILSEQ] +5C305C81 0081 [Regular][ILSEQ] +5C305C9F 009F [Regular][ILSEQ] +5C305CA0 00A0 [Regular][ILSEQ] +5C305CA1 00A1 [Regular][ILSEQ] +5C305CE0 00E0 [Regular][ILSEQ] +5C305CEF 00EF [Regular][ILSEQ] +5C305CF9 00F9 [Regular][ILSEQ] +5C305CFA 00FA [Regular][ILSEQ] +5C305CFC 00FC [Regular][ILSEQ] +5C305CFD 00FD [Regular][ILSEQ] +5C305CFE 00FE [Regular][ILSEQ] +5C305CFF 00FF [Regular][ILSEQ] +5C3F5C00 3F00 [Trivial] +5C3F5C08 3F08 [Trivial] +5C3F5C09 3F09 [Trivial] +5C3F5C0A 3F0A [Trivial] +5C3F5C0D 3F0D [Trivial] +5C3F5C1A 3F1A [Trivial] +5C3F5C22 3F22 [Trivial] +5C3F5C25 3F5C25 [Regular] +5C3F5C27 3F27 [Trivial] +5C3F5C30 3F00 [Regular] +5C3F5C3F 3F3F [Trivial] +5C3F5C40 3F40 [Trivial] +5C3F5C5A 3F1A [Regular] +5C3F5C5C 3F5C [Regular] +5C3F5C5F 3F5C5F [Regular] +5C3F5C61 3F61 [Trivial] +5C3F5C62 3F08 [Regular] +5C3F5C6E 3F0A [Regular] +5C3F5C72 3F0D [Regular] +5C3F5C74 3F09 [Regular] +5C3F5C7E 3F7E [Trivial] +5C3F5C7F 3F7F [Trivial] +5C3F5C80 3F80 [Trivial][ILSEQ] +5C3F5C81 3F81 [Trivial][ILSEQ] +5C3F5C9F 3F9F [Trivial][ILSEQ] +5C3F5CA0 3FA0 [Trivial][ILSEQ] +5C3F5CA1 3FA1 [Trivial][ILSEQ] +5C3F5CE0 3FE0 [Trivial][ILSEQ] +5C3F5CEF 3FEF [Trivial][ILSEQ] +5C3F5CF9 3FF9 [Trivial][ILSEQ] +5C3F5CFA 3FFA [Trivial][ILSEQ] +5C3F5CFC 3FFC [Trivial][ILSEQ] +5C3F5CFD 3FFD [Trivial][ILSEQ] +5C3F5CFE 3FFE [Trivial][ILSEQ] +5C3F5CFF 3FFF [Trivial][ILSEQ] +5C405C00 4000 [Trivial] +5C405C08 4008 [Trivial] +5C405C09 4009 [Trivial] +5C405C0A 400A [Trivial] +5C405C0D 400D [Trivial] +5C405C1A 401A [Trivial] +5C405C22 4022 [Trivial] +5C405C25 405C25 [Regular] +5C405C27 4027 [Trivial] +5C405C30 4000 [Regular] +5C405C3F 403F [Trivial] +5C405C40 4040 [Trivial] +5C405C5A 401A [Regular] +5C405C5C 405C [Regular] +5C405C5F 405C5F [Regular] +5C405C61 4061 [Trivial] +5C405C62 4008 [Regular] +5C405C6E 400A [Regular] +5C405C72 400D [Regular] +5C405C74 4009 [Regular] +5C405C7E 407E [Trivial] +5C405C7F 407F [Trivial] +5C405C80 4080 [Trivial][ILSEQ] +5C405C81 4081 [Trivial][ILSEQ] +5C405C9F 409F [Trivial][ILSEQ] +5C405CA0 40A0 [Trivial][ILSEQ] +5C405CA1 40A1 [Trivial][ILSEQ] +5C405CE0 40E0 [Trivial][ILSEQ] +5C405CEF 40EF [Trivial][ILSEQ] +5C405CF9 40F9 [Trivial][ILSEQ] +5C405CFA 40FA [Trivial][ILSEQ] +5C405CFC 40FC [Trivial][ILSEQ] +5C405CFD 40FD [Trivial][ILSEQ] +5C405CFE 40FE [Trivial][ILSEQ] +5C405CFF 40FF [Trivial][ILSEQ] +5C5A5C00 1A00 [Regular] +5C5A5C08 1A08 [Regular] +5C5A5C09 1A09 [Regular] +5C5A5C0A 1A0A [Regular] +5C5A5C0D 1A0D [Regular] +5C5A5C1A 1A1A [Regular] +5C5A5C22 1A22 [Regular] +5C5A5C25 1A5C25 [Regular] +5C5A5C27 1A27 [Regular] +5C5A5C30 1A00 [Regular] +5C5A5C3F 1A3F [Regular] +5C5A5C40 1A40 [Regular] +5C5A5C5A 1A1A [Regular] +5C5A5C5C 1A5C [Regular] +5C5A5C5F 1A5C5F [Regular] +5C5A5C61 1A61 [Regular] +5C5A5C62 1A08 [Regular] +5C5A5C6E 1A0A [Regular] +5C5A5C72 1A0D [Regular] +5C5A5C74 1A09 [Regular] +5C5A5C7E 1A7E [Regular] +5C5A5C7F 1A7F [Regular] +5C5A5C80 1A80 [Regular][ILSEQ] +5C5A5C81 1A81 [Regular][ILSEQ] +5C5A5C9F 1A9F [Regular][ILSEQ] +5C5A5CA0 1AA0 [Regular][ILSEQ] +5C5A5CA1 1AA1 [Regular][ILSEQ] +5C5A5CE0 1AE0 [Regular][ILSEQ] +5C5A5CEF 1AEF [Regular][ILSEQ] +5C5A5CF9 1AF9 [Regular][ILSEQ] +5C5A5CFA 1AFA [Regular][ILSEQ] +5C5A5CFC 1AFC [Regular][ILSEQ] +5C5A5CFD 1AFD [Regular][ILSEQ] +5C5A5CFE 1AFE [Regular][ILSEQ] +5C5A5CFF 1AFF [Regular][ILSEQ] +5C5C5C00 5C00 [Regular] +5C5C5C08 5C08 [Regular] +5C5C5C09 5C09 [Regular] +5C5C5C0A 5C0A [Regular] +5C5C5C0D 5C0D [Regular] +5C5C5C1A 5C1A [Regular] +5C5C5C22 5C22 [Regular] +5C5C5C25 5C5C25 [Regular] +5C5C5C27 5C27 [Regular] +5C5C5C30 5C00 [Regular] +5C5C5C3F 5C3F [Regular] +5C5C5C40 5C40 [Regular] +5C5C5C5A 5C1A [Regular] +5C5C5C5C 5C5C [Regular] +5C5C5C5F 5C5C5F [Regular] +5C5C5C61 5C61 [Regular] +5C5C5C62 5C08 [Regular] +5C5C5C6E 5C0A [Regular] +5C5C5C72 5C0D [Regular] +5C5C5C74 5C09 [Regular] +5C5C5C7E 5C7E [Regular] +5C5C5C7F 5C7F [Regular] +5C5C5C80 5C80 [Regular][ILSEQ] +5C5C5C81 5C81 [Regular][ILSEQ] +5C5C5C9F 5C9F [Regular][ILSEQ] +5C5C5CA0 5CA0 [Regular][ILSEQ] +5C5C5CA1 5CA1 [Regular][ILSEQ] +5C5C5CE0 5CE0 [Regular][ILSEQ] +5C5C5CEF 5CEF [Regular][ILSEQ] +5C5C5CF9 5CF9 [Regular][ILSEQ] +5C5C5CFA 5CFA [Regular][ILSEQ] +5C5C5CFC 5CFC [Regular][ILSEQ] +5C5C5CFD 5CFD [Regular][ILSEQ] +5C5C5CFE 5CFE [Regular][ILSEQ] +5C5C5CFF 5CFF [Regular][ILSEQ] +5C5F5C00 5C5F00 [Regular] +5C5F5C08 5C5F08 [Regular] +5C5F5C09 5C5F09 [Regular] +5C5F5C0A 5C5F0A [Regular] +5C5F5C0D 5C5F0D [Regular] +5C5F5C1A 5C5F1A [Regular] +5C5F5C22 5C5F22 [Regular] +5C5F5C25 5C5F5C25 [Preserve][LIKE] +5C5F5C27 5C5F27 [Regular] +5C5F5C30 5C5F00 [Regular] +5C5F5C3F 5C5F3F [Regular] +5C5F5C40 5C5F40 [Regular] +5C5F5C5A 5C5F1A [Regular] +5C5F5C5C 5C5F5C [Regular] +5C5F5C5F 5C5F5C5F [Preserve][LIKE] +5C5F5C61 5C5F61 [Regular] +5C5F5C62 5C5F08 [Regular] +5C5F5C6E 5C5F0A [Regular] +5C5F5C72 5C5F0D [Regular] +5C5F5C74 5C5F09 [Regular] +5C5F5C7E 5C5F7E [Regular] +5C5F5C7F 5C5F7F [Regular] +5C5F5C80 5C5F80 [Regular][ILSEQ] +5C5F5C81 5C5F81 [Regular][ILSEQ] +5C5F5C9F 5C5F9F [Regular][ILSEQ] +5C5F5CA0 5C5FA0 [Regular][ILSEQ] +5C5F5CA1 5C5FA1 [Regular][ILSEQ] +5C5F5CE0 5C5FE0 [Regular][ILSEQ] +5C5F5CEF 5C5FEF [Regular][ILSEQ] +5C5F5CF9 5C5FF9 [Regular][ILSEQ] +5C5F5CFA 5C5FFA [Regular][ILSEQ] +5C5F5CFC 5C5FFC [Regular][ILSEQ] +5C5F5CFD 5C5FFD [Regular][ILSEQ] +5C5F5CFE 5C5FFE [Regular][ILSEQ] +5C5F5CFF 5C5FFF [Regular][ILSEQ] +5C615C00 6100 [Trivial] +5C615C08 6108 [Trivial] +5C615C09 6109 [Trivial] +5C615C0A 610A [Trivial] +5C615C0D 610D [Trivial] +5C615C1A 611A [Trivial] +5C615C22 6122 [Trivial] +5C615C25 615C25 [Regular] +5C615C27 6127 [Trivial] +5C615C30 6100 [Regular] +5C615C3F 613F [Trivial] +5C615C40 6140 [Trivial] +5C615C5A 611A [Regular] +5C615C5C 615C [Regular] +5C615C5F 615C5F [Regular] +5C615C61 6161 [Trivial] +5C615C62 6108 [Regular] +5C615C6E 610A [Regular] +5C615C72 610D [Regular] +5C615C74 6109 [Regular] +5C615C7E 617E [Trivial] +5C615C7F 617F [Trivial] +5C615C80 6180 [Trivial][ILSEQ] +5C615C81 6181 [Trivial][ILSEQ] +5C615C9F 619F [Trivial][ILSEQ] +5C615CA0 61A0 [Trivial][ILSEQ] +5C615CA1 61A1 [Trivial][ILSEQ] +5C615CE0 61E0 [Trivial][ILSEQ] +5C615CEF 61EF [Trivial][ILSEQ] +5C615CF9 61F9 [Trivial][ILSEQ] +5C615CFA 61FA [Trivial][ILSEQ] +5C615CFC 61FC [Trivial][ILSEQ] +5C615CFD 61FD [Trivial][ILSEQ] +5C615CFE 61FE [Trivial][ILSEQ] +5C615CFF 61FF [Trivial][ILSEQ] +5C625C00 0800 [Regular] +5C625C08 0808 [Regular] +5C625C09 0809 [Regular] +5C625C0A 080A [Regular] +5C625C0D 080D [Regular] +5C625C1A 081A [Regular] +5C625C22 0822 [Regular] +5C625C25 085C25 [Regular] +5C625C27 0827 [Regular] +5C625C30 0800 [Regular] +5C625C3F 083F [Regular] +5C625C40 0840 [Regular] +5C625C5A 081A [Regular] +5C625C5C 085C [Regular] +5C625C5F 085C5F [Regular] +5C625C61 0861 [Regular] +5C625C62 0808 [Regular] +5C625C6E 080A [Regular] +5C625C72 080D [Regular] +5C625C74 0809 [Regular] +5C625C7E 087E [Regular] +5C625C7F 087F [Regular] +5C625C80 0880 [Regular][ILSEQ] +5C625C81 0881 [Regular][ILSEQ] +5C625C9F 089F [Regular][ILSEQ] +5C625CA0 08A0 [Regular][ILSEQ] +5C625CA1 08A1 [Regular][ILSEQ] +5C625CE0 08E0 [Regular][ILSEQ] +5C625CEF 08EF [Regular][ILSEQ] +5C625CF9 08F9 [Regular][ILSEQ] +5C625CFA 08FA [Regular][ILSEQ] +5C625CFC 08FC [Regular][ILSEQ] +5C625CFD 08FD [Regular][ILSEQ] +5C625CFE 08FE [Regular][ILSEQ] +5C625CFF 08FF [Regular][ILSEQ] +5C6E5C00 0A00 [Regular] +5C6E5C08 0A08 [Regular] +5C6E5C09 0A09 [Regular] +5C6E5C0A 0A0A [Regular] +5C6E5C0D 0A0D [Regular] +5C6E5C1A 0A1A [Regular] +5C6E5C22 0A22 [Regular] +5C6E5C25 0A5C25 [Regular] +5C6E5C27 0A27 [Regular] +5C6E5C30 0A00 [Regular] +5C6E5C3F 0A3F [Regular] +5C6E5C40 0A40 [Regular] +5C6E5C5A 0A1A [Regular] +5C6E5C5C 0A5C [Regular] +5C6E5C5F 0A5C5F [Regular] +5C6E5C61 0A61 [Regular] +5C6E5C62 0A08 [Regular] +5C6E5C6E 0A0A [Regular] +5C6E5C72 0A0D [Regular] +5C6E5C74 0A09 [Regular] +5C6E5C7E 0A7E [Regular] +5C6E5C7F 0A7F [Regular] +5C6E5C80 0A80 [Regular][ILSEQ] +5C6E5C81 0A81 [Regular][ILSEQ] +5C6E5C9F 0A9F [Regular][ILSEQ] +5C6E5CA0 0AA0 [Regular][ILSEQ] +5C6E5CA1 0AA1 [Regular][ILSEQ] +5C6E5CE0 0AE0 [Regular][ILSEQ] +5C6E5CEF 0AEF [Regular][ILSEQ] +5C6E5CF9 0AF9 [Regular][ILSEQ] +5C6E5CFA 0AFA [Regular][ILSEQ] +5C6E5CFC 0AFC [Regular][ILSEQ] +5C6E5CFD 0AFD [Regular][ILSEQ] +5C6E5CFE 0AFE [Regular][ILSEQ] +5C6E5CFF 0AFF [Regular][ILSEQ] +5C725C00 0D00 [Regular] +5C725C08 0D08 [Regular] +5C725C09 0D09 [Regular] +5C725C0A 0D0A [Regular] +5C725C0D 0D0D [Regular] +5C725C1A 0D1A [Regular] +5C725C22 0D22 [Regular] +5C725C25 0D5C25 [Regular] +5C725C27 0D27 [Regular] +5C725C30 0D00 [Regular] +5C725C3F 0D3F [Regular] +5C725C40 0D40 [Regular] +5C725C5A 0D1A [Regular] +5C725C5C 0D5C [Regular] +5C725C5F 0D5C5F [Regular] +5C725C61 0D61 [Regular] +5C725C62 0D08 [Regular] +5C725C6E 0D0A [Regular] +5C725C72 0D0D [Regular] +5C725C74 0D09 [Regular] +5C725C7E 0D7E [Regular] +5C725C7F 0D7F [Regular] +5C725C80 0D80 [Regular][ILSEQ] +5C725C81 0D81 [Regular][ILSEQ] +5C725C9F 0D9F [Regular][ILSEQ] +5C725CA0 0DA0 [Regular][ILSEQ] +5C725CA1 0DA1 [Regular][ILSEQ] +5C725CE0 0DE0 [Regular][ILSEQ] +5C725CEF 0DEF [Regular][ILSEQ] +5C725CF9 0DF9 [Regular][ILSEQ] +5C725CFA 0DFA [Regular][ILSEQ] +5C725CFC 0DFC [Regular][ILSEQ] +5C725CFD 0DFD [Regular][ILSEQ] +5C725CFE 0DFE [Regular][ILSEQ] +5C725CFF 0DFF [Regular][ILSEQ] +5C745C00 0900 [Regular] +5C745C08 0908 [Regular] +5C745C09 0909 [Regular] +5C745C0A 090A [Regular] +5C745C0D 090D [Regular] +5C745C1A 091A [Regular] +5C745C22 0922 [Regular] +5C745C25 095C25 [Regular] +5C745C27 0927 [Regular] +5C745C30 0900 [Regular] +5C745C3F 093F [Regular] +5C745C40 0940 [Regular] +5C745C5A 091A [Regular] +5C745C5C 095C [Regular] +5C745C5F 095C5F [Regular] +5C745C61 0961 [Regular] +5C745C62 0908 [Regular] +5C745C6E 090A [Regular] +5C745C72 090D [Regular] +5C745C74 0909 [Regular] +5C745C7E 097E [Regular] +5C745C7F 097F [Regular] +5C745C80 0980 [Regular][ILSEQ] +5C745C81 0981 [Regular][ILSEQ] +5C745C9F 099F [Regular][ILSEQ] +5C745CA0 09A0 [Regular][ILSEQ] +5C745CA1 09A1 [Regular][ILSEQ] +5C745CE0 09E0 [Regular][ILSEQ] +5C745CEF 09EF [Regular][ILSEQ] +5C745CF9 09F9 [Regular][ILSEQ] +5C745CFA 09FA [Regular][ILSEQ] +5C745CFC 09FC [Regular][ILSEQ] +5C745CFD 09FD [Regular][ILSEQ] +5C745CFE 09FE [Regular][ILSEQ] +5C745CFF 09FF [Regular][ILSEQ] +5C7E5C00 7E00 [Trivial] +5C7E5C08 7E08 [Trivial] +5C7E5C09 7E09 [Trivial] +5C7E5C0A 7E0A [Trivial] +5C7E5C0D 7E0D [Trivial] +5C7E5C1A 7E1A [Trivial] +5C7E5C22 7E22 [Trivial] +5C7E5C25 7E5C25 [Regular] +5C7E5C27 7E27 [Trivial] +5C7E5C30 7E00 [Regular] +5C7E5C3F 7E3F [Trivial] +5C7E5C40 7E40 [Trivial] +5C7E5C5A 7E1A [Regular] +5C7E5C5C 7E5C [Regular] +5C7E5C5F 7E5C5F [Regular] +5C7E5C61 7E61 [Trivial] +5C7E5C62 7E08 [Regular] +5C7E5C6E 7E0A [Regular] +5C7E5C72 7E0D [Regular] +5C7E5C74 7E09 [Regular] +5C7E5C7E 7E7E [Trivial] +5C7E5C7F 7E7F [Trivial] +5C7E5C80 7E80 [Trivial][ILSEQ] +5C7E5C81 7E81 [Trivial][ILSEQ] +5C7E5C9F 7E9F [Trivial][ILSEQ] +5C7E5CA0 7EA0 [Trivial][ILSEQ] +5C7E5CA1 7EA1 [Trivial][ILSEQ] +5C7E5CE0 7EE0 [Trivial][ILSEQ] +5C7E5CEF 7EEF [Trivial][ILSEQ] +5C7E5CF9 7EF9 [Trivial][ILSEQ] +5C7E5CFA 7EFA [Trivial][ILSEQ] +5C7E5CFC 7EFC [Trivial][ILSEQ] +5C7E5CFD 7EFD [Trivial][ILSEQ] +5C7E5CFE 7EFE [Trivial][ILSEQ] +5C7E5CFF 7EFF [Trivial][ILSEQ] +5C7F5C00 7F00 [Trivial] +5C7F5C08 7F08 [Trivial] +5C7F5C09 7F09 [Trivial] +5C7F5C0A 7F0A [Trivial] +5C7F5C0D 7F0D [Trivial] +5C7F5C1A 7F1A [Trivial] +5C7F5C22 7F22 [Trivial] +5C7F5C25 7F5C25 [Regular] +5C7F5C27 7F27 [Trivial] +5C7F5C30 7F00 [Regular] +5C7F5C3F 7F3F [Trivial] +5C7F5C40 7F40 [Trivial] +5C7F5C5A 7F1A [Regular] +5C7F5C5C 7F5C [Regular] +5C7F5C5F 7F5C5F [Regular] +5C7F5C61 7F61 [Trivial] +5C7F5C62 7F08 [Regular] +5C7F5C6E 7F0A [Regular] +5C7F5C72 7F0D [Regular] +5C7F5C74 7F09 [Regular] +5C7F5C7E 7F7E [Trivial] +5C7F5C7F 7F7F [Trivial] +5C7F5C80 7F80 [Trivial][ILSEQ] +5C7F5C81 7F81 [Trivial][ILSEQ] +5C7F5C9F 7F9F [Trivial][ILSEQ] +5C7F5CA0 7FA0 [Trivial][ILSEQ] +5C7F5CA1 7FA1 [Trivial][ILSEQ] +5C7F5CE0 7FE0 [Trivial][ILSEQ] +5C7F5CEF 7FEF [Trivial][ILSEQ] +5C7F5CF9 7FF9 [Trivial][ILSEQ] +5C7F5CFA 7FFA [Trivial][ILSEQ] +5C7F5CFC 7FFC [Trivial][ILSEQ] +5C7F5CFD 7FFD [Trivial][ILSEQ] +5C7F5CFE 7FFE [Trivial][ILSEQ] +5C7F5CFF 7FFF [Trivial][ILSEQ] +5C805C00 8000 [Trivial][ILSEQ] +5C805C08 8008 [Trivial][ILSEQ] +5C805C09 8009 [Trivial][ILSEQ] +5C805C0A 800A [Trivial][ILSEQ] +5C805C0D 800D [Trivial][ILSEQ] +5C805C1A 801A [Trivial][ILSEQ] +5C805C22 8022 [Trivial][ILSEQ] +5C805C25 805C25 [Regular][ILSEQ] +5C805C27 8027 [Trivial][ILSEQ] +5C805C30 8000 [Regular][ILSEQ] +5C805C3F 803F [Trivial][ILSEQ] +5C805C40 8040 [Trivial][ILSEQ] +5C805C5A 801A [Regular][ILSEQ] +5C805C5C 805C [Regular][ILSEQ] +5C805C5F 805C5F [Regular][ILSEQ] +5C805C61 8061 [Trivial][ILSEQ] +5C805C62 8008 [Regular][ILSEQ] +5C805C6E 800A [Regular][ILSEQ] +5C805C72 800D [Regular][ILSEQ] +5C805C74 8009 [Regular][ILSEQ] +5C805C7E 807E [Trivial][ILSEQ] +5C805C7F 807F [Trivial][ILSEQ] +5C805C80 8080 [Trivial][ILSEQ] +5C805C81 8081 [Trivial][ILSEQ] +5C805C9F 809F [Trivial][ILSEQ] +5C805CA0 80A0 [Trivial][ILSEQ] +5C805CA1 80A1 [Trivial][ILSEQ] +5C805CE0 80E0 [Trivial][ILSEQ] +5C805CEF 80EF [Trivial][ILSEQ] +5C805CF9 80F9 [Trivial][ILSEQ] +5C805CFA 80FA [Trivial][ILSEQ] +5C805CFC 80FC [Trivial][ILSEQ] +5C805CFD 80FD [Trivial][ILSEQ] +5C805CFE 80FE [Trivial][ILSEQ] +5C805CFF 80FF [Trivial][ILSEQ] +5C815C00 8100 [Trivial][BROKE] +5C815C08 8108 [Trivial][BROKE] +5C815C09 8109 [Trivial][BROKE] +5C815C0A 810A [Trivial][BROKE] +5C815C0D 810D [Trivial][BROKE] +5C815C1A 811A [Trivial][BROKE] +5C815C22 8122 [Trivial][BROKE] +5C815C25 815C25 [Regular] +5C815C27 8127 [Trivial][BROKE] +5C815C30 8100 [Regular][BROKE] +5C815C3F 813F [Trivial][BROKE] +5C815C40 8140 [Trivial][USER] +5C815C5A 811A [Regular][BROKE] +5C815C5C 815C [Regular][USER] +5C815C5F 815C5F [Regular] +5C815C61 8161 [Trivial][USER] +5C815C62 8108 [Regular][BROKE][USER] +5C815C6E 810A [Regular][BROKE] +5C815C72 810D [Regular][BROKE] +5C815C74 8109 [Regular][BROKE] +5C815C7E 817E [Trivial][USER] +5C815C7F 817F [Trivial][BROKE] +5C815C80 8180 [Trivial][FIXED][USER] +5C815C81 8181 [Trivial][FIXED][USER] +5C815C9F 819F [Trivial][FIXED][USER] +5C815CA0 81A0 [Trivial][FIXED][USER] +5C815CA1 81A1 [Trivial][FIXED][USER] +5C815CE0 81E0 [Trivial][FIXED][USER] +5C815CEF 81EF [Trivial][FIXED][USER] +5C815CF9 81F9 [Trivial][FIXED][USER] +5C815CFA 81FA [Trivial][FIXED][USER] +5C815CFC 81FC [Trivial][FIXED][USER] +5C815CFD 81FD [Trivial][FIXED][USER] +5C815CFE 81FE [Trivial][FIXED][USER] +5C815CFF 81FF [Trivial][ILSEQ] +5C9F5C00 9F00 [Trivial][BROKE] +5C9F5C08 9F08 [Trivial][BROKE] +5C9F5C09 9F09 [Trivial][BROKE] +5C9F5C0A 9F0A [Trivial][BROKE] +5C9F5C0D 9F0D [Trivial][BROKE] +5C9F5C1A 9F1A [Trivial][BROKE] +5C9F5C22 9F22 [Trivial][BROKE] +5C9F5C25 9F5C25 [Regular] +5C9F5C27 9F27 [Trivial][BROKE] +5C9F5C30 9F00 [Regular][BROKE] +5C9F5C3F 9F3F [Trivial][BROKE] +5C9F5C40 9F40 [Trivial][USER] +5C9F5C5A 9F1A [Regular][BROKE] +5C9F5C5C 9F5C [Regular][USER] +5C9F5C5F 9F5C5F [Regular] +5C9F5C61 9F61 [Trivial][USER] +5C9F5C62 9F08 [Regular][BROKE][USER] +5C9F5C6E 9F0A [Regular][BROKE] +5C9F5C72 9F0D [Regular][BROKE] +5C9F5C74 9F09 [Regular][BROKE] +5C9F5C7E 9F7E [Trivial][USER] +5C9F5C7F 9F7F [Trivial][BROKE] +5C9F5C80 9F80 [Trivial][FIXED][USER] +5C9F5C81 9F81 [Trivial][FIXED][USER] +5C9F5C9F 9F9F [Trivial][FIXED][USER] +5C9F5CA0 9FA0 [Trivial][FIXED][USER] +5C9F5CA1 9FA1 [Trivial][FIXED][USER] +5C9F5CE0 9FE0 [Trivial][FIXED][USER] +5C9F5CEF 9FEF [Trivial][FIXED][USER] +5C9F5CF9 9FF9 [Trivial][FIXED][USER] +5C9F5CFA 9FFA [Trivial][FIXED][USER] +5C9F5CFC 9FFC [Trivial][FIXED][USER] +5C9F5CFD 9FFD [Trivial][FIXED][USER] +5C9F5CFE 9FFE [Trivial][FIXED][USER] +5C9F5CFF 9FFF [Trivial][ILSEQ] +5CA05C00 A000 [Trivial][BROKE] +5CA05C08 A008 [Trivial][BROKE] +5CA05C09 A009 [Trivial][BROKE] +5CA05C0A A00A [Trivial][BROKE] +5CA05C0D A00D [Trivial][BROKE] +5CA05C1A A01A [Trivial][BROKE] +5CA05C22 A022 [Trivial][BROKE] +5CA05C25 A05C25 [Regular] +5CA05C27 A027 [Trivial][BROKE] +5CA05C30 A000 [Regular][BROKE] +5CA05C3F A03F [Trivial][BROKE] +5CA05C40 A040 [Trivial][USER] +5CA05C5A A01A [Regular][BROKE] +5CA05C5C A05C [Regular][USER] +5CA05C5F A05C5F [Regular] +5CA05C61 A061 [Trivial][USER] +5CA05C62 A008 [Regular][BROKE][USER] +5CA05C6E A00A [Regular][BROKE] +5CA05C72 A00D [Regular][BROKE] +5CA05C74 A009 [Regular][BROKE] +5CA05C7E A07E [Trivial][USER] +5CA05C7F A07F [Trivial][BROKE] +5CA05C80 A080 [Trivial][FIXED][USER] +5CA05C81 A081 [Trivial][FIXED][USER] +5CA05C9F A09F [Trivial][FIXED][USER] +5CA05CA0 A0A0 [Trivial][FIXED][USER] +5CA05CA1 A0A1 [Trivial][FIXED][USER] +5CA05CE0 A0E0 [Trivial][FIXED][USER] +5CA05CEF A0EF [Trivial][FIXED][USER] +5CA05CF9 A0F9 [Trivial][FIXED][USER] +5CA05CFA A0FA [Trivial][FIXED][USER] +5CA05CFC A0FC [Trivial][FIXED][USER] +5CA05CFD A0FD [Trivial][FIXED][USER] +5CA05CFE A0FE [Trivial][FIXED][USER] +5CA05CFF A0FF [Trivial][ILSEQ] +5CA15C00 A100 [Trivial][BROKE] +5CA15C08 A108 [Trivial][BROKE] +5CA15C09 A109 [Trivial][BROKE] +5CA15C0A A10A [Trivial][BROKE] +5CA15C0D A10D [Trivial][BROKE] +5CA15C1A A11A [Trivial][BROKE] +5CA15C22 A122 [Trivial][BROKE] +5CA15C25 A15C25 [Regular] +5CA15C27 A127 [Trivial][BROKE] +5CA15C30 A100 [Regular][BROKE] +5CA15C3F A13F [Trivial][BROKE] +5CA15C40 A140 [Trivial][USER] +5CA15C5A A11A [Regular][BROKE] +5CA15C5C A15C [Regular][USER] +5CA15C5F A15C5F [Regular] +5CA15C61 A161 [Trivial][USER] +5CA15C62 A108 [Regular][BROKE][USER] +5CA15C6E A10A [Regular][BROKE] +5CA15C72 A10D [Regular][BROKE] +5CA15C74 A109 [Regular][BROKE] +5CA15C7E A17E [Trivial][USER] +5CA15C7F A17F [Trivial][BROKE] +5CA15C80 A180 [Trivial][FIXED][USER] +5CA15C81 A181 [Trivial][FIXED][USER] +5CA15C9F A19F [Trivial][FIXED][USER] +5CA15CA0 A1A0 [Trivial][FIXED][USER] +5CA15CA1 A1A1 [Trivial][FIXED][USER] +5CA15CE0 A1E0 [Trivial][FIXED][USER] +5CA15CEF A1EF [Trivial][FIXED][USER] +5CA15CF9 A1F9 [Trivial][FIXED][USER] +5CA15CFA A1FA [Trivial][FIXED][USER] +5CA15CFC A1FC [Trivial][FIXED][USER] +5CA15CFD A1FD [Trivial][FIXED][USER] +5CA15CFE A1FE [Trivial][FIXED][USER] +5CA15CFF A1FF [Trivial][ILSEQ] +5CE05C00 E000 [Trivial][BROKE] +5CE05C08 E008 [Trivial][BROKE] +5CE05C09 E009 [Trivial][BROKE] +5CE05C0A E00A [Trivial][BROKE] +5CE05C0D E00D [Trivial][BROKE] +5CE05C1A E01A [Trivial][BROKE] +5CE05C22 E022 [Trivial][BROKE] +5CE05C25 E05C25 [Regular] +5CE05C27 E027 [Trivial][BROKE] +5CE05C30 E000 [Regular][BROKE] +5CE05C3F E03F [Trivial][BROKE] +5CE05C40 E040 [Trivial][USER] +5CE05C5A E01A [Regular][BROKE] +5CE05C5C E05C [Regular][USER] +5CE05C5F E05C5F [Regular] +5CE05C61 E061 [Trivial][USER] +5CE05C62 E008 [Regular][BROKE][USER] +5CE05C6E E00A [Regular][BROKE] +5CE05C72 E00D [Regular][BROKE] +5CE05C74 E009 [Regular][BROKE] +5CE05C7E E07E [Trivial][USER] +5CE05C7F E07F [Trivial][BROKE] +5CE05C80 E080 [Trivial][FIXED][USER] +5CE05C81 E081 [Trivial][FIXED][USER] +5CE05C9F E09F [Trivial][FIXED][USER] +5CE05CA0 E0A0 [Trivial][FIXED][USER] +5CE05CA1 E0A1 [Trivial][FIXED][USER] +5CE05CE0 E0E0 [Trivial][FIXED][USER] +5CE05CEF E0EF [Trivial][FIXED][USER] +5CE05CF9 E0F9 [Trivial][FIXED][USER] +5CE05CFA E0FA [Trivial][FIXED][USER] +5CE05CFC E0FC [Trivial][FIXED][USER] +5CE05CFD E0FD [Trivial][FIXED][USER] +5CE05CFE E0FE [Trivial][FIXED][USER] +5CE05CFF E0FF [Trivial][ILSEQ] +5CEF5C00 EF00 [Trivial][BROKE] +5CEF5C08 EF08 [Trivial][BROKE] +5CEF5C09 EF09 [Trivial][BROKE] +5CEF5C0A EF0A [Trivial][BROKE] +5CEF5C0D EF0D [Trivial][BROKE] +5CEF5C1A EF1A [Trivial][BROKE] +5CEF5C22 EF22 [Trivial][BROKE] +5CEF5C25 EF5C25 [Regular] +5CEF5C27 EF27 [Trivial][BROKE] +5CEF5C30 EF00 [Regular][BROKE] +5CEF5C3F EF3F [Trivial][BROKE] +5CEF5C40 EF40 [Trivial][USER] +5CEF5C5A EF1A [Regular][BROKE] +5CEF5C5C EF5C [Regular][USER] +5CEF5C5F EF5C5F [Regular] +5CEF5C61 EF61 [Trivial][USER] +5CEF5C62 EF08 [Regular][BROKE][USER] +5CEF5C6E EF0A [Regular][BROKE] +5CEF5C72 EF0D [Regular][BROKE] +5CEF5C74 EF09 [Regular][BROKE] +5CEF5C7E EF7E [Trivial][USER] +5CEF5C7F EF7F [Trivial][BROKE] +5CEF5C80 EF80 [Trivial][FIXED][USER] +5CEF5C81 EF81 [Trivial][FIXED][USER] +5CEF5C9F EF9F [Trivial][FIXED][USER] +5CEF5CA0 EFA0 [Trivial][FIXED][USER] +5CEF5CA1 EFA1 [Trivial][FIXED][USER] +5CEF5CE0 EFE0 [Trivial][FIXED][USER] +5CEF5CEF EFEF [Trivial][FIXED][USER] +5CEF5CF9 EFF9 [Trivial][FIXED][USER] +5CEF5CFA EFFA [Trivial][FIXED][USER] +5CEF5CFC EFFC [Trivial][FIXED][USER] +5CEF5CFD EFFD [Trivial][FIXED][USER] +5CEF5CFE EFFE [Trivial][FIXED][USER] +5CEF5CFF EFFF [Trivial][ILSEQ] +5CF95C00 F900 [Trivial][BROKE] +5CF95C08 F908 [Trivial][BROKE] +5CF95C09 F909 [Trivial][BROKE] +5CF95C0A F90A [Trivial][BROKE] +5CF95C0D F90D [Trivial][BROKE] +5CF95C1A F91A [Trivial][BROKE] +5CF95C22 F922 [Trivial][BROKE] +5CF95C25 F95C25 [Regular] +5CF95C27 F927 [Trivial][BROKE] +5CF95C30 F900 [Regular][BROKE] +5CF95C3F F93F [Trivial][BROKE] +5CF95C40 F940 [Trivial][USER] +5CF95C5A F91A [Regular][BROKE] +5CF95C5C F95C [Regular][USER] +5CF95C5F F95C5F [Regular] +5CF95C61 F961 [Trivial][USER] +5CF95C62 F908 [Regular][BROKE][USER] +5CF95C6E F90A [Regular][BROKE] +5CF95C72 F90D [Regular][BROKE] +5CF95C74 F909 [Regular][BROKE] +5CF95C7E F97E [Trivial][USER] +5CF95C7F F97F [Trivial][BROKE] +5CF95C80 F980 [Trivial][FIXED][USER] +5CF95C81 F981 [Trivial][FIXED][USER] +5CF95C9F F99F [Trivial][FIXED][USER] +5CF95CA0 F9A0 [Trivial][FIXED][USER] +5CF95CA1 F9A1 [Trivial][FIXED][USER] +5CF95CE0 F9E0 [Trivial][FIXED][USER] +5CF95CEF F9EF [Trivial][FIXED][USER] +5CF95CF9 F9F9 [Trivial][FIXED][USER] +5CF95CFA F9FA [Trivial][FIXED][USER] +5CF95CFC F9FC [Trivial][FIXED][USER] +5CF95CFD F9FD [Trivial][FIXED][USER] +5CF95CFE F9FE [Trivial][FIXED][USER] +5CF95CFF F9FF [Trivial][ILSEQ] +5CFA5C00 FA00 [Trivial][BROKE] +5CFA5C08 FA08 [Trivial][BROKE] +5CFA5C09 FA09 [Trivial][BROKE] +5CFA5C0A FA0A [Trivial][BROKE] +5CFA5C0D FA0D [Trivial][BROKE] +5CFA5C1A FA1A [Trivial][BROKE] +5CFA5C22 FA22 [Trivial][BROKE] +5CFA5C25 FA5C25 [Regular] +5CFA5C27 FA27 [Trivial][BROKE] +5CFA5C30 FA00 [Regular][BROKE] +5CFA5C3F FA3F [Trivial][BROKE] +5CFA5C40 FA40 [Trivial][USER] +5CFA5C5A FA1A [Regular][BROKE] +5CFA5C5C FA5C [Regular][USER] +5CFA5C5F FA5C5F [Regular] +5CFA5C61 FA61 [Trivial][USER] +5CFA5C62 FA08 [Regular][BROKE][USER] +5CFA5C6E FA0A [Regular][BROKE] +5CFA5C72 FA0D [Regular][BROKE] +5CFA5C74 FA09 [Regular][BROKE] +5CFA5C7E FA7E [Trivial][USER] +5CFA5C7F FA7F [Trivial][BROKE] +5CFA5C80 FA80 [Trivial][FIXED][USER] +5CFA5C81 FA81 [Trivial][FIXED][USER] +5CFA5C9F FA9F [Trivial][FIXED][USER] +5CFA5CA0 FAA0 [Trivial][FIXED][USER] +5CFA5CA1 FAA1 [Trivial][FIXED][USER] +5CFA5CE0 FAE0 [Trivial][FIXED][USER] +5CFA5CEF FAEF [Trivial][FIXED][USER] +5CFA5CF9 FAF9 [Trivial][FIXED][USER] +5CFA5CFA FAFA [Trivial][FIXED][USER] +5CFA5CFC FAFC [Trivial][FIXED][USER] +5CFA5CFD FAFD [Trivial][FIXED][USER] +5CFA5CFE FAFE [Trivial][FIXED][USER] +5CFA5CFF FAFF [Trivial][ILSEQ] +5CFC5C00 FC00 [Trivial][BROKE] +5CFC5C08 FC08 [Trivial][BROKE] +5CFC5C09 FC09 [Trivial][BROKE] +5CFC5C0A FC0A [Trivial][BROKE] +5CFC5C0D FC0D [Trivial][BROKE] +5CFC5C1A FC1A [Trivial][BROKE] +5CFC5C22 FC22 [Trivial][BROKE] +5CFC5C25 FC5C25 [Regular] +5CFC5C27 FC27 [Trivial][BROKE] +5CFC5C30 FC00 [Regular][BROKE] +5CFC5C3F FC3F [Trivial][BROKE] +5CFC5C40 FC40 [Trivial][USER] +5CFC5C5A FC1A [Regular][BROKE] +5CFC5C5C FC5C [Regular][USER] +5CFC5C5F FC5C5F [Regular] +5CFC5C61 FC61 [Trivial][USER] +5CFC5C62 FC08 [Regular][BROKE][USER] +5CFC5C6E FC0A [Regular][BROKE] +5CFC5C72 FC0D [Regular][BROKE] +5CFC5C74 FC09 [Regular][BROKE] +5CFC5C7E FC7E [Trivial][USER] +5CFC5C7F FC7F [Trivial][BROKE] +5CFC5C80 FC80 [Trivial][FIXED][USER] +5CFC5C81 FC81 [Trivial][FIXED][USER] +5CFC5C9F FC9F [Trivial][FIXED][USER] +5CFC5CA0 FCA0 [Trivial][FIXED][USER] +5CFC5CA1 FCA1 [Trivial][FIXED][USER] +5CFC5CE0 FCE0 [Trivial][FIXED][USER] +5CFC5CEF FCEF [Trivial][FIXED][USER] +5CFC5CF9 FCF9 [Trivial][FIXED][USER] +5CFC5CFA FCFA [Trivial][FIXED][USER] +5CFC5CFC FCFC [Trivial][FIXED][USER] +5CFC5CFD FCFD [Trivial][FIXED][USER] +5CFC5CFE FCFE [Trivial][FIXED][USER] +5CFC5CFF FCFF [Trivial][ILSEQ] +5CFD5C00 FD00 [Trivial][BROKE] +5CFD5C08 FD08 [Trivial][BROKE] +5CFD5C09 FD09 [Trivial][BROKE] +5CFD5C0A FD0A [Trivial][BROKE] +5CFD5C0D FD0D [Trivial][BROKE] +5CFD5C1A FD1A [Trivial][BROKE] +5CFD5C22 FD22 [Trivial][BROKE] +5CFD5C25 FD5C25 [Regular] +5CFD5C27 FD27 [Trivial][BROKE] +5CFD5C30 FD00 [Regular][BROKE] +5CFD5C3F FD3F [Trivial][BROKE] +5CFD5C40 FD40 [Trivial][USER] +5CFD5C5A FD1A [Regular][BROKE] +5CFD5C5C FD5C [Regular][USER] +5CFD5C5F FD5C5F [Regular] +5CFD5C61 FD61 [Trivial][USER] +5CFD5C62 FD08 [Regular][BROKE][USER] +5CFD5C6E FD0A [Regular][BROKE] +5CFD5C72 FD0D [Regular][BROKE] +5CFD5C74 FD09 [Regular][BROKE] +5CFD5C7E FD7E [Trivial][USER] +5CFD5C7F FD7F [Trivial][BROKE] +5CFD5C80 FD80 [Trivial][FIXED][USER] +5CFD5C81 FD81 [Trivial][FIXED][USER] +5CFD5C9F FD9F [Trivial][FIXED][USER] +5CFD5CA0 FDA0 [Trivial][FIXED][USER] +5CFD5CA1 FDA1 [Trivial][FIXED][USER] +5CFD5CE0 FDE0 [Trivial][FIXED][USER] +5CFD5CEF FDEF [Trivial][FIXED][USER] +5CFD5CF9 FDF9 [Trivial][FIXED][USER] +5CFD5CFA FDFA [Trivial][FIXED][USER] +5CFD5CFC FDFC [Trivial][FIXED][USER] +5CFD5CFD FDFD [Trivial][FIXED][USER] +5CFD5CFE FDFE [Trivial][FIXED][USER] +5CFD5CFF FDFF [Trivial][ILSEQ] +5CFE5C00 FE00 [Trivial][BROKE] +5CFE5C08 FE08 [Trivial][BROKE] +5CFE5C09 FE09 [Trivial][BROKE] +5CFE5C0A FE0A [Trivial][BROKE] +5CFE5C0D FE0D [Trivial][BROKE] +5CFE5C1A FE1A [Trivial][BROKE] +5CFE5C22 FE22 [Trivial][BROKE] +5CFE5C25 FE5C25 [Regular] +5CFE5C27 FE27 [Trivial][BROKE] +5CFE5C30 FE00 [Regular][BROKE] +5CFE5C3F FE3F [Trivial][BROKE] +5CFE5C40 FE40 [Trivial][USER] +5CFE5C5A FE1A [Regular][BROKE] +5CFE5C5C FE5C [Regular][USER] +5CFE5C5F FE5C5F [Regular] +5CFE5C61 FE61 [Trivial][USER] +5CFE5C62 FE08 [Regular][BROKE][USER] +5CFE5C6E FE0A [Regular][BROKE] +5CFE5C72 FE0D [Regular][BROKE] +5CFE5C74 FE09 [Regular][BROKE] +5CFE5C7E FE7E [Trivial][USER] +5CFE5C7F FE7F [Trivial][BROKE] +5CFE5C80 FE80 [Trivial][FIXED][USER] +5CFE5C81 FE81 [Trivial][FIXED][USER] +5CFE5C9F FE9F [Trivial][FIXED][USER] +5CFE5CA0 FEA0 [Trivial][FIXED][USER] +5CFE5CA1 FEA1 [Trivial][FIXED][USER] +5CFE5CE0 FEE0 [Trivial][FIXED][USER] +5CFE5CEF FEEF [Trivial][FIXED][USER] +5CFE5CF9 FEF9 [Trivial][FIXED][USER] +5CFE5CFA FEFA [Trivial][FIXED][USER] +5CFE5CFC FEFC [Trivial][FIXED][USER] +5CFE5CFD FEFD [Trivial][FIXED][USER] +5CFE5CFE FEFE [Trivial][FIXED][USER] +5CFE5CFF FEFF [Trivial][ILSEQ] +5CFF5C00 FF00 [Trivial][ILSEQ] +5CFF5C08 FF08 [Trivial][ILSEQ] +5CFF5C09 FF09 [Trivial][ILSEQ] +5CFF5C0A FF0A [Trivial][ILSEQ] +5CFF5C0D FF0D [Trivial][ILSEQ] +5CFF5C1A FF1A [Trivial][ILSEQ] +5CFF5C22 FF22 [Trivial][ILSEQ] +5CFF5C25 FF5C25 [Regular][ILSEQ] +5CFF5C27 FF27 [Trivial][ILSEQ] +5CFF5C30 FF00 [Regular][ILSEQ] +5CFF5C3F FF3F [Trivial][ILSEQ] +5CFF5C40 FF40 [Trivial][ILSEQ] +5CFF5C5A FF1A [Regular][ILSEQ] +5CFF5C5C FF5C [Regular][ILSEQ] +5CFF5C5F FF5C5F [Regular][ILSEQ] +5CFF5C61 FF61 [Trivial][ILSEQ] +5CFF5C62 FF08 [Regular][ILSEQ] +5CFF5C6E FF0A [Regular][ILSEQ] +5CFF5C72 FF0D [Regular][ILSEQ] +5CFF5C74 FF09 [Regular][ILSEQ] +5CFF5C7E FF7E [Trivial][ILSEQ] +5CFF5C7F FF7F [Trivial][ILSEQ] +5CFF5C80 FF80 [Trivial][ILSEQ] +5CFF5C81 FF81 [Trivial][ILSEQ] +5CFF5C9F FF9F [Trivial][ILSEQ] +5CFF5CA0 FFA0 [Trivial][ILSEQ] +5CFF5CA1 FFA1 [Trivial][ILSEQ] +5CFF5CE0 FFE0 [Trivial][ILSEQ] +5CFF5CEF FFEF [Trivial][ILSEQ] +5CFF5CF9 FFF9 [Trivial][ILSEQ] +5CFF5CFA FFFA [Trivial][ILSEQ] +5CFF5CFC FFFC [Trivial][ILSEQ] +5CFF5CFD FFFD [Trivial][ILSEQ] +5CFF5CFE FFFE [Trivial][ILSEQ] +5CFF5CFF FFFF [Trivial][ILSEQ] +DROP TABLE t1; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP FUNCTION unescape; +DROP FUNCTION unescape_type; +DROP FUNCTION wellformedness; +DROP FUNCTION mysql_real_escape_string_generated; +DROP FUNCTION iswellformed; +DROP TABLE allbytes; +# End of ctype_backslash.inc +SET NAMES gbk; +# Start of ctype_E05C.inc +SELECT HEX('à\'),HEX('à\t'); +HEX('à\') HEX('à\t') +E05C E05C74 +SELECT HEX('\\à\'),HEX('\\à\t'),HEX('\\à\t\t'); +HEX('\\à\') HEX('\\à\t') HEX('\\à\t\t') +5CE05C 5CE05C74 5CE05C7409 +SELECT HEX('''à\'),HEX('à\'''); +HEX('''à\') HEX('à\''') +27E05C E05C27 +SELECT HEX('\\''à\'),HEX('à\''\\'); +HEX('\\''à\') HEX('à\''\\') +5C27E05C E05C275C +SELECT HEX(BINARY('à\')),HEX(BINARY('à\t')); +HEX(BINARY('à\')) HEX(BINARY('à\t')) +E05C E05C74 +SELECT HEX(BINARY('\\à\')),HEX(BINARY('\\à\t')),HEX(BINARY('\\à\t\t')); +HEX(BINARY('\\à\')) HEX(BINARY('\\à\t')) HEX(BINARY('\\à\t\t')) +5CE05C 5CE05C74 5CE05C7409 +SELECT HEX(BINARY('''à\')),HEX(BINARY('à\''')); +HEX(BINARY('''à\')) HEX(BINARY('à\''')) +27E05C E05C27 +SELECT HEX(BINARY('\\''à\')),HEX(BINARY('à\''\\')); +HEX(BINARY('\\''à\')) HEX(BINARY('à\''\\')) +5C27E05C E05C275C +SELECT HEX(_BINARY'à\'),HEX(_BINARY'à\t'); +HEX(_BINARY'à\') HEX(_BINARY'à\t') +E05C E05C74 +SELECT HEX(_BINARY'\\à\'),HEX(_BINARY'\\à\t'),HEX(_BINARY'\\à\t\t'); +HEX(_BINARY'\\à\') HEX(_BINARY'\\à\t') HEX(_BINARY'\\à\t\t') +5CE05C 5CE05C74 5CE05C7409 +SELECT HEX(_BINARY'''à\'),HEX(_BINARY'à\'''); +HEX(_BINARY'''à\') HEX(_BINARY'à\''') +27E05C E05C27 +SELECT HEX(_BINARY'\\''à\'),HEX(_BINARY'à\''\\'); +HEX(_BINARY'\\''à\') HEX(_BINARY'à\''\\') +5C27E05C E05C275C +CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET gbk NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('à\'),('à\t'); +INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t'); +INSERT INTO t1 VALUES ('''à\'),('à\'''); +INSERT INTO t1 VALUES ('\\''à\'),('à\''\\'); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 (a BLOB); +INSERT INTO t1 VALUES ('à\'),('à\t'); +INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t'); +INSERT INTO t1 VALUES ('''à\'),('à\'''); +INSERT INTO t1 VALUES ('\\''à\'),('à\''\\'); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET gbk NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t')); +INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t')); +INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\''')); +INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\')); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 (a BLOB); +INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t')); +INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t')); +INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\''')); +INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\')); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET gbk NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t'); +INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t'); +INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\'''); +INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\'); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 (a BLOB); +INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t'); +INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t'); +INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\'''); +INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\'); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +SET character_set_client=binary, character_set_results=binary; +SELECT @@character_set_client, @@character_set_connection, @@character_set_results; +@@character_set_client @@character_set_connection @@character_set_results +binary gbk binary +SELECT HEX('à\['), HEX('\à\['); +HEX('à\[') HEX('\à\[') +E05B E05B +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET gbk NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('à\['),('\à\['); +SELECT HEX(a) FROM t1; +HEX(a) +E05B +E05B +DROP TABLE t1; +SET character_set_client=@@character_set_connection, character_set_results=@@character_set_connection; +SET character_set_connection=binary; +SELECT @@character_set_client, @@character_set_connection, @@character_set_results; +@@character_set_client @@character_set_connection @@character_set_results +gbk binary gbk +SELECT HEX('à\['), HEX('\à\['); +HEX('à\[') HEX('\à\[') +E05C5B E05B +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varbinary(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('à\['),('\à\['); +SELECT HEX(a) FROM t1; +HEX(a) +E05C5B +E05B +DROP TABLE t1; +# Start of ctype_E05C.inc +# +# MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant +# +SET NAMES latin1; +CREATE TABLE t1 (a TEXT CHARACTER SET gbk); +INSERT INTO t1 VALUES (0xEE5D); +SELECT a<>0xEE5D AS a FROM t1; +a +0 +CREATE VIEW v1 AS SELECT a<>0xEE5D AS a FROM t1; +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (`t1`.`a` <> 0xee5d) AS `a` from `t1` latin1 latin1_swedish_ci +SELECT * FROM v1; +a +0 +DROP VIEW v1; +DROP TABLE t1; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result index db9d03a8656..cf48aaab09b 100644 --- a/mysql-test/r/ctype_latin1.result +++ b/mysql-test/r/ctype_latin1.result @@ -437,6 +437,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +latin1_swedish_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection latin1_swedish_ci @@ -472,7 +523,7 @@ pattern varchar(64) NO INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d'); SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1; HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern) -32303031F73031F73031 2559F7256DF72564 2001-01-01 00:00:00 +32303031F73031F73031 2559F7256DF72564 2001-01-01 00:00:00.000000 DROP TABLE t1; SET collation_connection='latin1_bin'; create table t1 select repeat('a',4000) a; @@ -501,6 +552,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +latin1_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection latin1_bin @@ -3513,3 +3615,4330 @@ Note 1003 select 'abcdó' AS `abcdó`,_latin1'abcd\xC3\xB3' AS `abcdó`,_utf8'ab # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set @@collation_connection=latin1_swedish_ci; +select @@collation_connection; +@@collation_connection +latin1_swedish_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(1) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +41 +SELECT HEX(ws) FROM t2; +HEX(ws) +41 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(5) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +4141414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +4141414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +41414141412020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +41414141412020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +41 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +414243 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +4142 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +414243 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +4142432020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +41 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +4142 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +414220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +41422020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +4142202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +41422020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +41 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +4142 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +414243 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +41424320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +41 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +4142 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +414243 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +41424320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +latin1_swedish_ci +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +80 +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +808080 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +8080 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +808080 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +8080802020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +80 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +8080 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +808020 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +80802020 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +8080202020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +80802020202020202020202020202020202020202020202020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +80 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +8080 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +808080 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +80808020 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +8080802020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +80808020202020202020202020202020202020202020202020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +80 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +8080 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +808080 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +80808020 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +8080802020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +80808020202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +latin1_swedish_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +41 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +414243 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +4142 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +414243 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +4142432020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020434241 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +BEBDBCDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDFBCBDBE +set @@collation_connection=latin1_bin; +select @@collation_connection; +@@collation_connection +latin1_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(1) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +61 +SELECT HEX(ws) FROM t2; +HEX(ws) +61 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(5) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +6161616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +6161616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +61616161612020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +61616161612020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +61 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +616263 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +6162 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +616263 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +6162632020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +61 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +6162 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +616220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +61622020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +6162202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +61622020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +61 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +6162 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +616263 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +61626320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +61 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +6162 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +616263 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +61626320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +latin1_bin +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +80 +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +808080 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +8080 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +808080 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +8080802020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +80 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +8080 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +808020 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +80802020 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +8080202020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +80802020202020202020202020202020202020202020202020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +80 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +8080 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +808080 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +80808020 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +8080802020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +80808020202020202020202020202020202020202020202020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +80 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +8080 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +808080 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +80808020 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +8080802020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +80808020202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +latin1_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +61 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +616263 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +6162 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +616263 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +6162632020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020636261 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +9E9D9CDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDF9C9D9E +set @@collation_connection=latin1_general_cs; +select @@collation_connection; +@@collation_connection +latin1_general_cs +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(1) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +42 +SELECT HEX(ws) FROM t2; +HEX(ws) +42 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(5) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +4242424242 +SELECT HEX(ws) FROM t2; +HEX(ws) +4242424242 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +424242 +SELECT HEX(ws) FROM t2; +HEX(ws) +424242 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +42424242422020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +42424242422020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +42 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +425254 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +4252 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +425254 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +4252542020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +42 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +4252 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +425220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +42522020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +4252202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +42522020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +42 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +4252 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +425254 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +42525420 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +4252542020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +42525420202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +42 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +4252 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +425254 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +42525420 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +4252542020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +42525420202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +latin1_general_cs +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +C0 +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +C0C0C0 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +C0C0 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +C0C0C0 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +C0C0C02020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +C0 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +C0C0 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +C0C020 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +C0C02020 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +C0C0202020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +C0C02020202020202020202020202020202020202020202020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +C0 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +C0C0 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +C0C0C0 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +C0C0C020 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +C0C0C02020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +C0C0C020202020202020202020202020202020202020202020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +C0 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +C0C0 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +C0C0C0 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +C0C0C020 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +C0C0C02020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +C0C0C020202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +latin1_general_cs +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +42 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +425254 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +4252 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +425254 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +4252542020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020545242 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +BDADABDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDFABADBD +set @@collation_connection=binary; +select @@collation_connection; +@@collation_connection +binary +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varbinary(1) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(1) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +61 +SELECT HEX(ws) FROM t2; +HEX(ws) +61 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varbinary(5) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(5) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +6161616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +6161616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +61616161610000000000 +SELECT HEX(ws) FROM t2; +HEX(ws) +61616161610000000000 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +61 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +616263 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +6162 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +616263 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +6162630000 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +61 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +6162 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +616200 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +61620000 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +6162000000 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +61620000000000000000000000000000000000000000000000 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +61 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +6162 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +616263 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +61626300 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +6162630000 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +61626300000000000000000000000000000000000000000000 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +61 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +6162 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +616263 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +61626300 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +6162630000 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +61626300000000000000000000000000000000000000000000 +select @@collation_connection; +@@collation_connection +binary +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +80 +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +808080 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +8080 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +808080 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +8080800000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +80 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +8080 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +808000 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +80800000 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +8080000000 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +80800000000000000000000000000000000000000000000000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +80 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +8080 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +808080 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +80808000 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +8080800000 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +80808000000000000000000000000000000000000000000000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +80 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +8080 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +808080 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +80808000 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +8080800000 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +80808000000000000000000000000000000000000000000000 +select @@collation_connection; +@@collation_connection +binary +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +61 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +616263 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +6162 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +616263 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +6162630000 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +0000636261 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +9E9D9CFFFF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +FFFF9C9D9E +set names latin1; +# +# End of 5.6 tests +# +# +# Start of 10.0 tests +# +# Start of ctype_unescape.inc +SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection'; +PREPARE stmt FROM @query; +EXECUTE stmt; +CHARSET('test') @@character_set_client @@character_set_connection +latin1 latin1 latin1 +DEALLOCATE PREPARE stmt; +CREATE TABLE allbytes (a VARBINARY(10)); +# Using selected bytes combinations +CREATE TABLE halfs (a INT); +INSERT INTO halfs VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07); +INSERT INTO halfs VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +CREATE TEMPORARY TABLE bytes (a BINARY(1), KEY(a)) ENGINE=MyISAM; +INSERT INTO bytes SELECT CHAR((t1.a << 4) | t2.a USING BINARY) FROM halfs t1, halfs t2; +DROP TABLE halfs; +CREATE TABLE selected_bytes (a VARBINARY(10)); +INSERT INTO selected_bytes (a) VALUES ('\0'),('\b'),('\t'),('\r'),('\n'),('\Z'); +INSERT INTO selected_bytes (a) VALUES ('0'),('b'),('t'),('r'),('n'),('Z'); +INSERT INTO selected_bytes (a) VALUES ('\\'),('_'),('%'),(0x22),(0x27); +INSERT INTO selected_bytes (a) VALUES ('a'); +INSERT INTO selected_bytes (a) VALUES +(0x3F), # 7bit +(0x40), # 7bit mbtail +(0x7E), # 7bit mbtail nonascii-8bit +(0x7F), # 7bit nonascii-8bit +(0x80), # mbtail bad-mb +(0x81), # mbhead mbtail +(0x9F), # mbhead mbtail bad-mb +(0xA0), # mbhead mbtail bad-mb +(0xA1), # mbhead mbtail nonascii-8bit +(0xE0), # mbhead mbtai +(0xEF), # mbhead mbtail +(0xF9), # mbhead mbtail +(0xFA), # mbhead mbtail bad-mb +(0xFC), # mbhead mbtail bad-mb +(0xFD), # mbhead mbtail bad-mb +(0xFE), # mbhead mbtial bad-mb +(0xFF); +INSERT INTO allbytes (a) SELECT a FROM bytes; +INSERT INTO allbytes (a) SELECT CONCAT(t1.a,t2.a) FROM selected_bytes t1,selected_bytes t2; +INSERT INTO allbytes (a) SELECT CONCAT(0x5C,t1.a,t2.a) FROM selected_bytes t1,selected_bytes t2; +INSERT INTO allbytes (a) SELECT CONCAT(0x5C,t1.a,0x5C,t2.a) FROM selected_bytes t1,selected_bytes t2; +DROP TABLE selected_bytes; +DELETE FROM allbytes WHERE +OCTET_LENGTH(a)>1 AND +LOCATE(0x5C,a)=0 AND +a NOT LIKE '%\'%' AND + a NOT LIKE '%"%'; +CREATE PROCEDURE p1(val VARBINARY(10)) +BEGIN +DECLARE EXIT HANDLER FOR SQLSTATE '42000' INSERT INTO t1 (a,b) VALUES(val,NULL); +SET @query=CONCAT(_binary"INSERT INTO t1 (a,b) VALUES (0x",HEX(val),",'",val,"')"); +PREPARE stmt FROM @query; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; +END// +CREATE PROCEDURE p2() +BEGIN +DECLARE val VARBINARY(10); +DECLARE done INT DEFAULT FALSE; +DECLARE stmt CURSOR FOR SELECT a FROM allbytes; +DECLARE CONTINUE HANDLER FOR NOT FOUND SET done=TRUE; +OPEN stmt; +read_loop1: LOOP +FETCH stmt INTO val; +IF done THEN +LEAVE read_loop1; +END IF; +CALL p1(val); +END LOOP; +CLOSE stmt; +END// +CREATE FUNCTION iswellformed(a VARBINARY(256)) RETURNS INT RETURN a=BINARY CONVERT(a USING latin1);// +CREATE FUNCTION unescape(a VARBINARY(256)) RETURNS VARBINARY(256) +BEGIN +# We need to do it in a way to avoid producing new escape sequences +# First, enclose all known escsape sequences to '{{xx}}' + # - Backslash not followed by a LIKE pattern characters _ and % +# - Double escapes +# This uses PCRE Branch Reset Groups: (?|(alt1)|(alt2)|(alt3)). +# So '\\1' in the last argument always means the match, no matter +# which alternative it came from. +SET a=REGEXP_REPLACE(a,'(?|(\\\\[^_%])|(\\x{27}\\x{27}))','{{\\1}}'); +# Now unescape all enclosed standard escape sequences +SET a=REPLACE(a,'{{\\0}}', '\0'); +SET a=REPLACE(a,'{{\\b}}', '\b'); +SET a=REPLACE(a,'{{\\t}}', '\t'); +SET a=REPLACE(a,'{{\\r}}', '\r'); +SET a=REPLACE(a,'{{\\n}}', '\n'); +SET a=REPLACE(a,'{{\\Z}}', '\Z'); +SET a=REPLACE(a,'{{\\\'}}', '\''); +# Unescape double quotes +SET a=REPLACE(a,'{{\'\'}}', '\''); + # Unescape the rest: all other \x sequences mean just 'x' + SET a=REGEXP_REPLACE(a, '{{\\\\(.|\\R)}}', '\\1'); + RETURN a; +END// +CREATE FUNCTION unescape_type(a VARBINARY(256),b VARBINARY(256)) RETURNS VARBINARY(256) +BEGIN +RETURN CASE +WHEN b IS NULL THEN '[SyntErr]' + WHEN a=b THEN CASE +WHEN OCTET_LENGTH(a)=1 THEN '[Preserve]' + WHEN a RLIKE '\\\\[_%]' THEN '[Preserve][LIKE]' + WHEN a RLIKE '^[[:ascii:]]+$' THEN '[Preserve][ASCII]' + ELSE '[Preserv][MB]' END +WHEN REPLACE(a,0x5C,'')=b THEN '[Trivial]' + WHEN UNESCAPE(a)=b THEN '[Regular]' + ELSE '[Special]' END; +END// +CREATE FUNCTION wellformedness(a VARBINARY(256), b VARBINARY(256)) +RETURNS VARBINARY(256) +BEGIN +RETURN CASE +WHEN b IS NULL THEN '' + WHEN NOT iswellformed(a) AND iswellformed(b) THEN '[FIXED]' + WHEN iswellformed(a) AND NOT iswellformed(b) THEN '[BROKE]' + WHEN NOT iswellformed(a) AND NOT iswellformed(b) THEN '[ILSEQ]' + ELSE '' + END; +END// +CREATE FUNCTION mysql_real_escape_string_generated(a VARBINARY(256)) +RETURNS VARBINARY(256) +BEGIN +DECLARE a1 BINARY(1) DEFAULT SUBSTR(a,1,1); +DECLARE a2 BINARY(1) DEFAULT SUBSTR(a,2,1); +DECLARE a3 BINARY(1) DEFAULT SUBSTR(a,3,1); +DECLARE a4 BINARY(1) DEFAULT SUBSTR(a,4,1); +DECLARE a2a4 BINARY(2) DEFAULT CONCAT(a2,a4); +RETURN CASE +WHEN (a1=0x5C) AND +(a3=0x5C) AND +(a2>0x7F) AND +(a4 NOT IN ('_','%','0','t','r','n','Z')) AND +iswellformed(a2a4) THEN '[USER]' + ELSE '' + END; +END// +CREATE TABLE t1 (a VARBINARY(10),b VARBINARY(10)); +CALL p2(); +SELECT HEX(a),HEX(b), +CONCAT(unescape_type(a,b), +wellformedness(a,b), +mysql_real_escape_string_generated(a), +IF(UNESCAPE(a)<>b,CONCAT('[BAD',HEX(UNESCAPE(a)),']'),'')) AS comment +FROM t1 ORDER BY LENGTH(a),a; +HEX(a) HEX(b) comment +00 00 [Preserve] +01 01 [Preserve] +02 02 [Preserve] +03 03 [Preserve] +04 04 [Preserve] +05 05 [Preserve] +06 06 [Preserve] +07 07 [Preserve] +08 08 [Preserve] +09 09 [Preserve] +0A 0A [Preserve] +0B 0B [Preserve] +0C 0C [Preserve] +0D 0D [Preserve] +0E 0E [Preserve] +0F 0F [Preserve] +10 10 [Preserve] +11 11 [Preserve] +12 12 [Preserve] +13 13 [Preserve] +14 14 [Preserve] +15 15 [Preserve] +16 16 [Preserve] +17 17 [Preserve] +18 18 [Preserve] +19 19 [Preserve] +1A 1A [Preserve] +1B 1B [Preserve] +1C 1C [Preserve] +1D 1D [Preserve] +1E 1E [Preserve] +1F 1F [Preserve] +20 20 [Preserve] +21 21 [Preserve] +22 22 [Preserve] +23 23 [Preserve] +24 24 [Preserve] +25 25 [Preserve] +26 26 [Preserve] +27 NULL [SyntErr] +28 28 [Preserve] +29 29 [Preserve] +2A 2A [Preserve] +2B 2B [Preserve] +2C 2C [Preserve] +2D 2D [Preserve] +2E 2E [Preserve] +2F 2F [Preserve] +30 30 [Preserve] +31 31 [Preserve] +32 32 [Preserve] +33 33 [Preserve] +34 34 [Preserve] +35 35 [Preserve] +36 36 [Preserve] +37 37 [Preserve] +38 38 [Preserve] +39 39 [Preserve] +3A 3A [Preserve] +3B 3B [Preserve] +3C 3C [Preserve] +3D 3D [Preserve] +3E 3E [Preserve] +3F 3F [Preserve] +40 40 [Preserve] +41 41 [Preserve] +42 42 [Preserve] +43 43 [Preserve] +44 44 [Preserve] +45 45 [Preserve] +46 46 [Preserve] +47 47 [Preserve] +48 48 [Preserve] +49 49 [Preserve] +4A 4A [Preserve] +4B 4B [Preserve] +4C 4C [Preserve] +4D 4D [Preserve] +4E 4E [Preserve] +4F 4F [Preserve] +50 50 [Preserve] +51 51 [Preserve] +52 52 [Preserve] +53 53 [Preserve] +54 54 [Preserve] +55 55 [Preserve] +56 56 [Preserve] +57 57 [Preserve] +58 58 [Preserve] +59 59 [Preserve] +5A 5A [Preserve] +5B 5B [Preserve] +5C NULL [SyntErr] +5D 5D [Preserve] +5E 5E [Preserve] +5F 5F [Preserve] +60 60 [Preserve] +61 61 [Preserve] +62 62 [Preserve] +63 63 [Preserve] +64 64 [Preserve] +65 65 [Preserve] +66 66 [Preserve] +67 67 [Preserve] +68 68 [Preserve] +69 69 [Preserve] +6A 6A [Preserve] +6B 6B [Preserve] +6C 6C [Preserve] +6D 6D [Preserve] +6E 6E [Preserve] +6F 6F [Preserve] +70 70 [Preserve] +71 71 [Preserve] +72 72 [Preserve] +73 73 [Preserve] +74 74 [Preserve] +75 75 [Preserve] +76 76 [Preserve] +77 77 [Preserve] +78 78 [Preserve] +79 79 [Preserve] +7A 7A [Preserve] +7B 7B [Preserve] +7C 7C [Preserve] +7D 7D [Preserve] +7E 7E [Preserve] +7F 7F [Preserve] +80 80 [Preserve] +81 81 [Preserve] +82 82 [Preserve] +83 83 [Preserve] +84 84 [Preserve] +85 85 [Preserve] +86 86 [Preserve] +87 87 [Preserve] +88 88 [Preserve] +89 89 [Preserve] +8A 8A [Preserve] +8B 8B [Preserve] +8C 8C [Preserve] +8D 8D [Preserve] +8E 8E [Preserve] +8F 8F [Preserve] +90 90 [Preserve] +91 91 [Preserve] +92 92 [Preserve] +93 93 [Preserve] +94 94 [Preserve] +95 95 [Preserve] +96 96 [Preserve] +97 97 [Preserve] +98 98 [Preserve] +99 99 [Preserve] +9A 9A [Preserve] +9B 9B [Preserve] +9C 9C [Preserve] +9D 9D [Preserve] +9E 9E [Preserve] +9F 9F [Preserve] +A0 A0 [Preserve] +A1 A1 [Preserve] +A2 A2 [Preserve] +A3 A3 [Preserve] +A4 A4 [Preserve] +A5 A5 [Preserve] +A6 A6 [Preserve] +A7 A7 [Preserve] +A8 A8 [Preserve] +A9 A9 [Preserve] +AA AA [Preserve] +AB AB [Preserve] +AC AC [Preserve] +AD AD [Preserve] +AE AE [Preserve] +AF AF [Preserve] +B0 B0 [Preserve] +B1 B1 [Preserve] +B2 B2 [Preserve] +B3 B3 [Preserve] +B4 B4 [Preserve] +B5 B5 [Preserve] +B6 B6 [Preserve] +B7 B7 [Preserve] +B8 B8 [Preserve] +B9 B9 [Preserve] +BA BA [Preserve] +BB BB [Preserve] +BC BC [Preserve] +BD BD [Preserve] +BE BE [Preserve] +BF BF [Preserve] +C0 C0 [Preserve] +C1 C1 [Preserve] +C2 C2 [Preserve] +C3 C3 [Preserve] +C4 C4 [Preserve] +C5 C5 [Preserve] +C6 C6 [Preserve] +C7 C7 [Preserve] +C8 C8 [Preserve] +C9 C9 [Preserve] +CA CA [Preserve] +CB CB [Preserve] +CC CC [Preserve] +CD CD [Preserve] +CE CE [Preserve] +CF CF [Preserve] +D0 D0 [Preserve] +D1 D1 [Preserve] +D2 D2 [Preserve] +D3 D3 [Preserve] +D4 D4 [Preserve] +D5 D5 [Preserve] +D6 D6 [Preserve] +D7 D7 [Preserve] +D8 D8 [Preserve] +D9 D9 [Preserve] +DA DA [Preserve] +DB DB [Preserve] +DC DC [Preserve] +DD DD [Preserve] +DE DE [Preserve] +DF DF [Preserve] +E0 E0 [Preserve] +E1 E1 [Preserve] +E2 E2 [Preserve] +E3 E3 [Preserve] +E4 E4 [Preserve] +E5 E5 [Preserve] +E6 E6 [Preserve] +E7 E7 [Preserve] +E8 E8 [Preserve] +E9 E9 [Preserve] +EA EA [Preserve] +EB EB [Preserve] +EC EC [Preserve] +ED ED [Preserve] +EE EE [Preserve] +EF EF [Preserve] +F0 F0 [Preserve] +F1 F1 [Preserve] +F2 F2 [Preserve] +F3 F3 [Preserve] +F4 F4 [Preserve] +F5 F5 [Preserve] +F6 F6 [Preserve] +F7 F7 [Preserve] +F8 F8 [Preserve] +F9 F9 [Preserve] +FA FA [Preserve] +FB FB [Preserve] +FC FC [Preserve] +FD FD [Preserve] +FE FE [Preserve] +FF FF [Preserve] +0022 0022 [Preserve][ASCII] +0027 NULL [SyntErr] +005C NULL [SyntErr] +0822 0822 [Preserve][ASCII] +0827 NULL [SyntErr] +085C NULL [SyntErr] +0922 0922 [Preserve][ASCII] +0927 NULL [SyntErr] +095C NULL [SyntErr] +0A22 0A22 [Preserve][ASCII] +0A27 NULL [SyntErr] +0A5C NULL [SyntErr] +0D22 0D22 [Preserve][ASCII] +0D27 NULL [SyntErr] +0D5C NULL [SyntErr] +1A22 1A22 [Preserve][ASCII] +1A27 NULL [SyntErr] +1A5C NULL [SyntErr] +2200 2200 [Preserve][ASCII] +2208 2208 [Preserve][ASCII] +2209 2209 [Preserve][ASCII] +220A 220A [Preserve][ASCII] +220D 220D [Preserve][ASCII] +221A 221A [Preserve][ASCII] +2222 2222 [Preserve][ASCII] +2225 2225 [Preserve][ASCII] +2227 NULL [SyntErr] +2230 2230 [Preserve][ASCII] +223F 223F [Preserve][ASCII] +2240 2240 [Preserve][ASCII] +225A 225A [Preserve][ASCII] +225C NULL [SyntErr] +225F 225F [Preserve][ASCII] +2261 2261 [Preserve][ASCII] +2262 2262 [Preserve][ASCII] +226E 226E [Preserve][ASCII] +2272 2272 [Preserve][ASCII] +2274 2274 [Preserve][ASCII] +227E 227E [Preserve][ASCII] +227F 227F [Preserve][ASCII] +2280 2280 [Preserv][MB] +2281 2281 [Preserv][MB] +229F 229F [Preserv][MB] +22A0 22A0 [Preserv][MB] +22A1 22A1 [Preserv][MB] +22E0 22E0 [Preserv][MB] +22EF 22EF [Preserv][MB] +22F9 22F9 [Preserv][MB] +22FA 22FA [Preserv][MB] +22FC 22FC [Preserv][MB] +22FD 22FD [Preserv][MB] +22FE 22FE [Preserv][MB] +22FF 22FF [Preserv][MB] +2522 2522 [Preserve][ASCII] +2527 NULL [SyntErr] +255C NULL [SyntErr] +2700 NULL [SyntErr] +2708 NULL [SyntErr] +2709 NULL [SyntErr] +270A NULL [SyntErr] +270D NULL [SyntErr] +271A NULL [SyntErr] +2722 NULL [SyntErr] +2725 NULL [SyntErr] +2727 27 [Regular] +2730 NULL [SyntErr] +273F NULL [SyntErr] +2740 NULL [SyntErr] +275A NULL [SyntErr] +275C NULL [SyntErr] +275F NULL [SyntErr] +2761 NULL [SyntErr] +2762 NULL [SyntErr] +276E NULL [SyntErr] +2772 NULL [SyntErr] +2774 NULL [SyntErr] +277E NULL [SyntErr] +277F NULL [SyntErr] +2780 NULL [SyntErr] +2781 NULL [SyntErr] +279F NULL [SyntErr] +27A0 NULL [SyntErr] +27A1 NULL [SyntErr] +27E0 NULL [SyntErr] +27EF NULL [SyntErr] +27F9 NULL [SyntErr] +27FA NULL [SyntErr] +27FC NULL [SyntErr] +27FD NULL [SyntErr] +27FE NULL [SyntErr] +27FF NULL [SyntErr] +3022 3022 [Preserve][ASCII] +3027 NULL [SyntErr] +305C NULL [SyntErr] +3F22 3F22 [Preserve][ASCII] +3F27 NULL [SyntErr] +3F5C NULL [SyntErr] +4022 4022 [Preserve][ASCII] +4027 NULL [SyntErr] +405C NULL [SyntErr] +5A22 5A22 [Preserve][ASCII] +5A27 NULL [SyntErr] +5A5C NULL [SyntErr] +5C00 00 [Trivial] +5C08 08 [Trivial] +5C09 09 [Trivial] +5C0A 0A [Trivial] +5C0D 0D [Trivial] +5C1A 1A [Trivial] +5C22 22 [Trivial] +5C25 5C25 [Preserve][LIKE] +5C27 27 [Trivial] +5C30 00 [Regular] +5C3F 3F [Trivial] +5C40 40 [Trivial] +5C5A 1A [Regular] +5C5C 5C [Regular] +5C5F 5C5F [Preserve][LIKE] +5C61 61 [Trivial] +5C62 08 [Regular] +5C6E 0A [Regular] +5C72 0D [Regular] +5C74 09 [Regular] +5C7E 7E [Trivial] +5C7F 7F [Trivial] +5C80 80 [Trivial] +5C81 81 [Trivial] +5C9F 9F [Trivial] +5CA0 A0 [Trivial] +5CA1 A1 [Trivial] +5CE0 E0 [Trivial] +5CEF EF [Trivial] +5CF9 F9 [Trivial] +5CFA FA [Trivial] +5CFC FC [Trivial] +5CFD FD [Trivial] +5CFE FE [Trivial] +5CFF FF [Trivial] +5F22 5F22 [Preserve][ASCII] +5F27 NULL [SyntErr] +5F5C NULL [SyntErr] +6122 6122 [Preserve][ASCII] +6127 NULL [SyntErr] +615C NULL [SyntErr] +6222 6222 [Preserve][ASCII] +6227 NULL [SyntErr] +625C NULL [SyntErr] +6E22 6E22 [Preserve][ASCII] +6E27 NULL [SyntErr] +6E5C NULL [SyntErr] +7222 7222 [Preserve][ASCII] +7227 NULL [SyntErr] +725C NULL [SyntErr] +7422 7422 [Preserve][ASCII] +7427 NULL [SyntErr] +745C NULL [SyntErr] +7E22 7E22 [Preserve][ASCII] +7E27 NULL [SyntErr] +7E5C NULL [SyntErr] +7F22 7F22 [Preserve][ASCII] +7F27 NULL [SyntErr] +7F5C NULL [SyntErr] +8022 8022 [Preserv][MB] +8027 NULL [SyntErr] +805C NULL [SyntErr] +8122 8122 [Preserv][MB] +8127 NULL [SyntErr] +815C NULL [SyntErr] +9F22 9F22 [Preserv][MB] +9F27 NULL [SyntErr] +9F5C NULL [SyntErr] +A022 A022 [Preserv][MB] +A027 NULL [SyntErr] +A05C NULL [SyntErr] +A122 A122 [Preserv][MB] +A127 NULL [SyntErr] +A15C NULL [SyntErr] +E022 E022 [Preserv][MB] +E027 NULL [SyntErr] +E05C NULL [SyntErr] +EF22 EF22 [Preserv][MB] +EF27 NULL [SyntErr] +EF5C NULL [SyntErr] +F922 F922 [Preserv][MB] +F927 NULL [SyntErr] +F95C NULL [SyntErr] +FA22 FA22 [Preserv][MB] +FA27 NULL [SyntErr] +FA5C NULL [SyntErr] +FC22 FC22 [Preserv][MB] +FC27 NULL [SyntErr] +FC5C NULL [SyntErr] +FD22 FD22 [Preserv][MB] +FD27 NULL [SyntErr] +FD5C NULL [SyntErr] +FE22 FE22 [Preserv][MB] +FE27 NULL [SyntErr] +FE5C NULL [SyntErr] +FF22 FF22 [Preserv][MB] +FF27 NULL [SyntErr] +FF5C NULL [SyntErr] +5C0000 0000 [Trivial] +5C0008 0008 [Trivial] +5C0009 0009 [Trivial] +5C000A 000A [Trivial] +5C000D 000D [Trivial] +5C001A 001A [Trivial] +5C0022 0022 [Trivial] +5C0025 0025 [Trivial] +5C0027 NULL [SyntErr] +5C0030 0030 [Trivial] +5C003F 003F [Trivial] +5C0040 0040 [Trivial] +5C005A 005A [Trivial] +5C005C NULL [SyntErr] +5C005F 005F [Trivial] +5C0061 0061 [Trivial] +5C0062 0062 [Trivial] +5C006E 006E [Trivial] +5C0072 0072 [Trivial] +5C0074 0074 [Trivial] +5C007E 007E [Trivial] +5C007F 007F [Trivial] +5C0080 0080 [Trivial] +5C0081 0081 [Trivial] +5C009F 009F [Trivial] +5C00A0 00A0 [Trivial] +5C00A1 00A1 [Trivial] +5C00E0 00E0 [Trivial] +5C00EF 00EF [Trivial] +5C00F9 00F9 [Trivial] +5C00FA 00FA [Trivial] +5C00FC 00FC [Trivial] +5C00FD 00FD [Trivial] +5C00FE 00FE [Trivial] +5C00FF 00FF [Trivial] +5C0800 0800 [Trivial] +5C0808 0808 [Trivial] +5C0809 0809 [Trivial] +5C080A 080A [Trivial] +5C080D 080D [Trivial] +5C081A 081A [Trivial] +5C0822 0822 [Trivial] +5C0825 0825 [Trivial] +5C0827 NULL [SyntErr] +5C0830 0830 [Trivial] +5C083F 083F [Trivial] +5C0840 0840 [Trivial] +5C085A 085A [Trivial] +5C085C NULL [SyntErr] +5C085F 085F [Trivial] +5C0861 0861 [Trivial] +5C0862 0862 [Trivial] +5C086E 086E [Trivial] +5C0872 0872 [Trivial] +5C0874 0874 [Trivial] +5C087E 087E [Trivial] +5C087F 087F [Trivial] +5C0880 0880 [Trivial] +5C0881 0881 [Trivial] +5C089F 089F [Trivial] +5C08A0 08A0 [Trivial] +5C08A1 08A1 [Trivial] +5C08E0 08E0 [Trivial] +5C08EF 08EF [Trivial] +5C08F9 08F9 [Trivial] +5C08FA 08FA [Trivial] +5C08FC 08FC [Trivial] +5C08FD 08FD [Trivial] +5C08FE 08FE [Trivial] +5C08FF 08FF [Trivial] +5C0900 0900 [Trivial] +5C0908 0908 [Trivial] +5C0909 0909 [Trivial] +5C090A 090A [Trivial] +5C090D 090D [Trivial] +5C091A 091A [Trivial] +5C0922 0922 [Trivial] +5C0925 0925 [Trivial] +5C0927 NULL [SyntErr] +5C0930 0930 [Trivial] +5C093F 093F [Trivial] +5C0940 0940 [Trivial] +5C095A 095A [Trivial] +5C095C NULL [SyntErr] +5C095F 095F [Trivial] +5C0961 0961 [Trivial] +5C0962 0962 [Trivial] +5C096E 096E [Trivial] +5C0972 0972 [Trivial] +5C0974 0974 [Trivial] +5C097E 097E [Trivial] +5C097F 097F [Trivial] +5C0980 0980 [Trivial] +5C0981 0981 [Trivial] +5C099F 099F [Trivial] +5C09A0 09A0 [Trivial] +5C09A1 09A1 [Trivial] +5C09E0 09E0 [Trivial] +5C09EF 09EF [Trivial] +5C09F9 09F9 [Trivial] +5C09FA 09FA [Trivial] +5C09FC 09FC [Trivial] +5C09FD 09FD [Trivial] +5C09FE 09FE [Trivial] +5C09FF 09FF [Trivial] +5C0A00 0A00 [Trivial] +5C0A08 0A08 [Trivial] +5C0A09 0A09 [Trivial] +5C0A0A 0A0A [Trivial] +5C0A0D 0A0D [Trivial] +5C0A1A 0A1A [Trivial] +5C0A22 0A22 [Trivial] +5C0A25 0A25 [Trivial] +5C0A27 NULL [SyntErr] +5C0A30 0A30 [Trivial] +5C0A3F 0A3F [Trivial] +5C0A40 0A40 [Trivial] +5C0A5A 0A5A [Trivial] +5C0A5C NULL [SyntErr] +5C0A5F 0A5F [Trivial] +5C0A61 0A61 [Trivial] +5C0A62 0A62 [Trivial] +5C0A6E 0A6E [Trivial] +5C0A72 0A72 [Trivial] +5C0A74 0A74 [Trivial] +5C0A7E 0A7E [Trivial] +5C0A7F 0A7F [Trivial] +5C0A80 0A80 [Trivial] +5C0A81 0A81 [Trivial] +5C0A9F 0A9F [Trivial] +5C0AA0 0AA0 [Trivial] +5C0AA1 0AA1 [Trivial] +5C0AE0 0AE0 [Trivial] +5C0AEF 0AEF [Trivial] +5C0AF9 0AF9 [Trivial] +5C0AFA 0AFA [Trivial] +5C0AFC 0AFC [Trivial] +5C0AFD 0AFD [Trivial] +5C0AFE 0AFE [Trivial] +5C0AFF 0AFF [Trivial] +5C0D00 0D00 [Trivial] +5C0D08 0D08 [Trivial] +5C0D09 0D09 [Trivial] +5C0D0A 0D0A [Trivial] +5C0D0D 0D0D [Trivial] +5C0D1A 0D1A [Trivial] +5C0D22 0D22 [Trivial] +5C0D25 0D25 [Trivial] +5C0D27 NULL [SyntErr] +5C0D30 0D30 [Trivial] +5C0D3F 0D3F [Trivial] +5C0D40 0D40 [Trivial] +5C0D5A 0D5A [Trivial] +5C0D5C NULL [SyntErr] +5C0D5F 0D5F [Trivial] +5C0D61 0D61 [Trivial] +5C0D62 0D62 [Trivial] +5C0D6E 0D6E [Trivial] +5C0D72 0D72 [Trivial] +5C0D74 0D74 [Trivial] +5C0D7E 0D7E [Trivial] +5C0D7F 0D7F [Trivial] +5C0D80 0D80 [Trivial] +5C0D81 0D81 [Trivial] +5C0D9F 0D9F [Trivial] +5C0DA0 0DA0 [Trivial] +5C0DA1 0DA1 [Trivial] +5C0DE0 0DE0 [Trivial] +5C0DEF 0DEF [Trivial] +5C0DF9 0DF9 [Trivial] +5C0DFA 0DFA [Trivial] +5C0DFC 0DFC [Trivial] +5C0DFD 0DFD [Trivial] +5C0DFE 0DFE [Trivial] +5C0DFF 0DFF [Trivial] +5C1A00 1A00 [Trivial] +5C1A08 1A08 [Trivial] +5C1A09 1A09 [Trivial] +5C1A0A 1A0A [Trivial] +5C1A0D 1A0D [Trivial] +5C1A1A 1A1A [Trivial] +5C1A22 1A22 [Trivial] +5C1A25 1A25 [Trivial] +5C1A27 NULL [SyntErr] +5C1A30 1A30 [Trivial] +5C1A3F 1A3F [Trivial] +5C1A40 1A40 [Trivial] +5C1A5A 1A5A [Trivial] +5C1A5C NULL [SyntErr] +5C1A5F 1A5F [Trivial] +5C1A61 1A61 [Trivial] +5C1A62 1A62 [Trivial] +5C1A6E 1A6E [Trivial] +5C1A72 1A72 [Trivial] +5C1A74 1A74 [Trivial] +5C1A7E 1A7E [Trivial] +5C1A7F 1A7F [Trivial] +5C1A80 1A80 [Trivial] +5C1A81 1A81 [Trivial] +5C1A9F 1A9F [Trivial] +5C1AA0 1AA0 [Trivial] +5C1AA1 1AA1 [Trivial] +5C1AE0 1AE0 [Trivial] +5C1AEF 1AEF [Trivial] +5C1AF9 1AF9 [Trivial] +5C1AFA 1AFA [Trivial] +5C1AFC 1AFC [Trivial] +5C1AFD 1AFD [Trivial] +5C1AFE 1AFE [Trivial] +5C1AFF 1AFF [Trivial] +5C2200 2200 [Trivial] +5C2208 2208 [Trivial] +5C2209 2209 [Trivial] +5C220A 220A [Trivial] +5C220D 220D [Trivial] +5C221A 221A [Trivial] +5C2222 2222 [Trivial] +5C2225 2225 [Trivial] +5C2227 NULL [SyntErr] +5C2230 2230 [Trivial] +5C223F 223F [Trivial] +5C2240 2240 [Trivial] +5C225A 225A [Trivial] +5C225C NULL [SyntErr] +5C225F 225F [Trivial] +5C2261 2261 [Trivial] +5C2262 2262 [Trivial] +5C226E 226E [Trivial] +5C2272 2272 [Trivial] +5C2274 2274 [Trivial] +5C227E 227E [Trivial] +5C227F 227F [Trivial] +5C2280 2280 [Trivial] +5C2281 2281 [Trivial] +5C229F 229F [Trivial] +5C22A0 22A0 [Trivial] +5C22A1 22A1 [Trivial] +5C22E0 22E0 [Trivial] +5C22EF 22EF [Trivial] +5C22F9 22F9 [Trivial] +5C22FA 22FA [Trivial] +5C22FC 22FC [Trivial] +5C22FD 22FD [Trivial] +5C22FE 22FE [Trivial] +5C22FF 22FF [Trivial] +5C2500 5C2500 [Preserve][LIKE] +5C2508 5C2508 [Preserve][LIKE] +5C2509 5C2509 [Preserve][LIKE] +5C250A 5C250A [Preserve][LIKE] +5C250D 5C250D [Preserve][LIKE] +5C251A 5C251A [Preserve][LIKE] +5C2522 5C2522 [Preserve][LIKE] +5C2525 5C2525 [Preserve][LIKE] +5C2527 NULL [SyntErr] +5C2530 5C2530 [Preserve][LIKE] +5C253F 5C253F [Preserve][LIKE] +5C2540 5C2540 [Preserve][LIKE] +5C255A 5C255A [Preserve][LIKE] +5C255C NULL [SyntErr] +5C255F 5C255F [Preserve][LIKE] +5C2561 5C2561 [Preserve][LIKE] +5C2562 5C2562 [Preserve][LIKE] +5C256E 5C256E [Preserve][LIKE] +5C2572 5C2572 [Preserve][LIKE] +5C2574 5C2574 [Preserve][LIKE] +5C257E 5C257E [Preserve][LIKE] +5C257F 5C257F [Preserve][LIKE] +5C2580 5C2580 [Preserve][LIKE] +5C2581 5C2581 [Preserve][LIKE] +5C259F 5C259F [Preserve][LIKE] +5C25A0 5C25A0 [Preserve][LIKE] +5C25A1 5C25A1 [Preserve][LIKE] +5C25E0 5C25E0 [Preserve][LIKE] +5C25EF 5C25EF [Preserve][LIKE] +5C25F9 5C25F9 [Preserve][LIKE] +5C25FA 5C25FA [Preserve][LIKE] +5C25FC 5C25FC [Preserve][LIKE] +5C25FD 5C25FD [Preserve][LIKE] +5C25FE 5C25FE [Preserve][LIKE] +5C25FF 5C25FF [Preserve][LIKE] +5C2700 2700 [Trivial] +5C2708 2708 [Trivial] +5C2709 2709 [Trivial] +5C270A 270A [Trivial] +5C270D 270D [Trivial] +5C271A 271A [Trivial] +5C2722 2722 [Trivial] +5C2725 2725 [Trivial] +5C2727 NULL [SyntErr] +5C2730 2730 [Trivial] +5C273F 273F [Trivial] +5C2740 2740 [Trivial] +5C275A 275A [Trivial] +5C275C NULL [SyntErr] +5C275F 275F [Trivial] +5C2761 2761 [Trivial] +5C2762 2762 [Trivial] +5C276E 276E [Trivial] +5C2772 2772 [Trivial] +5C2774 2774 [Trivial] +5C277E 277E [Trivial] +5C277F 277F [Trivial] +5C2780 2780 [Trivial] +5C2781 2781 [Trivial] +5C279F 279F [Trivial] +5C27A0 27A0 [Trivial] +5C27A1 27A1 [Trivial] +5C27E0 27E0 [Trivial] +5C27EF 27EF [Trivial] +5C27F9 27F9 [Trivial] +5C27FA 27FA [Trivial] +5C27FC 27FC [Trivial] +5C27FD 27FD [Trivial] +5C27FE 27FE [Trivial] +5C27FF 27FF [Trivial] +5C3000 0000 [Regular] +5C3008 0008 [Regular] +5C3009 0009 [Regular] +5C300A 000A [Regular] +5C300D 000D [Regular] +5C301A 001A [Regular] +5C3022 0022 [Regular] +5C3025 0025 [Regular] +5C3027 NULL [SyntErr] +5C3030 0030 [Regular] +5C303F 003F [Regular] +5C3040 0040 [Regular] +5C305A 005A [Regular] +5C305C NULL [SyntErr] +5C305F 005F [Regular] +5C3061 0061 [Regular] +5C3062 0062 [Regular] +5C306E 006E [Regular] +5C3072 0072 [Regular] +5C3074 0074 [Regular] +5C307E 007E [Regular] +5C307F 007F [Regular] +5C3080 0080 [Regular] +5C3081 0081 [Regular] +5C309F 009F [Regular] +5C30A0 00A0 [Regular] +5C30A1 00A1 [Regular] +5C30E0 00E0 [Regular] +5C30EF 00EF [Regular] +5C30F9 00F9 [Regular] +5C30FA 00FA [Regular] +5C30FC 00FC [Regular] +5C30FD 00FD [Regular] +5C30FE 00FE [Regular] +5C30FF 00FF [Regular] +5C3F00 3F00 [Trivial] +5C3F08 3F08 [Trivial] +5C3F09 3F09 [Trivial] +5C3F0A 3F0A [Trivial] +5C3F0D 3F0D [Trivial] +5C3F1A 3F1A [Trivial] +5C3F22 3F22 [Trivial] +5C3F25 3F25 [Trivial] +5C3F27 NULL [SyntErr] +5C3F30 3F30 [Trivial] +5C3F3F 3F3F [Trivial] +5C3F40 3F40 [Trivial] +5C3F5A 3F5A [Trivial] +5C3F5C NULL [SyntErr] +5C3F5F 3F5F [Trivial] +5C3F61 3F61 [Trivial] +5C3F62 3F62 [Trivial] +5C3F6E 3F6E [Trivial] +5C3F72 3F72 [Trivial] +5C3F74 3F74 [Trivial] +5C3F7E 3F7E [Trivial] +5C3F7F 3F7F [Trivial] +5C3F80 3F80 [Trivial] +5C3F81 3F81 [Trivial] +5C3F9F 3F9F [Trivial] +5C3FA0 3FA0 [Trivial] +5C3FA1 3FA1 [Trivial] +5C3FE0 3FE0 [Trivial] +5C3FEF 3FEF [Trivial] +5C3FF9 3FF9 [Trivial] +5C3FFA 3FFA [Trivial] +5C3FFC 3FFC [Trivial] +5C3FFD 3FFD [Trivial] +5C3FFE 3FFE [Trivial] +5C3FFF 3FFF [Trivial] +5C4000 4000 [Trivial] +5C4008 4008 [Trivial] +5C4009 4009 [Trivial] +5C400A 400A [Trivial] +5C400D 400D [Trivial] +5C401A 401A [Trivial] +5C4022 4022 [Trivial] +5C4025 4025 [Trivial] +5C4027 NULL [SyntErr] +5C4030 4030 [Trivial] +5C403F 403F [Trivial] +5C4040 4040 [Trivial] +5C405A 405A [Trivial] +5C405C NULL [SyntErr] +5C405F 405F [Trivial] +5C4061 4061 [Trivial] +5C4062 4062 [Trivial] +5C406E 406E [Trivial] +5C4072 4072 [Trivial] +5C4074 4074 [Trivial] +5C407E 407E [Trivial] +5C407F 407F [Trivial] +5C4080 4080 [Trivial] +5C4081 4081 [Trivial] +5C409F 409F [Trivial] +5C40A0 40A0 [Trivial] +5C40A1 40A1 [Trivial] +5C40E0 40E0 [Trivial] +5C40EF 40EF [Trivial] +5C40F9 40F9 [Trivial] +5C40FA 40FA [Trivial] +5C40FC 40FC [Trivial] +5C40FD 40FD [Trivial] +5C40FE 40FE [Trivial] +5C40FF 40FF [Trivial] +5C5A00 1A00 [Regular] +5C5A08 1A08 [Regular] +5C5A09 1A09 [Regular] +5C5A0A 1A0A [Regular] +5C5A0D 1A0D [Regular] +5C5A1A 1A1A [Regular] +5C5A22 1A22 [Regular] +5C5A25 1A25 [Regular] +5C5A27 NULL [SyntErr] +5C5A30 1A30 [Regular] +5C5A3F 1A3F [Regular] +5C5A40 1A40 [Regular] +5C5A5A 1A5A [Regular] +5C5A5C NULL [SyntErr] +5C5A5F 1A5F [Regular] +5C5A61 1A61 [Regular] +5C5A62 1A62 [Regular] +5C5A6E 1A6E [Regular] +5C5A72 1A72 [Regular] +5C5A74 1A74 [Regular] +5C5A7E 1A7E [Regular] +5C5A7F 1A7F [Regular] +5C5A80 1A80 [Regular] +5C5A81 1A81 [Regular] +5C5A9F 1A9F [Regular] +5C5AA0 1AA0 [Regular] +5C5AA1 1AA1 [Regular] +5C5AE0 1AE0 [Regular] +5C5AEF 1AEF [Regular] +5C5AF9 1AF9 [Regular] +5C5AFA 1AFA [Regular] +5C5AFC 1AFC [Regular] +5C5AFD 1AFD [Regular] +5C5AFE 1AFE [Regular] +5C5AFF 1AFF [Regular] +5C5C00 5C00 [Regular] +5C5C08 5C08 [Regular] +5C5C09 5C09 [Regular] +5C5C0A 5C0A [Regular] +5C5C0D 5C0D [Regular] +5C5C1A 5C1A [Regular] +5C5C22 5C22 [Regular] +5C5C25 5C25 [Regular] +5C5C27 NULL [SyntErr] +5C5C30 5C30 [Regular] +5C5C3F 5C3F [Regular] +5C5C40 5C40 [Regular] +5C5C5A 5C5A [Regular] +5C5C5C NULL [SyntErr] +5C5C5F 5C5F [Regular] +5C5C61 5C61 [Regular] +5C5C62 5C62 [Regular] +5C5C6E 5C6E [Regular] +5C5C72 5C72 [Regular] +5C5C74 5C74 [Regular] +5C5C7E 5C7E [Regular] +5C5C7F 5C7F [Regular] +5C5C80 5C80 [Regular] +5C5C81 5C81 [Regular] +5C5C9F 5C9F [Regular] +5C5CA0 5CA0 [Regular] +5C5CA1 5CA1 [Regular] +5C5CE0 5CE0 [Regular] +5C5CEF 5CEF [Regular] +5C5CF9 5CF9 [Regular] +5C5CFA 5CFA [Regular] +5C5CFC 5CFC [Regular] +5C5CFD 5CFD [Regular] +5C5CFE 5CFE [Regular] +5C5CFF 5CFF [Regular] +5C5F00 5C5F00 [Preserve][LIKE] +5C5F08 5C5F08 [Preserve][LIKE] +5C5F09 5C5F09 [Preserve][LIKE] +5C5F0A 5C5F0A [Preserve][LIKE] +5C5F0D 5C5F0D [Preserve][LIKE] +5C5F1A 5C5F1A [Preserve][LIKE] +5C5F22 5C5F22 [Preserve][LIKE] +5C5F25 5C5F25 [Preserve][LIKE] +5C5F27 NULL [SyntErr] +5C5F30 5C5F30 [Preserve][LIKE] +5C5F3F 5C5F3F [Preserve][LIKE] +5C5F40 5C5F40 [Preserve][LIKE] +5C5F5A 5C5F5A [Preserve][LIKE] +5C5F5C NULL [SyntErr] +5C5F5F 5C5F5F [Preserve][LIKE] +5C5F61 5C5F61 [Preserve][LIKE] +5C5F62 5C5F62 [Preserve][LIKE] +5C5F6E 5C5F6E [Preserve][LIKE] +5C5F72 5C5F72 [Preserve][LIKE] +5C5F74 5C5F74 [Preserve][LIKE] +5C5F7E 5C5F7E [Preserve][LIKE] +5C5F7F 5C5F7F [Preserve][LIKE] +5C5F80 5C5F80 [Preserve][LIKE] +5C5F81 5C5F81 [Preserve][LIKE] +5C5F9F 5C5F9F [Preserve][LIKE] +5C5FA0 5C5FA0 [Preserve][LIKE] +5C5FA1 5C5FA1 [Preserve][LIKE] +5C5FE0 5C5FE0 [Preserve][LIKE] +5C5FEF 5C5FEF [Preserve][LIKE] +5C5FF9 5C5FF9 [Preserve][LIKE] +5C5FFA 5C5FFA [Preserve][LIKE] +5C5FFC 5C5FFC [Preserve][LIKE] +5C5FFD 5C5FFD [Preserve][LIKE] +5C5FFE 5C5FFE [Preserve][LIKE] +5C5FFF 5C5FFF [Preserve][LIKE] +5C6100 6100 [Trivial] +5C6108 6108 [Trivial] +5C6109 6109 [Trivial] +5C610A 610A [Trivial] +5C610D 610D [Trivial] +5C611A 611A [Trivial] +5C6122 6122 [Trivial] +5C6125 6125 [Trivial] +5C6127 NULL [SyntErr] +5C6130 6130 [Trivial] +5C613F 613F [Trivial] +5C6140 6140 [Trivial] +5C615A 615A [Trivial] +5C615C NULL [SyntErr] +5C615F 615F [Trivial] +5C6161 6161 [Trivial] +5C6162 6162 [Trivial] +5C616E 616E [Trivial] +5C6172 6172 [Trivial] +5C6174 6174 [Trivial] +5C617E 617E [Trivial] +5C617F 617F [Trivial] +5C6180 6180 [Trivial] +5C6181 6181 [Trivial] +5C619F 619F [Trivial] +5C61A0 61A0 [Trivial] +5C61A1 61A1 [Trivial] +5C61E0 61E0 [Trivial] +5C61EF 61EF [Trivial] +5C61F9 61F9 [Trivial] +5C61FA 61FA [Trivial] +5C61FC 61FC [Trivial] +5C61FD 61FD [Trivial] +5C61FE 61FE [Trivial] +5C61FF 61FF [Trivial] +5C6200 0800 [Regular] +5C6208 0808 [Regular] +5C6209 0809 [Regular] +5C620A 080A [Regular] +5C620D 080D [Regular] +5C621A 081A [Regular] +5C6222 0822 [Regular] +5C6225 0825 [Regular] +5C6227 NULL [SyntErr] +5C6230 0830 [Regular] +5C623F 083F [Regular] +5C6240 0840 [Regular] +5C625A 085A [Regular] +5C625C NULL [SyntErr] +5C625F 085F [Regular] +5C6261 0861 [Regular] +5C6262 0862 [Regular] +5C626E 086E [Regular] +5C6272 0872 [Regular] +5C6274 0874 [Regular] +5C627E 087E [Regular] +5C627F 087F [Regular] +5C6280 0880 [Regular] +5C6281 0881 [Regular] +5C629F 089F [Regular] +5C62A0 08A0 [Regular] +5C62A1 08A1 [Regular] +5C62E0 08E0 [Regular] +5C62EF 08EF [Regular] +5C62F9 08F9 [Regular] +5C62FA 08FA [Regular] +5C62FC 08FC [Regular] +5C62FD 08FD [Regular] +5C62FE 08FE [Regular] +5C62FF 08FF [Regular] +5C6E00 0A00 [Regular] +5C6E08 0A08 [Regular] +5C6E09 0A09 [Regular] +5C6E0A 0A0A [Regular] +5C6E0D 0A0D [Regular] +5C6E1A 0A1A [Regular] +5C6E22 0A22 [Regular] +5C6E25 0A25 [Regular] +5C6E27 NULL [SyntErr] +5C6E30 0A30 [Regular] +5C6E3F 0A3F [Regular] +5C6E40 0A40 [Regular] +5C6E5A 0A5A [Regular] +5C6E5C NULL [SyntErr] +5C6E5F 0A5F [Regular] +5C6E61 0A61 [Regular] +5C6E62 0A62 [Regular] +5C6E6E 0A6E [Regular] +5C6E72 0A72 [Regular] +5C6E74 0A74 [Regular] +5C6E7E 0A7E [Regular] +5C6E7F 0A7F [Regular] +5C6E80 0A80 [Regular] +5C6E81 0A81 [Regular] +5C6E9F 0A9F [Regular] +5C6EA0 0AA0 [Regular] +5C6EA1 0AA1 [Regular] +5C6EE0 0AE0 [Regular] +5C6EEF 0AEF [Regular] +5C6EF9 0AF9 [Regular] +5C6EFA 0AFA [Regular] +5C6EFC 0AFC [Regular] +5C6EFD 0AFD [Regular] +5C6EFE 0AFE [Regular] +5C6EFF 0AFF [Regular] +5C7200 0D00 [Regular] +5C7208 0D08 [Regular] +5C7209 0D09 [Regular] +5C720A 0D0A [Regular] +5C720D 0D0D [Regular] +5C721A 0D1A [Regular] +5C7222 0D22 [Regular] +5C7225 0D25 [Regular] +5C7227 NULL [SyntErr] +5C7230 0D30 [Regular] +5C723F 0D3F [Regular] +5C7240 0D40 [Regular] +5C725A 0D5A [Regular] +5C725C NULL [SyntErr] +5C725F 0D5F [Regular] +5C7261 0D61 [Regular] +5C7262 0D62 [Regular] +5C726E 0D6E [Regular] +5C7272 0D72 [Regular] +5C7274 0D74 [Regular] +5C727E 0D7E [Regular] +5C727F 0D7F [Regular] +5C7280 0D80 [Regular] +5C7281 0D81 [Regular] +5C729F 0D9F [Regular] +5C72A0 0DA0 [Regular] +5C72A1 0DA1 [Regular] +5C72E0 0DE0 [Regular] +5C72EF 0DEF [Regular] +5C72F9 0DF9 [Regular] +5C72FA 0DFA [Regular] +5C72FC 0DFC [Regular] +5C72FD 0DFD [Regular] +5C72FE 0DFE [Regular] +5C72FF 0DFF [Regular] +5C7400 0900 [Regular] +5C7408 0908 [Regular] +5C7409 0909 [Regular] +5C740A 090A [Regular] +5C740D 090D [Regular] +5C741A 091A [Regular] +5C7422 0922 [Regular] +5C7425 0925 [Regular] +5C7427 NULL [SyntErr] +5C7430 0930 [Regular] +5C743F 093F [Regular] +5C7440 0940 [Regular] +5C745A 095A [Regular] +5C745C NULL [SyntErr] +5C745F 095F [Regular] +5C7461 0961 [Regular] +5C7462 0962 [Regular] +5C746E 096E [Regular] +5C7472 0972 [Regular] +5C7474 0974 [Regular] +5C747E 097E [Regular] +5C747F 097F [Regular] +5C7480 0980 [Regular] +5C7481 0981 [Regular] +5C749F 099F [Regular] +5C74A0 09A0 [Regular] +5C74A1 09A1 [Regular] +5C74E0 09E0 [Regular] +5C74EF 09EF [Regular] +5C74F9 09F9 [Regular] +5C74FA 09FA [Regular] +5C74FC 09FC [Regular] +5C74FD 09FD [Regular] +5C74FE 09FE [Regular] +5C74FF 09FF [Regular] +5C7E00 7E00 [Trivial] +5C7E08 7E08 [Trivial] +5C7E09 7E09 [Trivial] +5C7E0A 7E0A [Trivial] +5C7E0D 7E0D [Trivial] +5C7E1A 7E1A [Trivial] +5C7E22 7E22 [Trivial] +5C7E25 7E25 [Trivial] +5C7E27 NULL [SyntErr] +5C7E30 7E30 [Trivial] +5C7E3F 7E3F [Trivial] +5C7E40 7E40 [Trivial] +5C7E5A 7E5A [Trivial] +5C7E5C NULL [SyntErr] +5C7E5F 7E5F [Trivial] +5C7E61 7E61 [Trivial] +5C7E62 7E62 [Trivial] +5C7E6E 7E6E [Trivial] +5C7E72 7E72 [Trivial] +5C7E74 7E74 [Trivial] +5C7E7E 7E7E [Trivial] +5C7E7F 7E7F [Trivial] +5C7E80 7E80 [Trivial] +5C7E81 7E81 [Trivial] +5C7E9F 7E9F [Trivial] +5C7EA0 7EA0 [Trivial] +5C7EA1 7EA1 [Trivial] +5C7EE0 7EE0 [Trivial] +5C7EEF 7EEF [Trivial] +5C7EF9 7EF9 [Trivial] +5C7EFA 7EFA [Trivial] +5C7EFC 7EFC [Trivial] +5C7EFD 7EFD [Trivial] +5C7EFE 7EFE [Trivial] +5C7EFF 7EFF [Trivial] +5C7F00 7F00 [Trivial] +5C7F08 7F08 [Trivial] +5C7F09 7F09 [Trivial] +5C7F0A 7F0A [Trivial] +5C7F0D 7F0D [Trivial] +5C7F1A 7F1A [Trivial] +5C7F22 7F22 [Trivial] +5C7F25 7F25 [Trivial] +5C7F27 NULL [SyntErr] +5C7F30 7F30 [Trivial] +5C7F3F 7F3F [Trivial] +5C7F40 7F40 [Trivial] +5C7F5A 7F5A [Trivial] +5C7F5C NULL [SyntErr] +5C7F5F 7F5F [Trivial] +5C7F61 7F61 [Trivial] +5C7F62 7F62 [Trivial] +5C7F6E 7F6E [Trivial] +5C7F72 7F72 [Trivial] +5C7F74 7F74 [Trivial] +5C7F7E 7F7E [Trivial] +5C7F7F 7F7F [Trivial] +5C7F80 7F80 [Trivial] +5C7F81 7F81 [Trivial] +5C7F9F 7F9F [Trivial] +5C7FA0 7FA0 [Trivial] +5C7FA1 7FA1 [Trivial] +5C7FE0 7FE0 [Trivial] +5C7FEF 7FEF [Trivial] +5C7FF9 7FF9 [Trivial] +5C7FFA 7FFA [Trivial] +5C7FFC 7FFC [Trivial] +5C7FFD 7FFD [Trivial] +5C7FFE 7FFE [Trivial] +5C7FFF 7FFF [Trivial] +5C8000 8000 [Trivial] +5C8008 8008 [Trivial] +5C8009 8009 [Trivial] +5C800A 800A [Trivial] +5C800D 800D [Trivial] +5C801A 801A [Trivial] +5C8022 8022 [Trivial] +5C8025 8025 [Trivial] +5C8027 NULL [SyntErr] +5C8030 8030 [Trivial] +5C803F 803F [Trivial] +5C8040 8040 [Trivial] +5C805A 805A [Trivial] +5C805C NULL [SyntErr][USER] +5C805F 805F [Trivial] +5C8061 8061 [Trivial] +5C8062 8062 [Trivial] +5C806E 806E [Trivial] +5C8072 8072 [Trivial] +5C8074 8074 [Trivial] +5C807E 807E [Trivial] +5C807F 807F [Trivial] +5C8080 8080 [Trivial] +5C8081 8081 [Trivial] +5C809F 809F [Trivial] +5C80A0 80A0 [Trivial] +5C80A1 80A1 [Trivial] +5C80E0 80E0 [Trivial] +5C80EF 80EF [Trivial] +5C80F9 80F9 [Trivial] +5C80FA 80FA [Trivial] +5C80FC 80FC [Trivial] +5C80FD 80FD [Trivial] +5C80FE 80FE [Trivial] +5C80FF 80FF [Trivial] +5C8100 8100 [Trivial] +5C8108 8108 [Trivial] +5C8109 8109 [Trivial] +5C810A 810A [Trivial] +5C810D 810D [Trivial] +5C811A 811A [Trivial] +5C8122 8122 [Trivial] +5C8125 8125 [Trivial] +5C8127 NULL [SyntErr] +5C8130 8130 [Trivial] +5C813F 813F [Trivial] +5C8140 8140 [Trivial] +5C815A 815A [Trivial] +5C815C NULL [SyntErr][USER] +5C815F 815F [Trivial] +5C8161 8161 [Trivial] +5C8162 8162 [Trivial] +5C816E 816E [Trivial] +5C8172 8172 [Trivial] +5C8174 8174 [Trivial] +5C817E 817E [Trivial] +5C817F 817F [Trivial] +5C8180 8180 [Trivial] +5C8181 8181 [Trivial] +5C819F 819F [Trivial] +5C81A0 81A0 [Trivial] +5C81A1 81A1 [Trivial] +5C81E0 81E0 [Trivial] +5C81EF 81EF [Trivial] +5C81F9 81F9 [Trivial] +5C81FA 81FA [Trivial] +5C81FC 81FC [Trivial] +5C81FD 81FD [Trivial] +5C81FE 81FE [Trivial] +5C81FF 81FF [Trivial] +5C9F00 9F00 [Trivial] +5C9F08 9F08 [Trivial] +5C9F09 9F09 [Trivial] +5C9F0A 9F0A [Trivial] +5C9F0D 9F0D [Trivial] +5C9F1A 9F1A [Trivial] +5C9F22 9F22 [Trivial] +5C9F25 9F25 [Trivial] +5C9F27 NULL [SyntErr] +5C9F30 9F30 [Trivial] +5C9F3F 9F3F [Trivial] +5C9F40 9F40 [Trivial] +5C9F5A 9F5A [Trivial] +5C9F5C NULL [SyntErr][USER] +5C9F5F 9F5F [Trivial] +5C9F61 9F61 [Trivial] +5C9F62 9F62 [Trivial] +5C9F6E 9F6E [Trivial] +5C9F72 9F72 [Trivial] +5C9F74 9F74 [Trivial] +5C9F7E 9F7E [Trivial] +5C9F7F 9F7F [Trivial] +5C9F80 9F80 [Trivial] +5C9F81 9F81 [Trivial] +5C9F9F 9F9F [Trivial] +5C9FA0 9FA0 [Trivial] +5C9FA1 9FA1 [Trivial] +5C9FE0 9FE0 [Trivial] +5C9FEF 9FEF [Trivial] +5C9FF9 9FF9 [Trivial] +5C9FFA 9FFA [Trivial] +5C9FFC 9FFC [Trivial] +5C9FFD 9FFD [Trivial] +5C9FFE 9FFE [Trivial] +5C9FFF 9FFF [Trivial] +5CA000 A000 [Trivial] +5CA008 A008 [Trivial] +5CA009 A009 [Trivial] +5CA00A A00A [Trivial] +5CA00D A00D [Trivial] +5CA01A A01A [Trivial] +5CA022 A022 [Trivial] +5CA025 A025 [Trivial] +5CA027 NULL [SyntErr] +5CA030 A030 [Trivial] +5CA03F A03F [Trivial] +5CA040 A040 [Trivial] +5CA05A A05A [Trivial] +5CA05C NULL [SyntErr][USER] +5CA05F A05F [Trivial] +5CA061 A061 [Trivial] +5CA062 A062 [Trivial] +5CA06E A06E [Trivial] +5CA072 A072 [Trivial] +5CA074 A074 [Trivial] +5CA07E A07E [Trivial] +5CA07F A07F [Trivial] +5CA080 A080 [Trivial] +5CA081 A081 [Trivial] +5CA09F A09F [Trivial] +5CA0A0 A0A0 [Trivial] +5CA0A1 A0A1 [Trivial] +5CA0E0 A0E0 [Trivial] +5CA0EF A0EF [Trivial] +5CA0F9 A0F9 [Trivial] +5CA0FA A0FA [Trivial] +5CA0FC A0FC [Trivial] +5CA0FD A0FD [Trivial] +5CA0FE A0FE [Trivial] +5CA0FF A0FF [Trivial] +5CA100 A100 [Trivial] +5CA108 A108 [Trivial] +5CA109 A109 [Trivial] +5CA10A A10A [Trivial] +5CA10D A10D [Trivial] +5CA11A A11A [Trivial] +5CA122 A122 [Trivial] +5CA125 A125 [Trivial] +5CA127 NULL [SyntErr] +5CA130 A130 [Trivial] +5CA13F A13F [Trivial] +5CA140 A140 [Trivial] +5CA15A A15A [Trivial] +5CA15C NULL [SyntErr][USER] +5CA15F A15F [Trivial] +5CA161 A161 [Trivial] +5CA162 A162 [Trivial] +5CA16E A16E [Trivial] +5CA172 A172 [Trivial] +5CA174 A174 [Trivial] +5CA17E A17E [Trivial] +5CA17F A17F [Trivial] +5CA180 A180 [Trivial] +5CA181 A181 [Trivial] +5CA19F A19F [Trivial] +5CA1A0 A1A0 [Trivial] +5CA1A1 A1A1 [Trivial] +5CA1E0 A1E0 [Trivial] +5CA1EF A1EF [Trivial] +5CA1F9 A1F9 [Trivial] +5CA1FA A1FA [Trivial] +5CA1FC A1FC [Trivial] +5CA1FD A1FD [Trivial] +5CA1FE A1FE [Trivial] +5CA1FF A1FF [Trivial] +5CE000 E000 [Trivial] +5CE008 E008 [Trivial] +5CE009 E009 [Trivial] +5CE00A E00A [Trivial] +5CE00D E00D [Trivial] +5CE01A E01A [Trivial] +5CE022 E022 [Trivial] +5CE025 E025 [Trivial] +5CE027 NULL [SyntErr] +5CE030 E030 [Trivial] +5CE03F E03F [Trivial] +5CE040 E040 [Trivial] +5CE05A E05A [Trivial] +5CE05C NULL [SyntErr][USER] +5CE05F E05F [Trivial] +5CE061 E061 [Trivial] +5CE062 E062 [Trivial] +5CE06E E06E [Trivial] +5CE072 E072 [Trivial] +5CE074 E074 [Trivial] +5CE07E E07E [Trivial] +5CE07F E07F [Trivial] +5CE080 E080 [Trivial] +5CE081 E081 [Trivial] +5CE09F E09F [Trivial] +5CE0A0 E0A0 [Trivial] +5CE0A1 E0A1 [Trivial] +5CE0E0 E0E0 [Trivial] +5CE0EF E0EF [Trivial] +5CE0F9 E0F9 [Trivial] +5CE0FA E0FA [Trivial] +5CE0FC E0FC [Trivial] +5CE0FD E0FD [Trivial] +5CE0FE E0FE [Trivial] +5CE0FF E0FF [Trivial] +5CEF00 EF00 [Trivial] +5CEF08 EF08 [Trivial] +5CEF09 EF09 [Trivial] +5CEF0A EF0A [Trivial] +5CEF0D EF0D [Trivial] +5CEF1A EF1A [Trivial] +5CEF22 EF22 [Trivial] +5CEF25 EF25 [Trivial] +5CEF27 NULL [SyntErr] +5CEF30 EF30 [Trivial] +5CEF3F EF3F [Trivial] +5CEF40 EF40 [Trivial] +5CEF5A EF5A [Trivial] +5CEF5C NULL [SyntErr][USER] +5CEF5F EF5F [Trivial] +5CEF61 EF61 [Trivial] +5CEF62 EF62 [Trivial] +5CEF6E EF6E [Trivial] +5CEF72 EF72 [Trivial] +5CEF74 EF74 [Trivial] +5CEF7E EF7E [Trivial] +5CEF7F EF7F [Trivial] +5CEF80 EF80 [Trivial] +5CEF81 EF81 [Trivial] +5CEF9F EF9F [Trivial] +5CEFA0 EFA0 [Trivial] +5CEFA1 EFA1 [Trivial] +5CEFE0 EFE0 [Trivial] +5CEFEF EFEF [Trivial] +5CEFF9 EFF9 [Trivial] +5CEFFA EFFA [Trivial] +5CEFFC EFFC [Trivial] +5CEFFD EFFD [Trivial] +5CEFFE EFFE [Trivial] +5CEFFF EFFF [Trivial] +5CF900 F900 [Trivial] +5CF908 F908 [Trivial] +5CF909 F909 [Trivial] +5CF90A F90A [Trivial] +5CF90D F90D [Trivial] +5CF91A F91A [Trivial] +5CF922 F922 [Trivial] +5CF925 F925 [Trivial] +5CF927 NULL [SyntErr] +5CF930 F930 [Trivial] +5CF93F F93F [Trivial] +5CF940 F940 [Trivial] +5CF95A F95A [Trivial] +5CF95C NULL [SyntErr][USER] +5CF95F F95F [Trivial] +5CF961 F961 [Trivial] +5CF962 F962 [Trivial] +5CF96E F96E [Trivial] +5CF972 F972 [Trivial] +5CF974 F974 [Trivial] +5CF97E F97E [Trivial] +5CF97F F97F [Trivial] +5CF980 F980 [Trivial] +5CF981 F981 [Trivial] +5CF99F F99F [Trivial] +5CF9A0 F9A0 [Trivial] +5CF9A1 F9A1 [Trivial] +5CF9E0 F9E0 [Trivial] +5CF9EF F9EF [Trivial] +5CF9F9 F9F9 [Trivial] +5CF9FA F9FA [Trivial] +5CF9FC F9FC [Trivial] +5CF9FD F9FD [Trivial] +5CF9FE F9FE [Trivial] +5CF9FF F9FF [Trivial] +5CFA00 FA00 [Trivial] +5CFA08 FA08 [Trivial] +5CFA09 FA09 [Trivial] +5CFA0A FA0A [Trivial] +5CFA0D FA0D [Trivial] +5CFA1A FA1A [Trivial] +5CFA22 FA22 [Trivial] +5CFA25 FA25 [Trivial] +5CFA27 NULL [SyntErr] +5CFA30 FA30 [Trivial] +5CFA3F FA3F [Trivial] +5CFA40 FA40 [Trivial] +5CFA5A FA5A [Trivial] +5CFA5C NULL [SyntErr][USER] +5CFA5F FA5F [Trivial] +5CFA61 FA61 [Trivial] +5CFA62 FA62 [Trivial] +5CFA6E FA6E [Trivial] +5CFA72 FA72 [Trivial] +5CFA74 FA74 [Trivial] +5CFA7E FA7E [Trivial] +5CFA7F FA7F [Trivial] +5CFA80 FA80 [Trivial] +5CFA81 FA81 [Trivial] +5CFA9F FA9F [Trivial] +5CFAA0 FAA0 [Trivial] +5CFAA1 FAA1 [Trivial] +5CFAE0 FAE0 [Trivial] +5CFAEF FAEF [Trivial] +5CFAF9 FAF9 [Trivial] +5CFAFA FAFA [Trivial] +5CFAFC FAFC [Trivial] +5CFAFD FAFD [Trivial] +5CFAFE FAFE [Trivial] +5CFAFF FAFF [Trivial] +5CFC00 FC00 [Trivial] +5CFC08 FC08 [Trivial] +5CFC09 FC09 [Trivial] +5CFC0A FC0A [Trivial] +5CFC0D FC0D [Trivial] +5CFC1A FC1A [Trivial] +5CFC22 FC22 [Trivial] +5CFC25 FC25 [Trivial] +5CFC27 NULL [SyntErr] +5CFC30 FC30 [Trivial] +5CFC3F FC3F [Trivial] +5CFC40 FC40 [Trivial] +5CFC5A FC5A [Trivial] +5CFC5C NULL [SyntErr][USER] +5CFC5F FC5F [Trivial] +5CFC61 FC61 [Trivial] +5CFC62 FC62 [Trivial] +5CFC6E FC6E [Trivial] +5CFC72 FC72 [Trivial] +5CFC74 FC74 [Trivial] +5CFC7E FC7E [Trivial] +5CFC7F FC7F [Trivial] +5CFC80 FC80 [Trivial] +5CFC81 FC81 [Trivial] +5CFC9F FC9F [Trivial] +5CFCA0 FCA0 [Trivial] +5CFCA1 FCA1 [Trivial] +5CFCE0 FCE0 [Trivial] +5CFCEF FCEF [Trivial] +5CFCF9 FCF9 [Trivial] +5CFCFA FCFA [Trivial] +5CFCFC FCFC [Trivial] +5CFCFD FCFD [Trivial] +5CFCFE FCFE [Trivial] +5CFCFF FCFF [Trivial] +5CFD00 FD00 [Trivial] +5CFD08 FD08 [Trivial] +5CFD09 FD09 [Trivial] +5CFD0A FD0A [Trivial] +5CFD0D FD0D [Trivial] +5CFD1A FD1A [Trivial] +5CFD22 FD22 [Trivial] +5CFD25 FD25 [Trivial] +5CFD27 NULL [SyntErr] +5CFD30 FD30 [Trivial] +5CFD3F FD3F [Trivial] +5CFD40 FD40 [Trivial] +5CFD5A FD5A [Trivial] +5CFD5C NULL [SyntErr][USER] +5CFD5F FD5F [Trivial] +5CFD61 FD61 [Trivial] +5CFD62 FD62 [Trivial] +5CFD6E FD6E [Trivial] +5CFD72 FD72 [Trivial] +5CFD74 FD74 [Trivial] +5CFD7E FD7E [Trivial] +5CFD7F FD7F [Trivial] +5CFD80 FD80 [Trivial] +5CFD81 FD81 [Trivial] +5CFD9F FD9F [Trivial] +5CFDA0 FDA0 [Trivial] +5CFDA1 FDA1 [Trivial] +5CFDE0 FDE0 [Trivial] +5CFDEF FDEF [Trivial] +5CFDF9 FDF9 [Trivial] +5CFDFA FDFA [Trivial] +5CFDFC FDFC [Trivial] +5CFDFD FDFD [Trivial] +5CFDFE FDFE [Trivial] +5CFDFF FDFF [Trivial] +5CFE00 FE00 [Trivial] +5CFE08 FE08 [Trivial] +5CFE09 FE09 [Trivial] +5CFE0A FE0A [Trivial] +5CFE0D FE0D [Trivial] +5CFE1A FE1A [Trivial] +5CFE22 FE22 [Trivial] +5CFE25 FE25 [Trivial] +5CFE27 NULL [SyntErr] +5CFE30 FE30 [Trivial] +5CFE3F FE3F [Trivial] +5CFE40 FE40 [Trivial] +5CFE5A FE5A [Trivial] +5CFE5C NULL [SyntErr][USER] +5CFE5F FE5F [Trivial] +5CFE61 FE61 [Trivial] +5CFE62 FE62 [Trivial] +5CFE6E FE6E [Trivial] +5CFE72 FE72 [Trivial] +5CFE74 FE74 [Trivial] +5CFE7E FE7E [Trivial] +5CFE7F FE7F [Trivial] +5CFE80 FE80 [Trivial] +5CFE81 FE81 [Trivial] +5CFE9F FE9F [Trivial] +5CFEA0 FEA0 [Trivial] +5CFEA1 FEA1 [Trivial] +5CFEE0 FEE0 [Trivial] +5CFEEF FEEF [Trivial] +5CFEF9 FEF9 [Trivial] +5CFEFA FEFA [Trivial] +5CFEFC FEFC [Trivial] +5CFEFD FEFD [Trivial] +5CFEFE FEFE [Trivial] +5CFEFF FEFF [Trivial] +5CFF00 FF00 [Trivial] +5CFF08 FF08 [Trivial] +5CFF09 FF09 [Trivial] +5CFF0A FF0A [Trivial] +5CFF0D FF0D [Trivial] +5CFF1A FF1A [Trivial] +5CFF22 FF22 [Trivial] +5CFF25 FF25 [Trivial] +5CFF27 NULL [SyntErr] +5CFF30 FF30 [Trivial] +5CFF3F FF3F [Trivial] +5CFF40 FF40 [Trivial] +5CFF5A FF5A [Trivial] +5CFF5C NULL [SyntErr][USER] +5CFF5F FF5F [Trivial] +5CFF61 FF61 [Trivial] +5CFF62 FF62 [Trivial] +5CFF6E FF6E [Trivial] +5CFF72 FF72 [Trivial] +5CFF74 FF74 [Trivial] +5CFF7E FF7E [Trivial] +5CFF7F FF7F [Trivial] +5CFF80 FF80 [Trivial] +5CFF81 FF81 [Trivial] +5CFF9F FF9F [Trivial] +5CFFA0 FFA0 [Trivial] +5CFFA1 FFA1 [Trivial] +5CFFE0 FFE0 [Trivial] +5CFFEF FFEF [Trivial] +5CFFF9 FFF9 [Trivial] +5CFFFA FFFA [Trivial] +5CFFFC FFFC [Trivial] +5CFFFD FFFD [Trivial] +5CFFFE FFFE [Trivial] +5CFFFF FFFF [Trivial] +5C005C00 0000 [Trivial] +5C005C08 0008 [Trivial] +5C005C09 0009 [Trivial] +5C005C0A 000A [Trivial] +5C005C0D 000D [Trivial] +5C005C1A 001A [Trivial] +5C005C22 0022 [Trivial] +5C005C25 005C25 [Regular] +5C005C27 0027 [Trivial] +5C005C30 0000 [Regular] +5C005C3F 003F [Trivial] +5C005C40 0040 [Trivial] +5C005C5A 001A [Regular] +5C005C5C 005C [Regular] +5C005C5F 005C5F [Regular] +5C005C61 0061 [Trivial] +5C005C62 0008 [Regular] +5C005C6E 000A [Regular] +5C005C72 000D [Regular] +5C005C74 0009 [Regular] +5C005C7E 007E [Trivial] +5C005C7F 007F [Trivial] +5C005C80 0080 [Trivial] +5C005C81 0081 [Trivial] +5C005C9F 009F [Trivial] +5C005CA0 00A0 [Trivial] +5C005CA1 00A1 [Trivial] +5C005CE0 00E0 [Trivial] +5C005CEF 00EF [Trivial] +5C005CF9 00F9 [Trivial] +5C005CFA 00FA [Trivial] +5C005CFC 00FC [Trivial] +5C005CFD 00FD [Trivial] +5C005CFE 00FE [Trivial] +5C005CFF 00FF [Trivial] +5C085C00 0800 [Trivial] +5C085C08 0808 [Trivial] +5C085C09 0809 [Trivial] +5C085C0A 080A [Trivial] +5C085C0D 080D [Trivial] +5C085C1A 081A [Trivial] +5C085C22 0822 [Trivial] +5C085C25 085C25 [Regular] +5C085C27 0827 [Trivial] +5C085C30 0800 [Regular] +5C085C3F 083F [Trivial] +5C085C40 0840 [Trivial] +5C085C5A 081A [Regular] +5C085C5C 085C [Regular] +5C085C5F 085C5F [Regular] +5C085C61 0861 [Trivial] +5C085C62 0808 [Regular] +5C085C6E 080A [Regular] +5C085C72 080D [Regular] +5C085C74 0809 [Regular] +5C085C7E 087E [Trivial] +5C085C7F 087F [Trivial] +5C085C80 0880 [Trivial] +5C085C81 0881 [Trivial] +5C085C9F 089F [Trivial] +5C085CA0 08A0 [Trivial] +5C085CA1 08A1 [Trivial] +5C085CE0 08E0 [Trivial] +5C085CEF 08EF [Trivial] +5C085CF9 08F9 [Trivial] +5C085CFA 08FA [Trivial] +5C085CFC 08FC [Trivial] +5C085CFD 08FD [Trivial] +5C085CFE 08FE [Trivial] +5C085CFF 08FF [Trivial] +5C095C00 0900 [Trivial] +5C095C08 0908 [Trivial] +5C095C09 0909 [Trivial] +5C095C0A 090A [Trivial] +5C095C0D 090D [Trivial] +5C095C1A 091A [Trivial] +5C095C22 0922 [Trivial] +5C095C25 095C25 [Regular] +5C095C27 0927 [Trivial] +5C095C30 0900 [Regular] +5C095C3F 093F [Trivial] +5C095C40 0940 [Trivial] +5C095C5A 091A [Regular] +5C095C5C 095C [Regular] +5C095C5F 095C5F [Regular] +5C095C61 0961 [Trivial] +5C095C62 0908 [Regular] +5C095C6E 090A [Regular] +5C095C72 090D [Regular] +5C095C74 0909 [Regular] +5C095C7E 097E [Trivial] +5C095C7F 097F [Trivial] +5C095C80 0980 [Trivial] +5C095C81 0981 [Trivial] +5C095C9F 099F [Trivial] +5C095CA0 09A0 [Trivial] +5C095CA1 09A1 [Trivial] +5C095CE0 09E0 [Trivial] +5C095CEF 09EF [Trivial] +5C095CF9 09F9 [Trivial] +5C095CFA 09FA [Trivial] +5C095CFC 09FC [Trivial] +5C095CFD 09FD [Trivial] +5C095CFE 09FE [Trivial] +5C095CFF 09FF [Trivial] +5C0A5C00 0A00 [Trivial] +5C0A5C08 0A08 [Trivial] +5C0A5C09 0A09 [Trivial] +5C0A5C0A 0A0A [Trivial] +5C0A5C0D 0A0D [Trivial] +5C0A5C1A 0A1A [Trivial] +5C0A5C22 0A22 [Trivial] +5C0A5C25 0A5C25 [Regular] +5C0A5C27 0A27 [Trivial] +5C0A5C30 0A00 [Regular] +5C0A5C3F 0A3F [Trivial] +5C0A5C40 0A40 [Trivial] +5C0A5C5A 0A1A [Regular] +5C0A5C5C 0A5C [Regular] +5C0A5C5F 0A5C5F [Regular] +5C0A5C61 0A61 [Trivial] +5C0A5C62 0A08 [Regular] +5C0A5C6E 0A0A [Regular] +5C0A5C72 0A0D [Regular] +5C0A5C74 0A09 [Regular] +5C0A5C7E 0A7E [Trivial] +5C0A5C7F 0A7F [Trivial] +5C0A5C80 0A80 [Trivial] +5C0A5C81 0A81 [Trivial] +5C0A5C9F 0A9F [Trivial] +5C0A5CA0 0AA0 [Trivial] +5C0A5CA1 0AA1 [Trivial] +5C0A5CE0 0AE0 [Trivial] +5C0A5CEF 0AEF [Trivial] +5C0A5CF9 0AF9 [Trivial] +5C0A5CFA 0AFA [Trivial] +5C0A5CFC 0AFC [Trivial] +5C0A5CFD 0AFD [Trivial] +5C0A5CFE 0AFE [Trivial] +5C0A5CFF 0AFF [Trivial] +5C0D5C00 0D00 [Trivial] +5C0D5C08 0D08 [Trivial] +5C0D5C09 0D09 [Trivial] +5C0D5C0A 0D0A [Trivial] +5C0D5C0D 0D0D [Trivial] +5C0D5C1A 0D1A [Trivial] +5C0D5C22 0D22 [Trivial] +5C0D5C25 0D5C25 [Regular] +5C0D5C27 0D27 [Trivial] +5C0D5C30 0D00 [Regular] +5C0D5C3F 0D3F [Trivial] +5C0D5C40 0D40 [Trivial] +5C0D5C5A 0D1A [Regular] +5C0D5C5C 0D5C [Regular] +5C0D5C5F 0D5C5F [Regular] +5C0D5C61 0D61 [Trivial] +5C0D5C62 0D08 [Regular] +5C0D5C6E 0D0A [Regular] +5C0D5C72 0D0D [Regular] +5C0D5C74 0D09 [Regular] +5C0D5C7E 0D7E [Trivial] +5C0D5C7F 0D7F [Trivial] +5C0D5C80 0D80 [Trivial] +5C0D5C81 0D81 [Trivial] +5C0D5C9F 0D9F [Trivial] +5C0D5CA0 0DA0 [Trivial] +5C0D5CA1 0DA1 [Trivial] +5C0D5CE0 0DE0 [Trivial] +5C0D5CEF 0DEF [Trivial] +5C0D5CF9 0DF9 [Trivial] +5C0D5CFA 0DFA [Trivial] +5C0D5CFC 0DFC [Trivial] +5C0D5CFD 0DFD [Trivial] +5C0D5CFE 0DFE [Trivial] +5C0D5CFF 0DFF [Trivial] +5C1A5C00 1A00 [Trivial] +5C1A5C08 1A08 [Trivial] +5C1A5C09 1A09 [Trivial] +5C1A5C0A 1A0A [Trivial] +5C1A5C0D 1A0D [Trivial] +5C1A5C1A 1A1A [Trivial] +5C1A5C22 1A22 [Trivial] +5C1A5C25 1A5C25 [Regular] +5C1A5C27 1A27 [Trivial] +5C1A5C30 1A00 [Regular] +5C1A5C3F 1A3F [Trivial] +5C1A5C40 1A40 [Trivial] +5C1A5C5A 1A1A [Regular] +5C1A5C5C 1A5C [Regular] +5C1A5C5F 1A5C5F [Regular] +5C1A5C61 1A61 [Trivial] +5C1A5C62 1A08 [Regular] +5C1A5C6E 1A0A [Regular] +5C1A5C72 1A0D [Regular] +5C1A5C74 1A09 [Regular] +5C1A5C7E 1A7E [Trivial] +5C1A5C7F 1A7F [Trivial] +5C1A5C80 1A80 [Trivial] +5C1A5C81 1A81 [Trivial] +5C1A5C9F 1A9F [Trivial] +5C1A5CA0 1AA0 [Trivial] +5C1A5CA1 1AA1 [Trivial] +5C1A5CE0 1AE0 [Trivial] +5C1A5CEF 1AEF [Trivial] +5C1A5CF9 1AF9 [Trivial] +5C1A5CFA 1AFA [Trivial] +5C1A5CFC 1AFC [Trivial] +5C1A5CFD 1AFD [Trivial] +5C1A5CFE 1AFE [Trivial] +5C1A5CFF 1AFF [Trivial] +5C225C00 2200 [Trivial] +5C225C08 2208 [Trivial] +5C225C09 2209 [Trivial] +5C225C0A 220A [Trivial] +5C225C0D 220D [Trivial] +5C225C1A 221A [Trivial] +5C225C22 2222 [Trivial] +5C225C25 225C25 [Regular] +5C225C27 2227 [Trivial] +5C225C30 2200 [Regular] +5C225C3F 223F [Trivial] +5C225C40 2240 [Trivial] +5C225C5A 221A [Regular] +5C225C5C 225C [Regular] +5C225C5F 225C5F [Regular] +5C225C61 2261 [Trivial] +5C225C62 2208 [Regular] +5C225C6E 220A [Regular] +5C225C72 220D [Regular] +5C225C74 2209 [Regular] +5C225C7E 227E [Trivial] +5C225C7F 227F [Trivial] +5C225C80 2280 [Trivial] +5C225C81 2281 [Trivial] +5C225C9F 229F [Trivial] +5C225CA0 22A0 [Trivial] +5C225CA1 22A1 [Trivial] +5C225CE0 22E0 [Trivial] +5C225CEF 22EF [Trivial] +5C225CF9 22F9 [Trivial] +5C225CFA 22FA [Trivial] +5C225CFC 22FC [Trivial] +5C225CFD 22FD [Trivial] +5C225CFE 22FE [Trivial] +5C225CFF 22FF [Trivial] +5C255C00 5C2500 [Regular] +5C255C08 5C2508 [Regular] +5C255C09 5C2509 [Regular] +5C255C0A 5C250A [Regular] +5C255C0D 5C250D [Regular] +5C255C1A 5C251A [Regular] +5C255C22 5C2522 [Regular] +5C255C25 5C255C25 [Preserve][LIKE] +5C255C27 5C2527 [Regular] +5C255C30 5C2500 [Regular] +5C255C3F 5C253F [Regular] +5C255C40 5C2540 [Regular] +5C255C5A 5C251A [Regular] +5C255C5C 5C255C [Regular] +5C255C5F 5C255C5F [Preserve][LIKE] +5C255C61 5C2561 [Regular] +5C255C62 5C2508 [Regular] +5C255C6E 5C250A [Regular] +5C255C72 5C250D [Regular] +5C255C74 5C2509 [Regular] +5C255C7E 5C257E [Regular] +5C255C7F 5C257F [Regular] +5C255C80 5C2580 [Regular] +5C255C81 5C2581 [Regular] +5C255C9F 5C259F [Regular] +5C255CA0 5C25A0 [Regular] +5C255CA1 5C25A1 [Regular] +5C255CE0 5C25E0 [Regular] +5C255CEF 5C25EF [Regular] +5C255CF9 5C25F9 [Regular] +5C255CFA 5C25FA [Regular] +5C255CFC 5C25FC [Regular] +5C255CFD 5C25FD [Regular] +5C255CFE 5C25FE [Regular] +5C255CFF 5C25FF [Regular] +5C275C00 2700 [Trivial] +5C275C08 2708 [Trivial] +5C275C09 2709 [Trivial] +5C275C0A 270A [Trivial] +5C275C0D 270D [Trivial] +5C275C1A 271A [Trivial] +5C275C22 2722 [Trivial] +5C275C25 275C25 [Regular] +5C275C27 2727 [Trivial] +5C275C30 2700 [Regular] +5C275C3F 273F [Trivial] +5C275C40 2740 [Trivial] +5C275C5A 271A [Regular] +5C275C5C 275C [Regular] +5C275C5F 275C5F [Regular] +5C275C61 2761 [Trivial] +5C275C62 2708 [Regular] +5C275C6E 270A [Regular] +5C275C72 270D [Regular] +5C275C74 2709 [Regular] +5C275C7E 277E [Trivial] +5C275C7F 277F [Trivial] +5C275C80 2780 [Trivial] +5C275C81 2781 [Trivial] +5C275C9F 279F [Trivial] +5C275CA0 27A0 [Trivial] +5C275CA1 27A1 [Trivial] +5C275CE0 27E0 [Trivial] +5C275CEF 27EF [Trivial] +5C275CF9 27F9 [Trivial] +5C275CFA 27FA [Trivial] +5C275CFC 27FC [Trivial] +5C275CFD 27FD [Trivial] +5C275CFE 27FE [Trivial] +5C275CFF 27FF [Trivial] +5C305C00 0000 [Regular] +5C305C08 0008 [Regular] +5C305C09 0009 [Regular] +5C305C0A 000A [Regular] +5C305C0D 000D [Regular] +5C305C1A 001A [Regular] +5C305C22 0022 [Regular] +5C305C25 005C25 [Regular] +5C305C27 0027 [Regular] +5C305C30 0000 [Regular] +5C305C3F 003F [Regular] +5C305C40 0040 [Regular] +5C305C5A 001A [Regular] +5C305C5C 005C [Regular] +5C305C5F 005C5F [Regular] +5C305C61 0061 [Regular] +5C305C62 0008 [Regular] +5C305C6E 000A [Regular] +5C305C72 000D [Regular] +5C305C74 0009 [Regular] +5C305C7E 007E [Regular] +5C305C7F 007F [Regular] +5C305C80 0080 [Regular] +5C305C81 0081 [Regular] +5C305C9F 009F [Regular] +5C305CA0 00A0 [Regular] +5C305CA1 00A1 [Regular] +5C305CE0 00E0 [Regular] +5C305CEF 00EF [Regular] +5C305CF9 00F9 [Regular] +5C305CFA 00FA [Regular] +5C305CFC 00FC [Regular] +5C305CFD 00FD [Regular] +5C305CFE 00FE [Regular] +5C305CFF 00FF [Regular] +5C3F5C00 3F00 [Trivial] +5C3F5C08 3F08 [Trivial] +5C3F5C09 3F09 [Trivial] +5C3F5C0A 3F0A [Trivial] +5C3F5C0D 3F0D [Trivial] +5C3F5C1A 3F1A [Trivial] +5C3F5C22 3F22 [Trivial] +5C3F5C25 3F5C25 [Regular] +5C3F5C27 3F27 [Trivial] +5C3F5C30 3F00 [Regular] +5C3F5C3F 3F3F [Trivial] +5C3F5C40 3F40 [Trivial] +5C3F5C5A 3F1A [Regular] +5C3F5C5C 3F5C [Regular] +5C3F5C5F 3F5C5F [Regular] +5C3F5C61 3F61 [Trivial] +5C3F5C62 3F08 [Regular] +5C3F5C6E 3F0A [Regular] +5C3F5C72 3F0D [Regular] +5C3F5C74 3F09 [Regular] +5C3F5C7E 3F7E [Trivial] +5C3F5C7F 3F7F [Trivial] +5C3F5C80 3F80 [Trivial] +5C3F5C81 3F81 [Trivial] +5C3F5C9F 3F9F [Trivial] +5C3F5CA0 3FA0 [Trivial] +5C3F5CA1 3FA1 [Trivial] +5C3F5CE0 3FE0 [Trivial] +5C3F5CEF 3FEF [Trivial] +5C3F5CF9 3FF9 [Trivial] +5C3F5CFA 3FFA [Trivial] +5C3F5CFC 3FFC [Trivial] +5C3F5CFD 3FFD [Trivial] +5C3F5CFE 3FFE [Trivial] +5C3F5CFF 3FFF [Trivial] +5C405C00 4000 [Trivial] +5C405C08 4008 [Trivial] +5C405C09 4009 [Trivial] +5C405C0A 400A [Trivial] +5C405C0D 400D [Trivial] +5C405C1A 401A [Trivial] +5C405C22 4022 [Trivial] +5C405C25 405C25 [Regular] +5C405C27 4027 [Trivial] +5C405C30 4000 [Regular] +5C405C3F 403F [Trivial] +5C405C40 4040 [Trivial] +5C405C5A 401A [Regular] +5C405C5C 405C [Regular] +5C405C5F 405C5F [Regular] +5C405C61 4061 [Trivial] +5C405C62 4008 [Regular] +5C405C6E 400A [Regular] +5C405C72 400D [Regular] +5C405C74 4009 [Regular] +5C405C7E 407E [Trivial] +5C405C7F 407F [Trivial] +5C405C80 4080 [Trivial] +5C405C81 4081 [Trivial] +5C405C9F 409F [Trivial] +5C405CA0 40A0 [Trivial] +5C405CA1 40A1 [Trivial] +5C405CE0 40E0 [Trivial] +5C405CEF 40EF [Trivial] +5C405CF9 40F9 [Trivial] +5C405CFA 40FA [Trivial] +5C405CFC 40FC [Trivial] +5C405CFD 40FD [Trivial] +5C405CFE 40FE [Trivial] +5C405CFF 40FF [Trivial] +5C5A5C00 1A00 [Regular] +5C5A5C08 1A08 [Regular] +5C5A5C09 1A09 [Regular] +5C5A5C0A 1A0A [Regular] +5C5A5C0D 1A0D [Regular] +5C5A5C1A 1A1A [Regular] +5C5A5C22 1A22 [Regular] +5C5A5C25 1A5C25 [Regular] +5C5A5C27 1A27 [Regular] +5C5A5C30 1A00 [Regular] +5C5A5C3F 1A3F [Regular] +5C5A5C40 1A40 [Regular] +5C5A5C5A 1A1A [Regular] +5C5A5C5C 1A5C [Regular] +5C5A5C5F 1A5C5F [Regular] +5C5A5C61 1A61 [Regular] +5C5A5C62 1A08 [Regular] +5C5A5C6E 1A0A [Regular] +5C5A5C72 1A0D [Regular] +5C5A5C74 1A09 [Regular] +5C5A5C7E 1A7E [Regular] +5C5A5C7F 1A7F [Regular] +5C5A5C80 1A80 [Regular] +5C5A5C81 1A81 [Regular] +5C5A5C9F 1A9F [Regular] +5C5A5CA0 1AA0 [Regular] +5C5A5CA1 1AA1 [Regular] +5C5A5CE0 1AE0 [Regular] +5C5A5CEF 1AEF [Regular] +5C5A5CF9 1AF9 [Regular] +5C5A5CFA 1AFA [Regular] +5C5A5CFC 1AFC [Regular] +5C5A5CFD 1AFD [Regular] +5C5A5CFE 1AFE [Regular] +5C5A5CFF 1AFF [Regular] +5C5C5C00 5C00 [Regular] +5C5C5C08 5C08 [Regular] +5C5C5C09 5C09 [Regular] +5C5C5C0A 5C0A [Regular] +5C5C5C0D 5C0D [Regular] +5C5C5C1A 5C1A [Regular] +5C5C5C22 5C22 [Regular] +5C5C5C25 5C5C25 [Regular] +5C5C5C27 5C27 [Regular] +5C5C5C30 5C00 [Regular] +5C5C5C3F 5C3F [Regular] +5C5C5C40 5C40 [Regular] +5C5C5C5A 5C1A [Regular] +5C5C5C5C 5C5C [Regular] +5C5C5C5F 5C5C5F [Regular] +5C5C5C61 5C61 [Regular] +5C5C5C62 5C08 [Regular] +5C5C5C6E 5C0A [Regular] +5C5C5C72 5C0D [Regular] +5C5C5C74 5C09 [Regular] +5C5C5C7E 5C7E [Regular] +5C5C5C7F 5C7F [Regular] +5C5C5C80 5C80 [Regular] +5C5C5C81 5C81 [Regular] +5C5C5C9F 5C9F [Regular] +5C5C5CA0 5CA0 [Regular] +5C5C5CA1 5CA1 [Regular] +5C5C5CE0 5CE0 [Regular] +5C5C5CEF 5CEF [Regular] +5C5C5CF9 5CF9 [Regular] +5C5C5CFA 5CFA [Regular] +5C5C5CFC 5CFC [Regular] +5C5C5CFD 5CFD [Regular] +5C5C5CFE 5CFE [Regular] +5C5C5CFF 5CFF [Regular] +5C5F5C00 5C5F00 [Regular] +5C5F5C08 5C5F08 [Regular] +5C5F5C09 5C5F09 [Regular] +5C5F5C0A 5C5F0A [Regular] +5C5F5C0D 5C5F0D [Regular] +5C5F5C1A 5C5F1A [Regular] +5C5F5C22 5C5F22 [Regular] +5C5F5C25 5C5F5C25 [Preserve][LIKE] +5C5F5C27 5C5F27 [Regular] +5C5F5C30 5C5F00 [Regular] +5C5F5C3F 5C5F3F [Regular] +5C5F5C40 5C5F40 [Regular] +5C5F5C5A 5C5F1A [Regular] +5C5F5C5C 5C5F5C [Regular] +5C5F5C5F 5C5F5C5F [Preserve][LIKE] +5C5F5C61 5C5F61 [Regular] +5C5F5C62 5C5F08 [Regular] +5C5F5C6E 5C5F0A [Regular] +5C5F5C72 5C5F0D [Regular] +5C5F5C74 5C5F09 [Regular] +5C5F5C7E 5C5F7E [Regular] +5C5F5C7F 5C5F7F [Regular] +5C5F5C80 5C5F80 [Regular] +5C5F5C81 5C5F81 [Regular] +5C5F5C9F 5C5F9F [Regular] +5C5F5CA0 5C5FA0 [Regular] +5C5F5CA1 5C5FA1 [Regular] +5C5F5CE0 5C5FE0 [Regular] +5C5F5CEF 5C5FEF [Regular] +5C5F5CF9 5C5FF9 [Regular] +5C5F5CFA 5C5FFA [Regular] +5C5F5CFC 5C5FFC [Regular] +5C5F5CFD 5C5FFD [Regular] +5C5F5CFE 5C5FFE [Regular] +5C5F5CFF 5C5FFF [Regular] +5C615C00 6100 [Trivial] +5C615C08 6108 [Trivial] +5C615C09 6109 [Trivial] +5C615C0A 610A [Trivial] +5C615C0D 610D [Trivial] +5C615C1A 611A [Trivial] +5C615C22 6122 [Trivial] +5C615C25 615C25 [Regular] +5C615C27 6127 [Trivial] +5C615C30 6100 [Regular] +5C615C3F 613F [Trivial] +5C615C40 6140 [Trivial] +5C615C5A 611A [Regular] +5C615C5C 615C [Regular] +5C615C5F 615C5F [Regular] +5C615C61 6161 [Trivial] +5C615C62 6108 [Regular] +5C615C6E 610A [Regular] +5C615C72 610D [Regular] +5C615C74 6109 [Regular] +5C615C7E 617E [Trivial] +5C615C7F 617F [Trivial] +5C615C80 6180 [Trivial] +5C615C81 6181 [Trivial] +5C615C9F 619F [Trivial] +5C615CA0 61A0 [Trivial] +5C615CA1 61A1 [Trivial] +5C615CE0 61E0 [Trivial] +5C615CEF 61EF [Trivial] +5C615CF9 61F9 [Trivial] +5C615CFA 61FA [Trivial] +5C615CFC 61FC [Trivial] +5C615CFD 61FD [Trivial] +5C615CFE 61FE [Trivial] +5C615CFF 61FF [Trivial] +5C625C00 0800 [Regular] +5C625C08 0808 [Regular] +5C625C09 0809 [Regular] +5C625C0A 080A [Regular] +5C625C0D 080D [Regular] +5C625C1A 081A [Regular] +5C625C22 0822 [Regular] +5C625C25 085C25 [Regular] +5C625C27 0827 [Regular] +5C625C30 0800 [Regular] +5C625C3F 083F [Regular] +5C625C40 0840 [Regular] +5C625C5A 081A [Regular] +5C625C5C 085C [Regular] +5C625C5F 085C5F [Regular] +5C625C61 0861 [Regular] +5C625C62 0808 [Regular] +5C625C6E 080A [Regular] +5C625C72 080D [Regular] +5C625C74 0809 [Regular] +5C625C7E 087E [Regular] +5C625C7F 087F [Regular] +5C625C80 0880 [Regular] +5C625C81 0881 [Regular] +5C625C9F 089F [Regular] +5C625CA0 08A0 [Regular] +5C625CA1 08A1 [Regular] +5C625CE0 08E0 [Regular] +5C625CEF 08EF [Regular] +5C625CF9 08F9 [Regular] +5C625CFA 08FA [Regular] +5C625CFC 08FC [Regular] +5C625CFD 08FD [Regular] +5C625CFE 08FE [Regular] +5C625CFF 08FF [Regular] +5C6E5C00 0A00 [Regular] +5C6E5C08 0A08 [Regular] +5C6E5C09 0A09 [Regular] +5C6E5C0A 0A0A [Regular] +5C6E5C0D 0A0D [Regular] +5C6E5C1A 0A1A [Regular] +5C6E5C22 0A22 [Regular] +5C6E5C25 0A5C25 [Regular] +5C6E5C27 0A27 [Regular] +5C6E5C30 0A00 [Regular] +5C6E5C3F 0A3F [Regular] +5C6E5C40 0A40 [Regular] +5C6E5C5A 0A1A [Regular] +5C6E5C5C 0A5C [Regular] +5C6E5C5F 0A5C5F [Regular] +5C6E5C61 0A61 [Regular] +5C6E5C62 0A08 [Regular] +5C6E5C6E 0A0A [Regular] +5C6E5C72 0A0D [Regular] +5C6E5C74 0A09 [Regular] +5C6E5C7E 0A7E [Regular] +5C6E5C7F 0A7F [Regular] +5C6E5C80 0A80 [Regular] +5C6E5C81 0A81 [Regular] +5C6E5C9F 0A9F [Regular] +5C6E5CA0 0AA0 [Regular] +5C6E5CA1 0AA1 [Regular] +5C6E5CE0 0AE0 [Regular] +5C6E5CEF 0AEF [Regular] +5C6E5CF9 0AF9 [Regular] +5C6E5CFA 0AFA [Regular] +5C6E5CFC 0AFC [Regular] +5C6E5CFD 0AFD [Regular] +5C6E5CFE 0AFE [Regular] +5C6E5CFF 0AFF [Regular] +5C725C00 0D00 [Regular] +5C725C08 0D08 [Regular] +5C725C09 0D09 [Regular] +5C725C0A 0D0A [Regular] +5C725C0D 0D0D [Regular] +5C725C1A 0D1A [Regular] +5C725C22 0D22 [Regular] +5C725C25 0D5C25 [Regular] +5C725C27 0D27 [Regular] +5C725C30 0D00 [Regular] +5C725C3F 0D3F [Regular] +5C725C40 0D40 [Regular] +5C725C5A 0D1A [Regular] +5C725C5C 0D5C [Regular] +5C725C5F 0D5C5F [Regular] +5C725C61 0D61 [Regular] +5C725C62 0D08 [Regular] +5C725C6E 0D0A [Regular] +5C725C72 0D0D [Regular] +5C725C74 0D09 [Regular] +5C725C7E 0D7E [Regular] +5C725C7F 0D7F [Regular] +5C725C80 0D80 [Regular] +5C725C81 0D81 [Regular] +5C725C9F 0D9F [Regular] +5C725CA0 0DA0 [Regular] +5C725CA1 0DA1 [Regular] +5C725CE0 0DE0 [Regular] +5C725CEF 0DEF [Regular] +5C725CF9 0DF9 [Regular] +5C725CFA 0DFA [Regular] +5C725CFC 0DFC [Regular] +5C725CFD 0DFD [Regular] +5C725CFE 0DFE [Regular] +5C725CFF 0DFF [Regular] +5C745C00 0900 [Regular] +5C745C08 0908 [Regular] +5C745C09 0909 [Regular] +5C745C0A 090A [Regular] +5C745C0D 090D [Regular] +5C745C1A 091A [Regular] +5C745C22 0922 [Regular] +5C745C25 095C25 [Regular] +5C745C27 0927 [Regular] +5C745C30 0900 [Regular] +5C745C3F 093F [Regular] +5C745C40 0940 [Regular] +5C745C5A 091A [Regular] +5C745C5C 095C [Regular] +5C745C5F 095C5F [Regular] +5C745C61 0961 [Regular] +5C745C62 0908 [Regular] +5C745C6E 090A [Regular] +5C745C72 090D [Regular] +5C745C74 0909 [Regular] +5C745C7E 097E [Regular] +5C745C7F 097F [Regular] +5C745C80 0980 [Regular] +5C745C81 0981 [Regular] +5C745C9F 099F [Regular] +5C745CA0 09A0 [Regular] +5C745CA1 09A1 [Regular] +5C745CE0 09E0 [Regular] +5C745CEF 09EF [Regular] +5C745CF9 09F9 [Regular] +5C745CFA 09FA [Regular] +5C745CFC 09FC [Regular] +5C745CFD 09FD [Regular] +5C745CFE 09FE [Regular] +5C745CFF 09FF [Regular] +5C7E5C00 7E00 [Trivial] +5C7E5C08 7E08 [Trivial] +5C7E5C09 7E09 [Trivial] +5C7E5C0A 7E0A [Trivial] +5C7E5C0D 7E0D [Trivial] +5C7E5C1A 7E1A [Trivial] +5C7E5C22 7E22 [Trivial] +5C7E5C25 7E5C25 [Regular] +5C7E5C27 7E27 [Trivial] +5C7E5C30 7E00 [Regular] +5C7E5C3F 7E3F [Trivial] +5C7E5C40 7E40 [Trivial] +5C7E5C5A 7E1A [Regular] +5C7E5C5C 7E5C [Regular] +5C7E5C5F 7E5C5F [Regular] +5C7E5C61 7E61 [Trivial] +5C7E5C62 7E08 [Regular] +5C7E5C6E 7E0A [Regular] +5C7E5C72 7E0D [Regular] +5C7E5C74 7E09 [Regular] +5C7E5C7E 7E7E [Trivial] +5C7E5C7F 7E7F [Trivial] +5C7E5C80 7E80 [Trivial] +5C7E5C81 7E81 [Trivial] +5C7E5C9F 7E9F [Trivial] +5C7E5CA0 7EA0 [Trivial] +5C7E5CA1 7EA1 [Trivial] +5C7E5CE0 7EE0 [Trivial] +5C7E5CEF 7EEF [Trivial] +5C7E5CF9 7EF9 [Trivial] +5C7E5CFA 7EFA [Trivial] +5C7E5CFC 7EFC [Trivial] +5C7E5CFD 7EFD [Trivial] +5C7E5CFE 7EFE [Trivial] +5C7E5CFF 7EFF [Trivial] +5C7F5C00 7F00 [Trivial] +5C7F5C08 7F08 [Trivial] +5C7F5C09 7F09 [Trivial] +5C7F5C0A 7F0A [Trivial] +5C7F5C0D 7F0D [Trivial] +5C7F5C1A 7F1A [Trivial] +5C7F5C22 7F22 [Trivial] +5C7F5C25 7F5C25 [Regular] +5C7F5C27 7F27 [Trivial] +5C7F5C30 7F00 [Regular] +5C7F5C3F 7F3F [Trivial] +5C7F5C40 7F40 [Trivial] +5C7F5C5A 7F1A [Regular] +5C7F5C5C 7F5C [Regular] +5C7F5C5F 7F5C5F [Regular] +5C7F5C61 7F61 [Trivial] +5C7F5C62 7F08 [Regular] +5C7F5C6E 7F0A [Regular] +5C7F5C72 7F0D [Regular] +5C7F5C74 7F09 [Regular] +5C7F5C7E 7F7E [Trivial] +5C7F5C7F 7F7F [Trivial] +5C7F5C80 7F80 [Trivial] +5C7F5C81 7F81 [Trivial] +5C7F5C9F 7F9F [Trivial] +5C7F5CA0 7FA0 [Trivial] +5C7F5CA1 7FA1 [Trivial] +5C7F5CE0 7FE0 [Trivial] +5C7F5CEF 7FEF [Trivial] +5C7F5CF9 7FF9 [Trivial] +5C7F5CFA 7FFA [Trivial] +5C7F5CFC 7FFC [Trivial] +5C7F5CFD 7FFD [Trivial] +5C7F5CFE 7FFE [Trivial] +5C7F5CFF 7FFF [Trivial] +5C805C00 8000 [Trivial][USER] +5C805C08 8008 [Trivial][USER] +5C805C09 8009 [Trivial][USER] +5C805C0A 800A [Trivial][USER] +5C805C0D 800D [Trivial][USER] +5C805C1A 801A [Trivial][USER] +5C805C22 8022 [Trivial][USER] +5C805C25 805C25 [Regular] +5C805C27 8027 [Trivial][USER] +5C805C30 8000 [Regular] +5C805C3F 803F [Trivial][USER] +5C805C40 8040 [Trivial][USER] +5C805C5A 801A [Regular] +5C805C5C 805C [Regular][USER] +5C805C5F 805C5F [Regular] +5C805C61 8061 [Trivial][USER] +5C805C62 8008 [Regular][USER] +5C805C6E 800A [Regular] +5C805C72 800D [Regular] +5C805C74 8009 [Regular] +5C805C7E 807E [Trivial][USER] +5C805C7F 807F [Trivial][USER] +5C805C80 8080 [Trivial][USER] +5C805C81 8081 [Trivial][USER] +5C805C9F 809F [Trivial][USER] +5C805CA0 80A0 [Trivial][USER] +5C805CA1 80A1 [Trivial][USER] +5C805CE0 80E0 [Trivial][USER] +5C805CEF 80EF [Trivial][USER] +5C805CF9 80F9 [Trivial][USER] +5C805CFA 80FA [Trivial][USER] +5C805CFC 80FC [Trivial][USER] +5C805CFD 80FD [Trivial][USER] +5C805CFE 80FE [Trivial][USER] +5C805CFF 80FF [Trivial][USER] +5C815C00 8100 [Trivial][USER] +5C815C08 8108 [Trivial][USER] +5C815C09 8109 [Trivial][USER] +5C815C0A 810A [Trivial][USER] +5C815C0D 810D [Trivial][USER] +5C815C1A 811A [Trivial][USER] +5C815C22 8122 [Trivial][USER] +5C815C25 815C25 [Regular] +5C815C27 8127 [Trivial][USER] +5C815C30 8100 [Regular] +5C815C3F 813F [Trivial][USER] +5C815C40 8140 [Trivial][USER] +5C815C5A 811A [Regular] +5C815C5C 815C [Regular][USER] +5C815C5F 815C5F [Regular] +5C815C61 8161 [Trivial][USER] +5C815C62 8108 [Regular][USER] +5C815C6E 810A [Regular] +5C815C72 810D [Regular] +5C815C74 8109 [Regular] +5C815C7E 817E [Trivial][USER] +5C815C7F 817F [Trivial][USER] +5C815C80 8180 [Trivial][USER] +5C815C81 8181 [Trivial][USER] +5C815C9F 819F [Trivial][USER] +5C815CA0 81A0 [Trivial][USER] +5C815CA1 81A1 [Trivial][USER] +5C815CE0 81E0 [Trivial][USER] +5C815CEF 81EF [Trivial][USER] +5C815CF9 81F9 [Trivial][USER] +5C815CFA 81FA [Trivial][USER] +5C815CFC 81FC [Trivial][USER] +5C815CFD 81FD [Trivial][USER] +5C815CFE 81FE [Trivial][USER] +5C815CFF 81FF [Trivial][USER] +5C9F5C00 9F00 [Trivial][USER] +5C9F5C08 9F08 [Trivial][USER] +5C9F5C09 9F09 [Trivial][USER] +5C9F5C0A 9F0A [Trivial][USER] +5C9F5C0D 9F0D [Trivial][USER] +5C9F5C1A 9F1A [Trivial][USER] +5C9F5C22 9F22 [Trivial][USER] +5C9F5C25 9F5C25 [Regular] +5C9F5C27 9F27 [Trivial][USER] +5C9F5C30 9F00 [Regular] +5C9F5C3F 9F3F [Trivial][USER] +5C9F5C40 9F40 [Trivial][USER] +5C9F5C5A 9F1A [Regular] +5C9F5C5C 9F5C [Regular][USER] +5C9F5C5F 9F5C5F [Regular] +5C9F5C61 9F61 [Trivial][USER] +5C9F5C62 9F08 [Regular][USER] +5C9F5C6E 9F0A [Regular] +5C9F5C72 9F0D [Regular] +5C9F5C74 9F09 [Regular] +5C9F5C7E 9F7E [Trivial][USER] +5C9F5C7F 9F7F [Trivial][USER] +5C9F5C80 9F80 [Trivial][USER] +5C9F5C81 9F81 [Trivial][USER] +5C9F5C9F 9F9F [Trivial][USER] +5C9F5CA0 9FA0 [Trivial][USER] +5C9F5CA1 9FA1 [Trivial][USER] +5C9F5CE0 9FE0 [Trivial][USER] +5C9F5CEF 9FEF [Trivial][USER] +5C9F5CF9 9FF9 [Trivial][USER] +5C9F5CFA 9FFA [Trivial][USER] +5C9F5CFC 9FFC [Trivial][USER] +5C9F5CFD 9FFD [Trivial][USER] +5C9F5CFE 9FFE [Trivial][USER] +5C9F5CFF 9FFF [Trivial][USER] +5CA05C00 A000 [Trivial][USER] +5CA05C08 A008 [Trivial][USER] +5CA05C09 A009 [Trivial][USER] +5CA05C0A A00A [Trivial][USER] +5CA05C0D A00D [Trivial][USER] +5CA05C1A A01A [Trivial][USER] +5CA05C22 A022 [Trivial][USER] +5CA05C25 A05C25 [Regular] +5CA05C27 A027 [Trivial][USER] +5CA05C30 A000 [Regular] +5CA05C3F A03F [Trivial][USER] +5CA05C40 A040 [Trivial][USER] +5CA05C5A A01A [Regular] +5CA05C5C A05C [Regular][USER] +5CA05C5F A05C5F [Regular] +5CA05C61 A061 [Trivial][USER] +5CA05C62 A008 [Regular][USER] +5CA05C6E A00A [Regular] +5CA05C72 A00D [Regular] +5CA05C74 A009 [Regular] +5CA05C7E A07E [Trivial][USER] +5CA05C7F A07F [Trivial][USER] +5CA05C80 A080 [Trivial][USER] +5CA05C81 A081 [Trivial][USER] +5CA05C9F A09F [Trivial][USER] +5CA05CA0 A0A0 [Trivial][USER] +5CA05CA1 A0A1 [Trivial][USER] +5CA05CE0 A0E0 [Trivial][USER] +5CA05CEF A0EF [Trivial][USER] +5CA05CF9 A0F9 [Trivial][USER] +5CA05CFA A0FA [Trivial][USER] +5CA05CFC A0FC [Trivial][USER] +5CA05CFD A0FD [Trivial][USER] +5CA05CFE A0FE [Trivial][USER] +5CA05CFF A0FF [Trivial][USER] +5CA15C00 A100 [Trivial][USER] +5CA15C08 A108 [Trivial][USER] +5CA15C09 A109 [Trivial][USER] +5CA15C0A A10A [Trivial][USER] +5CA15C0D A10D [Trivial][USER] +5CA15C1A A11A [Trivial][USER] +5CA15C22 A122 [Trivial][USER] +5CA15C25 A15C25 [Regular] +5CA15C27 A127 [Trivial][USER] +5CA15C30 A100 [Regular] +5CA15C3F A13F [Trivial][USER] +5CA15C40 A140 [Trivial][USER] +5CA15C5A A11A [Regular] +5CA15C5C A15C [Regular][USER] +5CA15C5F A15C5F [Regular] +5CA15C61 A161 [Trivial][USER] +5CA15C62 A108 [Regular][USER] +5CA15C6E A10A [Regular] +5CA15C72 A10D [Regular] +5CA15C74 A109 [Regular] +5CA15C7E A17E [Trivial][USER] +5CA15C7F A17F [Trivial][USER] +5CA15C80 A180 [Trivial][USER] +5CA15C81 A181 [Trivial][USER] +5CA15C9F A19F [Trivial][USER] +5CA15CA0 A1A0 [Trivial][USER] +5CA15CA1 A1A1 [Trivial][USER] +5CA15CE0 A1E0 [Trivial][USER] +5CA15CEF A1EF [Trivial][USER] +5CA15CF9 A1F9 [Trivial][USER] +5CA15CFA A1FA [Trivial][USER] +5CA15CFC A1FC [Trivial][USER] +5CA15CFD A1FD [Trivial][USER] +5CA15CFE A1FE [Trivial][USER] +5CA15CFF A1FF [Trivial][USER] +5CE05C00 E000 [Trivial][USER] +5CE05C08 E008 [Trivial][USER] +5CE05C09 E009 [Trivial][USER] +5CE05C0A E00A [Trivial][USER] +5CE05C0D E00D [Trivial][USER] +5CE05C1A E01A [Trivial][USER] +5CE05C22 E022 [Trivial][USER] +5CE05C25 E05C25 [Regular] +5CE05C27 E027 [Trivial][USER] +5CE05C30 E000 [Regular] +5CE05C3F E03F [Trivial][USER] +5CE05C40 E040 [Trivial][USER] +5CE05C5A E01A [Regular] +5CE05C5C E05C [Regular][USER] +5CE05C5F E05C5F [Regular] +5CE05C61 E061 [Trivial][USER] +5CE05C62 E008 [Regular][USER] +5CE05C6E E00A [Regular] +5CE05C72 E00D [Regular] +5CE05C74 E009 [Regular] +5CE05C7E E07E [Trivial][USER] +5CE05C7F E07F [Trivial][USER] +5CE05C80 E080 [Trivial][USER] +5CE05C81 E081 [Trivial][USER] +5CE05C9F E09F [Trivial][USER] +5CE05CA0 E0A0 [Trivial][USER] +5CE05CA1 E0A1 [Trivial][USER] +5CE05CE0 E0E0 [Trivial][USER] +5CE05CEF E0EF [Trivial][USER] +5CE05CF9 E0F9 [Trivial][USER] +5CE05CFA E0FA [Trivial][USER] +5CE05CFC E0FC [Trivial][USER] +5CE05CFD E0FD [Trivial][USER] +5CE05CFE E0FE [Trivial][USER] +5CE05CFF E0FF [Trivial][USER] +5CEF5C00 EF00 [Trivial][USER] +5CEF5C08 EF08 [Trivial][USER] +5CEF5C09 EF09 [Trivial][USER] +5CEF5C0A EF0A [Trivial][USER] +5CEF5C0D EF0D [Trivial][USER] +5CEF5C1A EF1A [Trivial][USER] +5CEF5C22 EF22 [Trivial][USER] +5CEF5C25 EF5C25 [Regular] +5CEF5C27 EF27 [Trivial][USER] +5CEF5C30 EF00 [Regular] +5CEF5C3F EF3F [Trivial][USER] +5CEF5C40 EF40 [Trivial][USER] +5CEF5C5A EF1A [Regular] +5CEF5C5C EF5C [Regular][USER] +5CEF5C5F EF5C5F [Regular] +5CEF5C61 EF61 [Trivial][USER] +5CEF5C62 EF08 [Regular][USER] +5CEF5C6E EF0A [Regular] +5CEF5C72 EF0D [Regular] +5CEF5C74 EF09 [Regular] +5CEF5C7E EF7E [Trivial][USER] +5CEF5C7F EF7F [Trivial][USER] +5CEF5C80 EF80 [Trivial][USER] +5CEF5C81 EF81 [Trivial][USER] +5CEF5C9F EF9F [Trivial][USER] +5CEF5CA0 EFA0 [Trivial][USER] +5CEF5CA1 EFA1 [Trivial][USER] +5CEF5CE0 EFE0 [Trivial][USER] +5CEF5CEF EFEF [Trivial][USER] +5CEF5CF9 EFF9 [Trivial][USER] +5CEF5CFA EFFA [Trivial][USER] +5CEF5CFC EFFC [Trivial][USER] +5CEF5CFD EFFD [Trivial][USER] +5CEF5CFE EFFE [Trivial][USER] +5CEF5CFF EFFF [Trivial][USER] +5CF95C00 F900 [Trivial][USER] +5CF95C08 F908 [Trivial][USER] +5CF95C09 F909 [Trivial][USER] +5CF95C0A F90A [Trivial][USER] +5CF95C0D F90D [Trivial][USER] +5CF95C1A F91A [Trivial][USER] +5CF95C22 F922 [Trivial][USER] +5CF95C25 F95C25 [Regular] +5CF95C27 F927 [Trivial][USER] +5CF95C30 F900 [Regular] +5CF95C3F F93F [Trivial][USER] +5CF95C40 F940 [Trivial][USER] +5CF95C5A F91A [Regular] +5CF95C5C F95C [Regular][USER] +5CF95C5F F95C5F [Regular] +5CF95C61 F961 [Trivial][USER] +5CF95C62 F908 [Regular][USER] +5CF95C6E F90A [Regular] +5CF95C72 F90D [Regular] +5CF95C74 F909 [Regular] +5CF95C7E F97E [Trivial][USER] +5CF95C7F F97F [Trivial][USER] +5CF95C80 F980 [Trivial][USER] +5CF95C81 F981 [Trivial][USER] +5CF95C9F F99F [Trivial][USER] +5CF95CA0 F9A0 [Trivial][USER] +5CF95CA1 F9A1 [Trivial][USER] +5CF95CE0 F9E0 [Trivial][USER] +5CF95CEF F9EF [Trivial][USER] +5CF95CF9 F9F9 [Trivial][USER] +5CF95CFA F9FA [Trivial][USER] +5CF95CFC F9FC [Trivial][USER] +5CF95CFD F9FD [Trivial][USER] +5CF95CFE F9FE [Trivial][USER] +5CF95CFF F9FF [Trivial][USER] +5CFA5C00 FA00 [Trivial][USER] +5CFA5C08 FA08 [Trivial][USER] +5CFA5C09 FA09 [Trivial][USER] +5CFA5C0A FA0A [Trivial][USER] +5CFA5C0D FA0D [Trivial][USER] +5CFA5C1A FA1A [Trivial][USER] +5CFA5C22 FA22 [Trivial][USER] +5CFA5C25 FA5C25 [Regular] +5CFA5C27 FA27 [Trivial][USER] +5CFA5C30 FA00 [Regular] +5CFA5C3F FA3F [Trivial][USER] +5CFA5C40 FA40 [Trivial][USER] +5CFA5C5A FA1A [Regular] +5CFA5C5C FA5C [Regular][USER] +5CFA5C5F FA5C5F [Regular] +5CFA5C61 FA61 [Trivial][USER] +5CFA5C62 FA08 [Regular][USER] +5CFA5C6E FA0A [Regular] +5CFA5C72 FA0D [Regular] +5CFA5C74 FA09 [Regular] +5CFA5C7E FA7E [Trivial][USER] +5CFA5C7F FA7F [Trivial][USER] +5CFA5C80 FA80 [Trivial][USER] +5CFA5C81 FA81 [Trivial][USER] +5CFA5C9F FA9F [Trivial][USER] +5CFA5CA0 FAA0 [Trivial][USER] +5CFA5CA1 FAA1 [Trivial][USER] +5CFA5CE0 FAE0 [Trivial][USER] +5CFA5CEF FAEF [Trivial][USER] +5CFA5CF9 FAF9 [Trivial][USER] +5CFA5CFA FAFA [Trivial][USER] +5CFA5CFC FAFC [Trivial][USER] +5CFA5CFD FAFD [Trivial][USER] +5CFA5CFE FAFE [Trivial][USER] +5CFA5CFF FAFF [Trivial][USER] +5CFC5C00 FC00 [Trivial][USER] +5CFC5C08 FC08 [Trivial][USER] +5CFC5C09 FC09 [Trivial][USER] +5CFC5C0A FC0A [Trivial][USER] +5CFC5C0D FC0D [Trivial][USER] +5CFC5C1A FC1A [Trivial][USER] +5CFC5C22 FC22 [Trivial][USER] +5CFC5C25 FC5C25 [Regular] +5CFC5C27 FC27 [Trivial][USER] +5CFC5C30 FC00 [Regular] +5CFC5C3F FC3F [Trivial][USER] +5CFC5C40 FC40 [Trivial][USER] +5CFC5C5A FC1A [Regular] +5CFC5C5C FC5C [Regular][USER] +5CFC5C5F FC5C5F [Regular] +5CFC5C61 FC61 [Trivial][USER] +5CFC5C62 FC08 [Regular][USER] +5CFC5C6E FC0A [Regular] +5CFC5C72 FC0D [Regular] +5CFC5C74 FC09 [Regular] +5CFC5C7E FC7E [Trivial][USER] +5CFC5C7F FC7F [Trivial][USER] +5CFC5C80 FC80 [Trivial][USER] +5CFC5C81 FC81 [Trivial][USER] +5CFC5C9F FC9F [Trivial][USER] +5CFC5CA0 FCA0 [Trivial][USER] +5CFC5CA1 FCA1 [Trivial][USER] +5CFC5CE0 FCE0 [Trivial][USER] +5CFC5CEF FCEF [Trivial][USER] +5CFC5CF9 FCF9 [Trivial][USER] +5CFC5CFA FCFA [Trivial][USER] +5CFC5CFC FCFC [Trivial][USER] +5CFC5CFD FCFD [Trivial][USER] +5CFC5CFE FCFE [Trivial][USER] +5CFC5CFF FCFF [Trivial][USER] +5CFD5C00 FD00 [Trivial][USER] +5CFD5C08 FD08 [Trivial][USER] +5CFD5C09 FD09 [Trivial][USER] +5CFD5C0A FD0A [Trivial][USER] +5CFD5C0D FD0D [Trivial][USER] +5CFD5C1A FD1A [Trivial][USER] +5CFD5C22 FD22 [Trivial][USER] +5CFD5C25 FD5C25 [Regular] +5CFD5C27 FD27 [Trivial][USER] +5CFD5C30 FD00 [Regular] +5CFD5C3F FD3F [Trivial][USER] +5CFD5C40 FD40 [Trivial][USER] +5CFD5C5A FD1A [Regular] +5CFD5C5C FD5C [Regular][USER] +5CFD5C5F FD5C5F [Regular] +5CFD5C61 FD61 [Trivial][USER] +5CFD5C62 FD08 [Regular][USER] +5CFD5C6E FD0A [Regular] +5CFD5C72 FD0D [Regular] +5CFD5C74 FD09 [Regular] +5CFD5C7E FD7E [Trivial][USER] +5CFD5C7F FD7F [Trivial][USER] +5CFD5C80 FD80 [Trivial][USER] +5CFD5C81 FD81 [Trivial][USER] +5CFD5C9F FD9F [Trivial][USER] +5CFD5CA0 FDA0 [Trivial][USER] +5CFD5CA1 FDA1 [Trivial][USER] +5CFD5CE0 FDE0 [Trivial][USER] +5CFD5CEF FDEF [Trivial][USER] +5CFD5CF9 FDF9 [Trivial][USER] +5CFD5CFA FDFA [Trivial][USER] +5CFD5CFC FDFC [Trivial][USER] +5CFD5CFD FDFD [Trivial][USER] +5CFD5CFE FDFE [Trivial][USER] +5CFD5CFF FDFF [Trivial][USER] +5CFE5C00 FE00 [Trivial][USER] +5CFE5C08 FE08 [Trivial][USER] +5CFE5C09 FE09 [Trivial][USER] +5CFE5C0A FE0A [Trivial][USER] +5CFE5C0D FE0D [Trivial][USER] +5CFE5C1A FE1A [Trivial][USER] +5CFE5C22 FE22 [Trivial][USER] +5CFE5C25 FE5C25 [Regular] +5CFE5C27 FE27 [Trivial][USER] +5CFE5C30 FE00 [Regular] +5CFE5C3F FE3F [Trivial][USER] +5CFE5C40 FE40 [Trivial][USER] +5CFE5C5A FE1A [Regular] +5CFE5C5C FE5C [Regular][USER] +5CFE5C5F FE5C5F [Regular] +5CFE5C61 FE61 [Trivial][USER] +5CFE5C62 FE08 [Regular][USER] +5CFE5C6E FE0A [Regular] +5CFE5C72 FE0D [Regular] +5CFE5C74 FE09 [Regular] +5CFE5C7E FE7E [Trivial][USER] +5CFE5C7F FE7F [Trivial][USER] +5CFE5C80 FE80 [Trivial][USER] +5CFE5C81 FE81 [Trivial][USER] +5CFE5C9F FE9F [Trivial][USER] +5CFE5CA0 FEA0 [Trivial][USER] +5CFE5CA1 FEA1 [Trivial][USER] +5CFE5CE0 FEE0 [Trivial][USER] +5CFE5CEF FEEF [Trivial][USER] +5CFE5CF9 FEF9 [Trivial][USER] +5CFE5CFA FEFA [Trivial][USER] +5CFE5CFC FEFC [Trivial][USER] +5CFE5CFD FEFD [Trivial][USER] +5CFE5CFE FEFE [Trivial][USER] +5CFE5CFF FEFF [Trivial][USER] +5CFF5C00 FF00 [Trivial][USER] +5CFF5C08 FF08 [Trivial][USER] +5CFF5C09 FF09 [Trivial][USER] +5CFF5C0A FF0A [Trivial][USER] +5CFF5C0D FF0D [Trivial][USER] +5CFF5C1A FF1A [Trivial][USER] +5CFF5C22 FF22 [Trivial][USER] +5CFF5C25 FF5C25 [Regular] +5CFF5C27 FF27 [Trivial][USER] +5CFF5C30 FF00 [Regular] +5CFF5C3F FF3F [Trivial][USER] +5CFF5C40 FF40 [Trivial][USER] +5CFF5C5A FF1A [Regular] +5CFF5C5C FF5C [Regular][USER] +5CFF5C5F FF5C5F [Regular] +5CFF5C61 FF61 [Trivial][USER] +5CFF5C62 FF08 [Regular][USER] +5CFF5C6E FF0A [Regular] +5CFF5C72 FF0D [Regular] +5CFF5C74 FF09 [Regular] +5CFF5C7E FF7E [Trivial][USER] +5CFF5C7F FF7F [Trivial][USER] +5CFF5C80 FF80 [Trivial][USER] +5CFF5C81 FF81 [Trivial][USER] +5CFF5C9F FF9F [Trivial][USER] +5CFF5CA0 FFA0 [Trivial][USER] +5CFF5CA1 FFA1 [Trivial][USER] +5CFF5CE0 FFE0 [Trivial][USER] +5CFF5CEF FFEF [Trivial][USER] +5CFF5CF9 FFF9 [Trivial][USER] +5CFF5CFA FFFA [Trivial][USER] +5CFF5CFC FFFC [Trivial][USER] +5CFF5CFD FFFD [Trivial][USER] +5CFF5CFE FFFE [Trivial][USER] +5CFF5CFF FFFF [Trivial][USER] +DROP TABLE t1; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP FUNCTION unescape; +DROP FUNCTION unescape_type; +DROP FUNCTION wellformedness; +DROP FUNCTION mysql_real_escape_string_generated; +DROP FUNCTION iswellformed; +DROP TABLE allbytes; +# End of ctype_backslash.inc +SET NAMES latin1; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a ')) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +SET NAMES latin1 COLLATE latin1_bin; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a ')) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +# +# MDEV-6752 Trailing incomplete characters are not replaced to question marks on conversion +# +SET NAMES utf8, character_set_connection=latin1; +SELECT 'Â'; +? +? +SELECT HEX('Â'); +HEX('Â') +3F +SELECT HEX(CAST('Â' AS CHAR CHARACTER SET utf8)); +HEX(CAST('Â' AS CHAR CHARACTER SET utf8)) +3F +SELECT HEX(CAST('Â' AS CHAR CHARACTER SET latin1)); +HEX(CAST('Â' AS CHAR CHARACTER SET latin1)) +3F +SELECT HEX(CONVERT('Â' USING utf8)); +HEX(CONVERT('Â' USING utf8)) +3F +SELECT HEX(CONVERT('Â' USING latin1)); +HEX(CONVERT('Â' USING latin1)) +3F +SELECT 'Âx'; +?x +?x +SELECT HEX('Âx'); +HEX('Âx') +3F78 +SELECT HEX(CAST('Âx' AS CHAR CHARACTER SET utf8)); +HEX(CAST('Âx' AS CHAR CHARACTER SET utf8)) +3F78 +SELECT HEX(CAST('Âx' AS CHAR CHARACTER SET latin1)); +HEX(CAST('Âx' AS CHAR CHARACTER SET latin1)) +3F78 +SELECT HEX(CONVERT('Âx' USING utf8)); +HEX(CONVERT('Âx' USING utf8)) +3F78 +SELECT HEX(CONVERT('Âx' USING latin1)); +HEX(CONVERT('Âx' USING latin1)) +3F78 +SET NAMES utf8; +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1); +INSERT INTO t1 VALUES ('Â'),('Â#'); +Warnings: +Warning 1366 Incorrect string value: '\xC2' for column 'a' at row 1 +Warning 1366 Incorrect string value: '\xC2#' for column 'a' at row 2 +SHOW WARNINGS; +Level Code Message +Warning 1366 Incorrect string value: '\xC2' for column 'a' at row 1 +Warning 1366 Incorrect string value: '\xC2#' for column 'a' at row 2 +SELECT HEX(a),a FROM t1; +HEX(a) a +3F ? +3F23 ?# +DROP TABLE t1; +# +# MDEV-7629 Regression: Bit and hex string literals changed column names in 10.0.14 +# +SELECT _latin1 0x7E, _latin1 X'7E', _latin1 B'01111110'; +_latin1 0x7E _latin1 X'7E' _latin1 B'01111110' +~ ~ ~ +# +# MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant +# +SET NAMES latin1; +CREATE TABLE t1 (a TEXT CHARACTER SET latin1); +INSERT INTO t1 VALUES (0xC0); +SELECT a<>0xEE5D AS a FROM t1; +a +1 +CREATE VIEW v1 AS SELECT a<>0xC0 AS a FROM t1; +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (`t1`.`a` <> 0xc0) AS `a` from `t1` latin1 latin1_swedish_ci +SELECT * FROM v1; +a +0 +DROP VIEW v1; +DROP TABLE t1; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/ctype_latin1_de.result b/mysql-test/r/ctype_latin1_de.result index c07b89ce873..d20a9c89349 100644 --- a/mysql-test/r/ctype_latin1_de.result +++ b/mysql-test/r/ctype_latin1_de.result @@ -343,41 +343,175 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +latin1_german2_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; +"BEGIN ctype_german.inc" drop table if exists t1; create table t1 as select repeat(' ', 64) as s1; select collation(s1) from t1; collation(s1) latin1_german2_ci delete from t1; +INSERT INTO t1 VALUES ('ud'),('uf'); +INSERT INTO t1 VALUES ('od'),('of'); +INSERT INTO t1 VALUES ('e'); +INSERT INTO t1 VALUES ('ad'),('af'); insert into t1 values ('a'),('ae'),(_latin1 0xE4); insert into t1 values ('o'),('oe'),(_latin1 0xF6); insert into t1 values ('s'),('ss'),(_latin1 0xDF); insert into t1 values ('u'),('ue'),(_latin1 0xFC); +INSERT INTO t1 VALUES (_latin1 0xE6), (_latin1 0xC6); +INSERT INTO t1 VALUES (_latin1 0x9C), (_latin1 0x8C); select s1, hex(s1) from t1 order by s1, binary s1; s1 hex(s1) a 61 +ad 6164 ae 6165 ä E4 +af 6166 +e 65 o 6F +od 6F64 oe 6F65 ö F6 +of 6F66 s 73 ss 7373 ß DF u 75 +ud 7564 ue 7565 ü FC +uf 7566 +Æ C6 +æ E6 +Œ 8C +œ 9C select group_concat(s1 order by binary s1) from t1 group by s1; group_concat(s1 order by binary s1) a +ad ae,ä +af +e o +od oe,ö +of s ss,ß u +ud ue,ü +uf +Æ,æ +Œ +œ +SELECT s1, hex(s1), hex(weight_string(s1)) FROM t1 ORDER BY s1, BINARY(s1); +s1 hex(s1) hex(weight_string(s1)) +a 61 41 +ad 6164 4144 +ae 6165 4145 +ä E4 4145 +af 6166 4146 +e 65 45 +o 6F 4F +od 6F64 4F44 +oe 6F65 4F45 +ö F6 4F45 +of 6F66 4F46 +s 73 53 +ss 7373 5353 +ß DF 5353 +u 75 55 +ud 7564 5544 +ue 7565 5545 +ü FC 5545 +uf 7566 5546 +Æ C6 5C +æ E6 5C +Œ 8C 8C +œ 9C 9C +SELECT s1, hex(s1) FROM t1 WHERE s1='ae' ORDER BY s1, BINARY(s1); +s1 hex(s1) +ae 6165 +ä E4 drop table t1; +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) COLLATE latin1_german2_ci NOT NULL DEFAULT '', + `b` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci +INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); +SELECT * FROM t1 ORDER BY a, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY a DESC, b; +a b +ß 1 +s 0 +SELECT * FROM t1 ORDER BY CONCAT(a), b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a) DESC, b; +a b +ß 1 +s 0 +DROP TABLE t1; +"END ctype_german.inc" SET NAMES latin1; CREATE TABLE t1 ( col1 varchar(255) NOT NULL default '' @@ -396,3 +530,308 @@ select * from t1 where length(s1)=1 and s1='oe'; s1 ö drop table t1; +End of 5.1 tests +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set @@collation_connection=latin1_german2_ci; +select @@collation_connection; +@@collation_connection +latin1_german2_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) COLLATE latin1_german2_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +41 +SELECT HEX(ws) FROM t2; +HEX(ws) +41 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) COLLATE latin1_german2_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +4141414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +4141414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +41414141412020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +41414141412020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +41 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +414243 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +4142 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +414243 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +4142432020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +41 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +4142 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +414220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +41422020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +4142202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +41422020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +41 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +4142 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +414243 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +41424320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +41 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +4142 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +414243 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +41424320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +latin1_german2_ci +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +80 +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +808080 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +8080 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +808080 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +8080802020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +80 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +8080 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +808020 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +80802020 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +8080202020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +80802020202020202020202020202020202020202020202020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +80 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +8080 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +808080 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +80808020 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +8080802020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +80808020202020202020202020202020202020202020202020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +80 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +8080 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +808080 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +80808020 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +8080802020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +80808020202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +latin1_german2_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +41 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +414243 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +4142 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +414243 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +4142432020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020434241 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +BEBDBCDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDFBCBDBE +select hex(weight_string('Ä')); +hex(weight_string('Ä')) +4145 +select hex(weight_string('ä')); +hex(weight_string('ä')) +4145 +select hex(weight_string('Ö')); +hex(weight_string('Ö')) +4F45 +select hex(weight_string('ö')); +hex(weight_string('ö')) +4F45 +select hex(weight_string('Ü')); +hex(weight_string('Ü')) +5545 +select hex(weight_string('ü')); +hex(weight_string('ü')) +5545 +select hex(weight_string('S')); +hex(weight_string('S')) +53 +select hex(weight_string('s')); +hex(weight_string('s')) +53 +select hex(weight_string('ß')); +hex(weight_string('ß')) +5353 +select hex(weight_string('ä' as char(1))); +hex(weight_string('ä' as char(1))) +41 +select hex(weight_string('ö' as char(1))); +hex(weight_string('ö' as char(1))) +4F +select hex(weight_string('ü' as char(1))); +hex(weight_string('ü' as char(1))) +55 +select hex(weight_string('ß' as char(1))); +hex(weight_string('ß' as char(1))) +53 +select hex(weight_string('xä' as char(2))); +hex(weight_string('xä' as char(2))) +5841 +select hex(weight_string('xö' as char(2))); +hex(weight_string('xö' as char(2))) +584F +select hex(weight_string('xü' as char(2))); +hex(weight_string('xü' as char(2))) +5855 +select hex(weight_string('xß' as char(2))); +hex(weight_string('xß' as char(2))) +5853 +# +# End of 5.6 tests +# diff --git a/mysql-test/r/ctype_latin2.result b/mysql-test/r/ctype_latin2.result index c2c021b0760..65aa2368ce4 100644 --- a/mysql-test/r/ctype_latin2.result +++ b/mysql-test/r/ctype_latin2.result @@ -381,3 +381,466 @@ _ ÷ ÿ drop table t1; +End of 5.1 tests +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set names latin2; +select @@collation_connection; +@@collation_connection +latin2_general_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(1) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +41 +SELECT HEX(ws) FROM t2; +HEX(ws) +41 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET latin2 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(5) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +4141414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +4141414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +41414141412020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +41414141412020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +41 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +414445 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +4144 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +414445 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +4144452020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +41 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +4144 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +414420 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +41442020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +4144202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +41442020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +41 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +4144 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +414445 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +41444520 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +4144452020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +41444520202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +41 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +4144 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +414445 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +41444520 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +4144452020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +41444520202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +latin2_general_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +41 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +414445 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +4144 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +414445 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +4144452020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020454441 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +BEBBBADFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDFBABBBE +# +# Bug#32390 Character sets: casting utf32 to/from date doesn't work +# +CREATE TABLE t1 AS SELECT repeat('a',20) AS s1 LIMIT 0; +SET time_zone=_latin1'+03:00'; +SET timestamp=1216359724; +INSERT INTO t1 VALUES (current_date); +INSERT INTO t1 VALUES (current_time); +INSERT INTO t1 VALUES (current_timestamp); +SELECT s1, hex(s1) FROM t1; +s1 hex(s1) +2008-07-18 323030382D30372D3138 +08:42:04 30383A34323A3034 +2008-07-18 08:42:04 323030382D30372D31382030383A34323A3034 +DROP TABLE t1; +SET timestamp=0; +SET time_zone=default; +# +# MDEV-5298 Illegal mix of collations on timestamp +# +SELECT CHARSET('2013-11-15 00:41:28' - INTERVAL 7 DAY); +CHARSET('2013-11-15 00:41:28' - INTERVAL 7 DAY) +latin2 +SELECT COERCIBILITY('2013-11-15 00:41:28' - INTERVAL 7 DAY); +COERCIBILITY('2013-11-15 00:41:28' - INTERVAL 7 DAY) +4 +SELECT CHARSET(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY); +CHARSET(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY) +binary +SELECT COERCIBILITY(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY); +COERCIBILITY(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY) +5 +SELECT CHARSET(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)); +CHARSET(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)) +latin2 +SELECT COERCIBILITY(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)) +4 +SELECT CHARSET(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)); +CHARSET(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)) +latin2 +SELECT COERCIBILITY(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)) +4 +SELECT CHARSET(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)); +CHARSET(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)) +latin2 +SELECT COERCIBILITY(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)) +4 +SELECT HEX(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)); +HEX(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)) +323030312D30312D30312030303A30303A3030 +SELECT CHARSET(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)); +CHARSET(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +latin2 +SELECT COERCIBILITY(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +4 +SELECT HEX(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)); +HEX(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +323030312D30312D30312030303A30303A3030 +CREATE TABLE t1 AS SELECT REPEAT('a', 64) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(64) CHARACTER SET latin2 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (''); +SELECT CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +latin2 +SELECT COERCIBILITY(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +COERCIBILITY(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +2 +SELECT HEX(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +HEX(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +323030312D30312D30312030303A30303A3030 +SELECT CHARSET(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +CHARSET(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +latin2 +SELECT COERCIBILITY(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +COERCIBILITY(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +2 +SELECT HEX(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +HEX(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +323030312D30312D30312030303A30303A3030 +DROP TABLE t1; +CREATE TABLE t1 (t TIMESTAMP NOT NULL); +INSERT INTO t1 VALUES ('2001-01-01 00:00:00'); +SELECT * FROM t1 WHERE t < '2013-11-15 00:41:28' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t = '2001-01-08 00:00:00' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t < CONCAT('2013-11-15 00:41:28',LEFT(RAND(),0)) - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t = CONCAT('2001-01-08 00:00:00',LEFT(RAND(),0)) - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t < TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t = TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +DROP TABLE t1; +set collation_connection=latin2_bin; +select @@collation_connection; +@@collation_connection +latin2_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET latin2 COLLATE latin2_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(1) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +61 +SELECT HEX(ws) FROM t2; +HEX(ws) +61 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET latin2 COLLATE latin2_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(5) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +6161616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +6161616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +61616161612020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +61616161612020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +61 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +616263 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +6162 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +616263 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +6162632020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +61 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +6162 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +616220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +61622020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +6162202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +61622020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +61 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +6162 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +616263 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +61626320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +61 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +6162 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +616263 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +61626320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +latin2_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +61 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +616263 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +6162 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +616263 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +6162632020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020636261 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +9E9D9CDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDF9C9D9E +# +# End of 5.6 tests +# diff --git a/mysql-test/r/ctype_latin2_ch.result b/mysql-test/r/ctype_latin2_ch.result index 5b607872737..e54522eec9f 100644 --- a/mysql-test/r/ctype_latin2_ch.result +++ b/mysql-test/r/ctype_latin2_ch.result @@ -29,3 +29,857 @@ id tt select * from t1 where tt like '%AA%'; id tt drop table t1; +set names latin2 collate latin2_czech_cs; +SELECT strcmp('a','a '); +strcmp('a','a ') +0 +SELECT strcmp('a\0','a' ); +strcmp('a\0','a' ) +1 +SELECT strcmp('a\0','a '); +strcmp('a\0','a ') +1 +SELECT strcmp('a\t','a' ); +strcmp('a\t','a' ) +0 +SELECT strcmp('a\t','a '); +strcmp('a\t','a ') +0 +create table t1 ( +a varchar(2) character set latin2 collate latin2_czech_cs, +primary key(a) +); +insert into t1 set a=0x5ff; +insert into t1 set a=0xff; +select hex(a) from t1; +hex(a) +05FF +FF +drop table t1; +create table t1 ( +ch varchar(1), +name varchar(64) +) character set latin2 collate latin2_czech_cs; +insert into t1 values (0x6F,'LATIN SMALL LETTER O'); +insert into t1 values (0xF3,'LATIN SMALL LETTER O WITH ACUTE'); +insert into t1 values (0xF4,'LATIN SMALL LETTER O WITH CIRCUMFLEX'); +insert into t1 values (0xF6,'LATIN SMALL LETTER O WITH DIAERESIS'); +insert into t1 values (0xF5,'LATIN SMALL LETTER O WITH DOUBLE ACUTE'); +insert into t1 values (0x4F,'LATIN CAPITAL LETTER O'); +insert into t1 values (0xD3,'LATIN CAPITAL LETTER O WITH ACUTE'); +insert into t1 values (0xD4,'LATIN CAPITAL LETTER O WITH CURCUMFLEX'); +insert into t1 values (0xD6,'LATIN CAPITAL LETTER O WITH DIAERESIS'); +insert into t1 values (0xD5,'LATIN CAPITAL LETTER O WITH DOUBLE ACUTE'); +insert into t1 values (0x75,'LATIN SMALL LETTER U'); +insert into t1 values (0xFA,'LATIN SMALL LETTER U WITH ACUTE'); +insert into t1 values (0xF9,'LATIN SMALL LETTER U WITH RING ABOVE'); +insert into t1 values (0xFC,'LATIN SMALL LETTER U WITH DIAERESIS'); +insert into t1 values (0xFB,'LATIN SMALL LETTER U WITH DOUBLE ACUTE'); +insert into t1 values (0x55,'LATIN CAPITAL LETTER U'); +insert into t1 values (0xDA,'LATIN CAPITAL LETTER U WITH ACUTE'); +insert into t1 values (0xD9,'LATIN CAPITAL LETTER U WITH RING ABOVE'); +insert into t1 values (0xDC,'LATIN CAPITAL LETTER U WITH DIAERESIS'); +insert into t1 values (0xDB,'LATIN CAPITAL LETTER U WITH DOUBLE ACUTE'); +select +hex(weight_string(ch level 1)) l1, +hex(weight_string(ch level 2)) l2, +hex(weight_string(ch level 3)) l3, +hex(weight_string(ch level 4)) l4, +name from t1 order by binary l1, binary l2, binary l3, binary l4; +l1 l2 l3 l4 name +1401 2701 4C01 4C00 LATIN SMALL LETTER O +1401 2701 4D01 4D00 LATIN CAPITAL LETTER O +1401 2801 4E01 4E00 LATIN SMALL LETTER O WITH ACUTE +1401 2801 4F01 4F00 LATIN CAPITAL LETTER O WITH ACUTE +1401 2901 5001 5000 LATIN SMALL LETTER O WITH CIRCUMFLEX +1401 2901 5101 5100 LATIN CAPITAL LETTER O WITH CURCUMFLEX +1401 2A01 5201 5200 LATIN SMALL LETTER O WITH DIAERESIS +1401 2A01 5301 5300 LATIN CAPITAL LETTER O WITH DIAERESIS +1401 2B01 5401 5400 LATIN SMALL LETTER O WITH DOUBLE ACUTE +1401 2B01 5501 5500 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE +1C01 3801 6E01 6E00 LATIN SMALL LETTER U +1C01 3801 6F01 6F00 LATIN CAPITAL LETTER U +1C01 3901 7001 7000 LATIN SMALL LETTER U WITH ACUTE +1C01 3901 7101 7100 LATIN CAPITAL LETTER U WITH ACUTE +1C01 3A01 7201 7200 LATIN SMALL LETTER U WITH RING ABOVE +1C01 3A01 7301 7300 LATIN CAPITAL LETTER U WITH RING ABOVE +1C01 3B01 7401 7400 LATIN SMALL LETTER U WITH DIAERESIS +1C01 3B01 7501 7500 LATIN CAPITAL LETTER U WITH DIAERESIS +1C01 3C01 7601 7600 LATIN SMALL LETTER U WITH DOUBLE ACUTE +1C01 3C01 7701 7700 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE +drop table t1; +set names utf8; +create table t1 ( +ch varchar(1), +name varchar(64) +) character set latin2 collate latin2_czech_cs; +insert into t1 values (0x4F,'LATIN CAPITAL LETTER O'); +insert into t1 values (0xD3,'LATIN CAPITAL LETTER O WITH ACUTE'); +insert into t1 values (0xD4,'LATIN CAPITAL LETTER O WITH CURCUMFLEX'); +insert into t1 values (0xD6,'LATIN CAPITAL LETTER O WITH DIAERESIS'); +insert into t1 values (0xD5,'LATIN CAPITAL LETTER O WITH DOUBLE ACUTE'); +insert into t1 values (0x75,'LATIN _SMALL_ LETTER U'); +insert into t1 values (0xFA,'LATIN _SMALL_ LETTER U WITH ACUTE'); +insert into t1 values (0xF9,'LATIN _SMALL_ LETTER U WITH RING ABOVE'); +insert into t1 values (0xFC,'LATIN _SMALL_ LETTER U WITH DIAERESIS'); +insert into t1 values (0xFB,'LATIN _SMALL_ LETTER U WITH DOUBLE ACUTE'); +select ch, +hex(weight_string(ch level 1)) l1, +hex(weight_string(ch level 2)) l2, +hex(weight_string(ch level 3)) l3, +hex(weight_string(ch level 4)) l4, +name from t1 order by ch; +ch l1 l2 l3 l4 name +O 1401 2701 4D01 4D00 LATIN CAPITAL LETTER O +Ó 1401 2801 4F01 4F00 LATIN CAPITAL LETTER O WITH ACUTE +Ô 1401 2901 5101 5100 LATIN CAPITAL LETTER O WITH CURCUMFLEX +Ö 1401 2A01 5301 5300 LATIN CAPITAL LETTER O WITH DIAERESIS +Å 1401 2B01 5501 5500 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE +u 1C01 3801 6E01 6E00 LATIN _SMALL_ LETTER U +ú 1C01 3901 7001 7000 LATIN _SMALL_ LETTER U WITH ACUTE +ů 1C01 3A01 7201 7200 LATIN _SMALL_ LETTER U WITH RING ABOVE +ü 1C01 3B01 7401 7400 LATIN _SMALL_ LETTER U WITH DIAERESIS +ű 1C01 3C01 7601 7600 LATIN _SMALL_ LETTER U WITH DOUBLE ACUTE +alter table t1 modify ch char(1), modify name char(64); +select ch, +hex(weight_string(ch level 1)) l1, +hex(weight_string(ch level 2)) l2, +hex(weight_string(ch level 3)) l3, +hex(weight_string(ch level 4)) l4, +name from t1 order by ch; +ch l1 l2 l3 l4 name +O 1401 2701 4D01 4D00 LATIN CAPITAL LETTER O +Ó 1401 2801 4F01 4F00 LATIN CAPITAL LETTER O WITH ACUTE +Ô 1401 2901 5101 5100 LATIN CAPITAL LETTER O WITH CURCUMFLEX +Ö 1401 2A01 5301 5300 LATIN CAPITAL LETTER O WITH DIAERESIS +Å 1401 2B01 5501 5500 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE +u 1C01 3801 6E01 6E00 LATIN _SMALL_ LETTER U +ú 1C01 3901 7001 7000 LATIN _SMALL_ LETTER U WITH ACUTE +ů 1C01 3A01 7201 7200 LATIN _SMALL_ LETTER U WITH RING ABOVE +ü 1C01 3B01 7401 7400 LATIN _SMALL_ LETTER U WITH DIAERESIS +ű 1C01 3C01 7601 7600 LATIN _SMALL_ LETTER U WITH DOUBLE ACUTE +select ch, +hex(weight_string(ch level 1)) l1, +hex(weight_string(ch level 2)) l2, +hex(weight_string(ch level 3)) l3, +hex(weight_string(ch level 4)) l4, +name from t1 order by concat(ch); +ch l1 l2 l3 l4 name +O 1401 2701 4D01 4D00 LATIN CAPITAL LETTER O +Ó 1401 2801 4F01 4F00 LATIN CAPITAL LETTER O WITH ACUTE +Ô 1401 2901 5101 5100 LATIN CAPITAL LETTER O WITH CURCUMFLEX +Ö 1401 2A01 5301 5300 LATIN CAPITAL LETTER O WITH DIAERESIS +Å 1401 2B01 5501 5500 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE +u 1C01 3801 6E01 6E00 LATIN _SMALL_ LETTER U +ú 1C01 3901 7001 7000 LATIN _SMALL_ LETTER U WITH ACUTE +ů 1C01 3A01 7201 7200 LATIN _SMALL_ LETTER U WITH RING ABOVE +ü 1C01 3B01 7401 7400 LATIN _SMALL_ LETTER U WITH DIAERESIS +ű 1C01 3C01 7601 7600 LATIN _SMALL_ LETTER U WITH DOUBLE ACUTE +drop table t1; +SET collation_connection=latin2_czech_cs; +CREATE TABLE t1 ENGINE=MYISAM AS SELECT repeat('a', 5) AS s1 LIMIT 0; +INSERT INTO t1 VALUES ('x'),('y'),('z'),('X'),('Y'),('Z'); +SELECT * FROM t1 GROUP BY s1; +s1 +x +X +y +Y +z +Z +SELECT * FROM t1 ORDER BY s1; +s1 +x +X +y +Y +z +Z +CREATE INDEX i1 ON t1 (s1); +SELECT * FROM t1 GROUP BY s1; +s1 +x +X +y +Y +z +Z +SELECT * FROM t1 ORDER BY s1; +s1 +x +X +y +Y +z +Z +DROP TABLE t1; +CREATE TABLE t1 ENGINE=INNODB AS SELECT repeat('a', 5) AS s1 LIMIT 0; +INSERT INTO t1 VALUES ('x'),('y'),('z'),('X'),('Y'),('Z'); +SELECT * FROM t1 GROUP BY s1; +s1 +x +X +y +Y +z +Z +SELECT * FROM t1 ORDER BY s1; +s1 +x +X +y +Y +z +Z +CREATE INDEX i1 ON t1 (s1); +SELECT * FROM t1 GROUP BY s1; +s1 +x +X +y +Y +z +Z +SELECT * FROM t1 ORDER BY s1; +s1 +x +X +y +Y +z +Z +DROP TABLE t1; +SET sql_mode=''; +CREATE TABLE t1 ENGINE=FALCON AS SELECT repeat('a', 5) AS s1 LIMIT 0; +SET sql_mode=DEFAULT; +INSERT INTO t1 VALUES ('x'),('y'),('z'),('X'),('Y'),('Z'); +SELECT * FROM t1 GROUP BY s1; +s1 +x +X +y +Y +z +Z +SELECT * FROM t1 ORDER BY s1; +s1 +x +X +y +Y +z +Z +CREATE INDEX i1 ON t1 (s1); +SELECT * FROM t1 GROUP BY s1; +s1 +x +X +y +Y +z +Z +SELECT * FROM t1 ORDER BY s1; +s1 +x +X +y +Y +z +Z +DROP TABLE t1; +SET sql_mode=''; +CREATE TABLE t1 ENGINE=MARIA AS SELECT repeat('a', 5) AS s1 LIMIT 0; +SET sql_mode=DEFAULT; +INSERT INTO t1 VALUES ('x'),('y'),('z'),('X'),('Y'),('Z'); +SELECT * FROM t1 GROUP BY s1; +s1 +x +X +y +Y +z +Z +SELECT * FROM t1 ORDER BY s1; +s1 +x +X +y +Y +z +Z +CREATE INDEX i1 ON t1 (s1); +SELECT * FROM t1 GROUP BY s1; +s1 +x +X +y +Y +z +Z +SELECT * FROM t1 ORDER BY s1; +s1 +x +X +y +Y +z +Z +DROP TABLE t1; +SET NAMES latin2; +CREATE TABLE t2(colours SET('red','blue','yellow'))CHARACTER SET latin2 COLLATE +latin2_czech_cs; +CREATE TABLE t1(continent ENUM('Asia', 'Europe','Africa','Antartica'))CHARACTER SET latin2 +COLLATE latin2_czech_cs; +INSERT INTO t1 VALUES('Asia'); +INSERT INTO t2 VALUES('blue'); +SELECT * FROM t1; +continent +Asia +SELECT * FROM t2; +colours +blue +DROP TABLE t1, t2; +CREATE TABLE `t1` ( +`ID` smallint(5) unsigned zerofill NOT NULL AUTO_INCREMENT, +`Post` enum('','B','O','Z','U') COLLATE latin2_czech_cs DEFAULT NULL, +PRIMARY KEY (`ID`) +) ENGINE=MyISAM AUTO_INCREMENT=135 DEFAULT CHARSET=latin2; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `ID` smallint(5) unsigned zerofill NOT NULL AUTO_INCREMENT, + `Post` enum('','B','O','Z','U') CHARACTER SET latin2 COLLATE latin2_czech_cs DEFAULT NULL, + PRIMARY KEY (`ID`) +) ENGINE=MyISAM AUTO_INCREMENT=135 DEFAULT CHARSET=latin2 +INSERT INTO t1 (ID,Post) VALUES (00041,''); +SELECT ID, Post, HEX(WEIGHT_STRING(Post)) FROM t1; +ID Post HEX(WEIGHT_STRING(Post)) +00041 01010100 +DROP TABLE t1; +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set names latin2 collate latin2_czech_cs; +SELECT strcmp('a','a '); +strcmp('a','a ') +0 +SELECT strcmp('a\0','a' ); +strcmp('a\0','a' ) +1 +SELECT strcmp('a\0','a '); +strcmp('a\0','a ') +1 +SELECT strcmp('a\t','a' ); +strcmp('a\t','a' ) +0 +SELECT strcmp('a\t','a '); +strcmp('a\t','a ') +0 +# +# Note: +# latin2_czech_cs does not support WEIGHT_STRING in full extent +# +select @@collation_connection; +@@collation_connection +latin2_czech_cs +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(8) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0301030103010300 +SELECT HEX(ws) FROM t2; +HEX(ws) +0301030103010300 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(24) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +030303030301030303030301030303030301030303030300 +SELECT HEX(ws) FROM t2; +HEX(ws) +030303030301030303030301030303030301030303030300 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(24) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +030303030301030303030301030303030301030303030300 +SELECT HEX(ws) FROM t2; +HEX(ws) +030303030301030303030301030303030301030303030300 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(24) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +030303030301030303030301030303030301030303030300 +SELECT HEX(ws) FROM t2; +HEX(ws) +030303030301030303030301030303030301030303030300 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +0301030103010300 +select hex(weight_string('A')); +hex(weight_string('A')) +0301030104010400 +select hex(weight_string('abc')); +hex(weight_string('abc')) +0304050103090A01030F1101030F1100 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +0304050103090A01030F1101030F1100 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +0304050103090A01030F1101030F1100 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +0304050103090A01030F1101030F1100 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +03 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0304 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +030405 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +03040501 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0304050103 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +0304050103090A01030F1101030F1100202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +03 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0304 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +030405 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +03040501 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0304050103 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +0304050103090A01030F1101030F1100202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +03 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0304 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +030405 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +03040501 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0304050103 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +0304050103090A01030F1101030F1100202020202020202020 +select @@collation_connection; +@@collation_connection +latin2_czech_cs +select collation(cast(_latin1 0xDF as char)); +collation(cast(_latin1 0xDF as char)) +latin2_czech_cs +select hex(weight_string('s')); +hex(weight_string('s')) +1901310160016000 +select hex(weight_string(cast(_latin1 0xDF as char))); +hex(weight_string(cast(_latin1 0xDF as char))) +010101E200 +select hex(weight_string(cast(_latin1 0xDF as char) as char(1))); +hex(weight_string(cast(_latin1 0xDF as char) as char(1))) +010101E200 +select hex(weight_string('c')); +hex(weight_string('c')) +05010A0111011100 +select hex(weight_string('h')); +hex(weight_string('h')) +0B0118012D012D00 +select hex(weight_string('ch')); +hex(weight_string('ch')) +0C0119012F012F00 +select hex(weight_string('i')); +hex(weight_string('i')) +0D011A0132013200 +select hex(weight_string(cast(_latin1 0x6368DF as char))); +hex(weight_string(cast(_latin1 0x6368DF as char))) +0C0119012F012FE200 +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(1))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(1))) +0C0119012F012FE200 +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(2))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(2))) +0C0119012F012FE200 +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(3))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(3))) +0C0119012F012FE200 +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(4))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(4))) +0C0119012F012FE200 +select hex(weight_string(cast(_latin1 0xDF6368 as char))); +hex(weight_string(cast(_latin1 0xDF6368 as char))) +0C0119012F01E22F00 +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(1))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(1))) +0C0119012F01E22F00 +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(2))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(2))) +0C0119012F01E22F00 +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(3))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(3))) +0C0119012F01E22F00 +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(4))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(4))) +0C0119012F01E22F00 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 2, 0xC0)) +0C +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 2, 0xC0)) +0C01 +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 2, 0xC0)) +0C0119 +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 2, 0xC0)) +0C011901 +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 2, 0xC0)) +0C0119012F012FE20020202020202020202020202020202020 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 3, 0xC0)) +0C +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 3, 0xC0)) +0C01 +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 3, 0xC0)) +0C0119 +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 3, 0xC0)) +0C011901 +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 3, 0xC0)) +0C0119012F012FE20020202020202020202020202020202020 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 4, 0xC0)) +0C +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 4, 0xC0)) +0C01 +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 4, 0xC0)) +0C0119 +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 4, 0xC0)) +0C011901 +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 4, 0xC0)) +0C0119012F012FE20020202020202020202020202020202020 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 2,0xC0)) +0C +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 2,0xC0)) +0C01 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 2,0xC0)) +0C0119 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 2,0xC0)) +0C011901 +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 2,0xC0)) +0C0119012F01E22F0020202020202020202020202020202020 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 3,0xC0)) +0C +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 3,0xC0)) +0C01 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 3,0xC0)) +0C0119 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 3,0xC0)) +0C011901 +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 3,0xC0)) +0C0119012F01E22F0020202020202020202020202020202020 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 4,0xC0)) +0C +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 4,0xC0)) +0C01 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 4,0xC0)) +0C0119 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 4,0xC0)) +0C011901 +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0)) +0C0119012F01E22F0020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +latin2_czech_cs +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +0301 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +0301 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +03040501 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +03040501 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +03040501 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +03040501 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +03040501 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +03040501 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +03040501 +select @@collation_connection; +@@collation_connection +latin2_czech_cs +select hex(weight_string('a' LEVEL 2)); +hex(weight_string('a' LEVEL 2)) +0301 +select hex(weight_string('A' LEVEL 2)); +hex(weight_string('A' LEVEL 2)) +0301 +select hex(weight_string('abc' LEVEL 2)); +hex(weight_string('abc' LEVEL 2)) +03090A01 +select hex(weight_string('abc' as char(2) LEVEL 2)); +hex(weight_string('abc' as char(2) LEVEL 2)) +03090A01 +select hex(weight_string('abc' as char(3) LEVEL 2)); +hex(weight_string('abc' as char(3) LEVEL 2)) +03090A01 +select hex(weight_string('abc' as char(5) LEVEL 2)); +hex(weight_string('abc' as char(5) LEVEL 2)) +03090A01 +select @@collation_connection; +@@collation_connection +latin2_czech_cs +select hex(weight_string('a' LEVEL 3)); +hex(weight_string('a' LEVEL 3)) +0301 +select hex(weight_string('A' LEVEL 3)); +hex(weight_string('A' LEVEL 3)) +0401 +select hex(weight_string('abc' LEVEL 3)); +hex(weight_string('abc' LEVEL 3)) +030F1101 +select hex(weight_string('abc' as char(2) LEVEL 3)); +hex(weight_string('abc' as char(2) LEVEL 3)) +030F1101 +select hex(weight_string('abc' as char(3) LEVEL 3)); +hex(weight_string('abc' as char(3) LEVEL 3)) +030F1101 +select hex(weight_string('Abc' as char(5) LEVEL 3)); +hex(weight_string('Abc' as char(5) LEVEL 3)) +040F1101 +select hex(weight_string('Abc' as char(5) LEVEL 3 REVERSE)); +hex(weight_string('Abc' as char(5) LEVEL 3 REVERSE)) +040F1101 +select hex(weight_string('Abc' as char(5) LEVEL 3 DESC)); +hex(weight_string('Abc' as char(5) LEVEL 3 DESC)) +040F1101 +select hex(weight_string('Abc' as char(5) LEVEL 3 DESC REVERSE)); +hex(weight_string('Abc' as char(5) LEVEL 3 DESC REVERSE)) +040F1101 +select @@collation_connection; +@@collation_connection +latin2_czech_cs +select hex(weight_string('a' LEVEL 4)); +hex(weight_string('a' LEVEL 4)) +0300 +select hex(weight_string('A' LEVEL 4)); +hex(weight_string('A' LEVEL 4)) +0400 +select hex(weight_string('abc' LEVEL 4)); +hex(weight_string('abc' LEVEL 4)) +030F1100 +select hex(weight_string('abc' as char(2) LEVEL 4)); +hex(weight_string('abc' as char(2) LEVEL 4)) +030F1100 +select hex(weight_string('abc' as char(3) LEVEL 4)); +hex(weight_string('abc' as char(3) LEVEL 4)) +030F1100 +select hex(weight_string('abc' as char(5) LEVEL 4)); +hex(weight_string('abc' as char(5) LEVEL 4)) +030F1100 +select hex(weight_string('abc' as char(5) LEVEL 4 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 4 REVERSE)) +030F1100 +select hex(weight_string('abc' as char(5) LEVEL 4 DESC)); +hex(weight_string('abc' as char(5) LEVEL 4 DESC)) +030F1100 +select hex(weight_string('abc' as char(5) LEVEL 4 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 4 DESC REVERSE)) +030F1100 +select @@collation_connection; +@@collation_connection +latin2_czech_cs +select hex(weight_string('a' LEVEL 1,2)); +hex(weight_string('a' LEVEL 1,2)) +03010301 +select hex(weight_string('a' LEVEL 1-2)); +hex(weight_string('a' LEVEL 1-2)) +03010301 +select hex(weight_string('A' LEVEL 1,2)); +hex(weight_string('A' LEVEL 1,2)) +03010301 +select hex(weight_string('A' LEVEL 1-2)); +hex(weight_string('A' LEVEL 1-2)) +03010301 +select @@collation_connection; +@@collation_connection +latin2_czech_cs +select hex(weight_string('a' LEVEL 1,3)); +hex(weight_string('a' LEVEL 1,3)) +03010301 +select hex(weight_string('a' LEVEL 1-3)); +hex(weight_string('a' LEVEL 1-3)) +030103010301 +select hex(weight_string('A' LEVEL 1,3)); +hex(weight_string('A' LEVEL 1,3)) +03010401 +select hex(weight_string('A' LEVEL 1-3)); +hex(weight_string('A' LEVEL 1-3)) +030103010401 +select hex(weight_string('a' LEVEL 1,4)); +hex(weight_string('a' LEVEL 1,4)) +03010300 +select hex(weight_string('a' LEVEL 1-4)); +hex(weight_string('a' LEVEL 1-4)) +0301030103010300 +select hex(weight_string('A' LEVEL 1,4)); +hex(weight_string('A' LEVEL 1,4)) +03010400 +select hex(weight_string('A' LEVEL 1-4)); +hex(weight_string('A' LEVEL 1-4)) +0301030104010400 +select hex(weight_string('a' LEVEL 2,3)); +hex(weight_string('a' LEVEL 2,3)) +03010301 +select hex(weight_string('a' LEVEL 2-3)); +hex(weight_string('a' LEVEL 2-3)) +03010301 +select hex(weight_string('A' LEVEL 2,3)); +hex(weight_string('A' LEVEL 2,3)) +03010401 +select hex(weight_string('A' LEVEL 2-3)); +hex(weight_string('A' LEVEL 2-3)) +03010401 +select hex(weight_string('a' LEVEL 2,4)); +hex(weight_string('a' LEVEL 2,4)) +03010300 +select hex(weight_string('a' LEVEL 2-4)); +hex(weight_string('a' LEVEL 2-4)) +030103010300 +select hex(weight_string('A' LEVEL 2,4)); +hex(weight_string('A' LEVEL 2,4)) +03010400 +select hex(weight_string('A' LEVEL 2-4)); +hex(weight_string('A' LEVEL 2-4)) +030104010400 +select hex(weight_string('a' LEVEL 3,4)); +hex(weight_string('a' LEVEL 3,4)) +03010300 +select hex(weight_string('a' LEVEL 3-4)); +hex(weight_string('a' LEVEL 3-4)) +03010300 +select hex(weight_string('A' LEVEL 3,4)); +hex(weight_string('A' LEVEL 3,4)) +04010400 +select hex(weight_string('A' LEVEL 3-4)); +hex(weight_string('A' LEVEL 3-4)) +04010400 +select hex(weight_string('a' LEVEL 1,2,3,4)); +hex(weight_string('a' LEVEL 1,2,3,4)) +0301030103010300 +select hex(weight_string('a' LEVEL 2,3,4)); +hex(weight_string('a' LEVEL 2,3,4)) +030103010300 +select hex(weight_string('a' LEVEL 1,3,4)); +hex(weight_string('a' LEVEL 1,3,4)) +030103010300 +select hex(weight_string('a' LEVEL 1,2,3)); +hex(weight_string('a' LEVEL 1,2,3)) +030103010301 +select hex(weight_string('a' LEVEL 0)); +hex(weight_string('a' LEVEL 0)) +0301 +select hex(weight_string('a' LEVEL 8)); +hex(weight_string('a' LEVEL 8)) +0300 +select hex(weight_string('a' LEVEL 1,8)); +hex(weight_string('a' LEVEL 1,8)) +03010300 +# +# End of 5.6 tests +# diff --git a/mysql-test/r/ctype_ldml.result b/mysql-test/r/ctype_ldml.result index a1c8b86a447..acb92a8363b 100644 --- a/mysql-test/r/ctype_ldml.result +++ b/mysql-test/r/ctype_ldml.result @@ -80,6 +80,51 @@ select * from t1 where c1='b'; c1 a drop table t1; +SELECT hex(weight_string(_utf8mb4'a' collate utf8mb4_test_ci)); +hex(weight_string(_utf8mb4'a' collate utf8mb4_test_ci)) +120F +SELECT hex(weight_string(convert(_utf32 0x10002 using utf8mb4) collate utf8mb4_test_ci)); +hex(weight_string(convert(_utf32 0x10002 using utf8mb4) collate utf8mb4_test_ci)) +314A +SELECT hex(@a:=convert(_utf32 0x10400 using utf8mb4) collate utf8mb4_test_ci), hex(lower(@a)); +hex(@a:=convert(_utf32 0x10400 using utf8mb4) collate utf8mb4_test_ci) hex(lower(@a)) +F0909080 F09090A8 +SELECT hex(@a:=convert(_utf32 0x10428 using utf8mb4) collate utf8mb4_test_ci), hex(upper(@a)); +hex(@a:=convert(_utf32 0x10428 using utf8mb4) collate utf8mb4_test_ci) hex(upper(@a)) +F09090A8 F0909080 +SELECT hex(@a:=convert(_utf32 0x2C00 using utf8mb4) collate utf8mb4_test_ci), hex(lower(@a)); +hex(@a:=convert(_utf32 0x2C00 using utf8mb4) collate utf8mb4_test_ci) hex(lower(@a)) +E2B080 E2B0B0 +SELECT hex(@a:=convert(_utf32 0x2C30 using utf8mb4) collate utf8mb4_test_ci), hex(upper(@a)); +hex(@a:=convert(_utf32 0x2C30 using utf8mb4) collate utf8mb4_test_ci) hex(upper(@a)) +E2B0B0 E2B080 +SELECT hex(weight_string(convert(_utf32 0x61 using utf8mb4) collate utf8mb4_test_ci)); +hex(weight_string(convert(_utf32 0x61 using utf8mb4) collate utf8mb4_test_ci)) +120F +SELECT hex(weight_string(convert(_utf32 0x62 using utf8mb4) collate utf8mb4_test_ci)); +hex(weight_string(convert(_utf32 0x62 using utf8mb4) collate utf8mb4_test_ci)) +120F +SELECT hex(weight_string(convert(_utf32 0x10062 using utf8mb4) collate utf8mb4_test_ci)); +hex(weight_string(convert(_utf32 0x10062 using utf8mb4) collate utf8mb4_test_ci)) +120F +SELECT hex(weight_string(convert(_utf32 0x10400 using utf8mb4) collate utf8mb4_test_ci)); +hex(weight_string(convert(_utf32 0x10400 using utf8mb4) collate utf8mb4_test_ci)) +30D2 +SELECT hex(weight_string(convert(_utf32 0x100400 using utf8mb4) collate utf8mb4_test_ci)); +hex(weight_string(convert(_utf32 0x100400 using utf8mb4) collate utf8mb4_test_ci)) +30D2 +SELECT hex(weight_string(_utf8mb4 0x64 collate utf8mb4_test_ci)); +hex(weight_string(_utf8mb4 0x64 collate utf8mb4_test_ci)) +1250 +SELECT hex(weight_string(convert(_ucs2 0x0064017e using utf8mb4) collate utf8mb4_test_ci)); +hex(weight_string(convert(_ucs2 0x0064017e using utf8mb4) collate utf8mb4_test_ci)) +1251 +SELECT hex(weight_string(convert(_ucs2 0x0044017e using utf8mb4) collate utf8mb4_test_ci)); +hex(weight_string(convert(_ucs2 0x0044017e using utf8mb4) collate utf8mb4_test_ci)) +1251 +SELECT hex(weight_string(convert(_ucs2 0x0044017d using utf8mb4) collate utf8mb4_test_ci)); +hex(weight_string(convert(_ucs2 0x0044017d using utf8mb4) collate utf8mb4_test_ci)) +1251 CREATE TABLE t1 ( col1 varchar(100) character set utf8 collate utf8_test_ci ); @@ -407,22 +452,35 @@ select "foo" = "foo " collate latin1_test; "foo" = "foo " collate latin1_test 1 The following tests check that two-byte collation IDs work -select * from information_schema.collations where id>256 order by id; +select * from information_schema.collations where id>256 and is_compiled<>'Yes' order by id; COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN utf8mb4_test_ci utf8mb4 326 8 utf16_test_ci utf16 327 8 +utf8mb4_test_400_ci utf8mb4 328 8 +latin1_test2 latin1 332 1 +utf8_bengali_standard_ci utf8 336 8 +utf8_bengali_traditional_ci utf8 337 8 utf8_phone_ci utf8 352 8 utf8_test_ci utf8 353 8 +utf8_5624_1 utf8 354 8 +utf8_5624_2 utf8 355 8 +utf8_5624_3 utf8 356 8 +utf8_5624_4 utf8 357 8 ucs2_test_ci ucs2 358 8 ucs2_vn_ci ucs2 359 8 +ucs2_5624_1 ucs2 360 8 +utf8_5624_5 utf8 368 8 +utf8_5624_5_bad utf8 369 8 utf32_test_ci utf32 391 8 utf8_maxuserid_ci utf8 2047 8 show collation like '%test%'; Collation Charset Id Default Compiled Sortlen latin1_test latin1 99 Yes 1 +latin1_test2 latin1 332 1 utf8_test_ci utf8 353 8 ucs2_test_ci ucs2 358 8 utf8mb4_test_ci utf8mb4 326 8 +utf8mb4_test_400_ci utf8mb4 328 8 utf16_test_ci utf16 327 8 utf32_test_ci utf32 391 8 show collation like 'ucs2_vn_ci'; @@ -449,3 +507,652 @@ SHOW COLLATION LIKE 'utf8_phone_ci'; Collation Charset Id Default Compiled Sortlen utf8_phone_ci utf8 352 8 SET NAMES utf8; +SELECT hex(weight_string(_utf8mb4'a' collate utf8mb4_test_400_ci)); +hex(weight_string(_utf8mb4'a' collate utf8mb4_test_400_ci)) +0E33 +SELECT hex(weight_string(convert(_utf32 0x10002 using utf8mb4) collate utf8mb4_test_400_ci)); +hex(weight_string(convert(_utf32 0x10002 using utf8mb4) collate utf8mb4_test_400_ci)) +FFFD +SELECT hex(@a:=convert(_utf32 0x10400 using utf8mb4) collate utf8mb4_test_400_ci), hex(lower(@a)); +hex(@a:=convert(_utf32 0x10400 using utf8mb4) collate utf8mb4_test_400_ci) hex(lower(@a)) +F0909080 F0909080 +SELECT hex(@a:=convert(_utf32 0x10428 using utf8mb4) collate utf8mb4_test_400_ci), hex(upper(@a)); +hex(@a:=convert(_utf32 0x10428 using utf8mb4) collate utf8mb4_test_400_ci) hex(upper(@a)) +F09090A8 F09090A8 +SELECT hex(@a:=convert(_utf32 0x2C00 using utf8mb4) collate utf8mb4_test_400_ci), hex(lower(@a)); +hex(@a:=convert(_utf32 0x2C00 using utf8mb4) collate utf8mb4_test_400_ci) hex(lower(@a)) +E2B080 E2B080 +SELECT hex(@a:=convert(_utf32 0x2C30 using utf8mb4) collate utf8mb4_test_400_ci), hex(upper(@a)); +hex(@a:=convert(_utf32 0x2C30 using utf8mb4) collate utf8mb4_test_400_ci) hex(upper(@a)) +E2B0B0 E2B0B0 +# +# WL#5624 Collation customization improvements +# +SET NAMES utf8 COLLATE utf8_5624_1; +CREATE TABLE t1 AS SELECT REPEAT(' ', 16) AS a LIMIT 0; +INSERT INTO t1 VALUES ('012345'),('001234'),('000123'),('000012'),('000001'); +INSERT INTO t1 VALUES ('12345'),('01234'),('00123'),('00012'),('00001'); +INSERT INTO t1 VALUES ('1234'),('0123'),('0012'),('0001'); +INSERT INTO t1 VALUES ('123'),('012'),('001'); +INSERT INTO t1 VALUES ('12'),('01'); +INSERT INTO t1 VALUES ('1'),('9'); +INSERT INTO t1 VALUES ('ГÐИ'),('ГИБДД'); +INSERT INTO t1 VALUES ('a'),('b'),('c'),('d'),('e'); +INSERT INTO t1 VALUES ('cz'),('ÄŠ'),('Ä‹'); +INSERT INTO t1 VALUES ('f'),('fz'),('g'),('Ä '),('Ä¡'); +INSERT INTO t1 VALUES ('h'),('hz'),('GĦ'),('Għ'),('gĦ'),('għ'); +INSERT INTO t1 VALUES ('i'),('iz'),('Ħ'),('ħ'); +INSERT INTO t1 VALUES ('y'),('yz'),('z'),('Å»'),('ż'); +INSERT INTO t1 VALUES ('Ä'),('Ä€'),('á'),('Ã'),('à '),('À'); +INSERT INTO t1 VALUES ('Ä“'),('é'),('Ä›'),('ê'),('Ä’'),('É'),('Äš'),('Ê'); +INSERT INTO t1 VALUES ('a'),('~'),('!'),('@'),('#'),('$'),('%'),('^'); +INSERT INTO t1 VALUES ('('),(')'),('-'),('+'),('|'),('='),(':'),(';'); +INSERT INTO t1 VALUES ('"'),('\''),('?'); +INSERT INTO t1 VALUES ('ch'),('k'),('cs'),('ccs'),('cscs'); +INSERT INTO t1 VALUES ('aa-'),('ab-'),('ac-'),('ad-'),('ae-'),('af-'),('az-'); +INSERT INTO t1 VALUES ('lp-fni'),('lp-lni'); +INSERT INTO t1 VALUES ('lp-fpi'),('lp-lpi'); +INSERT INTO t1 VALUES ('lp-fsi'),('lp-lsi'); +INSERT INTO t1 VALUES ('lp-fti'),('lp-lti'); +INSERT INTO t1 VALUES ('lp-ft'),('lp-lt'); +INSERT INTO t1 VALUES ('lp-fv'),('lp-lv'); +INSERT INTO t1 VALUES ('lb-fni'),('lb-lni'); +INSERT INTO t1 VALUES ('lb-fv'),('lb-lv'); +INSERT INTO t1 VALUES (_ucs2 0x3106),(_ucs2 0x3110), (_ucs2 0x3111), (_ucs2 0x3112); +INSERT INTO t1 VALUES (_ucs2 0x32A3), (_ucs2 0x3231); +INSERT INTO t1 VALUES (_ucs2 0x84D9), (_ucs2 0x98F5), (_ucs2 0x7CF3), (_ucs2 0x5497); +SELECT a, HEX(WEIGHT_STRING(a)) FROM t1 ORDER BY a, LENGTH(a), BINARY a; +a HEX(WEIGHT_STRING(a)) +lp-ft 0001 +lp-lt 0001 +lp-fpi 0001 +lp-fsi 0001 +lp-fti 0001 +lp-lpi 0001 +lp-lsi 0001 +lp-lti 0001 +lb-fv 0200233E +lb-fni 0200233E +lp-fv 0202 +lp-fni 0202 +- 0221 += 042D +| 0430 +lb-lv 0DD9233E +lp-lv 0DDB +1 0E2A +01 0E2A +001 0E2A +0001 0E2A +00001 0E2A +000001 0E2A +12 0E2A0E2B +012 0E2A0E2B +0012 0E2A0E2B +00012 0E2A0E2B +000012 0E2A0E2B +123 0E2A0E2B0E2C +0123 0E2A0E2B0E2C +00123 0E2A0E2B0E2C +000123 0E2A0E2B0E2C +1234 0E2A0E2B0E2C0E2D +01234 0E2A0E2B0E2C0E2D +001234 0E2A0E2B0E2C0E2D +12345 0E2A0E2B0E2C0E2D0E2E +012345 0E2A0E2B0E2C0E2D0E2E +9 0E32 +~ 0E32233E +! 0E32233F +@ 0E322340 +# 0E322341 +$ 0E322342 +% 0E322343 +^ 0E322344 +( 0E322346 +) 0E322347 ++ 0E322348 +: 0E322349 +; 0E32234A +" 0E32234B +' 0E32234C +? 0E32234D +a 0E33 +a 0E33 +aa- 0E330E330221 +ab- 0E330E4A0E34 +ac- 0E330E600E60 +ad- 0E330E6D0E6D +ae- 0E330E8B0E8B +af- 0E330EB90EB9 +az- 0E33106A0221 +b 0E4A +À 0E4A +à 0E4A +à 0E4A +á 0E4A +Ä€ 0E4A +Ä 0E4A +c 0E60 +k 0E600EE1 +ch 0E600EE1 +cs 0E600FEA +ccs 0E600FEA0E600FEA +cscs 0E600FEA0E600FEA +cz 0E60106A +ÄŠ 0E6C233E +Ä‹ 0E6C233E +d 0E6D +É 0E6D +Ê 0E6D +é 0E6D +ê 0E6D +Ä’ 0E6D +Ä“ 0E6D +Äš 0E6D +Ä› 0E6D +e 0E8B +f 0EB9 +fz 0EB9106A +Ä 0EC0233E +Ä¡ 0EC0233E +g 0EC1 +GĦ 0EE0233E +Għ 0EE0233E +gĦ 0EE0233E +għ 0EE0233E +h 0EE1 +hz 0EE1106A +Ħ 0EFA233E +ħ 0EFA233E +i 0EFB +iz 0EFB106A +y 105E +yz 105E106A +Å» 1069233E +ż 1069233E +z 106A +ГÐИ 11341114117C +ГИБДД 11341114117C +lb-lni 233C233E +lp-lni 233E +ㄆ 233F +ã„ 2349 +ã„‘ 234A +ã„’ 234B +㊣ 7147 +㈱ 72D5 +è“™ 753C +飵 753D +ç³³ 753E +å’— 753F +# +# WL#5624, the same test with UCS2 +# +ALTER TABLE t1 CONVERT TO CHARACTER SET ucs2 COLLATE ucs2_5624_1; +SELECT a, HEX(WEIGHT_STRING(a)) FROM t1 ORDER BY a, LENGTH(a), BINARY(a); +a HEX(WEIGHT_STRING(a)) +lp-ft 0001 +lp-lt 0001 +lp-fpi 0001 +lp-fsi 0001 +lp-fti 0001 +lp-lpi 0001 +lp-lsi 0001 +lp-lti 0001 +lb-fv 0200233E +lb-fni 0200233E +lp-fv 0202 +lp-fni 0202 +- 0221 += 042D +| 0430 +lb-lv 0DD9233E +lp-lv 0DDB +1 0E2A +01 0E2A +001 0E2A +0001 0E2A +00001 0E2A +000001 0E2A +12 0E2A0E2B +012 0E2A0E2B +0012 0E2A0E2B +00012 0E2A0E2B +000012 0E2A0E2B +123 0E2A0E2B0E2C +0123 0E2A0E2B0E2C +00123 0E2A0E2B0E2C +000123 0E2A0E2B0E2C +1234 0E2A0E2B0E2C0E2D +01234 0E2A0E2B0E2C0E2D +001234 0E2A0E2B0E2C0E2D +12345 0E2A0E2B0E2C0E2D0E2E +012345 0E2A0E2B0E2C0E2D0E2E +9 0E32 +~ 0E32233E +! 0E32233F +@ 0E322340 +# 0E322341 +$ 0E322342 +% 0E322343 +^ 0E322344 +( 0E322346 +) 0E322347 ++ 0E322348 +: 0E322349 +; 0E32234A +" 0E32234B +' 0E32234C +? 0E32234D +a 0E33 +a 0E33 +aa- 0E330E330221 +ab- 0E330E4A0E34 +ac- 0E330E600E60 +ad- 0E330E6D0E6D +ae- 0E330E8B0E8B +af- 0E330EB90EB9 +az- 0E33106A0221 +b 0E4A +À 0E4A +à 0E4A +à 0E4A +á 0E4A +Ä€ 0E4A +Ä 0E4A +c 0E60 +k 0E600EE1 +ch 0E600EE1 +cs 0E600FEA +ccs 0E600FEA0E600FEA +cscs 0E600FEA0E600FEA +cz 0E60106A +ÄŠ 0E6C233E +Ä‹ 0E6C233E +d 0E6D +É 0E6D +Ê 0E6D +é 0E6D +ê 0E6D +Ä’ 0E6D +Ä“ 0E6D +Äš 0E6D +Ä› 0E6D +e 0E8B +f 0EB9 +fz 0EB9106A +Ä 0EC0233E +Ä¡ 0EC0233E +g 0EC1 +GĦ 0EE0233E +Għ 0EE0233E +gĦ 0EE0233E +għ 0EE0233E +h 0EE1 +hz 0EE1106A +Ħ 0EFA233E +ħ 0EFA233E +i 0EFB +iz 0EFB106A +y 105E +yz 105E106A +Å» 1069233E +ż 1069233E +z 106A +ГÐИ 11341114117C +ГИБДД 11341114117C +lb-lni 233C233E +lp-lni 233E +ㄆ 233F +ã„ 2349 +ã„‘ 234A +ã„’ 234B +㊣ 7147 +㈱ 72D5 +è“™ 753C +飵 753D +ç³³ 753E +å’— 753F +DROP TABLE t1; +# +# WL#5624, unsupported features +# +SET NAMES utf8 COLLATE utf8_5624_2; +ERROR HY000: Unknown collation: 'utf8_5624_2' +SHOW WARNINGS; +Level Code Message +Error 1273 Unknown collation: 'utf8_5624_2' +Warning 1273 Syntax error at '[strength tertiary]' +SELECT _utf8'test' COLLATE utf8_5624_2; +ERROR HY000: Unknown collation: 'utf8_5624_2' +SHOW WARNINGS; +Level Code Message +Error 1273 Unknown collation: 'utf8_5624_2' +Warning 1273 Syntax error at '[strength tertiary]' +# +# WL#5624, reset before primary ignorable +# +SET NAMES utf8 COLLATE utf8_5624_3; +ERROR HY000: Unknown collation: 'utf8_5624_3' +SHOW WARNINGS; +Level Code Message +Error 1273 Unknown collation: 'utf8_5624_3' +Warning 1273 Can't reset before a primary ignorable character U+A48C +# +# WL#5624, \u without hex digits is equal to {'\', 'u'} +# +SET NAMES utf8 COLLATE utf8_5624_4; +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +INSERT INTO t1 VALUES ('\\'),('u'),('x'),('X'); +SELECT a, HEX(WEIGHT_STRING(a)) FROM t1 ORDER BY a, LENGTH(a), BINARY(a); +a HEX(WEIGHT_STRING(a)) +\ 02CE +x 02CE101F +u 101F +X 105A +DROP TABLE t1; +# +# WL#5624, testing Bengali collations +# +SET NAMES utf8, collation_connection=utf8_bengali_standard_ci; +CREATE TABLE t1 AS SELECT REPEAT (' ', 10) AS a LIMIT 0; +INSERT INTO t1 VALUES (_ucs2 0x09FA), (_ucs2 0x09F8), (_ucs2 0x09F9), (_ucs2 0x09F2); +INSERT INTO t1 VALUES (_ucs2 0x09DC), (_ucs2 0x09A109BC); +INSERT INTO t1 VALUES (_ucs2 0x09A2), (_ucs2 0x09DD), (_ucs2 0x09A209BC); +INSERT INTO t1 VALUES (_ucs2 0x09A3); +SELECT HEX(WEIGHT_STRING(a)), HEX(CONVERT(a USING ucs2)), HEX(a) +FROM t1 ORDER BY a, BINARY a; +HEX(WEIGHT_STRING(a)) HEX(CONVERT(a USING ucs2)) HEX(a) +0350 09FA E0A7BA +0351 09F8 E0A7B8 +0352 09F9 E0A7B9 +0353 09F2 E0A7B2 +0374 09A109BC E0A6A1E0A6BC +0374 09DC E0A79C +0375 09A2 E0A6A2 +0376 09A209BC E0A6A2E0A6BC +0376 09DD E0A79D +0377 09A3 E0A6A3 +DROP TABLE t1; +SET NAMES utf8, collation_connection=utf8_bengali_traditional_ci; +CREATE TABLE t1 AS SELECT REPEAT (' ', 10) AS a LIMIT 0; +INSERT INTO t1 VALUES +(_ucs2 0x0985),(_ucs2 0x0986),(_ucs2 0x0987),(_ucs2 0x0988), +(_ucs2 0x0989),(_ucs2 0x098A),(_ucs2 0x098B),(_ucs2 0x09E0), +(_ucs2 0x098C),(_ucs2 0x09E1),(_ucs2 0x098F),(_ucs2 0x0990), +(_ucs2 0x0993); +INSERT INTO t1 VALUES +(_ucs2 0x0994),(_ucs2 0x0982),(_ucs2 0x0983),(_ucs2 0x0981), +(_ucs2 0x099509CD), (_ucs2 0x099609CD), (_ucs2 0x099709CD), (_ucs2 0x099809CD), +(_ucs2 0x099909CD), (_ucs2 0x099A09CD), (_ucs2 0x099B09CD), (_ucs2 0x099C09CD), +(_ucs2 0x099D09CD), (_ucs2 0x099E09CD), (_ucs2 0x099F09CD), (_ucs2 0x09A009CD), +(_ucs2 0x09A109CD), (_ucs2 0x09A209CD), (_ucs2 0x09A309CD), +(_ucs2 0x09CE), (_ucs2 0x09A409CD200D), (_ucs2 0x09A409CD), +(_ucs2 0x09A509CD),(_ucs2 0x09A609CD), +(_ucs2 0x09A709CD), (_ucs2 0x09A809CD), (_ucs2 0x09AA09CD), (_ucs2 0x09AB09CD), +(_ucs2 0x09AC09CD), (_ucs2 0x09AD09CD), (_ucs2 0x09AE09CD), (_ucs2 0x09AF09CD), +(_ucs2 0x09B009CD), (_ucs2 0x09F009CD), (_ucs2 0x09B209CD), (_ucs2 0x09F109CD), +(_ucs2 0x09B609CD), (_ucs2 0x09B709CD), (_ucs2 0x09B809CD), (_ucs2 0x09B909CD); +INSERT INTO t1 VALUES +(_ucs2 0x099509CD0985),(_ucs2 0x0995), +(_ucs2 0x099509CD0986),(_ucs2 0x099509BE), +(_ucs2 0x099509CD0987),(_ucs2 0x099509BF), +(_ucs2 0x099509CD0988),(_ucs2 0x099509C0), +(_ucs2 0x099509CD0989),(_ucs2 0x099509C1), +(_ucs2 0x099509CD098A),(_ucs2 0x099509C2), +(_ucs2 0x099509CD098B),(_ucs2 0x099509C3), +(_ucs2 0x099509CD09E0),(_ucs2 0x099509C4), +(_ucs2 0x099509CD098C),(_ucs2 0x099509E2), +(_ucs2 0x099509CD09E1),(_ucs2 0x099509E3), +(_ucs2 0x099509CD098F),(_ucs2 0x099509C7), +(_ucs2 0x099509CD0990),(_ucs2 0x099509C8), +(_ucs2 0x099509CD0993),(_ucs2 0x099509CB), +(_ucs2 0x099509CD0994),(_ucs2 0x099509CC); +SELECT HEX(WEIGHT_STRING(a)), HEX(CONVERT(a USING ucs2)), HEX(a) +FROM t1 ORDER BY a, BINARY(a); +HEX(WEIGHT_STRING(a)) HEX(CONVERT(a USING ucs2)) HEX(a) +15A2 0985 E0A685 +15A3 0986 E0A686 +15A4 0987 E0A687 +15A5 0988 E0A688 +15A6 0989 E0A689 +15A7 098A E0A68A +15A8 098B E0A68B +15A9 09E0 E0A7A0 +15AA 098C E0A68C +15AB 09E1 E0A7A1 +15AC 098F E0A68F +15AD 0990 E0A690 +15AE 0993 E0A693 +15AF 0994 E0A694 +15B0 0982 E0A682 +15B1 0983 E0A683 +15B2 0981 E0A681 +15B3 099509CD E0A695E0A78D +15B315A2 0995 E0A695 +15B315A2 099509CD0985 E0A695E0A78DE0A685 +15B315A3 099509BE E0A695E0A6BE +15B315A3 099509CD0986 E0A695E0A78DE0A686 +15B315A4 099509BF E0A695E0A6BF +15B315A4 099509CD0987 E0A695E0A78DE0A687 +15B315A5 099509C0 E0A695E0A780 +15B315A5 099509CD0988 E0A695E0A78DE0A688 +15B315A6 099509C1 E0A695E0A781 +15B315A6 099509CD0989 E0A695E0A78DE0A689 +15B315A7 099509C2 E0A695E0A782 +15B315A7 099509CD098A E0A695E0A78DE0A68A +15B315A8 099509C3 E0A695E0A783 +15B315A8 099509CD098B E0A695E0A78DE0A68B +15B315A9 099509C4 E0A695E0A784 +15B315A9 099509CD09E0 E0A695E0A78DE0A7A0 +15B315AA 099509CD098C E0A695E0A78DE0A68C +15B315AA 099509E2 E0A695E0A7A2 +15B315AB 099509CD09E1 E0A695E0A78DE0A7A1 +15B315AB 099509E3 E0A695E0A7A3 +15B315AC 099509C7 E0A695E0A787 +15B315AC 099509CD098F E0A695E0A78DE0A68F +15B315AD 099509C8 E0A695E0A788 +15B315AD 099509CD0990 E0A695E0A78DE0A690 +15B315AE 099509CB E0A695E0A78B +15B315AE 099509CD0993 E0A695E0A78DE0A693 +15B315AF 099509CC E0A695E0A78C +15B315AF 099509CD0994 E0A695E0A78DE0A694 +15B4 099609CD E0A696E0A78D +15B5 099709CD E0A697E0A78D +15B6 099809CD E0A698E0A78D +15B7 099909CD E0A699E0A78D +15B8 099A09CD E0A69AE0A78D +15B9 099B09CD E0A69BE0A78D +15BA 099C09CD E0A69CE0A78D +15BB 099D09CD E0A69DE0A78D +15BC 099E09CD E0A69EE0A78D +15BD 099F09CD E0A69FE0A78D +15BE 09A009CD E0A6A0E0A78D +15BF 09A109CD E0A6A1E0A78D +15C0 09A209CD E0A6A2E0A78D +15C1 09A309CD E0A6A3E0A78D +15C2 09A409CD E0A6A4E0A78D +15C2 09A409CD200D E0A6A4E0A78DE2808D +15C2 09CE E0A78E +15C3 09A509CD E0A6A5E0A78D +15C4 09A609CD E0A6A6E0A78D +15C5 09A709CD E0A6A7E0A78D +15C6 09A809CD E0A6A8E0A78D +15C7 09AA09CD E0A6AAE0A78D +15C8 09AB09CD E0A6ABE0A78D +15C9 09AC09CD E0A6ACE0A78D +15CA 09AD09CD E0A6ADE0A78D +15CB 09AE09CD E0A6AEE0A78D +15CC 09AF09CD E0A6AFE0A78D +15CD 09B009CD E0A6B0E0A78D +15CE 09F009CD E0A7B0E0A78D +15CF 09B209CD E0A6B2E0A78D +15D0 09F109CD E0A7B1E0A78D +15D1 09B609CD E0A6B6E0A78D +15D2 09B709CD E0A6B7E0A78D +15D3 09B809CD E0A6B8E0A78D +15D4 09B909CD E0A6B9E0A78D +SELECT HEX(WEIGHT_STRING(a)) as wa, +GROUP_CONCAT(HEX(CONVERT(a USING ucs2)) ORDER BY LENGTH(a), BINARY a) +FROM t1 GROUP BY a ORDER BY a; +wa GROUP_CONCAT(HEX(CONVERT(a USING ucs2)) ORDER BY LENGTH(a), BINARY a) +15A2 0985 +15A3 0986 +15A4 0987 +15A5 0988 +15A6 0989 +15A7 098A +15A8 098B +15A9 09E0 +15AA 098C +15AB 09E1 +15AC 098F +15AD 0990 +15AE 0993 +15AF 0994 +15B0 0982 +15B1 0983 +15B2 0981 +15B3 099509CD +15B315A2 0995,099509CD0985 +15B315A3 099509BE,099509CD0986 +15B315A4 099509BF,099509CD0987 +15B315A5 099509C0,099509CD0988 +15B315A6 099509C1,099509CD0989 +15B315A7 099509C2,099509CD098A +15B315A8 099509C3,099509CD098B +15B315A9 099509C4,099509CD09E0 +15B315AA 099509E2,099509CD098C +15B315AB 099509E3,099509CD09E1 +15B315AC 099509C7,099509CD098F +15B315AD 099509C8,099509CD0990 +15B315AE 099509CB,099509CD0993 +15B315AF 099509CC,099509CD0994 +15B4 099609CD +15B5 099709CD +15B6 099809CD +15B7 099909CD +15B8 099A09CD +15B9 099B09CD +15BA 099C09CD +15BB 099D09CD +15BC 099E09CD +15BD 099F09CD +15BE 09A009CD +15BF 09A109CD +15C0 09A209CD +15C1 09A309CD +15C2 09CE,09A409CD,09A409CD200D +15C3 09A509CD +15C4 09A609CD +15C5 09A709CD +15C6 09A809CD +15C7 09AA09CD +15C8 09AB09CD +15C9 09AC09CD +15CA 09AD09CD +15CB 09AE09CD +15CC 09AF09CD +15CD 09B009CD +15CE 09F009CD +15CF 09B209CD +15D0 09F109CD +15D1 09B609CD +15D2 09B709CD +15D3 09B809CD +15D4 09B909CD +DROP TABLE t1; +# +# WL#5624, shift after, using expansion +# +SET NAMES utf8 COLLATE utf8_5624_5; +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +INSERT INTO t1 VALUES ('0'),('1'),('0z'),(_ucs2 0x0030FF9D); +INSERT INTO t1 VALUES ('a'),('b'),('c'),('d'),('e'),('f'),('g'),('h'),('i'); +INSERT INTO t1 VALUES ('j'),('k'),('l'),('m'),('n'),('o'),('p'),('q'),('r'); +INSERT INTO t1 VALUES ('s'),('t'),('u'),('v'),('w'),('x'),('y'),('z'); +INSERT INTO t1 VALUES ('aa'),('aaa'); +INSERT INTO t1 VALUES ('A'),('B'),('C'),('D'),('E'),('F'),('G'),('H'),('I'); +INSERT INTO t1 VALUES ('J'),('K'),('L'),('M'),('N'),('O'),('P'),('Q'),('R'); +INSERT INTO t1 VALUES ('S'),('T'),('U'),('V'),('W'),('X'),('Y'),('Z'); +INSERT INTO t1 VALUES ('AA'),('AAA'); +INSERT INTO t1 VALUES ('001'),('002'); +SELECT a, HEX(WEIGHT_STRING(a)) FROM t1 ORDER BY a, LENGTH(a), BINARY(a); +a HEX(WEIGHT_STRING(a)) +0 0E29 +001 0E29 +002 0E29 +0z 0E290E292357 +0ï¾ 0E291E81 +a 0E29233E +b 0E29233F +c 0E292340 +d 0E292341 +e 0E292342 +f 0E292343 +g 0E292344 +h 0E292345 +i 0E292346 +j 0E292347 +k 0E292348 +l 0E292349 +m 0E29234A +n 0E29234B +o 0E29234C +p 0E29234D +q 0E29234E +r 0E29234F +s 0E292350 +t 0E292351 +u 0E292352 +v 0E292353 +w 0E292354 +x 0E292355 +y 0E292356 +z 0E292357 +aa 0E292358 +aaa 0E292359 +A 0E29333E +B 0E29333F +C 0E293340 +D 0E293341 +E 0E293342 +F 0E293343 +G 0E293344 +H 0E293345 +I 0E293346 +J 0E293347 +K 0E293348 +L 0E293349 +M 0E29334A +N 0E29334B +O 0E29334C +P 0E29334D +Q 0E29334E +R 0E29334F +S 0E293350 +T 0E293351 +U 0E293352 +V 0E293353 +W 0E293354 +X 0E293355 +Y 0E293356 +Z 0E293357 +AA 0E293358 +AAA 0E293359 +1 0E2A +DROP TABLE t1; +SET NAMES utf8 COLLATE utf8_5624_5_bad; +ERROR HY000: Unknown collation: 'utf8_5624_5_bad' +SHOW WARNINGS; +Level Code Message +Error 1273 Unknown collation: 'utf8_5624_5_bad' +Warning 1273 Expansion too long: 'a\u002Daaaaaa10' +# +# End of WL#5624 +# +# +# Bug#14197426 PARSE ERRORS IN LOADABLE UCA / LDML COLLATIONS ARE SILENTLY IGNORED +# +# Search for occurrences of [ERROR] Syntax error at '[strength tertiary]' +Occurances : 2 diff --git a/mysql-test/r/ctype_like_range.result b/mysql-test/r/ctype_like_range.result index a06c6ad9ed8..41080147908 100644 --- a/mysql-test/r/ctype_like_range.result +++ b/mysql-test/r/ctype_like_range.result @@ -12,6 +12,7 @@ INSERT INTO t1 (a) VALUES ('aaa'),('ccc'),('cch'); INSERT INTO t1 (a) VALUES ('aaa_'),('ccc_'),('cch_'); INSERT INTO t1 (a) VALUES ('aaa%'),('ccc%'),('cch%'); INSERT INTO t1 (a) VALUES ('aaaaaaaaaaaaaaaaaaaa'); +INSERT INTO t1 (a) VALUES ('caaaaaaaaaaaaaaaaaaa'); CREATE VIEW v1 AS SELECT id, 'a' AS name, a AS val FROM t1 UNION @@ -147,6 +148,10 @@ id name val 31 mn 61616161616161616161616161616161 31 mx 61616161616161616161616161616161 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 63616161616161616161616161616161 +32 mx 63616161616161616161616161616161 +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET latin1; SELECT * FROM v1; id name val @@ -274,6 +279,10 @@ id name val 31 mn 61616161616161616161616161616161 31 mx 61616161616161616161616161616161 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 63616161616161616161616161616161 +32 mx 63616161616161616161616161616161 +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8; SELECT * FROM v1; id name val @@ -401,6 +410,10 @@ id name val 31 mn 6161616161 31 mx 6161616161 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 6361616161 +32 mx 6361616161 +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci; SELECT * FROM v1; id name val @@ -528,6 +541,10 @@ id name val 31 mn 6161616161 31 mx 6161616161 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 6361616161 +32 mx 6361616161 +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_czech_ci; SELECT * FROM v1; id name val @@ -655,6 +672,10 @@ id name val 31 mn 6161616161 31 mx 6161616161 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 6361616161 +32 mx 6361616161 +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_danish_ci; SELECT * FROM v1; id name val @@ -782,6 +803,665 @@ id name val 31 mn 61616161090909090909090909090909 31 mx 61616161EFBFBFEFBFBFEFBFBFEFBFBF 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 6361616161 +32 mx 6361616161 +32 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 00000000000000000000000000000000 +2 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +2 sp -------------------------------- +3 a % +3 mn 00000000000000000000000000000000 +3 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +3 sp -------------------------------- +4 a \_ +4 mn 5F +4 mx 5F +4 sp -------------------------------- +5 a \% +5 mn 25 +5 mx 25 +5 sp -------------------------------- +6 a \ +6 mn 5C +6 mx 5C +6 sp -------------------------------- +7 a a +7 mn 61 +7 mx 61 +7 sp -------------------------------- +8 a c +8 mn 63 +8 mx 63 +8 sp -------------------------------- +9 a a_ +9 mn 61000000000000000000000000000000 +9 mx 61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +9 sp -------------------------------- +10 a c_ +10 mn 63000000000000000000000000000000 +10 mx 63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +10 sp -------------------------------- +11 a a% +11 mn 61000000000000000000000000000000 +11 mx 61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +11 sp -------------------------------- +12 a c% +12 mn 63000000000000000000000000000000 +12 mx 63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +12 sp -------------------------------- +13 a aa +13 mn 6161 +13 mx 6161 +13 sp -------------------------------- +14 a cc +14 mn 6363 +14 mx 6363 +14 sp -------------------------------- +15 a ch +15 mn 6368 +15 mx 6368 +15 sp -------------------------------- +16 a aa_ +16 mn 61610000000000000000000000000000 +16 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +16 sp -------------------------------- +17 a cc_ +17 mn 63630000000000000000000000000000 +17 mx 6363EFBFBFEFBFBFEFBFBFEFBFBF2020 +17 sp -------------------------------- +18 a ch_ +18 mn 63680000000000000000000000000000 +18 mx 6368EFBFBFEFBFBFEFBFBFEFBFBF2020 +18 sp -------------------------------- +19 a aa% +19 mn 61610000000000000000000000000000 +19 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +19 sp -------------------------------- +20 a cc% +20 mn 63630000000000000000000000000000 +20 mx 6363EFBFBFEFBFBFEFBFBFEFBFBF2020 +20 sp -------------------------------- +21 a ch% +21 mn 63680000000000000000000000000000 +21 mx 6368EFBFBFEFBFBFEFBFBFEFBFBF2020 +21 sp -------------------------------- +22 a aaa +22 mn 616161 +22 mx 616161 +22 sp -------------------------------- +23 a ccc +23 mn 636363 +23 mx 636363 +23 sp -------------------------------- +24 a cch +24 mn 636368 +24 mx 636368 +24 sp -------------------------------- +25 a aaa_ +25 mn 61616100000000000000000000000000 +25 mx 616161EFBFBFEFBFBFEFBFBFEFBFBF20 +25 sp -------------------------------- +26 a ccc_ +26 mn 63636300000000000000000000000000 +26 mx 636363EFBFBFEFBFBFEFBFBFEFBFBF20 +26 sp -------------------------------- +27 a cch_ +27 mn 63636800000000000000000000000000 +27 mx 636368EFBFBFEFBFBFEFBFBFEFBFBF20 +27 sp -------------------------------- +28 a aaa% +28 mn 61616100000000000000000000000000 +28 mx 616161EFBFBFEFBFBFEFBFBFEFBFBF20 +28 sp -------------------------------- +29 a ccc% +29 mn 63636300000000000000000000000000 +29 mx 636363EFBFBFEFBFBFEFBFBFEFBFBF20 +29 sp -------------------------------- +30 a cch% +30 mn 63636800000000000000000000000000 +30 mx 636368EFBFBFEFBFBFEFBFBFEFBFBF20 +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 61616161 +31 mx 61616161 +31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 63616161 +32 mx 63616161 +32 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 09090909090909090909090909090909 +2 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +2 sp -------------------------------- +3 a % +3 mn 09090909090909090909090909090909 +3 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +3 sp -------------------------------- +4 a \_ +4 mn 5F +4 mx 5F +4 sp -------------------------------- +5 a \% +5 mn 25 +5 mx 25 +5 sp -------------------------------- +6 a \ +6 mn 5C +6 mx 5C +6 sp -------------------------------- +7 a a +7 mn 61 +7 mx 61 +7 sp -------------------------------- +8 a c +8 mn 63 +8 mx 63 +8 sp -------------------------------- +9 a a_ +9 mn 61090909090909090909090909090909 +9 mx 61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +9 sp -------------------------------- +10 a c_ +10 mn 63090909090909090909090909090909 +10 mx 63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +10 sp -------------------------------- +11 a a% +11 mn 61090909090909090909090909090909 +11 mx 61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +11 sp -------------------------------- +12 a c% +12 mn 63090909090909090909090909090909 +12 mx 63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +12 sp -------------------------------- +13 a aa +13 mn 6161 +13 mx 6161 +13 sp -------------------------------- +14 a cc +14 mn 6363 +14 mx 6363 +14 sp -------------------------------- +15 a ch +15 mn 6368 +15 mx 6368 +15 sp -------------------------------- +16 a aa_ +16 mn 61610909090909090909090909090909 +16 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +16 sp -------------------------------- +17 a cc_ +17 mn 63630909090909090909090909090909 +17 mx 6363EFBFBFEFBFBFEFBFBFEFBFBF2020 +17 sp -------------------------------- +18 a ch_ +18 mn 63680909090909090909090909090909 +18 mx 6368EFBFBFEFBFBFEFBFBFEFBFBF2020 +18 sp -------------------------------- +19 a aa% +19 mn 61610909090909090909090909090909 +19 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +19 sp -------------------------------- +20 a cc% +20 mn 63630909090909090909090909090909 +20 mx 6363EFBFBFEFBFBFEFBFBFEFBFBF2020 +20 sp -------------------------------- +21 a ch% +21 mn 63680909090909090909090909090909 +21 mx 6368EFBFBFEFBFBFEFBFBFEFBFBF2020 +21 sp -------------------------------- +22 a aaa +22 mn 616161 +22 mx 616161 +22 sp -------------------------------- +23 a ccc +23 mn 636363 +23 mx 636363 +23 sp -------------------------------- +24 a cch +24 mn 636368 +24 mx 636368 +24 sp -------------------------------- +25 a aaa_ +25 mn 61616109090909090909090909090909 +25 mx 616161EFBFBFEFBFBFEFBFBFEFBFBF20 +25 sp -------------------------------- +26 a ccc_ +26 mn 63636309090909090909090909090909 +26 mx 636363EFBFBFEFBFBFEFBFBFEFBFBF20 +26 sp -------------------------------- +27 a cch_ +27 mn 63636809090909090909090909090909 +27 mx 636368EFBFBFEFBFBFEFBFBFEFBFBF20 +27 sp -------------------------------- +28 a aaa% +28 mn 61616109090909090909090909090909 +28 mx 616161EFBFBFEFBFBFEFBFBFEFBFBF20 +28 sp -------------------------------- +29 a ccc% +29 mn 63636309090909090909090909090909 +29 mx 636363EFBFBFEFBFBFEFBFBFEFBFBF20 +29 sp -------------------------------- +30 a cch% +30 mn 63636809090909090909090909090909 +30 mx 636368EFBFBFEFBFBFEFBFBFEFBFBF20 +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 61616161 +31 mx 61616161 +31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 63616161 +32 mx 63616161 +32 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_czech_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 09090909090909090909090909090909 +2 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +2 sp -------------------------------- +3 a % +3 mn 09090909090909090909090909090909 +3 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +3 sp -------------------------------- +4 a \_ +4 mn 5F +4 mx 5F +4 sp -------------------------------- +5 a \% +5 mn 25 +5 mx 25 +5 sp -------------------------------- +6 a \ +6 mn 5C +6 mx 5C +6 sp -------------------------------- +7 a a +7 mn 61 +7 mx 61 +7 sp -------------------------------- +8 a c +8 mn 63 +8 mx 63 +8 sp -------------------------------- +9 a a_ +9 mn 61090909090909090909090909090909 +9 mx 61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +9 sp -------------------------------- +10 a c_ +10 mn 09090909090909090909090909090909 +10 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +10 sp -------------------------------- +11 a a% +11 mn 61090909090909090909090909090909 +11 mx 61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +11 sp -------------------------------- +12 a c% +12 mn 09090909090909090909090909090909 +12 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +12 sp -------------------------------- +13 a aa +13 mn 6161 +13 mx 6161 +13 sp -------------------------------- +14 a cc +14 mn 6363 +14 mx 6363 +14 sp -------------------------------- +15 a ch +15 mn 6368 +15 mx 6368 +15 sp -------------------------------- +16 a aa_ +16 mn 61610909090909090909090909090909 +16 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +16 sp -------------------------------- +17 a cc_ +17 mn 63090909090909090909090909090909 +17 mx 63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +17 sp -------------------------------- +18 a ch_ +18 mn 63680909090909090909090909090909 +18 mx 6368EFBFBFEFBFBFEFBFBFEFBFBF2020 +18 sp -------------------------------- +19 a aa% +19 mn 61610909090909090909090909090909 +19 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +19 sp -------------------------------- +20 a cc% +20 mn 63090909090909090909090909090909 +20 mx 63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +20 sp -------------------------------- +21 a ch% +21 mn 63680909090909090909090909090909 +21 mx 6368EFBFBFEFBFBFEFBFBFEFBFBF2020 +21 sp -------------------------------- +22 a aaa +22 mn 616161 +22 mx 616161 +22 sp -------------------------------- +23 a ccc +23 mn 636363 +23 mx 636363 +23 sp -------------------------------- +24 a cch +24 mn 636368 +24 mx 636368 +24 sp -------------------------------- +25 a aaa_ +25 mn 61616109090909090909090909090909 +25 mx 616161EFBFBFEFBFBFEFBFBFEFBFBF20 +25 sp -------------------------------- +26 a ccc_ +26 mn 63630909090909090909090909090909 +26 mx 6363EFBFBFEFBFBFEFBFBFEFBFBF2020 +26 sp -------------------------------- +27 a cch_ +27 mn 63636809090909090909090909090909 +27 mx 636368EFBFBFEFBFBFEFBFBFEFBFBF20 +27 sp -------------------------------- +28 a aaa% +28 mn 61616109090909090909090909090909 +28 mx 616161EFBFBFEFBFBFEFBFBFEFBFBF20 +28 sp -------------------------------- +29 a ccc% +29 mn 63630909090909090909090909090909 +29 mx 6363EFBFBFEFBFBFEFBFBFEFBFBF2020 +29 sp -------------------------------- +30 a cch% +30 mn 63636809090909090909090909090909 +30 mx 636368EFBFBFEFBFBFEFBFBFEFBFBF20 +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 61616161 +31 mx 61616161 +31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 63616161 +32 mx 63616161 +32 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 09090909090909090909090909090909 +2 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +2 sp -------------------------------- +3 a % +3 mn 09090909090909090909090909090909 +3 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +3 sp -------------------------------- +4 a \_ +4 mn 5F +4 mx 5F +4 sp -------------------------------- +5 a \% +5 mn 25 +5 mx 25 +5 sp -------------------------------- +6 a \ +6 mn 5C +6 mx 5C +6 sp -------------------------------- +7 a a +7 mn 61 +7 mx 61 +7 sp -------------------------------- +8 a c +8 mn 63 +8 mx 63 +8 sp -------------------------------- +9 a a_ +9 mn 09090909090909090909090909090909 +9 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +9 sp -------------------------------- +10 a c_ +10 mn 63090909090909090909090909090909 +10 mx 63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +10 sp -------------------------------- +11 a a% +11 mn 09090909090909090909090909090909 +11 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +11 sp -------------------------------- +12 a c% +12 mn 63090909090909090909090909090909 +12 mx 63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +12 sp -------------------------------- +13 a aa +13 mn 6161 +13 mx 6161 +13 sp -------------------------------- +14 a cc +14 mn 6363 +14 mx 6363 +14 sp -------------------------------- +15 a ch +15 mn 6368 +15 mx 6368 +15 sp -------------------------------- +16 a aa_ +16 mn 61610909090909090909090909090909 +16 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +16 sp -------------------------------- +17 a cc_ +17 mn 63630909090909090909090909090909 +17 mx 6363EFBFBFEFBFBFEFBFBFEFBFBF2020 +17 sp -------------------------------- +18 a ch_ +18 mn 63680909090909090909090909090909 +18 mx 6368EFBFBFEFBFBFEFBFBFEFBFBF2020 +18 sp -------------------------------- +19 a aa% +19 mn 61610909090909090909090909090909 +19 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +19 sp -------------------------------- +20 a cc% +20 mn 63630909090909090909090909090909 +20 mx 6363EFBFBFEFBFBFEFBFBFEFBFBF2020 +20 sp -------------------------------- +21 a ch% +21 mn 63680909090909090909090909090909 +21 mx 6368EFBFBFEFBFBFEFBFBFEFBFBF2020 +21 sp -------------------------------- +22 a aaa +22 mn 616161 +22 mx 616161 +22 sp -------------------------------- +23 a ccc +23 mn 636363 +23 mx 636363 +23 sp -------------------------------- +24 a cch +24 mn 636368 +24 mx 636368 +24 sp -------------------------------- +25 a aaa_ +25 mn 61610909090909090909090909090909 +25 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +25 sp -------------------------------- +26 a ccc_ +26 mn 63636309090909090909090909090909 +26 mx 636363EFBFBFEFBFBFEFBFBFEFBFBF20 +26 sp -------------------------------- +27 a cch_ +27 mn 63636809090909090909090909090909 +27 mx 636368EFBFBFEFBFBFEFBFBFEFBFBF20 +27 sp -------------------------------- +28 a aaa% +28 mn 61610909090909090909090909090909 +28 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +28 sp -------------------------------- +29 a ccc% +29 mn 63636309090909090909090909090909 +29 mx 636363EFBFBFEFBFBFEFBFBFEFBFBF20 +29 sp -------------------------------- +30 a cch% +30 mn 63636809090909090909090909090909 +30 mx 636368EFBFBFEFBFBFEFBFBFEFBFBF20 +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 61616161 +31 mx 61616161 +31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 63616109090909090909090909090909 +32 mx 636161EFBFBFEFBFBFEFBFBFEFBFBF20 +32 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 09090909090909090909090909090909 +2 mx F48FBFBFF48FBFBFF48FBFBFF48FBFBF +2 sp -------------------------------- +3 a % +3 mn 09090909090909090909090909090909 +3 mx F48FBFBFF48FBFBFF48FBFBFF48FBFBF +3 sp -------------------------------- +4 a \_ +4 mn 5F +4 mx 5F +4 sp -------------------------------- +5 a \% +5 mn 25 +5 mx 25 +5 sp -------------------------------- +6 a \ +6 mn 5C +6 mx 5C +6 sp -------------------------------- +7 a a +7 mn 61 +7 mx 61 +7 sp -------------------------------- +8 a c +8 mn 63 +8 mx 63 +8 sp -------------------------------- +9 a a_ +9 mn 61090909090909090909090909090909 +9 mx 61F48FBFBFF48FBFBFF48FBFBF202020 +9 sp -------------------------------- +10 a c_ +10 mn 63090909090909090909090909090909 +10 mx 63F48FBFBFF48FBFBFF48FBFBF202020 +10 sp -------------------------------- +11 a a% +11 mn 61090909090909090909090909090909 +11 mx 61F48FBFBFF48FBFBFF48FBFBF202020 +11 sp -------------------------------- +12 a c% +12 mn 63090909090909090909090909090909 +12 mx 63F48FBFBFF48FBFBFF48FBFBF202020 +12 sp -------------------------------- +13 a aa +13 mn 6161 +13 mx 6161 +13 sp -------------------------------- +14 a cc +14 mn 6363 +14 mx 6363 +14 sp -------------------------------- +15 a ch +15 mn 6368 +15 mx 6368 +15 sp -------------------------------- +16 a aa_ +16 mn 61610909090909090909090909090909 +16 mx 6161F48FBFBFF48FBFBFF48FBFBF2020 +16 sp -------------------------------- +17 a cc_ +17 mn 63630909090909090909090909090909 +17 mx 6363F48FBFBFF48FBFBFF48FBFBF2020 +17 sp -------------------------------- +18 a ch_ +18 mn 63680909090909090909090909090909 +18 mx 6368F48FBFBFF48FBFBFF48FBFBF2020 +18 sp -------------------------------- +19 a aa% +19 mn 61610909090909090909090909090909 +19 mx 6161F48FBFBFF48FBFBFF48FBFBF2020 +19 sp -------------------------------- +20 a cc% +20 mn 63630909090909090909090909090909 +20 mx 6363F48FBFBFF48FBFBFF48FBFBF2020 +20 sp -------------------------------- +21 a ch% +21 mn 63680909090909090909090909090909 +21 mx 6368F48FBFBFF48FBFBFF48FBFBF2020 +21 sp -------------------------------- +22 a aaa +22 mn 616161 +22 mx 616161 +22 sp -------------------------------- +23 a ccc +23 mn 636363 +23 mx 636363 +23 sp -------------------------------- +24 a cch +24 mn 636368 +24 mx 636368 +24 sp -------------------------------- +25 a aaa_ +25 mn 61616109090909090909090909090909 +25 mx 616161F48FBFBFF48FBFBFF48FBFBF20 +25 sp -------------------------------- +26 a ccc_ +26 mn 63636309090909090909090909090909 +26 mx 636363F48FBFBFF48FBFBFF48FBFBF20 +26 sp -------------------------------- +27 a cch_ +27 mn 63636809090909090909090909090909 +27 mx 636368F48FBFBFF48FBFBFF48FBFBF20 +27 sp -------------------------------- +28 a aaa% +28 mn 61616109090909090909090909090909 +28 mx 616161F48FBFBFF48FBFBFF48FBFBF20 +28 sp -------------------------------- +29 a ccc% +29 mn 63636309090909090909090909090909 +29 mx 636363F48FBFBFF48FBFBFF48FBFBF20 +29 sp -------------------------------- +30 a cch% +30 mn 63636809090909090909090909090909 +30 mx 636368F48FBFBFF48FBFBFF48FBFBF20 +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 61616161 +31 mx 61616161 +31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 63616161 +32 mx 63616161 +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2; SELECT * FROM v1; id name val @@ -909,6 +1589,10 @@ id name val 31 mn 00610061006100610061006100610061 31 mx 00610061006100610061006100610061 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 00630061006100610061006100610061 +32 mx 00630061006100610061006100610061 +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci; SELECT * FROM v1; id name val @@ -1036,6 +1720,10 @@ id name val 31 mn 00610061006100610061006100610061 31 mx 00610061006100610061006100610061 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 00630061006100610061006100610061 +32 mx 00630061006100610061006100610061 +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_czech_ci; SELECT * FROM v1; id name val @@ -1163,6 +1851,10 @@ id name val 31 mn 00610061006100610061006100610061 31 mx 00610061006100610061006100610061 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 00630061006100610061006100610061 +32 mx 00630061006100610061006100610061 +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_danish_ci; SELECT * FROM v1; id name val @@ -1290,6 +1982,10 @@ id name val 31 mn 00610061006100610061006100610061 31 mx 00610061006100610061006100610061 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 00630061006100610061006100610009 +32 mx 0063006100610061006100610061FFFF +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16; SELECT * FROM v1; id name val @@ -1417,6 +2113,10 @@ id name val 31 mn 0061006100610061 31 mx 0061006100610061 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 0063006100610061 +32 mx 0063006100610061 +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_unicode_ci; SELECT * FROM v1; id name val @@ -1544,6 +2244,10 @@ id name val 31 mn 0061006100610061 31 mx 0061006100610061 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 0063006100610061 +32 mx 0063006100610061 +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_czech_ci; SELECT * FROM v1; id name val @@ -1671,6 +2375,10 @@ id name val 31 mn 0061006100610061 31 mx 0061006100610061 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 0063006100610061 +32 mx 0063006100610061 +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_danish_ci; SELECT * FROM v1; id name val @@ -1798,6 +2506,141 @@ id name val 31 mn 0061006100610061 31 mx 0061006100610061 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 00630061006100090009000900090009 +32 mx 006300610061FFFFFFFFFFFFFFFFFFFF +32 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_unicode_520_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 0009 +2 mx DBFFDFFF +2 sp -------------------------------- +3 a % +3 mn 00090009000900090009000900090009 +3 mx DBFFDFFFDBFFDFFFDBFFDFFFDBFFDFFF +3 sp -------------------------------- +4 a \_ +4 mn 005F +4 mx 005F +4 sp -------------------------------- +5 a \% +5 mn 0025 +5 mx 0025 +5 sp -------------------------------- +6 a \ +6 mn 005C +6 mx 005C +6 sp -------------------------------- +7 a a +7 mn 0061 +7 mx 0061 +7 sp -------------------------------- +8 a c +8 mn 0063 +8 mx 0063 +8 sp -------------------------------- +9 a a_ +9 mn 00610009 +9 mx 0061DBFFDFFF +9 sp -------------------------------- +10 a c_ +10 mn 00630009 +10 mx 0063DBFFDFFF +10 sp -------------------------------- +11 a a% +11 mn 00610009000900090009000900090009 +11 mx 0061DBFFDFFFDBFFDFFFDBFFDFFF0000 +11 sp -------------------------------- +12 a c% +12 mn 00630009000900090009000900090009 +12 mx 0063DBFFDFFFDBFFDFFFDBFFDFFF0000 +12 sp -------------------------------- +13 a aa +13 mn 00610061 +13 mx 00610061 +13 sp -------------------------------- +14 a cc +14 mn 00630063 +14 mx 00630063 +14 sp -------------------------------- +15 a ch +15 mn 00630068 +15 mx 00630068 +15 sp -------------------------------- +16 a aa_ +16 mn 006100610009 +16 mx 00610061DBFFDFFF +16 sp -------------------------------- +17 a cc_ +17 mn 006300630009 +17 mx 00630063DBFFDFFF +17 sp -------------------------------- +18 a ch_ +18 mn 006300680009 +18 mx 00630068DBFFDFFF +18 sp -------------------------------- +19 a aa% +19 mn 00610061000900090009000900090009 +19 mx 00610061DBFFDFFFDBFFDFFFDBFFDFFF +19 sp -------------------------------- +20 a cc% +20 mn 00630063000900090009000900090009 +20 mx 00630063DBFFDFFFDBFFDFFFDBFFDFFF +20 sp -------------------------------- +21 a ch% +21 mn 00630068000900090009000900090009 +21 mx 00630068DBFFDFFFDBFFDFFFDBFFDFFF +21 sp -------------------------------- +22 a aaa +22 mn 006100610061 +22 mx 006100610061 +22 sp -------------------------------- +23 a ccc +23 mn 006300630063 +23 mx 006300630063 +23 sp -------------------------------- +24 a cch +24 mn 006300630068 +24 mx 006300630068 +24 sp -------------------------------- +25 a aaa_ +25 mn 0061006100610009 +25 mx 006100610061DBFFDFFF +25 sp -------------------------------- +26 a ccc_ +26 mn 0063006300630009 +26 mx 006300630063DBFFDFFF +26 sp -------------------------------- +27 a cch_ +27 mn 0063006300680009 +27 mx 006300630068DBFFDFFF +27 sp -------------------------------- +28 a aaa% +28 mn 00610061006100090009000900090009 +28 mx 006100610061DBFFDFFFDBFFDFFF0000 +28 sp -------------------------------- +29 a ccc% +29 mn 00630063006300090009000900090009 +29 mx 006300630063DBFFDFFFDBFFDFFF0000 +29 sp -------------------------------- +30 a cch% +30 mn 00630063006800090009000900090009 +30 mx 006300630068DBFFDFFFDBFFDFFF0000 +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 0061006100610061 +31 mx 0061006100610061 +31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 0063006100610061 +32 mx 0063006100610061 +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32; SELECT * FROM v1; id name val @@ -1925,6 +2768,10 @@ id name val 31 mn 00000061000000610000006100000061 31 mx 00000061000000610000006100000061 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 00000063000000610000006100000061 +32 mx 00000063000000610000006100000061 +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_unicode_ci; SELECT * FROM v1; id name val @@ -2052,6 +2899,10 @@ id name val 31 mn 00000061000000610000006100000061 31 mx 00000061000000610000006100000061 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 00000063000000610000006100000061 +32 mx 00000063000000610000006100000061 +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_czech_ci; SELECT * FROM v1; id name val @@ -2179,6 +3030,10 @@ id name val 31 mn 00000061000000610000006100000061 31 mx 00000061000000610000006100000061 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 00000063000000610000006100000061 +32 mx 00000063000000610000006100000061 +32 sp -------------------------------- ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_danish_ci; SELECT * FROM v1; id name val @@ -2306,5 +3161,140 @@ id name val 31 mn 00000061000000610000006100000061 31 mx 00000061000000610000006100000061 31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 00000063000000610000006100000009 +32 mx 0000006300000061000000610000FFFF +32 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_unicode_520_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 00000009 +2 mx 0010FFFF +2 sp -------------------------------- +3 a % +3 mn 00000009000000090000000900000009 +3 mx 0010FFFF0010FFFF0010FFFF0010FFFF +3 sp -------------------------------- +4 a \_ +4 mn 0000005F +4 mx 0000005F +4 sp -------------------------------- +5 a \% +5 mn 00000025 +5 mx 00000025 +5 sp -------------------------------- +6 a \ +6 mn 0000005C +6 mx 0000005C +6 sp -------------------------------- +7 a a +7 mn 00000061 +7 mx 00000061 +7 sp -------------------------------- +8 a c +8 mn 00000063 +8 mx 00000063 +8 sp -------------------------------- +9 a a_ +9 mn 0000006100000009 +9 mx 000000610010FFFF +9 sp -------------------------------- +10 a c_ +10 mn 0000006300000009 +10 mx 000000630010FFFF +10 sp -------------------------------- +11 a a% +11 mn 00000061000000090000000900000009 +11 mx 000000610010FFFF0010FFFF0010FFFF +11 sp -------------------------------- +12 a c% +12 mn 00000063000000090000000900000009 +12 mx 000000630010FFFF0010FFFF0010FFFF +12 sp -------------------------------- +13 a aa +13 mn 0000006100000061 +13 mx 0000006100000061 +13 sp -------------------------------- +14 a cc +14 mn 0000006300000063 +14 mx 0000006300000063 +14 sp -------------------------------- +15 a ch +15 mn 0000006300000068 +15 mx 0000006300000068 +15 sp -------------------------------- +16 a aa_ +16 mn 000000610000006100000009 +16 mx 00000061000000610010FFFF +16 sp -------------------------------- +17 a cc_ +17 mn 000000630000006300000009 +17 mx 00000063000000630010FFFF +17 sp -------------------------------- +18 a ch_ +18 mn 000000630000006800000009 +18 mx 00000063000000680010FFFF +18 sp -------------------------------- +19 a aa% +19 mn 00000061000000610000000900000009 +19 mx 00000061000000610010FFFF0010FFFF +19 sp -------------------------------- +20 a cc% +20 mn 00000063000000630000000900000009 +20 mx 00000063000000630010FFFF0010FFFF +20 sp -------------------------------- +21 a ch% +21 mn 00000063000000680000000900000009 +21 mx 00000063000000680010FFFF0010FFFF +21 sp -------------------------------- +22 a aaa +22 mn 000000610000006100000061 +22 mx 000000610000006100000061 +22 sp -------------------------------- +23 a ccc +23 mn 000000630000006300000063 +23 mx 000000630000006300000063 +23 sp -------------------------------- +24 a cch +24 mn 000000630000006300000068 +24 mx 000000630000006300000068 +24 sp -------------------------------- +25 a aaa_ +25 mn 00000061000000610000006100000009 +25 mx 0000006100000061000000610010FFFF +25 sp -------------------------------- +26 a ccc_ +26 mn 00000063000000630000006300000009 +26 mx 0000006300000063000000630010FFFF +26 sp -------------------------------- +27 a cch_ +27 mn 00000063000000630000006800000009 +27 mx 0000006300000063000000680010FFFF +27 sp -------------------------------- +28 a aaa% +28 mn 00000061000000610000006100000009 +28 mx 0000006100000061000000610010FFFF +28 sp -------------------------------- +29 a ccc% +29 mn 00000063000000630000006300000009 +29 mx 0000006300000063000000630010FFFF +29 sp -------------------------------- +30 a cch% +30 mn 00000063000000630000006800000009 +30 mx 0000006300000063000000680010FFFF +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 00000061000000610000006100000061 +31 mx 00000061000000610000006100000061 +31 sp -------------------------------- +32 a caaaaaaaaaaaaaaaaaaa +32 mn 00000063000000610000006100000061 +32 mx 00000063000000610000006100000061 +32 sp -------------------------------- DROP VIEW v1; DROP TABLE t1; diff --git a/mysql-test/r/ctype_many.result b/mysql-test/r/ctype_many.result index 4ea5efab159..3c1c96fc47c 100644 --- a/mysql-test/r/ctype_many.result +++ b/mysql-test/r/ctype_many.result @@ -1776,3 +1776,14 @@ DROP TABLE t2; # # End of 5.5 tests # +# +# Bug#11766143 59185: ASSERTION FAILED: (FIXED == 1), FILE +# ITEM_STRFUNC.CC, LINE 2760 +# +CREATE TABLE t1 (a CHAR(1) CHARSET UTF8); +INSERT INTO t1 VALUES ('a'), ('b'); +CREATE TABLE t2 (a BINARY(1)); +SELECT * FROM t2 WHERE a=(SELECT a FROM t1) AND a=_LATIN1'x'; +ERROR 21000: Subquery returns more than 1 row +DROP TABLE t2; +DROP TABLE t1; diff --git a/mysql-test/r/ctype_partitions.result b/mysql-test/r/ctype_partitions.result new file mode 100644 index 00000000000..a39ecc11529 --- /dev/null +++ b/mysql-test/r/ctype_partitions.result @@ -0,0 +1,51 @@ +# +# MDEV-6255 DUPLICATE KEY Errors on SELECT .. GROUP BY that uses temporary and filesort +# +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET cp1251 COLLATE cp1251_ukrainian_ci); +INSERT INTO t1 VALUES (0x20),(0x60),(0x6060),(0x606060); +SELECT HEX(a) FROM t1 WHERE a=0x60; +HEX(a) +20 +60 +6060 +606060 +ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 3; +SELECT HEX(a) FROM t1 WHERE a=0x60; +HEX(a) +20 +60 +6060 +606060 +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET koi8u COLLATE koi8u_general_ci); +INSERT INTO t1 VALUES (0x20),(0x60),(0x6060),(0x606060); +SELECT HEX(a) FROM t1 WHERE a=0x60; +HEX(a) +20 +60 +6060 +606060 +ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 3; +SELECT HEX(a) FROM t1 WHERE a=0x60; +HEX(a) +20 +60 +6060 +606060 +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET cp1250 COLLATE cp1250_general_ci); +INSERT INTO t1 VALUES (0x20),(0xA0),(0xA0A0),(0xA0A0A0); +SELECT HEX(a) FROM t1 WHERE a=0xA0; +HEX(a) +20 +A0 +A0A0 +A0A0A0 +ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 3; +SELECT HEX(a) FROM t1 WHERE a=0xA0; +HEX(a) +20 +A0 +A0A0 +A0A0A0 +DROP TABLE t1; diff --git a/mysql-test/r/ctype_sjis.result b/mysql-test/r/ctype_sjis.result index de402697e63..48456c16705 100644 --- a/mysql-test/r/ctype_sjis.result +++ b/mysql-test/r/ctype_sjis.result @@ -98,6 +98,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +sjis_japanese_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; create table t1 engine=innodb select repeat('a',50) as c1; alter table t1 add index(c1(5)); insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111'); @@ -172,7 +223,7 @@ pattern varchar(64) NO INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d'); SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1; HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern) -323030318180303181803031 25598180256D81802564 2001-01-01 00:00:00 +323030318180303181803031 25598180256D81802564 2001-01-01 00:00:00.000000 DROP TABLE t1; SET collation_connection='sjis_bin'; create table t1 select repeat('a',4000) a; @@ -201,6 +252,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +sjis_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; create table t1 engine=innodb select repeat('a',50) as c1; alter table t1 add index(c1(5)); insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111'); @@ -14615,3 +14717,3795 @@ DROP TABLE t1; # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set names sjis; +select @@collation_connection; +@@collation_connection +sjis_japanese_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET sjis NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +41 +SELECT HEX(ws) FROM t2; +HEX(ws) +41 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET sjis NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +4141414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +4141414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +41414141412020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +41414141412020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +41 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +414243 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +4142 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +414243 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +4142432020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +41 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +4142 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +414220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +41422020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +4142202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +41422020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +41 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +4142 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +414243 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +41424320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +41 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +4142 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +414243 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +41424320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +sjis_japanese_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +41 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +414243 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +4142 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +414243 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +4142432020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020434241 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +BEBDBCDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDFBCBDBE +select collation(cast(0x8140 as char)); +collation(cast(0x8140 as char)) +sjis_japanese_ci +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +4141 +select hex(weight_string(cast(0x8140 as char))); +hex(weight_string(cast(0x8140 as char))) +8140 +select hex(weight_string(cast(0x8140 as char) as char(1))); +hex(weight_string(cast(0x8140 as char) as char(1))) +8140 +select hex(weight_string(cast(0x81408140 as char) as char(1))); +hex(weight_string(cast(0x81408140 as char) as char(1))) +8140 +select hex(weight_string(cast(0x8140 as char) as char(3))); +hex(weight_string(cast(0x8140 as char) as char(3))) +81402020 +select hex(weight_string(cast(0x81408140 as char) as char(3))); +hex(weight_string(cast(0x81408140 as char) as char(3))) +8140814020 +select hex(weight_string(cast(0x408140 as char) as char(3))); +hex(weight_string(cast(0x408140 as char) as char(3))) +40814020 +select hex(weight_string(cast(0x4081408140 as char) as char(3))); +hex(weight_string(cast(0x4081408140 as char) as char(3))) +4081408140 +select hex(weight_string(cast(0x40814081408140 as char) as char(3))); +hex(weight_string(cast(0x40814081408140 as char) as char(3))) +4081408140 +select hex(weight_string(cast(0x4040814081408140 as char) as char(3))); +hex(weight_string(cast(0x4040814081408140 as char) as char(3))) +40408140 +select hex(weight_string(cast(0x814081408140 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 2, 0xC0)) +81 +select hex(weight_string(cast(0x814081408140 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 2, 0xC0)) +8140 +select hex(weight_string(cast(0x814081408140 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 2, 0xC0)) +814081 +select hex(weight_string(cast(0x814081408140 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 2, 0xC0)) +81408140 +select hex(weight_string(cast(0x814081408140 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 2, 0xC0)) +8140814020 +select hex(weight_string(cast(0x814081408140 as char),25, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 2, 0xC0)) +81408140202020202020202020202020202020202020202020 +select hex(weight_string(cast(0x814081408140 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 3, 0xC0)) +81 +select hex(weight_string(cast(0x814081408140 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 3, 0xC0)) +8140 +select hex(weight_string(cast(0x814081408140 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 3, 0xC0)) +814081 +select hex(weight_string(cast(0x814081408140 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 3, 0xC0)) +81408140 +select hex(weight_string(cast(0x814081408140 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 3, 0xC0)) +8140814081 +select hex(weight_string(cast(0x814081408140 as char),25, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 3, 0xC0)) +81408140814020202020202020202020202020202020202020 +select hex(weight_string(cast(0x814081408140 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 4, 0xC0)) +81 +select hex(weight_string(cast(0x814081408140 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 4, 0xC0)) +8140 +select hex(weight_string(cast(0x814081408140 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 4, 0xC0)) +814081 +select hex(weight_string(cast(0x814081408140 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 4, 0xC0)) +81408140 +select hex(weight_string(cast(0x814081408140 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 4, 0xC0)) +8140814081 +select hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0)) +81408140814020202020202020202020202020202020202020 +set collation_connection=sjis_bin; +select @@collation_connection; +@@collation_connection +sjis_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET sjis COLLATE sjis_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +61 +SELECT HEX(ws) FROM t2; +HEX(ws) +61 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET sjis COLLATE sjis_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +6161616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +6161616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +61616161612020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +61616161612020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +61 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +616263 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +6162 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +616263 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +6162632020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +61 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +6162 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +616220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +61622020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +6162202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +61622020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +61 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +6162 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +616263 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +61626320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +61 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +6162 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +616263 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +61626320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +sjis_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +61 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +616263 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +6162 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +616263 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +6162632020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020636261 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +9E9D9CDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDF9C9D9E +select collation(cast(0x8140 as char)); +collation(cast(0x8140 as char)) +sjis_bin +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +6141 +select hex(weight_string(cast(0x8140 as char))); +hex(weight_string(cast(0x8140 as char))) +8140 +select hex(weight_string(cast(0x8140 as char) as char(1))); +hex(weight_string(cast(0x8140 as char) as char(1))) +8140 +select hex(weight_string(cast(0x81408140 as char) as char(1))); +hex(weight_string(cast(0x81408140 as char) as char(1))) +8140 +select hex(weight_string(cast(0x8140 as char) as char(3))); +hex(weight_string(cast(0x8140 as char) as char(3))) +81402020 +select hex(weight_string(cast(0x81408140 as char) as char(3))); +hex(weight_string(cast(0x81408140 as char) as char(3))) +8140814020 +select hex(weight_string(cast(0x408140 as char) as char(3))); +hex(weight_string(cast(0x408140 as char) as char(3))) +40814020 +select hex(weight_string(cast(0x4081408140 as char) as char(3))); +hex(weight_string(cast(0x4081408140 as char) as char(3))) +4081408140 +select hex(weight_string(cast(0x40814081408140 as char) as char(3))); +hex(weight_string(cast(0x40814081408140 as char) as char(3))) +4081408140 +select hex(weight_string(cast(0x4040814081408140 as char) as char(3))); +hex(weight_string(cast(0x4040814081408140 as char) as char(3))) +40408140 +select hex(weight_string(cast(0x814081408140 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 2, 0xC0)) +81 +select hex(weight_string(cast(0x814081408140 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 2, 0xC0)) +8140 +select hex(weight_string(cast(0x814081408140 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 2, 0xC0)) +814081 +select hex(weight_string(cast(0x814081408140 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 2, 0xC0)) +81408140 +select hex(weight_string(cast(0x814081408140 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 2, 0xC0)) +8140814020 +select hex(weight_string(cast(0x814081408140 as char),25, 2, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 2, 0xC0)) +81408140202020202020202020202020202020202020202020 +select hex(weight_string(cast(0x814081408140 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 3, 0xC0)) +81 +select hex(weight_string(cast(0x814081408140 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 3, 0xC0)) +8140 +select hex(weight_string(cast(0x814081408140 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 3, 0xC0)) +814081 +select hex(weight_string(cast(0x814081408140 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 3, 0xC0)) +81408140 +select hex(weight_string(cast(0x814081408140 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 3, 0xC0)) +8140814081 +select hex(weight_string(cast(0x814081408140 as char),25, 3, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 3, 0xC0)) +81408140814020202020202020202020202020202020202020 +select hex(weight_string(cast(0x814081408140 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 1, 4, 0xC0)) +81 +select hex(weight_string(cast(0x814081408140 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 2, 4, 0xC0)) +8140 +select hex(weight_string(cast(0x814081408140 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 3, 4, 0xC0)) +814081 +select hex(weight_string(cast(0x814081408140 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 4, 4, 0xC0)) +81408140 +select hex(weight_string(cast(0x814081408140 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char), 5, 4, 0xC0)) +8140814081 +select hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0)); +hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0)) +81408140814020202020202020202020202020202020202020 +# +# End of 5.6 tests +# +# +# Start of 10.0 tests +# +# Start of ctype_unescape.inc +SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection'; +PREPARE stmt FROM @query; +EXECUTE stmt; +CHARSET('test') @@character_set_client @@character_set_connection +sjis sjis sjis +DEALLOCATE PREPARE stmt; +CREATE TABLE allbytes (a VARBINARY(10)); +# Using selected bytes combinations +CREATE TABLE halfs (a INT); +INSERT INTO halfs VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07); +INSERT INTO halfs VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +CREATE TEMPORARY TABLE bytes (a BINARY(1), KEY(a)) ENGINE=MyISAM; +INSERT INTO bytes SELECT CHAR((t1.a << 4) | t2.a USING BINARY) FROM halfs t1, halfs t2; +DROP TABLE halfs; +CREATE TABLE selected_bytes (a VARBINARY(10)); +INSERT INTO selected_bytes (a) VALUES ('\0'),('\b'),('\t'),('\r'),('\n'),('\Z'); +INSERT INTO selected_bytes (a) VALUES ('0'),('b'),('t'),('r'),('n'),('Z'); +INSERT INTO selected_bytes (a) VALUES ('\\'),('_'),('%'),(0x22),(0x27); +INSERT INTO selected_bytes (a) VALUES ('a'); +INSERT INTO selected_bytes (a) VALUES +(0x3F), # 7bit +(0x40), # 7bit mbtail +(0x7E), # 7bit mbtail nonascii-8bit +(0x7F), # 7bit nonascii-8bit +(0x80), # mbtail bad-mb +(0x81), # mbhead mbtail +(0x9F), # mbhead mbtail bad-mb +(0xA0), # mbhead mbtail bad-mb +(0xA1), # mbhead mbtail nonascii-8bit +(0xE0), # mbhead mbtai +(0xEF), # mbhead mbtail +(0xF9), # mbhead mbtail +(0xFA), # mbhead mbtail bad-mb +(0xFC), # mbhead mbtail bad-mb +(0xFD), # mbhead mbtail bad-mb +(0xFE), # mbhead mbtial bad-mb +(0xFF); +INSERT INTO allbytes (a) SELECT a FROM bytes; +INSERT INTO allbytes (a) SELECT CONCAT(t1.a,t2.a) FROM selected_bytes t1,selected_bytes t2; +INSERT INTO allbytes (a) SELECT CONCAT(0x5C,t1.a,t2.a) FROM selected_bytes t1,selected_bytes t2; +INSERT INTO allbytes (a) SELECT CONCAT(0x5C,t1.a,0x5C,t2.a) FROM selected_bytes t1,selected_bytes t2; +DROP TABLE selected_bytes; +DELETE FROM allbytes WHERE +OCTET_LENGTH(a)>1 AND +LOCATE(0x5C,a)=0 AND +a NOT LIKE '%\'%' AND + a NOT LIKE '%"%'; +CREATE PROCEDURE p1(val VARBINARY(10)) +BEGIN +DECLARE EXIT HANDLER FOR SQLSTATE '42000' INSERT INTO t1 (a,b) VALUES(val,NULL); +SET @query=CONCAT(_binary"INSERT INTO t1 (a,b) VALUES (0x",HEX(val),",'",val,"')"); +PREPARE stmt FROM @query; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; +END// +CREATE PROCEDURE p2() +BEGIN +DECLARE val VARBINARY(10); +DECLARE done INT DEFAULT FALSE; +DECLARE stmt CURSOR FOR SELECT a FROM allbytes; +DECLARE CONTINUE HANDLER FOR NOT FOUND SET done=TRUE; +OPEN stmt; +read_loop1: LOOP +FETCH stmt INTO val; +IF done THEN +LEAVE read_loop1; +END IF; +CALL p1(val); +END LOOP; +CLOSE stmt; +END// +CREATE FUNCTION iswellformed(a VARBINARY(256)) RETURNS INT RETURN a=BINARY CONVERT(a USING sjis);// +CREATE FUNCTION unescape(a VARBINARY(256)) RETURNS VARBINARY(256) +BEGIN +# We need to do it in a way to avoid producing new escape sequences +# First, enclose all known escsape sequences to '{{xx}}' + # - Backslash not followed by a LIKE pattern characters _ and % +# - Double escapes +# This uses PCRE Branch Reset Groups: (?|(alt1)|(alt2)|(alt3)). +# So '\\1' in the last argument always means the match, no matter +# which alternative it came from. +SET a=REGEXP_REPLACE(a,'(?|(\\\\[^_%])|(\\x{27}\\x{27}))','{{\\1}}'); +# Now unescape all enclosed standard escape sequences +SET a=REPLACE(a,'{{\\0}}', '\0'); +SET a=REPLACE(a,'{{\\b}}', '\b'); +SET a=REPLACE(a,'{{\\t}}', '\t'); +SET a=REPLACE(a,'{{\\r}}', '\r'); +SET a=REPLACE(a,'{{\\n}}', '\n'); +SET a=REPLACE(a,'{{\\Z}}', '\Z'); +SET a=REPLACE(a,'{{\\\'}}', '\''); +# Unescape double quotes +SET a=REPLACE(a,'{{\'\'}}', '\''); + # Unescape the rest: all other \x sequences mean just 'x' + SET a=REGEXP_REPLACE(a, '{{\\\\(.|\\R)}}', '\\1'); + RETURN a; +END// +CREATE FUNCTION unescape_type(a VARBINARY(256),b VARBINARY(256)) RETURNS VARBINARY(256) +BEGIN +RETURN CASE +WHEN b IS NULL THEN '[SyntErr]' + WHEN a=b THEN CASE +WHEN OCTET_LENGTH(a)=1 THEN '[Preserve]' + WHEN a RLIKE '\\\\[_%]' THEN '[Preserve][LIKE]' + WHEN a RLIKE '^[[:ascii:]]+$' THEN '[Preserve][ASCII]' + ELSE '[Preserv][MB]' END +WHEN REPLACE(a,0x5C,'')=b THEN '[Trivial]' + WHEN UNESCAPE(a)=b THEN '[Regular]' + ELSE '[Special]' END; +END// +CREATE FUNCTION wellformedness(a VARBINARY(256), b VARBINARY(256)) +RETURNS VARBINARY(256) +BEGIN +RETURN CASE +WHEN b IS NULL THEN '' + WHEN NOT iswellformed(a) AND iswellformed(b) THEN '[FIXED]' + WHEN iswellformed(a) AND NOT iswellformed(b) THEN '[BROKE]' + WHEN NOT iswellformed(a) AND NOT iswellformed(b) THEN '[ILSEQ]' + ELSE '' + END; +END// +CREATE FUNCTION mysql_real_escape_string_generated(a VARBINARY(256)) +RETURNS VARBINARY(256) +BEGIN +DECLARE a1 BINARY(1) DEFAULT SUBSTR(a,1,1); +DECLARE a2 BINARY(1) DEFAULT SUBSTR(a,2,1); +DECLARE a3 BINARY(1) DEFAULT SUBSTR(a,3,1); +DECLARE a4 BINARY(1) DEFAULT SUBSTR(a,4,1); +DECLARE a2a4 BINARY(2) DEFAULT CONCAT(a2,a4); +RETURN CASE +WHEN (a1=0x5C) AND +(a3=0x5C) AND +(a2>0x7F) AND +(a4 NOT IN ('_','%','0','t','r','n','Z')) AND +iswellformed(a2a4) THEN '[USER]' + ELSE '' + END; +END// +CREATE TABLE t1 (a VARBINARY(10),b VARBINARY(10)); +CALL p2(); +SELECT HEX(a),HEX(b), +CONCAT(unescape_type(a,b), +wellformedness(a,b), +mysql_real_escape_string_generated(a), +IF(UNESCAPE(a)<>b,CONCAT('[BAD',HEX(UNESCAPE(a)),']'),'')) AS comment +FROM t1 ORDER BY LENGTH(a),a; +HEX(a) HEX(b) comment +00 00 [Preserve] +01 01 [Preserve] +02 02 [Preserve] +03 03 [Preserve] +04 04 [Preserve] +05 05 [Preserve] +06 06 [Preserve] +07 07 [Preserve] +08 08 [Preserve] +09 09 [Preserve] +0A 0A [Preserve] +0B 0B [Preserve] +0C 0C [Preserve] +0D 0D [Preserve] +0E 0E [Preserve] +0F 0F [Preserve] +10 10 [Preserve] +11 11 [Preserve] +12 12 [Preserve] +13 13 [Preserve] +14 14 [Preserve] +15 15 [Preserve] +16 16 [Preserve] +17 17 [Preserve] +18 18 [Preserve] +19 19 [Preserve] +1A 1A [Preserve] +1B 1B [Preserve] +1C 1C [Preserve] +1D 1D [Preserve] +1E 1E [Preserve] +1F 1F [Preserve] +20 20 [Preserve] +21 21 [Preserve] +22 22 [Preserve] +23 23 [Preserve] +24 24 [Preserve] +25 25 [Preserve] +26 26 [Preserve] +27 NULL [SyntErr] +28 28 [Preserve] +29 29 [Preserve] +2A 2A [Preserve] +2B 2B [Preserve] +2C 2C [Preserve] +2D 2D [Preserve] +2E 2E [Preserve] +2F 2F [Preserve] +30 30 [Preserve] +31 31 [Preserve] +32 32 [Preserve] +33 33 [Preserve] +34 34 [Preserve] +35 35 [Preserve] +36 36 [Preserve] +37 37 [Preserve] +38 38 [Preserve] +39 39 [Preserve] +3A 3A [Preserve] +3B 3B [Preserve] +3C 3C [Preserve] +3D 3D [Preserve] +3E 3E [Preserve] +3F 3F [Preserve] +40 40 [Preserve] +41 41 [Preserve] +42 42 [Preserve] +43 43 [Preserve] +44 44 [Preserve] +45 45 [Preserve] +46 46 [Preserve] +47 47 [Preserve] +48 48 [Preserve] +49 49 [Preserve] +4A 4A [Preserve] +4B 4B [Preserve] +4C 4C [Preserve] +4D 4D [Preserve] +4E 4E [Preserve] +4F 4F [Preserve] +50 50 [Preserve] +51 51 [Preserve] +52 52 [Preserve] +53 53 [Preserve] +54 54 [Preserve] +55 55 [Preserve] +56 56 [Preserve] +57 57 [Preserve] +58 58 [Preserve] +59 59 [Preserve] +5A 5A [Preserve] +5B 5B [Preserve] +5C NULL [SyntErr] +5D 5D [Preserve] +5E 5E [Preserve] +5F 5F [Preserve] +60 60 [Preserve] +61 61 [Preserve] +62 62 [Preserve] +63 63 [Preserve] +64 64 [Preserve] +65 65 [Preserve] +66 66 [Preserve] +67 67 [Preserve] +68 68 [Preserve] +69 69 [Preserve] +6A 6A [Preserve] +6B 6B [Preserve] +6C 6C [Preserve] +6D 6D [Preserve] +6E 6E [Preserve] +6F 6F [Preserve] +70 70 [Preserve] +71 71 [Preserve] +72 72 [Preserve] +73 73 [Preserve] +74 74 [Preserve] +75 75 [Preserve] +76 76 [Preserve] +77 77 [Preserve] +78 78 [Preserve] +79 79 [Preserve] +7A 7A [Preserve] +7B 7B [Preserve] +7C 7C [Preserve] +7D 7D [Preserve] +7E 7E [Preserve] +7F 7F [Preserve] +80 80 [Preserve][ILSEQ] +81 81 [Preserve][ILSEQ] +82 82 [Preserve][ILSEQ] +83 83 [Preserve][ILSEQ] +84 84 [Preserve][ILSEQ] +85 85 [Preserve][ILSEQ] +86 86 [Preserve][ILSEQ] +87 87 [Preserve][ILSEQ] +88 88 [Preserve][ILSEQ] +89 89 [Preserve][ILSEQ] +8A 8A [Preserve][ILSEQ] +8B 8B [Preserve][ILSEQ] +8C 8C [Preserve][ILSEQ] +8D 8D [Preserve][ILSEQ] +8E 8E [Preserve][ILSEQ] +8F 8F [Preserve][ILSEQ] +90 90 [Preserve][ILSEQ] +91 91 [Preserve][ILSEQ] +92 92 [Preserve][ILSEQ] +93 93 [Preserve][ILSEQ] +94 94 [Preserve][ILSEQ] +95 95 [Preserve][ILSEQ] +96 96 [Preserve][ILSEQ] +97 97 [Preserve][ILSEQ] +98 98 [Preserve][ILSEQ] +99 99 [Preserve][ILSEQ] +9A 9A [Preserve][ILSEQ] +9B 9B [Preserve][ILSEQ] +9C 9C [Preserve][ILSEQ] +9D 9D [Preserve][ILSEQ] +9E 9E [Preserve][ILSEQ] +9F 9F [Preserve][ILSEQ] +A0 A0 [Preserve][ILSEQ] +A1 A1 [Preserve] +A2 A2 [Preserve] +A3 A3 [Preserve] +A4 A4 [Preserve] +A5 A5 [Preserve] +A6 A6 [Preserve] +A7 A7 [Preserve] +A8 A8 [Preserve] +A9 A9 [Preserve] +AA AA [Preserve] +AB AB [Preserve] +AC AC [Preserve] +AD AD [Preserve] +AE AE [Preserve] +AF AF [Preserve] +B0 B0 [Preserve] +B1 B1 [Preserve] +B2 B2 [Preserve] +B3 B3 [Preserve] +B4 B4 [Preserve] +B5 B5 [Preserve] +B6 B6 [Preserve] +B7 B7 [Preserve] +B8 B8 [Preserve] +B9 B9 [Preserve] +BA BA [Preserve] +BB BB [Preserve] +BC BC [Preserve] +BD BD [Preserve] +BE BE [Preserve] +BF BF [Preserve] +C0 C0 [Preserve] +C1 C1 [Preserve] +C2 C2 [Preserve] +C3 C3 [Preserve] +C4 C4 [Preserve] +C5 C5 [Preserve] +C6 C6 [Preserve] +C7 C7 [Preserve] +C8 C8 [Preserve] +C9 C9 [Preserve] +CA CA [Preserve] +CB CB [Preserve] +CC CC [Preserve] +CD CD [Preserve] +CE CE [Preserve] +CF CF [Preserve] +D0 D0 [Preserve] +D1 D1 [Preserve] +D2 D2 [Preserve] +D3 D3 [Preserve] +D4 D4 [Preserve] +D5 D5 [Preserve] +D6 D6 [Preserve] +D7 D7 [Preserve] +D8 D8 [Preserve] +D9 D9 [Preserve] +DA DA [Preserve] +DB DB [Preserve] +DC DC [Preserve] +DD DD [Preserve] +DE DE [Preserve] +DF DF [Preserve] +E0 E0 [Preserve][ILSEQ] +E1 E1 [Preserve][ILSEQ] +E2 E2 [Preserve][ILSEQ] +E3 E3 [Preserve][ILSEQ] +E4 E4 [Preserve][ILSEQ] +E5 E5 [Preserve][ILSEQ] +E6 E6 [Preserve][ILSEQ] +E7 E7 [Preserve][ILSEQ] +E8 E8 [Preserve][ILSEQ] +E9 E9 [Preserve][ILSEQ] +EA EA [Preserve][ILSEQ] +EB EB [Preserve][ILSEQ] +EC EC [Preserve][ILSEQ] +ED ED [Preserve][ILSEQ] +EE EE [Preserve][ILSEQ] +EF EF [Preserve][ILSEQ] +F0 F0 [Preserve][ILSEQ] +F1 F1 [Preserve][ILSEQ] +F2 F2 [Preserve][ILSEQ] +F3 F3 [Preserve][ILSEQ] +F4 F4 [Preserve][ILSEQ] +F5 F5 [Preserve][ILSEQ] +F6 F6 [Preserve][ILSEQ] +F7 F7 [Preserve][ILSEQ] +F8 F8 [Preserve][ILSEQ] +F9 F9 [Preserve][ILSEQ] +FA FA [Preserve][ILSEQ] +FB FB [Preserve][ILSEQ] +FC FC [Preserve][ILSEQ] +FD FD [Preserve][ILSEQ] +FE FE [Preserve][ILSEQ] +FF FF [Preserve][ILSEQ] +0022 0022 [Preserve][ASCII] +0027 NULL [SyntErr] +005C NULL [SyntErr] +0822 0822 [Preserve][ASCII] +0827 NULL [SyntErr] +085C NULL [SyntErr] +0922 0922 [Preserve][ASCII] +0927 NULL [SyntErr] +095C NULL [SyntErr] +0A22 0A22 [Preserve][ASCII] +0A27 NULL [SyntErr] +0A5C NULL [SyntErr] +0D22 0D22 [Preserve][ASCII] +0D27 NULL [SyntErr] +0D5C NULL [SyntErr] +1A22 1A22 [Preserve][ASCII] +1A27 NULL [SyntErr] +1A5C NULL [SyntErr] +2200 2200 [Preserve][ASCII] +2208 2208 [Preserve][ASCII] +2209 2209 [Preserve][ASCII] +220A 220A [Preserve][ASCII] +220D 220D [Preserve][ASCII] +221A 221A [Preserve][ASCII] +2222 2222 [Preserve][ASCII] +2225 2225 [Preserve][ASCII] +2227 NULL [SyntErr] +2230 2230 [Preserve][ASCII] +223F 223F [Preserve][ASCII] +2240 2240 [Preserve][ASCII] +225A 225A [Preserve][ASCII] +225C NULL [SyntErr] +225F 225F [Preserve][ASCII] +2261 2261 [Preserve][ASCII] +2262 2262 [Preserve][ASCII] +226E 226E [Preserve][ASCII] +2272 2272 [Preserve][ASCII] +2274 2274 [Preserve][ASCII] +227E 227E [Preserve][ASCII] +227F 227F [Preserve][ASCII] +2280 2280 [Preserv][MB][ILSEQ] +2281 2281 [Preserv][MB][ILSEQ] +229F 229F [Preserv][MB][ILSEQ] +22A0 22A0 [Preserv][MB][ILSEQ] +22A1 22A1 [Preserv][MB] +22E0 22E0 [Preserv][MB][ILSEQ] +22EF 22EF [Preserv][MB][ILSEQ] +22F9 22F9 [Preserv][MB][ILSEQ] +22FA 22FA [Preserv][MB][ILSEQ] +22FC 22FC [Preserv][MB][ILSEQ] +22FD 22FD [Preserv][MB][ILSEQ] +22FE 22FE [Preserv][MB][ILSEQ] +22FF 22FF [Preserv][MB][ILSEQ] +2522 2522 [Preserve][ASCII] +2527 NULL [SyntErr] +255C NULL [SyntErr] +2700 NULL [SyntErr] +2708 NULL [SyntErr] +2709 NULL [SyntErr] +270A NULL [SyntErr] +270D NULL [SyntErr] +271A NULL [SyntErr] +2722 NULL [SyntErr] +2725 NULL [SyntErr] +2727 27 [Regular] +2730 NULL [SyntErr] +273F NULL [SyntErr] +2740 NULL [SyntErr] +275A NULL [SyntErr] +275C NULL [SyntErr] +275F NULL [SyntErr] +2761 NULL [SyntErr] +2762 NULL [SyntErr] +276E NULL [SyntErr] +2772 NULL [SyntErr] +2774 NULL [SyntErr] +277E NULL [SyntErr] +277F NULL [SyntErr] +2780 NULL [SyntErr] +2781 NULL [SyntErr] +279F NULL [SyntErr] +27A0 NULL [SyntErr] +27A1 NULL [SyntErr] +27E0 NULL [SyntErr] +27EF NULL [SyntErr] +27F9 NULL [SyntErr] +27FA NULL [SyntErr] +27FC NULL [SyntErr] +27FD NULL [SyntErr] +27FE NULL [SyntErr] +27FF NULL [SyntErr] +3022 3022 [Preserve][ASCII] +3027 NULL [SyntErr] +305C NULL [SyntErr] +3F22 3F22 [Preserve][ASCII] +3F27 NULL [SyntErr] +3F5C NULL [SyntErr] +4022 4022 [Preserve][ASCII] +4027 NULL [SyntErr] +405C NULL [SyntErr] +5A22 5A22 [Preserve][ASCII] +5A27 NULL [SyntErr] +5A5C NULL [SyntErr] +5C00 00 [Trivial] +5C08 08 [Trivial] +5C09 09 [Trivial] +5C0A 0A [Trivial] +5C0D 0D [Trivial] +5C1A 1A [Trivial] +5C22 22 [Trivial] +5C25 5C25 [Preserve][LIKE] +5C27 27 [Trivial] +5C30 00 [Regular] +5C3F 3F [Trivial] +5C40 40 [Trivial] +5C5A 1A [Regular] +5C5C 5C [Regular] +5C5F 5C5F [Preserve][LIKE] +5C61 61 [Trivial] +5C62 08 [Regular] +5C6E 0A [Regular] +5C72 0D [Regular] +5C74 09 [Regular] +5C7E 7E [Trivial] +5C7F 7F [Trivial] +5C80 80 [Trivial][ILSEQ] +5C81 81 [Trivial][ILSEQ] +5C9F 9F [Trivial][ILSEQ] +5CA0 A0 [Trivial][ILSEQ] +5CA1 A1 [Trivial] +5CE0 E0 [Trivial][ILSEQ] +5CEF EF [Trivial][ILSEQ] +5CF9 F9 [Trivial][ILSEQ] +5CFA FA [Trivial][ILSEQ] +5CFC FC [Trivial][ILSEQ] +5CFD FD [Trivial][ILSEQ] +5CFE FE [Trivial][ILSEQ] +5CFF FF [Trivial][ILSEQ] +5F22 5F22 [Preserve][ASCII] +5F27 NULL [SyntErr] +5F5C NULL [SyntErr] +6122 6122 [Preserve][ASCII] +6127 NULL [SyntErr] +615C NULL [SyntErr] +6222 6222 [Preserve][ASCII] +6227 NULL [SyntErr] +625C NULL [SyntErr] +6E22 6E22 [Preserve][ASCII] +6E27 NULL [SyntErr] +6E5C NULL [SyntErr] +7222 7222 [Preserve][ASCII] +7227 NULL [SyntErr] +725C NULL [SyntErr] +7422 7422 [Preserve][ASCII] +7427 NULL [SyntErr] +745C NULL [SyntErr] +7E22 7E22 [Preserve][ASCII] +7E27 NULL [SyntErr] +7E5C NULL [SyntErr] +7F22 7F22 [Preserve][ASCII] +7F27 NULL [SyntErr] +7F5C NULL [SyntErr] +8022 8022 [Preserv][MB][ILSEQ] +8027 NULL [SyntErr] +805C NULL [SyntErr] +8122 8122 [Preserv][MB][ILSEQ] +8127 NULL [SyntErr] +815C 815C [Preserv][MB] +9F22 9F22 [Preserv][MB][ILSEQ] +9F27 NULL [SyntErr] +9F5C 9F5C [Preserv][MB] +A022 A022 [Preserv][MB][ILSEQ] +A027 NULL [SyntErr] +A05C NULL [SyntErr] +A122 A122 [Preserv][MB] +A127 NULL [SyntErr] +A15C NULL [SyntErr] +E022 E022 [Preserv][MB][ILSEQ] +E027 NULL [SyntErr] +E05C E05C [Preserv][MB] +EF22 EF22 [Preserv][MB][ILSEQ] +EF27 NULL [SyntErr] +EF5C EF5C [Preserv][MB] +F922 F922 [Preserv][MB][ILSEQ] +F927 NULL [SyntErr] +F95C F95C [Preserv][MB] +FA22 FA22 [Preserv][MB][ILSEQ] +FA27 NULL [SyntErr] +FA5C FA5C [Preserv][MB] +FC22 FC22 [Preserv][MB][ILSEQ] +FC27 NULL [SyntErr] +FC5C FC5C [Preserv][MB] +FD22 FD22 [Preserv][MB][ILSEQ] +FD27 NULL [SyntErr] +FD5C NULL [SyntErr] +FE22 FE22 [Preserv][MB][ILSEQ] +FE27 NULL [SyntErr] +FE5C NULL [SyntErr] +FF22 FF22 [Preserv][MB][ILSEQ] +FF27 NULL [SyntErr] +FF5C NULL [SyntErr] +5C0000 0000 [Trivial] +5C0008 0008 [Trivial] +5C0009 0009 [Trivial] +5C000A 000A [Trivial] +5C000D 000D [Trivial] +5C001A 001A [Trivial] +5C0022 0022 [Trivial] +5C0025 0025 [Trivial] +5C0027 NULL [SyntErr] +5C0030 0030 [Trivial] +5C003F 003F [Trivial] +5C0040 0040 [Trivial] +5C005A 005A [Trivial] +5C005C NULL [SyntErr] +5C005F 005F [Trivial] +5C0061 0061 [Trivial] +5C0062 0062 [Trivial] +5C006E 006E [Trivial] +5C0072 0072 [Trivial] +5C0074 0074 [Trivial] +5C007E 007E [Trivial] +5C007F 007F [Trivial] +5C0080 0080 [Trivial][ILSEQ] +5C0081 0081 [Trivial][ILSEQ] +5C009F 009F [Trivial][ILSEQ] +5C00A0 00A0 [Trivial][ILSEQ] +5C00A1 00A1 [Trivial] +5C00E0 00E0 [Trivial][ILSEQ] +5C00EF 00EF [Trivial][ILSEQ] +5C00F9 00F9 [Trivial][ILSEQ] +5C00FA 00FA [Trivial][ILSEQ] +5C00FC 00FC [Trivial][ILSEQ] +5C00FD 00FD [Trivial][ILSEQ] +5C00FE 00FE [Trivial][ILSEQ] +5C00FF 00FF [Trivial][ILSEQ] +5C0800 0800 [Trivial] +5C0808 0808 [Trivial] +5C0809 0809 [Trivial] +5C080A 080A [Trivial] +5C080D 080D [Trivial] +5C081A 081A [Trivial] +5C0822 0822 [Trivial] +5C0825 0825 [Trivial] +5C0827 NULL [SyntErr] +5C0830 0830 [Trivial] +5C083F 083F [Trivial] +5C0840 0840 [Trivial] +5C085A 085A [Trivial] +5C085C NULL [SyntErr] +5C085F 085F [Trivial] +5C0861 0861 [Trivial] +5C0862 0862 [Trivial] +5C086E 086E [Trivial] +5C0872 0872 [Trivial] +5C0874 0874 [Trivial] +5C087E 087E [Trivial] +5C087F 087F [Trivial] +5C0880 0880 [Trivial][ILSEQ] +5C0881 0881 [Trivial][ILSEQ] +5C089F 089F [Trivial][ILSEQ] +5C08A0 08A0 [Trivial][ILSEQ] +5C08A1 08A1 [Trivial] +5C08E0 08E0 [Trivial][ILSEQ] +5C08EF 08EF [Trivial][ILSEQ] +5C08F9 08F9 [Trivial][ILSEQ] +5C08FA 08FA [Trivial][ILSEQ] +5C08FC 08FC [Trivial][ILSEQ] +5C08FD 08FD [Trivial][ILSEQ] +5C08FE 08FE [Trivial][ILSEQ] +5C08FF 08FF [Trivial][ILSEQ] +5C0900 0900 [Trivial] +5C0908 0908 [Trivial] +5C0909 0909 [Trivial] +5C090A 090A [Trivial] +5C090D 090D [Trivial] +5C091A 091A [Trivial] +5C0922 0922 [Trivial] +5C0925 0925 [Trivial] +5C0927 NULL [SyntErr] +5C0930 0930 [Trivial] +5C093F 093F [Trivial] +5C0940 0940 [Trivial] +5C095A 095A [Trivial] +5C095C NULL [SyntErr] +5C095F 095F [Trivial] +5C0961 0961 [Trivial] +5C0962 0962 [Trivial] +5C096E 096E [Trivial] +5C0972 0972 [Trivial] +5C0974 0974 [Trivial] +5C097E 097E [Trivial] +5C097F 097F [Trivial] +5C0980 0980 [Trivial][ILSEQ] +5C0981 0981 [Trivial][ILSEQ] +5C099F 099F [Trivial][ILSEQ] +5C09A0 09A0 [Trivial][ILSEQ] +5C09A1 09A1 [Trivial] +5C09E0 09E0 [Trivial][ILSEQ] +5C09EF 09EF [Trivial][ILSEQ] +5C09F9 09F9 [Trivial][ILSEQ] +5C09FA 09FA [Trivial][ILSEQ] +5C09FC 09FC [Trivial][ILSEQ] +5C09FD 09FD [Trivial][ILSEQ] +5C09FE 09FE [Trivial][ILSEQ] +5C09FF 09FF [Trivial][ILSEQ] +5C0A00 0A00 [Trivial] +5C0A08 0A08 [Trivial] +5C0A09 0A09 [Trivial] +5C0A0A 0A0A [Trivial] +5C0A0D 0A0D [Trivial] +5C0A1A 0A1A [Trivial] +5C0A22 0A22 [Trivial] +5C0A25 0A25 [Trivial] +5C0A27 NULL [SyntErr] +5C0A30 0A30 [Trivial] +5C0A3F 0A3F [Trivial] +5C0A40 0A40 [Trivial] +5C0A5A 0A5A [Trivial] +5C0A5C NULL [SyntErr] +5C0A5F 0A5F [Trivial] +5C0A61 0A61 [Trivial] +5C0A62 0A62 [Trivial] +5C0A6E 0A6E [Trivial] +5C0A72 0A72 [Trivial] +5C0A74 0A74 [Trivial] +5C0A7E 0A7E [Trivial] +5C0A7F 0A7F [Trivial] +5C0A80 0A80 [Trivial][ILSEQ] +5C0A81 0A81 [Trivial][ILSEQ] +5C0A9F 0A9F [Trivial][ILSEQ] +5C0AA0 0AA0 [Trivial][ILSEQ] +5C0AA1 0AA1 [Trivial] +5C0AE0 0AE0 [Trivial][ILSEQ] +5C0AEF 0AEF [Trivial][ILSEQ] +5C0AF9 0AF9 [Trivial][ILSEQ] +5C0AFA 0AFA [Trivial][ILSEQ] +5C0AFC 0AFC [Trivial][ILSEQ] +5C0AFD 0AFD [Trivial][ILSEQ] +5C0AFE 0AFE [Trivial][ILSEQ] +5C0AFF 0AFF [Trivial][ILSEQ] +5C0D00 0D00 [Trivial] +5C0D08 0D08 [Trivial] +5C0D09 0D09 [Trivial] +5C0D0A 0D0A [Trivial] +5C0D0D 0D0D [Trivial] +5C0D1A 0D1A [Trivial] +5C0D22 0D22 [Trivial] +5C0D25 0D25 [Trivial] +5C0D27 NULL [SyntErr] +5C0D30 0D30 [Trivial] +5C0D3F 0D3F [Trivial] +5C0D40 0D40 [Trivial] +5C0D5A 0D5A [Trivial] +5C0D5C NULL [SyntErr] +5C0D5F 0D5F [Trivial] +5C0D61 0D61 [Trivial] +5C0D62 0D62 [Trivial] +5C0D6E 0D6E [Trivial] +5C0D72 0D72 [Trivial] +5C0D74 0D74 [Trivial] +5C0D7E 0D7E [Trivial] +5C0D7F 0D7F [Trivial] +5C0D80 0D80 [Trivial][ILSEQ] +5C0D81 0D81 [Trivial][ILSEQ] +5C0D9F 0D9F [Trivial][ILSEQ] +5C0DA0 0DA0 [Trivial][ILSEQ] +5C0DA1 0DA1 [Trivial] +5C0DE0 0DE0 [Trivial][ILSEQ] +5C0DEF 0DEF [Trivial][ILSEQ] +5C0DF9 0DF9 [Trivial][ILSEQ] +5C0DFA 0DFA [Trivial][ILSEQ] +5C0DFC 0DFC [Trivial][ILSEQ] +5C0DFD 0DFD [Trivial][ILSEQ] +5C0DFE 0DFE [Trivial][ILSEQ] +5C0DFF 0DFF [Trivial][ILSEQ] +5C1A00 1A00 [Trivial] +5C1A08 1A08 [Trivial] +5C1A09 1A09 [Trivial] +5C1A0A 1A0A [Trivial] +5C1A0D 1A0D [Trivial] +5C1A1A 1A1A [Trivial] +5C1A22 1A22 [Trivial] +5C1A25 1A25 [Trivial] +5C1A27 NULL [SyntErr] +5C1A30 1A30 [Trivial] +5C1A3F 1A3F [Trivial] +5C1A40 1A40 [Trivial] +5C1A5A 1A5A [Trivial] +5C1A5C NULL [SyntErr] +5C1A5F 1A5F [Trivial] +5C1A61 1A61 [Trivial] +5C1A62 1A62 [Trivial] +5C1A6E 1A6E [Trivial] +5C1A72 1A72 [Trivial] +5C1A74 1A74 [Trivial] +5C1A7E 1A7E [Trivial] +5C1A7F 1A7F [Trivial] +5C1A80 1A80 [Trivial][ILSEQ] +5C1A81 1A81 [Trivial][ILSEQ] +5C1A9F 1A9F [Trivial][ILSEQ] +5C1AA0 1AA0 [Trivial][ILSEQ] +5C1AA1 1AA1 [Trivial] +5C1AE0 1AE0 [Trivial][ILSEQ] +5C1AEF 1AEF [Trivial][ILSEQ] +5C1AF9 1AF9 [Trivial][ILSEQ] +5C1AFA 1AFA [Trivial][ILSEQ] +5C1AFC 1AFC [Trivial][ILSEQ] +5C1AFD 1AFD [Trivial][ILSEQ] +5C1AFE 1AFE [Trivial][ILSEQ] +5C1AFF 1AFF [Trivial][ILSEQ] +5C2200 2200 [Trivial] +5C2208 2208 [Trivial] +5C2209 2209 [Trivial] +5C220A 220A [Trivial] +5C220D 220D [Trivial] +5C221A 221A [Trivial] +5C2222 2222 [Trivial] +5C2225 2225 [Trivial] +5C2227 NULL [SyntErr] +5C2230 2230 [Trivial] +5C223F 223F [Trivial] +5C2240 2240 [Trivial] +5C225A 225A [Trivial] +5C225C NULL [SyntErr] +5C225F 225F [Trivial] +5C2261 2261 [Trivial] +5C2262 2262 [Trivial] +5C226E 226E [Trivial] +5C2272 2272 [Trivial] +5C2274 2274 [Trivial] +5C227E 227E [Trivial] +5C227F 227F [Trivial] +5C2280 2280 [Trivial][ILSEQ] +5C2281 2281 [Trivial][ILSEQ] +5C229F 229F [Trivial][ILSEQ] +5C22A0 22A0 [Trivial][ILSEQ] +5C22A1 22A1 [Trivial] +5C22E0 22E0 [Trivial][ILSEQ] +5C22EF 22EF [Trivial][ILSEQ] +5C22F9 22F9 [Trivial][ILSEQ] +5C22FA 22FA [Trivial][ILSEQ] +5C22FC 22FC [Trivial][ILSEQ] +5C22FD 22FD [Trivial][ILSEQ] +5C22FE 22FE [Trivial][ILSEQ] +5C22FF 22FF [Trivial][ILSEQ] +5C2500 5C2500 [Preserve][LIKE] +5C2508 5C2508 [Preserve][LIKE] +5C2509 5C2509 [Preserve][LIKE] +5C250A 5C250A [Preserve][LIKE] +5C250D 5C250D [Preserve][LIKE] +5C251A 5C251A [Preserve][LIKE] +5C2522 5C2522 [Preserve][LIKE] +5C2525 5C2525 [Preserve][LIKE] +5C2527 NULL [SyntErr] +5C2530 5C2530 [Preserve][LIKE] +5C253F 5C253F [Preserve][LIKE] +5C2540 5C2540 [Preserve][LIKE] +5C255A 5C255A [Preserve][LIKE] +5C255C NULL [SyntErr] +5C255F 5C255F [Preserve][LIKE] +5C2561 5C2561 [Preserve][LIKE] +5C2562 5C2562 [Preserve][LIKE] +5C256E 5C256E [Preserve][LIKE] +5C2572 5C2572 [Preserve][LIKE] +5C2574 5C2574 [Preserve][LIKE] +5C257E 5C257E [Preserve][LIKE] +5C257F 5C257F [Preserve][LIKE] +5C2580 5C2580 [Preserve][LIKE][ILSEQ] +5C2581 5C2581 [Preserve][LIKE][ILSEQ] +5C259F 5C259F [Preserve][LIKE][ILSEQ] +5C25A0 5C25A0 [Preserve][LIKE][ILSEQ] +5C25A1 5C25A1 [Preserve][LIKE] +5C25E0 5C25E0 [Preserve][LIKE][ILSEQ] +5C25EF 5C25EF [Preserve][LIKE][ILSEQ] +5C25F9 5C25F9 [Preserve][LIKE][ILSEQ] +5C25FA 5C25FA [Preserve][LIKE][ILSEQ] +5C25FC 5C25FC [Preserve][LIKE][ILSEQ] +5C25FD 5C25FD [Preserve][LIKE][ILSEQ] +5C25FE 5C25FE [Preserve][LIKE][ILSEQ] +5C25FF 5C25FF [Preserve][LIKE][ILSEQ] +5C2700 2700 [Trivial] +5C2708 2708 [Trivial] +5C2709 2709 [Trivial] +5C270A 270A [Trivial] +5C270D 270D [Trivial] +5C271A 271A [Trivial] +5C2722 2722 [Trivial] +5C2725 2725 [Trivial] +5C2727 NULL [SyntErr] +5C2730 2730 [Trivial] +5C273F 273F [Trivial] +5C2740 2740 [Trivial] +5C275A 275A [Trivial] +5C275C NULL [SyntErr] +5C275F 275F [Trivial] +5C2761 2761 [Trivial] +5C2762 2762 [Trivial] +5C276E 276E [Trivial] +5C2772 2772 [Trivial] +5C2774 2774 [Trivial] +5C277E 277E [Trivial] +5C277F 277F [Trivial] +5C2780 2780 [Trivial][ILSEQ] +5C2781 2781 [Trivial][ILSEQ] +5C279F 279F [Trivial][ILSEQ] +5C27A0 27A0 [Trivial][ILSEQ] +5C27A1 27A1 [Trivial] +5C27E0 27E0 [Trivial][ILSEQ] +5C27EF 27EF [Trivial][ILSEQ] +5C27F9 27F9 [Trivial][ILSEQ] +5C27FA 27FA [Trivial][ILSEQ] +5C27FC 27FC [Trivial][ILSEQ] +5C27FD 27FD [Trivial][ILSEQ] +5C27FE 27FE [Trivial][ILSEQ] +5C27FF 27FF [Trivial][ILSEQ] +5C3000 0000 [Regular] +5C3008 0008 [Regular] +5C3009 0009 [Regular] +5C300A 000A [Regular] +5C300D 000D [Regular] +5C301A 001A [Regular] +5C3022 0022 [Regular] +5C3025 0025 [Regular] +5C3027 NULL [SyntErr] +5C3030 0030 [Regular] +5C303F 003F [Regular] +5C3040 0040 [Regular] +5C305A 005A [Regular] +5C305C NULL [SyntErr] +5C305F 005F [Regular] +5C3061 0061 [Regular] +5C3062 0062 [Regular] +5C306E 006E [Regular] +5C3072 0072 [Regular] +5C3074 0074 [Regular] +5C307E 007E [Regular] +5C307F 007F [Regular] +5C3080 0080 [Regular][ILSEQ] +5C3081 0081 [Regular][ILSEQ] +5C309F 009F [Regular][ILSEQ] +5C30A0 00A0 [Regular][ILSEQ] +5C30A1 00A1 [Regular] +5C30E0 00E0 [Regular][ILSEQ] +5C30EF 00EF [Regular][ILSEQ] +5C30F9 00F9 [Regular][ILSEQ] +5C30FA 00FA [Regular][ILSEQ] +5C30FC 00FC [Regular][ILSEQ] +5C30FD 00FD [Regular][ILSEQ] +5C30FE 00FE [Regular][ILSEQ] +5C30FF 00FF [Regular][ILSEQ] +5C3F00 3F00 [Trivial] +5C3F08 3F08 [Trivial] +5C3F09 3F09 [Trivial] +5C3F0A 3F0A [Trivial] +5C3F0D 3F0D [Trivial] +5C3F1A 3F1A [Trivial] +5C3F22 3F22 [Trivial] +5C3F25 3F25 [Trivial] +5C3F27 NULL [SyntErr] +5C3F30 3F30 [Trivial] +5C3F3F 3F3F [Trivial] +5C3F40 3F40 [Trivial] +5C3F5A 3F5A [Trivial] +5C3F5C NULL [SyntErr] +5C3F5F 3F5F [Trivial] +5C3F61 3F61 [Trivial] +5C3F62 3F62 [Trivial] +5C3F6E 3F6E [Trivial] +5C3F72 3F72 [Trivial] +5C3F74 3F74 [Trivial] +5C3F7E 3F7E [Trivial] +5C3F7F 3F7F [Trivial] +5C3F80 3F80 [Trivial][ILSEQ] +5C3F81 3F81 [Trivial][ILSEQ] +5C3F9F 3F9F [Trivial][ILSEQ] +5C3FA0 3FA0 [Trivial][ILSEQ] +5C3FA1 3FA1 [Trivial] +5C3FE0 3FE0 [Trivial][ILSEQ] +5C3FEF 3FEF [Trivial][ILSEQ] +5C3FF9 3FF9 [Trivial][ILSEQ] +5C3FFA 3FFA [Trivial][ILSEQ] +5C3FFC 3FFC [Trivial][ILSEQ] +5C3FFD 3FFD [Trivial][ILSEQ] +5C3FFE 3FFE [Trivial][ILSEQ] +5C3FFF 3FFF [Trivial][ILSEQ] +5C4000 4000 [Trivial] +5C4008 4008 [Trivial] +5C4009 4009 [Trivial] +5C400A 400A [Trivial] +5C400D 400D [Trivial] +5C401A 401A [Trivial] +5C4022 4022 [Trivial] +5C4025 4025 [Trivial] +5C4027 NULL [SyntErr] +5C4030 4030 [Trivial] +5C403F 403F [Trivial] +5C4040 4040 [Trivial] +5C405A 405A [Trivial] +5C405C NULL [SyntErr] +5C405F 405F [Trivial] +5C4061 4061 [Trivial] +5C4062 4062 [Trivial] +5C406E 406E [Trivial] +5C4072 4072 [Trivial] +5C4074 4074 [Trivial] +5C407E 407E [Trivial] +5C407F 407F [Trivial] +5C4080 4080 [Trivial][ILSEQ] +5C4081 4081 [Trivial][ILSEQ] +5C409F 409F [Trivial][ILSEQ] +5C40A0 40A0 [Trivial][ILSEQ] +5C40A1 40A1 [Trivial] +5C40E0 40E0 [Trivial][ILSEQ] +5C40EF 40EF [Trivial][ILSEQ] +5C40F9 40F9 [Trivial][ILSEQ] +5C40FA 40FA [Trivial][ILSEQ] +5C40FC 40FC [Trivial][ILSEQ] +5C40FD 40FD [Trivial][ILSEQ] +5C40FE 40FE [Trivial][ILSEQ] +5C40FF 40FF [Trivial][ILSEQ] +5C5A00 1A00 [Regular] +5C5A08 1A08 [Regular] +5C5A09 1A09 [Regular] +5C5A0A 1A0A [Regular] +5C5A0D 1A0D [Regular] +5C5A1A 1A1A [Regular] +5C5A22 1A22 [Regular] +5C5A25 1A25 [Regular] +5C5A27 NULL [SyntErr] +5C5A30 1A30 [Regular] +5C5A3F 1A3F [Regular] +5C5A40 1A40 [Regular] +5C5A5A 1A5A [Regular] +5C5A5C NULL [SyntErr] +5C5A5F 1A5F [Regular] +5C5A61 1A61 [Regular] +5C5A62 1A62 [Regular] +5C5A6E 1A6E [Regular] +5C5A72 1A72 [Regular] +5C5A74 1A74 [Regular] +5C5A7E 1A7E [Regular] +5C5A7F 1A7F [Regular] +5C5A80 1A80 [Regular][ILSEQ] +5C5A81 1A81 [Regular][ILSEQ] +5C5A9F 1A9F [Regular][ILSEQ] +5C5AA0 1AA0 [Regular][ILSEQ] +5C5AA1 1AA1 [Regular] +5C5AE0 1AE0 [Regular][ILSEQ] +5C5AEF 1AEF [Regular][ILSEQ] +5C5AF9 1AF9 [Regular][ILSEQ] +5C5AFA 1AFA [Regular][ILSEQ] +5C5AFC 1AFC [Regular][ILSEQ] +5C5AFD 1AFD [Regular][ILSEQ] +5C5AFE 1AFE [Regular][ILSEQ] +5C5AFF 1AFF [Regular][ILSEQ] +5C5C00 5C00 [Regular] +5C5C08 5C08 [Regular] +5C5C09 5C09 [Regular] +5C5C0A 5C0A [Regular] +5C5C0D 5C0D [Regular] +5C5C1A 5C1A [Regular] +5C5C22 5C22 [Regular] +5C5C25 5C25 [Regular] +5C5C27 NULL [SyntErr] +5C5C30 5C30 [Regular] +5C5C3F 5C3F [Regular] +5C5C40 5C40 [Regular] +5C5C5A 5C5A [Regular] +5C5C5C NULL [SyntErr] +5C5C5F 5C5F [Regular] +5C5C61 5C61 [Regular] +5C5C62 5C62 [Regular] +5C5C6E 5C6E [Regular] +5C5C72 5C72 [Regular] +5C5C74 5C74 [Regular] +5C5C7E 5C7E [Regular] +5C5C7F 5C7F [Regular] +5C5C80 5C80 [Regular][ILSEQ] +5C5C81 5C81 [Regular][ILSEQ] +5C5C9F 5C9F [Regular][ILSEQ] +5C5CA0 5CA0 [Regular][ILSEQ] +5C5CA1 5CA1 [Regular] +5C5CE0 5CE0 [Regular][ILSEQ] +5C5CEF 5CEF [Regular][ILSEQ] +5C5CF9 5CF9 [Regular][ILSEQ] +5C5CFA 5CFA [Regular][ILSEQ] +5C5CFC 5CFC [Regular][ILSEQ] +5C5CFD 5CFD [Regular][ILSEQ] +5C5CFE 5CFE [Regular][ILSEQ] +5C5CFF 5CFF [Regular][ILSEQ] +5C5F00 5C5F00 [Preserve][LIKE] +5C5F08 5C5F08 [Preserve][LIKE] +5C5F09 5C5F09 [Preserve][LIKE] +5C5F0A 5C5F0A [Preserve][LIKE] +5C5F0D 5C5F0D [Preserve][LIKE] +5C5F1A 5C5F1A [Preserve][LIKE] +5C5F22 5C5F22 [Preserve][LIKE] +5C5F25 5C5F25 [Preserve][LIKE] +5C5F27 NULL [SyntErr] +5C5F30 5C5F30 [Preserve][LIKE] +5C5F3F 5C5F3F [Preserve][LIKE] +5C5F40 5C5F40 [Preserve][LIKE] +5C5F5A 5C5F5A [Preserve][LIKE] +5C5F5C NULL [SyntErr] +5C5F5F 5C5F5F [Preserve][LIKE] +5C5F61 5C5F61 [Preserve][LIKE] +5C5F62 5C5F62 [Preserve][LIKE] +5C5F6E 5C5F6E [Preserve][LIKE] +5C5F72 5C5F72 [Preserve][LIKE] +5C5F74 5C5F74 [Preserve][LIKE] +5C5F7E 5C5F7E [Preserve][LIKE] +5C5F7F 5C5F7F [Preserve][LIKE] +5C5F80 5C5F80 [Preserve][LIKE][ILSEQ] +5C5F81 5C5F81 [Preserve][LIKE][ILSEQ] +5C5F9F 5C5F9F [Preserve][LIKE][ILSEQ] +5C5FA0 5C5FA0 [Preserve][LIKE][ILSEQ] +5C5FA1 5C5FA1 [Preserve][LIKE] +5C5FE0 5C5FE0 [Preserve][LIKE][ILSEQ] +5C5FEF 5C5FEF [Preserve][LIKE][ILSEQ] +5C5FF9 5C5FF9 [Preserve][LIKE][ILSEQ] +5C5FFA 5C5FFA [Preserve][LIKE][ILSEQ] +5C5FFC 5C5FFC [Preserve][LIKE][ILSEQ] +5C5FFD 5C5FFD [Preserve][LIKE][ILSEQ] +5C5FFE 5C5FFE [Preserve][LIKE][ILSEQ] +5C5FFF 5C5FFF [Preserve][LIKE][ILSEQ] +5C6100 6100 [Trivial] +5C6108 6108 [Trivial] +5C6109 6109 [Trivial] +5C610A 610A [Trivial] +5C610D 610D [Trivial] +5C611A 611A [Trivial] +5C6122 6122 [Trivial] +5C6125 6125 [Trivial] +5C6127 NULL [SyntErr] +5C6130 6130 [Trivial] +5C613F 613F [Trivial] +5C6140 6140 [Trivial] +5C615A 615A [Trivial] +5C615C NULL [SyntErr] +5C615F 615F [Trivial] +5C6161 6161 [Trivial] +5C6162 6162 [Trivial] +5C616E 616E [Trivial] +5C6172 6172 [Trivial] +5C6174 6174 [Trivial] +5C617E 617E [Trivial] +5C617F 617F [Trivial] +5C6180 6180 [Trivial][ILSEQ] +5C6181 6181 [Trivial][ILSEQ] +5C619F 619F [Trivial][ILSEQ] +5C61A0 61A0 [Trivial][ILSEQ] +5C61A1 61A1 [Trivial] +5C61E0 61E0 [Trivial][ILSEQ] +5C61EF 61EF [Trivial][ILSEQ] +5C61F9 61F9 [Trivial][ILSEQ] +5C61FA 61FA [Trivial][ILSEQ] +5C61FC 61FC [Trivial][ILSEQ] +5C61FD 61FD [Trivial][ILSEQ] +5C61FE 61FE [Trivial][ILSEQ] +5C61FF 61FF [Trivial][ILSEQ] +5C6200 0800 [Regular] +5C6208 0808 [Regular] +5C6209 0809 [Regular] +5C620A 080A [Regular] +5C620D 080D [Regular] +5C621A 081A [Regular] +5C6222 0822 [Regular] +5C6225 0825 [Regular] +5C6227 NULL [SyntErr] +5C6230 0830 [Regular] +5C623F 083F [Regular] +5C6240 0840 [Regular] +5C625A 085A [Regular] +5C625C NULL [SyntErr] +5C625F 085F [Regular] +5C6261 0861 [Regular] +5C6262 0862 [Regular] +5C626E 086E [Regular] +5C6272 0872 [Regular] +5C6274 0874 [Regular] +5C627E 087E [Regular] +5C627F 087F [Regular] +5C6280 0880 [Regular][ILSEQ] +5C6281 0881 [Regular][ILSEQ] +5C629F 089F [Regular][ILSEQ] +5C62A0 08A0 [Regular][ILSEQ] +5C62A1 08A1 [Regular] +5C62E0 08E0 [Regular][ILSEQ] +5C62EF 08EF [Regular][ILSEQ] +5C62F9 08F9 [Regular][ILSEQ] +5C62FA 08FA [Regular][ILSEQ] +5C62FC 08FC [Regular][ILSEQ] +5C62FD 08FD [Regular][ILSEQ] +5C62FE 08FE [Regular][ILSEQ] +5C62FF 08FF [Regular][ILSEQ] +5C6E00 0A00 [Regular] +5C6E08 0A08 [Regular] +5C6E09 0A09 [Regular] +5C6E0A 0A0A [Regular] +5C6E0D 0A0D [Regular] +5C6E1A 0A1A [Regular] +5C6E22 0A22 [Regular] +5C6E25 0A25 [Regular] +5C6E27 NULL [SyntErr] +5C6E30 0A30 [Regular] +5C6E3F 0A3F [Regular] +5C6E40 0A40 [Regular] +5C6E5A 0A5A [Regular] +5C6E5C NULL [SyntErr] +5C6E5F 0A5F [Regular] +5C6E61 0A61 [Regular] +5C6E62 0A62 [Regular] +5C6E6E 0A6E [Regular] +5C6E72 0A72 [Regular] +5C6E74 0A74 [Regular] +5C6E7E 0A7E [Regular] +5C6E7F 0A7F [Regular] +5C6E80 0A80 [Regular][ILSEQ] +5C6E81 0A81 [Regular][ILSEQ] +5C6E9F 0A9F [Regular][ILSEQ] +5C6EA0 0AA0 [Regular][ILSEQ] +5C6EA1 0AA1 [Regular] +5C6EE0 0AE0 [Regular][ILSEQ] +5C6EEF 0AEF [Regular][ILSEQ] +5C6EF9 0AF9 [Regular][ILSEQ] +5C6EFA 0AFA [Regular][ILSEQ] +5C6EFC 0AFC [Regular][ILSEQ] +5C6EFD 0AFD [Regular][ILSEQ] +5C6EFE 0AFE [Regular][ILSEQ] +5C6EFF 0AFF [Regular][ILSEQ] +5C7200 0D00 [Regular] +5C7208 0D08 [Regular] +5C7209 0D09 [Regular] +5C720A 0D0A [Regular] +5C720D 0D0D [Regular] +5C721A 0D1A [Regular] +5C7222 0D22 [Regular] +5C7225 0D25 [Regular] +5C7227 NULL [SyntErr] +5C7230 0D30 [Regular] +5C723F 0D3F [Regular] +5C7240 0D40 [Regular] +5C725A 0D5A [Regular] +5C725C NULL [SyntErr] +5C725F 0D5F [Regular] +5C7261 0D61 [Regular] +5C7262 0D62 [Regular] +5C726E 0D6E [Regular] +5C7272 0D72 [Regular] +5C7274 0D74 [Regular] +5C727E 0D7E [Regular] +5C727F 0D7F [Regular] +5C7280 0D80 [Regular][ILSEQ] +5C7281 0D81 [Regular][ILSEQ] +5C729F 0D9F [Regular][ILSEQ] +5C72A0 0DA0 [Regular][ILSEQ] +5C72A1 0DA1 [Regular] +5C72E0 0DE0 [Regular][ILSEQ] +5C72EF 0DEF [Regular][ILSEQ] +5C72F9 0DF9 [Regular][ILSEQ] +5C72FA 0DFA [Regular][ILSEQ] +5C72FC 0DFC [Regular][ILSEQ] +5C72FD 0DFD [Regular][ILSEQ] +5C72FE 0DFE [Regular][ILSEQ] +5C72FF 0DFF [Regular][ILSEQ] +5C7400 0900 [Regular] +5C7408 0908 [Regular] +5C7409 0909 [Regular] +5C740A 090A [Regular] +5C740D 090D [Regular] +5C741A 091A [Regular] +5C7422 0922 [Regular] +5C7425 0925 [Regular] +5C7427 NULL [SyntErr] +5C7430 0930 [Regular] +5C743F 093F [Regular] +5C7440 0940 [Regular] +5C745A 095A [Regular] +5C745C NULL [SyntErr] +5C745F 095F [Regular] +5C7461 0961 [Regular] +5C7462 0962 [Regular] +5C746E 096E [Regular] +5C7472 0972 [Regular] +5C7474 0974 [Regular] +5C747E 097E [Regular] +5C747F 097F [Regular] +5C7480 0980 [Regular][ILSEQ] +5C7481 0981 [Regular][ILSEQ] +5C749F 099F [Regular][ILSEQ] +5C74A0 09A0 [Regular][ILSEQ] +5C74A1 09A1 [Regular] +5C74E0 09E0 [Regular][ILSEQ] +5C74EF 09EF [Regular][ILSEQ] +5C74F9 09F9 [Regular][ILSEQ] +5C74FA 09FA [Regular][ILSEQ] +5C74FC 09FC [Regular][ILSEQ] +5C74FD 09FD [Regular][ILSEQ] +5C74FE 09FE [Regular][ILSEQ] +5C74FF 09FF [Regular][ILSEQ] +5C7E00 7E00 [Trivial] +5C7E08 7E08 [Trivial] +5C7E09 7E09 [Trivial] +5C7E0A 7E0A [Trivial] +5C7E0D 7E0D [Trivial] +5C7E1A 7E1A [Trivial] +5C7E22 7E22 [Trivial] +5C7E25 7E25 [Trivial] +5C7E27 NULL [SyntErr] +5C7E30 7E30 [Trivial] +5C7E3F 7E3F [Trivial] +5C7E40 7E40 [Trivial] +5C7E5A 7E5A [Trivial] +5C7E5C NULL [SyntErr] +5C7E5F 7E5F [Trivial] +5C7E61 7E61 [Trivial] +5C7E62 7E62 [Trivial] +5C7E6E 7E6E [Trivial] +5C7E72 7E72 [Trivial] +5C7E74 7E74 [Trivial] +5C7E7E 7E7E [Trivial] +5C7E7F 7E7F [Trivial] +5C7E80 7E80 [Trivial][ILSEQ] +5C7E81 7E81 [Trivial][ILSEQ] +5C7E9F 7E9F [Trivial][ILSEQ] +5C7EA0 7EA0 [Trivial][ILSEQ] +5C7EA1 7EA1 [Trivial] +5C7EE0 7EE0 [Trivial][ILSEQ] +5C7EEF 7EEF [Trivial][ILSEQ] +5C7EF9 7EF9 [Trivial][ILSEQ] +5C7EFA 7EFA [Trivial][ILSEQ] +5C7EFC 7EFC [Trivial][ILSEQ] +5C7EFD 7EFD [Trivial][ILSEQ] +5C7EFE 7EFE [Trivial][ILSEQ] +5C7EFF 7EFF [Trivial][ILSEQ] +5C7F00 7F00 [Trivial] +5C7F08 7F08 [Trivial] +5C7F09 7F09 [Trivial] +5C7F0A 7F0A [Trivial] +5C7F0D 7F0D [Trivial] +5C7F1A 7F1A [Trivial] +5C7F22 7F22 [Trivial] +5C7F25 7F25 [Trivial] +5C7F27 NULL [SyntErr] +5C7F30 7F30 [Trivial] +5C7F3F 7F3F [Trivial] +5C7F40 7F40 [Trivial] +5C7F5A 7F5A [Trivial] +5C7F5C NULL [SyntErr] +5C7F5F 7F5F [Trivial] +5C7F61 7F61 [Trivial] +5C7F62 7F62 [Trivial] +5C7F6E 7F6E [Trivial] +5C7F72 7F72 [Trivial] +5C7F74 7F74 [Trivial] +5C7F7E 7F7E [Trivial] +5C7F7F 7F7F [Trivial] +5C7F80 7F80 [Trivial][ILSEQ] +5C7F81 7F81 [Trivial][ILSEQ] +5C7F9F 7F9F [Trivial][ILSEQ] +5C7FA0 7FA0 [Trivial][ILSEQ] +5C7FA1 7FA1 [Trivial] +5C7FE0 7FE0 [Trivial][ILSEQ] +5C7FEF 7FEF [Trivial][ILSEQ] +5C7FF9 7FF9 [Trivial][ILSEQ] +5C7FFA 7FFA [Trivial][ILSEQ] +5C7FFC 7FFC [Trivial][ILSEQ] +5C7FFD 7FFD [Trivial][ILSEQ] +5C7FFE 7FFE [Trivial][ILSEQ] +5C7FFF 7FFF [Trivial][ILSEQ] +5C8000 8000 [Trivial][ILSEQ] +5C8008 8008 [Trivial][ILSEQ] +5C8009 8009 [Trivial][ILSEQ] +5C800A 800A [Trivial][ILSEQ] +5C800D 800D [Trivial][ILSEQ] +5C801A 801A [Trivial][ILSEQ] +5C8022 8022 [Trivial][ILSEQ] +5C8025 8025 [Trivial][ILSEQ] +5C8027 NULL [SyntErr] +5C8030 8030 [Trivial][ILSEQ] +5C803F 803F [Trivial][ILSEQ] +5C8040 8040 [Trivial][ILSEQ] +5C805A 805A [Trivial][ILSEQ] +5C805C NULL [SyntErr] +5C805F 805F [Trivial][ILSEQ] +5C8061 8061 [Trivial][ILSEQ] +5C8062 8062 [Trivial][ILSEQ] +5C806E 806E [Trivial][ILSEQ] +5C8072 8072 [Trivial][ILSEQ] +5C8074 8074 [Trivial][ILSEQ] +5C807E 807E [Trivial][ILSEQ] +5C807F 807F [Trivial][ILSEQ] +5C8080 8080 [Trivial][ILSEQ] +5C8081 8081 [Trivial][ILSEQ] +5C809F 809F [Trivial][ILSEQ] +5C80A0 80A0 [Trivial][ILSEQ] +5C80A1 80A1 [Trivial][ILSEQ] +5C80E0 80E0 [Trivial][ILSEQ] +5C80EF 80EF [Trivial][ILSEQ] +5C80F9 80F9 [Trivial][ILSEQ] +5C80FA 80FA [Trivial][ILSEQ] +5C80FC 80FC [Trivial][ILSEQ] +5C80FD 80FD [Trivial][ILSEQ] +5C80FE 80FE [Trivial][ILSEQ] +5C80FF 80FF [Trivial][ILSEQ] +5C8100 8100 [Trivial][ILSEQ] +5C8108 8108 [Trivial][ILSEQ] +5C8109 8109 [Trivial][ILSEQ] +5C810A 810A [Trivial][ILSEQ] +5C810D 810D [Trivial][ILSEQ] +5C811A 811A [Trivial][ILSEQ] +5C8122 8122 [Trivial][ILSEQ] +5C8125 8125 [Trivial][ILSEQ] +5C8127 NULL [SyntErr] +5C8130 8130 [Trivial][ILSEQ] +5C813F 813F [Trivial][ILSEQ] +5C8140 8140 [Trivial] +5C815A 815A [Trivial] +5C815C NULL [SyntErr] +5C815F 815F [Trivial] +5C8161 8161 [Trivial] +5C8162 8162 [Trivial] +5C816E 816E [Trivial] +5C8172 8172 [Trivial] +5C8174 8174 [Trivial] +5C817E 817E [Trivial] +5C817F 817F [Trivial][ILSEQ] +5C8180 8180 [Trivial] +5C8181 8181 [Trivial] +5C819F 819F [Trivial] +5C81A0 81A0 [Trivial] +5C81A1 81A1 [Trivial] +5C81E0 81E0 [Trivial] +5C81EF 81EF [Trivial] +5C81F9 81F9 [Trivial] +5C81FA 81FA [Trivial] +5C81FC 81FC [Trivial] +5C81FD 81FD [Trivial][ILSEQ] +5C81FE 81FE [Trivial][ILSEQ] +5C81FF 81FF [Trivial][ILSEQ] +5C9F00 9F00 [Trivial][ILSEQ] +5C9F08 9F08 [Trivial][ILSEQ] +5C9F09 9F09 [Trivial][ILSEQ] +5C9F0A 9F0A [Trivial][ILSEQ] +5C9F0D 9F0D [Trivial][ILSEQ] +5C9F1A 9F1A [Trivial][ILSEQ] +5C9F22 9F22 [Trivial][ILSEQ] +5C9F25 9F25 [Trivial][ILSEQ] +5C9F27 NULL [SyntErr] +5C9F30 9F30 [Trivial][ILSEQ] +5C9F3F 9F3F [Trivial][ILSEQ] +5C9F40 9F40 [Trivial] +5C9F5A 9F5A [Trivial] +5C9F5C NULL [SyntErr] +5C9F5F 9F5F [Trivial] +5C9F61 9F61 [Trivial] +5C9F62 9F62 [Trivial] +5C9F6E 9F6E [Trivial] +5C9F72 9F72 [Trivial] +5C9F74 9F74 [Trivial] +5C9F7E 9F7E [Trivial] +5C9F7F 9F7F [Trivial][ILSEQ] +5C9F80 9F80 [Trivial] +5C9F81 9F81 [Trivial] +5C9F9F 9F9F [Trivial] +5C9FA0 9FA0 [Trivial] +5C9FA1 9FA1 [Trivial] +5C9FE0 9FE0 [Trivial] +5C9FEF 9FEF [Trivial] +5C9FF9 9FF9 [Trivial] +5C9FFA 9FFA [Trivial] +5C9FFC 9FFC [Trivial] +5C9FFD 9FFD [Trivial][ILSEQ] +5C9FFE 9FFE [Trivial][ILSEQ] +5C9FFF 9FFF [Trivial][ILSEQ] +5CA000 A000 [Trivial][ILSEQ] +5CA008 A008 [Trivial][ILSEQ] +5CA009 A009 [Trivial][ILSEQ] +5CA00A A00A [Trivial][ILSEQ] +5CA00D A00D [Trivial][ILSEQ] +5CA01A A01A [Trivial][ILSEQ] +5CA022 A022 [Trivial][ILSEQ] +5CA025 A025 [Trivial][ILSEQ] +5CA027 NULL [SyntErr] +5CA030 A030 [Trivial][ILSEQ] +5CA03F A03F [Trivial][ILSEQ] +5CA040 A040 [Trivial][ILSEQ] +5CA05A A05A [Trivial][ILSEQ] +5CA05C NULL [SyntErr] +5CA05F A05F [Trivial][ILSEQ] +5CA061 A061 [Trivial][ILSEQ] +5CA062 A062 [Trivial][ILSEQ] +5CA06E A06E [Trivial][ILSEQ] +5CA072 A072 [Trivial][ILSEQ] +5CA074 A074 [Trivial][ILSEQ] +5CA07E A07E [Trivial][ILSEQ] +5CA07F A07F [Trivial][ILSEQ] +5CA080 A080 [Trivial][ILSEQ] +5CA081 A081 [Trivial][ILSEQ] +5CA09F A09F [Trivial][ILSEQ] +5CA0A0 A0A0 [Trivial][ILSEQ] +5CA0A1 A0A1 [Trivial][ILSEQ] +5CA0E0 A0E0 [Trivial][ILSEQ] +5CA0EF A0EF [Trivial][ILSEQ] +5CA0F9 A0F9 [Trivial][ILSEQ] +5CA0FA A0FA [Trivial][ILSEQ] +5CA0FC A0FC [Trivial][ILSEQ] +5CA0FD A0FD [Trivial][ILSEQ] +5CA0FE A0FE [Trivial][ILSEQ] +5CA0FF A0FF [Trivial][ILSEQ] +5CA100 A100 [Trivial] +5CA108 A108 [Trivial] +5CA109 A109 [Trivial] +5CA10A A10A [Trivial] +5CA10D A10D [Trivial] +5CA11A A11A [Trivial] +5CA122 A122 [Trivial] +5CA125 A125 [Trivial] +5CA127 NULL [SyntErr] +5CA130 A130 [Trivial] +5CA13F A13F [Trivial] +5CA140 A140 [Trivial] +5CA15A A15A [Trivial] +5CA15C NULL [SyntErr][USER] +5CA15F A15F [Trivial] +5CA161 A161 [Trivial] +5CA162 A162 [Trivial] +5CA16E A16E [Trivial] +5CA172 A172 [Trivial] +5CA174 A174 [Trivial] +5CA17E A17E [Trivial] +5CA17F A17F [Trivial] +5CA180 A180 [Trivial][ILSEQ] +5CA181 A181 [Trivial][ILSEQ] +5CA19F A19F [Trivial][ILSEQ] +5CA1A0 A1A0 [Trivial][ILSEQ] +5CA1A1 A1A1 [Trivial] +5CA1E0 A1E0 [Trivial][ILSEQ] +5CA1EF A1EF [Trivial][ILSEQ] +5CA1F9 A1F9 [Trivial][ILSEQ] +5CA1FA A1FA [Trivial][ILSEQ] +5CA1FC A1FC [Trivial][ILSEQ] +5CA1FD A1FD [Trivial][ILSEQ] +5CA1FE A1FE [Trivial][ILSEQ] +5CA1FF A1FF [Trivial][ILSEQ] +5CE000 E000 [Trivial][ILSEQ] +5CE008 E008 [Trivial][ILSEQ] +5CE009 E009 [Trivial][ILSEQ] +5CE00A E00A [Trivial][ILSEQ] +5CE00D E00D [Trivial][ILSEQ] +5CE01A E01A [Trivial][ILSEQ] +5CE022 E022 [Trivial][ILSEQ] +5CE025 E025 [Trivial][ILSEQ] +5CE027 NULL [SyntErr] +5CE030 E030 [Trivial][ILSEQ] +5CE03F E03F [Trivial][ILSEQ] +5CE040 E040 [Trivial] +5CE05A E05A [Trivial] +5CE05C NULL [SyntErr] +5CE05F E05F [Trivial] +5CE061 E061 [Trivial] +5CE062 E062 [Trivial] +5CE06E E06E [Trivial] +5CE072 E072 [Trivial] +5CE074 E074 [Trivial] +5CE07E E07E [Trivial] +5CE07F E07F [Trivial][ILSEQ] +5CE080 E080 [Trivial] +5CE081 E081 [Trivial] +5CE09F E09F [Trivial] +5CE0A0 E0A0 [Trivial] +5CE0A1 E0A1 [Trivial] +5CE0E0 E0E0 [Trivial] +5CE0EF E0EF [Trivial] +5CE0F9 E0F9 [Trivial] +5CE0FA E0FA [Trivial] +5CE0FC E0FC [Trivial] +5CE0FD E0FD [Trivial][ILSEQ] +5CE0FE E0FE [Trivial][ILSEQ] +5CE0FF E0FF [Trivial][ILSEQ] +5CEF00 EF00 [Trivial][ILSEQ] +5CEF08 EF08 [Trivial][ILSEQ] +5CEF09 EF09 [Trivial][ILSEQ] +5CEF0A EF0A [Trivial][ILSEQ] +5CEF0D EF0D [Trivial][ILSEQ] +5CEF1A EF1A [Trivial][ILSEQ] +5CEF22 EF22 [Trivial][ILSEQ] +5CEF25 EF25 [Trivial][ILSEQ] +5CEF27 NULL [SyntErr] +5CEF30 EF30 [Trivial][ILSEQ] +5CEF3F EF3F [Trivial][ILSEQ] +5CEF40 EF40 [Trivial] +5CEF5A EF5A [Trivial] +5CEF5C NULL [SyntErr] +5CEF5F EF5F [Trivial] +5CEF61 EF61 [Trivial] +5CEF62 EF62 [Trivial] +5CEF6E EF6E [Trivial] +5CEF72 EF72 [Trivial] +5CEF74 EF74 [Trivial] +5CEF7E EF7E [Trivial] +5CEF7F EF7F [Trivial][ILSEQ] +5CEF80 EF80 [Trivial] +5CEF81 EF81 [Trivial] +5CEF9F EF9F [Trivial] +5CEFA0 EFA0 [Trivial] +5CEFA1 EFA1 [Trivial] +5CEFE0 EFE0 [Trivial] +5CEFEF EFEF [Trivial] +5CEFF9 EFF9 [Trivial] +5CEFFA EFFA [Trivial] +5CEFFC EFFC [Trivial] +5CEFFD EFFD [Trivial][ILSEQ] +5CEFFE EFFE [Trivial][ILSEQ] +5CEFFF EFFF [Trivial][ILSEQ] +5CF900 F900 [Trivial][ILSEQ] +5CF908 F908 [Trivial][ILSEQ] +5CF909 F909 [Trivial][ILSEQ] +5CF90A F90A [Trivial][ILSEQ] +5CF90D F90D [Trivial][ILSEQ] +5CF91A F91A [Trivial][ILSEQ] +5CF922 F922 [Trivial][ILSEQ] +5CF925 F925 [Trivial][ILSEQ] +5CF927 NULL [SyntErr] +5CF930 F930 [Trivial][ILSEQ] +5CF93F F93F [Trivial][ILSEQ] +5CF940 F940 [Trivial] +5CF95A F95A [Trivial] +5CF95C NULL [SyntErr] +5CF95F F95F [Trivial] +5CF961 F961 [Trivial] +5CF962 F962 [Trivial] +5CF96E F96E [Trivial] +5CF972 F972 [Trivial] +5CF974 F974 [Trivial] +5CF97E F97E [Trivial] +5CF97F F97F [Trivial][ILSEQ] +5CF980 F980 [Trivial] +5CF981 F981 [Trivial] +5CF99F F99F [Trivial] +5CF9A0 F9A0 [Trivial] +5CF9A1 F9A1 [Trivial] +5CF9E0 F9E0 [Trivial] +5CF9EF F9EF [Trivial] +5CF9F9 F9F9 [Trivial] +5CF9FA F9FA [Trivial] +5CF9FC F9FC [Trivial] +5CF9FD F9FD [Trivial][ILSEQ] +5CF9FE F9FE [Trivial][ILSEQ] +5CF9FF F9FF [Trivial][ILSEQ] +5CFA00 FA00 [Trivial][ILSEQ] +5CFA08 FA08 [Trivial][ILSEQ] +5CFA09 FA09 [Trivial][ILSEQ] +5CFA0A FA0A [Trivial][ILSEQ] +5CFA0D FA0D [Trivial][ILSEQ] +5CFA1A FA1A [Trivial][ILSEQ] +5CFA22 FA22 [Trivial][ILSEQ] +5CFA25 FA25 [Trivial][ILSEQ] +5CFA27 NULL [SyntErr] +5CFA30 FA30 [Trivial][ILSEQ] +5CFA3F FA3F [Trivial][ILSEQ] +5CFA40 FA40 [Trivial] +5CFA5A FA5A [Trivial] +5CFA5C NULL [SyntErr] +5CFA5F FA5F [Trivial] +5CFA61 FA61 [Trivial] +5CFA62 FA62 [Trivial] +5CFA6E FA6E [Trivial] +5CFA72 FA72 [Trivial] +5CFA74 FA74 [Trivial] +5CFA7E FA7E [Trivial] +5CFA7F FA7F [Trivial][ILSEQ] +5CFA80 FA80 [Trivial] +5CFA81 FA81 [Trivial] +5CFA9F FA9F [Trivial] +5CFAA0 FAA0 [Trivial] +5CFAA1 FAA1 [Trivial] +5CFAE0 FAE0 [Trivial] +5CFAEF FAEF [Trivial] +5CFAF9 FAF9 [Trivial] +5CFAFA FAFA [Trivial] +5CFAFC FAFC [Trivial] +5CFAFD FAFD [Trivial][ILSEQ] +5CFAFE FAFE [Trivial][ILSEQ] +5CFAFF FAFF [Trivial][ILSEQ] +5CFC00 FC00 [Trivial][ILSEQ] +5CFC08 FC08 [Trivial][ILSEQ] +5CFC09 FC09 [Trivial][ILSEQ] +5CFC0A FC0A [Trivial][ILSEQ] +5CFC0D FC0D [Trivial][ILSEQ] +5CFC1A FC1A [Trivial][ILSEQ] +5CFC22 FC22 [Trivial][ILSEQ] +5CFC25 FC25 [Trivial][ILSEQ] +5CFC27 NULL [SyntErr] +5CFC30 FC30 [Trivial][ILSEQ] +5CFC3F FC3F [Trivial][ILSEQ] +5CFC40 FC40 [Trivial] +5CFC5A FC5A [Trivial] +5CFC5C NULL [SyntErr] +5CFC5F FC5F [Trivial] +5CFC61 FC61 [Trivial] +5CFC62 FC62 [Trivial] +5CFC6E FC6E [Trivial] +5CFC72 FC72 [Trivial] +5CFC74 FC74 [Trivial] +5CFC7E FC7E [Trivial] +5CFC7F FC7F [Trivial][ILSEQ] +5CFC80 FC80 [Trivial] +5CFC81 FC81 [Trivial] +5CFC9F FC9F [Trivial] +5CFCA0 FCA0 [Trivial] +5CFCA1 FCA1 [Trivial] +5CFCE0 FCE0 [Trivial] +5CFCEF FCEF [Trivial] +5CFCF9 FCF9 [Trivial] +5CFCFA FCFA [Trivial] +5CFCFC FCFC [Trivial] +5CFCFD FCFD [Trivial][ILSEQ] +5CFCFE FCFE [Trivial][ILSEQ] +5CFCFF FCFF [Trivial][ILSEQ] +5CFD00 FD00 [Trivial][ILSEQ] +5CFD08 FD08 [Trivial][ILSEQ] +5CFD09 FD09 [Trivial][ILSEQ] +5CFD0A FD0A [Trivial][ILSEQ] +5CFD0D FD0D [Trivial][ILSEQ] +5CFD1A FD1A [Trivial][ILSEQ] +5CFD22 FD22 [Trivial][ILSEQ] +5CFD25 FD25 [Trivial][ILSEQ] +5CFD27 NULL [SyntErr] +5CFD30 FD30 [Trivial][ILSEQ] +5CFD3F FD3F [Trivial][ILSEQ] +5CFD40 FD40 [Trivial][ILSEQ] +5CFD5A FD5A [Trivial][ILSEQ] +5CFD5C NULL [SyntErr] +5CFD5F FD5F [Trivial][ILSEQ] +5CFD61 FD61 [Trivial][ILSEQ] +5CFD62 FD62 [Trivial][ILSEQ] +5CFD6E FD6E [Trivial][ILSEQ] +5CFD72 FD72 [Trivial][ILSEQ] +5CFD74 FD74 [Trivial][ILSEQ] +5CFD7E FD7E [Trivial][ILSEQ] +5CFD7F FD7F [Trivial][ILSEQ] +5CFD80 FD80 [Trivial][ILSEQ] +5CFD81 FD81 [Trivial][ILSEQ] +5CFD9F FD9F [Trivial][ILSEQ] +5CFDA0 FDA0 [Trivial][ILSEQ] +5CFDA1 FDA1 [Trivial][ILSEQ] +5CFDE0 FDE0 [Trivial][ILSEQ] +5CFDEF FDEF [Trivial][ILSEQ] +5CFDF9 FDF9 [Trivial][ILSEQ] +5CFDFA FDFA [Trivial][ILSEQ] +5CFDFC FDFC [Trivial][ILSEQ] +5CFDFD FDFD [Trivial][ILSEQ] +5CFDFE FDFE [Trivial][ILSEQ] +5CFDFF FDFF [Trivial][ILSEQ] +5CFE00 FE00 [Trivial][ILSEQ] +5CFE08 FE08 [Trivial][ILSEQ] +5CFE09 FE09 [Trivial][ILSEQ] +5CFE0A FE0A [Trivial][ILSEQ] +5CFE0D FE0D [Trivial][ILSEQ] +5CFE1A FE1A [Trivial][ILSEQ] +5CFE22 FE22 [Trivial][ILSEQ] +5CFE25 FE25 [Trivial][ILSEQ] +5CFE27 NULL [SyntErr] +5CFE30 FE30 [Trivial][ILSEQ] +5CFE3F FE3F [Trivial][ILSEQ] +5CFE40 FE40 [Trivial][ILSEQ] +5CFE5A FE5A [Trivial][ILSEQ] +5CFE5C NULL [SyntErr] +5CFE5F FE5F [Trivial][ILSEQ] +5CFE61 FE61 [Trivial][ILSEQ] +5CFE62 FE62 [Trivial][ILSEQ] +5CFE6E FE6E [Trivial][ILSEQ] +5CFE72 FE72 [Trivial][ILSEQ] +5CFE74 FE74 [Trivial][ILSEQ] +5CFE7E FE7E [Trivial][ILSEQ] +5CFE7F FE7F [Trivial][ILSEQ] +5CFE80 FE80 [Trivial][ILSEQ] +5CFE81 FE81 [Trivial][ILSEQ] +5CFE9F FE9F [Trivial][ILSEQ] +5CFEA0 FEA0 [Trivial][ILSEQ] +5CFEA1 FEA1 [Trivial][ILSEQ] +5CFEE0 FEE0 [Trivial][ILSEQ] +5CFEEF FEEF [Trivial][ILSEQ] +5CFEF9 FEF9 [Trivial][ILSEQ] +5CFEFA FEFA [Trivial][ILSEQ] +5CFEFC FEFC [Trivial][ILSEQ] +5CFEFD FEFD [Trivial][ILSEQ] +5CFEFE FEFE [Trivial][ILSEQ] +5CFEFF FEFF [Trivial][ILSEQ] +5CFF00 FF00 [Trivial][ILSEQ] +5CFF08 FF08 [Trivial][ILSEQ] +5CFF09 FF09 [Trivial][ILSEQ] +5CFF0A FF0A [Trivial][ILSEQ] +5CFF0D FF0D [Trivial][ILSEQ] +5CFF1A FF1A [Trivial][ILSEQ] +5CFF22 FF22 [Trivial][ILSEQ] +5CFF25 FF25 [Trivial][ILSEQ] +5CFF27 NULL [SyntErr] +5CFF30 FF30 [Trivial][ILSEQ] +5CFF3F FF3F [Trivial][ILSEQ] +5CFF40 FF40 [Trivial][ILSEQ] +5CFF5A FF5A [Trivial][ILSEQ] +5CFF5C NULL [SyntErr] +5CFF5F FF5F [Trivial][ILSEQ] +5CFF61 FF61 [Trivial][ILSEQ] +5CFF62 FF62 [Trivial][ILSEQ] +5CFF6E FF6E [Trivial][ILSEQ] +5CFF72 FF72 [Trivial][ILSEQ] +5CFF74 FF74 [Trivial][ILSEQ] +5CFF7E FF7E [Trivial][ILSEQ] +5CFF7F FF7F [Trivial][ILSEQ] +5CFF80 FF80 [Trivial][ILSEQ] +5CFF81 FF81 [Trivial][ILSEQ] +5CFF9F FF9F [Trivial][ILSEQ] +5CFFA0 FFA0 [Trivial][ILSEQ] +5CFFA1 FFA1 [Trivial][ILSEQ] +5CFFE0 FFE0 [Trivial][ILSEQ] +5CFFEF FFEF [Trivial][ILSEQ] +5CFFF9 FFF9 [Trivial][ILSEQ] +5CFFFA FFFA [Trivial][ILSEQ] +5CFFFC FFFC [Trivial][ILSEQ] +5CFFFD FFFD [Trivial][ILSEQ] +5CFFFE FFFE [Trivial][ILSEQ] +5CFFFF FFFF [Trivial][ILSEQ] +5C005C00 0000 [Trivial] +5C005C08 0008 [Trivial] +5C005C09 0009 [Trivial] +5C005C0A 000A [Trivial] +5C005C0D 000D [Trivial] +5C005C1A 001A [Trivial] +5C005C22 0022 [Trivial] +5C005C25 005C25 [Regular] +5C005C27 0027 [Trivial] +5C005C30 0000 [Regular] +5C005C3F 003F [Trivial] +5C005C40 0040 [Trivial] +5C005C5A 001A [Regular] +5C005C5C 005C [Regular] +5C005C5F 005C5F [Regular] +5C005C61 0061 [Trivial] +5C005C62 0008 [Regular] +5C005C6E 000A [Regular] +5C005C72 000D [Regular] +5C005C74 0009 [Regular] +5C005C7E 007E [Trivial] +5C005C7F 007F [Trivial] +5C005C80 0080 [Trivial][ILSEQ] +5C005C81 0081 [Trivial][ILSEQ] +5C005C9F 009F [Trivial][ILSEQ] +5C005CA0 00A0 [Trivial][ILSEQ] +5C005CA1 00A1 [Trivial] +5C005CE0 00E0 [Trivial][ILSEQ] +5C005CEF 00EF [Trivial][ILSEQ] +5C005CF9 00F9 [Trivial][ILSEQ] +5C005CFA 00FA [Trivial][ILSEQ] +5C005CFC 00FC [Trivial][ILSEQ] +5C005CFD 00FD [Trivial][ILSEQ] +5C005CFE 00FE [Trivial][ILSEQ] +5C005CFF 00FF [Trivial][ILSEQ] +5C085C00 0800 [Trivial] +5C085C08 0808 [Trivial] +5C085C09 0809 [Trivial] +5C085C0A 080A [Trivial] +5C085C0D 080D [Trivial] +5C085C1A 081A [Trivial] +5C085C22 0822 [Trivial] +5C085C25 085C25 [Regular] +5C085C27 0827 [Trivial] +5C085C30 0800 [Regular] +5C085C3F 083F [Trivial] +5C085C40 0840 [Trivial] +5C085C5A 081A [Regular] +5C085C5C 085C [Regular] +5C085C5F 085C5F [Regular] +5C085C61 0861 [Trivial] +5C085C62 0808 [Regular] +5C085C6E 080A [Regular] +5C085C72 080D [Regular] +5C085C74 0809 [Regular] +5C085C7E 087E [Trivial] +5C085C7F 087F [Trivial] +5C085C80 0880 [Trivial][ILSEQ] +5C085C81 0881 [Trivial][ILSEQ] +5C085C9F 089F [Trivial][ILSEQ] +5C085CA0 08A0 [Trivial][ILSEQ] +5C085CA1 08A1 [Trivial] +5C085CE0 08E0 [Trivial][ILSEQ] +5C085CEF 08EF [Trivial][ILSEQ] +5C085CF9 08F9 [Trivial][ILSEQ] +5C085CFA 08FA [Trivial][ILSEQ] +5C085CFC 08FC [Trivial][ILSEQ] +5C085CFD 08FD [Trivial][ILSEQ] +5C085CFE 08FE [Trivial][ILSEQ] +5C085CFF 08FF [Trivial][ILSEQ] +5C095C00 0900 [Trivial] +5C095C08 0908 [Trivial] +5C095C09 0909 [Trivial] +5C095C0A 090A [Trivial] +5C095C0D 090D [Trivial] +5C095C1A 091A [Trivial] +5C095C22 0922 [Trivial] +5C095C25 095C25 [Regular] +5C095C27 0927 [Trivial] +5C095C30 0900 [Regular] +5C095C3F 093F [Trivial] +5C095C40 0940 [Trivial] +5C095C5A 091A [Regular] +5C095C5C 095C [Regular] +5C095C5F 095C5F [Regular] +5C095C61 0961 [Trivial] +5C095C62 0908 [Regular] +5C095C6E 090A [Regular] +5C095C72 090D [Regular] +5C095C74 0909 [Regular] +5C095C7E 097E [Trivial] +5C095C7F 097F [Trivial] +5C095C80 0980 [Trivial][ILSEQ] +5C095C81 0981 [Trivial][ILSEQ] +5C095C9F 099F [Trivial][ILSEQ] +5C095CA0 09A0 [Trivial][ILSEQ] +5C095CA1 09A1 [Trivial] +5C095CE0 09E0 [Trivial][ILSEQ] +5C095CEF 09EF [Trivial][ILSEQ] +5C095CF9 09F9 [Trivial][ILSEQ] +5C095CFA 09FA [Trivial][ILSEQ] +5C095CFC 09FC [Trivial][ILSEQ] +5C095CFD 09FD [Trivial][ILSEQ] +5C095CFE 09FE [Trivial][ILSEQ] +5C095CFF 09FF [Trivial][ILSEQ] +5C0A5C00 0A00 [Trivial] +5C0A5C08 0A08 [Trivial] +5C0A5C09 0A09 [Trivial] +5C0A5C0A 0A0A [Trivial] +5C0A5C0D 0A0D [Trivial] +5C0A5C1A 0A1A [Trivial] +5C0A5C22 0A22 [Trivial] +5C0A5C25 0A5C25 [Regular] +5C0A5C27 0A27 [Trivial] +5C0A5C30 0A00 [Regular] +5C0A5C3F 0A3F [Trivial] +5C0A5C40 0A40 [Trivial] +5C0A5C5A 0A1A [Regular] +5C0A5C5C 0A5C [Regular] +5C0A5C5F 0A5C5F [Regular] +5C0A5C61 0A61 [Trivial] +5C0A5C62 0A08 [Regular] +5C0A5C6E 0A0A [Regular] +5C0A5C72 0A0D [Regular] +5C0A5C74 0A09 [Regular] +5C0A5C7E 0A7E [Trivial] +5C0A5C7F 0A7F [Trivial] +5C0A5C80 0A80 [Trivial][ILSEQ] +5C0A5C81 0A81 [Trivial][ILSEQ] +5C0A5C9F 0A9F [Trivial][ILSEQ] +5C0A5CA0 0AA0 [Trivial][ILSEQ] +5C0A5CA1 0AA1 [Trivial] +5C0A5CE0 0AE0 [Trivial][ILSEQ] +5C0A5CEF 0AEF [Trivial][ILSEQ] +5C0A5CF9 0AF9 [Trivial][ILSEQ] +5C0A5CFA 0AFA [Trivial][ILSEQ] +5C0A5CFC 0AFC [Trivial][ILSEQ] +5C0A5CFD 0AFD [Trivial][ILSEQ] +5C0A5CFE 0AFE [Trivial][ILSEQ] +5C0A5CFF 0AFF [Trivial][ILSEQ] +5C0D5C00 0D00 [Trivial] +5C0D5C08 0D08 [Trivial] +5C0D5C09 0D09 [Trivial] +5C0D5C0A 0D0A [Trivial] +5C0D5C0D 0D0D [Trivial] +5C0D5C1A 0D1A [Trivial] +5C0D5C22 0D22 [Trivial] +5C0D5C25 0D5C25 [Regular] +5C0D5C27 0D27 [Trivial] +5C0D5C30 0D00 [Regular] +5C0D5C3F 0D3F [Trivial] +5C0D5C40 0D40 [Trivial] +5C0D5C5A 0D1A [Regular] +5C0D5C5C 0D5C [Regular] +5C0D5C5F 0D5C5F [Regular] +5C0D5C61 0D61 [Trivial] +5C0D5C62 0D08 [Regular] +5C0D5C6E 0D0A [Regular] +5C0D5C72 0D0D [Regular] +5C0D5C74 0D09 [Regular] +5C0D5C7E 0D7E [Trivial] +5C0D5C7F 0D7F [Trivial] +5C0D5C80 0D80 [Trivial][ILSEQ] +5C0D5C81 0D81 [Trivial][ILSEQ] +5C0D5C9F 0D9F [Trivial][ILSEQ] +5C0D5CA0 0DA0 [Trivial][ILSEQ] +5C0D5CA1 0DA1 [Trivial] +5C0D5CE0 0DE0 [Trivial][ILSEQ] +5C0D5CEF 0DEF [Trivial][ILSEQ] +5C0D5CF9 0DF9 [Trivial][ILSEQ] +5C0D5CFA 0DFA [Trivial][ILSEQ] +5C0D5CFC 0DFC [Trivial][ILSEQ] +5C0D5CFD 0DFD [Trivial][ILSEQ] +5C0D5CFE 0DFE [Trivial][ILSEQ] +5C0D5CFF 0DFF [Trivial][ILSEQ] +5C1A5C00 1A00 [Trivial] +5C1A5C08 1A08 [Trivial] +5C1A5C09 1A09 [Trivial] +5C1A5C0A 1A0A [Trivial] +5C1A5C0D 1A0D [Trivial] +5C1A5C1A 1A1A [Trivial] +5C1A5C22 1A22 [Trivial] +5C1A5C25 1A5C25 [Regular] +5C1A5C27 1A27 [Trivial] +5C1A5C30 1A00 [Regular] +5C1A5C3F 1A3F [Trivial] +5C1A5C40 1A40 [Trivial] +5C1A5C5A 1A1A [Regular] +5C1A5C5C 1A5C [Regular] +5C1A5C5F 1A5C5F [Regular] +5C1A5C61 1A61 [Trivial] +5C1A5C62 1A08 [Regular] +5C1A5C6E 1A0A [Regular] +5C1A5C72 1A0D [Regular] +5C1A5C74 1A09 [Regular] +5C1A5C7E 1A7E [Trivial] +5C1A5C7F 1A7F [Trivial] +5C1A5C80 1A80 [Trivial][ILSEQ] +5C1A5C81 1A81 [Trivial][ILSEQ] +5C1A5C9F 1A9F [Trivial][ILSEQ] +5C1A5CA0 1AA0 [Trivial][ILSEQ] +5C1A5CA1 1AA1 [Trivial] +5C1A5CE0 1AE0 [Trivial][ILSEQ] +5C1A5CEF 1AEF [Trivial][ILSEQ] +5C1A5CF9 1AF9 [Trivial][ILSEQ] +5C1A5CFA 1AFA [Trivial][ILSEQ] +5C1A5CFC 1AFC [Trivial][ILSEQ] +5C1A5CFD 1AFD [Trivial][ILSEQ] +5C1A5CFE 1AFE [Trivial][ILSEQ] +5C1A5CFF 1AFF [Trivial][ILSEQ] +5C225C00 2200 [Trivial] +5C225C08 2208 [Trivial] +5C225C09 2209 [Trivial] +5C225C0A 220A [Trivial] +5C225C0D 220D [Trivial] +5C225C1A 221A [Trivial] +5C225C22 2222 [Trivial] +5C225C25 225C25 [Regular] +5C225C27 2227 [Trivial] +5C225C30 2200 [Regular] +5C225C3F 223F [Trivial] +5C225C40 2240 [Trivial] +5C225C5A 221A [Regular] +5C225C5C 225C [Regular] +5C225C5F 225C5F [Regular] +5C225C61 2261 [Trivial] +5C225C62 2208 [Regular] +5C225C6E 220A [Regular] +5C225C72 220D [Regular] +5C225C74 2209 [Regular] +5C225C7E 227E [Trivial] +5C225C7F 227F [Trivial] +5C225C80 2280 [Trivial][ILSEQ] +5C225C81 2281 [Trivial][ILSEQ] +5C225C9F 229F [Trivial][ILSEQ] +5C225CA0 22A0 [Trivial][ILSEQ] +5C225CA1 22A1 [Trivial] +5C225CE0 22E0 [Trivial][ILSEQ] +5C225CEF 22EF [Trivial][ILSEQ] +5C225CF9 22F9 [Trivial][ILSEQ] +5C225CFA 22FA [Trivial][ILSEQ] +5C225CFC 22FC [Trivial][ILSEQ] +5C225CFD 22FD [Trivial][ILSEQ] +5C225CFE 22FE [Trivial][ILSEQ] +5C225CFF 22FF [Trivial][ILSEQ] +5C255C00 5C2500 [Regular] +5C255C08 5C2508 [Regular] +5C255C09 5C2509 [Regular] +5C255C0A 5C250A [Regular] +5C255C0D 5C250D [Regular] +5C255C1A 5C251A [Regular] +5C255C22 5C2522 [Regular] +5C255C25 5C255C25 [Preserve][LIKE] +5C255C27 5C2527 [Regular] +5C255C30 5C2500 [Regular] +5C255C3F 5C253F [Regular] +5C255C40 5C2540 [Regular] +5C255C5A 5C251A [Regular] +5C255C5C 5C255C [Regular] +5C255C5F 5C255C5F [Preserve][LIKE] +5C255C61 5C2561 [Regular] +5C255C62 5C2508 [Regular] +5C255C6E 5C250A [Regular] +5C255C72 5C250D [Regular] +5C255C74 5C2509 [Regular] +5C255C7E 5C257E [Regular] +5C255C7F 5C257F [Regular] +5C255C80 5C2580 [Regular][ILSEQ] +5C255C81 5C2581 [Regular][ILSEQ] +5C255C9F 5C259F [Regular][ILSEQ] +5C255CA0 5C25A0 [Regular][ILSEQ] +5C255CA1 5C25A1 [Regular] +5C255CE0 5C25E0 [Regular][ILSEQ] +5C255CEF 5C25EF [Regular][ILSEQ] +5C255CF9 5C25F9 [Regular][ILSEQ] +5C255CFA 5C25FA [Regular][ILSEQ] +5C255CFC 5C25FC [Regular][ILSEQ] +5C255CFD 5C25FD [Regular][ILSEQ] +5C255CFE 5C25FE [Regular][ILSEQ] +5C255CFF 5C25FF [Regular][ILSEQ] +5C275C00 2700 [Trivial] +5C275C08 2708 [Trivial] +5C275C09 2709 [Trivial] +5C275C0A 270A [Trivial] +5C275C0D 270D [Trivial] +5C275C1A 271A [Trivial] +5C275C22 2722 [Trivial] +5C275C25 275C25 [Regular] +5C275C27 2727 [Trivial] +5C275C30 2700 [Regular] +5C275C3F 273F [Trivial] +5C275C40 2740 [Trivial] +5C275C5A 271A [Regular] +5C275C5C 275C [Regular] +5C275C5F 275C5F [Regular] +5C275C61 2761 [Trivial] +5C275C62 2708 [Regular] +5C275C6E 270A [Regular] +5C275C72 270D [Regular] +5C275C74 2709 [Regular] +5C275C7E 277E [Trivial] +5C275C7F 277F [Trivial] +5C275C80 2780 [Trivial][ILSEQ] +5C275C81 2781 [Trivial][ILSEQ] +5C275C9F 279F [Trivial][ILSEQ] +5C275CA0 27A0 [Trivial][ILSEQ] +5C275CA1 27A1 [Trivial] +5C275CE0 27E0 [Trivial][ILSEQ] +5C275CEF 27EF [Trivial][ILSEQ] +5C275CF9 27F9 [Trivial][ILSEQ] +5C275CFA 27FA [Trivial][ILSEQ] +5C275CFC 27FC [Trivial][ILSEQ] +5C275CFD 27FD [Trivial][ILSEQ] +5C275CFE 27FE [Trivial][ILSEQ] +5C275CFF 27FF [Trivial][ILSEQ] +5C305C00 0000 [Regular] +5C305C08 0008 [Regular] +5C305C09 0009 [Regular] +5C305C0A 000A [Regular] +5C305C0D 000D [Regular] +5C305C1A 001A [Regular] +5C305C22 0022 [Regular] +5C305C25 005C25 [Regular] +5C305C27 0027 [Regular] +5C305C30 0000 [Regular] +5C305C3F 003F [Regular] +5C305C40 0040 [Regular] +5C305C5A 001A [Regular] +5C305C5C 005C [Regular] +5C305C5F 005C5F [Regular] +5C305C61 0061 [Regular] +5C305C62 0008 [Regular] +5C305C6E 000A [Regular] +5C305C72 000D [Regular] +5C305C74 0009 [Regular] +5C305C7E 007E [Regular] +5C305C7F 007F [Regular] +5C305C80 0080 [Regular][ILSEQ] +5C305C81 0081 [Regular][ILSEQ] +5C305C9F 009F [Regular][ILSEQ] +5C305CA0 00A0 [Regular][ILSEQ] +5C305CA1 00A1 [Regular] +5C305CE0 00E0 [Regular][ILSEQ] +5C305CEF 00EF [Regular][ILSEQ] +5C305CF9 00F9 [Regular][ILSEQ] +5C305CFA 00FA [Regular][ILSEQ] +5C305CFC 00FC [Regular][ILSEQ] +5C305CFD 00FD [Regular][ILSEQ] +5C305CFE 00FE [Regular][ILSEQ] +5C305CFF 00FF [Regular][ILSEQ] +5C3F5C00 3F00 [Trivial] +5C3F5C08 3F08 [Trivial] +5C3F5C09 3F09 [Trivial] +5C3F5C0A 3F0A [Trivial] +5C3F5C0D 3F0D [Trivial] +5C3F5C1A 3F1A [Trivial] +5C3F5C22 3F22 [Trivial] +5C3F5C25 3F5C25 [Regular] +5C3F5C27 3F27 [Trivial] +5C3F5C30 3F00 [Regular] +5C3F5C3F 3F3F [Trivial] +5C3F5C40 3F40 [Trivial] +5C3F5C5A 3F1A [Regular] +5C3F5C5C 3F5C [Regular] +5C3F5C5F 3F5C5F [Regular] +5C3F5C61 3F61 [Trivial] +5C3F5C62 3F08 [Regular] +5C3F5C6E 3F0A [Regular] +5C3F5C72 3F0D [Regular] +5C3F5C74 3F09 [Regular] +5C3F5C7E 3F7E [Trivial] +5C3F5C7F 3F7F [Trivial] +5C3F5C80 3F80 [Trivial][ILSEQ] +5C3F5C81 3F81 [Trivial][ILSEQ] +5C3F5C9F 3F9F [Trivial][ILSEQ] +5C3F5CA0 3FA0 [Trivial][ILSEQ] +5C3F5CA1 3FA1 [Trivial] +5C3F5CE0 3FE0 [Trivial][ILSEQ] +5C3F5CEF 3FEF [Trivial][ILSEQ] +5C3F5CF9 3FF9 [Trivial][ILSEQ] +5C3F5CFA 3FFA [Trivial][ILSEQ] +5C3F5CFC 3FFC [Trivial][ILSEQ] +5C3F5CFD 3FFD [Trivial][ILSEQ] +5C3F5CFE 3FFE [Trivial][ILSEQ] +5C3F5CFF 3FFF [Trivial][ILSEQ] +5C405C00 4000 [Trivial] +5C405C08 4008 [Trivial] +5C405C09 4009 [Trivial] +5C405C0A 400A [Trivial] +5C405C0D 400D [Trivial] +5C405C1A 401A [Trivial] +5C405C22 4022 [Trivial] +5C405C25 405C25 [Regular] +5C405C27 4027 [Trivial] +5C405C30 4000 [Regular] +5C405C3F 403F [Trivial] +5C405C40 4040 [Trivial] +5C405C5A 401A [Regular] +5C405C5C 405C [Regular] +5C405C5F 405C5F [Regular] +5C405C61 4061 [Trivial] +5C405C62 4008 [Regular] +5C405C6E 400A [Regular] +5C405C72 400D [Regular] +5C405C74 4009 [Regular] +5C405C7E 407E [Trivial] +5C405C7F 407F [Trivial] +5C405C80 4080 [Trivial][ILSEQ] +5C405C81 4081 [Trivial][ILSEQ] +5C405C9F 409F [Trivial][ILSEQ] +5C405CA0 40A0 [Trivial][ILSEQ] +5C405CA1 40A1 [Trivial] +5C405CE0 40E0 [Trivial][ILSEQ] +5C405CEF 40EF [Trivial][ILSEQ] +5C405CF9 40F9 [Trivial][ILSEQ] +5C405CFA 40FA [Trivial][ILSEQ] +5C405CFC 40FC [Trivial][ILSEQ] +5C405CFD 40FD [Trivial][ILSEQ] +5C405CFE 40FE [Trivial][ILSEQ] +5C405CFF 40FF [Trivial][ILSEQ] +5C5A5C00 1A00 [Regular] +5C5A5C08 1A08 [Regular] +5C5A5C09 1A09 [Regular] +5C5A5C0A 1A0A [Regular] +5C5A5C0D 1A0D [Regular] +5C5A5C1A 1A1A [Regular] +5C5A5C22 1A22 [Regular] +5C5A5C25 1A5C25 [Regular] +5C5A5C27 1A27 [Regular] +5C5A5C30 1A00 [Regular] +5C5A5C3F 1A3F [Regular] +5C5A5C40 1A40 [Regular] +5C5A5C5A 1A1A [Regular] +5C5A5C5C 1A5C [Regular] +5C5A5C5F 1A5C5F [Regular] +5C5A5C61 1A61 [Regular] +5C5A5C62 1A08 [Regular] +5C5A5C6E 1A0A [Regular] +5C5A5C72 1A0D [Regular] +5C5A5C74 1A09 [Regular] +5C5A5C7E 1A7E [Regular] +5C5A5C7F 1A7F [Regular] +5C5A5C80 1A80 [Regular][ILSEQ] +5C5A5C81 1A81 [Regular][ILSEQ] +5C5A5C9F 1A9F [Regular][ILSEQ] +5C5A5CA0 1AA0 [Regular][ILSEQ] +5C5A5CA1 1AA1 [Regular] +5C5A5CE0 1AE0 [Regular][ILSEQ] +5C5A5CEF 1AEF [Regular][ILSEQ] +5C5A5CF9 1AF9 [Regular][ILSEQ] +5C5A5CFA 1AFA [Regular][ILSEQ] +5C5A5CFC 1AFC [Regular][ILSEQ] +5C5A5CFD 1AFD [Regular][ILSEQ] +5C5A5CFE 1AFE [Regular][ILSEQ] +5C5A5CFF 1AFF [Regular][ILSEQ] +5C5C5C00 5C00 [Regular] +5C5C5C08 5C08 [Regular] +5C5C5C09 5C09 [Regular] +5C5C5C0A 5C0A [Regular] +5C5C5C0D 5C0D [Regular] +5C5C5C1A 5C1A [Regular] +5C5C5C22 5C22 [Regular] +5C5C5C25 5C5C25 [Regular] +5C5C5C27 5C27 [Regular] +5C5C5C30 5C00 [Regular] +5C5C5C3F 5C3F [Regular] +5C5C5C40 5C40 [Regular] +5C5C5C5A 5C1A [Regular] +5C5C5C5C 5C5C [Regular] +5C5C5C5F 5C5C5F [Regular] +5C5C5C61 5C61 [Regular] +5C5C5C62 5C08 [Regular] +5C5C5C6E 5C0A [Regular] +5C5C5C72 5C0D [Regular] +5C5C5C74 5C09 [Regular] +5C5C5C7E 5C7E [Regular] +5C5C5C7F 5C7F [Regular] +5C5C5C80 5C80 [Regular][ILSEQ] +5C5C5C81 5C81 [Regular][ILSEQ] +5C5C5C9F 5C9F [Regular][ILSEQ] +5C5C5CA0 5CA0 [Regular][ILSEQ] +5C5C5CA1 5CA1 [Regular] +5C5C5CE0 5CE0 [Regular][ILSEQ] +5C5C5CEF 5CEF [Regular][ILSEQ] +5C5C5CF9 5CF9 [Regular][ILSEQ] +5C5C5CFA 5CFA [Regular][ILSEQ] +5C5C5CFC 5CFC [Regular][ILSEQ] +5C5C5CFD 5CFD [Regular][ILSEQ] +5C5C5CFE 5CFE [Regular][ILSEQ] +5C5C5CFF 5CFF [Regular][ILSEQ] +5C5F5C00 5C5F00 [Regular] +5C5F5C08 5C5F08 [Regular] +5C5F5C09 5C5F09 [Regular] +5C5F5C0A 5C5F0A [Regular] +5C5F5C0D 5C5F0D [Regular] +5C5F5C1A 5C5F1A [Regular] +5C5F5C22 5C5F22 [Regular] +5C5F5C25 5C5F5C25 [Preserve][LIKE] +5C5F5C27 5C5F27 [Regular] +5C5F5C30 5C5F00 [Regular] +5C5F5C3F 5C5F3F [Regular] +5C5F5C40 5C5F40 [Regular] +5C5F5C5A 5C5F1A [Regular] +5C5F5C5C 5C5F5C [Regular] +5C5F5C5F 5C5F5C5F [Preserve][LIKE] +5C5F5C61 5C5F61 [Regular] +5C5F5C62 5C5F08 [Regular] +5C5F5C6E 5C5F0A [Regular] +5C5F5C72 5C5F0D [Regular] +5C5F5C74 5C5F09 [Regular] +5C5F5C7E 5C5F7E [Regular] +5C5F5C7F 5C5F7F [Regular] +5C5F5C80 5C5F80 [Regular][ILSEQ] +5C5F5C81 5C5F81 [Regular][ILSEQ] +5C5F5C9F 5C5F9F [Regular][ILSEQ] +5C5F5CA0 5C5FA0 [Regular][ILSEQ] +5C5F5CA1 5C5FA1 [Regular] +5C5F5CE0 5C5FE0 [Regular][ILSEQ] +5C5F5CEF 5C5FEF [Regular][ILSEQ] +5C5F5CF9 5C5FF9 [Regular][ILSEQ] +5C5F5CFA 5C5FFA [Regular][ILSEQ] +5C5F5CFC 5C5FFC [Regular][ILSEQ] +5C5F5CFD 5C5FFD [Regular][ILSEQ] +5C5F5CFE 5C5FFE [Regular][ILSEQ] +5C5F5CFF 5C5FFF [Regular][ILSEQ] +5C615C00 6100 [Trivial] +5C615C08 6108 [Trivial] +5C615C09 6109 [Trivial] +5C615C0A 610A [Trivial] +5C615C0D 610D [Trivial] +5C615C1A 611A [Trivial] +5C615C22 6122 [Trivial] +5C615C25 615C25 [Regular] +5C615C27 6127 [Trivial] +5C615C30 6100 [Regular] +5C615C3F 613F [Trivial] +5C615C40 6140 [Trivial] +5C615C5A 611A [Regular] +5C615C5C 615C [Regular] +5C615C5F 615C5F [Regular] +5C615C61 6161 [Trivial] +5C615C62 6108 [Regular] +5C615C6E 610A [Regular] +5C615C72 610D [Regular] +5C615C74 6109 [Regular] +5C615C7E 617E [Trivial] +5C615C7F 617F [Trivial] +5C615C80 6180 [Trivial][ILSEQ] +5C615C81 6181 [Trivial][ILSEQ] +5C615C9F 619F [Trivial][ILSEQ] +5C615CA0 61A0 [Trivial][ILSEQ] +5C615CA1 61A1 [Trivial] +5C615CE0 61E0 [Trivial][ILSEQ] +5C615CEF 61EF [Trivial][ILSEQ] +5C615CF9 61F9 [Trivial][ILSEQ] +5C615CFA 61FA [Trivial][ILSEQ] +5C615CFC 61FC [Trivial][ILSEQ] +5C615CFD 61FD [Trivial][ILSEQ] +5C615CFE 61FE [Trivial][ILSEQ] +5C615CFF 61FF [Trivial][ILSEQ] +5C625C00 0800 [Regular] +5C625C08 0808 [Regular] +5C625C09 0809 [Regular] +5C625C0A 080A [Regular] +5C625C0D 080D [Regular] +5C625C1A 081A [Regular] +5C625C22 0822 [Regular] +5C625C25 085C25 [Regular] +5C625C27 0827 [Regular] +5C625C30 0800 [Regular] +5C625C3F 083F [Regular] +5C625C40 0840 [Regular] +5C625C5A 081A [Regular] +5C625C5C 085C [Regular] +5C625C5F 085C5F [Regular] +5C625C61 0861 [Regular] +5C625C62 0808 [Regular] +5C625C6E 080A [Regular] +5C625C72 080D [Regular] +5C625C74 0809 [Regular] +5C625C7E 087E [Regular] +5C625C7F 087F [Regular] +5C625C80 0880 [Regular][ILSEQ] +5C625C81 0881 [Regular][ILSEQ] +5C625C9F 089F [Regular][ILSEQ] +5C625CA0 08A0 [Regular][ILSEQ] +5C625CA1 08A1 [Regular] +5C625CE0 08E0 [Regular][ILSEQ] +5C625CEF 08EF [Regular][ILSEQ] +5C625CF9 08F9 [Regular][ILSEQ] +5C625CFA 08FA [Regular][ILSEQ] +5C625CFC 08FC [Regular][ILSEQ] +5C625CFD 08FD [Regular][ILSEQ] +5C625CFE 08FE [Regular][ILSEQ] +5C625CFF 08FF [Regular][ILSEQ] +5C6E5C00 0A00 [Regular] +5C6E5C08 0A08 [Regular] +5C6E5C09 0A09 [Regular] +5C6E5C0A 0A0A [Regular] +5C6E5C0D 0A0D [Regular] +5C6E5C1A 0A1A [Regular] +5C6E5C22 0A22 [Regular] +5C6E5C25 0A5C25 [Regular] +5C6E5C27 0A27 [Regular] +5C6E5C30 0A00 [Regular] +5C6E5C3F 0A3F [Regular] +5C6E5C40 0A40 [Regular] +5C6E5C5A 0A1A [Regular] +5C6E5C5C 0A5C [Regular] +5C6E5C5F 0A5C5F [Regular] +5C6E5C61 0A61 [Regular] +5C6E5C62 0A08 [Regular] +5C6E5C6E 0A0A [Regular] +5C6E5C72 0A0D [Regular] +5C6E5C74 0A09 [Regular] +5C6E5C7E 0A7E [Regular] +5C6E5C7F 0A7F [Regular] +5C6E5C80 0A80 [Regular][ILSEQ] +5C6E5C81 0A81 [Regular][ILSEQ] +5C6E5C9F 0A9F [Regular][ILSEQ] +5C6E5CA0 0AA0 [Regular][ILSEQ] +5C6E5CA1 0AA1 [Regular] +5C6E5CE0 0AE0 [Regular][ILSEQ] +5C6E5CEF 0AEF [Regular][ILSEQ] +5C6E5CF9 0AF9 [Regular][ILSEQ] +5C6E5CFA 0AFA [Regular][ILSEQ] +5C6E5CFC 0AFC [Regular][ILSEQ] +5C6E5CFD 0AFD [Regular][ILSEQ] +5C6E5CFE 0AFE [Regular][ILSEQ] +5C6E5CFF 0AFF [Regular][ILSEQ] +5C725C00 0D00 [Regular] +5C725C08 0D08 [Regular] +5C725C09 0D09 [Regular] +5C725C0A 0D0A [Regular] +5C725C0D 0D0D [Regular] +5C725C1A 0D1A [Regular] +5C725C22 0D22 [Regular] +5C725C25 0D5C25 [Regular] +5C725C27 0D27 [Regular] +5C725C30 0D00 [Regular] +5C725C3F 0D3F [Regular] +5C725C40 0D40 [Regular] +5C725C5A 0D1A [Regular] +5C725C5C 0D5C [Regular] +5C725C5F 0D5C5F [Regular] +5C725C61 0D61 [Regular] +5C725C62 0D08 [Regular] +5C725C6E 0D0A [Regular] +5C725C72 0D0D [Regular] +5C725C74 0D09 [Regular] +5C725C7E 0D7E [Regular] +5C725C7F 0D7F [Regular] +5C725C80 0D80 [Regular][ILSEQ] +5C725C81 0D81 [Regular][ILSEQ] +5C725C9F 0D9F [Regular][ILSEQ] +5C725CA0 0DA0 [Regular][ILSEQ] +5C725CA1 0DA1 [Regular] +5C725CE0 0DE0 [Regular][ILSEQ] +5C725CEF 0DEF [Regular][ILSEQ] +5C725CF9 0DF9 [Regular][ILSEQ] +5C725CFA 0DFA [Regular][ILSEQ] +5C725CFC 0DFC [Regular][ILSEQ] +5C725CFD 0DFD [Regular][ILSEQ] +5C725CFE 0DFE [Regular][ILSEQ] +5C725CFF 0DFF [Regular][ILSEQ] +5C745C00 0900 [Regular] +5C745C08 0908 [Regular] +5C745C09 0909 [Regular] +5C745C0A 090A [Regular] +5C745C0D 090D [Regular] +5C745C1A 091A [Regular] +5C745C22 0922 [Regular] +5C745C25 095C25 [Regular] +5C745C27 0927 [Regular] +5C745C30 0900 [Regular] +5C745C3F 093F [Regular] +5C745C40 0940 [Regular] +5C745C5A 091A [Regular] +5C745C5C 095C [Regular] +5C745C5F 095C5F [Regular] +5C745C61 0961 [Regular] +5C745C62 0908 [Regular] +5C745C6E 090A [Regular] +5C745C72 090D [Regular] +5C745C74 0909 [Regular] +5C745C7E 097E [Regular] +5C745C7F 097F [Regular] +5C745C80 0980 [Regular][ILSEQ] +5C745C81 0981 [Regular][ILSEQ] +5C745C9F 099F [Regular][ILSEQ] +5C745CA0 09A0 [Regular][ILSEQ] +5C745CA1 09A1 [Regular] +5C745CE0 09E0 [Regular][ILSEQ] +5C745CEF 09EF [Regular][ILSEQ] +5C745CF9 09F9 [Regular][ILSEQ] +5C745CFA 09FA [Regular][ILSEQ] +5C745CFC 09FC [Regular][ILSEQ] +5C745CFD 09FD [Regular][ILSEQ] +5C745CFE 09FE [Regular][ILSEQ] +5C745CFF 09FF [Regular][ILSEQ] +5C7E5C00 7E00 [Trivial] +5C7E5C08 7E08 [Trivial] +5C7E5C09 7E09 [Trivial] +5C7E5C0A 7E0A [Trivial] +5C7E5C0D 7E0D [Trivial] +5C7E5C1A 7E1A [Trivial] +5C7E5C22 7E22 [Trivial] +5C7E5C25 7E5C25 [Regular] +5C7E5C27 7E27 [Trivial] +5C7E5C30 7E00 [Regular] +5C7E5C3F 7E3F [Trivial] +5C7E5C40 7E40 [Trivial] +5C7E5C5A 7E1A [Regular] +5C7E5C5C 7E5C [Regular] +5C7E5C5F 7E5C5F [Regular] +5C7E5C61 7E61 [Trivial] +5C7E5C62 7E08 [Regular] +5C7E5C6E 7E0A [Regular] +5C7E5C72 7E0D [Regular] +5C7E5C74 7E09 [Regular] +5C7E5C7E 7E7E [Trivial] +5C7E5C7F 7E7F [Trivial] +5C7E5C80 7E80 [Trivial][ILSEQ] +5C7E5C81 7E81 [Trivial][ILSEQ] +5C7E5C9F 7E9F [Trivial][ILSEQ] +5C7E5CA0 7EA0 [Trivial][ILSEQ] +5C7E5CA1 7EA1 [Trivial] +5C7E5CE0 7EE0 [Trivial][ILSEQ] +5C7E5CEF 7EEF [Trivial][ILSEQ] +5C7E5CF9 7EF9 [Trivial][ILSEQ] +5C7E5CFA 7EFA [Trivial][ILSEQ] +5C7E5CFC 7EFC [Trivial][ILSEQ] +5C7E5CFD 7EFD [Trivial][ILSEQ] +5C7E5CFE 7EFE [Trivial][ILSEQ] +5C7E5CFF 7EFF [Trivial][ILSEQ] +5C7F5C00 7F00 [Trivial] +5C7F5C08 7F08 [Trivial] +5C7F5C09 7F09 [Trivial] +5C7F5C0A 7F0A [Trivial] +5C7F5C0D 7F0D [Trivial] +5C7F5C1A 7F1A [Trivial] +5C7F5C22 7F22 [Trivial] +5C7F5C25 7F5C25 [Regular] +5C7F5C27 7F27 [Trivial] +5C7F5C30 7F00 [Regular] +5C7F5C3F 7F3F [Trivial] +5C7F5C40 7F40 [Trivial] +5C7F5C5A 7F1A [Regular] +5C7F5C5C 7F5C [Regular] +5C7F5C5F 7F5C5F [Regular] +5C7F5C61 7F61 [Trivial] +5C7F5C62 7F08 [Regular] +5C7F5C6E 7F0A [Regular] +5C7F5C72 7F0D [Regular] +5C7F5C74 7F09 [Regular] +5C7F5C7E 7F7E [Trivial] +5C7F5C7F 7F7F [Trivial] +5C7F5C80 7F80 [Trivial][ILSEQ] +5C7F5C81 7F81 [Trivial][ILSEQ] +5C7F5C9F 7F9F [Trivial][ILSEQ] +5C7F5CA0 7FA0 [Trivial][ILSEQ] +5C7F5CA1 7FA1 [Trivial] +5C7F5CE0 7FE0 [Trivial][ILSEQ] +5C7F5CEF 7FEF [Trivial][ILSEQ] +5C7F5CF9 7FF9 [Trivial][ILSEQ] +5C7F5CFA 7FFA [Trivial][ILSEQ] +5C7F5CFC 7FFC [Trivial][ILSEQ] +5C7F5CFD 7FFD [Trivial][ILSEQ] +5C7F5CFE 7FFE [Trivial][ILSEQ] +5C7F5CFF 7FFF [Trivial][ILSEQ] +5C805C00 8000 [Trivial][ILSEQ] +5C805C08 8008 [Trivial][ILSEQ] +5C805C09 8009 [Trivial][ILSEQ] +5C805C0A 800A [Trivial][ILSEQ] +5C805C0D 800D [Trivial][ILSEQ] +5C805C1A 801A [Trivial][ILSEQ] +5C805C22 8022 [Trivial][ILSEQ] +5C805C25 805C25 [Regular][ILSEQ] +5C805C27 8027 [Trivial][ILSEQ] +5C805C30 8000 [Regular][ILSEQ] +5C805C3F 803F [Trivial][ILSEQ] +5C805C40 8040 [Trivial][ILSEQ] +5C805C5A 801A [Regular][ILSEQ] +5C805C5C 805C [Regular][ILSEQ] +5C805C5F 805C5F [Regular][ILSEQ] +5C805C61 8061 [Trivial][ILSEQ] +5C805C62 8008 [Regular][ILSEQ] +5C805C6E 800A [Regular][ILSEQ] +5C805C72 800D [Regular][ILSEQ] +5C805C74 8009 [Regular][ILSEQ] +5C805C7E 807E [Trivial][ILSEQ] +5C805C7F 807F [Trivial][ILSEQ] +5C805C80 8080 [Trivial][ILSEQ] +5C805C81 8081 [Trivial][ILSEQ] +5C805C9F 809F [Trivial][ILSEQ] +5C805CA0 80A0 [Trivial][ILSEQ] +5C805CA1 80A1 [Trivial][ILSEQ] +5C805CE0 80E0 [Trivial][ILSEQ] +5C805CEF 80EF [Trivial][ILSEQ] +5C805CF9 80F9 [Trivial][ILSEQ] +5C805CFA 80FA [Trivial][ILSEQ] +5C805CFC 80FC [Trivial][ILSEQ] +5C805CFD 80FD [Trivial][ILSEQ] +5C805CFE 80FE [Trivial][ILSEQ] +5C805CFF 80FF [Trivial][ILSEQ] +5C815C00 8100 [Trivial][BROKE] +5C815C08 8108 [Trivial][BROKE] +5C815C09 8109 [Trivial][BROKE] +5C815C0A 810A [Trivial][BROKE] +5C815C0D 810D [Trivial][BROKE] +5C815C1A 811A [Trivial][BROKE] +5C815C22 8122 [Trivial][BROKE] +5C815C25 815C25 [Regular] +5C815C27 8127 [Trivial][BROKE] +5C815C30 8100 [Regular][BROKE] +5C815C3F 813F [Trivial][BROKE] +5C815C40 8140 [Trivial][USER] +5C815C5A 811A [Regular][BROKE] +5C815C5C 815C [Regular][USER] +5C815C5F 815C5F [Regular] +5C815C61 8161 [Trivial][USER] +5C815C62 8108 [Regular][BROKE][USER] +5C815C6E 810A [Regular][BROKE] +5C815C72 810D [Regular][BROKE] +5C815C74 8109 [Regular][BROKE] +5C815C7E 817E [Trivial][USER] +5C815C7F 817F [Trivial][BROKE] +5C815C80 8180 [Trivial][FIXED][USER] +5C815C81 8181 [Trivial][FIXED][USER] +5C815C9F 819F [Trivial][FIXED][USER] +5C815CA0 81A0 [Trivial][FIXED][USER] +5C815CA1 81A1 [Trivial][USER] +5C815CE0 81E0 [Trivial][FIXED][USER] +5C815CEF 81EF [Trivial][FIXED][USER] +5C815CF9 81F9 [Trivial][FIXED][USER] +5C815CFA 81FA [Trivial][FIXED][USER] +5C815CFC 81FC [Trivial][FIXED][USER] +5C815CFD 81FD [Trivial][ILSEQ] +5C815CFE 81FE [Trivial][ILSEQ] +5C815CFF 81FF [Trivial][ILSEQ] +5C9F5C00 9F00 [Trivial][BROKE] +5C9F5C08 9F08 [Trivial][BROKE] +5C9F5C09 9F09 [Trivial][BROKE] +5C9F5C0A 9F0A [Trivial][BROKE] +5C9F5C0D 9F0D [Trivial][BROKE] +5C9F5C1A 9F1A [Trivial][BROKE] +5C9F5C22 9F22 [Trivial][BROKE] +5C9F5C25 9F5C25 [Regular] +5C9F5C27 9F27 [Trivial][BROKE] +5C9F5C30 9F00 [Regular][BROKE] +5C9F5C3F 9F3F [Trivial][BROKE] +5C9F5C40 9F40 [Trivial][USER] +5C9F5C5A 9F1A [Regular][BROKE] +5C9F5C5C 9F5C [Regular][USER] +5C9F5C5F 9F5C5F [Regular] +5C9F5C61 9F61 [Trivial][USER] +5C9F5C62 9F08 [Regular][BROKE][USER] +5C9F5C6E 9F0A [Regular][BROKE] +5C9F5C72 9F0D [Regular][BROKE] +5C9F5C74 9F09 [Regular][BROKE] +5C9F5C7E 9F7E [Trivial][USER] +5C9F5C7F 9F7F [Trivial][BROKE] +5C9F5C80 9F80 [Trivial][FIXED][USER] +5C9F5C81 9F81 [Trivial][FIXED][USER] +5C9F5C9F 9F9F [Trivial][FIXED][USER] +5C9F5CA0 9FA0 [Trivial][FIXED][USER] +5C9F5CA1 9FA1 [Trivial][USER] +5C9F5CE0 9FE0 [Trivial][FIXED][USER] +5C9F5CEF 9FEF [Trivial][FIXED][USER] +5C9F5CF9 9FF9 [Trivial][FIXED][USER] +5C9F5CFA 9FFA [Trivial][FIXED][USER] +5C9F5CFC 9FFC [Trivial][FIXED][USER] +5C9F5CFD 9FFD [Trivial][ILSEQ] +5C9F5CFE 9FFE [Trivial][ILSEQ] +5C9F5CFF 9FFF [Trivial][ILSEQ] +5CA05C00 A000 [Trivial][ILSEQ] +5CA05C08 A008 [Trivial][ILSEQ] +5CA05C09 A009 [Trivial][ILSEQ] +5CA05C0A A00A [Trivial][ILSEQ] +5CA05C0D A00D [Trivial][ILSEQ] +5CA05C1A A01A [Trivial][ILSEQ] +5CA05C22 A022 [Trivial][ILSEQ] +5CA05C25 A05C25 [Regular][ILSEQ] +5CA05C27 A027 [Trivial][ILSEQ] +5CA05C30 A000 [Regular][ILSEQ] +5CA05C3F A03F [Trivial][ILSEQ] +5CA05C40 A040 [Trivial][ILSEQ] +5CA05C5A A01A [Regular][ILSEQ] +5CA05C5C A05C [Regular][ILSEQ] +5CA05C5F A05C5F [Regular][ILSEQ] +5CA05C61 A061 [Trivial][ILSEQ] +5CA05C62 A008 [Regular][ILSEQ] +5CA05C6E A00A [Regular][ILSEQ] +5CA05C72 A00D [Regular][ILSEQ] +5CA05C74 A009 [Regular][ILSEQ] +5CA05C7E A07E [Trivial][ILSEQ] +5CA05C7F A07F [Trivial][ILSEQ] +5CA05C80 A080 [Trivial][ILSEQ] +5CA05C81 A081 [Trivial][ILSEQ] +5CA05C9F A09F [Trivial][ILSEQ] +5CA05CA0 A0A0 [Trivial][ILSEQ] +5CA05CA1 A0A1 [Trivial][ILSEQ] +5CA05CE0 A0E0 [Trivial][ILSEQ] +5CA05CEF A0EF [Trivial][ILSEQ] +5CA05CF9 A0F9 [Trivial][ILSEQ] +5CA05CFA A0FA [Trivial][ILSEQ] +5CA05CFC A0FC [Trivial][ILSEQ] +5CA05CFD A0FD [Trivial][ILSEQ] +5CA05CFE A0FE [Trivial][ILSEQ] +5CA05CFF A0FF [Trivial][ILSEQ] +5CA15C00 A100 [Trivial][USER] +5CA15C08 A108 [Trivial][USER] +5CA15C09 A109 [Trivial][USER] +5CA15C0A A10A [Trivial][USER] +5CA15C0D A10D [Trivial][USER] +5CA15C1A A11A [Trivial][USER] +5CA15C22 A122 [Trivial][USER] +5CA15C25 A15C25 [Regular] +5CA15C27 A127 [Trivial][USER] +5CA15C30 A100 [Regular] +5CA15C3F A13F [Trivial][USER] +5CA15C40 A140 [Trivial][USER] +5CA15C5A A11A [Regular] +5CA15C5C A15C [Regular][USER] +5CA15C5F A15C5F [Regular] +5CA15C61 A161 [Trivial][USER] +5CA15C62 A108 [Regular][USER] +5CA15C6E A10A [Regular] +5CA15C72 A10D [Regular] +5CA15C74 A109 [Regular] +5CA15C7E A17E [Trivial][USER] +5CA15C7F A17F [Trivial][USER] +5CA15C80 A180 [Trivial][ILSEQ] +5CA15C81 A181 [Trivial][ILSEQ] +5CA15C9F A19F [Trivial][ILSEQ] +5CA15CA0 A1A0 [Trivial][ILSEQ] +5CA15CA1 A1A1 [Trivial][USER] +5CA15CE0 A1E0 [Trivial][ILSEQ] +5CA15CEF A1EF [Trivial][ILSEQ] +5CA15CF9 A1F9 [Trivial][ILSEQ] +5CA15CFA A1FA [Trivial][ILSEQ] +5CA15CFC A1FC [Trivial][ILSEQ] +5CA15CFD A1FD [Trivial][ILSEQ] +5CA15CFE A1FE [Trivial][ILSEQ] +5CA15CFF A1FF [Trivial][ILSEQ] +5CE05C00 E000 [Trivial][BROKE] +5CE05C08 E008 [Trivial][BROKE] +5CE05C09 E009 [Trivial][BROKE] +5CE05C0A E00A [Trivial][BROKE] +5CE05C0D E00D [Trivial][BROKE] +5CE05C1A E01A [Trivial][BROKE] +5CE05C22 E022 [Trivial][BROKE] +5CE05C25 E05C25 [Regular] +5CE05C27 E027 [Trivial][BROKE] +5CE05C30 E000 [Regular][BROKE] +5CE05C3F E03F [Trivial][BROKE] +5CE05C40 E040 [Trivial][USER] +5CE05C5A E01A [Regular][BROKE] +5CE05C5C E05C [Regular][USER] +5CE05C5F E05C5F [Regular] +5CE05C61 E061 [Trivial][USER] +5CE05C62 E008 [Regular][BROKE][USER] +5CE05C6E E00A [Regular][BROKE] +5CE05C72 E00D [Regular][BROKE] +5CE05C74 E009 [Regular][BROKE] +5CE05C7E E07E [Trivial][USER] +5CE05C7F E07F [Trivial][BROKE] +5CE05C80 E080 [Trivial][FIXED][USER] +5CE05C81 E081 [Trivial][FIXED][USER] +5CE05C9F E09F [Trivial][FIXED][USER] +5CE05CA0 E0A0 [Trivial][FIXED][USER] +5CE05CA1 E0A1 [Trivial][USER] +5CE05CE0 E0E0 [Trivial][FIXED][USER] +5CE05CEF E0EF [Trivial][FIXED][USER] +5CE05CF9 E0F9 [Trivial][FIXED][USER] +5CE05CFA E0FA [Trivial][FIXED][USER] +5CE05CFC E0FC [Trivial][FIXED][USER] +5CE05CFD E0FD [Trivial][ILSEQ] +5CE05CFE E0FE [Trivial][ILSEQ] +5CE05CFF E0FF [Trivial][ILSEQ] +5CEF5C00 EF00 [Trivial][BROKE] +5CEF5C08 EF08 [Trivial][BROKE] +5CEF5C09 EF09 [Trivial][BROKE] +5CEF5C0A EF0A [Trivial][BROKE] +5CEF5C0D EF0D [Trivial][BROKE] +5CEF5C1A EF1A [Trivial][BROKE] +5CEF5C22 EF22 [Trivial][BROKE] +5CEF5C25 EF5C25 [Regular] +5CEF5C27 EF27 [Trivial][BROKE] +5CEF5C30 EF00 [Regular][BROKE] +5CEF5C3F EF3F [Trivial][BROKE] +5CEF5C40 EF40 [Trivial][USER] +5CEF5C5A EF1A [Regular][BROKE] +5CEF5C5C EF5C [Regular][USER] +5CEF5C5F EF5C5F [Regular] +5CEF5C61 EF61 [Trivial][USER] +5CEF5C62 EF08 [Regular][BROKE][USER] +5CEF5C6E EF0A [Regular][BROKE] +5CEF5C72 EF0D [Regular][BROKE] +5CEF5C74 EF09 [Regular][BROKE] +5CEF5C7E EF7E [Trivial][USER] +5CEF5C7F EF7F [Trivial][BROKE] +5CEF5C80 EF80 [Trivial][FIXED][USER] +5CEF5C81 EF81 [Trivial][FIXED][USER] +5CEF5C9F EF9F [Trivial][FIXED][USER] +5CEF5CA0 EFA0 [Trivial][FIXED][USER] +5CEF5CA1 EFA1 [Trivial][USER] +5CEF5CE0 EFE0 [Trivial][FIXED][USER] +5CEF5CEF EFEF [Trivial][FIXED][USER] +5CEF5CF9 EFF9 [Trivial][FIXED][USER] +5CEF5CFA EFFA [Trivial][FIXED][USER] +5CEF5CFC EFFC [Trivial][FIXED][USER] +5CEF5CFD EFFD [Trivial][ILSEQ] +5CEF5CFE EFFE [Trivial][ILSEQ] +5CEF5CFF EFFF [Trivial][ILSEQ] +5CF95C00 F900 [Trivial][BROKE] +5CF95C08 F908 [Trivial][BROKE] +5CF95C09 F909 [Trivial][BROKE] +5CF95C0A F90A [Trivial][BROKE] +5CF95C0D F90D [Trivial][BROKE] +5CF95C1A F91A [Trivial][BROKE] +5CF95C22 F922 [Trivial][BROKE] +5CF95C25 F95C25 [Regular] +5CF95C27 F927 [Trivial][BROKE] +5CF95C30 F900 [Regular][BROKE] +5CF95C3F F93F [Trivial][BROKE] +5CF95C40 F940 [Trivial][USER] +5CF95C5A F91A [Regular][BROKE] +5CF95C5C F95C [Regular][USER] +5CF95C5F F95C5F [Regular] +5CF95C61 F961 [Trivial][USER] +5CF95C62 F908 [Regular][BROKE][USER] +5CF95C6E F90A [Regular][BROKE] +5CF95C72 F90D [Regular][BROKE] +5CF95C74 F909 [Regular][BROKE] +5CF95C7E F97E [Trivial][USER] +5CF95C7F F97F [Trivial][BROKE] +5CF95C80 F980 [Trivial][FIXED][USER] +5CF95C81 F981 [Trivial][FIXED][USER] +5CF95C9F F99F [Trivial][FIXED][USER] +5CF95CA0 F9A0 [Trivial][FIXED][USER] +5CF95CA1 F9A1 [Trivial][USER] +5CF95CE0 F9E0 [Trivial][FIXED][USER] +5CF95CEF F9EF [Trivial][FIXED][USER] +5CF95CF9 F9F9 [Trivial][FIXED][USER] +5CF95CFA F9FA [Trivial][FIXED][USER] +5CF95CFC F9FC [Trivial][FIXED][USER] +5CF95CFD F9FD [Trivial][ILSEQ] +5CF95CFE F9FE [Trivial][ILSEQ] +5CF95CFF F9FF [Trivial][ILSEQ] +5CFA5C00 FA00 [Trivial][BROKE] +5CFA5C08 FA08 [Trivial][BROKE] +5CFA5C09 FA09 [Trivial][BROKE] +5CFA5C0A FA0A [Trivial][BROKE] +5CFA5C0D FA0D [Trivial][BROKE] +5CFA5C1A FA1A [Trivial][BROKE] +5CFA5C22 FA22 [Trivial][BROKE] +5CFA5C25 FA5C25 [Regular] +5CFA5C27 FA27 [Trivial][BROKE] +5CFA5C30 FA00 [Regular][BROKE] +5CFA5C3F FA3F [Trivial][BROKE] +5CFA5C40 FA40 [Trivial][USER] +5CFA5C5A FA1A [Regular][BROKE] +5CFA5C5C FA5C [Regular][USER] +5CFA5C5F FA5C5F [Regular] +5CFA5C61 FA61 [Trivial][USER] +5CFA5C62 FA08 [Regular][BROKE][USER] +5CFA5C6E FA0A [Regular][BROKE] +5CFA5C72 FA0D [Regular][BROKE] +5CFA5C74 FA09 [Regular][BROKE] +5CFA5C7E FA7E [Trivial][USER] +5CFA5C7F FA7F [Trivial][BROKE] +5CFA5C80 FA80 [Trivial][FIXED][USER] +5CFA5C81 FA81 [Trivial][FIXED][USER] +5CFA5C9F FA9F [Trivial][FIXED][USER] +5CFA5CA0 FAA0 [Trivial][FIXED][USER] +5CFA5CA1 FAA1 [Trivial][USER] +5CFA5CE0 FAE0 [Trivial][FIXED][USER] +5CFA5CEF FAEF [Trivial][FIXED][USER] +5CFA5CF9 FAF9 [Trivial][FIXED][USER] +5CFA5CFA FAFA [Trivial][FIXED][USER] +5CFA5CFC FAFC [Trivial][FIXED][USER] +5CFA5CFD FAFD [Trivial][ILSEQ] +5CFA5CFE FAFE [Trivial][ILSEQ] +5CFA5CFF FAFF [Trivial][ILSEQ] +5CFC5C00 FC00 [Trivial][BROKE] +5CFC5C08 FC08 [Trivial][BROKE] +5CFC5C09 FC09 [Trivial][BROKE] +5CFC5C0A FC0A [Trivial][BROKE] +5CFC5C0D FC0D [Trivial][BROKE] +5CFC5C1A FC1A [Trivial][BROKE] +5CFC5C22 FC22 [Trivial][BROKE] +5CFC5C25 FC5C25 [Regular] +5CFC5C27 FC27 [Trivial][BROKE] +5CFC5C30 FC00 [Regular][BROKE] +5CFC5C3F FC3F [Trivial][BROKE] +5CFC5C40 FC40 [Trivial][USER] +5CFC5C5A FC1A [Regular][BROKE] +5CFC5C5C FC5C [Regular][USER] +5CFC5C5F FC5C5F [Regular] +5CFC5C61 FC61 [Trivial][USER] +5CFC5C62 FC08 [Regular][BROKE][USER] +5CFC5C6E FC0A [Regular][BROKE] +5CFC5C72 FC0D [Regular][BROKE] +5CFC5C74 FC09 [Regular][BROKE] +5CFC5C7E FC7E [Trivial][USER] +5CFC5C7F FC7F [Trivial][BROKE] +5CFC5C80 FC80 [Trivial][FIXED][USER] +5CFC5C81 FC81 [Trivial][FIXED][USER] +5CFC5C9F FC9F [Trivial][FIXED][USER] +5CFC5CA0 FCA0 [Trivial][FIXED][USER] +5CFC5CA1 FCA1 [Trivial][USER] +5CFC5CE0 FCE0 [Trivial][FIXED][USER] +5CFC5CEF FCEF [Trivial][FIXED][USER] +5CFC5CF9 FCF9 [Trivial][FIXED][USER] +5CFC5CFA FCFA [Trivial][FIXED][USER] +5CFC5CFC FCFC [Trivial][FIXED][USER] +5CFC5CFD FCFD [Trivial][ILSEQ] +5CFC5CFE FCFE [Trivial][ILSEQ] +5CFC5CFF FCFF [Trivial][ILSEQ] +5CFD5C00 FD00 [Trivial][ILSEQ] +5CFD5C08 FD08 [Trivial][ILSEQ] +5CFD5C09 FD09 [Trivial][ILSEQ] +5CFD5C0A FD0A [Trivial][ILSEQ] +5CFD5C0D FD0D [Trivial][ILSEQ] +5CFD5C1A FD1A [Trivial][ILSEQ] +5CFD5C22 FD22 [Trivial][ILSEQ] +5CFD5C25 FD5C25 [Regular][ILSEQ] +5CFD5C27 FD27 [Trivial][ILSEQ] +5CFD5C30 FD00 [Regular][ILSEQ] +5CFD5C3F FD3F [Trivial][ILSEQ] +5CFD5C40 FD40 [Trivial][ILSEQ] +5CFD5C5A FD1A [Regular][ILSEQ] +5CFD5C5C FD5C [Regular][ILSEQ] +5CFD5C5F FD5C5F [Regular][ILSEQ] +5CFD5C61 FD61 [Trivial][ILSEQ] +5CFD5C62 FD08 [Regular][ILSEQ] +5CFD5C6E FD0A [Regular][ILSEQ] +5CFD5C72 FD0D [Regular][ILSEQ] +5CFD5C74 FD09 [Regular][ILSEQ] +5CFD5C7E FD7E [Trivial][ILSEQ] +5CFD5C7F FD7F [Trivial][ILSEQ] +5CFD5C80 FD80 [Trivial][ILSEQ] +5CFD5C81 FD81 [Trivial][ILSEQ] +5CFD5C9F FD9F [Trivial][ILSEQ] +5CFD5CA0 FDA0 [Trivial][ILSEQ] +5CFD5CA1 FDA1 [Trivial][ILSEQ] +5CFD5CE0 FDE0 [Trivial][ILSEQ] +5CFD5CEF FDEF [Trivial][ILSEQ] +5CFD5CF9 FDF9 [Trivial][ILSEQ] +5CFD5CFA FDFA [Trivial][ILSEQ] +5CFD5CFC FDFC [Trivial][ILSEQ] +5CFD5CFD FDFD [Trivial][ILSEQ] +5CFD5CFE FDFE [Trivial][ILSEQ] +5CFD5CFF FDFF [Trivial][ILSEQ] +5CFE5C00 FE00 [Trivial][ILSEQ] +5CFE5C08 FE08 [Trivial][ILSEQ] +5CFE5C09 FE09 [Trivial][ILSEQ] +5CFE5C0A FE0A [Trivial][ILSEQ] +5CFE5C0D FE0D [Trivial][ILSEQ] +5CFE5C1A FE1A [Trivial][ILSEQ] +5CFE5C22 FE22 [Trivial][ILSEQ] +5CFE5C25 FE5C25 [Regular][ILSEQ] +5CFE5C27 FE27 [Trivial][ILSEQ] +5CFE5C30 FE00 [Regular][ILSEQ] +5CFE5C3F FE3F [Trivial][ILSEQ] +5CFE5C40 FE40 [Trivial][ILSEQ] +5CFE5C5A FE1A [Regular][ILSEQ] +5CFE5C5C FE5C [Regular][ILSEQ] +5CFE5C5F FE5C5F [Regular][ILSEQ] +5CFE5C61 FE61 [Trivial][ILSEQ] +5CFE5C62 FE08 [Regular][ILSEQ] +5CFE5C6E FE0A [Regular][ILSEQ] +5CFE5C72 FE0D [Regular][ILSEQ] +5CFE5C74 FE09 [Regular][ILSEQ] +5CFE5C7E FE7E [Trivial][ILSEQ] +5CFE5C7F FE7F [Trivial][ILSEQ] +5CFE5C80 FE80 [Trivial][ILSEQ] +5CFE5C81 FE81 [Trivial][ILSEQ] +5CFE5C9F FE9F [Trivial][ILSEQ] +5CFE5CA0 FEA0 [Trivial][ILSEQ] +5CFE5CA1 FEA1 [Trivial][ILSEQ] +5CFE5CE0 FEE0 [Trivial][ILSEQ] +5CFE5CEF FEEF [Trivial][ILSEQ] +5CFE5CF9 FEF9 [Trivial][ILSEQ] +5CFE5CFA FEFA [Trivial][ILSEQ] +5CFE5CFC FEFC [Trivial][ILSEQ] +5CFE5CFD FEFD [Trivial][ILSEQ] +5CFE5CFE FEFE [Trivial][ILSEQ] +5CFE5CFF FEFF [Trivial][ILSEQ] +5CFF5C00 FF00 [Trivial][ILSEQ] +5CFF5C08 FF08 [Trivial][ILSEQ] +5CFF5C09 FF09 [Trivial][ILSEQ] +5CFF5C0A FF0A [Trivial][ILSEQ] +5CFF5C0D FF0D [Trivial][ILSEQ] +5CFF5C1A FF1A [Trivial][ILSEQ] +5CFF5C22 FF22 [Trivial][ILSEQ] +5CFF5C25 FF5C25 [Regular][ILSEQ] +5CFF5C27 FF27 [Trivial][ILSEQ] +5CFF5C30 FF00 [Regular][ILSEQ] +5CFF5C3F FF3F [Trivial][ILSEQ] +5CFF5C40 FF40 [Trivial][ILSEQ] +5CFF5C5A FF1A [Regular][ILSEQ] +5CFF5C5C FF5C [Regular][ILSEQ] +5CFF5C5F FF5C5F [Regular][ILSEQ] +5CFF5C61 FF61 [Trivial][ILSEQ] +5CFF5C62 FF08 [Regular][ILSEQ] +5CFF5C6E FF0A [Regular][ILSEQ] +5CFF5C72 FF0D [Regular][ILSEQ] +5CFF5C74 FF09 [Regular][ILSEQ] +5CFF5C7E FF7E [Trivial][ILSEQ] +5CFF5C7F FF7F [Trivial][ILSEQ] +5CFF5C80 FF80 [Trivial][ILSEQ] +5CFF5C81 FF81 [Trivial][ILSEQ] +5CFF5C9F FF9F [Trivial][ILSEQ] +5CFF5CA0 FFA0 [Trivial][ILSEQ] +5CFF5CA1 FFA1 [Trivial][ILSEQ] +5CFF5CE0 FFE0 [Trivial][ILSEQ] +5CFF5CEF FFEF [Trivial][ILSEQ] +5CFF5CF9 FFF9 [Trivial][ILSEQ] +5CFF5CFA FFFA [Trivial][ILSEQ] +5CFF5CFC FFFC [Trivial][ILSEQ] +5CFF5CFD FFFD [Trivial][ILSEQ] +5CFF5CFE FFFE [Trivial][ILSEQ] +5CFF5CFF FFFF [Trivial][ILSEQ] +DROP TABLE t1; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP FUNCTION unescape; +DROP FUNCTION unescape_type; +DROP FUNCTION wellformedness; +DROP FUNCTION mysql_real_escape_string_generated; +DROP FUNCTION iswellformed; +DROP TABLE allbytes; +# End of ctype_backslash.inc +SET NAMES sjis; +# Start of ctype_E05C.inc +SELECT HEX('à\'),HEX('à\t'); +HEX('à\') HEX('à\t') +E05C E05C74 +SELECT HEX('\\à\'),HEX('\\à\t'),HEX('\\à\t\t'); +HEX('__à\') HEX('__à\t') HEX('__à\t_t') +5CE05C 5CE05C74 5CE05C7409 +SELECT HEX('''à\'),HEX('à\'''); +HEX('''à\') HEX('à\''') +27E05C E05C27 +SELECT HEX('\\''à\'),HEX('à\''\\'); +HEX('__''à\') HEX('à\''__') +5C27E05C E05C275C +SELECT HEX(BINARY('à\')),HEX(BINARY('à\t')); +HEX(BINARY('à\')) HEX(BINARY('à\t')) +E05C E05C74 +SELECT HEX(BINARY('\\à\')),HEX(BINARY('\\à\t')),HEX(BINARY('\\à\t\t')); +HEX(BINARY('__à\')) HEX(BINARY('__à\t')) HEX(BINARY('__à\t_t')) +5CE05C 5CE05C74 5CE05C7409 +SELECT HEX(BINARY('''à\')),HEX(BINARY('à\''')); +HEX(BINARY('''à\')) HEX(BINARY('à\''')) +27E05C E05C27 +SELECT HEX(BINARY('\\''à\')),HEX(BINARY('à\''\\')); +HEX(BINARY('__''à\')) HEX(BINARY('à\''__')) +5C27E05C E05C275C +SELECT HEX(_BINARY'à\'),HEX(_BINARY'à\t'); +HEX(_BINARY'à\') HEX(_BINARY'à\t') +E05C E05C74 +SELECT HEX(_BINARY'\\à\'),HEX(_BINARY'\\à\t'),HEX(_BINARY'\\à\t\t'); +HEX(_BINARY'__à\') HEX(_BINARY'__à\t') HEX(_BINARY'__à\t_t') +5CE05C 5CE05C74 5CE05C7409 +SELECT HEX(_BINARY'''à\'),HEX(_BINARY'à\'''); +HEX(_BINARY'''à\') HEX(_BINARY'à\''') +27E05C E05C27 +SELECT HEX(_BINARY'\\''à\'),HEX(_BINARY'à\''\\'); +HEX(_BINARY'__''à\') HEX(_BINARY'à\''__') +5C27E05C E05C275C +CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET sjis NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('à\'),('à\t'); +INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t'); +INSERT INTO t1 VALUES ('''à\'),('à\'''); +INSERT INTO t1 VALUES ('\\''à\'),('à\''\\'); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 (a BLOB); +INSERT INTO t1 VALUES ('à\'),('à\t'); +INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t'); +INSERT INTO t1 VALUES ('''à\'),('à\'''); +INSERT INTO t1 VALUES ('\\''à\'),('à\''\\'); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET sjis NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t')); +INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t')); +INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\''')); +INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\')); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 (a BLOB); +INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t')); +INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t')); +INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\''')); +INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\')); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET sjis NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t'); +INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t'); +INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\'''); +INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\'); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +CREATE TABLE t1 (a BLOB); +INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t'); +INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t'); +INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\'''); +INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\'); +SELECT a, HEX(a) FROM t1; +a HEX(a) +à\ E05C +à\t E05C74 +\à\ 5CE05C +\à\t 5CE05C74 +\à\t 5CE05C7409 +'à\ 27E05C +à\' E05C27 +\'à\ 5C27E05C +à\'\ E05C275C +DROP TABLE t1; +SET character_set_client=binary, character_set_results=binary; +SELECT @@character_set_client, @@character_set_connection, @@character_set_results; +@@character_set_client @@character_set_connection @@character_set_results +binary sjis binary +SELECT HEX('à\['), HEX('\à\['); +HEX('à\[') HEX('\à\[') +E05B E05B +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET sjis NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('à\['),('\à\['); +SELECT HEX(a) FROM t1; +HEX(a) +E05B +E05B +DROP TABLE t1; +SET character_set_client=@@character_set_connection, character_set_results=@@character_set_connection; +SET character_set_connection=binary; +SELECT @@character_set_client, @@character_set_connection, @@character_set_results; +@@character_set_client @@character_set_connection @@character_set_results +sjis binary sjis +SELECT HEX('à\['), HEX('\à\['); +HEX('à\[') HEX('_à\[') +E05C5B E05B +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varbinary(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('à\['),('\à\['); +SELECT HEX(a) FROM t1; +HEX(a) +E05C5B +E05B +DROP TABLE t1; +# Start of ctype_E05C.inc +# +# End of 10.0 tests +# diff --git a/mysql-test/r/ctype_swe7.result b/mysql-test/r/ctype_swe7.result new file mode 100644 index 00000000000..ccab77c21d1 --- /dev/null +++ b/mysql-test/r/ctype_swe7.result @@ -0,0 +1,3071 @@ +# +# Start of 10.0 tests +# +SET NAMES swe7; +# Start of ctype_unescape.inc +SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection'; +PREPARE stmt FROM @query; +EXECUTE stmt; +CHARSET('test') @@character_set_client @@character_set_connection +swe7 swe7 swe7 +DEALLOCATE PREPARE stmt; +CREATE TABLE allbytes (a VARBINARY(10)); +# Using selected bytes combinations +CREATE TABLE halfs (a INT); +INSERT INTO halfs VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07); +INSERT INTO halfs VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +CREATE TEMPORARY TABLE bytes (a BINARY(1), KEY(a)) ENGINE=MyISAM; +INSERT INTO bytes SELECT CHAR((t1.a << 4) | t2.a USING BINARY) FROM halfs t1, halfs t2; +DROP TABLE halfs; +CREATE TABLE selected_bytes (a VARBINARY(10)); +INSERT INTO selected_bytes (a) VALUES ('\0'),('\b'),('\t'),('\r'),('\n'),('\Z'); +INSERT INTO selected_bytes (a) VALUES ('0'),('b'),('t'),('r'),('n'),('Z'); +INSERT INTO selected_bytes (a) VALUES ('\\'),('_'),('%'),(0x22),(0x27); +INSERT INTO selected_bytes (a) VALUES ('a'); +INSERT INTO selected_bytes (a) VALUES +(0x3F), # 7bit +(0x40), # 7bit mbtail +(0x7E), # 7bit mbtail nonascii-8bit +(0x7F), # 7bit nonascii-8bit +(0x80), # mbtail bad-mb +(0x81), # mbhead mbtail +(0x9F), # mbhead mbtail bad-mb +(0xA0), # mbhead mbtail bad-mb +(0xA1), # mbhead mbtail nonascii-8bit +(0xE0), # mbhead mbtai +(0xEF), # mbhead mbtail +(0xF9), # mbhead mbtail +(0xFA), # mbhead mbtail bad-mb +(0xFC), # mbhead mbtail bad-mb +(0xFD), # mbhead mbtail bad-mb +(0xFE), # mbhead mbtial bad-mb +(0xFF); +INSERT INTO allbytes (a) SELECT a FROM bytes; +INSERT INTO allbytes (a) SELECT CONCAT(t1.a,t2.a) FROM selected_bytes t1,selected_bytes t2; +INSERT INTO allbytes (a) SELECT CONCAT(0x5C,t1.a,t2.a) FROM selected_bytes t1,selected_bytes t2; +INSERT INTO allbytes (a) SELECT CONCAT(0x5C,t1.a,0x5C,t2.a) FROM selected_bytes t1,selected_bytes t2; +DROP TABLE selected_bytes; +DELETE FROM allbytes WHERE +OCTET_LENGTH(a)>1 AND +LOCATE(0x5C,a)=0 AND +a NOT LIKE '%\'%' AND + a NOT LIKE '%"%'; +CREATE PROCEDURE p1(val VARBINARY(10)) +BEGIN +DECLARE EXIT HANDLER FOR SQLSTATE '42000' INSERT INTO t1 (a,b) VALUES(val,NULL); +SET @query=CONCAT(_binary"INSERT INTO t1 (a,b) VALUES (0x",HEX(val),",'",val,"')"); +PREPARE stmt FROM @query; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; +END// +CREATE PROCEDURE p2() +BEGIN +DECLARE val VARBINARY(10); +DECLARE done INT DEFAULT FALSE; +DECLARE stmt CURSOR FOR SELECT a FROM allbytes; +DECLARE CONTINUE HANDLER FOR NOT FOUND SET done=TRUE; +OPEN stmt; +read_loop1: LOOP +FETCH stmt INTO val; +IF done THEN +LEAVE read_loop1; +END IF; +CALL p1(val); +END LOOP; +CLOSE stmt; +END// +CREATE FUNCTION iswellformed(a VARBINARY(256)) RETURNS INT RETURN a=BINARY CONVERT(a USING swe7);// +CREATE FUNCTION unescape(a VARBINARY(256)) RETURNS VARBINARY(256) +BEGIN +# We need to do it in a way to avoid producing new escape sequences +# First, enclose all known escsape sequences to '{{xx}}' + # - Backslash not followed by a LIKE pattern characters _ and % +# - Double escapes +# This uses PCRE Branch Reset Groups: (?|(alt1)|(alt2)|(alt3)). +# So '\\1' in the last argument always means the match, no matter +# which alternative it came from. +SET a=REGEXP_REPLACE(a,'(?|(\\\\[^_%])|(\\x{27}\\x{27}))','{{\\1}}'); +# Now unescape all enclosed standard escape sequences +SET a=REPLACE(a,'{{\\0}}', '\0'); +SET a=REPLACE(a,'{{\\b}}', '\b'); +SET a=REPLACE(a,'{{\\t}}', '\t'); +SET a=REPLACE(a,'{{\\r}}', '\r'); +SET a=REPLACE(a,'{{\\n}}', '\n'); +SET a=REPLACE(a,'{{\\Z}}', '\Z'); +SET a=REPLACE(a,'{{\\\'}}', '\''); +# Unescape double quotes +SET a=REPLACE(a,'{{\'\'}}', '\''); + # Unescape the rest: all other \x sequences mean just 'x' + SET a=REGEXP_REPLACE(a, '{{\\\\(.|\\R)}}', '\\1'); + RETURN a; +END// +CREATE FUNCTION unescape_type(a VARBINARY(256),b VARBINARY(256)) RETURNS VARBINARY(256) +BEGIN +RETURN CASE +WHEN b IS NULL THEN '[SyntErr]' + WHEN a=b THEN CASE +WHEN OCTET_LENGTH(a)=1 THEN '[Preserve]' + WHEN a RLIKE '\\\\[_%]' THEN '[Preserve][LIKE]' + WHEN a RLIKE '^[[:ascii:]]+$' THEN '[Preserve][ASCII]' + ELSE '[Preserv][MB]' END +WHEN REPLACE(a,0x5C,'')=b THEN '[Trivial]' + WHEN UNESCAPE(a)=b THEN '[Regular]' + ELSE '[Special]' END; +END// +CREATE FUNCTION wellformedness(a VARBINARY(256), b VARBINARY(256)) +RETURNS VARBINARY(256) +BEGIN +RETURN CASE +WHEN b IS NULL THEN '' + WHEN NOT iswellformed(a) AND iswellformed(b) THEN '[FIXED]' + WHEN iswellformed(a) AND NOT iswellformed(b) THEN '[BROKE]' + WHEN NOT iswellformed(a) AND NOT iswellformed(b) THEN '[ILSEQ]' + ELSE '' + END; +END// +CREATE FUNCTION mysql_real_escape_string_generated(a VARBINARY(256)) +RETURNS VARBINARY(256) +BEGIN +DECLARE a1 BINARY(1) DEFAULT SUBSTR(a,1,1); +DECLARE a2 BINARY(1) DEFAULT SUBSTR(a,2,1); +DECLARE a3 BINARY(1) DEFAULT SUBSTR(a,3,1); +DECLARE a4 BINARY(1) DEFAULT SUBSTR(a,4,1); +DECLARE a2a4 BINARY(2) DEFAULT CONCAT(a2,a4); +RETURN CASE +WHEN (a1=0x5C) AND +(a3=0x5C) AND +(a2>0x7F) AND +(a4 NOT IN ('_','%','0','t','r','n','Z')) AND +iswellformed(a2a4) THEN '[USER]' + ELSE '' + END; +END// +CREATE TABLE t1 (a VARBINARY(10),b VARBINARY(10)); +CALL p2(); +SELECT HEX(a),HEX(b), +CONCAT(unescape_type(a,b), +wellformedness(a,b), +mysql_real_escape_string_generated(a), +IF(UNESCAPE(a)<>b,CONCAT('[BAD',HEX(UNESCAPE(a)),']'),'')) AS comment +FROM t1 ORDER BY LENGTH(a),a; +HEX(a) HEX(b) comment +00 00 [Preserve] +01 01 [Preserve] +02 02 [Preserve] +03 03 [Preserve] +04 04 [Preserve] +05 05 [Preserve] +06 06 [Preserve] +07 07 [Preserve] +08 08 [Preserve] +09 09 [Preserve] +0A 0A [Preserve] +0B 0B [Preserve] +0C 0C [Preserve] +0D 0D [Preserve] +0E 0E [Preserve] +0F 0F [Preserve] +10 10 [Preserve] +11 11 [Preserve] +12 12 [Preserve] +13 13 [Preserve] +14 14 [Preserve] +15 15 [Preserve] +16 16 [Preserve] +17 17 [Preserve] +18 18 [Preserve] +19 19 [Preserve] +1A 1A [Preserve] +1B 1B [Preserve] +1C 1C [Preserve] +1D 1D [Preserve] +1E 1E [Preserve] +1F 1F [Preserve] +20 20 [Preserve] +21 21 [Preserve] +22 22 [Preserve] +23 23 [Preserve] +24 24 [Preserve] +25 25 [Preserve] +26 26 [Preserve] +27 NULL [SyntErr] +28 28 [Preserve] +29 29 [Preserve] +2A 2A [Preserve] +2B 2B [Preserve] +2C 2C [Preserve] +2D 2D [Preserve] +2E 2E [Preserve] +2F 2F [Preserve] +30 30 [Preserve] +31 31 [Preserve] +32 32 [Preserve] +33 33 [Preserve] +34 34 [Preserve] +35 35 [Preserve] +36 36 [Preserve] +37 37 [Preserve] +38 38 [Preserve] +39 39 [Preserve] +3A 3A [Preserve] +3B 3B [Preserve] +3C 3C [Preserve] +3D 3D [Preserve] +3E 3E [Preserve] +3F 3F [Preserve] +40 40 [Preserve] +41 41 [Preserve] +42 42 [Preserve] +43 43 [Preserve] +44 44 [Preserve] +45 45 [Preserve] +46 46 [Preserve] +47 47 [Preserve] +48 48 [Preserve] +49 49 [Preserve] +4A 4A [Preserve] +4B 4B [Preserve] +4C 4C [Preserve] +4D 4D [Preserve] +4E 4E [Preserve] +4F 4F [Preserve] +50 50 [Preserve] +51 51 [Preserve] +52 52 [Preserve] +53 53 [Preserve] +54 54 [Preserve] +55 55 [Preserve] +56 56 [Preserve] +57 57 [Preserve] +58 58 [Preserve] +59 59 [Preserve] +5A 5A [Preserve] +5B 5B [Preserve] +5C NULL [SyntErr] +5D 5D [Preserve] +5E 5E [Preserve] +5F 5F [Preserve] +60 60 [Preserve] +61 61 [Preserve] +62 62 [Preserve] +63 63 [Preserve] +64 64 [Preserve] +65 65 [Preserve] +66 66 [Preserve] +67 67 [Preserve] +68 68 [Preserve] +69 69 [Preserve] +6A 6A [Preserve] +6B 6B [Preserve] +6C 6C [Preserve] +6D 6D [Preserve] +6E 6E [Preserve] +6F 6F [Preserve] +70 70 [Preserve] +71 71 [Preserve] +72 72 [Preserve] +73 73 [Preserve] +74 74 [Preserve] +75 75 [Preserve] +76 76 [Preserve] +77 77 [Preserve] +78 78 [Preserve] +79 79 [Preserve] +7A 7A [Preserve] +7B 7B [Preserve] +7C 7C [Preserve] +7D 7D [Preserve] +7E 7E [Preserve] +7F 7F [Preserve] +80 80 [Preserve] +81 81 [Preserve] +82 82 [Preserve] +83 83 [Preserve] +84 84 [Preserve] +85 85 [Preserve] +86 86 [Preserve] +87 87 [Preserve] +88 88 [Preserve] +89 89 [Preserve] +8A 8A [Preserve] +8B 8B [Preserve] +8C 8C [Preserve] +8D 8D [Preserve] +8E 8E [Preserve] +8F 8F [Preserve] +90 90 [Preserve] +91 91 [Preserve] +92 92 [Preserve] +93 93 [Preserve] +94 94 [Preserve] +95 95 [Preserve] +96 96 [Preserve] +97 97 [Preserve] +98 98 [Preserve] +99 99 [Preserve] +9A 9A [Preserve] +9B 9B [Preserve] +9C 9C [Preserve] +9D 9D [Preserve] +9E 9E [Preserve] +9F 9F [Preserve] +A0 A0 [Preserve] +A1 A1 [Preserve] +A2 A2 [Preserve] +A3 A3 [Preserve] +A4 A4 [Preserve] +A5 A5 [Preserve] +A6 A6 [Preserve] +A7 A7 [Preserve] +A8 A8 [Preserve] +A9 A9 [Preserve] +AA AA [Preserve] +AB AB [Preserve] +AC AC [Preserve] +AD AD [Preserve] +AE AE [Preserve] +AF AF [Preserve] +B0 B0 [Preserve] +B1 B1 [Preserve] +B2 B2 [Preserve] +B3 B3 [Preserve] +B4 B4 [Preserve] +B5 B5 [Preserve] +B6 B6 [Preserve] +B7 B7 [Preserve] +B8 B8 [Preserve] +B9 B9 [Preserve] +BA BA [Preserve] +BB BB [Preserve] +BC BC [Preserve] +BD BD [Preserve] +BE BE [Preserve] +BF BF [Preserve] +C0 C0 [Preserve] +C1 C1 [Preserve] +C2 C2 [Preserve] +C3 C3 [Preserve] +C4 C4 [Preserve] +C5 C5 [Preserve] +C6 C6 [Preserve] +C7 C7 [Preserve] +C8 C8 [Preserve] +C9 C9 [Preserve] +CA CA [Preserve] +CB CB [Preserve] +CC CC [Preserve] +CD CD [Preserve] +CE CE [Preserve] +CF CF [Preserve] +D0 D0 [Preserve] +D1 D1 [Preserve] +D2 D2 [Preserve] +D3 D3 [Preserve] +D4 D4 [Preserve] +D5 D5 [Preserve] +D6 D6 [Preserve] +D7 D7 [Preserve] +D8 D8 [Preserve] +D9 D9 [Preserve] +DA DA [Preserve] +DB DB [Preserve] +DC DC [Preserve] +DD DD [Preserve] +DE DE [Preserve] +DF DF [Preserve] +E0 E0 [Preserve] +E1 E1 [Preserve] +E2 E2 [Preserve] +E3 E3 [Preserve] +E4 E4 [Preserve] +E5 E5 [Preserve] +E6 E6 [Preserve] +E7 E7 [Preserve] +E8 E8 [Preserve] +E9 E9 [Preserve] +EA EA [Preserve] +EB EB [Preserve] +EC EC [Preserve] +ED ED [Preserve] +EE EE [Preserve] +EF EF [Preserve] +F0 F0 [Preserve] +F1 F1 [Preserve] +F2 F2 [Preserve] +F3 F3 [Preserve] +F4 F4 [Preserve] +F5 F5 [Preserve] +F6 F6 [Preserve] +F7 F7 [Preserve] +F8 F8 [Preserve] +F9 F9 [Preserve] +FA FA [Preserve] +FB FB [Preserve] +FC FC [Preserve] +FD FD [Preserve] +FE FE [Preserve] +FF FF [Preserve] +0022 0022 [Preserve][ASCII] +0027 NULL [SyntErr] +005C NULL [SyntErr] +0822 0822 [Preserve][ASCII] +0827 NULL [SyntErr] +085C NULL [SyntErr] +0922 0922 [Preserve][ASCII] +0927 NULL [SyntErr] +095C NULL [SyntErr] +0A22 0A22 [Preserve][ASCII] +0A27 NULL [SyntErr] +0A5C NULL [SyntErr] +0D22 0D22 [Preserve][ASCII] +0D27 NULL [SyntErr] +0D5C NULL [SyntErr] +1A22 1A22 [Preserve][ASCII] +1A27 NULL [SyntErr] +1A5C NULL [SyntErr] +2200 2200 [Preserve][ASCII] +2208 2208 [Preserve][ASCII] +2209 2209 [Preserve][ASCII] +220A 220A [Preserve][ASCII] +220D 220D [Preserve][ASCII] +221A 221A [Preserve][ASCII] +2222 2222 [Preserve][ASCII] +2225 2225 [Preserve][ASCII] +2227 NULL [SyntErr] +2230 2230 [Preserve][ASCII] +223F 223F [Preserve][ASCII] +2240 2240 [Preserve][ASCII] +225A 225A [Preserve][ASCII] +225C NULL [SyntErr] +225F 225F [Preserve][ASCII] +2261 2261 [Preserve][ASCII] +2262 2262 [Preserve][ASCII] +226E 226E [Preserve][ASCII] +2272 2272 [Preserve][ASCII] +2274 2274 [Preserve][ASCII] +227E 227E [Preserve][ASCII] +227F 227F [Preserve][ASCII] +2280 2280 [Preserv][MB] +2281 2281 [Preserv][MB] +229F 229F [Preserv][MB] +22A0 22A0 [Preserv][MB] +22A1 22A1 [Preserv][MB] +22E0 22E0 [Preserv][MB] +22EF 22EF [Preserv][MB] +22F9 22F9 [Preserv][MB] +22FA 22FA [Preserv][MB] +22FC 22FC [Preserv][MB] +22FD 22FD [Preserv][MB] +22FE 22FE [Preserv][MB] +22FF 22FF [Preserv][MB] +2522 2522 [Preserve][ASCII] +2527 NULL [SyntErr] +255C NULL [SyntErr] +2700 NULL [SyntErr] +2708 NULL [SyntErr] +2709 NULL [SyntErr] +270A NULL [SyntErr] +270D NULL [SyntErr] +271A NULL [SyntErr] +2722 NULL [SyntErr] +2725 NULL [SyntErr] +2727 27 [Regular] +2730 NULL [SyntErr] +273F NULL [SyntErr] +2740 NULL [SyntErr] +275A NULL [SyntErr] +275C NULL [SyntErr] +275F NULL [SyntErr] +2761 NULL [SyntErr] +2762 NULL [SyntErr] +276E NULL [SyntErr] +2772 NULL [SyntErr] +2774 NULL [SyntErr] +277E NULL [SyntErr] +277F NULL [SyntErr] +2780 NULL [SyntErr] +2781 NULL [SyntErr] +279F NULL [SyntErr] +27A0 NULL [SyntErr] +27A1 NULL [SyntErr] +27E0 NULL [SyntErr] +27EF NULL [SyntErr] +27F9 NULL [SyntErr] +27FA NULL [SyntErr] +27FC NULL [SyntErr] +27FD NULL [SyntErr] +27FE NULL [SyntErr] +27FF NULL [SyntErr] +3022 3022 [Preserve][ASCII] +3027 NULL [SyntErr] +305C NULL [SyntErr] +3F22 3F22 [Preserve][ASCII] +3F27 NULL [SyntErr] +3F5C NULL [SyntErr] +4022 4022 [Preserve][ASCII] +4027 NULL [SyntErr] +405C NULL [SyntErr] +5A22 5A22 [Preserve][ASCII] +5A27 NULL [SyntErr] +5A5C NULL [SyntErr] +5C00 00 [Trivial] +5C08 08 [Trivial] +5C09 09 [Trivial] +5C0A 0A [Trivial] +5C0D 0D [Trivial] +5C1A 1A [Trivial] +5C22 22 [Trivial] +5C25 5C25 [Preserve][LIKE] +5C27 27 [Trivial] +5C30 00 [Regular] +5C3F 3F [Trivial] +5C40 40 [Trivial] +5C5A 1A [Regular] +5C5C 5C [Regular] +5C5F 5C5F [Preserve][LIKE] +5C61 61 [Trivial] +5C62 08 [Regular] +5C6E 0A [Regular] +5C72 0D [Regular] +5C74 09 [Regular] +5C7E 7E [Trivial] +5C7F 7F [Trivial] +5C80 80 [Trivial] +5C81 81 [Trivial] +5C9F 9F [Trivial] +5CA0 A0 [Trivial] +5CA1 A1 [Trivial] +5CE0 E0 [Trivial] +5CEF EF [Trivial] +5CF9 F9 [Trivial] +5CFA FA [Trivial] +5CFC FC [Trivial] +5CFD FD [Trivial] +5CFE FE [Trivial] +5CFF FF [Trivial] +5F22 5F22 [Preserve][ASCII] +5F27 NULL [SyntErr] +5F5C NULL [SyntErr] +6122 6122 [Preserve][ASCII] +6127 NULL [SyntErr] +615C NULL [SyntErr] +6222 6222 [Preserve][ASCII] +6227 NULL [SyntErr] +625C NULL [SyntErr] +6E22 6E22 [Preserve][ASCII] +6E27 NULL [SyntErr] +6E5C NULL [SyntErr] +7222 7222 [Preserve][ASCII] +7227 NULL [SyntErr] +725C NULL [SyntErr] +7422 7422 [Preserve][ASCII] +7427 NULL [SyntErr] +745C NULL [SyntErr] +7E22 7E22 [Preserve][ASCII] +7E27 NULL [SyntErr] +7E5C NULL [SyntErr] +7F22 7F22 [Preserve][ASCII] +7F27 NULL [SyntErr] +7F5C NULL [SyntErr] +8022 8022 [Preserv][MB] +8027 NULL [SyntErr] +805C NULL [SyntErr] +8122 8122 [Preserv][MB] +8127 NULL [SyntErr] +815C NULL [SyntErr] +9F22 9F22 [Preserv][MB] +9F27 NULL [SyntErr] +9F5C NULL [SyntErr] +A022 A022 [Preserv][MB] +A027 NULL [SyntErr] +A05C NULL [SyntErr] +A122 A122 [Preserv][MB] +A127 NULL [SyntErr] +A15C NULL [SyntErr] +E022 E022 [Preserv][MB] +E027 NULL [SyntErr] +E05C NULL [SyntErr] +EF22 EF22 [Preserv][MB] +EF27 NULL [SyntErr] +EF5C NULL [SyntErr] +F922 F922 [Preserv][MB] +F927 NULL [SyntErr] +F95C NULL [SyntErr] +FA22 FA22 [Preserv][MB] +FA27 NULL [SyntErr] +FA5C NULL [SyntErr] +FC22 FC22 [Preserv][MB] +FC27 NULL [SyntErr] +FC5C NULL [SyntErr] +FD22 FD22 [Preserv][MB] +FD27 NULL [SyntErr] +FD5C NULL [SyntErr] +FE22 FE22 [Preserv][MB] +FE27 NULL [SyntErr] +FE5C NULL [SyntErr] +FF22 FF22 [Preserv][MB] +FF27 NULL [SyntErr] +FF5C NULL [SyntErr] +5C0000 0000 [Trivial] +5C0008 0008 [Trivial] +5C0009 0009 [Trivial] +5C000A 000A [Trivial] +5C000D 000D [Trivial] +5C001A 001A [Trivial] +5C0022 0022 [Trivial] +5C0025 0025 [Trivial] +5C0027 NULL [SyntErr] +5C0030 0030 [Trivial] +5C003F 003F [Trivial] +5C0040 0040 [Trivial] +5C005A 005A [Trivial] +5C005C NULL [SyntErr] +5C005F 005F [Trivial] +5C0061 0061 [Trivial] +5C0062 0062 [Trivial] +5C006E 006E [Trivial] +5C0072 0072 [Trivial] +5C0074 0074 [Trivial] +5C007E 007E [Trivial] +5C007F 007F [Trivial] +5C0080 0080 [Trivial] +5C0081 0081 [Trivial] +5C009F 009F [Trivial] +5C00A0 00A0 [Trivial] +5C00A1 00A1 [Trivial] +5C00E0 00E0 [Trivial] +5C00EF 00EF [Trivial] +5C00F9 00F9 [Trivial] +5C00FA 00FA [Trivial] +5C00FC 00FC [Trivial] +5C00FD 00FD [Trivial] +5C00FE 00FE [Trivial] +5C00FF 00FF [Trivial] +5C0800 0800 [Trivial] +5C0808 0808 [Trivial] +5C0809 0809 [Trivial] +5C080A 080A [Trivial] +5C080D 080D [Trivial] +5C081A 081A [Trivial] +5C0822 0822 [Trivial] +5C0825 0825 [Trivial] +5C0827 NULL [SyntErr] +5C0830 0830 [Trivial] +5C083F 083F [Trivial] +5C0840 0840 [Trivial] +5C085A 085A [Trivial] +5C085C NULL [SyntErr] +5C085F 085F [Trivial] +5C0861 0861 [Trivial] +5C0862 0862 [Trivial] +5C086E 086E [Trivial] +5C0872 0872 [Trivial] +5C0874 0874 [Trivial] +5C087E 087E [Trivial] +5C087F 087F [Trivial] +5C0880 0880 [Trivial] +5C0881 0881 [Trivial] +5C089F 089F [Trivial] +5C08A0 08A0 [Trivial] +5C08A1 08A1 [Trivial] +5C08E0 08E0 [Trivial] +5C08EF 08EF [Trivial] +5C08F9 08F9 [Trivial] +5C08FA 08FA [Trivial] +5C08FC 08FC [Trivial] +5C08FD 08FD [Trivial] +5C08FE 08FE [Trivial] +5C08FF 08FF [Trivial] +5C0900 0900 [Trivial] +5C0908 0908 [Trivial] +5C0909 0909 [Trivial] +5C090A 090A [Trivial] +5C090D 090D [Trivial] +5C091A 091A [Trivial] +5C0922 0922 [Trivial] +5C0925 0925 [Trivial] +5C0927 NULL [SyntErr] +5C0930 0930 [Trivial] +5C093F 093F [Trivial] +5C0940 0940 [Trivial] +5C095A 095A [Trivial] +5C095C NULL [SyntErr] +5C095F 095F [Trivial] +5C0961 0961 [Trivial] +5C0962 0962 [Trivial] +5C096E 096E [Trivial] +5C0972 0972 [Trivial] +5C0974 0974 [Trivial] +5C097E 097E [Trivial] +5C097F 097F [Trivial] +5C0980 0980 [Trivial] +5C0981 0981 [Trivial] +5C099F 099F [Trivial] +5C09A0 09A0 [Trivial] +5C09A1 09A1 [Trivial] +5C09E0 09E0 [Trivial] +5C09EF 09EF [Trivial] +5C09F9 09F9 [Trivial] +5C09FA 09FA [Trivial] +5C09FC 09FC [Trivial] +5C09FD 09FD [Trivial] +5C09FE 09FE [Trivial] +5C09FF 09FF [Trivial] +5C0A00 0A00 [Trivial] +5C0A08 0A08 [Trivial] +5C0A09 0A09 [Trivial] +5C0A0A 0A0A [Trivial] +5C0A0D 0A0D [Trivial] +5C0A1A 0A1A [Trivial] +5C0A22 0A22 [Trivial] +5C0A25 0A25 [Trivial] +5C0A27 NULL [SyntErr] +5C0A30 0A30 [Trivial] +5C0A3F 0A3F [Trivial] +5C0A40 0A40 [Trivial] +5C0A5A 0A5A [Trivial] +5C0A5C NULL [SyntErr] +5C0A5F 0A5F [Trivial] +5C0A61 0A61 [Trivial] +5C0A62 0A62 [Trivial] +5C0A6E 0A6E [Trivial] +5C0A72 0A72 [Trivial] +5C0A74 0A74 [Trivial] +5C0A7E 0A7E [Trivial] +5C0A7F 0A7F [Trivial] +5C0A80 0A80 [Trivial] +5C0A81 0A81 [Trivial] +5C0A9F 0A9F [Trivial] +5C0AA0 0AA0 [Trivial] +5C0AA1 0AA1 [Trivial] +5C0AE0 0AE0 [Trivial] +5C0AEF 0AEF [Trivial] +5C0AF9 0AF9 [Trivial] +5C0AFA 0AFA [Trivial] +5C0AFC 0AFC [Trivial] +5C0AFD 0AFD [Trivial] +5C0AFE 0AFE [Trivial] +5C0AFF 0AFF [Trivial] +5C0D00 0D00 [Trivial] +5C0D08 0D08 [Trivial] +5C0D09 0D09 [Trivial] +5C0D0A 0D0A [Trivial] +5C0D0D 0D0D [Trivial] +5C0D1A 0D1A [Trivial] +5C0D22 0D22 [Trivial] +5C0D25 0D25 [Trivial] +5C0D27 NULL [SyntErr] +5C0D30 0D30 [Trivial] +5C0D3F 0D3F [Trivial] +5C0D40 0D40 [Trivial] +5C0D5A 0D5A [Trivial] +5C0D5C NULL [SyntErr] +5C0D5F 0D5F [Trivial] +5C0D61 0D61 [Trivial] +5C0D62 0D62 [Trivial] +5C0D6E 0D6E [Trivial] +5C0D72 0D72 [Trivial] +5C0D74 0D74 [Trivial] +5C0D7E 0D7E [Trivial] +5C0D7F 0D7F [Trivial] +5C0D80 0D80 [Trivial] +5C0D81 0D81 [Trivial] +5C0D9F 0D9F [Trivial] +5C0DA0 0DA0 [Trivial] +5C0DA1 0DA1 [Trivial] +5C0DE0 0DE0 [Trivial] +5C0DEF 0DEF [Trivial] +5C0DF9 0DF9 [Trivial] +5C0DFA 0DFA [Trivial] +5C0DFC 0DFC [Trivial] +5C0DFD 0DFD [Trivial] +5C0DFE 0DFE [Trivial] +5C0DFF 0DFF [Trivial] +5C1A00 1A00 [Trivial] +5C1A08 1A08 [Trivial] +5C1A09 1A09 [Trivial] +5C1A0A 1A0A [Trivial] +5C1A0D 1A0D [Trivial] +5C1A1A 1A1A [Trivial] +5C1A22 1A22 [Trivial] +5C1A25 1A25 [Trivial] +5C1A27 NULL [SyntErr] +5C1A30 1A30 [Trivial] +5C1A3F 1A3F [Trivial] +5C1A40 1A40 [Trivial] +5C1A5A 1A5A [Trivial] +5C1A5C NULL [SyntErr] +5C1A5F 1A5F [Trivial] +5C1A61 1A61 [Trivial] +5C1A62 1A62 [Trivial] +5C1A6E 1A6E [Trivial] +5C1A72 1A72 [Trivial] +5C1A74 1A74 [Trivial] +5C1A7E 1A7E [Trivial] +5C1A7F 1A7F [Trivial] +5C1A80 1A80 [Trivial] +5C1A81 1A81 [Trivial] +5C1A9F 1A9F [Trivial] +5C1AA0 1AA0 [Trivial] +5C1AA1 1AA1 [Trivial] +5C1AE0 1AE0 [Trivial] +5C1AEF 1AEF [Trivial] +5C1AF9 1AF9 [Trivial] +5C1AFA 1AFA [Trivial] +5C1AFC 1AFC [Trivial] +5C1AFD 1AFD [Trivial] +5C1AFE 1AFE [Trivial] +5C1AFF 1AFF [Trivial] +5C2200 2200 [Trivial] +5C2208 2208 [Trivial] +5C2209 2209 [Trivial] +5C220A 220A [Trivial] +5C220D 220D [Trivial] +5C221A 221A [Trivial] +5C2222 2222 [Trivial] +5C2225 2225 [Trivial] +5C2227 NULL [SyntErr] +5C2230 2230 [Trivial] +5C223F 223F [Trivial] +5C2240 2240 [Trivial] +5C225A 225A [Trivial] +5C225C NULL [SyntErr] +5C225F 225F [Trivial] +5C2261 2261 [Trivial] +5C2262 2262 [Trivial] +5C226E 226E [Trivial] +5C2272 2272 [Trivial] +5C2274 2274 [Trivial] +5C227E 227E [Trivial] +5C227F 227F [Trivial] +5C2280 2280 [Trivial] +5C2281 2281 [Trivial] +5C229F 229F [Trivial] +5C22A0 22A0 [Trivial] +5C22A1 22A1 [Trivial] +5C22E0 22E0 [Trivial] +5C22EF 22EF [Trivial] +5C22F9 22F9 [Trivial] +5C22FA 22FA [Trivial] +5C22FC 22FC [Trivial] +5C22FD 22FD [Trivial] +5C22FE 22FE [Trivial] +5C22FF 22FF [Trivial] +5C2500 5C2500 [Preserve][LIKE] +5C2508 5C2508 [Preserve][LIKE] +5C2509 5C2509 [Preserve][LIKE] +5C250A 5C250A [Preserve][LIKE] +5C250D 5C250D [Preserve][LIKE] +5C251A 5C251A [Preserve][LIKE] +5C2522 5C2522 [Preserve][LIKE] +5C2525 5C2525 [Preserve][LIKE] +5C2527 NULL [SyntErr] +5C2530 5C2530 [Preserve][LIKE] +5C253F 5C253F [Preserve][LIKE] +5C2540 5C2540 [Preserve][LIKE] +5C255A 5C255A [Preserve][LIKE] +5C255C NULL [SyntErr] +5C255F 5C255F [Preserve][LIKE] +5C2561 5C2561 [Preserve][LIKE] +5C2562 5C2562 [Preserve][LIKE] +5C256E 5C256E [Preserve][LIKE] +5C2572 5C2572 [Preserve][LIKE] +5C2574 5C2574 [Preserve][LIKE] +5C257E 5C257E [Preserve][LIKE] +5C257F 5C257F [Preserve][LIKE] +5C2580 5C2580 [Preserve][LIKE] +5C2581 5C2581 [Preserve][LIKE] +5C259F 5C259F [Preserve][LIKE] +5C25A0 5C25A0 [Preserve][LIKE] +5C25A1 5C25A1 [Preserve][LIKE] +5C25E0 5C25E0 [Preserve][LIKE] +5C25EF 5C25EF [Preserve][LIKE] +5C25F9 5C25F9 [Preserve][LIKE] +5C25FA 5C25FA [Preserve][LIKE] +5C25FC 5C25FC [Preserve][LIKE] +5C25FD 5C25FD [Preserve][LIKE] +5C25FE 5C25FE [Preserve][LIKE] +5C25FF 5C25FF [Preserve][LIKE] +5C2700 2700 [Trivial] +5C2708 2708 [Trivial] +5C2709 2709 [Trivial] +5C270A 270A [Trivial] +5C270D 270D [Trivial] +5C271A 271A [Trivial] +5C2722 2722 [Trivial] +5C2725 2725 [Trivial] +5C2727 NULL [SyntErr] +5C2730 2730 [Trivial] +5C273F 273F [Trivial] +5C2740 2740 [Trivial] +5C275A 275A [Trivial] +5C275C NULL [SyntErr] +5C275F 275F [Trivial] +5C2761 2761 [Trivial] +5C2762 2762 [Trivial] +5C276E 276E [Trivial] +5C2772 2772 [Trivial] +5C2774 2774 [Trivial] +5C277E 277E [Trivial] +5C277F 277F [Trivial] +5C2780 2780 [Trivial] +5C2781 2781 [Trivial] +5C279F 279F [Trivial] +5C27A0 27A0 [Trivial] +5C27A1 27A1 [Trivial] +5C27E0 27E0 [Trivial] +5C27EF 27EF [Trivial] +5C27F9 27F9 [Trivial] +5C27FA 27FA [Trivial] +5C27FC 27FC [Trivial] +5C27FD 27FD [Trivial] +5C27FE 27FE [Trivial] +5C27FF 27FF [Trivial] +5C3000 0000 [Regular] +5C3008 0008 [Regular] +5C3009 0009 [Regular] +5C300A 000A [Regular] +5C300D 000D [Regular] +5C301A 001A [Regular] +5C3022 0022 [Regular] +5C3025 0025 [Regular] +5C3027 NULL [SyntErr] +5C3030 0030 [Regular] +5C303F 003F [Regular] +5C3040 0040 [Regular] +5C305A 005A [Regular] +5C305C NULL [SyntErr] +5C305F 005F [Regular] +5C3061 0061 [Regular] +5C3062 0062 [Regular] +5C306E 006E [Regular] +5C3072 0072 [Regular] +5C3074 0074 [Regular] +5C307E 007E [Regular] +5C307F 007F [Regular] +5C3080 0080 [Regular] +5C3081 0081 [Regular] +5C309F 009F [Regular] +5C30A0 00A0 [Regular] +5C30A1 00A1 [Regular] +5C30E0 00E0 [Regular] +5C30EF 00EF [Regular] +5C30F9 00F9 [Regular] +5C30FA 00FA [Regular] +5C30FC 00FC [Regular] +5C30FD 00FD [Regular] +5C30FE 00FE [Regular] +5C30FF 00FF [Regular] +5C3F00 3F00 [Trivial] +5C3F08 3F08 [Trivial] +5C3F09 3F09 [Trivial] +5C3F0A 3F0A [Trivial] +5C3F0D 3F0D [Trivial] +5C3F1A 3F1A [Trivial] +5C3F22 3F22 [Trivial] +5C3F25 3F25 [Trivial] +5C3F27 NULL [SyntErr] +5C3F30 3F30 [Trivial] +5C3F3F 3F3F [Trivial] +5C3F40 3F40 [Trivial] +5C3F5A 3F5A [Trivial] +5C3F5C NULL [SyntErr] +5C3F5F 3F5F [Trivial] +5C3F61 3F61 [Trivial] +5C3F62 3F62 [Trivial] +5C3F6E 3F6E [Trivial] +5C3F72 3F72 [Trivial] +5C3F74 3F74 [Trivial] +5C3F7E 3F7E [Trivial] +5C3F7F 3F7F [Trivial] +5C3F80 3F80 [Trivial] +5C3F81 3F81 [Trivial] +5C3F9F 3F9F [Trivial] +5C3FA0 3FA0 [Trivial] +5C3FA1 3FA1 [Trivial] +5C3FE0 3FE0 [Trivial] +5C3FEF 3FEF [Trivial] +5C3FF9 3FF9 [Trivial] +5C3FFA 3FFA [Trivial] +5C3FFC 3FFC [Trivial] +5C3FFD 3FFD [Trivial] +5C3FFE 3FFE [Trivial] +5C3FFF 3FFF [Trivial] +5C4000 4000 [Trivial] +5C4008 4008 [Trivial] +5C4009 4009 [Trivial] +5C400A 400A [Trivial] +5C400D 400D [Trivial] +5C401A 401A [Trivial] +5C4022 4022 [Trivial] +5C4025 4025 [Trivial] +5C4027 NULL [SyntErr] +5C4030 4030 [Trivial] +5C403F 403F [Trivial] +5C4040 4040 [Trivial] +5C405A 405A [Trivial] +5C405C NULL [SyntErr] +5C405F 405F [Trivial] +5C4061 4061 [Trivial] +5C4062 4062 [Trivial] +5C406E 406E [Trivial] +5C4072 4072 [Trivial] +5C4074 4074 [Trivial] +5C407E 407E [Trivial] +5C407F 407F [Trivial] +5C4080 4080 [Trivial] +5C4081 4081 [Trivial] +5C409F 409F [Trivial] +5C40A0 40A0 [Trivial] +5C40A1 40A1 [Trivial] +5C40E0 40E0 [Trivial] +5C40EF 40EF [Trivial] +5C40F9 40F9 [Trivial] +5C40FA 40FA [Trivial] +5C40FC 40FC [Trivial] +5C40FD 40FD [Trivial] +5C40FE 40FE [Trivial] +5C40FF 40FF [Trivial] +5C5A00 1A00 [Regular] +5C5A08 1A08 [Regular] +5C5A09 1A09 [Regular] +5C5A0A 1A0A [Regular] +5C5A0D 1A0D [Regular] +5C5A1A 1A1A [Regular] +5C5A22 1A22 [Regular] +5C5A25 1A25 [Regular] +5C5A27 NULL [SyntErr] +5C5A30 1A30 [Regular] +5C5A3F 1A3F [Regular] +5C5A40 1A40 [Regular] +5C5A5A 1A5A [Regular] +5C5A5C NULL [SyntErr] +5C5A5F 1A5F [Regular] +5C5A61 1A61 [Regular] +5C5A62 1A62 [Regular] +5C5A6E 1A6E [Regular] +5C5A72 1A72 [Regular] +5C5A74 1A74 [Regular] +5C5A7E 1A7E [Regular] +5C5A7F 1A7F [Regular] +5C5A80 1A80 [Regular] +5C5A81 1A81 [Regular] +5C5A9F 1A9F [Regular] +5C5AA0 1AA0 [Regular] +5C5AA1 1AA1 [Regular] +5C5AE0 1AE0 [Regular] +5C5AEF 1AEF [Regular] +5C5AF9 1AF9 [Regular] +5C5AFA 1AFA [Regular] +5C5AFC 1AFC [Regular] +5C5AFD 1AFD [Regular] +5C5AFE 1AFE [Regular] +5C5AFF 1AFF [Regular] +5C5C00 5C00 [Regular] +5C5C08 5C08 [Regular] +5C5C09 5C09 [Regular] +5C5C0A 5C0A [Regular] +5C5C0D 5C0D [Regular] +5C5C1A 5C1A [Regular] +5C5C22 5C22 [Regular] +5C5C25 5C25 [Regular] +5C5C27 NULL [SyntErr] +5C5C30 5C30 [Regular] +5C5C3F 5C3F [Regular] +5C5C40 5C40 [Regular] +5C5C5A 5C5A [Regular] +5C5C5C NULL [SyntErr] +5C5C5F 5C5F [Regular] +5C5C61 5C61 [Regular] +5C5C62 5C62 [Regular] +5C5C6E 5C6E [Regular] +5C5C72 5C72 [Regular] +5C5C74 5C74 [Regular] +5C5C7E 5C7E [Regular] +5C5C7F 5C7F [Regular] +5C5C80 5C80 [Regular] +5C5C81 5C81 [Regular] +5C5C9F 5C9F [Regular] +5C5CA0 5CA0 [Regular] +5C5CA1 5CA1 [Regular] +5C5CE0 5CE0 [Regular] +5C5CEF 5CEF [Regular] +5C5CF9 5CF9 [Regular] +5C5CFA 5CFA [Regular] +5C5CFC 5CFC [Regular] +5C5CFD 5CFD [Regular] +5C5CFE 5CFE [Regular] +5C5CFF 5CFF [Regular] +5C5F00 5C5F00 [Preserve][LIKE] +5C5F08 5C5F08 [Preserve][LIKE] +5C5F09 5C5F09 [Preserve][LIKE] +5C5F0A 5C5F0A [Preserve][LIKE] +5C5F0D 5C5F0D [Preserve][LIKE] +5C5F1A 5C5F1A [Preserve][LIKE] +5C5F22 5C5F22 [Preserve][LIKE] +5C5F25 5C5F25 [Preserve][LIKE] +5C5F27 NULL [SyntErr] +5C5F30 5C5F30 [Preserve][LIKE] +5C5F3F 5C5F3F [Preserve][LIKE] +5C5F40 5C5F40 [Preserve][LIKE] +5C5F5A 5C5F5A [Preserve][LIKE] +5C5F5C NULL [SyntErr] +5C5F5F 5C5F5F [Preserve][LIKE] +5C5F61 5C5F61 [Preserve][LIKE] +5C5F62 5C5F62 [Preserve][LIKE] +5C5F6E 5C5F6E [Preserve][LIKE] +5C5F72 5C5F72 [Preserve][LIKE] +5C5F74 5C5F74 [Preserve][LIKE] +5C5F7E 5C5F7E [Preserve][LIKE] +5C5F7F 5C5F7F [Preserve][LIKE] +5C5F80 5C5F80 [Preserve][LIKE] +5C5F81 5C5F81 [Preserve][LIKE] +5C5F9F 5C5F9F [Preserve][LIKE] +5C5FA0 5C5FA0 [Preserve][LIKE] +5C5FA1 5C5FA1 [Preserve][LIKE] +5C5FE0 5C5FE0 [Preserve][LIKE] +5C5FEF 5C5FEF [Preserve][LIKE] +5C5FF9 5C5FF9 [Preserve][LIKE] +5C5FFA 5C5FFA [Preserve][LIKE] +5C5FFC 5C5FFC [Preserve][LIKE] +5C5FFD 5C5FFD [Preserve][LIKE] +5C5FFE 5C5FFE [Preserve][LIKE] +5C5FFF 5C5FFF [Preserve][LIKE] +5C6100 6100 [Trivial] +5C6108 6108 [Trivial] +5C6109 6109 [Trivial] +5C610A 610A [Trivial] +5C610D 610D [Trivial] +5C611A 611A [Trivial] +5C6122 6122 [Trivial] +5C6125 6125 [Trivial] +5C6127 NULL [SyntErr] +5C6130 6130 [Trivial] +5C613F 613F [Trivial] +5C6140 6140 [Trivial] +5C615A 615A [Trivial] +5C615C NULL [SyntErr] +5C615F 615F [Trivial] +5C6161 6161 [Trivial] +5C6162 6162 [Trivial] +5C616E 616E [Trivial] +5C6172 6172 [Trivial] +5C6174 6174 [Trivial] +5C617E 617E [Trivial] +5C617F 617F [Trivial] +5C6180 6180 [Trivial] +5C6181 6181 [Trivial] +5C619F 619F [Trivial] +5C61A0 61A0 [Trivial] +5C61A1 61A1 [Trivial] +5C61E0 61E0 [Trivial] +5C61EF 61EF [Trivial] +5C61F9 61F9 [Trivial] +5C61FA 61FA [Trivial] +5C61FC 61FC [Trivial] +5C61FD 61FD [Trivial] +5C61FE 61FE [Trivial] +5C61FF 61FF [Trivial] +5C6200 0800 [Regular] +5C6208 0808 [Regular] +5C6209 0809 [Regular] +5C620A 080A [Regular] +5C620D 080D [Regular] +5C621A 081A [Regular] +5C6222 0822 [Regular] +5C6225 0825 [Regular] +5C6227 NULL [SyntErr] +5C6230 0830 [Regular] +5C623F 083F [Regular] +5C6240 0840 [Regular] +5C625A 085A [Regular] +5C625C NULL [SyntErr] +5C625F 085F [Regular] +5C6261 0861 [Regular] +5C6262 0862 [Regular] +5C626E 086E [Regular] +5C6272 0872 [Regular] +5C6274 0874 [Regular] +5C627E 087E [Regular] +5C627F 087F [Regular] +5C6280 0880 [Regular] +5C6281 0881 [Regular] +5C629F 089F [Regular] +5C62A0 08A0 [Regular] +5C62A1 08A1 [Regular] +5C62E0 08E0 [Regular] +5C62EF 08EF [Regular] +5C62F9 08F9 [Regular] +5C62FA 08FA [Regular] +5C62FC 08FC [Regular] +5C62FD 08FD [Regular] +5C62FE 08FE [Regular] +5C62FF 08FF [Regular] +5C6E00 0A00 [Regular] +5C6E08 0A08 [Regular] +5C6E09 0A09 [Regular] +5C6E0A 0A0A [Regular] +5C6E0D 0A0D [Regular] +5C6E1A 0A1A [Regular] +5C6E22 0A22 [Regular] +5C6E25 0A25 [Regular] +5C6E27 NULL [SyntErr] +5C6E30 0A30 [Regular] +5C6E3F 0A3F [Regular] +5C6E40 0A40 [Regular] +5C6E5A 0A5A [Regular] +5C6E5C NULL [SyntErr] +5C6E5F 0A5F [Regular] +5C6E61 0A61 [Regular] +5C6E62 0A62 [Regular] +5C6E6E 0A6E [Regular] +5C6E72 0A72 [Regular] +5C6E74 0A74 [Regular] +5C6E7E 0A7E [Regular] +5C6E7F 0A7F [Regular] +5C6E80 0A80 [Regular] +5C6E81 0A81 [Regular] +5C6E9F 0A9F [Regular] +5C6EA0 0AA0 [Regular] +5C6EA1 0AA1 [Regular] +5C6EE0 0AE0 [Regular] +5C6EEF 0AEF [Regular] +5C6EF9 0AF9 [Regular] +5C6EFA 0AFA [Regular] +5C6EFC 0AFC [Regular] +5C6EFD 0AFD [Regular] +5C6EFE 0AFE [Regular] +5C6EFF 0AFF [Regular] +5C7200 0D00 [Regular] +5C7208 0D08 [Regular] +5C7209 0D09 [Regular] +5C720A 0D0A [Regular] +5C720D 0D0D [Regular] +5C721A 0D1A [Regular] +5C7222 0D22 [Regular] +5C7225 0D25 [Regular] +5C7227 NULL [SyntErr] +5C7230 0D30 [Regular] +5C723F 0D3F [Regular] +5C7240 0D40 [Regular] +5C725A 0D5A [Regular] +5C725C NULL [SyntErr] +5C725F 0D5F [Regular] +5C7261 0D61 [Regular] +5C7262 0D62 [Regular] +5C726E 0D6E [Regular] +5C7272 0D72 [Regular] +5C7274 0D74 [Regular] +5C727E 0D7E [Regular] +5C727F 0D7F [Regular] +5C7280 0D80 [Regular] +5C7281 0D81 [Regular] +5C729F 0D9F [Regular] +5C72A0 0DA0 [Regular] +5C72A1 0DA1 [Regular] +5C72E0 0DE0 [Regular] +5C72EF 0DEF [Regular] +5C72F9 0DF9 [Regular] +5C72FA 0DFA [Regular] +5C72FC 0DFC [Regular] +5C72FD 0DFD [Regular] +5C72FE 0DFE [Regular] +5C72FF 0DFF [Regular] +5C7400 0900 [Regular] +5C7408 0908 [Regular] +5C7409 0909 [Regular] +5C740A 090A [Regular] +5C740D 090D [Regular] +5C741A 091A [Regular] +5C7422 0922 [Regular] +5C7425 0925 [Regular] +5C7427 NULL [SyntErr] +5C7430 0930 [Regular] +5C743F 093F [Regular] +5C7440 0940 [Regular] +5C745A 095A [Regular] +5C745C NULL [SyntErr] +5C745F 095F [Regular] +5C7461 0961 [Regular] +5C7462 0962 [Regular] +5C746E 096E [Regular] +5C7472 0972 [Regular] +5C7474 0974 [Regular] +5C747E 097E [Regular] +5C747F 097F [Regular] +5C7480 0980 [Regular] +5C7481 0981 [Regular] +5C749F 099F [Regular] +5C74A0 09A0 [Regular] +5C74A1 09A1 [Regular] +5C74E0 09E0 [Regular] +5C74EF 09EF [Regular] +5C74F9 09F9 [Regular] +5C74FA 09FA [Regular] +5C74FC 09FC [Regular] +5C74FD 09FD [Regular] +5C74FE 09FE [Regular] +5C74FF 09FF [Regular] +5C7E00 7E00 [Trivial] +5C7E08 7E08 [Trivial] +5C7E09 7E09 [Trivial] +5C7E0A 7E0A [Trivial] +5C7E0D 7E0D [Trivial] +5C7E1A 7E1A [Trivial] +5C7E22 7E22 [Trivial] +5C7E25 7E25 [Trivial] +5C7E27 NULL [SyntErr] +5C7E30 7E30 [Trivial] +5C7E3F 7E3F [Trivial] +5C7E40 7E40 [Trivial] +5C7E5A 7E5A [Trivial] +5C7E5C NULL [SyntErr] +5C7E5F 7E5F [Trivial] +5C7E61 7E61 [Trivial] +5C7E62 7E62 [Trivial] +5C7E6E 7E6E [Trivial] +5C7E72 7E72 [Trivial] +5C7E74 7E74 [Trivial] +5C7E7E 7E7E [Trivial] +5C7E7F 7E7F [Trivial] +5C7E80 7E80 [Trivial] +5C7E81 7E81 [Trivial] +5C7E9F 7E9F [Trivial] +5C7EA0 7EA0 [Trivial] +5C7EA1 7EA1 [Trivial] +5C7EE0 7EE0 [Trivial] +5C7EEF 7EEF [Trivial] +5C7EF9 7EF9 [Trivial] +5C7EFA 7EFA [Trivial] +5C7EFC 7EFC [Trivial] +5C7EFD 7EFD [Trivial] +5C7EFE 7EFE [Trivial] +5C7EFF 7EFF [Trivial] +5C7F00 7F00 [Trivial] +5C7F08 7F08 [Trivial] +5C7F09 7F09 [Trivial] +5C7F0A 7F0A [Trivial] +5C7F0D 7F0D [Trivial] +5C7F1A 7F1A [Trivial] +5C7F22 7F22 [Trivial] +5C7F25 7F25 [Trivial] +5C7F27 NULL [SyntErr] +5C7F30 7F30 [Trivial] +5C7F3F 7F3F [Trivial] +5C7F40 7F40 [Trivial] +5C7F5A 7F5A [Trivial] +5C7F5C NULL [SyntErr] +5C7F5F 7F5F [Trivial] +5C7F61 7F61 [Trivial] +5C7F62 7F62 [Trivial] +5C7F6E 7F6E [Trivial] +5C7F72 7F72 [Trivial] +5C7F74 7F74 [Trivial] +5C7F7E 7F7E [Trivial] +5C7F7F 7F7F [Trivial] +5C7F80 7F80 [Trivial] +5C7F81 7F81 [Trivial] +5C7F9F 7F9F [Trivial] +5C7FA0 7FA0 [Trivial] +5C7FA1 7FA1 [Trivial] +5C7FE0 7FE0 [Trivial] +5C7FEF 7FEF [Trivial] +5C7FF9 7FF9 [Trivial] +5C7FFA 7FFA [Trivial] +5C7FFC 7FFC [Trivial] +5C7FFD 7FFD [Trivial] +5C7FFE 7FFE [Trivial] +5C7FFF 7FFF [Trivial] +5C8000 8000 [Trivial] +5C8008 8008 [Trivial] +5C8009 8009 [Trivial] +5C800A 800A [Trivial] +5C800D 800D [Trivial] +5C801A 801A [Trivial] +5C8022 8022 [Trivial] +5C8025 8025 [Trivial] +5C8027 NULL [SyntErr] +5C8030 8030 [Trivial] +5C803F 803F [Trivial] +5C8040 8040 [Trivial] +5C805A 805A [Trivial] +5C805C NULL [SyntErr][USER] +5C805F 805F [Trivial] +5C8061 8061 [Trivial] +5C8062 8062 [Trivial] +5C806E 806E [Trivial] +5C8072 8072 [Trivial] +5C8074 8074 [Trivial] +5C807E 807E [Trivial] +5C807F 807F [Trivial] +5C8080 8080 [Trivial] +5C8081 8081 [Trivial] +5C809F 809F [Trivial] +5C80A0 80A0 [Trivial] +5C80A1 80A1 [Trivial] +5C80E0 80E0 [Trivial] +5C80EF 80EF [Trivial] +5C80F9 80F9 [Trivial] +5C80FA 80FA [Trivial] +5C80FC 80FC [Trivial] +5C80FD 80FD [Trivial] +5C80FE 80FE [Trivial] +5C80FF 80FF [Trivial] +5C8100 8100 [Trivial] +5C8108 8108 [Trivial] +5C8109 8109 [Trivial] +5C810A 810A [Trivial] +5C810D 810D [Trivial] +5C811A 811A [Trivial] +5C8122 8122 [Trivial] +5C8125 8125 [Trivial] +5C8127 NULL [SyntErr] +5C8130 8130 [Trivial] +5C813F 813F [Trivial] +5C8140 8140 [Trivial] +5C815A 815A [Trivial] +5C815C NULL [SyntErr][USER] +5C815F 815F [Trivial] +5C8161 8161 [Trivial] +5C8162 8162 [Trivial] +5C816E 816E [Trivial] +5C8172 8172 [Trivial] +5C8174 8174 [Trivial] +5C817E 817E [Trivial] +5C817F 817F [Trivial] +5C8180 8180 [Trivial] +5C8181 8181 [Trivial] +5C819F 819F [Trivial] +5C81A0 81A0 [Trivial] +5C81A1 81A1 [Trivial] +5C81E0 81E0 [Trivial] +5C81EF 81EF [Trivial] +5C81F9 81F9 [Trivial] +5C81FA 81FA [Trivial] +5C81FC 81FC [Trivial] +5C81FD 81FD [Trivial] +5C81FE 81FE [Trivial] +5C81FF 81FF [Trivial] +5C9F00 9F00 [Trivial] +5C9F08 9F08 [Trivial] +5C9F09 9F09 [Trivial] +5C9F0A 9F0A [Trivial] +5C9F0D 9F0D [Trivial] +5C9F1A 9F1A [Trivial] +5C9F22 9F22 [Trivial] +5C9F25 9F25 [Trivial] +5C9F27 NULL [SyntErr] +5C9F30 9F30 [Trivial] +5C9F3F 9F3F [Trivial] +5C9F40 9F40 [Trivial] +5C9F5A 9F5A [Trivial] +5C9F5C NULL [SyntErr][USER] +5C9F5F 9F5F [Trivial] +5C9F61 9F61 [Trivial] +5C9F62 9F62 [Trivial] +5C9F6E 9F6E [Trivial] +5C9F72 9F72 [Trivial] +5C9F74 9F74 [Trivial] +5C9F7E 9F7E [Trivial] +5C9F7F 9F7F [Trivial] +5C9F80 9F80 [Trivial] +5C9F81 9F81 [Trivial] +5C9F9F 9F9F [Trivial] +5C9FA0 9FA0 [Trivial] +5C9FA1 9FA1 [Trivial] +5C9FE0 9FE0 [Trivial] +5C9FEF 9FEF [Trivial] +5C9FF9 9FF9 [Trivial] +5C9FFA 9FFA [Trivial] +5C9FFC 9FFC [Trivial] +5C9FFD 9FFD [Trivial] +5C9FFE 9FFE [Trivial] +5C9FFF 9FFF [Trivial] +5CA000 A000 [Trivial] +5CA008 A008 [Trivial] +5CA009 A009 [Trivial] +5CA00A A00A [Trivial] +5CA00D A00D [Trivial] +5CA01A A01A [Trivial] +5CA022 A022 [Trivial] +5CA025 A025 [Trivial] +5CA027 NULL [SyntErr] +5CA030 A030 [Trivial] +5CA03F A03F [Trivial] +5CA040 A040 [Trivial] +5CA05A A05A [Trivial] +5CA05C NULL [SyntErr][USER] +5CA05F A05F [Trivial] +5CA061 A061 [Trivial] +5CA062 A062 [Trivial] +5CA06E A06E [Trivial] +5CA072 A072 [Trivial] +5CA074 A074 [Trivial] +5CA07E A07E [Trivial] +5CA07F A07F [Trivial] +5CA080 A080 [Trivial] +5CA081 A081 [Trivial] +5CA09F A09F [Trivial] +5CA0A0 A0A0 [Trivial] +5CA0A1 A0A1 [Trivial] +5CA0E0 A0E0 [Trivial] +5CA0EF A0EF [Trivial] +5CA0F9 A0F9 [Trivial] +5CA0FA A0FA [Trivial] +5CA0FC A0FC [Trivial] +5CA0FD A0FD [Trivial] +5CA0FE A0FE [Trivial] +5CA0FF A0FF [Trivial] +5CA100 A100 [Trivial] +5CA108 A108 [Trivial] +5CA109 A109 [Trivial] +5CA10A A10A [Trivial] +5CA10D A10D [Trivial] +5CA11A A11A [Trivial] +5CA122 A122 [Trivial] +5CA125 A125 [Trivial] +5CA127 NULL [SyntErr] +5CA130 A130 [Trivial] +5CA13F A13F [Trivial] +5CA140 A140 [Trivial] +5CA15A A15A [Trivial] +5CA15C NULL [SyntErr][USER] +5CA15F A15F [Trivial] +5CA161 A161 [Trivial] +5CA162 A162 [Trivial] +5CA16E A16E [Trivial] +5CA172 A172 [Trivial] +5CA174 A174 [Trivial] +5CA17E A17E [Trivial] +5CA17F A17F [Trivial] +5CA180 A180 [Trivial] +5CA181 A181 [Trivial] +5CA19F A19F [Trivial] +5CA1A0 A1A0 [Trivial] +5CA1A1 A1A1 [Trivial] +5CA1E0 A1E0 [Trivial] +5CA1EF A1EF [Trivial] +5CA1F9 A1F9 [Trivial] +5CA1FA A1FA [Trivial] +5CA1FC A1FC [Trivial] +5CA1FD A1FD [Trivial] +5CA1FE A1FE [Trivial] +5CA1FF A1FF [Trivial] +5CE000 E000 [Trivial] +5CE008 E008 [Trivial] +5CE009 E009 [Trivial] +5CE00A E00A [Trivial] +5CE00D E00D [Trivial] +5CE01A E01A [Trivial] +5CE022 E022 [Trivial] +5CE025 E025 [Trivial] +5CE027 NULL [SyntErr] +5CE030 E030 [Trivial] +5CE03F E03F [Trivial] +5CE040 E040 [Trivial] +5CE05A E05A [Trivial] +5CE05C NULL [SyntErr][USER] +5CE05F E05F [Trivial] +5CE061 E061 [Trivial] +5CE062 E062 [Trivial] +5CE06E E06E [Trivial] +5CE072 E072 [Trivial] +5CE074 E074 [Trivial] +5CE07E E07E [Trivial] +5CE07F E07F [Trivial] +5CE080 E080 [Trivial] +5CE081 E081 [Trivial] +5CE09F E09F [Trivial] +5CE0A0 E0A0 [Trivial] +5CE0A1 E0A1 [Trivial] +5CE0E0 E0E0 [Trivial] +5CE0EF E0EF [Trivial] +5CE0F9 E0F9 [Trivial] +5CE0FA E0FA [Trivial] +5CE0FC E0FC [Trivial] +5CE0FD E0FD [Trivial] +5CE0FE E0FE [Trivial] +5CE0FF E0FF [Trivial] +5CEF00 EF00 [Trivial] +5CEF08 EF08 [Trivial] +5CEF09 EF09 [Trivial] +5CEF0A EF0A [Trivial] +5CEF0D EF0D [Trivial] +5CEF1A EF1A [Trivial] +5CEF22 EF22 [Trivial] +5CEF25 EF25 [Trivial] +5CEF27 NULL [SyntErr] +5CEF30 EF30 [Trivial] +5CEF3F EF3F [Trivial] +5CEF40 EF40 [Trivial] +5CEF5A EF5A [Trivial] +5CEF5C NULL [SyntErr][USER] +5CEF5F EF5F [Trivial] +5CEF61 EF61 [Trivial] +5CEF62 EF62 [Trivial] +5CEF6E EF6E [Trivial] +5CEF72 EF72 [Trivial] +5CEF74 EF74 [Trivial] +5CEF7E EF7E [Trivial] +5CEF7F EF7F [Trivial] +5CEF80 EF80 [Trivial] +5CEF81 EF81 [Trivial] +5CEF9F EF9F [Trivial] +5CEFA0 EFA0 [Trivial] +5CEFA1 EFA1 [Trivial] +5CEFE0 EFE0 [Trivial] +5CEFEF EFEF [Trivial] +5CEFF9 EFF9 [Trivial] +5CEFFA EFFA [Trivial] +5CEFFC EFFC [Trivial] +5CEFFD EFFD [Trivial] +5CEFFE EFFE [Trivial] +5CEFFF EFFF [Trivial] +5CF900 F900 [Trivial] +5CF908 F908 [Trivial] +5CF909 F909 [Trivial] +5CF90A F90A [Trivial] +5CF90D F90D [Trivial] +5CF91A F91A [Trivial] +5CF922 F922 [Trivial] +5CF925 F925 [Trivial] +5CF927 NULL [SyntErr] +5CF930 F930 [Trivial] +5CF93F F93F [Trivial] +5CF940 F940 [Trivial] +5CF95A F95A [Trivial] +5CF95C NULL [SyntErr][USER] +5CF95F F95F [Trivial] +5CF961 F961 [Trivial] +5CF962 F962 [Trivial] +5CF96E F96E [Trivial] +5CF972 F972 [Trivial] +5CF974 F974 [Trivial] +5CF97E F97E [Trivial] +5CF97F F97F [Trivial] +5CF980 F980 [Trivial] +5CF981 F981 [Trivial] +5CF99F F99F [Trivial] +5CF9A0 F9A0 [Trivial] +5CF9A1 F9A1 [Trivial] +5CF9E0 F9E0 [Trivial] +5CF9EF F9EF [Trivial] +5CF9F9 F9F9 [Trivial] +5CF9FA F9FA [Trivial] +5CF9FC F9FC [Trivial] +5CF9FD F9FD [Trivial] +5CF9FE F9FE [Trivial] +5CF9FF F9FF [Trivial] +5CFA00 FA00 [Trivial] +5CFA08 FA08 [Trivial] +5CFA09 FA09 [Trivial] +5CFA0A FA0A [Trivial] +5CFA0D FA0D [Trivial] +5CFA1A FA1A [Trivial] +5CFA22 FA22 [Trivial] +5CFA25 FA25 [Trivial] +5CFA27 NULL [SyntErr] +5CFA30 FA30 [Trivial] +5CFA3F FA3F [Trivial] +5CFA40 FA40 [Trivial] +5CFA5A FA5A [Trivial] +5CFA5C NULL [SyntErr][USER] +5CFA5F FA5F [Trivial] +5CFA61 FA61 [Trivial] +5CFA62 FA62 [Trivial] +5CFA6E FA6E [Trivial] +5CFA72 FA72 [Trivial] +5CFA74 FA74 [Trivial] +5CFA7E FA7E [Trivial] +5CFA7F FA7F [Trivial] +5CFA80 FA80 [Trivial] +5CFA81 FA81 [Trivial] +5CFA9F FA9F [Trivial] +5CFAA0 FAA0 [Trivial] +5CFAA1 FAA1 [Trivial] +5CFAE0 FAE0 [Trivial] +5CFAEF FAEF [Trivial] +5CFAF9 FAF9 [Trivial] +5CFAFA FAFA [Trivial] +5CFAFC FAFC [Trivial] +5CFAFD FAFD [Trivial] +5CFAFE FAFE [Trivial] +5CFAFF FAFF [Trivial] +5CFC00 FC00 [Trivial] +5CFC08 FC08 [Trivial] +5CFC09 FC09 [Trivial] +5CFC0A FC0A [Trivial] +5CFC0D FC0D [Trivial] +5CFC1A FC1A [Trivial] +5CFC22 FC22 [Trivial] +5CFC25 FC25 [Trivial] +5CFC27 NULL [SyntErr] +5CFC30 FC30 [Trivial] +5CFC3F FC3F [Trivial] +5CFC40 FC40 [Trivial] +5CFC5A FC5A [Trivial] +5CFC5C NULL [SyntErr][USER] +5CFC5F FC5F [Trivial] +5CFC61 FC61 [Trivial] +5CFC62 FC62 [Trivial] +5CFC6E FC6E [Trivial] +5CFC72 FC72 [Trivial] +5CFC74 FC74 [Trivial] +5CFC7E FC7E [Trivial] +5CFC7F FC7F [Trivial] +5CFC80 FC80 [Trivial] +5CFC81 FC81 [Trivial] +5CFC9F FC9F [Trivial] +5CFCA0 FCA0 [Trivial] +5CFCA1 FCA1 [Trivial] +5CFCE0 FCE0 [Trivial] +5CFCEF FCEF [Trivial] +5CFCF9 FCF9 [Trivial] +5CFCFA FCFA [Trivial] +5CFCFC FCFC [Trivial] +5CFCFD FCFD [Trivial] +5CFCFE FCFE [Trivial] +5CFCFF FCFF [Trivial] +5CFD00 FD00 [Trivial] +5CFD08 FD08 [Trivial] +5CFD09 FD09 [Trivial] +5CFD0A FD0A [Trivial] +5CFD0D FD0D [Trivial] +5CFD1A FD1A [Trivial] +5CFD22 FD22 [Trivial] +5CFD25 FD25 [Trivial] +5CFD27 NULL [SyntErr] +5CFD30 FD30 [Trivial] +5CFD3F FD3F [Trivial] +5CFD40 FD40 [Trivial] +5CFD5A FD5A [Trivial] +5CFD5C NULL [SyntErr][USER] +5CFD5F FD5F [Trivial] +5CFD61 FD61 [Trivial] +5CFD62 FD62 [Trivial] +5CFD6E FD6E [Trivial] +5CFD72 FD72 [Trivial] +5CFD74 FD74 [Trivial] +5CFD7E FD7E [Trivial] +5CFD7F FD7F [Trivial] +5CFD80 FD80 [Trivial] +5CFD81 FD81 [Trivial] +5CFD9F FD9F [Trivial] +5CFDA0 FDA0 [Trivial] +5CFDA1 FDA1 [Trivial] +5CFDE0 FDE0 [Trivial] +5CFDEF FDEF [Trivial] +5CFDF9 FDF9 [Trivial] +5CFDFA FDFA [Trivial] +5CFDFC FDFC [Trivial] +5CFDFD FDFD [Trivial] +5CFDFE FDFE [Trivial] +5CFDFF FDFF [Trivial] +5CFE00 FE00 [Trivial] +5CFE08 FE08 [Trivial] +5CFE09 FE09 [Trivial] +5CFE0A FE0A [Trivial] +5CFE0D FE0D [Trivial] +5CFE1A FE1A [Trivial] +5CFE22 FE22 [Trivial] +5CFE25 FE25 [Trivial] +5CFE27 NULL [SyntErr] +5CFE30 FE30 [Trivial] +5CFE3F FE3F [Trivial] +5CFE40 FE40 [Trivial] +5CFE5A FE5A [Trivial] +5CFE5C NULL [SyntErr][USER] +5CFE5F FE5F [Trivial] +5CFE61 FE61 [Trivial] +5CFE62 FE62 [Trivial] +5CFE6E FE6E [Trivial] +5CFE72 FE72 [Trivial] +5CFE74 FE74 [Trivial] +5CFE7E FE7E [Trivial] +5CFE7F FE7F [Trivial] +5CFE80 FE80 [Trivial] +5CFE81 FE81 [Trivial] +5CFE9F FE9F [Trivial] +5CFEA0 FEA0 [Trivial] +5CFEA1 FEA1 [Trivial] +5CFEE0 FEE0 [Trivial] +5CFEEF FEEF [Trivial] +5CFEF9 FEF9 [Trivial] +5CFEFA FEFA [Trivial] +5CFEFC FEFC [Trivial] +5CFEFD FEFD [Trivial] +5CFEFE FEFE [Trivial] +5CFEFF FEFF [Trivial] +5CFF00 FF00 [Trivial] +5CFF08 FF08 [Trivial] +5CFF09 FF09 [Trivial] +5CFF0A FF0A [Trivial] +5CFF0D FF0D [Trivial] +5CFF1A FF1A [Trivial] +5CFF22 FF22 [Trivial] +5CFF25 FF25 [Trivial] +5CFF27 NULL [SyntErr] +5CFF30 FF30 [Trivial] +5CFF3F FF3F [Trivial] +5CFF40 FF40 [Trivial] +5CFF5A FF5A [Trivial] +5CFF5C NULL [SyntErr][USER] +5CFF5F FF5F [Trivial] +5CFF61 FF61 [Trivial] +5CFF62 FF62 [Trivial] +5CFF6E FF6E [Trivial] +5CFF72 FF72 [Trivial] +5CFF74 FF74 [Trivial] +5CFF7E FF7E [Trivial] +5CFF7F FF7F [Trivial] +5CFF80 FF80 [Trivial] +5CFF81 FF81 [Trivial] +5CFF9F FF9F [Trivial] +5CFFA0 FFA0 [Trivial] +5CFFA1 FFA1 [Trivial] +5CFFE0 FFE0 [Trivial] +5CFFEF FFEF [Trivial] +5CFFF9 FFF9 [Trivial] +5CFFFA FFFA [Trivial] +5CFFFC FFFC [Trivial] +5CFFFD FFFD [Trivial] +5CFFFE FFFE [Trivial] +5CFFFF FFFF [Trivial] +5C005C00 0000 [Trivial] +5C005C08 0008 [Trivial] +5C005C09 0009 [Trivial] +5C005C0A 000A [Trivial] +5C005C0D 000D [Trivial] +5C005C1A 001A [Trivial] +5C005C22 0022 [Trivial] +5C005C25 005C25 [Regular] +5C005C27 0027 [Trivial] +5C005C30 0000 [Regular] +5C005C3F 003F [Trivial] +5C005C40 0040 [Trivial] +5C005C5A 001A [Regular] +5C005C5C 005C [Regular] +5C005C5F 005C5F [Regular] +5C005C61 0061 [Trivial] +5C005C62 0008 [Regular] +5C005C6E 000A [Regular] +5C005C72 000D [Regular] +5C005C74 0009 [Regular] +5C005C7E 007E [Trivial] +5C005C7F 007F [Trivial] +5C005C80 0080 [Trivial] +5C005C81 0081 [Trivial] +5C005C9F 009F [Trivial] +5C005CA0 00A0 [Trivial] +5C005CA1 00A1 [Trivial] +5C005CE0 00E0 [Trivial] +5C005CEF 00EF [Trivial] +5C005CF9 00F9 [Trivial] +5C005CFA 00FA [Trivial] +5C005CFC 00FC [Trivial] +5C005CFD 00FD [Trivial] +5C005CFE 00FE [Trivial] +5C005CFF 00FF [Trivial] +5C085C00 0800 [Trivial] +5C085C08 0808 [Trivial] +5C085C09 0809 [Trivial] +5C085C0A 080A [Trivial] +5C085C0D 080D [Trivial] +5C085C1A 081A [Trivial] +5C085C22 0822 [Trivial] +5C085C25 085C25 [Regular] +5C085C27 0827 [Trivial] +5C085C30 0800 [Regular] +5C085C3F 083F [Trivial] +5C085C40 0840 [Trivial] +5C085C5A 081A [Regular] +5C085C5C 085C [Regular] +5C085C5F 085C5F [Regular] +5C085C61 0861 [Trivial] +5C085C62 0808 [Regular] +5C085C6E 080A [Regular] +5C085C72 080D [Regular] +5C085C74 0809 [Regular] +5C085C7E 087E [Trivial] +5C085C7F 087F [Trivial] +5C085C80 0880 [Trivial] +5C085C81 0881 [Trivial] +5C085C9F 089F [Trivial] +5C085CA0 08A0 [Trivial] +5C085CA1 08A1 [Trivial] +5C085CE0 08E0 [Trivial] +5C085CEF 08EF [Trivial] +5C085CF9 08F9 [Trivial] +5C085CFA 08FA [Trivial] +5C085CFC 08FC [Trivial] +5C085CFD 08FD [Trivial] +5C085CFE 08FE [Trivial] +5C085CFF 08FF [Trivial] +5C095C00 0900 [Trivial] +5C095C08 0908 [Trivial] +5C095C09 0909 [Trivial] +5C095C0A 090A [Trivial] +5C095C0D 090D [Trivial] +5C095C1A 091A [Trivial] +5C095C22 0922 [Trivial] +5C095C25 095C25 [Regular] +5C095C27 0927 [Trivial] +5C095C30 0900 [Regular] +5C095C3F 093F [Trivial] +5C095C40 0940 [Trivial] +5C095C5A 091A [Regular] +5C095C5C 095C [Regular] +5C095C5F 095C5F [Regular] +5C095C61 0961 [Trivial] +5C095C62 0908 [Regular] +5C095C6E 090A [Regular] +5C095C72 090D [Regular] +5C095C74 0909 [Regular] +5C095C7E 097E [Trivial] +5C095C7F 097F [Trivial] +5C095C80 0980 [Trivial] +5C095C81 0981 [Trivial] +5C095C9F 099F [Trivial] +5C095CA0 09A0 [Trivial] +5C095CA1 09A1 [Trivial] +5C095CE0 09E0 [Trivial] +5C095CEF 09EF [Trivial] +5C095CF9 09F9 [Trivial] +5C095CFA 09FA [Trivial] +5C095CFC 09FC [Trivial] +5C095CFD 09FD [Trivial] +5C095CFE 09FE [Trivial] +5C095CFF 09FF [Trivial] +5C0A5C00 0A00 [Trivial] +5C0A5C08 0A08 [Trivial] +5C0A5C09 0A09 [Trivial] +5C0A5C0A 0A0A [Trivial] +5C0A5C0D 0A0D [Trivial] +5C0A5C1A 0A1A [Trivial] +5C0A5C22 0A22 [Trivial] +5C0A5C25 0A5C25 [Regular] +5C0A5C27 0A27 [Trivial] +5C0A5C30 0A00 [Regular] +5C0A5C3F 0A3F [Trivial] +5C0A5C40 0A40 [Trivial] +5C0A5C5A 0A1A [Regular] +5C0A5C5C 0A5C [Regular] +5C0A5C5F 0A5C5F [Regular] +5C0A5C61 0A61 [Trivial] +5C0A5C62 0A08 [Regular] +5C0A5C6E 0A0A [Regular] +5C0A5C72 0A0D [Regular] +5C0A5C74 0A09 [Regular] +5C0A5C7E 0A7E [Trivial] +5C0A5C7F 0A7F [Trivial] +5C0A5C80 0A80 [Trivial] +5C0A5C81 0A81 [Trivial] +5C0A5C9F 0A9F [Trivial] +5C0A5CA0 0AA0 [Trivial] +5C0A5CA1 0AA1 [Trivial] +5C0A5CE0 0AE0 [Trivial] +5C0A5CEF 0AEF [Trivial] +5C0A5CF9 0AF9 [Trivial] +5C0A5CFA 0AFA [Trivial] +5C0A5CFC 0AFC [Trivial] +5C0A5CFD 0AFD [Trivial] +5C0A5CFE 0AFE [Trivial] +5C0A5CFF 0AFF [Trivial] +5C0D5C00 0D00 [Trivial] +5C0D5C08 0D08 [Trivial] +5C0D5C09 0D09 [Trivial] +5C0D5C0A 0D0A [Trivial] +5C0D5C0D 0D0D [Trivial] +5C0D5C1A 0D1A [Trivial] +5C0D5C22 0D22 [Trivial] +5C0D5C25 0D5C25 [Regular] +5C0D5C27 0D27 [Trivial] +5C0D5C30 0D00 [Regular] +5C0D5C3F 0D3F [Trivial] +5C0D5C40 0D40 [Trivial] +5C0D5C5A 0D1A [Regular] +5C0D5C5C 0D5C [Regular] +5C0D5C5F 0D5C5F [Regular] +5C0D5C61 0D61 [Trivial] +5C0D5C62 0D08 [Regular] +5C0D5C6E 0D0A [Regular] +5C0D5C72 0D0D [Regular] +5C0D5C74 0D09 [Regular] +5C0D5C7E 0D7E [Trivial] +5C0D5C7F 0D7F [Trivial] +5C0D5C80 0D80 [Trivial] +5C0D5C81 0D81 [Trivial] +5C0D5C9F 0D9F [Trivial] +5C0D5CA0 0DA0 [Trivial] +5C0D5CA1 0DA1 [Trivial] +5C0D5CE0 0DE0 [Trivial] +5C0D5CEF 0DEF [Trivial] +5C0D5CF9 0DF9 [Trivial] +5C0D5CFA 0DFA [Trivial] +5C0D5CFC 0DFC [Trivial] +5C0D5CFD 0DFD [Trivial] +5C0D5CFE 0DFE [Trivial] +5C0D5CFF 0DFF [Trivial] +5C1A5C00 1A00 [Trivial] +5C1A5C08 1A08 [Trivial] +5C1A5C09 1A09 [Trivial] +5C1A5C0A 1A0A [Trivial] +5C1A5C0D 1A0D [Trivial] +5C1A5C1A 1A1A [Trivial] +5C1A5C22 1A22 [Trivial] +5C1A5C25 1A5C25 [Regular] +5C1A5C27 1A27 [Trivial] +5C1A5C30 1A00 [Regular] +5C1A5C3F 1A3F [Trivial] +5C1A5C40 1A40 [Trivial] +5C1A5C5A 1A1A [Regular] +5C1A5C5C 1A5C [Regular] +5C1A5C5F 1A5C5F [Regular] +5C1A5C61 1A61 [Trivial] +5C1A5C62 1A08 [Regular] +5C1A5C6E 1A0A [Regular] +5C1A5C72 1A0D [Regular] +5C1A5C74 1A09 [Regular] +5C1A5C7E 1A7E [Trivial] +5C1A5C7F 1A7F [Trivial] +5C1A5C80 1A80 [Trivial] +5C1A5C81 1A81 [Trivial] +5C1A5C9F 1A9F [Trivial] +5C1A5CA0 1AA0 [Trivial] +5C1A5CA1 1AA1 [Trivial] +5C1A5CE0 1AE0 [Trivial] +5C1A5CEF 1AEF [Trivial] +5C1A5CF9 1AF9 [Trivial] +5C1A5CFA 1AFA [Trivial] +5C1A5CFC 1AFC [Trivial] +5C1A5CFD 1AFD [Trivial] +5C1A5CFE 1AFE [Trivial] +5C1A5CFF 1AFF [Trivial] +5C225C00 2200 [Trivial] +5C225C08 2208 [Trivial] +5C225C09 2209 [Trivial] +5C225C0A 220A [Trivial] +5C225C0D 220D [Trivial] +5C225C1A 221A [Trivial] +5C225C22 2222 [Trivial] +5C225C25 225C25 [Regular] +5C225C27 2227 [Trivial] +5C225C30 2200 [Regular] +5C225C3F 223F [Trivial] +5C225C40 2240 [Trivial] +5C225C5A 221A [Regular] +5C225C5C 225C [Regular] +5C225C5F 225C5F [Regular] +5C225C61 2261 [Trivial] +5C225C62 2208 [Regular] +5C225C6E 220A [Regular] +5C225C72 220D [Regular] +5C225C74 2209 [Regular] +5C225C7E 227E [Trivial] +5C225C7F 227F [Trivial] +5C225C80 2280 [Trivial] +5C225C81 2281 [Trivial] +5C225C9F 229F [Trivial] +5C225CA0 22A0 [Trivial] +5C225CA1 22A1 [Trivial] +5C225CE0 22E0 [Trivial] +5C225CEF 22EF [Trivial] +5C225CF9 22F9 [Trivial] +5C225CFA 22FA [Trivial] +5C225CFC 22FC [Trivial] +5C225CFD 22FD [Trivial] +5C225CFE 22FE [Trivial] +5C225CFF 22FF [Trivial] +5C255C00 5C2500 [Regular] +5C255C08 5C2508 [Regular] +5C255C09 5C2509 [Regular] +5C255C0A 5C250A [Regular] +5C255C0D 5C250D [Regular] +5C255C1A 5C251A [Regular] +5C255C22 5C2522 [Regular] +5C255C25 5C255C25 [Preserve][LIKE] +5C255C27 5C2527 [Regular] +5C255C30 5C2500 [Regular] +5C255C3F 5C253F [Regular] +5C255C40 5C2540 [Regular] +5C255C5A 5C251A [Regular] +5C255C5C 5C255C [Regular] +5C255C5F 5C255C5F [Preserve][LIKE] +5C255C61 5C2561 [Regular] +5C255C62 5C2508 [Regular] +5C255C6E 5C250A [Regular] +5C255C72 5C250D [Regular] +5C255C74 5C2509 [Regular] +5C255C7E 5C257E [Regular] +5C255C7F 5C257F [Regular] +5C255C80 5C2580 [Regular] +5C255C81 5C2581 [Regular] +5C255C9F 5C259F [Regular] +5C255CA0 5C25A0 [Regular] +5C255CA1 5C25A1 [Regular] +5C255CE0 5C25E0 [Regular] +5C255CEF 5C25EF [Regular] +5C255CF9 5C25F9 [Regular] +5C255CFA 5C25FA [Regular] +5C255CFC 5C25FC [Regular] +5C255CFD 5C25FD [Regular] +5C255CFE 5C25FE [Regular] +5C255CFF 5C25FF [Regular] +5C275C00 2700 [Trivial] +5C275C08 2708 [Trivial] +5C275C09 2709 [Trivial] +5C275C0A 270A [Trivial] +5C275C0D 270D [Trivial] +5C275C1A 271A [Trivial] +5C275C22 2722 [Trivial] +5C275C25 275C25 [Regular] +5C275C27 2727 [Trivial] +5C275C30 2700 [Regular] +5C275C3F 273F [Trivial] +5C275C40 2740 [Trivial] +5C275C5A 271A [Regular] +5C275C5C 275C [Regular] +5C275C5F 275C5F [Regular] +5C275C61 2761 [Trivial] +5C275C62 2708 [Regular] +5C275C6E 270A [Regular] +5C275C72 270D [Regular] +5C275C74 2709 [Regular] +5C275C7E 277E [Trivial] +5C275C7F 277F [Trivial] +5C275C80 2780 [Trivial] +5C275C81 2781 [Trivial] +5C275C9F 279F [Trivial] +5C275CA0 27A0 [Trivial] +5C275CA1 27A1 [Trivial] +5C275CE0 27E0 [Trivial] +5C275CEF 27EF [Trivial] +5C275CF9 27F9 [Trivial] +5C275CFA 27FA [Trivial] +5C275CFC 27FC [Trivial] +5C275CFD 27FD [Trivial] +5C275CFE 27FE [Trivial] +5C275CFF 27FF [Trivial] +5C305C00 0000 [Regular] +5C305C08 0008 [Regular] +5C305C09 0009 [Regular] +5C305C0A 000A [Regular] +5C305C0D 000D [Regular] +5C305C1A 001A [Regular] +5C305C22 0022 [Regular] +5C305C25 005C25 [Regular] +5C305C27 0027 [Regular] +5C305C30 0000 [Regular] +5C305C3F 003F [Regular] +5C305C40 0040 [Regular] +5C305C5A 001A [Regular] +5C305C5C 005C [Regular] +5C305C5F 005C5F [Regular] +5C305C61 0061 [Regular] +5C305C62 0008 [Regular] +5C305C6E 000A [Regular] +5C305C72 000D [Regular] +5C305C74 0009 [Regular] +5C305C7E 007E [Regular] +5C305C7F 007F [Regular] +5C305C80 0080 [Regular] +5C305C81 0081 [Regular] +5C305C9F 009F [Regular] +5C305CA0 00A0 [Regular] +5C305CA1 00A1 [Regular] +5C305CE0 00E0 [Regular] +5C305CEF 00EF [Regular] +5C305CF9 00F9 [Regular] +5C305CFA 00FA [Regular] +5C305CFC 00FC [Regular] +5C305CFD 00FD [Regular] +5C305CFE 00FE [Regular] +5C305CFF 00FF [Regular] +5C3F5C00 3F00 [Trivial] +5C3F5C08 3F08 [Trivial] +5C3F5C09 3F09 [Trivial] +5C3F5C0A 3F0A [Trivial] +5C3F5C0D 3F0D [Trivial] +5C3F5C1A 3F1A [Trivial] +5C3F5C22 3F22 [Trivial] +5C3F5C25 3F5C25 [Regular] +5C3F5C27 3F27 [Trivial] +5C3F5C30 3F00 [Regular] +5C3F5C3F 3F3F [Trivial] +5C3F5C40 3F40 [Trivial] +5C3F5C5A 3F1A [Regular] +5C3F5C5C 3F5C [Regular] +5C3F5C5F 3F5C5F [Regular] +5C3F5C61 3F61 [Trivial] +5C3F5C62 3F08 [Regular] +5C3F5C6E 3F0A [Regular] +5C3F5C72 3F0D [Regular] +5C3F5C74 3F09 [Regular] +5C3F5C7E 3F7E [Trivial] +5C3F5C7F 3F7F [Trivial] +5C3F5C80 3F80 [Trivial] +5C3F5C81 3F81 [Trivial] +5C3F5C9F 3F9F [Trivial] +5C3F5CA0 3FA0 [Trivial] +5C3F5CA1 3FA1 [Trivial] +5C3F5CE0 3FE0 [Trivial] +5C3F5CEF 3FEF [Trivial] +5C3F5CF9 3FF9 [Trivial] +5C3F5CFA 3FFA [Trivial] +5C3F5CFC 3FFC [Trivial] +5C3F5CFD 3FFD [Trivial] +5C3F5CFE 3FFE [Trivial] +5C3F5CFF 3FFF [Trivial] +5C405C00 4000 [Trivial] +5C405C08 4008 [Trivial] +5C405C09 4009 [Trivial] +5C405C0A 400A [Trivial] +5C405C0D 400D [Trivial] +5C405C1A 401A [Trivial] +5C405C22 4022 [Trivial] +5C405C25 405C25 [Regular] +5C405C27 4027 [Trivial] +5C405C30 4000 [Regular] +5C405C3F 403F [Trivial] +5C405C40 4040 [Trivial] +5C405C5A 401A [Regular] +5C405C5C 405C [Regular] +5C405C5F 405C5F [Regular] +5C405C61 4061 [Trivial] +5C405C62 4008 [Regular] +5C405C6E 400A [Regular] +5C405C72 400D [Regular] +5C405C74 4009 [Regular] +5C405C7E 407E [Trivial] +5C405C7F 407F [Trivial] +5C405C80 4080 [Trivial] +5C405C81 4081 [Trivial] +5C405C9F 409F [Trivial] +5C405CA0 40A0 [Trivial] +5C405CA1 40A1 [Trivial] +5C405CE0 40E0 [Trivial] +5C405CEF 40EF [Trivial] +5C405CF9 40F9 [Trivial] +5C405CFA 40FA [Trivial] +5C405CFC 40FC [Trivial] +5C405CFD 40FD [Trivial] +5C405CFE 40FE [Trivial] +5C405CFF 40FF [Trivial] +5C5A5C00 1A00 [Regular] +5C5A5C08 1A08 [Regular] +5C5A5C09 1A09 [Regular] +5C5A5C0A 1A0A [Regular] +5C5A5C0D 1A0D [Regular] +5C5A5C1A 1A1A [Regular] +5C5A5C22 1A22 [Regular] +5C5A5C25 1A5C25 [Regular] +5C5A5C27 1A27 [Regular] +5C5A5C30 1A00 [Regular] +5C5A5C3F 1A3F [Regular] +5C5A5C40 1A40 [Regular] +5C5A5C5A 1A1A [Regular] +5C5A5C5C 1A5C [Regular] +5C5A5C5F 1A5C5F [Regular] +5C5A5C61 1A61 [Regular] +5C5A5C62 1A08 [Regular] +5C5A5C6E 1A0A [Regular] +5C5A5C72 1A0D [Regular] +5C5A5C74 1A09 [Regular] +5C5A5C7E 1A7E [Regular] +5C5A5C7F 1A7F [Regular] +5C5A5C80 1A80 [Regular] +5C5A5C81 1A81 [Regular] +5C5A5C9F 1A9F [Regular] +5C5A5CA0 1AA0 [Regular] +5C5A5CA1 1AA1 [Regular] +5C5A5CE0 1AE0 [Regular] +5C5A5CEF 1AEF [Regular] +5C5A5CF9 1AF9 [Regular] +5C5A5CFA 1AFA [Regular] +5C5A5CFC 1AFC [Regular] +5C5A5CFD 1AFD [Regular] +5C5A5CFE 1AFE [Regular] +5C5A5CFF 1AFF [Regular] +5C5C5C00 5C00 [Regular] +5C5C5C08 5C08 [Regular] +5C5C5C09 5C09 [Regular] +5C5C5C0A 5C0A [Regular] +5C5C5C0D 5C0D [Regular] +5C5C5C1A 5C1A [Regular] +5C5C5C22 5C22 [Regular] +5C5C5C25 5C5C25 [Regular] +5C5C5C27 5C27 [Regular] +5C5C5C30 5C00 [Regular] +5C5C5C3F 5C3F [Regular] +5C5C5C40 5C40 [Regular] +5C5C5C5A 5C1A [Regular] +5C5C5C5C 5C5C [Regular] +5C5C5C5F 5C5C5F [Regular] +5C5C5C61 5C61 [Regular] +5C5C5C62 5C08 [Regular] +5C5C5C6E 5C0A [Regular] +5C5C5C72 5C0D [Regular] +5C5C5C74 5C09 [Regular] +5C5C5C7E 5C7E [Regular] +5C5C5C7F 5C7F [Regular] +5C5C5C80 5C80 [Regular] +5C5C5C81 5C81 [Regular] +5C5C5C9F 5C9F [Regular] +5C5C5CA0 5CA0 [Regular] +5C5C5CA1 5CA1 [Regular] +5C5C5CE0 5CE0 [Regular] +5C5C5CEF 5CEF [Regular] +5C5C5CF9 5CF9 [Regular] +5C5C5CFA 5CFA [Regular] +5C5C5CFC 5CFC [Regular] +5C5C5CFD 5CFD [Regular] +5C5C5CFE 5CFE [Regular] +5C5C5CFF 5CFF [Regular] +5C5F5C00 5C5F00 [Regular] +5C5F5C08 5C5F08 [Regular] +5C5F5C09 5C5F09 [Regular] +5C5F5C0A 5C5F0A [Regular] +5C5F5C0D 5C5F0D [Regular] +5C5F5C1A 5C5F1A [Regular] +5C5F5C22 5C5F22 [Regular] +5C5F5C25 5C5F5C25 [Preserve][LIKE] +5C5F5C27 5C5F27 [Regular] +5C5F5C30 5C5F00 [Regular] +5C5F5C3F 5C5F3F [Regular] +5C5F5C40 5C5F40 [Regular] +5C5F5C5A 5C5F1A [Regular] +5C5F5C5C 5C5F5C [Regular] +5C5F5C5F 5C5F5C5F [Preserve][LIKE] +5C5F5C61 5C5F61 [Regular] +5C5F5C62 5C5F08 [Regular] +5C5F5C6E 5C5F0A [Regular] +5C5F5C72 5C5F0D [Regular] +5C5F5C74 5C5F09 [Regular] +5C5F5C7E 5C5F7E [Regular] +5C5F5C7F 5C5F7F [Regular] +5C5F5C80 5C5F80 [Regular] +5C5F5C81 5C5F81 [Regular] +5C5F5C9F 5C5F9F [Regular] +5C5F5CA0 5C5FA0 [Regular] +5C5F5CA1 5C5FA1 [Regular] +5C5F5CE0 5C5FE0 [Regular] +5C5F5CEF 5C5FEF [Regular] +5C5F5CF9 5C5FF9 [Regular] +5C5F5CFA 5C5FFA [Regular] +5C5F5CFC 5C5FFC [Regular] +5C5F5CFD 5C5FFD [Regular] +5C5F5CFE 5C5FFE [Regular] +5C5F5CFF 5C5FFF [Regular] +5C615C00 6100 [Trivial] +5C615C08 6108 [Trivial] +5C615C09 6109 [Trivial] +5C615C0A 610A [Trivial] +5C615C0D 610D [Trivial] +5C615C1A 611A [Trivial] +5C615C22 6122 [Trivial] +5C615C25 615C25 [Regular] +5C615C27 6127 [Trivial] +5C615C30 6100 [Regular] +5C615C3F 613F [Trivial] +5C615C40 6140 [Trivial] +5C615C5A 611A [Regular] +5C615C5C 615C [Regular] +5C615C5F 615C5F [Regular] +5C615C61 6161 [Trivial] +5C615C62 6108 [Regular] +5C615C6E 610A [Regular] +5C615C72 610D [Regular] +5C615C74 6109 [Regular] +5C615C7E 617E [Trivial] +5C615C7F 617F [Trivial] +5C615C80 6180 [Trivial] +5C615C81 6181 [Trivial] +5C615C9F 619F [Trivial] +5C615CA0 61A0 [Trivial] +5C615CA1 61A1 [Trivial] +5C615CE0 61E0 [Trivial] +5C615CEF 61EF [Trivial] +5C615CF9 61F9 [Trivial] +5C615CFA 61FA [Trivial] +5C615CFC 61FC [Trivial] +5C615CFD 61FD [Trivial] +5C615CFE 61FE [Trivial] +5C615CFF 61FF [Trivial] +5C625C00 0800 [Regular] +5C625C08 0808 [Regular] +5C625C09 0809 [Regular] +5C625C0A 080A [Regular] +5C625C0D 080D [Regular] +5C625C1A 081A [Regular] +5C625C22 0822 [Regular] +5C625C25 085C25 [Regular] +5C625C27 0827 [Regular] +5C625C30 0800 [Regular] +5C625C3F 083F [Regular] +5C625C40 0840 [Regular] +5C625C5A 081A [Regular] +5C625C5C 085C [Regular] +5C625C5F 085C5F [Regular] +5C625C61 0861 [Regular] +5C625C62 0808 [Regular] +5C625C6E 080A [Regular] +5C625C72 080D [Regular] +5C625C74 0809 [Regular] +5C625C7E 087E [Regular] +5C625C7F 087F [Regular] +5C625C80 0880 [Regular] +5C625C81 0881 [Regular] +5C625C9F 089F [Regular] +5C625CA0 08A0 [Regular] +5C625CA1 08A1 [Regular] +5C625CE0 08E0 [Regular] +5C625CEF 08EF [Regular] +5C625CF9 08F9 [Regular] +5C625CFA 08FA [Regular] +5C625CFC 08FC [Regular] +5C625CFD 08FD [Regular] +5C625CFE 08FE [Regular] +5C625CFF 08FF [Regular] +5C6E5C00 0A00 [Regular] +5C6E5C08 0A08 [Regular] +5C6E5C09 0A09 [Regular] +5C6E5C0A 0A0A [Regular] +5C6E5C0D 0A0D [Regular] +5C6E5C1A 0A1A [Regular] +5C6E5C22 0A22 [Regular] +5C6E5C25 0A5C25 [Regular] +5C6E5C27 0A27 [Regular] +5C6E5C30 0A00 [Regular] +5C6E5C3F 0A3F [Regular] +5C6E5C40 0A40 [Regular] +5C6E5C5A 0A1A [Regular] +5C6E5C5C 0A5C [Regular] +5C6E5C5F 0A5C5F [Regular] +5C6E5C61 0A61 [Regular] +5C6E5C62 0A08 [Regular] +5C6E5C6E 0A0A [Regular] +5C6E5C72 0A0D [Regular] +5C6E5C74 0A09 [Regular] +5C6E5C7E 0A7E [Regular] +5C6E5C7F 0A7F [Regular] +5C6E5C80 0A80 [Regular] +5C6E5C81 0A81 [Regular] +5C6E5C9F 0A9F [Regular] +5C6E5CA0 0AA0 [Regular] +5C6E5CA1 0AA1 [Regular] +5C6E5CE0 0AE0 [Regular] +5C6E5CEF 0AEF [Regular] +5C6E5CF9 0AF9 [Regular] +5C6E5CFA 0AFA [Regular] +5C6E5CFC 0AFC [Regular] +5C6E5CFD 0AFD [Regular] +5C6E5CFE 0AFE [Regular] +5C6E5CFF 0AFF [Regular] +5C725C00 0D00 [Regular] +5C725C08 0D08 [Regular] +5C725C09 0D09 [Regular] +5C725C0A 0D0A [Regular] +5C725C0D 0D0D [Regular] +5C725C1A 0D1A [Regular] +5C725C22 0D22 [Regular] +5C725C25 0D5C25 [Regular] +5C725C27 0D27 [Regular] +5C725C30 0D00 [Regular] +5C725C3F 0D3F [Regular] +5C725C40 0D40 [Regular] +5C725C5A 0D1A [Regular] +5C725C5C 0D5C [Regular] +5C725C5F 0D5C5F [Regular] +5C725C61 0D61 [Regular] +5C725C62 0D08 [Regular] +5C725C6E 0D0A [Regular] +5C725C72 0D0D [Regular] +5C725C74 0D09 [Regular] +5C725C7E 0D7E [Regular] +5C725C7F 0D7F [Regular] +5C725C80 0D80 [Regular] +5C725C81 0D81 [Regular] +5C725C9F 0D9F [Regular] +5C725CA0 0DA0 [Regular] +5C725CA1 0DA1 [Regular] +5C725CE0 0DE0 [Regular] +5C725CEF 0DEF [Regular] +5C725CF9 0DF9 [Regular] +5C725CFA 0DFA [Regular] +5C725CFC 0DFC [Regular] +5C725CFD 0DFD [Regular] +5C725CFE 0DFE [Regular] +5C725CFF 0DFF [Regular] +5C745C00 0900 [Regular] +5C745C08 0908 [Regular] +5C745C09 0909 [Regular] +5C745C0A 090A [Regular] +5C745C0D 090D [Regular] +5C745C1A 091A [Regular] +5C745C22 0922 [Regular] +5C745C25 095C25 [Regular] +5C745C27 0927 [Regular] +5C745C30 0900 [Regular] +5C745C3F 093F [Regular] +5C745C40 0940 [Regular] +5C745C5A 091A [Regular] +5C745C5C 095C [Regular] +5C745C5F 095C5F [Regular] +5C745C61 0961 [Regular] +5C745C62 0908 [Regular] +5C745C6E 090A [Regular] +5C745C72 090D [Regular] +5C745C74 0909 [Regular] +5C745C7E 097E [Regular] +5C745C7F 097F [Regular] +5C745C80 0980 [Regular] +5C745C81 0981 [Regular] +5C745C9F 099F [Regular] +5C745CA0 09A0 [Regular] +5C745CA1 09A1 [Regular] +5C745CE0 09E0 [Regular] +5C745CEF 09EF [Regular] +5C745CF9 09F9 [Regular] +5C745CFA 09FA [Regular] +5C745CFC 09FC [Regular] +5C745CFD 09FD [Regular] +5C745CFE 09FE [Regular] +5C745CFF 09FF [Regular] +5C7E5C00 7E00 [Trivial] +5C7E5C08 7E08 [Trivial] +5C7E5C09 7E09 [Trivial] +5C7E5C0A 7E0A [Trivial] +5C7E5C0D 7E0D [Trivial] +5C7E5C1A 7E1A [Trivial] +5C7E5C22 7E22 [Trivial] +5C7E5C25 7E5C25 [Regular] +5C7E5C27 7E27 [Trivial] +5C7E5C30 7E00 [Regular] +5C7E5C3F 7E3F [Trivial] +5C7E5C40 7E40 [Trivial] +5C7E5C5A 7E1A [Regular] +5C7E5C5C 7E5C [Regular] +5C7E5C5F 7E5C5F [Regular] +5C7E5C61 7E61 [Trivial] +5C7E5C62 7E08 [Regular] +5C7E5C6E 7E0A [Regular] +5C7E5C72 7E0D [Regular] +5C7E5C74 7E09 [Regular] +5C7E5C7E 7E7E [Trivial] +5C7E5C7F 7E7F [Trivial] +5C7E5C80 7E80 [Trivial] +5C7E5C81 7E81 [Trivial] +5C7E5C9F 7E9F [Trivial] +5C7E5CA0 7EA0 [Trivial] +5C7E5CA1 7EA1 [Trivial] +5C7E5CE0 7EE0 [Trivial] +5C7E5CEF 7EEF [Trivial] +5C7E5CF9 7EF9 [Trivial] +5C7E5CFA 7EFA [Trivial] +5C7E5CFC 7EFC [Trivial] +5C7E5CFD 7EFD [Trivial] +5C7E5CFE 7EFE [Trivial] +5C7E5CFF 7EFF [Trivial] +5C7F5C00 7F00 [Trivial] +5C7F5C08 7F08 [Trivial] +5C7F5C09 7F09 [Trivial] +5C7F5C0A 7F0A [Trivial] +5C7F5C0D 7F0D [Trivial] +5C7F5C1A 7F1A [Trivial] +5C7F5C22 7F22 [Trivial] +5C7F5C25 7F5C25 [Regular] +5C7F5C27 7F27 [Trivial] +5C7F5C30 7F00 [Regular] +5C7F5C3F 7F3F [Trivial] +5C7F5C40 7F40 [Trivial] +5C7F5C5A 7F1A [Regular] +5C7F5C5C 7F5C [Regular] +5C7F5C5F 7F5C5F [Regular] +5C7F5C61 7F61 [Trivial] +5C7F5C62 7F08 [Regular] +5C7F5C6E 7F0A [Regular] +5C7F5C72 7F0D [Regular] +5C7F5C74 7F09 [Regular] +5C7F5C7E 7F7E [Trivial] +5C7F5C7F 7F7F [Trivial] +5C7F5C80 7F80 [Trivial] +5C7F5C81 7F81 [Trivial] +5C7F5C9F 7F9F [Trivial] +5C7F5CA0 7FA0 [Trivial] +5C7F5CA1 7FA1 [Trivial] +5C7F5CE0 7FE0 [Trivial] +5C7F5CEF 7FEF [Trivial] +5C7F5CF9 7FF9 [Trivial] +5C7F5CFA 7FFA [Trivial] +5C7F5CFC 7FFC [Trivial] +5C7F5CFD 7FFD [Trivial] +5C7F5CFE 7FFE [Trivial] +5C7F5CFF 7FFF [Trivial] +5C805C00 8000 [Trivial][USER] +5C805C08 8008 [Trivial][USER] +5C805C09 8009 [Trivial][USER] +5C805C0A 800A [Trivial][USER] +5C805C0D 800D [Trivial][USER] +5C805C1A 801A [Trivial][USER] +5C805C22 8022 [Trivial][USER] +5C805C25 805C25 [Regular] +5C805C27 8027 [Trivial][USER] +5C805C30 8000 [Regular] +5C805C3F 803F [Trivial][USER] +5C805C40 8040 [Trivial][USER] +5C805C5A 801A [Regular] +5C805C5C 805C [Regular][USER] +5C805C5F 805C5F [Regular] +5C805C61 8061 [Trivial][USER] +5C805C62 8008 [Regular][USER] +5C805C6E 800A [Regular] +5C805C72 800D [Regular] +5C805C74 8009 [Regular] +5C805C7E 807E [Trivial][USER] +5C805C7F 807F [Trivial][USER] +5C805C80 8080 [Trivial][USER] +5C805C81 8081 [Trivial][USER] +5C805C9F 809F [Trivial][USER] +5C805CA0 80A0 [Trivial][USER] +5C805CA1 80A1 [Trivial][USER] +5C805CE0 80E0 [Trivial][USER] +5C805CEF 80EF [Trivial][USER] +5C805CF9 80F9 [Trivial][USER] +5C805CFA 80FA [Trivial][USER] +5C805CFC 80FC [Trivial][USER] +5C805CFD 80FD [Trivial][USER] +5C805CFE 80FE [Trivial][USER] +5C805CFF 80FF [Trivial][USER] +5C815C00 8100 [Trivial][USER] +5C815C08 8108 [Trivial][USER] +5C815C09 8109 [Trivial][USER] +5C815C0A 810A [Trivial][USER] +5C815C0D 810D [Trivial][USER] +5C815C1A 811A [Trivial][USER] +5C815C22 8122 [Trivial][USER] +5C815C25 815C25 [Regular] +5C815C27 8127 [Trivial][USER] +5C815C30 8100 [Regular] +5C815C3F 813F [Trivial][USER] +5C815C40 8140 [Trivial][USER] +5C815C5A 811A [Regular] +5C815C5C 815C [Regular][USER] +5C815C5F 815C5F [Regular] +5C815C61 8161 [Trivial][USER] +5C815C62 8108 [Regular][USER] +5C815C6E 810A [Regular] +5C815C72 810D [Regular] +5C815C74 8109 [Regular] +5C815C7E 817E [Trivial][USER] +5C815C7F 817F [Trivial][USER] +5C815C80 8180 [Trivial][USER] +5C815C81 8181 [Trivial][USER] +5C815C9F 819F [Trivial][USER] +5C815CA0 81A0 [Trivial][USER] +5C815CA1 81A1 [Trivial][USER] +5C815CE0 81E0 [Trivial][USER] +5C815CEF 81EF [Trivial][USER] +5C815CF9 81F9 [Trivial][USER] +5C815CFA 81FA [Trivial][USER] +5C815CFC 81FC [Trivial][USER] +5C815CFD 81FD [Trivial][USER] +5C815CFE 81FE [Trivial][USER] +5C815CFF 81FF [Trivial][USER] +5C9F5C00 9F00 [Trivial][USER] +5C9F5C08 9F08 [Trivial][USER] +5C9F5C09 9F09 [Trivial][USER] +5C9F5C0A 9F0A [Trivial][USER] +5C9F5C0D 9F0D [Trivial][USER] +5C9F5C1A 9F1A [Trivial][USER] +5C9F5C22 9F22 [Trivial][USER] +5C9F5C25 9F5C25 [Regular] +5C9F5C27 9F27 [Trivial][USER] +5C9F5C30 9F00 [Regular] +5C9F5C3F 9F3F [Trivial][USER] +5C9F5C40 9F40 [Trivial][USER] +5C9F5C5A 9F1A [Regular] +5C9F5C5C 9F5C [Regular][USER] +5C9F5C5F 9F5C5F [Regular] +5C9F5C61 9F61 [Trivial][USER] +5C9F5C62 9F08 [Regular][USER] +5C9F5C6E 9F0A [Regular] +5C9F5C72 9F0D [Regular] +5C9F5C74 9F09 [Regular] +5C9F5C7E 9F7E [Trivial][USER] +5C9F5C7F 9F7F [Trivial][USER] +5C9F5C80 9F80 [Trivial][USER] +5C9F5C81 9F81 [Trivial][USER] +5C9F5C9F 9F9F [Trivial][USER] +5C9F5CA0 9FA0 [Trivial][USER] +5C9F5CA1 9FA1 [Trivial][USER] +5C9F5CE0 9FE0 [Trivial][USER] +5C9F5CEF 9FEF [Trivial][USER] +5C9F5CF9 9FF9 [Trivial][USER] +5C9F5CFA 9FFA [Trivial][USER] +5C9F5CFC 9FFC [Trivial][USER] +5C9F5CFD 9FFD [Trivial][USER] +5C9F5CFE 9FFE [Trivial][USER] +5C9F5CFF 9FFF [Trivial][USER] +5CA05C00 A000 [Trivial][USER] +5CA05C08 A008 [Trivial][USER] +5CA05C09 A009 [Trivial][USER] +5CA05C0A A00A [Trivial][USER] +5CA05C0D A00D [Trivial][USER] +5CA05C1A A01A [Trivial][USER] +5CA05C22 A022 [Trivial][USER] +5CA05C25 A05C25 [Regular] +5CA05C27 A027 [Trivial][USER] +5CA05C30 A000 [Regular] +5CA05C3F A03F [Trivial][USER] +5CA05C40 A040 [Trivial][USER] +5CA05C5A A01A [Regular] +5CA05C5C A05C [Regular][USER] +5CA05C5F A05C5F [Regular] +5CA05C61 A061 [Trivial][USER] +5CA05C62 A008 [Regular][USER] +5CA05C6E A00A [Regular] +5CA05C72 A00D [Regular] +5CA05C74 A009 [Regular] +5CA05C7E A07E [Trivial][USER] +5CA05C7F A07F [Trivial][USER] +5CA05C80 A080 [Trivial][USER] +5CA05C81 A081 [Trivial][USER] +5CA05C9F A09F [Trivial][USER] +5CA05CA0 A0A0 [Trivial][USER] +5CA05CA1 A0A1 [Trivial][USER] +5CA05CE0 A0E0 [Trivial][USER] +5CA05CEF A0EF [Trivial][USER] +5CA05CF9 A0F9 [Trivial][USER] +5CA05CFA A0FA [Trivial][USER] +5CA05CFC A0FC [Trivial][USER] +5CA05CFD A0FD [Trivial][USER] +5CA05CFE A0FE [Trivial][USER] +5CA05CFF A0FF [Trivial][USER] +5CA15C00 A100 [Trivial][USER] +5CA15C08 A108 [Trivial][USER] +5CA15C09 A109 [Trivial][USER] +5CA15C0A A10A [Trivial][USER] +5CA15C0D A10D [Trivial][USER] +5CA15C1A A11A [Trivial][USER] +5CA15C22 A122 [Trivial][USER] +5CA15C25 A15C25 [Regular] +5CA15C27 A127 [Trivial][USER] +5CA15C30 A100 [Regular] +5CA15C3F A13F [Trivial][USER] +5CA15C40 A140 [Trivial][USER] +5CA15C5A A11A [Regular] +5CA15C5C A15C [Regular][USER] +5CA15C5F A15C5F [Regular] +5CA15C61 A161 [Trivial][USER] +5CA15C62 A108 [Regular][USER] +5CA15C6E A10A [Regular] +5CA15C72 A10D [Regular] +5CA15C74 A109 [Regular] +5CA15C7E A17E [Trivial][USER] +5CA15C7F A17F [Trivial][USER] +5CA15C80 A180 [Trivial][USER] +5CA15C81 A181 [Trivial][USER] +5CA15C9F A19F [Trivial][USER] +5CA15CA0 A1A0 [Trivial][USER] +5CA15CA1 A1A1 [Trivial][USER] +5CA15CE0 A1E0 [Trivial][USER] +5CA15CEF A1EF [Trivial][USER] +5CA15CF9 A1F9 [Trivial][USER] +5CA15CFA A1FA [Trivial][USER] +5CA15CFC A1FC [Trivial][USER] +5CA15CFD A1FD [Trivial][USER] +5CA15CFE A1FE [Trivial][USER] +5CA15CFF A1FF [Trivial][USER] +5CE05C00 E000 [Trivial][USER] +5CE05C08 E008 [Trivial][USER] +5CE05C09 E009 [Trivial][USER] +5CE05C0A E00A [Trivial][USER] +5CE05C0D E00D [Trivial][USER] +5CE05C1A E01A [Trivial][USER] +5CE05C22 E022 [Trivial][USER] +5CE05C25 E05C25 [Regular] +5CE05C27 E027 [Trivial][USER] +5CE05C30 E000 [Regular] +5CE05C3F E03F [Trivial][USER] +5CE05C40 E040 [Trivial][USER] +5CE05C5A E01A [Regular] +5CE05C5C E05C [Regular][USER] +5CE05C5F E05C5F [Regular] +5CE05C61 E061 [Trivial][USER] +5CE05C62 E008 [Regular][USER] +5CE05C6E E00A [Regular] +5CE05C72 E00D [Regular] +5CE05C74 E009 [Regular] +5CE05C7E E07E [Trivial][USER] +5CE05C7F E07F [Trivial][USER] +5CE05C80 E080 [Trivial][USER] +5CE05C81 E081 [Trivial][USER] +5CE05C9F E09F [Trivial][USER] +5CE05CA0 E0A0 [Trivial][USER] +5CE05CA1 E0A1 [Trivial][USER] +5CE05CE0 E0E0 [Trivial][USER] +5CE05CEF E0EF [Trivial][USER] +5CE05CF9 E0F9 [Trivial][USER] +5CE05CFA E0FA [Trivial][USER] +5CE05CFC E0FC [Trivial][USER] +5CE05CFD E0FD [Trivial][USER] +5CE05CFE E0FE [Trivial][USER] +5CE05CFF E0FF [Trivial][USER] +5CEF5C00 EF00 [Trivial][USER] +5CEF5C08 EF08 [Trivial][USER] +5CEF5C09 EF09 [Trivial][USER] +5CEF5C0A EF0A [Trivial][USER] +5CEF5C0D EF0D [Trivial][USER] +5CEF5C1A EF1A [Trivial][USER] +5CEF5C22 EF22 [Trivial][USER] +5CEF5C25 EF5C25 [Regular] +5CEF5C27 EF27 [Trivial][USER] +5CEF5C30 EF00 [Regular] +5CEF5C3F EF3F [Trivial][USER] +5CEF5C40 EF40 [Trivial][USER] +5CEF5C5A EF1A [Regular] +5CEF5C5C EF5C [Regular][USER] +5CEF5C5F EF5C5F [Regular] +5CEF5C61 EF61 [Trivial][USER] +5CEF5C62 EF08 [Regular][USER] +5CEF5C6E EF0A [Regular] +5CEF5C72 EF0D [Regular] +5CEF5C74 EF09 [Regular] +5CEF5C7E EF7E [Trivial][USER] +5CEF5C7F EF7F [Trivial][USER] +5CEF5C80 EF80 [Trivial][USER] +5CEF5C81 EF81 [Trivial][USER] +5CEF5C9F EF9F [Trivial][USER] +5CEF5CA0 EFA0 [Trivial][USER] +5CEF5CA1 EFA1 [Trivial][USER] +5CEF5CE0 EFE0 [Trivial][USER] +5CEF5CEF EFEF [Trivial][USER] +5CEF5CF9 EFF9 [Trivial][USER] +5CEF5CFA EFFA [Trivial][USER] +5CEF5CFC EFFC [Trivial][USER] +5CEF5CFD EFFD [Trivial][USER] +5CEF5CFE EFFE [Trivial][USER] +5CEF5CFF EFFF [Trivial][USER] +5CF95C00 F900 [Trivial][USER] +5CF95C08 F908 [Trivial][USER] +5CF95C09 F909 [Trivial][USER] +5CF95C0A F90A [Trivial][USER] +5CF95C0D F90D [Trivial][USER] +5CF95C1A F91A [Trivial][USER] +5CF95C22 F922 [Trivial][USER] +5CF95C25 F95C25 [Regular] +5CF95C27 F927 [Trivial][USER] +5CF95C30 F900 [Regular] +5CF95C3F F93F [Trivial][USER] +5CF95C40 F940 [Trivial][USER] +5CF95C5A F91A [Regular] +5CF95C5C F95C [Regular][USER] +5CF95C5F F95C5F [Regular] +5CF95C61 F961 [Trivial][USER] +5CF95C62 F908 [Regular][USER] +5CF95C6E F90A [Regular] +5CF95C72 F90D [Regular] +5CF95C74 F909 [Regular] +5CF95C7E F97E [Trivial][USER] +5CF95C7F F97F [Trivial][USER] +5CF95C80 F980 [Trivial][USER] +5CF95C81 F981 [Trivial][USER] +5CF95C9F F99F [Trivial][USER] +5CF95CA0 F9A0 [Trivial][USER] +5CF95CA1 F9A1 [Trivial][USER] +5CF95CE0 F9E0 [Trivial][USER] +5CF95CEF F9EF [Trivial][USER] +5CF95CF9 F9F9 [Trivial][USER] +5CF95CFA F9FA [Trivial][USER] +5CF95CFC F9FC [Trivial][USER] +5CF95CFD F9FD [Trivial][USER] +5CF95CFE F9FE [Trivial][USER] +5CF95CFF F9FF [Trivial][USER] +5CFA5C00 FA00 [Trivial][USER] +5CFA5C08 FA08 [Trivial][USER] +5CFA5C09 FA09 [Trivial][USER] +5CFA5C0A FA0A [Trivial][USER] +5CFA5C0D FA0D [Trivial][USER] +5CFA5C1A FA1A [Trivial][USER] +5CFA5C22 FA22 [Trivial][USER] +5CFA5C25 FA5C25 [Regular] +5CFA5C27 FA27 [Trivial][USER] +5CFA5C30 FA00 [Regular] +5CFA5C3F FA3F [Trivial][USER] +5CFA5C40 FA40 [Trivial][USER] +5CFA5C5A FA1A [Regular] +5CFA5C5C FA5C [Regular][USER] +5CFA5C5F FA5C5F [Regular] +5CFA5C61 FA61 [Trivial][USER] +5CFA5C62 FA08 [Regular][USER] +5CFA5C6E FA0A [Regular] +5CFA5C72 FA0D [Regular] +5CFA5C74 FA09 [Regular] +5CFA5C7E FA7E [Trivial][USER] +5CFA5C7F FA7F [Trivial][USER] +5CFA5C80 FA80 [Trivial][USER] +5CFA5C81 FA81 [Trivial][USER] +5CFA5C9F FA9F [Trivial][USER] +5CFA5CA0 FAA0 [Trivial][USER] +5CFA5CA1 FAA1 [Trivial][USER] +5CFA5CE0 FAE0 [Trivial][USER] +5CFA5CEF FAEF [Trivial][USER] +5CFA5CF9 FAF9 [Trivial][USER] +5CFA5CFA FAFA [Trivial][USER] +5CFA5CFC FAFC [Trivial][USER] +5CFA5CFD FAFD [Trivial][USER] +5CFA5CFE FAFE [Trivial][USER] +5CFA5CFF FAFF [Trivial][USER] +5CFC5C00 FC00 [Trivial][USER] +5CFC5C08 FC08 [Trivial][USER] +5CFC5C09 FC09 [Trivial][USER] +5CFC5C0A FC0A [Trivial][USER] +5CFC5C0D FC0D [Trivial][USER] +5CFC5C1A FC1A [Trivial][USER] +5CFC5C22 FC22 [Trivial][USER] +5CFC5C25 FC5C25 [Regular] +5CFC5C27 FC27 [Trivial][USER] +5CFC5C30 FC00 [Regular] +5CFC5C3F FC3F [Trivial][USER] +5CFC5C40 FC40 [Trivial][USER] +5CFC5C5A FC1A [Regular] +5CFC5C5C FC5C [Regular][USER] +5CFC5C5F FC5C5F [Regular] +5CFC5C61 FC61 [Trivial][USER] +5CFC5C62 FC08 [Regular][USER] +5CFC5C6E FC0A [Regular] +5CFC5C72 FC0D [Regular] +5CFC5C74 FC09 [Regular] +5CFC5C7E FC7E [Trivial][USER] +5CFC5C7F FC7F [Trivial][USER] +5CFC5C80 FC80 [Trivial][USER] +5CFC5C81 FC81 [Trivial][USER] +5CFC5C9F FC9F [Trivial][USER] +5CFC5CA0 FCA0 [Trivial][USER] +5CFC5CA1 FCA1 [Trivial][USER] +5CFC5CE0 FCE0 [Trivial][USER] +5CFC5CEF FCEF [Trivial][USER] +5CFC5CF9 FCF9 [Trivial][USER] +5CFC5CFA FCFA [Trivial][USER] +5CFC5CFC FCFC [Trivial][USER] +5CFC5CFD FCFD [Trivial][USER] +5CFC5CFE FCFE [Trivial][USER] +5CFC5CFF FCFF [Trivial][USER] +5CFD5C00 FD00 [Trivial][USER] +5CFD5C08 FD08 [Trivial][USER] +5CFD5C09 FD09 [Trivial][USER] +5CFD5C0A FD0A [Trivial][USER] +5CFD5C0D FD0D [Trivial][USER] +5CFD5C1A FD1A [Trivial][USER] +5CFD5C22 FD22 [Trivial][USER] +5CFD5C25 FD5C25 [Regular] +5CFD5C27 FD27 [Trivial][USER] +5CFD5C30 FD00 [Regular] +5CFD5C3F FD3F [Trivial][USER] +5CFD5C40 FD40 [Trivial][USER] +5CFD5C5A FD1A [Regular] +5CFD5C5C FD5C [Regular][USER] +5CFD5C5F FD5C5F [Regular] +5CFD5C61 FD61 [Trivial][USER] +5CFD5C62 FD08 [Regular][USER] +5CFD5C6E FD0A [Regular] +5CFD5C72 FD0D [Regular] +5CFD5C74 FD09 [Regular] +5CFD5C7E FD7E [Trivial][USER] +5CFD5C7F FD7F [Trivial][USER] +5CFD5C80 FD80 [Trivial][USER] +5CFD5C81 FD81 [Trivial][USER] +5CFD5C9F FD9F [Trivial][USER] +5CFD5CA0 FDA0 [Trivial][USER] +5CFD5CA1 FDA1 [Trivial][USER] +5CFD5CE0 FDE0 [Trivial][USER] +5CFD5CEF FDEF [Trivial][USER] +5CFD5CF9 FDF9 [Trivial][USER] +5CFD5CFA FDFA [Trivial][USER] +5CFD5CFC FDFC [Trivial][USER] +5CFD5CFD FDFD [Trivial][USER] +5CFD5CFE FDFE [Trivial][USER] +5CFD5CFF FDFF [Trivial][USER] +5CFE5C00 FE00 [Trivial][USER] +5CFE5C08 FE08 [Trivial][USER] +5CFE5C09 FE09 [Trivial][USER] +5CFE5C0A FE0A [Trivial][USER] +5CFE5C0D FE0D [Trivial][USER] +5CFE5C1A FE1A [Trivial][USER] +5CFE5C22 FE22 [Trivial][USER] +5CFE5C25 FE5C25 [Regular] +5CFE5C27 FE27 [Trivial][USER] +5CFE5C30 FE00 [Regular] +5CFE5C3F FE3F [Trivial][USER] +5CFE5C40 FE40 [Trivial][USER] +5CFE5C5A FE1A [Regular] +5CFE5C5C FE5C [Regular][USER] +5CFE5C5F FE5C5F [Regular] +5CFE5C61 FE61 [Trivial][USER] +5CFE5C62 FE08 [Regular][USER] +5CFE5C6E FE0A [Regular] +5CFE5C72 FE0D [Regular] +5CFE5C74 FE09 [Regular] +5CFE5C7E FE7E [Trivial][USER] +5CFE5C7F FE7F [Trivial][USER] +5CFE5C80 FE80 [Trivial][USER] +5CFE5C81 FE81 [Trivial][USER] +5CFE5C9F FE9F [Trivial][USER] +5CFE5CA0 FEA0 [Trivial][USER] +5CFE5CA1 FEA1 [Trivial][USER] +5CFE5CE0 FEE0 [Trivial][USER] +5CFE5CEF FEEF [Trivial][USER] +5CFE5CF9 FEF9 [Trivial][USER] +5CFE5CFA FEFA [Trivial][USER] +5CFE5CFC FEFC [Trivial][USER] +5CFE5CFD FEFD [Trivial][USER] +5CFE5CFE FEFE [Trivial][USER] +5CFE5CFF FEFF [Trivial][USER] +5CFF5C00 FF00 [Trivial][USER] +5CFF5C08 FF08 [Trivial][USER] +5CFF5C09 FF09 [Trivial][USER] +5CFF5C0A FF0A [Trivial][USER] +5CFF5C0D FF0D [Trivial][USER] +5CFF5C1A FF1A [Trivial][USER] +5CFF5C22 FF22 [Trivial][USER] +5CFF5C25 FF5C25 [Regular] +5CFF5C27 FF27 [Trivial][USER] +5CFF5C30 FF00 [Regular] +5CFF5C3F FF3F [Trivial][USER] +5CFF5C40 FF40 [Trivial][USER] +5CFF5C5A FF1A [Regular] +5CFF5C5C FF5C [Regular][USER] +5CFF5C5F FF5C5F [Regular] +5CFF5C61 FF61 [Trivial][USER] +5CFF5C62 FF08 [Regular][USER] +5CFF5C6E FF0A [Regular] +5CFF5C72 FF0D [Regular] +5CFF5C74 FF09 [Regular] +5CFF5C7E FF7E [Trivial][USER] +5CFF5C7F FF7F [Trivial][USER] +5CFF5C80 FF80 [Trivial][USER] +5CFF5C81 FF81 [Trivial][USER] +5CFF5C9F FF9F [Trivial][USER] +5CFF5CA0 FFA0 [Trivial][USER] +5CFF5CA1 FFA1 [Trivial][USER] +5CFF5CE0 FFE0 [Trivial][USER] +5CFF5CEF FFEF [Trivial][USER] +5CFF5CF9 FFF9 [Trivial][USER] +5CFF5CFA FFFA [Trivial][USER] +5CFF5CFC FFFC [Trivial][USER] +5CFF5CFD FFFD [Trivial][USER] +5CFF5CFE FFFE [Trivial][USER] +5CFF5CFF FFFF [Trivial][USER] +DROP TABLE t1; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP FUNCTION unescape; +DROP FUNCTION unescape_type; +DROP FUNCTION wellformedness; +DROP FUNCTION mysql_real_escape_string_generated; +DROP FUNCTION iswellformed; +DROP TABLE allbytes; +# End of ctype_backslash.inc +# +# End of 10.0 tests +# diff --git a/mysql-test/r/ctype_tis620.result b/mysql-test/r/ctype_tis620.result index 19e3322eae9..08cf9f1a753 100644 --- a/mysql-test/r/ctype_tis620.result +++ b/mysql-test/r/ctype_tis620.result @@ -138,7 +138,7 @@ year DROP TABLE t1; DROP TABLE IF EXISTS t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE t1 ( name varchar(50) NOT NULL default '', @@ -2964,6 +2964,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +tis620_thai_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection tis620_thai_ci @@ -2982,6 +3033,88 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; c2h ab_def drop table t1; +drop table if exists t1; +create table t1 select repeat('a',10) as c1; +delete from t1; +insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F); +insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F); +insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F); +insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F); +insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F); +insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F); +SELECT GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM t1 GROUP BY c1; +GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) + 20 +! 21 +" 22 +# 23 +$ 24 +% 25 +& 26 +' 27 +( 28 +) 29 +* 2A ++ 2B +, 2C +- 2D +. 2E +/ 2F +0 30 +1 31 +2 32 +3 33 +4 34 +5 35 +6 36 +7 37 +8 38 +9 39 +: 3A +; 3B +< 3C += 3D +> 3E +? 3F +@ 40 +[ 5B +\ 5C +] 5D +^ 5E +_ 5F +` 60 +Aa 41,61 +Bb 42,62 +Cc 43,63 +Dd 44,64 +Ee 45,65 +Ff 46,66 +Gg 47,67 +Hh 48,68 +Ii 49,69 +Jj 4A,6A +Kk 4B,6B +Ll 4C,6C +Mm 4D,6D +Nn 4E,6E +Oo 4F,6F +Pp 50,70 +Qq 51,71 +Rr 52,72 +Ss 53,73 +Tt 54,74 +Uu 55,75 +Vv 56,76 +Ww 57,77 +Xx 58,78 +Yy 59,79 +Zz 5A,7A +{ 7B +| 7C +} 7D +~ 7E + 7F +drop table t1; SET collation_connection='tis620_bin'; create table t1 select repeat('a',4000) a; delete from t1; @@ -3009,6 +3142,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +tis620_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection tis620_bin @@ -3027,3 +3211,369 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; c2h ab_def drop table t1; +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set names tis620; +set collation_connection=tis620_thai_ci; +select @@collation_connection; +@@collation_connection +tis620_thai_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET tis620 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(4) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +61 +SELECT HEX(ws) FROM t2; +HEX(ws) +61 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET tis620 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +6161616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +6161616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(12) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(40) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +61616161612020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +61616161612020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +61 +select hex(weight_string('A')); +hex(weight_string('A')) +61 +select hex(weight_string('abc')); +hex(weight_string('abc')) +616263 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +6162 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +616263 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +6162632020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +61 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +6162 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +616220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +61622020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +6162202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +61622020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +61 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +6162 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +616263 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +61626320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +61 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +6162 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +616263 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +61626320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +tis620_thai_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +61 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +61 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +616263 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +6162 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +616263 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +6162632020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020636261 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +9E9D9CDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDF9C9D9E +select hex(weight_string(cast(0xE0A1 as char))); +hex(weight_string(cast(0xE0A1 as char))) +A1E0 +select hex(weight_string(cast(0xE0A1 as char) as char(1))); +hex(weight_string(cast(0xE0A1 as char) as char(1))) +A1 +set collation_connection=tis620_bin; +select @@collation_connection; +@@collation_connection +tis620_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(1) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +61 +SELECT HEX(ws) FROM t2; +HEX(ws) +61 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(5) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +6161616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +6161616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +61616161612020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +61616161612020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +61 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +616263 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +6162 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +616263 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +6162632020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +61 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +6162 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +616220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +61622020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +6162202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +61622020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +61 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +6162 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +616263 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +61626320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +61 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +6162 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +616263 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +61626320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +tis620_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +61 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +616263 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +6162 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +616263 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +6162632020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020636261 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +9E9D9CDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDF9C9D9E +select hex(weight_string(cast(0xE0A1 as char))); +hex(weight_string(cast(0xE0A1 as char))) +E0A1 +select hex(weight_string(cast(0xE0A1 as char) as char(1))); +hex(weight_string(cast(0xE0A1 as char) as char(1))) +E0 +# +# End of 5.6 tests +# diff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result index 22f2fdf632e..02809f3be22 100644 --- a/mysql-test/r/ctype_uca.result +++ b/mysql-test/r/ctype_uca.result @@ -156,7 +156,29 @@ insert into t1 values (_ucs2 0x01f0),(_ucs2 0x01f1),(_ucs2 0x01f2),(_ucs2 0x01f3 insert into t1 values (_ucs2 0x01f4),(_ucs2 0x01f5),(_ucs2 0x01f6),(_ucs2 0x01f7); insert into t1 values (_ucs2 0x01f8),(_ucs2 0x01f9),(_ucs2 0x01fa),(_ucs2 0x01fb); insert into t1 values (_ucs2 0x01fc),(_ucs2 0x01fd),(_ucs2 0x01fe),(_ucs2 0x01ff); +INSERT INTO t1 VALUES (_ucs2 0x1EA0),(_ucs2 0x1EA1),(_ucs2 0x1EA2),(_ucs2 0x1EA3); +INSERT INTO t1 VALUES (_ucs2 0x1EA4),(_ucs2 0x1EA5),(_ucs2 0x1EA6),(_ucs2 0x1EA7); +INSERT INTO t1 VALUES (_ucs2 0x1EA8),(_ucs2 0x1EA9),(_ucs2 0x1EAA),(_ucs2 0x1EAB); +INSERT INTO t1 VALUES (_ucs2 0x1EAC),(_ucs2 0x1EAD),(_ucs2 0x1EAE),(_ucs2 0x1EAF); +INSERT INTO t1 VALUES (_ucs2 0x1EB0),(_ucs2 0x1EB1),(_ucs2 0x1EB2),(_ucs2 0x1EB3); +INSERT INTO t1 VALUES (_ucs2 0x1EB4),(_ucs2 0x1EB5),(_ucs2 0x1EB6),(_ucs2 0x1EB7); +INSERT INTO t1 VALUES (_ucs2 0x1EB8),(_ucs2 0x1EB9),(_ucs2 0x1EBA),(_ucs2 0x1EBB); +INSERT INTO t1 VALUES (_ucs2 0x1EBC),(_ucs2 0x1EBD),(_ucs2 0x1EBE),(_ucs2 0x1EBF); +INSERT INTO t1 VALUES (_ucs2 0x1EC0),(_ucs2 0x1EC1),(_ucs2 0x1EC2),(_ucs2 0x1EC3); +INSERT INTO t1 VALUES (_ucs2 0x1EC4),(_ucs2 0x1EC5),(_ucs2 0x1EC6),(_ucs2 0x1EC7); +INSERT INTO t1 VALUES (_ucs2 0x1EC8),(_ucs2 0x1EC9),(_ucs2 0x1ECA),(_ucs2 0x1ECB); +INSERT INTO t1 VALUES (_ucs2 0x1ECC),(_ucs2 0x1ECD),(_ucs2 0x1ECE),(_ucs2 0x1ECF); +INSERT INTO t1 VALUES (_ucs2 0x1ED0),(_ucs2 0x1ED1),(_ucs2 0x1ED2),(_ucs2 0x1ED3); +INSERT INTO t1 VALUES (_ucs2 0x1ED4),(_ucs2 0x1ED5),(_ucs2 0x1ED6),(_ucs2 0x1ED7); +INSERT INTO t1 VALUES (_ucs2 0x1ED8),(_ucs2 0x1ED9),(_ucs2 0x1EDA),(_ucs2 0x1EDB); +INSERT INTO t1 VALUES (_ucs2 0x1EDC),(_ucs2 0x1EDD),(_ucs2 0x1EDE),(_ucs2 0x1EDF); +INSERT INTO t1 VALUES (_ucs2 0x1EE0),(_ucs2 0x1EE1),(_ucs2 0x1EE2),(_ucs2 0x1EE3); +INSERT INTO t1 VALUES (_ucs2 0x1EE4),(_ucs2 0x1EE5),(_ucs2 0x1EE6),(_ucs2 0x1EE7); +INSERT INTO t1 VALUES (_ucs2 0x1EE8),(_ucs2 0x1EE9),(_ucs2 0x1EEA),(_ucs2 0x1EEB); +INSERT INTO t1 VALUES (_ucs2 0x1EEC),(_ucs2 0x1EED),(_ucs2 0x1EEE),(_ucs2 0x1EEF); +INSERT INTO t1 VALUES (_ucs2 0x1EF0),(_ucs2 0x1EF1); insert into t1 values ('AA'),('Aa'),('aa'),('aA'); +insert into t1 values ('AE'),('Ae'),('ae'),('aE'); insert into t1 values ('CH'),('Ch'),('ch'),('cH'); insert into t1 values ('DZ'),('Dz'),('dz'),('dZ'); insert into t1 values ('DŽ'),('Dž'),('dž'),('dŽ'); @@ -171,8 +193,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_unicode_ci; group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Æ,æ,Ç¢,Ç£,Ǽ,ǽ B,b Æ€ @@ -188,7 +211,7 @@ DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -202,7 +225,7 @@ G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ H,h,Ĥ,Ä¥ Æ•,Ƕ Ħ,ħ -I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij ı Æ— @@ -223,7 +246,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ø,ø,Ǿ,Ç¿ Ɔ @@ -245,7 +268,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Æœ Ʊ V,v @@ -275,8 +298,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_icelandic_c group_concat(c1 order by c1) ÷ × -A,a,À,Â,Ã,à ,â,ã,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Â,Ã,à ,â,ã,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Ã,á Ç¢,Ç£,Ǽ,ǽ B,b @@ -293,7 +317,7 @@ DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz Ɖ ÆŠ Æ‹,ÆŒ -E,e,È,Ê,Ë,è,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,Ê,Ë,è,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ É,é ÆŽ,Ç Æ @@ -308,7 +332,7 @@ G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ H,h,Ĥ,Ä¥ Æ•,Ƕ Ħ,ħ -I,i,ÃŒ,ÃŽ,Ã,ì,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,i,ÃŒ,ÃŽ,Ã,ì,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij Ã,à ı @@ -330,7 +354,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ô,Õ,ò,ô,õ,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ô,Õ,ò,ô,õ,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ó,ó Ǿ,Ç¿ @@ -353,7 +377,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Û,Ü,ù,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Û,Ü,ù,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Ú,ú Æœ Ʊ @@ -388,8 +412,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_latvian_ci; group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Æ,æ,Ç¢,Ç£,Ǽ,ǽ B,b Æ€ @@ -407,7 +432,7 @@ DŽ,Dž,dŽ,dž ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -422,7 +447,7 @@ G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ǧ,ǧ,Ç´,ǵ H,h,Ĥ,Ä¥ Æ•,Ƕ Ħ,ħ -I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij Y,y ı @@ -447,7 +472,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ø,ø,Ǿ,Ç¿ Ɔ @@ -471,7 +496,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Æœ Ʊ V,v @@ -502,8 +527,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_romanian_ci group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Ã,Ä,Ã…,à ,á,ã,ä,Ã¥,Ä€,Ä,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Ã,Ä,Ã…,à ,á,ã,ä,Ã¥,Ä€,Ä,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Ä‚,ă Â,â Æ,æ,Ç¢,Ç£,Ǽ,ǽ @@ -521,7 +547,7 @@ DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -535,7 +561,7 @@ G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ H,h,Ĥ,Ä¥ Æ•,Ƕ Ħ,ħ -I,i,ÃŒ,Ã,Ã,ì,Ã,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,i,ÃŒ,Ã,Ã,ì,Ã,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij ÃŽ,î ı @@ -557,7 +583,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ø,ø,Ǿ,Ç¿ Ɔ @@ -581,7 +607,7 @@ T,t,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Æœ Ʊ V,v @@ -611,8 +637,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_slovenian_c group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Æ,æ,Ç¢,Ç£,Ǽ,ǽ B,b Æ€ @@ -630,7 +657,7 @@ DŽ,Dž,dŽ,dž ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -644,7 +671,7 @@ G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ H,h,Ĥ,Ä¥ Æ•,Ƕ Ħ,ħ -I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij ı Æ— @@ -665,7 +692,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ø,ø,Ǿ,Ç¿ Ɔ @@ -688,7 +715,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Æœ Ʊ V,v @@ -719,8 +746,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_polish_ci; group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Ä„,Ä… Æ,æ,Ç¢,Ç£,Ǽ,ǽ B,b @@ -738,7 +766,7 @@ DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ Ę,Ä™ ÆŽ,Ç Æ @@ -753,7 +781,7 @@ G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ H,h,Ĥ,Ä¥ Æ•,Ƕ Ħ,ħ -I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij ı Æ— @@ -775,7 +803,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ô,Õ,Ö,ò,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ô,Õ,Ö,ò,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ó,ó Ø,ø,Ǿ,Ç¿ @@ -799,7 +827,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Æœ Ʊ V,v @@ -831,8 +859,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_estonian_ci group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,Ã…,à ,á,â,ã,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,Ã…,à ,á,â,ã,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Æ,æ,Ç¢,Ç£,Ǽ,ǽ B,b Æ€ @@ -850,7 +879,7 @@ DŽ,Dž,dŽ,dž ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -864,7 +893,7 @@ G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ H,h,Ĥ,Ä¥ Æ•,Ƕ Ħ,ħ -I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij ı Æ— @@ -885,7 +914,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Ô,ò,ó,ô,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Ô,ò,ó,ô,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ø,ø,Ǿ,Ç¿ Ɔ @@ -910,7 +939,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Æœ Ʊ V,v @@ -944,8 +973,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_spanish_ci; group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Æ,æ,Ç¢,Ç£,Ǽ,ǽ B,b Æ€ @@ -961,7 +991,7 @@ DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -975,7 +1005,7 @@ G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ H,h,Ĥ,Ä¥ Æ•,Ƕ Ħ,ħ -I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij ı Æ— @@ -997,7 +1027,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ø,ø,Ǿ,Ç¿ Ɔ @@ -1019,7 +1049,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Æœ Ʊ V,v @@ -1049,8 +1079,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_swedish_ci; group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,à ,á,â,ã,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,à ,á,â,ã,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Ç¢,Ç£,Ǽ,ǽ B,b Æ€ @@ -1066,7 +1097,7 @@ DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -1080,7 +1111,7 @@ G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ H,h,Ĥ,Ä¥ Æ•,Ƕ Ħ,ħ -I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij ı Æ— @@ -1101,7 +1132,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ǿ,Ç¿ Ɔ @@ -1123,7 +1154,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Æœ Ʊ V,v @@ -1156,8 +1187,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_turkish_ci; group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Æ,æ,Ç¢,Ç£,Ǽ,ǽ B,b Æ€ @@ -1174,7 +1206,7 @@ DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -1191,7 +1223,7 @@ I,ı IJ,Ij Æ•,Ƕ Ħ,ħ -i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị iJ,ij,IJ,ij Æ— Æ– @@ -1211,7 +1243,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ö,ö Ø,ø,Ǿ,Ç¿ @@ -1235,7 +1267,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Ü,ü Æœ Ʊ @@ -1266,8 +1298,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_czech_ci; group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Æ,æ,Ç¢,Ç£,Ǽ,ǽ B,b Æ€ @@ -1285,7 +1318,7 @@ DŽ,Dž,dŽ,dž ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -1300,7 +1333,7 @@ H,h,Ĥ,Ä¥ CH,Ch,ch Æ•,Ƕ Ħ,ħ -I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij ı Æ— @@ -1321,7 +1354,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ø,ø,Ǿ,Ç¿ Ɔ @@ -1345,7 +1378,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Æœ Ʊ V,v @@ -1376,8 +1409,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_danish_ci; group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,à ,á,â,ã,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,à ,á,â,ã,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ aA +AE,Ae,aE,ae Ç¢,Ç£,Ǽ,ǽ B,b Æ€ @@ -1393,7 +1427,7 @@ DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -1407,7 +1441,7 @@ G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ H,h,Ĥ,Ä¥ Æ•,Ƕ Ħ,ħ -I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij ı Æ— @@ -1428,7 +1462,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ǿ,Ç¿ Ɔ @@ -1450,7 +1484,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Æœ Ʊ V,v @@ -1483,8 +1517,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_lithuanian_ group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Æ,æ,Ç¢,Ç£,Ǽ,ǽ B,b Æ€ @@ -1502,7 +1537,7 @@ DŽ,Dž,dŽ,dž ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -1516,7 +1551,7 @@ G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ H,h,Ĥ,Ä¥ Æ•,Ƕ Ħ,ħ -I,Y,i,y,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,Y,i,y,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij ı Æ— @@ -1537,7 +1572,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ø,ø,Ǿ,Ç¿ Ɔ @@ -1560,7 +1595,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Æœ Ʊ V,v @@ -1591,8 +1626,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_slovak_ci; group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,Ã…,à ,á,â,ã,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,Ã…,à ,á,â,ã,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Ä,ä Æ,æ,Ç¢,Ç£,Ǽ,ǽ B,b @@ -1611,7 +1647,7 @@ DŽ,Dž,dŽ,dž ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -1626,7 +1662,7 @@ H,h,Ĥ,Ä¥ CH,Ch,ch Æ•,Ƕ Ħ,ħ -I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij ı Æ— @@ -1647,7 +1683,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Õ,Ö,ò,ó,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Õ,Ö,ò,ó,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ô,ô Ø,ø,Ǿ,Ç¿ @@ -1671,7 +1707,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Æœ Ʊ V,v @@ -1702,8 +1738,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_spanish2_ci group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Æ,æ,Ç¢,Ç£,Ǽ,ǽ B,b Æ€ @@ -1720,7 +1757,7 @@ DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -1734,7 +1771,7 @@ G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ H,h,Ĥ,Ä¥ Æ•,Ƕ Ħ,ħ -I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij ı Æ— @@ -1757,7 +1794,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ø,ø,Ǿ,Ç¿ Ɔ @@ -1779,7 +1816,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Æœ Ʊ V,v @@ -1809,8 +1846,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_roman_ci; group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Æ,æ,Ç¢,Ç£,Ǽ,ǽ B,b Æ€ @@ -1826,7 +1864,7 @@ DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -1840,7 +1878,7 @@ G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ H,h,Ĥ,Ä¥ Æ•,Ƕ Ħ,ħ -I,J,i,j,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,J,i,j,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij IJ,ij ı @@ -1864,7 +1902,7 @@ NJ,Nj,nJ,nj Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ø,ø,Ǿ,Ç¿ Ɔ @@ -1886,7 +1924,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Æœ Ʊ U,V,u,v @@ -1916,8 +1954,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_esperanto_c group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Æ,æ,Ç¢,Ç£,Ǽ,ǽ B,b Æ€ @@ -1934,7 +1973,7 @@ DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -1950,7 +1989,7 @@ H,h Ĥ,Ä¥ Æ•,Ƕ Ħ,ħ -I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij ı Æ— @@ -1972,7 +2011,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ø,ø,Ǿ,Ç¿ Ɔ @@ -1995,7 +2034,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Ŭ,Å Æœ Ʊ @@ -2026,8 +2065,9 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_hungarian_c group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae Æ,æ,Ç¢,Ç£,Ǽ,ǽ B,b Æ€ @@ -2043,7 +2083,7 @@ DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -2057,7 +2097,7 @@ G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ H,h,Ĥ,Ä¥ Æ•,Ƕ Ħ,ħ -I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij ı Æ— @@ -2078,7 +2118,7 @@ NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ö,ö,Å,Å‘ Ø,ø,Ǿ,Ç¿ @@ -2101,7 +2141,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Ü,ü,Ű,ű Æœ Ʊ @@ -2128,12 +2168,2641 @@ Z,z,Ź,ź,Å»,ż,Ž,ž Ç Ç‚ ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_croatian_mysql561_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ĉ,ĉ,ÄŠ,Ä‹ +CH,Ch,cH,ch +ÄŒ,Ä +Ć,ć +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,DZ,Dz,dz +DŽ,Dž,dŽ,dž,Ç„,Ç…,dž +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LL,Ll,lL,ll +LJ,Lj,lJ,lj,LJ,Lj,lj +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å¿ +SS,Ss,sS,ss,ß +Å ,Å¡ +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż +Æ +Ž,ž +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_croatian_ci; group_concat(c1 order by c1) ÷ × -A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ĉ,ĉ,ÄŠ,Ä‹ +CH,Ch,cH,ch +ÄŒ,Ä +Ć,ć +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,DZ,Dz,dz +dŽ +DŽ,Dž,dž,Ç„,Ç…,dž +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +lJ +LL,Ll,lL,ll +LJ,Lj,lj,LJ,Lj,lj +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +nJ +NJ,Nj,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å¿ +SS,Ss,sS,ss,ß +Å ,Å¡ +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż +Æ +Ž,ž +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_german2_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Â,Ã,Ã…,à ,á,â,ã,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae,Ä,Æ,ä,æ +Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Ö,ö,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Ü,ü +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_unicode_520_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae,Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,Ã,ð,ÄŽ,Ä,Ä,Ä‘ +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ɖ +ÆŠ +Æ‹,ÆŒ +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥,Ħ,ħ +Æ•,Ƕ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ,Ä¿,Å€,Å,Å‚ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,Ø,ò,ó,ô,õ,ö,ø,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ǿ,Ç¿,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_vietnamese_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Ã,Ä,Ã…,à ,á,ã,ä,Ã¥,Ä€,Ä,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả +AA,Aa,aA,aa +AE,Ae,aE,ae +Ä‚,ă,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +Â,â,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,Ạ+Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ë,è,é,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ +Ê,ê,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Õ,Ö,ò,ó,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á» +OE,Oe,oE,oe,Å’,Å“ +Ô,ô,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™ +Æ ,Æ¡,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§ +Ư,ư,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +ALTER TABLE t1 CONVERT TO CHARACTER SET ucs2 COLLATE ucs2_bin; +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_unicode_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_icelandic_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Â,Ã,à ,â,ã,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Ã,á +Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ã,ð +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +E,e,È,Ê,Ë,è,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +É,é +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,ÃŽ,Ã,ì,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +Ã,à +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ô,Õ,ò,ô,õ,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ó,ó +Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Û,Ü,ù,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Ú,ú +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,ÿ,Ŷ,Å·,Ÿ +Ã,ý +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Þ,þ +Ä,Æ,ä,æ +Ö,Ø,ö,ø +Ã…,Ã¥ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_latvian_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹ +CH,Ch,cH,ch +ÄŒ,Ä +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +DŽ,Dž,dŽ,dž +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ǧ,ǧ,Ç´,ǵ +Ä¢,Ä£ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +Y,y +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ǩ,Ç© +Ķ,Ä· +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Ä»,ļ +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Å…,ņ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Ř,Å™ +RR,Rr,rR,rr +Å–,Å— +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å¿ +SS,Ss,sS,ss,ß +Å ,Å¡ +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż +Æ +Ž,ž +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_romanian_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Ã,Ä,Ã…,à ,á,ã,ä,Ã¥,Ä€,Ä,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Ä‚,ă +Â,â +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,Ã,ì,Ã,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ÃŽ,î +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Åž,ÅŸ +Æ© +ƪ +T,t,Ť,Å¥ +ƾ +Å¢,Å£ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_slovenian_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹ +CH,Ch,cH,ch +ÄŒ,Ä +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +DŽ,Dž,dŽ,dž +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å¿ +SS,Ss,sS,ss,ß +Å ,Å¡ +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż +Æ +Ž,ž +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_polish_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Ä„,Ä… +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ć,ć +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +Ę,Ä™ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Ń,Å„ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ô,Õ,Ö,ò,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ó,ó +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Åš,Å› +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ž,ž +Æ +Ź,ź +Å»,ż +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_estonian_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ã…,à ,á,â,ã,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz +DŽ,Dž,dŽ,dž +Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,ò,ó,ô,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å¿ +SS,Ss,sS,ss,ß +Å ,Å¡ +Z,z +Ž,ž +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +Õ,õ +Ä,ä +Ö,ö +Ü,ü +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Ź,ź,Å»,ż +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_spanish_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Ñ,ñ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_swedish_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,à ,á,â,ã,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ü,Ã,ü,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ã…,Ã¥ +Ä,Æ,ä,æ +Ö,Ø,ö,ø +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_turkish_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ç,ç +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Äž,ÄŸ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +I,ı +IJ,Ij +Æ•,Ƕ +Ħ,ħ +i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +iJ,ij,IJ,ij +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ö,ö +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Åž,ÅŸ +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Ü,ü +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_czech_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹ +cH +ÄŒ,Ä +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +DŽ,Dž,dŽ,dž +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +CH,Ch,ch +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å— +RR,Rr,rR,rr +Ř,Å™ +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å¿ +SS,Ss,sS,ss,ß +Å ,Å¡ +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż +Æ +Ž,ž +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_danish_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,à ,á,â,ã,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +aA +AE,Ae,aE,ae +Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ü,Ã,ü,ý,ÿ,Ű,ű,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ä,Æ,ä,æ +Ö,Ø,ö,ø,Å,Å‘ +AA,Aa,aa,Ã…,Ã¥ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_lithuanian_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,CH,Ch,c,ch,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹ +cH +ÄŒ,Ä +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +DŽ,Dž,dŽ,dž +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,Y,i,y,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å¿ +SS,Ss,sS,ss,ß +Å ,Å¡ +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż +Æ +Ž,ž +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_slovak_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ã…,à ,á,â,ã,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Ä,ä +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹ +cH +ÄŒ,Ä +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +DŽ,Dž,dŽ,dž +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +CH,Ch,ch +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Õ,Ö,ò,ó,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ô,ô +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å¿ +SS,Ss,sS,ss,ß +Å ,Å¡ +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż +Æ +Ž,ž +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_spanish2_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +cH +CH,Ch,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +lL +LL,Ll,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Ñ,ñ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_roman_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,J,i,j,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij +IJ,ij +ı +Æ— +Æ– +Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj +LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj +ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +U,V,u,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_esperanto_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ĉ,ĉ +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Äœ,Ä +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h +Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,ǰ +Ä´,ĵ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Åœ,Å +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Ŭ,Å +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_hungarian_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ö,ö,Å,Å‘ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Ü,ü,Ű,ű +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_croatian_mysql561_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ AA,Aa,aA,aa +AE,Ae,aE,ae +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ĉ,ĉ,ÄŠ,Ä‹ +CH,Ch,cH,ch +ÄŒ,Ä +Ć,ć +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,DZ,Dz,dz +DŽ,Dž,dŽ,dž,Ç„,Ç…,dž +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LL,Ll,lL,ll +LJ,Lj,lJ,lj,LJ,Lj,lj +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å¿ +SS,Ss,sS,ss,ß +Å ,Å¡ +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż +Æ +Ž,ž +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_croatian_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae Æ,æ,Ç¢,Ç£,Ǽ,ǽ B,b Æ€ @@ -2153,7 +4822,7 @@ DŽ,Dž,dž,Ç„,Ç…,dž ÆŠ Æ‹,ÆŒ Ã,ð -E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ ÆŽ,Ç Æ Æ @@ -2167,7 +4836,7 @@ G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ H,h,Ĥ,Ä¥ Æ•,Ƕ Ħ,ħ -I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị IJ,Ij,iJ,ij,IJ,ij ı Æ— @@ -2190,7 +4859,7 @@ NJ,Nj,nj,ÇŠ,Ç‹,ÇŒ Æ Æž ÅŠ,Å‹ -O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ OE,Oe,oE,oe,Å’,Å“ Ø,ø,Ǿ,Ç¿ Ɔ @@ -2213,7 +4882,7 @@ T,t,Å¢,Å£,Ť,Å¥ Æ« Ƭ,Æ Æ® -U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± Æœ Ʊ V,v @@ -2240,6 +4909,321 @@ Z,z,Ź,ź,Å»,ż Ç Ç‚ ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_german2_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ã…,à ,á,â,ã,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae,Ä,Æ,ä,æ +Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Ö,ö,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Ü,ü +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_unicode_520_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à ,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,áº,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +AA,Aa,aA,aa +AE,Ae,aE,ae,Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,Ã,ð,ÄŽ,Ä,Ä,Ä‘ +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ɖ +ÆŠ +Æ‹,ÆŒ +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥,Ħ,ħ +Æ•,Ƕ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ,Ä¿,Å€,Å,Å‚ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,Ø,ò,ó,ô,õ,ö,ø,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ǿ,Ç¿,Ọ,á»,Ỏ,á»,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +OE,Oe,oE,oe,Å’,Å“ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1) FROM t1 GROUP BY c1 COLLATE ucs2_vietnamese_ci; +GROUP_CONCAT(c1 ORDER BY c1) +÷ +× +A,a,À,Ã,Ã,Ä,Ã…,à ,á,ã,ä,Ã¥,Ä€,Ä,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç»,Ạ,ạ,Ả,ả +AA,Aa,aA,aa +AE,Ae,aE,ae +Ä‚,ă,Ắ,ắ,Ằ,ằ,Ẳ,ẳ,Ẵ,ẵ,Ặ,ặ +Â,â,Ấ,ấ,Ầ,ầ,Ẩ,ẩ,Ẫ,ẫ,Ậ,Ạ+Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,DŽ,Dž,dZ,dz,dŽ,dž,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ë,è,é,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä›,Ẹ,ẹ,Ẻ,ẻ,Ẽ,ẽ +Ê,ê,Ế,ế,Ề,á»,Ể,ể,Ễ,á»…,Ệ,ệ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,Ã,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä,Ä®,į,İ,Ç,Ç,Ỉ,ỉ,Ị,ị +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Õ,Ö,ò,ó,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç,Ọ,á»,Ỏ,á» +OE,Oe,oE,oe,Å’,Å“ +Ô,ô,á»,ố,á»’,ồ,á»”,ổ,á»–,á»—,Ộ,á»™ +Æ ,Æ¡,Ớ,á»›,Ờ,á»,Ở,ở,á» ,ỡ,Ợ,ợ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å,Å®,ů,Ű,ű,Ų,ų,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ,Ụ,ụ,Ủ,á»§ +Ư,ư,Ứ,ứ,Ừ,ừ,Ử,á»,á»®,ữ,á»°,á»± +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ drop table t1; SET NAMES utf8; CREATE TABLE t1 (c varchar(255) NOT NULL COLLATE utf8_general_ci, INDEX (c)); @@ -2653,6 +5637,138 @@ HEX(CONVERT(col1 USING ucs2)) 064A06A9062F064A06AF0631 064A06A9064A DROP TABLE t1; +CREATE TABLE t1 ( +a VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_persian_ci, +offs INT NOT NULL +); +INSERT INTO t1 VALUES +(_ucs2 0x066D, 1),(_ucs2 0x064E, 2),(_ucs2 0xFE76, 3),(_ucs2 0xFE77, 4), +(_ucs2 0x0650, 5),(_ucs2 0xFE7A, 6),(_ucs2 0xFE7B, 7),(_ucs2 0x064F, 8), +(_ucs2 0xFE78, 9),(_ucs2 0xFE79,10),(_ucs2 0x064B,11),(_ucs2 0xFE70,12), +(_ucs2 0xFE71,13),(_ucs2 0x064D,14),(_ucs2 0xFE74,15),(_ucs2 0x064C,16), +(_ucs2 0xFE72,17), +(_ucs2 0xFE7F, 1),(_ucs2 0x0653, 2),(_ucs2 0x0654, 3),(_ucs2 0x0655, 4), +(_ucs2 0x0670, 5), +(_ucs2 0x0669, 1),(_ucs2 0x0622, 2),(_ucs2 0x0627, 3),(_ucs2 0x0671, 4), +(_ucs2 0x0621, 5),(_ucs2 0x0623, 6),(_ucs2 0x0625, 7),(_ucs2 0x0624, 8), +(_ucs2 0x0626, 9), +(_ucs2 0x0642, 1),(_ucs2 0x06A9, 2),(_ucs2 0x0643, 3), +(_ucs2 0x0648, 1),(_ucs2 0x0647, 2),(_ucs2 0x0629, 3),(_ucs2 0x06C0, 4), +(_ucs2 0x06CC, 5),(_ucs2 0x0649, 6),(_ucs2 0x064A, 7), +(_ucs2 0xFE80, 1),(_ucs2 0xFE81, 2),(_ucs2 0xFE82, 3),(_ucs2 0xFE8D, 4), +(_ucs2 0xFE8E, 5),(_ucs2 0xFB50, 6),(_ucs2 0xFB51, 7),(_ucs2 0xFE80, 8), +(_ucs2 0xFE83, 9),(_ucs2 0xFE84,10),(_ucs2 0xFE87,11),(_ucs2 0xFE88,12), +(_ucs2 0xFE85,13),(_ucs2 0xFE86,14),(_ucs2 0x0689,16),(_ucs2 0x068A,17), +(_ucs2 0xFEAE, 1),(_ucs2 0xFDFC, 2), +(_ucs2 0xFED8, 1),(_ucs2 0xFB8E, 2),(_ucs2 0xFB8F, 3),(_ucs2 0xFB90, 4), +(_ucs2 0xFB91, 5),(_ucs2 0xFED9, 6),(_ucs2 0xFEDA, 7),(_ucs2 0xFEDB, 8), +(_ucs2 0xFEDC, 9), +(_ucs2 0xFEEE, 1),(_ucs2 0xFEE9, 2),(_ucs2 0xFEEA, 3),(_ucs2 0xFEEB, 4), +(_ucs2 0xFEEC, 5),(_ucs2 0xFE93, 6),(_ucs2 0xFE94, 7),(_ucs2 0xFBA4, 8), +(_ucs2 0xFBA5, 9),(_ucs2 0xFBFC,10),(_ucs2 0xFBFD,11),(_ucs2 0xFBFE,12), +(_ucs2 0xFBFF,13),(_ucs2 0xFEEF,14),(_ucs2 0xFEF0,15),(_ucs2 0xFEF1,16), +(_ucs2 0xFEF2,17),(_ucs2 0xFEF3,18),(_ucs2 0xFEF4,19),(_ucs2 0xFEF5,20), +(_ucs2 0xFEF6,21),(_ucs2 0xFEF7,22),(_ucs2 0xFEF8,23),(_ucs2 0xFEF9,24), +(_ucs2 0xFEFA,25),(_ucs2 0xFEFB,26),(_ucs2 0xFEFC,27); +SELECT HEX(CONVERT(a USING ucs2)), offs, hex(weight_string(a)), a +FROM t1 ORDER BY a, offs, BINARY a; +HEX(CONVERT(a USING ucs2)) offs hex(weight_string(a)) a +0653 2 0001 Ù“ +0654 3 0002 Ù” +0655 4 0003 Ù• +0670 5 0004 Ù° +FE7F 1 ﹿ +066D 1 02CB Ù +064E 2 02CC ÙŽ +FE76 3 02CD ï¹¶ +FE77 4 02CE ï¹· +0650 5 02CF Ù +FE7A 6 02D0 ﹺ +FE7B 7 02D1 ï¹» +064F 8 02D2 Ù +FE78 9 02D3 ﹸ +FE79 10 02D4 ï¹¹ +064B 11 02D5 Ù‹ +FE70 12 02D6 ï¹° +FE71 13 02D7 ï¹± +064D 14 02D8 Ù +FE74 15 02D9 ï¹´ +064C 16 02DA ÙŒ +FE72 17 02DB ï¹² +0669 1 0E32 Ù© +0622 2 0E33 Ø¢ +0627 3 0E34 ا +0671 4 0E35 Ù± +0621 5 0E36 Ø¡ +0623 6 0E37 Ø£ +0625 7 0E38 Ø¥ +0624 8 0E39 ؤ +0626 9 0E3A ئ +FE81 2 1348 ïº +FE82 3 1349 ﺂ +FE8D 4 134A ïº +FE8E 5 134B ﺎ +FB50 6 134C ï +FB51 7 134D ï‘ +FE80 1 134E ﺀ +FE80 8 134E ﺀ +FE83 9 134F ﺃ +FE84 10 1350 ﺄ +FE87 11 1351 ﺇ +FE88 12 1352 ﺈ +FE85 13 1353 ﺅ +FE86 14 1354 ﺆ +0689 16 1355 Ú‰ +068A 17 1356 ÚŠ +FEAE 1 1375 ﺮ +FDFC 2 1376 ï·¼ +0642 1 139B Ù‚ +FED8 1 139B ﻘ +06A9 2 139C Ú© +FB8E 2 139C ﮎ +0643 3 139D Ùƒ +FB8F 3 139D ï® +FB90 4 139E ï® +FB91 5 139F ﮑ +FED9 6 13A0 ï»™ +FEDA 7 13A1 ﻚ +FEDB 8 13A2 ï»› +FEDC 9 13A3 ﻜ +0648 1 13BD Ùˆ +FEEE 1 13BD ï»® +0647 2 13BE Ù‡ +FEE9 2 13BE ﻩ +0629 3 13BF Ø© +FEEA 3 13BF ﻪ +06C0 4 13C0 Û€ +FEEB 4 13C0 ﻫ +06CC 5 13C1 ÛŒ +FEEC 5 13C1 ﻬ +0649 6 13C2 Ù‰ +FE93 6 13C2 ﺓ +064A 7 13C3 ÙŠ +FE94 7 13C3 ﺔ +FBA4 8 13C4 ﮤ +FBA5 9 13C5 ﮥ +FBFC 10 13C6 ﯼ +FBFD 11 13C7 ﯽ +FBFE 12 13C8 ﯾ +FBFF 13 13C9 ﯿ +FEEF 14 13CA ﻯ +FEF0 15 13CB ï»° +FEF1 16 13CC ï»± +FEF2 17 13CD ﻲ +FEF3 18 13CE ﻳ +FEF4 19 13CF ï»´ +FEF5 20 13D0 ﻵ +FEF6 21 13D1 ï»¶ +FEF7 22 13D2 ï»· +FEF8 23 13D3 ﻸ +FEF9 24 13D4 ﻹ +FEFA 25 13D5 ﻺ +FEFB 26 13D6 ï»» +FEFC 27 13D7 ﻼ +DROP TABLE t1; SET @test_character_set= 'utf8'; SET @test_collation= 'utf8_swedish_ci'; SET @safe_character_set_server= @@character_set_server; @@ -2793,6 +5909,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf8_unicode_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf8_unicode_ci @@ -2811,41 +5978,121 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; c2h ab_def drop table t1; +"BEGIN ctype_german.inc" drop table if exists t1; create table t1 as select repeat(' ', 64) as s1; select collation(s1) from t1; collation(s1) utf8_unicode_ci delete from t1; +INSERT INTO t1 VALUES ('ud'),('uf'); +INSERT INTO t1 VALUES ('od'),('of'); +INSERT INTO t1 VALUES ('e'); +INSERT INTO t1 VALUES ('ad'),('af'); insert into t1 values ('a'),('ae'),(_latin1 0xE4); insert into t1 values ('o'),('oe'),(_latin1 0xF6); insert into t1 values ('s'),('ss'),(_latin1 0xDF); insert into t1 values ('u'),('ue'),(_latin1 0xFC); +INSERT INTO t1 VALUES (_latin1 0xE6), (_latin1 0xC6); +INSERT INTO t1 VALUES (_latin1 0x9C), (_latin1 0x8C); select s1, hex(s1) from t1 order by s1, binary s1; s1 hex(s1) a 61 ä C3A4 +ad 6164 ae 6165 +af 6166 +Æ C386 +æ C3A6 +e 65 o 6F ö C3B6 +od 6F64 oe 6F65 +Å’ C592 +Å“ C593 +of 6F66 s 73 ss 7373 ß C39F u 75 ü C3BC +ud 7564 ue 7565 +uf 7566 select group_concat(s1 order by binary s1) from t1 group by s1; group_concat(s1 order by binary s1) a,ä +ad ae +af +Æ,æ +e o,ö -oe +od +oe,Å’,Å“ +of s ss,ß u,ü +ud ue +uf +SELECT s1, hex(s1), hex(weight_string(s1)) FROM t1 ORDER BY s1, BINARY(s1); +s1 hex(s1) hex(weight_string(s1)) +a 61 0E33 +ä C3A4 0E33 +ad 6164 0E330E6D +ae 6165 0E330E8B +af 6166 0E330EB9 +Æ C386 0E38 +æ C3A6 0E38 +e 65 0E8B +o 6F 0F82 +ö C3B6 0F82 +od 6F64 0F820E6D +oe 6F65 0F820E8B +Å’ C592 0F820E8B +Å“ C593 0F820E8B +of 6F66 0F820EB9 +s 73 0FEA +ss 7373 0FEA0FEA +ß C39F 0FEA0FEA +u 75 101F +ü C3BC 101F +ud 7564 101F0E6D +ue 7565 101F0E8B +uf 7566 101F0EB9 +SELECT s1, hex(s1) FROM t1 WHERE s1='ae' ORDER BY s1, BINARY(s1); +s1 hex(s1) +ae 6165 drop table t1; +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `b` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); +SELECT * FROM t1 ORDER BY a, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY a DESC, b; +a b +ß 1 +s 0 +SELECT * FROM t1 ORDER BY CONCAT(a), b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a) DESC, b; +a b +ß 1 +s 0 +DROP TABLE t1; +"END ctype_german.inc" CREATE TABLE t1 (id int, a varchar(30) character set utf8); INSERT INTO t1 VALUES (1, _ucs2 0x01310069), (2, _ucs2 0x01310131); INSERT INTO t1 VALUES (3, _ucs2 0x00690069), (4, _ucs2 0x01300049); @@ -3033,6 +6280,7 @@ a hex(b) c DROP TABLE t1; set names utf8; End for 5.0 tests +End of 5.1 tests # # Start of 5.5 tests # @@ -3128,7 +6376,7 @@ HEX(s1) 0061000000000000000000000009 0061 DROP TABLE t1; -create table t1 (a int, c1 varchar(200) collate utf8_croatian_ci, key (c1)); +create table t1 (a int, c1 varchar(200) collate utf8_croatian_mysql561_ci, key (c1)); insert into t1 values (1,'=> DZ'),(2,'=> Dz'),(3,'=> dz'),(4,'=> dZ'); insert into t1 values (5,'=> DŽ'),(6,'=> Dž'),(7,'=> dž'),(8,'=> dŽ'); insert into t1 values (9,'=> dž'),(10,'=> Ç„'); @@ -3138,10 +6386,10 @@ c1 => Dz => dz => dZ -=> dŽ => DŽ => Dž => dž +=> dŽ => dž => Ç„ select concat(c1) from t1 order by c1; @@ -3150,10 +6398,10 @@ concat(c1) => Dz => dz => dZ -=> dŽ => DŽ => Dž => dž +=> dŽ => dž => Ç„ select * from t1 where c1 like '=> d%'; @@ -3205,6 +6453,7 @@ a c1 5 => DŽ 6 => Dž 7 => dž +8 => dŽ 9 => dž 10 => Ç„ select * from t1 where concat(c1) = '=> dž'; @@ -3212,6 +6461,7 @@ a c1 5 => DŽ 6 => Dž 7 => dž +8 => dŽ 9 => dž 10 => Ç„ drop table t1; @@ -3630,3 +6880,6696 @@ DROP TABLE t1; # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set collation_connection=ucs2_unicode_ci; +select @@collation_connection; +@@collation_connection +ucs2_unicode_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(16) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0E33 +SELECT HEX(ws) FROM t2; +HEX(ws) +0E33 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(80) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0E330E330E330E330E33 +SELECT HEX(ws) FROM t2; +HEX(ws) +0E330E330E330E330E33 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(48) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +0E330E330E33 +SELECT HEX(ws) FROM t2; +HEX(ws) +0E330E330E33 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(160) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +0E330E330E330E330E3302090209020902090209 +SELECT HEX(ws) FROM t2; +HEX(ws) +0E330E330E330E330E3302090209020902090209 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +0E33 +select hex(weight_string('A')); +hex(weight_string('A')) +0E33 +select hex(weight_string('abc')); +hex(weight_string('abc')) +0E330E4A0E60 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +0E330E4A +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +0E330E4A0E60 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +0E330E4A0E6002090209 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +0E +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0E33 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +0E330E +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +0E330E4A +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0E330E4A02 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +0E330E4A020902090209020902090209020902090209020902 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +0E +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0E33 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +0E330E +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +0E330E4A +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0E330E4A0E +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +0E330E4A0E6002090209020902090209020902090209020902 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +0E +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0E33 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +0E330E +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +0E330E4A +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0E330E4A0E +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +0E330E4A0E6002090209020902090209020902090209020902 +select @@collation_connection; +@@collation_connection +ucs2_unicode_ci +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +0E23 +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +0E230E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +0E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +0E230E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +0E230E230E2302090209 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +0E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +0E230E +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +0E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +0E230E2302 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +0E230E23020902090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +0E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +0E230E +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +0E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +0E230E230E +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +0E230E230E2302090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +0E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +0E230E +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +0E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +0E230E230E +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +0E230E230E2302090209020902090209020902090209020902 +select @@collation_connection; +@@collation_connection +ucs2_unicode_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +0E33 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +0E33 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +0E330E4A0E60 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +0E330E4A +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +0E330E4A0E60 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +0E330E4A0E6002090209 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +09020902600E4A0E330E +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +F1CCF1B5F19FFDF6FDF6 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +F6FDF6FD9FF1B5F1CCF1 +set @@collation_connection=utf8_unicode_ci; +select @@collation_connection; +@@collation_connection +utf8_unicode_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(16) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0E33 +SELECT HEX(ws) FROM t2; +HEX(ws) +0E33 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(80) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0E330E330E330E330E33 +SELECT HEX(ws) FROM t2; +HEX(ws) +0E330E330E330E330E33 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(48) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +0E330E330E33 +SELECT HEX(ws) FROM t2; +HEX(ws) +0E330E330E33 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(160) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +0E330E330E330E330E3302090209020902090209 +SELECT HEX(ws) FROM t2; +HEX(ws) +0E330E330E330E330E3302090209020902090209 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +0E33 +select hex(weight_string('A')); +hex(weight_string('A')) +0E33 +select hex(weight_string('abc')); +hex(weight_string('abc')) +0E330E4A0E60 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +0E330E4A +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +0E330E4A0E60 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +0E330E4A0E6002090209 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +0E +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0E33 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +0E330E +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +0E330E4A +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0E330E4A02 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +0E330E4A020902090209020902090209020902090209020902 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +0E +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0E33 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +0E330E +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +0E330E4A +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0E330E4A0E +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +0E330E4A0E6002090209020902090209020902090209020902 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +0E +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0E33 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +0E330E +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +0E330E4A +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0E330E4A0E +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +0E330E4A0E6002090209020902090209020902090209020902 +select @@collation_connection; +@@collation_connection +utf8_unicode_ci +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +0E23 +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +0E230E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +0E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +0E230E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +0E230E230E2302090209 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +0E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +0E230E +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +0E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +0E230E2302 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +0E230E23020902090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +0E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +0E230E +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +0E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +0E230E230E +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +0E230E230E2302090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +0E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +0E230E +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +0E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +0E230E230E +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +0E230E230E2302090209020902090209020902090209020902 +select @@collation_connection; +@@collation_connection +utf8_unicode_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +0E33 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +0E33 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +0E330E4A0E60 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +0E330E4A +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +0E330E4A0E60 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +0E330E4A0E6002090209 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +09020902600E4A0E330E +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +F1CCF1B5F19FFDF6FDF6 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +F6FDF6FD9FF1B5F1CCF1 +set @@collation_connection=utf8_czech_ci; +select @@collation_connection; +@@collation_connection +utf8_czech_ci +select collation(cast(_latin1 0xDF as char)); +collation(cast(_latin1 0xDF as char)) +utf8_czech_ci +select hex(weight_string('s')); +hex(weight_string('s')) +0FEA +select hex(weight_string(cast(_latin1 0xDF as char))); +hex(weight_string(cast(_latin1 0xDF as char))) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF as char) as char(1))); +hex(weight_string(cast(_latin1 0xDF as char) as char(1))) +0FEA +select hex(weight_string('c')); +hex(weight_string('c')) +0E60 +select hex(weight_string('h')); +hex(weight_string('h')) +0EE1 +select hex(weight_string('ch')); +hex(weight_string('ch')) +0EE2 +select hex(weight_string('i')); +hex(weight_string('i')) +0EFB +select hex(weight_string(cast(_latin1 0x6368DF as char))); +hex(weight_string(cast(_latin1 0x6368DF as char))) +0EE20FEA0FEA +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(1))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(1))) +0EE2 +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(2))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(2))) +0EE20FEA +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(3))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(3))) +0EE20FEA0FEA +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(4))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(4))) +0EE20FEA0FEA0209 +select hex(weight_string(cast(_latin1 0xDF6368 as char))); +hex(weight_string(cast(_latin1 0xDF6368 as char))) +0FEA0FEA0EE2 +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(1))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(1))) +0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(2))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(2))) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(3))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(3))) +0FEA0FEA0EE2 +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(4))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(4))) +0FEA0FEA0EE20209 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 2, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 2, 0xC0)) +0EE2 +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 2, 0xC0)) +0EE20F +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 2, 0xC0)) +0EE20FEA +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 2, 0xC0)) +0EE20FEA020902090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 3, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 3, 0xC0)) +0EE2 +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 3, 0xC0)) +0EE20F +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 3, 0xC0)) +0EE20FEA +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 3, 0xC0)) +0EE20FEA0FEA02090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 4, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 4, 0xC0)) +0EE2 +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 4, 0xC0)) +0EE20F +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 4, 0xC0)) +0EE20FEA +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 4, 0xC0)) +0EE20FEA0FEA02090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 2,0xC0)) +0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 2,0xC0)) +0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 2,0xC0)) +0FEA0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 2,0xC0)) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 2,0xC0)) +0FEA0FEA020902090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 3,0xC0)) +0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 3,0xC0)) +0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 3,0xC0)) +0FEA0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 3,0xC0)) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 3,0xC0)) +0FEA0FEA0EE202090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 4,0xC0)) +0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 4,0xC0)) +0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 4,0xC0)) +0FEA0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 4,0xC0)) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0)) +0FEA0FEA0EE202090209020902090209020902090209020902 +set @@collation_connection=ucs2_czech_ci; +select @@collation_connection; +@@collation_connection +ucs2_czech_ci +select collation(cast(_latin1 0xDF as char)); +collation(cast(_latin1 0xDF as char)) +ucs2_czech_ci +select hex(weight_string('s')); +hex(weight_string('s')) +0FEA +select hex(weight_string(cast(_latin1 0xDF as char))); +hex(weight_string(cast(_latin1 0xDF as char))) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF as char) as char(1))); +hex(weight_string(cast(_latin1 0xDF as char) as char(1))) +0FEA +select hex(weight_string('c')); +hex(weight_string('c')) +0E60 +select hex(weight_string('h')); +hex(weight_string('h')) +0EE1 +select hex(weight_string('ch')); +hex(weight_string('ch')) +0EE2 +select hex(weight_string('i')); +hex(weight_string('i')) +0EFB +select hex(weight_string(cast(_latin1 0x6368DF as char))); +hex(weight_string(cast(_latin1 0x6368DF as char))) +0EE20FEA0FEA +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(1))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(1))) +0EE2 +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(2))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(2))) +0EE20FEA +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(3))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(3))) +0EE20FEA0FEA +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(4))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(4))) +0EE20FEA0FEA0209 +select hex(weight_string(cast(_latin1 0xDF6368 as char))); +hex(weight_string(cast(_latin1 0xDF6368 as char))) +0FEA0FEA0EE2 +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(1))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(1))) +0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(2))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(2))) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(3))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(3))) +0FEA0FEA0EE2 +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(4))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(4))) +0FEA0FEA0EE20209 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 2, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 2, 0xC0)) +0EE2 +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 2, 0xC0)) +0EE20F +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 2, 0xC0)) +0EE20FEA +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 2, 0xC0)) +0EE20FEA020902090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 3, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 3, 0xC0)) +0EE2 +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 3, 0xC0)) +0EE20F +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 3, 0xC0)) +0EE20FEA +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 3, 0xC0)) +0EE20FEA0FEA02090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 4, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 4, 0xC0)) +0EE2 +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 4, 0xC0)) +0EE20F +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 4, 0xC0)) +0EE20FEA +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 4, 0xC0)) +0EE20FEA0FEA02090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 2,0xC0)) +0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 2,0xC0)) +0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 2,0xC0)) +0FEA0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 2,0xC0)) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 2,0xC0)) +0FEA0FEA020902090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 3,0xC0)) +0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 3,0xC0)) +0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 3,0xC0)) +0FEA0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 3,0xC0)) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 3,0xC0)) +0FEA0FEA0EE202090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 4,0xC0)) +0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 4,0xC0)) +0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 4,0xC0)) +0FEA0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 4,0xC0)) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0)) +0FEA0FEA0EE202090209020902090209020902090209020902 +# +# Bug#33077 weight of supplementary characters is not 0xfffd +# +select hex(weight_string(_utf8mb4 0xF0908080 /* U+10000 */ collate utf8mb4_unicode_ci)); +hex(weight_string(_utf8mb4 0xF0908080 /* U+10000 */ collate utf8mb4_unicode_ci)) +FFFD +# +# Bug#53064 garbled data when using utf8_german2_ci collation +# +CREATE TABLE t1 (s1 VARCHAR(10) COLLATE utf8_german2_ci); +INSERT INTO t1 VALUES ('a'),('ae'),('af'); +SELECT s1,hex(s1),hex(weight_string(s1)) FROM t1 ORDER BY s1; +s1 hex(s1) hex(weight_string(s1)) +a 61 0E33 +ae 6165 0E330E8B +af 6166 0E330EB9 +DROP TABLE t1; +# +# WL#4013 Unicode german2 collation +# +SET collation_connection=utf8_german2_ci; +"BEGIN ctype_german.inc" +drop table if exists t1; +create table t1 as select repeat(' ', 64) as s1; +select collation(s1) from t1; +collation(s1) +utf8_german2_ci +delete from t1; +INSERT INTO t1 VALUES ('ud'),('uf'); +INSERT INTO t1 VALUES ('od'),('of'); +INSERT INTO t1 VALUES ('e'); +INSERT INTO t1 VALUES ('ad'),('af'); +insert into t1 values ('a'),('ae'),(_latin1 0xE4); +insert into t1 values ('o'),('oe'),(_latin1 0xF6); +insert into t1 values ('s'),('ss'),(_latin1 0xDF); +insert into t1 values ('u'),('ue'),(_latin1 0xFC); +INSERT INTO t1 VALUES (_latin1 0xE6), (_latin1 0xC6); +INSERT INTO t1 VALUES (_latin1 0x9C), (_latin1 0x8C); +select s1, hex(s1) from t1 order by s1, binary s1; +s1 hex(s1) +a 61 +ad 6164 +ae 6165 +Æ C386 +ä C3A4 +æ C3A6 +af 6166 +e 65 +o 6F +od 6F64 +oe 6F65 +ö C3B6 +Å’ C592 +Å“ C593 +of 6F66 +s 73 +ss 7373 +ß C39F +u 75 +ud 7564 +ue 7565 +ü C3BC +uf 7566 +select group_concat(s1 order by binary s1) from t1 group by s1; +group_concat(s1 order by binary s1) +a +ad +ae,Æ,ä,æ +af +e +o +od +oe,ö,Å’,Å“ +of +s +ss,ß +u +ud +ue,ü +uf +SELECT s1, hex(s1), hex(weight_string(s1)) FROM t1 ORDER BY s1, BINARY(s1); +s1 hex(s1) hex(weight_string(s1)) +a 61 0E33 +ad 6164 0E330E6D +ae 6165 0E330E8B +Æ C386 0E330E8B +ä C3A4 0E330E8B +æ C3A6 0E330E8B +af 6166 0E330EB9 +e 65 0E8B +o 6F 0F82 +od 6F64 0F820E6D +oe 6F65 0F820E8B +ö C3B6 0F820E8B +Å’ C592 0F820E8B +Å“ C593 0F820E8B +of 6F66 0F820EB9 +s 73 0FEA +ss 7373 0FEA0FEA +ß C39F 0FEA0FEA +u 75 101F +ud 7564 101F0E6D +ue 7565 101F0E8B +ü C3BC 101F0E8B +uf 7566 101F0EB9 +SELECT s1, hex(s1) FROM t1 WHERE s1='ae' ORDER BY s1, BINARY(s1); +s1 hex(s1) +ae 6165 +Æ C386 +ä C3A4 +æ C3A6 +drop table t1; +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL DEFAULT '', + `b` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); +SELECT * FROM t1 ORDER BY a, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY a DESC, b; +a b +ß 1 +s 0 +SELECT * FROM t1 ORDER BY CONCAT(a), b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a) DESC, b; +a b +ß 1 +s 0 +DROP TABLE t1; +"END ctype_german.inc" +# +# WL#2673 Unicode Collation Algorithm new version +# +SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_ci; +CREATE TABLE t1 AS SELECT repeat('a', 10) as c LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (_utf32 0x0180),(_utf32 0x023A); +INSERT INTO t1 VALUES (_utf32 0x023B),(_utf32 0x023C); +INSERT INTO t1 VALUES (_utf32 0x023D),(_utf32 0x023E); +INSERT INTO t1 VALUES (_utf32 0x0241),(_utf32 0x0242); +INSERT INTO t1 VALUES (_utf32 0x0243),(_utf32 0x0244); +INSERT INTO t1 VALUES (_utf32 0x0245),(_utf32 0x0246); +INSERT INTO t1 VALUES (_utf32 0x0247),(_utf32 0x0248); +INSERT INTO t1 VALUES (_utf32 0x0249),(_utf32 0x024A); +INSERT INTO t1 VALUES (_utf32 0x024B),(_utf32 0x024C); +INSERT INTO t1 VALUES (_utf32 0x024D),(_utf32 0x024E); +INSERT INTO t1 VALUES (_utf32 0x024F),(_utf32 0x026B); +INSERT INTO t1 VALUES (_utf32 0x027D),(_utf32 0x0289); +INSERT INTO t1 VALUES (_utf32 0x028C); +INSERT INTO t1 VALUES (_utf32 0x037B), (_utf32 0x037C); +INSERT INTO t1 VALUES (_utf32 0x037D), (_utf32 0x03FD); +INSERT INTO t1 VALUES (_utf32 0x03FE), (_utf32 0x03FF); +INSERT INTO t1 VALUES (_utf32 0x04C0), (_utf32 0x04CF); +INSERT INTO t1 VALUES (_utf32 0x04F6), (_utf32 0x04F7); +INSERT INTO t1 VALUES (_utf32 0x04FA), (_utf32 0x04FB); +INSERT INTO t1 VALUES (_utf32 0x04FC), (_utf32 0x04FD); +INSERT INTO t1 VALUES (_utf32 0x04FE), (_utf32 0x04FF); +INSERT INTO t1 VALUES (_utf32 0x0510), (_utf32 0x0511); +INSERT INTO t1 VALUES (_utf32 0x0512), (_utf32 0x0513); +INSERT INTO t1 VALUES (_utf32 0x10A0), (_utf32 0x10A1); +INSERT INTO t1 VALUES (_utf32 0x10A2), (_utf32 0x10A3); +INSERT INTO t1 VALUES (_utf32 0x10A4), (_utf32 0x10A5); +INSERT INTO t1 VALUES (_utf32 0x10A6), (_utf32 0x10A7); +INSERT INTO t1 VALUES (_utf32 0x2D00), (_utf32 0x2D01); +INSERT INTO t1 VALUES (_utf32 0x2D02), (_utf32 0x2D03); +INSERT INTO t1 VALUES (_utf32 0x2D04), (_utf32 0x2D05); +INSERT INTO t1 VALUES (_utf32 0x2D06), (_utf32 0x2D07); +INSERT INTO t1 VALUES (_utf32 0x1D7D); +INSERT INTO t1 VALUES (_utf32 0x2132),(_utf32 0x214E); +INSERT INTO t1 VALUES (_utf32 0x2183),(_utf32 0x2184); +INSERT INTO t1 VALUES (_utf32 0x2C80), (_utf32 0x2C81); +INSERT INTO t1 VALUES (_utf32 0x2C82), (_utf32 0x2C83); +INSERT INTO t1 VALUES (_utf32 0x2C84), (_utf32 0x2C85); +INSERT INTO t1 VALUES (_utf32 0x2C86), (_utf32 0x2C87); +INSERT INTO t1 VALUES (_utf32 0x2C88), (_utf32 0x2C89); +INSERT INTO t1 VALUES (_utf32 0x2C8A), (_utf32 0x2C8B); +INSERT INTO t1 VALUES (_utf32 0x2C8C), (_utf32 0x2C8D); +INSERT INTO t1 VALUES (_utf32 0x2C8E), (_utf32 0x2C8F); +INSERT INTO t1 VALUES (_utf32 0x2C60), (_utf32 0x2C61); +INSERT INTO t1 VALUES (_utf32 0x2C62), (_utf32 0x2C63); +INSERT INTO t1 VALUES (_utf32 0x2C64), (_utf32 0x2C65); +INSERT INTO t1 VALUES (_utf32 0x2C66), (_utf32 0x2C67); +INSERT INTO t1 VALUES (_utf32 0x2C68), (_utf32 0x2C69); +INSERT INTO t1 VALUES (_utf32 0x2C6A), (_utf32 0x2C6B); +INSERT INTO t1 VALUES (_utf32 0x2C6C), (_utf32 0x2C75); +INSERT INTO t1 VALUES (_utf32 0x2C76); +INSERT INTO t1 VALUES (_utf32 0x2C00), (_utf32 0x2C01); +INSERT INTO t1 VALUES (_utf32 0x2C02), (_utf32 0x2C03); +INSERT INTO t1 VALUES (_utf32 0x2C04), (_utf32 0x2C05); +INSERT INTO t1 VALUES (_utf32 0x2C06), (_utf32 0x2C07); +INSERT INTO t1 VALUES (_utf32 0x2C30), (_utf32 0x2C31); +INSERT INTO t1 VALUES (_utf32 0x2C32), (_utf32 0x2C33); +INSERT INTO t1 VALUES (_utf32 0x2C34), (_utf32 0x2C35); +INSERT INTO t1 VALUES (_utf32 0x2C36), (_utf32 0x2C37); +INSERT INTO t1 VALUES (_utf32 0x10400), (_utf32 0x10401); +INSERT INTO t1 VALUES (_utf32 0x10402), (_utf32 0x10403); +INSERT INTO t1 VALUES (_utf32 0x10404), (_utf32 0x10405); +INSERT INTO t1 VALUES (_utf32 0x10406), (_utf32 0x10407); +INSERT INTO t1 VALUES (_utf32 0x10428), (_utf32 0x10429); +INSERT INTO t1 VALUES (_utf32 0x1042A), (_utf32 0x1042B); +INSERT INTO t1 VALUES (_utf32 0x1042C), (_utf32 0x1042D); +INSERT INTO t1 VALUES (_utf32 0x1042E), (_utf32 0x1042F); +INSERT INTO t1 VALUES (_utf32 0x0370); +INSERT INTO t1 VALUES (_utf32 0x0371); +INSERT INTO t1 VALUES (_utf32 0x0372); +INSERT INTO t1 VALUES (_utf32 0x0373); +INSERT INTO t1 VALUES (_utf32 0x0514); +INSERT INTO t1 VALUES (_utf32 0x0515); +INSERT INTO t1 VALUES (_utf32 0x0516); +INSERT INTO t1 VALUES (_utf32 0x0517); +INSERT INTO t1 VALUES (_utf32 0xA640); +INSERT INTO t1 VALUES (_utf32 0xA641); +INSERT INTO t1 VALUES (_utf32 0xA642); +INSERT INTO t1 VALUES (_utf32 0xA643); +INSERT INTO t1 VALUES (_utf32 0xA722); +INSERT INTO t1 VALUES (_utf32 0xA723); +INSERT INTO t1 VALUES (_utf32 0xA724); +INSERT INTO t1 VALUES (_utf32 0xA725); +INSERT INTO t1 VALUES (_utf32 0xA726); +INSERT INTO t1 VALUES (_utf32 0xA727); +INSERT INTO t1 VALUES (_utf32 0xA728); +INSERT INTO t1 VALUES (_utf32 0xA729); +INSERT INTO t1 VALUES (_utf32 0xA72A); +INSERT INTO t1 VALUES (_utf32 0xA72B); +INSERT INTO t1 VALUES (_utf32 0x2CEB); +INSERT INTO t1 VALUES (_utf32 0x2CEC); +INSERT INTO t1 VALUES (_utf32 0x2CED); +INSERT INTO t1 VALUES (_utf32 0x2CEE); +SELECT hex(c), hex(lower(c)), hex(upper(c)), hex(weight_string(c)), c +FROM t1 ORDER BY c, BINARY c; +hex(c) hex(lower(c)) hex(upper(c)) hex(weight_string(c)) c +C8BA C8BA 1214 Ⱥ +E2B1A5 E2B1A5 C8BA 1214 â±¥ +C680 C680 C983 122D Æ€ +C983 C680 C983 122D Ƀ +C8BB C8BC C8BB 1242 È» +C8BC C8BC C8BB 1242 ȼ +E28683 E28684 E28683 124E Ↄ +E28684 E28684 E28683 124E ↄ +C986 C987 C986 1270 Ɇ +C987 C987 C986 1270 ɇ +E284B2 E2858E E284B2 12AE Ⅎ +E2858E E2858E E284B2 12AE â…Ž +E2B1A7 E2B1A8 E2B1A7 12E3 â±§ +E2B1A8 E2B1A8 E2B1A7 12E3 ⱨ +E2B1B5 E2B1B6 E2B1B5 12E4 â±µ +E2B1B6 E2B1B6 E2B1B5 12E4 â±¶ +EA9CA6 EA9CA7 EA9CA6 12E5 Ꜧ +EA9CA7 EA9CA7 EA9CA6 12E5 ꜧ +C988 C989 C988 130E Ɉ +C989 C989 C988 130E ɉ +E2B1A9 E2B1AA E2B1A9 1328 Ⱪ +E2B1AA E2B1AA E2B1A9 1328 ⱪ +C8BD C69A C8BD 133B Ƚ +E2B1A0 E2B1A1 E2B1A0 133F â± +E2B1A1 E2B1A1 E2B1A0 133F ⱡ +C9AB C9AB 1340 É« +E2B1A2 C9AB E2B1A2 1340 â±¢ +E1B5BD E1B5BD E2B1A3 13B8 áµ½ +E2B1A3 E1B5BD E2B1A3 13B8 â±£ +C98A C98B C98A 13D2 ÉŠ +C98B C98B C98A 13D2 É‹ +C98C C98D C98C 13E4 ÉŒ +C98D C98D C98C 13E4 É +C9BD C9BD 13FC ɽ +E2B1A4 C9BD E2B1A4 13FC Ɽ +EA9CA8 EA9CA9 EA9CA8 143314AD Ꜩ +EA9CA9 EA9CA9 EA9CA8 143314AD ꜩ +C8BE C8BE 143C Ⱦ +E2B1A6 E2B1A6 C8BE 143C ⱦ +C984 CA89 C984 145B É„ +CA89 CA89 C984 145B ʉ +C985 CA8C C985 1489 É… +CA8C CA8C C985 1489 ÊŒ +C98E C98F C98E 14A4 ÉŽ +C98F C98F C98E 14A4 É +E2B1AB E2B1AC E2B1AB 14C8 Ⱬ +E2B1AC E2B1AC E2B1AB 14C8 ⱬ +EA9CAA EA9CAB EA9CAA 14F3 Ꜫ +EA9CAB EA9CAB EA9CAA 14F3 ꜫ +C981 C982 C981 1506 É +C982 C982 C981 1506 É‚ +EA9CA2 EA9CA3 EA9CA2 150E Ꜣ +EA9CA3 EA9CA3 EA9CA2 150E ꜣ +EA9CA4 EA9CA5 EA9CA4 1518 Ꜥ +EA9CA5 EA9CA5 EA9CA4 1518 ꜥ +CDB0 CDB1 CDB0 154F Ͱ +CDB1 CDB1 CDB0 154F ͱ +CDBC CDBC CFBE 1564 ͼ +CFBE CDBC CFBE 1564 Ͼ +CDBB CDBB CFBD 1565 Í» +CFBD CDBB CFBD 1565 Ͻ +CDBD CDBD CFBF 1566 ͽ +CFBF CDBD CFBF 1566 Ï¿ +CDB2 CDB3 CDB2 156F Ͳ +CDB3 CDB3 CDB2 156F ͳ +E2B280 E2B281 E2B280 1571 â²€ +E2B281 E2B281 E2B280 1571 â² +E2B282 E2B283 E2B282 1572 Ⲃ +E2B283 E2B283 E2B282 1572 ⲃ +E2B284 E2B285 E2B284 1573 Ⲅ +E2B285 E2B285 E2B284 1573 â²… +E2B286 E2B287 E2B286 1574 Ⲇ +E2B287 E2B287 E2B286 1574 ⲇ +E2B288 E2B289 E2B288 1575 Ⲉ +E2B289 E2B289 E2B288 1575 ⲉ +E2B28A E2B28B E2B28A 1577 Ⲋ +E2B28B E2B28B E2B28A 1577 ⲋ +E2B28C E2B28D E2B28C 1578 Ⲍ +E2B28D E2B28D E2B28C 1578 â² +E2B28E E2B28F E2B28E 1579 Ⲏ +E2B28F E2B28F E2B28E 1579 â² +E2B3AB E2B3AC E2B3AB 1591 Ⳬ +E2B3AC E2B3AC E2B3AB 1591 ⳬ +E2B3AD E2B3AE E2B3AD 15A0 â³ +E2B3AE E2B3AE E2B3AD 15A0 â³® +D3BA D3BB D3BA 15D4 Óº +D3BB D3BB D3BA 15D4 Ó» +D3B6 D3B7 D3B6 15DC Ó¶ +D3B7 D3B7 D3B6 15DC Ó· +EA9980 EA9981 EA9980 1611 Ꙁ +EA9981 EA9981 EA9980 1611 ê™ +D490 D491 D490 1613 Ô +D491 D491 D490 1613 Ô‘ +EA9982 EA9983 EA9982 1618 Ꙃ +EA9983 EA9983 EA9982 1618 ꙃ +D492 D493 D492 1666 Ô’ +D493 D493 D492 1666 Ô“ +D494 D495 D494 166E Ô” +D495 D495 D494 166E Ô• +D496 D497 D496 16B7 Ô– +D497 D497 D496 16B7 Ô— +D3BC D3BD D3BC 16F9 Ó¼ +D3BD D3BD D3BC 16F9 Ó½ +D3BE D3BF D3BE 16FD Ó¾ +D3BF D3BF D3BE 16FD Ó¿ +D380 D38F D380 17B1 Ó€ +D38F D38F D380 17B1 Ó +E2B080 E2B0B0 E2B080 17B5 â°€ +E2B0B0 E2B0B0 E2B080 17B5 â°° +E2B081 E2B0B1 E2B081 17B6 â° +E2B0B1 E2B0B1 E2B081 17B6 â°± +E2B082 E2B0B2 E2B082 17B7 â°‚ +E2B0B2 E2B0B2 E2B082 17B7 â°² +E2B083 E2B0B3 E2B083 17B8 â°ƒ +E2B0B3 E2B0B3 E2B083 17B8 â°³ +E2B084 E2B0B4 E2B084 17B9 â°„ +E2B0B4 E2B0B4 E2B084 17B9 â°´ +E2B085 E2B0B5 E2B085 17BA â°… +E2B0B5 E2B0B5 E2B085 17BA â°µ +E2B086 E2B0B6 E2B086 17BB â°† +E2B0B6 E2B0B6 E2B086 17BB â°¶ +E2B087 E2B0B7 E2B087 17BC â°‡ +E2B0B7 E2B0B7 E2B087 17BC â°· +E182A0 E2B480 E182A0 17E5 á‚ +E2B480 E2B480 E182A0 17E5 â´€ +E182A1 E2B481 E182A1 17E7 á‚¡ +E2B481 E2B481 E182A1 17E7 â´ +E182A2 E2B482 E182A2 17E9 á‚¢ +E2B482 E2B482 E182A2 17E9 â´‚ +E182A3 E2B483 E182A3 17EB á‚£ +E2B483 E2B483 E182A3 17EB â´ƒ +E182A4 E2B484 E182A4 17ED Ⴄ +E2B484 E2B484 E182A4 17ED â´„ +E182A5 E2B485 E182A5 17EF á‚¥ +E2B485 E2B485 E182A5 17EF â´… +E182A6 E2B486 E182A6 17F1 Ⴆ +E2B486 E2B486 E182A6 17F1 â´† +E182A7 E2B487 E182A7 17F5 á‚§ +E2B487 E2B487 E182A7 17F5 â´‡ +F0909080 F09090A8 F0909080 30D2 ð€ +F09090A8 F09090A8 F0909080 30D2 ð¨ +F0909081 F09090A9 F0909081 30D3 ð +F09090A9 F09090A9 F0909081 30D3 ð© +F0909082 F09090AA F0909082 30D4 ð‚ +F09090AA F09090AA F0909082 30D4 ðª +F0909083 F09090AB F0909083 30D5 ðƒ +F09090AB F09090AB F0909083 30D5 ð« +F0909084 F09090AC F0909084 30D6 ð„ +F09090AC F09090AC F0909084 30D6 ð¬ +F0909085 F09090AD F0909085 30D7 ð… +F09090AD F09090AD F0909085 30D7 ð +F0909086 F09090AE F0909086 30D8 ð† +F09090AE F09090AE F0909086 30D8 ð® +F0909087 F09090AF F0909087 30D9 ð‡ +F09090AF F09090AF F0909087 30D9 ð¯ +INSERT INTO t1 VALUES ('a'); +INSERT INTO t1 VALUES (concat(_utf32 0x61, _utf32 0xFFFF)); +INSERT INTO t1 VALUES (concat(_utf32 0x61, _utf32 0x10FFFF)); +INSERT INTO t1 VALUES (concat(_utf32 0x61, _utf32 0x10400)); +SELECT hex(c), hex(weight_string(c)) FROM t1 WHERE c LIKE 'a%' ORDER BY c; +hex(c) hex(weight_string(c)) +61 120F +61F0909080 120F30D2 +61EFBFBF 120FFBC1FFFF +61F48FBFBF 120FFBE1FFFF +SELECT hex(c), hex(weight_string(c)), c FROM t1 WHERE c LIKE _utf32 0x10400 ORDER BY c, BINARY c; +hex(c) hex(weight_string(c)) c +F0909080 30D2 ð€ +F09090A8 30D2 ð¨ +SELECT hex(c), hex(weight_string(c)), c FROM t1 WHERE c LIKE _utf32 0x10428 ORDER BY c, BINARY c; +hex(c) hex(weight_string(c)) c +F0909080 30D2 ð€ +F09090A8 30D2 ð¨ +ALTER TABLE t1 ADD KEY(c); +EXPLAIN SELECT hex(c) FROM t1 WHERE c LIKE 'a%' ORDER BY c; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 42 NULL 3 Using where; Using index +SELECT hex(c), hex(weight_string(c)) FROM t1 WHERE c LIKE 'a%' ORDER BY c; +hex(c) hex(weight_string(c)) +61 120F +61F0909080 120F30D2 +61EFBFBF 120FFBC1FFFF +61F48FBFBF 120FFBE1FFFF +SELECT hex(c), hex(weight_string(c)), c FROM t1 WHERE c LIKE _utf32 0x10400 ORDER BY c, BINARY c; +hex(c) hex(weight_string(c)) c +F0909080 30D2 ð€ +F09090A8 30D2 ð¨ +SELECT hex(c), hex(weight_string(c)), c FROM t1 WHERE c LIKE _utf32 0x10428 ORDER BY c, BINARY c; +hex(c) hex(weight_string(c)) c +F0909080 30D2 ð€ +F09090A8 30D2 ð¨ +DROP TABLE t1; +# +# End of 5.6 tests +# +# +# Start of MariaDB-10.0 tests +# + +SET NAMES utf8 COLLATE utf8_unicode_ci; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a ')) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('ae'),('ä'); +SELECT * FROM t1 WHERE c1='ä'; +c1 +ä +SELECT * FROM t1 WHERE c1 LIKE 'ae'; +c1 +ae +SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae'; +c1 +EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((`test`.`t1`.`c1` = 'ä') and (`test`.`t1`.`c1` like 'ae')) +SELECT * FROM t1 WHERE CONCAT(c1)='ä'; +c1 +ä +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'ae'; +c1 +ae +SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae'; +c1 +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'ä') and (concat(`test`.`t1`.`c1`) like 'ae')) +DROP TABLE IF EXISTS t1; +SET NAMES utf8 COLLATE utf8_german2_ci; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a ')) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('ae'),('ä'); +SELECT * FROM t1 WHERE c1='ä'; +c1 +ae +ä +SELECT * FROM t1 WHERE c1 LIKE 'ae'; +c1 +ae +SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae'; +c1 +ae +EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((`test`.`t1`.`c1` = 'ä') and (`test`.`t1`.`c1` like 'ae')) +SELECT * FROM t1 WHERE CONCAT(c1)='ä'; +c1 +ae +ä +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'ae'; +c1 +ae +SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae'; +c1 +ae +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'ä') and (concat(`test`.`t1`.`c1`) like 'ae')) +DROP TABLE IF EXISTS t1; +# +# MDEV-4929 Myanmar collation +# +SET NAMES utf8 COLLATE utf8_myanmar_ci; +# +# Start of ctype_myanmar.inc +# +SELECT @@collation_connection; +@@collation_connection +utf8_myanmar_ci +CREATE TABLE t1 AS SELECT 100000 AS id, REPEAT(' ', 64) AS s1 LIMIT 0; +SELECT COLLATION(s1) FROM t1; +COLLATION(s1) +DELETE FROM t1; +ALTER TABLE t1 MODIFY id INT NOT NULL AUTO_INCREMENT PRIMARY KEY; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `s1` varchar(64) CHARACTER SET utf8 COLLATE utf8_myanmar_ci NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 (s1) VALUES +(_ucs2 0x108C), +(_ucs2 0x1037), +(_ucs2 0x1038), +(_ucs2 0x10371038), +('--- Vowels'), +(_ucs2 0x102C), +(_ucs2 0x102B), +(_ucs2 0x1032), +(_ucs2 0x1031102C), +(_ucs2 0x1031102B), +(_ucs2 0x1031102C103A), +(_ucs2 0x1031102B103A), +(_ucs2 0x1034), +(_ucs2 0x1036), +(_ucs2 0x102D102F), +('--- Vowels with finals'), +(_ucs2 0x10001039), +(_ucs2 0x1000103A), +(_ucs2 0x102C10001039), +(_ucs2 0x102C1000103A), +(_ucs2 0x102B10001039), +(_ucs2 0x102B1000103A), +(_ucs2 0x102D10001039), +(_ucs2 0x102D1000103A), +(_ucs2 0x102F10001039), +(_ucs2 0x102F1000103A), +(_ucs2 0x103110001039), +(_ucs2 0x10311000103A), +(_ucs2 0x1031102C10001039), +(_ucs2 0x1031102C1000103A), +(_ucs2 0x1031102B10001039), +(_ucs2 0x1031102B1000103A), +(_ucs2 0x102D102F10001039), +(_ucs2 0x102D102F1000103A), +(_ucs2 0x10011039), +(_ucs2 0x1001103A), +(_ucs2 0x102C10011039), +(_ucs2 0x102C1001103A), +(_ucs2 0x102B10011039), +(_ucs2 0x102B1001103A), +(_ucs2 0x102D10011039), +(_ucs2 0x102D1001103A), +(_ucs2 0x102F10011039), +(_ucs2 0x102F1001103A), +(_ucs2 0x103110011039), +(_ucs2 0x10311001103A), +(_ucs2 0x1031102C10011039), +(_ucs2 0x1031102C1001103A), +(_ucs2 0x1031102B10011039), +(_ucs2 0x1031102B1001103A), +(_ucs2 0x102D102F10011039), +(_ucs2 0x102D102F1001103A), +(_ucs2 0x10021039), +(_ucs2 0x1002103A), +(_ucs2 0x102C10021039), +(_ucs2 0x102C1002103A), +(_ucs2 0x102B10021039), +(_ucs2 0x102B1002103A), +(_ucs2 0x102D10021039), +(_ucs2 0x102D1002103A), +(_ucs2 0x102F10021039), +(_ucs2 0x102F1002103A), +(_ucs2 0x103110021039), +(_ucs2 0x10311002103A), +(_ucs2 0x1031102C10021039), +(_ucs2 0x1031102C1002103A), +(_ucs2 0x1031102B10021039), +(_ucs2 0x1031102B1002103A), +(_ucs2 0x102D102F10021039), +(_ucs2 0x102D102F1002103A), +(_ucs2 0x10031039), +(_ucs2 0x1003103A), +(_ucs2 0x102C10031039), +(_ucs2 0x102C1003103A), +(_ucs2 0x102B10031039), +(_ucs2 0x102B1003103A), +(_ucs2 0x102D10031039), +(_ucs2 0x102D1003103A), +(_ucs2 0x102F10031039), +(_ucs2 0x102F1003103A), +(_ucs2 0x103110031039), +(_ucs2 0x10311003103A), +(_ucs2 0x1031102C10031039), +(_ucs2 0x1031102C1003103A), +(_ucs2 0x1031102B10031039), +(_ucs2 0x1031102B1003103A), +(_ucs2 0x102D102F10031039), +(_ucs2 0x102D102F1003103A), +(_ucs2 0x1004103A1039), +(_ucs2 0x1004103A), +(_ucs2 0x102C1004103A1039), +(_ucs2 0x102C1004103A), +(_ucs2 0x102B1004103A1039), +(_ucs2 0x102B1004103A), +(_ucs2 0x102D1004103A1039), +(_ucs2 0x102D1004103A), +(_ucs2 0x102F1004103A1039), +(_ucs2 0x102F1004103A), +(_ucs2 0x10311004103A1039), +(_ucs2 0x10311004103A), +(_ucs2 0x1031102C1004103A1039), +(_ucs2 0x1031102C1004103A), +(_ucs2 0x1031102B1004103A1039), +(_ucs2 0x1031102B1004103A), +(_ucs2 0x102D102F1004103A1039), +(_ucs2 0x102D102F1004103A), +(_ucs2 0x10051039), +(_ucs2 0x1005103A), +(_ucs2 0x102C10051039), +(_ucs2 0x102C1005103A), +(_ucs2 0x102B10051039), +(_ucs2 0x102B1005103A), +(_ucs2 0x102D10051039), +(_ucs2 0x102D1005103A), +(_ucs2 0x102F10051039), +(_ucs2 0x102F1005103A), +(_ucs2 0x103110051039), +(_ucs2 0x10311005103A), +(_ucs2 0x1031102C10051039), +(_ucs2 0x1031102C1005103A), +(_ucs2 0x1031102B10051039), +(_ucs2 0x1031102B1005103A), +(_ucs2 0x102D102F10051039), +(_ucs2 0x102D102F1005103A), +(_ucs2 0x10061039), +(_ucs2 0x1006103A), +(_ucs2 0x102C10061039), +(_ucs2 0x102C1006103A), +(_ucs2 0x102B10061039), +(_ucs2 0x102B1006103A), +(_ucs2 0x102D10061039), +(_ucs2 0x102D1006103A), +(_ucs2 0x102F10061039), +(_ucs2 0x102F1006103A), +(_ucs2 0x103110061039), +(_ucs2 0x10311006103A), +(_ucs2 0x1031102C10061039), +(_ucs2 0x1031102C1006103A), +(_ucs2 0x1031102B10061039), +(_ucs2 0x1031102B1006103A), +(_ucs2 0x102D102F10061039), +(_ucs2 0x102D102F1006103A), +(_ucs2 0x10071039), +(_ucs2 0x1007103A), +(_ucs2 0x102C10071039), +(_ucs2 0x102C1007103A), +(_ucs2 0x102B10071039), +(_ucs2 0x102B1007103A), +(_ucs2 0x102D10071039), +(_ucs2 0x102D1007103A), +(_ucs2 0x102F10071039), +(_ucs2 0x102F1007103A), +(_ucs2 0x103110071039), +(_ucs2 0x10311007103A), +(_ucs2 0x1031102C10071039), +(_ucs2 0x1031102C1007103A), +(_ucs2 0x1031102B10071039), +(_ucs2 0x1031102B1007103A), +(_ucs2 0x102D102F10071039), +(_ucs2 0x102D102F1007103A), +(_ucs2 0x1008103A), +(_ucs2 0x102C1008103A), +(_ucs2 0x102B1008103A), +(_ucs2 0x102D1008103A), +(_ucs2 0x102F1008103A), +(_ucs2 0x10311008103A), +(_ucs2 0x1031102C1008103A), +(_ucs2 0x1031102B1008103A), +(_ucs2 0x102D102F1008103A), +(_ucs2 0x10091039), +(_ucs2 0x1009103A), +(_ucs2 0x102C10091039), +(_ucs2 0x102C1009103A), +(_ucs2 0x102B10091039), +(_ucs2 0x102B1009103A), +(_ucs2 0x102D10091039), +(_ucs2 0x102D1009103A), +(_ucs2 0x102F10091039), +(_ucs2 0x102F1009103A), +(_ucs2 0x103110091039), +(_ucs2 0x10311009103A), +(_ucs2 0x1031102C10091039), +(_ucs2 0x1031102C1009103A), +(_ucs2 0x1031102B10091039), +(_ucs2 0x1031102B1009103A), +(_ucs2 0x102D102F10091039), +(_ucs2 0x102D102F1009103A), +(_ucs2 0x100A1039), +(_ucs2 0x100A103A), +(_ucs2 0x102C100A1039), +(_ucs2 0x102C100A103A), +(_ucs2 0x102B100A1039), +(_ucs2 0x102B100A103A), +(_ucs2 0x102D100A1039), +(_ucs2 0x102D100A103A), +(_ucs2 0x102F100A1039), +(_ucs2 0x102F100A103A), +(_ucs2 0x1031100A1039), +(_ucs2 0x1031100A103A), +(_ucs2 0x1031102C100A1039), +(_ucs2 0x1031102C100A103A), +(_ucs2 0x1031102B100A1039), +(_ucs2 0x1031102B100A103A), +(_ucs2 0x102D102F100A1039), +(_ucs2 0x102D102F100A103A), +(_ucs2 0x100B1039), +(_ucs2 0x100B103A), +(_ucs2 0x102C100B1039), +(_ucs2 0x102C100B103A), +(_ucs2 0x102B100B1039), +(_ucs2 0x102B100B103A), +(_ucs2 0x102D100B1039), +(_ucs2 0x102D100B103A), +(_ucs2 0x102F100B1039), +(_ucs2 0x102F100B103A), +(_ucs2 0x1031100B1039), +(_ucs2 0x1031100B103A), +(_ucs2 0x1031102C100B1039), +(_ucs2 0x1031102C100B103A), +(_ucs2 0x1031102B100B1039), +(_ucs2 0x1031102B100B103A), +(_ucs2 0x102D102F100B1039), +(_ucs2 0x102D102F100B103A), +(_ucs2 0x100C1039), +(_ucs2 0x100C103A), +(_ucs2 0x102C100C1039), +(_ucs2 0x102C100C103A), +(_ucs2 0x102B100C1039), +(_ucs2 0x102B100C103A), +(_ucs2 0x102D100C1039), +(_ucs2 0x102D100C103A), +(_ucs2 0x102F100C1039), +(_ucs2 0x102F100C103A), +(_ucs2 0x1031100C1039), +(_ucs2 0x1031100C103A), +(_ucs2 0x1031102C100C1039), +(_ucs2 0x1031102C100C103A), +(_ucs2 0x1031102B100C1039), +(_ucs2 0x1031102B100C103A), +(_ucs2 0x102D102F100C1039), +(_ucs2 0x102D102F100C103A), +(_ucs2 0x100D1039), +(_ucs2 0x100D103A), +(_ucs2 0x102C100D1039), +(_ucs2 0x102C100D103A), +(_ucs2 0x102B100D1039), +(_ucs2 0x102B100D103A), +(_ucs2 0x102D100D1039), +(_ucs2 0x102D100D103A), +(_ucs2 0x102F100D1039), +(_ucs2 0x102F100D103A), +(_ucs2 0x1031100D1039), +(_ucs2 0x1031100D103A), +(_ucs2 0x1031102C100D1039), +(_ucs2 0x1031102C100D103A), +(_ucs2 0x1031102B100D1039), +(_ucs2 0x1031102B100D103A), +(_ucs2 0x102D102F100D1039), +(_ucs2 0x102D102F100D103A), +(_ucs2 0x100E1039), +(_ucs2 0x100E103A), +(_ucs2 0x102C100E1039), +(_ucs2 0x102C100E103A), +(_ucs2 0x102B100E1039), +(_ucs2 0x102B100E103A), +(_ucs2 0x102D100E1039), +(_ucs2 0x102D100E103A), +(_ucs2 0x102F100E1039), +(_ucs2 0x102F100E103A), +(_ucs2 0x1031100E1039), +(_ucs2 0x1031100E103A), +(_ucs2 0x1031102C100E1039), +(_ucs2 0x1031102C100E103A), +(_ucs2 0x1031102B100E1039), +(_ucs2 0x1031102B100E103A), +(_ucs2 0x102D102F100E1039), +(_ucs2 0x102D102F100E103A), +(_ucs2 0x100F1039), +(_ucs2 0x100F103A), +(_ucs2 0x102C100F1039), +(_ucs2 0x102C100F103A), +(_ucs2 0x102B100F1039), +(_ucs2 0x102B100F103A), +(_ucs2 0x102D100F1039), +(_ucs2 0x102D100F103A), +(_ucs2 0x102F100F1039), +(_ucs2 0x102F100F103A), +(_ucs2 0x1031100F1039), +(_ucs2 0x1031100F103A), +(_ucs2 0x1031102C100F1039), +(_ucs2 0x1031102C100F103A), +(_ucs2 0x1031102B100F1039), +(_ucs2 0x1031102B100F103A), +(_ucs2 0x102D102F100F1039), +(_ucs2 0x102D102F100F103A), +(_ucs2 0x10101039), +(_ucs2 0x1010103A), +(_ucs2 0x102C10101039), +(_ucs2 0x102C1010103A), +(_ucs2 0x102B10101039), +(_ucs2 0x102B1010103A), +(_ucs2 0x102D10101039), +(_ucs2 0x102D1010103A), +(_ucs2 0x102F10101039), +(_ucs2 0x102F1010103A), +(_ucs2 0x103110101039), +(_ucs2 0x10311010103A), +(_ucs2 0x1031102C10101039), +(_ucs2 0x1031102C1010103A), +(_ucs2 0x1031102B10101039), +(_ucs2 0x1031102B1010103A), +(_ucs2 0x102D102F10101039), +(_ucs2 0x102D102F1010103A), +(_ucs2 0x10111039), +(_ucs2 0x1011103A), +(_ucs2 0x102C10111039), +(_ucs2 0x102C1011103A), +(_ucs2 0x102B10111039), +(_ucs2 0x102B1011103A), +(_ucs2 0x102D10111039), +(_ucs2 0x102D1011103A), +(_ucs2 0x102F10111039), +(_ucs2 0x102F1011103A), +(_ucs2 0x103110111039), +(_ucs2 0x10311011103A), +(_ucs2 0x1031102C10111039), +(_ucs2 0x1031102C1011103A), +(_ucs2 0x1031102B10111039), +(_ucs2 0x1031102B1011103A), +(_ucs2 0x102D102F10111039), +(_ucs2 0x102D102F1011103A), +(_ucs2 0x10121039), +(_ucs2 0x1012103A), +(_ucs2 0x102C10121039), +(_ucs2 0x102C1012103A), +(_ucs2 0x102B10121039), +(_ucs2 0x102B1012103A), +(_ucs2 0x102D10121039), +(_ucs2 0x102D1012103A), +(_ucs2 0x102F10121039), +(_ucs2 0x102F1012103A), +(_ucs2 0x103110121039), +(_ucs2 0x10311012103A), +(_ucs2 0x1031102C10121039), +(_ucs2 0x1031102C1012103A), +(_ucs2 0x1031102B10121039), +(_ucs2 0x1031102B1012103A), +(_ucs2 0x102D102F10121039), +(_ucs2 0x102D102F1012103A), +(_ucs2 0x10131039), +(_ucs2 0x1013103A), +(_ucs2 0x102C10131039), +(_ucs2 0x102C1013103A), +(_ucs2 0x102B10131039), +(_ucs2 0x102B1013103A), +(_ucs2 0x102D10131039), +(_ucs2 0x102D1013103A), +(_ucs2 0x102F10131039), +(_ucs2 0x102F1013103A), +(_ucs2 0x103110131039), +(_ucs2 0x10311013103A), +(_ucs2 0x1031102C10131039), +(_ucs2 0x1031102C1013103A), +(_ucs2 0x1031102B10131039), +(_ucs2 0x1031102B1013103A), +(_ucs2 0x102D102F10131039), +(_ucs2 0x102D102F1013103A), +(_ucs2 0x10141039), +(_ucs2 0x1014103A), +(_ucs2 0x102C10141039), +(_ucs2 0x102C1014103A), +(_ucs2 0x102B10141039), +(_ucs2 0x102B1014103A), +(_ucs2 0x102D10141039), +(_ucs2 0x102D1014103A), +(_ucs2 0x102F10141039), +(_ucs2 0x102F1014103A), +(_ucs2 0x103110141039), +(_ucs2 0x10311014103A), +(_ucs2 0x1031102C10141039), +(_ucs2 0x1031102C1014103A), +(_ucs2 0x1031102B10141039), +(_ucs2 0x1031102B1014103A), +(_ucs2 0x102D102F10141039), +(_ucs2 0x102D102F1014103A), +(_ucs2 0x10151039), +(_ucs2 0x1015103A), +(_ucs2 0x102C10151039), +(_ucs2 0x102C1015103A), +(_ucs2 0x102B10151039), +(_ucs2 0x102B1015103A), +(_ucs2 0x102D10151039), +(_ucs2 0x102D1015103A), +(_ucs2 0x102F10151039), +(_ucs2 0x102F1015103A), +(_ucs2 0x103110151039), +(_ucs2 0x10311015103A), +(_ucs2 0x1031102C10151039), +(_ucs2 0x1031102C1015103A), +(_ucs2 0x1031102B10151039), +(_ucs2 0x1031102B1015103A), +(_ucs2 0x102D102F10151039), +(_ucs2 0x102D102F1015103A), +(_ucs2 0x10161039), +(_ucs2 0x1016103A), +(_ucs2 0x102C10161039), +(_ucs2 0x102C1016103A), +(_ucs2 0x102B10161039), +(_ucs2 0x102B1016103A), +(_ucs2 0x102D10161039), +(_ucs2 0x102D1016103A), +(_ucs2 0x102F10161039), +(_ucs2 0x102F1016103A), +(_ucs2 0x103110161039), +(_ucs2 0x10311016103A), +(_ucs2 0x1031102C10161039), +(_ucs2 0x1031102C1016103A), +(_ucs2 0x1031102B10161039), +(_ucs2 0x1031102B1016103A), +(_ucs2 0x102D102F10161039), +(_ucs2 0x102D102F1016103A), +(_ucs2 0x10171039), +(_ucs2 0x1017103A), +(_ucs2 0x102C10171039), +(_ucs2 0x102C1017103A), +(_ucs2 0x102B10171039), +(_ucs2 0x102B1017103A), +(_ucs2 0x102D10171039), +(_ucs2 0x102D1017103A), +(_ucs2 0x102F10171039), +(_ucs2 0x102F1017103A), +(_ucs2 0x103110171039), +(_ucs2 0x10311017103A), +(_ucs2 0x1031102C10171039), +(_ucs2 0x1031102C1017103A), +(_ucs2 0x1031102B10171039), +(_ucs2 0x1031102B1017103A), +(_ucs2 0x102D102F10171039), +(_ucs2 0x102D102F1017103A), +(_ucs2 0x10181039), +(_ucs2 0x1018103A), +(_ucs2 0x102C10181039), +(_ucs2 0x102C1018103A), +(_ucs2 0x102B10181039), +(_ucs2 0x102B1018103A), +(_ucs2 0x102D10181039), +(_ucs2 0x102D1018103A), +(_ucs2 0x102F10181039), +(_ucs2 0x102F1018103A), +(_ucs2 0x103110181039), +(_ucs2 0x10311018103A), +(_ucs2 0x1031102C10181039), +(_ucs2 0x1031102C1018103A), +(_ucs2 0x1031102B10181039), +(_ucs2 0x1031102B1018103A), +(_ucs2 0x102D102F10181039), +(_ucs2 0x102D102F1018103A), +(_ucs2 0x10191039), +(_ucs2 0x1019103A), +(_ucs2 0x102C10191039), +(_ucs2 0x102C1019103A), +(_ucs2 0x102B10191039), +(_ucs2 0x102B1019103A), +(_ucs2 0x102D10191039), +(_ucs2 0x102D1019103A), +(_ucs2 0x102F10191039), +(_ucs2 0x102F1019103A), +(_ucs2 0x103110191039), +(_ucs2 0x10311019103A), +(_ucs2 0x1031102C10191039), +(_ucs2 0x1031102C1019103A), +(_ucs2 0x1031102B10191039), +(_ucs2 0x1031102B1019103A), +(_ucs2 0x102D102F10191039), +(_ucs2 0x102D102F1019103A), +(_ucs2 0x101A1039), +(_ucs2 0x101A103A), +(_ucs2 0x102C101A1039), +(_ucs2 0x102C101A103A), +(_ucs2 0x102B101A1039), +(_ucs2 0x102B101A103A), +(_ucs2 0x102D101A1039), +(_ucs2 0x102D101A103A), +(_ucs2 0x102F101A1039), +(_ucs2 0x102F101A103A), +(_ucs2 0x1031101A1039), +(_ucs2 0x1031101A103A), +(_ucs2 0x1031102C101A1039), +(_ucs2 0x1031102C101A103A), +(_ucs2 0x1031102B101A1039), +(_ucs2 0x1031102B101A103A), +(_ucs2 0x102D102F101A1039), +(_ucs2 0x102D102F101A103A), +(_ucs2 0x101B1039), +(_ucs2 0x101B103A), +(_ucs2 0x102C101B1039), +(_ucs2 0x102C101B103A), +(_ucs2 0x102B101B1039), +(_ucs2 0x102B101B103A), +(_ucs2 0x102D101B1039), +(_ucs2 0x102D101B103A), +(_ucs2 0x102F101B1039), +(_ucs2 0x102F101B103A), +(_ucs2 0x1031101B1039), +(_ucs2 0x1031101B103A), +(_ucs2 0x1031102C101B1039), +(_ucs2 0x1031102C101B103A), +(_ucs2 0x1031102B101B1039), +(_ucs2 0x1031102B101B103A), +(_ucs2 0x102D102F101B1039), +(_ucs2 0x102D102F101B103A), +(_ucs2 0x101C1039), +(_ucs2 0x101C103A), +(_ucs2 0x102C101C1039), +(_ucs2 0x102C101C103A), +(_ucs2 0x102B101C1039), +(_ucs2 0x102B101C103A), +(_ucs2 0x102D101C1039), +(_ucs2 0x102D101C103A), +(_ucs2 0x102F101C1039), +(_ucs2 0x102F101C103A), +(_ucs2 0x1031101C1039), +(_ucs2 0x1031101C103A), +(_ucs2 0x1031102C101C1039), +(_ucs2 0x1031102C101C103A), +(_ucs2 0x1031102B101C1039), +(_ucs2 0x1031102B101C103A), +(_ucs2 0x102D102F101C1039), +(_ucs2 0x102D102F101C103A), +(_ucs2 0x101D103A), +(_ucs2 0x102C101D103A), +(_ucs2 0x102B101D103A), +(_ucs2 0x102D101D103A), +(_ucs2 0x102F101D103A), +(_ucs2 0x1031101D103A), +(_ucs2 0x1031102C101D103A), +(_ucs2 0x1031102B101D103A), +(_ucs2 0x102D102F101D103A), +(_ucs2 0x101E1039), +(_ucs2 0x101E103A), +(_ucs2 0x102C101E1039), +(_ucs2 0x102C101E103A), +(_ucs2 0x102B101E1039), +(_ucs2 0x102B101E103A), +(_ucs2 0x102D101E1039), +(_ucs2 0x102D101E103A), +(_ucs2 0x102F101E1039), +(_ucs2 0x102F101E103A), +(_ucs2 0x1031101E1039), +(_ucs2 0x1031101E103A), +(_ucs2 0x1031102C101E1039), +(_ucs2 0x1031102C101E103A), +(_ucs2 0x1031102B101E1039), +(_ucs2 0x1031102B101E103A), +(_ucs2 0x102D102F101E1039), +(_ucs2 0x102D102F101E103A), +(_ucs2 0x101F1039), +(_ucs2 0x101F103A), +(_ucs2 0x102C101F1039), +(_ucs2 0x102C101F103A), +(_ucs2 0x102B101F1039), +(_ucs2 0x102B101F103A), +(_ucs2 0x102D101F1039), +(_ucs2 0x102D101F103A), +(_ucs2 0x102F101F1039), +(_ucs2 0x102F101F103A), +(_ucs2 0x1031101F1039), +(_ucs2 0x1031101F103A), +(_ucs2 0x1031102C101F1039), +(_ucs2 0x1031102C101F103A), +(_ucs2 0x1031102B101F1039), +(_ucs2 0x1031102B101F103A), +(_ucs2 0x102D102F101F1039), +(_ucs2 0x102D102F101F103A), +(_ucs2 0x1020103A), +(_ucs2 0x102C1020103A), +(_ucs2 0x102B1020103A), +(_ucs2 0x102D1020103A), +(_ucs2 0x102F1020103A), +(_ucs2 0x10311020103A), +(_ucs2 0x1031102C1020103A), +(_ucs2 0x1031102B1020103A), +(_ucs2 0x102D102F1020103A), +(_ucs2 0x1021103A), +(_ucs2 0x102C1021103A), +(_ucs2 0x102B1021103A), +(_ucs2 0x102D1021103A), +(_ucs2 0x102F1021103A), +(_ucs2 0x10311021103A), +(_ucs2 0x1031102C1021103A), +(_ucs2 0x1031102B1021103A), +(_ucs2 0x102D102F1021103A), +('--- Medials'), +(_ucs2 0x105E), +(_ucs2 0x105F), +(_ucs2 0x103B), +(_ucs2 0x103C), +(_ucs2 0x1060), +(_ucs2 0x103D), +(_ucs2 0x1082), +(_ucs2 0x103E), +(_ucs2 0x103B103D), +(_ucs2 0x103C103D), +(_ucs2 0x103B103E), +(_ucs2 0x103C103E), +(_ucs2 0x103D103E), +(_ucs2 0x103B103D103E), +(_ucs2 0x103C103D103E), +('--- Independent vowels'), +(_ucs2 0x1021102D), +(_ucs2 0x1023), +(_ucs2 0x1021102E), +(_ucs2 0x1024), +(_ucs2 0x1021102F), +(_ucs2 0x1025), +(_ucs2 0x10211030), +(_ucs2 0x1026), +(_ucs2 0x10211031), +(_ucs2 0x1027), +(_ucs2 0x1028), +(_ucs2 0x10211031102C), +(_ucs2 0x1029), +(_ucs2 0x10211031102C103A), +(_ucs2 0x102A), +(_ucs2 0x102D1019103A), +(_ucs2 0x102D1036), +(_ucs2 0x102D1019103A1037), +(_ucs2 0x102D10361037), +(_ucs2 0x102D1019103A1038), +(_ucs2 0x102D10361038), +(_ucs2 0x102F1019103A), +(_ucs2 0x102F1036), +(_ucs2 0x102F1019103A1037), +(_ucs2 0x102F10361037), +(_ucs2 0x102F1019103A1038), +(_ucs2 0x102F10361038), +(_ucs2 0x1021102F1036), +(_ucs2 0x1025102F1036), +('--- Independent vowels with finals'), +(_ucs2 0x1021102D10001039), +(_ucs2 0x102310001039), +(_ucs2 0x1021102D1000103A), +(_ucs2 0x10231000103A), +(_ucs2 0x1021102F10001039), +(_ucs2 0x102510001039), +(_ucs2 0x1021102F1000103A), +(_ucs2 0x10251000103A), +(_ucs2 0x1021103110001039), +(_ucs2 0x102710001039), +(_ucs2 0x102110311000103A), +(_ucs2 0x10271000103A), +(_ucs2 0x10211031102C10001039), +(_ucs2 0x102910001039), +(_ucs2 0x10211031102C1000103A), +(_ucs2 0x10291000103A), +(_ucs2 0x10211031102C10001039), +(_ucs2 0x10291031102C10001039), +(_ucs2 0x10211031102C1000103A), +(_ucs2 0x10291031102C1000103A), +(_ucs2 0x1021102D10011039), +(_ucs2 0x102310011039), +(_ucs2 0x1021102D1001103A), +(_ucs2 0x10231001103A), +(_ucs2 0x1021102F10011039), +(_ucs2 0x102510011039), +(_ucs2 0x1021102F1001103A), +(_ucs2 0x10251001103A), +(_ucs2 0x1021103110011039), +(_ucs2 0x102710011039), +(_ucs2 0x102110311001103A), +(_ucs2 0x10271001103A), +(_ucs2 0x10211031102C10011039), +(_ucs2 0x102910011039), +(_ucs2 0x10211031102C1001103A), +(_ucs2 0x10291001103A), +(_ucs2 0x10211031102C10011039), +(_ucs2 0x10291031102C10011039), +(_ucs2 0x10211031102C1001103A), +(_ucs2 0x10291031102C1001103A), +(_ucs2 0x1021102D10021039), +(_ucs2 0x102310021039), +(_ucs2 0x1021102D1002103A), +(_ucs2 0x10231002103A), +(_ucs2 0x1021102F10021039), +(_ucs2 0x102510021039), +(_ucs2 0x1021102F1002103A), +(_ucs2 0x10251002103A), +(_ucs2 0x1021103110021039), +(_ucs2 0x102710021039), +(_ucs2 0x102110311002103A), +(_ucs2 0x10271002103A), +(_ucs2 0x10211031102C10021039), +(_ucs2 0x102910021039), +(_ucs2 0x10211031102C1002103A), +(_ucs2 0x10291002103A), +(_ucs2 0x10211031102C10021039), +(_ucs2 0x10291031102C10021039), +(_ucs2 0x10211031102C1002103A), +(_ucs2 0x10291031102C1002103A), +(_ucs2 0x1021102D10031039), +(_ucs2 0x102310031039), +(_ucs2 0x1021102D1003103A), +(_ucs2 0x10231003103A), +(_ucs2 0x1021102F10031039), +(_ucs2 0x102510031039), +(_ucs2 0x1021102F1003103A), +(_ucs2 0x10251003103A), +(_ucs2 0x1021103110031039), +(_ucs2 0x102710031039), +(_ucs2 0x102110311003103A), +(_ucs2 0x10271003103A), +(_ucs2 0x10211031102C10031039), +(_ucs2 0x102910031039), +(_ucs2 0x10211031102C1003103A), +(_ucs2 0x10291003103A), +(_ucs2 0x10211031102C10031039), +(_ucs2 0x10291031102C10031039), +(_ucs2 0x10211031102C1003103A), +(_ucs2 0x10291031102C1003103A), +(_ucs2 0x1021102D10041039), +(_ucs2 0x102310041039), +(_ucs2 0x1021102D1004103A), +(_ucs2 0x10231004103A), +(_ucs2 0x1021102F10041039), +(_ucs2 0x102510041039), +(_ucs2 0x1021102F1004103A), +(_ucs2 0x10251004103A), +(_ucs2 0x1021103110041039), +(_ucs2 0x102710041039), +(_ucs2 0x102110311004103A), +(_ucs2 0x10271004103A), +(_ucs2 0x10211031102C10041039), +(_ucs2 0x102910041039), +(_ucs2 0x10211031102C1004103A), +(_ucs2 0x10291004103A), +(_ucs2 0x10211031102C10041039), +(_ucs2 0x10291031102C10041039), +(_ucs2 0x10211031102C1004103A), +(_ucs2 0x10291031102C1004103A), +(_ucs2 0x1021102D10051039), +(_ucs2 0x102310051039), +(_ucs2 0x1021102D1005103A), +(_ucs2 0x10231005103A), +(_ucs2 0x1021102F10051039), +(_ucs2 0x102510051039), +(_ucs2 0x1021102F1005103A), +(_ucs2 0x10251005103A), +(_ucs2 0x1021103110051039), +(_ucs2 0x102710051039), +(_ucs2 0x102110311005103A), +(_ucs2 0x10271005103A), +(_ucs2 0x10211031102C10051039), +(_ucs2 0x102910051039), +(_ucs2 0x10211031102C1005103A), +(_ucs2 0x10291005103A), +(_ucs2 0x10211031102C10051039), +(_ucs2 0x10291031102C10051039), +(_ucs2 0x10211031102C1005103A), +(_ucs2 0x10291031102C1005103A), +(_ucs2 0x1021102D10061039), +(_ucs2 0x102310061039), +(_ucs2 0x1021102D1006103A), +(_ucs2 0x10231006103A), +(_ucs2 0x1021102F10061039), +(_ucs2 0x102510061039), +(_ucs2 0x1021102F1006103A), +(_ucs2 0x10251006103A), +(_ucs2 0x1021103110061039), +(_ucs2 0x102710061039), +(_ucs2 0x102110311006103A), +(_ucs2 0x10271006103A), +(_ucs2 0x10211031102C10061039), +(_ucs2 0x102910061039), +(_ucs2 0x10211031102C1006103A), +(_ucs2 0x10291006103A), +(_ucs2 0x10211031102C10061039), +(_ucs2 0x10291031102C10061039), +(_ucs2 0x10211031102C1006103A), +(_ucs2 0x10291031102C1006103A), +(_ucs2 0x1021102D10071039), +(_ucs2 0x102310071039), +(_ucs2 0x1021102D1007103A), +(_ucs2 0x10231007103A), +(_ucs2 0x1021102F10071039), +(_ucs2 0x102510071039), +(_ucs2 0x1021102F1007103A), +(_ucs2 0x10251007103A), +(_ucs2 0x1021103110071039), +(_ucs2 0x102710071039), +(_ucs2 0x102110311007103A), +(_ucs2 0x10271007103A), +(_ucs2 0x10211031102C10071039), +(_ucs2 0x102910071039), +(_ucs2 0x10211031102C1007103A), +(_ucs2 0x10291007103A), +(_ucs2 0x10211031102C10071039), +(_ucs2 0x10291031102C10071039), +(_ucs2 0x10211031102C1007103A), +(_ucs2 0x10291031102C1007103A), +(_ucs2 0x1021102D10091039), +(_ucs2 0x102310091039), +(_ucs2 0x1021102D1009103A), +(_ucs2 0x10231009103A), +(_ucs2 0x1021102F10091039), +(_ucs2 0x102510091039), +(_ucs2 0x1021102F1009103A), +(_ucs2 0x10251009103A), +(_ucs2 0x1021103110091039), +(_ucs2 0x102710091039), +(_ucs2 0x102110311009103A), +(_ucs2 0x10271009103A), +(_ucs2 0x10211031102C10091039), +(_ucs2 0x102910091039), +(_ucs2 0x10211031102C1009103A), +(_ucs2 0x10291009103A), +(_ucs2 0x10211031102C10091039), +(_ucs2 0x10291031102C10091039), +(_ucs2 0x10211031102C1009103A), +(_ucs2 0x10291031102C1009103A), +(_ucs2 0x1021102D100A1039), +(_ucs2 0x1023100A1039), +(_ucs2 0x1021102D100A103A), +(_ucs2 0x1023100A103A), +(_ucs2 0x1021102F100A1039), +(_ucs2 0x1025100A1039), +(_ucs2 0x1021102F100A103A), +(_ucs2 0x1025100A103A), +(_ucs2 0x10211031100A1039), +(_ucs2 0x1027100A1039), +(_ucs2 0x10211031100A103A), +(_ucs2 0x1027100A103A), +(_ucs2 0x10211031102C100A1039), +(_ucs2 0x1029100A1039), +(_ucs2 0x10211031102C100A103A), +(_ucs2 0x1029100A103A), +(_ucs2 0x10211031102C100A1039), +(_ucs2 0x10291031102C100A1039), +(_ucs2 0x10211031102C100A103A), +(_ucs2 0x10291031102C100A103A), +(_ucs2 0x1021102D100B1039), +(_ucs2 0x1023100B1039), +(_ucs2 0x1021102D100B103A), +(_ucs2 0x1023100B103A), +(_ucs2 0x1021102F100B1039), +(_ucs2 0x1025100B1039), +(_ucs2 0x1021102F100B103A), +(_ucs2 0x1025100B103A), +(_ucs2 0x10211031100B1039), +(_ucs2 0x1027100B1039), +(_ucs2 0x10211031100B103A), +(_ucs2 0x1027100B103A), +(_ucs2 0x10211031102C100B1039), +(_ucs2 0x1029100B1039), +(_ucs2 0x10211031102C100B103A), +(_ucs2 0x1029100B103A), +(_ucs2 0x10211031102C100B1039), +(_ucs2 0x10291031102C100B1039), +(_ucs2 0x10211031102C100B103A), +(_ucs2 0x10291031102C100B103A), +(_ucs2 0x1021102D100C1039), +(_ucs2 0x1023100C1039), +(_ucs2 0x1021102D100C103A), +(_ucs2 0x1023100C103A), +(_ucs2 0x1021102F100C1039), +(_ucs2 0x1025100C1039), +(_ucs2 0x1021102F100C103A), +(_ucs2 0x1025100C103A), +(_ucs2 0x10211031100C1039), +(_ucs2 0x1027100C1039), +(_ucs2 0x10211031100C103A), +(_ucs2 0x1027100C103A), +(_ucs2 0x10211031102C100C1039), +(_ucs2 0x1029100C1039), +(_ucs2 0x10211031102C100C103A), +(_ucs2 0x1029100C103A), +(_ucs2 0x10211031102C100C1039), +(_ucs2 0x10291031102C100C1039), +(_ucs2 0x10211031102C100C103A), +(_ucs2 0x10291031102C100C103A), +(_ucs2 0x1021102D100D1039), +(_ucs2 0x1023100D1039), +(_ucs2 0x1021102D100D103A), +(_ucs2 0x1023100D103A), +(_ucs2 0x1021102F100D1039), +(_ucs2 0x1025100D1039), +(_ucs2 0x1021102F100D103A), +(_ucs2 0x1025100D103A), +(_ucs2 0x10211031100D1039), +(_ucs2 0x1027100D1039), +(_ucs2 0x10211031100D103A), +(_ucs2 0x1027100D103A), +(_ucs2 0x10211031102C100D1039), +(_ucs2 0x1029100D1039), +(_ucs2 0x10211031102C100D103A), +(_ucs2 0x1029100D103A), +(_ucs2 0x10211031102C100D1039), +(_ucs2 0x10291031102C100D1039), +(_ucs2 0x10211031102C100D103A), +(_ucs2 0x10291031102C100D103A), +(_ucs2 0x1021102D100E1039), +(_ucs2 0x1023100E1039), +(_ucs2 0x1021102D100E103A), +(_ucs2 0x1023100E103A), +(_ucs2 0x1021102F100E1039), +(_ucs2 0x1025100E1039), +(_ucs2 0x1021102F100E103A), +(_ucs2 0x1025100E103A), +(_ucs2 0x10211031100E1039), +(_ucs2 0x1027100E1039), +(_ucs2 0x10211031100E103A), +(_ucs2 0x1027100E103A), +(_ucs2 0x10211031102C100E1039), +(_ucs2 0x1029100E1039), +(_ucs2 0x10211031102C100E103A), +(_ucs2 0x1029100E103A), +(_ucs2 0x10211031102C100E1039), +(_ucs2 0x10291031102C100E1039), +(_ucs2 0x10211031102C100E103A), +(_ucs2 0x10291031102C100E103A), +(_ucs2 0x1021102D100F1039), +(_ucs2 0x1023100F1039), +(_ucs2 0x1021102D100F103A), +(_ucs2 0x1023100F103A), +(_ucs2 0x1021102F100F1039), +(_ucs2 0x1025100F1039), +(_ucs2 0x1021102F100F103A), +(_ucs2 0x1025100F103A), +(_ucs2 0x10211031100F1039), +(_ucs2 0x1027100F1039), +(_ucs2 0x10211031100F103A), +(_ucs2 0x1027100F103A), +(_ucs2 0x10211031102C100F1039), +(_ucs2 0x1029100F1039), +(_ucs2 0x10211031102C100F103A), +(_ucs2 0x1029100F103A), +(_ucs2 0x10211031102C100F1039), +(_ucs2 0x10291031102C100F1039), +(_ucs2 0x10211031102C100F103A), +(_ucs2 0x10291031102C100F103A), +(_ucs2 0x1021102D10101039), +(_ucs2 0x102310101039), +(_ucs2 0x1021102D1010103A), +(_ucs2 0x10231010103A), +(_ucs2 0x1021102F10101039), +(_ucs2 0x102510101039), +(_ucs2 0x1021102F1010103A), +(_ucs2 0x10251010103A), +(_ucs2 0x1021103110101039), +(_ucs2 0x102710101039), +(_ucs2 0x102110311010103A), +(_ucs2 0x10271010103A), +(_ucs2 0x10211031102C10101039), +(_ucs2 0x102910101039), +(_ucs2 0x10211031102C1010103A), +(_ucs2 0x10291010103A), +(_ucs2 0x10211031102C10101039), +(_ucs2 0x10291031102C10101039), +(_ucs2 0x10211031102C1010103A), +(_ucs2 0x10291031102C1010103A), +(_ucs2 0x1021102D10111039), +(_ucs2 0x102310111039), +(_ucs2 0x1021102D1011103A), +(_ucs2 0x10231011103A), +(_ucs2 0x1021102F10111039), +(_ucs2 0x102510111039), +(_ucs2 0x1021102F1011103A), +(_ucs2 0x10251011103A), +(_ucs2 0x1021103110111039), +(_ucs2 0x102710111039), +(_ucs2 0x102110311011103A), +(_ucs2 0x10271011103A), +(_ucs2 0x10211031102C10111039), +(_ucs2 0x102910111039), +(_ucs2 0x10211031102C1011103A), +(_ucs2 0x10291011103A), +(_ucs2 0x10211031102C10111039), +(_ucs2 0x10291031102C10111039), +(_ucs2 0x10211031102C1011103A), +(_ucs2 0x10291031102C1011103A), +(_ucs2 0x1021102D10121039), +(_ucs2 0x102310121039), +(_ucs2 0x1021102D1012103A), +(_ucs2 0x10231012103A), +(_ucs2 0x1021102F10121039), +(_ucs2 0x102510121039), +(_ucs2 0x1021102F1012103A), +(_ucs2 0x10251012103A), +(_ucs2 0x1021103110121039), +(_ucs2 0x102710121039), +(_ucs2 0x102110311012103A), +(_ucs2 0x10271012103A), +(_ucs2 0x10211031102C10121039), +(_ucs2 0x102910121039), +(_ucs2 0x10211031102C1012103A), +(_ucs2 0x10291012103A), +(_ucs2 0x10211031102C10121039), +(_ucs2 0x10291031102C10121039), +(_ucs2 0x10211031102C1012103A), +(_ucs2 0x10291031102C1012103A), +(_ucs2 0x1021102D10131039), +(_ucs2 0x102310131039), +(_ucs2 0x1021102D1013103A), +(_ucs2 0x10231013103A), +(_ucs2 0x1021102F10131039), +(_ucs2 0x102510131039), +(_ucs2 0x1021102F1013103A), +(_ucs2 0x10251013103A), +(_ucs2 0x1021103110131039), +(_ucs2 0x102710131039), +(_ucs2 0x102110311013103A), +(_ucs2 0x10271013103A), +(_ucs2 0x10211031102C10131039), +(_ucs2 0x102910131039), +(_ucs2 0x10211031102C1013103A), +(_ucs2 0x10291013103A), +(_ucs2 0x10211031102C10131039), +(_ucs2 0x10291031102C10131039), +(_ucs2 0x10211031102C1013103A), +(_ucs2 0x10291031102C1013103A), +(_ucs2 0x1021102D10141039), +(_ucs2 0x102310141039), +(_ucs2 0x1021102D1014103A), +(_ucs2 0x10231014103A), +(_ucs2 0x1021102F10141039), +(_ucs2 0x102510141039), +(_ucs2 0x1021102F1014103A), +(_ucs2 0x10251014103A), +(_ucs2 0x1021103110141039), +(_ucs2 0x102710141039), +(_ucs2 0x102110311014103A), +(_ucs2 0x10271014103A), +(_ucs2 0x10211031102C10141039), +(_ucs2 0x102910141039), +(_ucs2 0x10211031102C1014103A), +(_ucs2 0x10291014103A), +(_ucs2 0x10211031102C10141039), +(_ucs2 0x10291031102C10141039), +(_ucs2 0x10211031102C1014103A), +(_ucs2 0x10291031102C1014103A), +(_ucs2 0x1021102D10151039), +(_ucs2 0x102310151039), +(_ucs2 0x1021102D1015103A), +(_ucs2 0x10231015103A), +(_ucs2 0x1021102F10151039), +(_ucs2 0x102510151039), +(_ucs2 0x1021102F1015103A), +(_ucs2 0x10251015103A), +(_ucs2 0x1021103110151039), +(_ucs2 0x102710151039), +(_ucs2 0x102110311015103A), +(_ucs2 0x10271015103A), +(_ucs2 0x10211031102C10151039), +(_ucs2 0x102910151039), +(_ucs2 0x10211031102C1015103A), +(_ucs2 0x10291015103A), +(_ucs2 0x10211031102C10151039), +(_ucs2 0x10291031102C10151039), +(_ucs2 0x10211031102C1015103A), +(_ucs2 0x10291031102C1015103A), +(_ucs2 0x1021102D10161039), +(_ucs2 0x102310161039), +(_ucs2 0x1021102D1016103A), +(_ucs2 0x10231016103A), +(_ucs2 0x1021102F10161039), +(_ucs2 0x102510161039), +(_ucs2 0x1021102F1016103A), +(_ucs2 0x10251016103A), +(_ucs2 0x1021103110161039), +(_ucs2 0x102710161039), +(_ucs2 0x102110311016103A), +(_ucs2 0x10271016103A), +(_ucs2 0x10211031102C10161039), +(_ucs2 0x102910161039), +(_ucs2 0x10211031102C1016103A), +(_ucs2 0x10291016103A), +(_ucs2 0x10211031102C10161039), +(_ucs2 0x10291031102C10161039), +(_ucs2 0x10211031102C1016103A), +(_ucs2 0x10291031102C1016103A), +(_ucs2 0x1021102D10171039), +(_ucs2 0x102310171039), +(_ucs2 0x1021102D1017103A), +(_ucs2 0x10231017103A), +(_ucs2 0x1021102F10171039), +(_ucs2 0x102510171039), +(_ucs2 0x1021102F1017103A), +(_ucs2 0x10251017103A), +(_ucs2 0x1021103110171039), +(_ucs2 0x102710171039), +(_ucs2 0x102110311017103A), +(_ucs2 0x10271017103A), +(_ucs2 0x10211031102C10171039), +(_ucs2 0x102910171039), +(_ucs2 0x10211031102C1017103A), +(_ucs2 0x10291017103A), +(_ucs2 0x10211031102C10171039), +(_ucs2 0x10291031102C10171039), +(_ucs2 0x10211031102C1017103A), +(_ucs2 0x10291031102C1017103A), +(_ucs2 0x1021102D10181039), +(_ucs2 0x102310181039), +(_ucs2 0x1021102D1018103A), +(_ucs2 0x10231018103A), +(_ucs2 0x1021102F10181039), +(_ucs2 0x102510181039), +(_ucs2 0x1021102F1018103A), +(_ucs2 0x10251018103A), +(_ucs2 0x1021103110181039), +(_ucs2 0x102710181039), +(_ucs2 0x102110311018103A), +(_ucs2 0x10271018103A), +(_ucs2 0x10211031102C10181039), +(_ucs2 0x102910181039), +(_ucs2 0x10211031102C1018103A), +(_ucs2 0x10291018103A), +(_ucs2 0x10211031102C10181039), +(_ucs2 0x10291031102C10181039), +(_ucs2 0x10211031102C1018103A), +(_ucs2 0x10291031102C1018103A), +(_ucs2 0x1021102D10191039), +(_ucs2 0x102310191039), +(_ucs2 0x1021102D1019103A), +(_ucs2 0x10231019103A), +(_ucs2 0x1021102F10191039), +(_ucs2 0x102510191039), +(_ucs2 0x1021102F1019103A), +(_ucs2 0x10251019103A), +(_ucs2 0x1021103110191039), +(_ucs2 0x102710191039), +(_ucs2 0x102110311019103A), +(_ucs2 0x10271019103A), +(_ucs2 0x10211031102C10191039), +(_ucs2 0x102910191039), +(_ucs2 0x10211031102C1019103A), +(_ucs2 0x10291019103A), +(_ucs2 0x10211031102C10191039), +(_ucs2 0x10291031102C10191039), +(_ucs2 0x10211031102C1019103A), +(_ucs2 0x10291031102C1019103A), +(_ucs2 0x1021102D101A1039), +(_ucs2 0x1023101A1039), +(_ucs2 0x1021102D101A103A), +(_ucs2 0x1023101A103A), +(_ucs2 0x1021102F101A1039), +(_ucs2 0x1025101A1039), +(_ucs2 0x1021102F101A103A), +(_ucs2 0x1025101A103A), +(_ucs2 0x10211031101A1039), +(_ucs2 0x1027101A1039), +(_ucs2 0x10211031101A103A), +(_ucs2 0x1027101A103A), +(_ucs2 0x10211031102C101A1039), +(_ucs2 0x1029101A1039), +(_ucs2 0x10211031102C101A103A), +(_ucs2 0x1029101A103A), +(_ucs2 0x10211031102C101A1039), +(_ucs2 0x10291031102C101A1039), +(_ucs2 0x10211031102C101A103A), +(_ucs2 0x10291031102C101A103A), +(_ucs2 0x1021102D101B1039), +(_ucs2 0x1023101B1039), +(_ucs2 0x1021102D101B103A), +(_ucs2 0x1023101B103A), +(_ucs2 0x1021102F101B1039), +(_ucs2 0x1025101B1039), +(_ucs2 0x1021102F101B103A), +(_ucs2 0x1025101B103A), +(_ucs2 0x10211031101B1039), +(_ucs2 0x1027101B1039), +(_ucs2 0x10211031101B103A), +(_ucs2 0x1027101B103A), +(_ucs2 0x10211031102C101B1039), +(_ucs2 0x1029101B1039), +(_ucs2 0x10211031102C101B103A), +(_ucs2 0x1029101B103A), +(_ucs2 0x10211031102C101B1039), +(_ucs2 0x10291031102C101B1039), +(_ucs2 0x10211031102C101B103A), +(_ucs2 0x10291031102C101B103A), +(_ucs2 0x1021102D101C1039), +(_ucs2 0x1023101C1039), +(_ucs2 0x1021102D101C103A), +(_ucs2 0x1023101C103A), +(_ucs2 0x1021102F101C1039), +(_ucs2 0x1025101C1039), +(_ucs2 0x1021102F101C103A), +(_ucs2 0x1025101C103A), +(_ucs2 0x10211031101C1039), +(_ucs2 0x1027101C1039), +(_ucs2 0x10211031101C103A), +(_ucs2 0x1027101C103A), +(_ucs2 0x10211031102C101C1039), +(_ucs2 0x1029101C1039), +(_ucs2 0x10211031102C101C103A), +(_ucs2 0x1029101C103A), +(_ucs2 0x10211031102C101C1039), +(_ucs2 0x10291031102C101C1039), +(_ucs2 0x10211031102C101C103A), +(_ucs2 0x10291031102C101C103A), +(_ucs2 0x1021102D101E1039), +(_ucs2 0x1023101E1039), +(_ucs2 0x1021102D101E103A), +(_ucs2 0x1023101E103A), +(_ucs2 0x1021102F101E1039), +(_ucs2 0x1025101E1039), +(_ucs2 0x1021102F101E103A), +(_ucs2 0x1025101E103A), +(_ucs2 0x10211031101E1039), +(_ucs2 0x1027101E1039), +(_ucs2 0x10211031101E103A), +(_ucs2 0x1027101E103A), +(_ucs2 0x10211031102C101E1039), +(_ucs2 0x1029101E1039), +(_ucs2 0x10211031102C101E103A), +(_ucs2 0x1029101E103A), +(_ucs2 0x10211031102C101E1039), +(_ucs2 0x10291031102C101E1039), +(_ucs2 0x10211031102C101E103A), +(_ucs2 0x10291031102C101E103A), +(_ucs2 0x1021102D101F1039), +(_ucs2 0x1023101F1039), +(_ucs2 0x1021102D101F103A), +(_ucs2 0x1023101F103A), +(_ucs2 0x1021102F101F1039), +(_ucs2 0x1025101F1039), +(_ucs2 0x1021102F101F103A), +(_ucs2 0x1025101F103A), +(_ucs2 0x10211031101F1039), +(_ucs2 0x1027101F1039), +(_ucs2 0x10211031101F103A), +(_ucs2 0x1027101F103A), +(_ucs2 0x10211031102C101F1039), +(_ucs2 0x1029101F1039), +(_ucs2 0x10211031102C101F103A), +(_ucs2 0x1029101F103A), +(_ucs2 0x10211031102C101F1039), +(_ucs2 0x10291031102C101F1039), +(_ucs2 0x10211031102C101F103A), +(_ucs2 0x10291031102C101F103A), +('--- Contractions'), +(_ucs2 0x1031102C1000103A1000103B), +(_ucs2 0x1031102C1000103A103B /* (suffix of) man */), +(_ucs2 0x1014103A1014102F1015103A), +(_ucs2 0x1014103A102F1015103A /* (suffix of) I */), +('--- Great Sa'), +(_ucs2 0x1031101E1039101E), +(_ucs2 0x1031103F), +(_ucs2 0x102D101E1039101E), +(_ucs2 0x102D103F), +(_ucs2 0x102F101E1039101E), +(_ucs2 0x102F103F), +(_ucs2 0x1021102D101E1039101E), +(_ucs2 0x1023103F), +(_ucs2 0x1021102F101E1039101E), +(_ucs2 0x1025103F), +(_ucs2 0x101E1039101E), +(_ucs2 0x103F), +('--- Symbols - collate as long form'), +(_ucs2 0x1014103E102D102F1000103A), +(_ucs2 0x104C), +(_ucs2 0x101B103D10311037), +(_ucs2 0x104D), +(_ucs2 0x101C100A103A103810001031102C1004103A1038), +(_ucs2 0x104E1004103A1038), +(_ucs2 0x1021102D), +(_ucs2 0x104F), +('--- Short Forms may need to be added here'), +(_ucs2 0x101C1000103A101A102C), +(_ucs2 0x101C1000103A103B102C /* right hand side */), +(_ucs2 0x101E1019102E), +(_ucs2 0x101E10391019102E /* daughter */), +(_ucs2 0x101110191004103A1038), +(_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)))) +1 2259 108C +2 22593ACB 1037 +3 22593ACC 1038 +4 22593ACD 10371038 +5 --- Vowels +6 2232 102C +7 2232 102B +8 2246 1032 +9 22463ACB 1031102C +10 22463ACB 1031102B +11 22463ACC 1031102C103A +12 22463ACC 1031102B103A +13 2248 1034 +14 22483ACB 1036 +15 22483ACC 102D102F +16 --- Vowels with finals +17 22483ACD 10001039 +18 22483ACD 1000103A +19 22483ACE 102C10001039 +20 22483ACE 102C1000103A +21 22483ACE 102B10001039 +22 22483ACE 102B1000103A +23 22483ACF 102D10001039 +24 22483ACF 102D1000103A +25 22483AD0 102F10001039 +26 22483AD0 102F1000103A +27 22483AD1 103110001039 +28 22483AD1 10311000103A +29 22483AD2 1031102C10001039 +30 22483AD2 1031102C1000103A +31 22483AD2 1031102B10001039 +32 22483AD2 1031102B1000103A +33 22483AD3 102D102F10001039 +34 22483AD3 102D102F1000103A +35 22483AD4 10011039 +36 22483AD4 1001103A +37 22483AD5 102C10011039 +38 22483AD5 102C1001103A +39 22483AD5 102B10011039 +40 22483AD5 102B1001103A +41 22483AD6 102D10011039 +42 22483AD6 102D1001103A +43 22483AD7 102F10011039 +44 22483AD7 102F1001103A +45 22483AD8 103110011039 +46 22483AD8 10311001103A +47 22483AD9 1031102C10011039 +48 22483AD9 1031102C1001103A +49 22483AD9 1031102B10011039 +50 22483AD9 1031102B1001103A +51 22483ADA 102D102F10011039 +52 22483ADA 102D102F1001103A +53 22483ADB 10021039 +54 22483ADB 1002103A +55 22483ADC 102C10021039 +56 22483ADC 102C1002103A +57 22483ADC 102B10021039 +58 22483ADC 102B1002103A +59 22483ADD 102D10021039 +60 22483ADD 102D1002103A +61 22483ADE 102F10021039 +62 22483ADE 102F1002103A +63 22483ADF 103110021039 +64 22483ADF 10311002103A +65 22483AE0 1031102C10021039 +66 22483AE0 1031102C1002103A +67 22483AE0 1031102B10021039 +68 22483AE0 1031102B1002103A +69 22483AE1 102D102F10021039 +70 22483AE1 102D102F1002103A +71 22483AE2 10031039 +72 22483AE2 1003103A +73 22483AE3 102C10031039 +74 22483AE3 102C1003103A +75 22483AE3 102B10031039 +76 22483AE3 102B1003103A +77 22483AE4 102D10031039 +78 22483AE4 102D1003103A +79 22483AE5 102F10031039 +80 22483AE5 102F1003103A +81 22483AE6 103110031039 +82 22483AE6 10311003103A +83 22483AE7 1031102C10031039 +84 22483AE7 1031102C1003103A +85 22483AE7 1031102B10031039 +86 22483AE7 1031102B1003103A +87 22483AE8 102D102F10031039 +88 22483AE8 102D102F1003103A +89 22483AE9 1004103A1039 +90 22483AE9 1004103A +91 22483AEA 102C1004103A1039 +92 22483AEA 102C1004103A +93 22483AEA 102B1004103A1039 +94 22483AEA 102B1004103A +95 22483AEB 102D1004103A1039 +96 22483AEB 102D1004103A +97 22483AEC 102F1004103A1039 +98 22483AEC 102F1004103A +99 22483AED 10311004103A1039 +100 22483AED 10311004103A +101 22483AEE 1031102C1004103A1039 +102 22483AEE 1031102C1004103A +103 22483AEE 1031102B1004103A1039 +104 22483AEE 1031102B1004103A +105 22483AEF 102D102F1004103A1039 +106 22483AEF 102D102F1004103A +107 22483AF0 10051039 +108 22483AF0 1005103A +109 22483AF1 102C10051039 +110 22483AF1 102C1005103A +111 22483AF1 102B10051039 +112 22483AF1 102B1005103A +113 22483AF2 102D10051039 +114 22483AF2 102D1005103A +115 22483AF3 102F10051039 +116 22483AF3 102F1005103A +117 22483AF4 103110051039 +118 22483AF4 10311005103A +119 22483AF5 1031102C10051039 +120 22483AF5 1031102C1005103A +121 22483AF5 1031102B10051039 +122 22483AF5 1031102B1005103A +123 22483AF6 102D102F10051039 +124 22483AF6 102D102F1005103A +125 22483AF7 10061039 +126 22483AF7 1006103A +127 22483AF8 102C10061039 +128 22483AF8 102C1006103A +129 22483AF8 102B10061039 +130 22483AF8 102B1006103A +131 22483AF9 102D10061039 +132 22483AF9 102D1006103A +133 22483AFA 102F10061039 +134 22483AFA 102F1006103A +135 22483AFB 103110061039 +136 22483AFB 10311006103A +137 22483AFC 1031102C10061039 +138 22483AFC 1031102C1006103A +139 22483AFC 1031102B10061039 +140 22483AFC 1031102B1006103A +141 22483AFD 102D102F10061039 +142 22483AFD 102D102F1006103A +143 22483AFE 10071039 +144 22483AFE 1007103A +145 22483AFF 102C10071039 +146 22483AFF 102C1007103A +147 22483AFF 102B10071039 +148 22483AFF 102B1007103A +149 22483B00 102D10071039 +150 22483B00 102D1007103A +151 22483B01 102F10071039 +152 22483B01 102F1007103A +153 22483B02 103110071039 +154 22483B02 10311007103A +155 22483B03 1031102C10071039 +156 22483B03 1031102C1007103A +157 22483B03 1031102B10071039 +158 22483B03 1031102B1007103A +159 22483B04 102D102F10071039 +160 22483B04 102D102F1007103A +161 22483B05 1008103A +162 22483B06 102C1008103A +163 22483B06 102B1008103A +164 22483B07 102D1008103A +165 22483B08 102F1008103A +166 22483B09 10311008103A +167 22483B0A 1031102C1008103A +168 22483B0A 1031102B1008103A +169 22483B0B 102D102F1008103A +170 22483B0C 10091039 +171 22483B0C 1009103A +172 22483B0D 102C10091039 +173 22483B0D 102C1009103A +174 22483B0D 102B10091039 +175 22483B0D 102B1009103A +176 22483B0E 102D10091039 +177 22483B0E 102D1009103A +178 22483B0F 102F10091039 +179 22483B0F 102F1009103A +180 22483B10 103110091039 +181 22483B10 10311009103A +182 22483B11 1031102C10091039 +183 22483B11 1031102C1009103A +184 22483B11 1031102B10091039 +185 22483B11 1031102B1009103A +186 22483B12 102D102F10091039 +187 22483B12 102D102F1009103A +188 22483B13 100A1039 +189 22483B13 100A103A +190 22483B14 102C100A1039 +191 22483B14 102C100A103A +192 22483B14 102B100A1039 +193 22483B14 102B100A103A +194 22483B15 102D100A1039 +195 22483B15 102D100A103A +196 22483B16 102F100A1039 +197 22483B16 102F100A103A +198 22483B17 1031100A1039 +199 22483B17 1031100A103A +200 22483B18 1031102C100A1039 +201 22483B18 1031102C100A103A +202 22483B18 1031102B100A1039 +203 22483B18 1031102B100A103A +204 22483B19 102D102F100A1039 +205 22483B19 102D102F100A103A +206 22483B1A 100B1039 +207 22483B1A 100B103A +208 22483B1B 102C100B1039 +209 22483B1B 102C100B103A +210 22483B1B 102B100B1039 +211 22483B1B 102B100B103A +212 22483B1C 102D100B1039 +213 22483B1C 102D100B103A +214 22483B1D 102F100B1039 +215 22483B1D 102F100B103A +216 22483B1E 1031100B1039 +217 22483B1E 1031100B103A +218 22483B1F 1031102C100B1039 +219 22483B1F 1031102C100B103A +220 22483B1F 1031102B100B1039 +221 22483B1F 1031102B100B103A +222 22483B20 102D102F100B1039 +223 22483B20 102D102F100B103A +224 22483B21 100C1039 +225 22483B21 100C103A +226 22483B22 102C100C1039 +227 22483B22 102C100C103A +228 22483B22 102B100C1039 +229 22483B22 102B100C103A +230 22483B23 102D100C1039 +231 22483B23 102D100C103A +232 22483B24 102F100C1039 +233 22483B24 102F100C103A +234 22483B25 1031100C1039 +235 22483B25 1031100C103A +236 22483B26 1031102C100C1039 +237 22483B26 1031102C100C103A +238 22483B26 1031102B100C1039 +239 22483B26 1031102B100C103A +240 22483B27 102D102F100C1039 +241 22483B27 102D102F100C103A +242 22483B28 100D1039 +243 22483B28 100D103A +244 22483B29 102C100D1039 +245 22483B29 102C100D103A +246 22483B29 102B100D1039 +247 22483B29 102B100D103A +248 22483B2A 102D100D1039 +249 22483B2A 102D100D103A +250 22483B2B 102F100D1039 +251 22483B2B 102F100D103A +252 22483B2C 1031100D1039 +253 22483B2C 1031100D103A +254 22483B2D 1031102C100D1039 +255 22483B2D 1031102C100D103A +256 22483B2D 1031102B100D1039 +257 22483B2D 1031102B100D103A +258 22483B2E 102D102F100D1039 +259 22483B2E 102D102F100D103A +260 22483B2F 100E1039 +261 22483B2F 100E103A +262 22483B30 102C100E1039 +263 22483B30 102C100E103A +264 22483B30 102B100E1039 +265 22483B30 102B100E103A +266 22483B31 102D100E1039 +267 22483B31 102D100E103A +268 22483B32 102F100E1039 +269 22483B32 102F100E103A +270 22483B33 1031100E1039 +271 22483B33 1031100E103A +272 22483B34 1031102C100E1039 +273 22483B34 1031102C100E103A +274 22483B34 1031102B100E1039 +275 22483B34 1031102B100E103A +276 22483B35 102D102F100E1039 +277 22483B35 102D102F100E103A +278 22483B36 100F1039 +279 22483B36 100F103A +280 22483B37 102C100F1039 +281 22483B37 102C100F103A +282 22483B37 102B100F1039 +283 22483B37 102B100F103A +284 22483B38 102D100F1039 +285 22483B38 102D100F103A +286 22483B39 102F100F1039 +287 22483B39 102F100F103A +288 22483B3A 1031100F1039 +289 22483B3A 1031100F103A +290 22483B3B 1031102C100F1039 +291 22483B3B 1031102C100F103A +292 22483B3B 1031102B100F1039 +293 22483B3B 1031102B100F103A +294 22483B3C 102D102F100F1039 +295 22483B3C 102D102F100F103A +296 22483B3D 10101039 +297 22483B3D 1010103A +298 22483B3E 102C10101039 +299 22483B3E 102C1010103A +300 22483B3E 102B10101039 +301 22483B3E 102B1010103A +302 22483B3F 102D10101039 +303 22483B3F 102D1010103A +304 22483B40 102F10101039 +305 22483B40 102F1010103A +306 22483B41 103110101039 +307 22483B41 10311010103A +308 22483B42 1031102C10101039 +309 22483B42 1031102C1010103A +310 22483B42 1031102B10101039 +311 22483B42 1031102B1010103A +312 22483B43 102D102F10101039 +313 22483B43 102D102F1010103A +314 22483B44 10111039 +315 22483B44 1011103A +316 22483B45 102C10111039 +317 22483B45 102C1011103A +318 22483B45 102B10111039 +319 22483B45 102B1011103A +320 22483B46 102D10111039 +321 22483B46 102D1011103A +322 22483B47 102F10111039 +323 22483B47 102F1011103A +324 22483B48 103110111039 +325 22483B48 10311011103A +326 22483B49 1031102C10111039 +327 22483B49 1031102C1011103A +328 22483B49 1031102B10111039 +329 22483B49 1031102B1011103A +330 22483B4A 102D102F10111039 +331 22483B4A 102D102F1011103A +332 22483B4B 10121039 +333 22483B4B 1012103A +334 22483B4C 102C10121039 +335 22483B4C 102C1012103A +336 22483B4C 102B10121039 +337 22483B4C 102B1012103A +338 22483B4D 102D10121039 +339 22483B4D 102D1012103A +340 22483B4E 102F10121039 +341 22483B4E 102F1012103A +342 22483B4F 103110121039 +343 22483B4F 10311012103A +344 22483B50 1031102C10121039 +345 22483B50 1031102C1012103A +346 22483B50 1031102B10121039 +347 22483B50 1031102B1012103A +348 22483B51 102D102F10121039 +349 22483B51 102D102F1012103A +350 22483B52 10131039 +351 22483B52 1013103A +352 22483B53 102C10131039 +353 22483B53 102C1013103A +354 22483B53 102B10131039 +355 22483B53 102B1013103A +356 22483B54 102D10131039 +357 22483B54 102D1013103A +358 22483B55 102F10131039 +359 22483B55 102F1013103A +360 22483B56 103110131039 +361 22483B56 10311013103A +362 22483B57 1031102C10131039 +363 22483B57 1031102C1013103A +364 22483B57 1031102B10131039 +365 22483B57 1031102B1013103A +366 22483B58 102D102F10131039 +367 22483B58 102D102F1013103A +368 22483B59 10141039 +369 22483B59 1014103A +370 22483B5A 102C10141039 +371 22483B5A 102C1014103A +372 22483B5A 102B10141039 +373 22483B5A 102B1014103A +374 22483B5B 102D10141039 +375 22483B5B 102D1014103A +376 22483B5C 102F10141039 +377 22483B5C 102F1014103A +378 22483B5D 103110141039 +379 22483B5D 10311014103A +380 22483B5E 1031102C10141039 +381 22483B5E 1031102C1014103A +382 22483B5E 1031102B10141039 +383 22483B5E 1031102B1014103A +384 22483B5F 102D102F10141039 +385 22483B5F 102D102F1014103A +386 22483B60 10151039 +387 22483B60 1015103A +388 22483B61 102C10151039 +389 22483B61 102C1015103A +390 22483B61 102B10151039 +391 22483B61 102B1015103A +392 22483B62 102D10151039 +393 22483B62 102D1015103A +394 22483B63 102F10151039 +395 22483B63 102F1015103A +396 22483B64 103110151039 +397 22483B64 10311015103A +398 22483B65 1031102C10151039 +399 22483B65 1031102C1015103A +400 22483B65 1031102B10151039 +401 22483B65 1031102B1015103A +402 22483B66 102D102F10151039 +403 22483B66 102D102F1015103A +404 22483B67 10161039 +405 22483B67 1016103A +406 22483B68 102C10161039 +407 22483B68 102C1016103A +408 22483B68 102B10161039 +409 22483B68 102B1016103A +410 22483B69 102D10161039 +411 22483B69 102D1016103A +412 22483B6A 102F10161039 +413 22483B6A 102F1016103A +414 22483B6B 103110161039 +415 22483B6B 10311016103A +416 22483B6C 1031102C10161039 +417 22483B6C 1031102C1016103A +418 22483B6C 1031102B10161039 +419 22483B6C 1031102B1016103A +420 22483B6D 102D102F10161039 +421 22483B6D 102D102F1016103A +422 22483B6E 10171039 +423 22483B6E 1017103A +424 22483B6F 102C10171039 +425 22483B6F 102C1017103A +426 22483B6F 102B10171039 +427 22483B6F 102B1017103A +428 22483B70 102D10171039 +429 22483B70 102D1017103A +430 22483B71 102F10171039 +431 22483B71 102F1017103A +432 22483B72 103110171039 +433 22483B72 10311017103A +434 22483B73 1031102C10171039 +435 22483B73 1031102C1017103A +436 22483B73 1031102B10171039 +437 22483B73 1031102B1017103A +438 22483B74 102D102F10171039 +439 22483B74 102D102F1017103A +440 22483B75 10181039 +441 22483B75 1018103A +442 22483B76 102C10181039 +443 22483B76 102C1018103A +444 22483B76 102B10181039 +445 22483B76 102B1018103A +446 22483B77 102D10181039 +447 22483B77 102D1018103A +448 22483B78 102F10181039 +449 22483B78 102F1018103A +450 22483B79 103110181039 +451 22483B79 10311018103A +452 22483B7A 1031102C10181039 +453 22483B7A 1031102C1018103A +454 22483B7A 1031102B10181039 +455 22483B7A 1031102B1018103A +456 22483B7B 102D102F10181039 +457 22483B7B 102D102F1018103A +458 22483B7C 10191039 +459 22483B7C 1019103A +460 22483B7D 102C10191039 +461 22483B7D 102C1019103A +462 22483B7D 102B10191039 +463 22483B7D 102B1019103A +464 22483B7E 102D10191039 +465 22483B7E 102D1019103A +466 22483B7F 102F10191039 +467 22483B7F 102F1019103A +468 22483B80 103110191039 +469 22483B80 10311019103A +470 22483B81 1031102C10191039 +471 22483B81 1031102C1019103A +472 22483B81 1031102B10191039 +473 22483B81 1031102B1019103A +474 22483B82 102D102F10191039 +475 22483B82 102D102F1019103A +476 22483B83 101A1039 +477 22483B83 101A103A +478 22483B84 102C101A1039 +479 22483B84 102C101A103A +480 22483B84 102B101A1039 +481 22483B84 102B101A103A +482 22483B85 102D101A1039 +483 22483B85 102D101A103A +484 22483B86 102F101A1039 +485 22483B86 102F101A103A +486 22483B87 1031101A1039 +487 22483B87 1031101A103A +488 22483B88 1031102C101A1039 +489 22483B88 1031102C101A103A +490 22483B88 1031102B101A1039 +491 22483B88 1031102B101A103A +492 22483B89 102D102F101A1039 +493 22483B89 102D102F101A103A +494 22483B8A 101B1039 +495 22483B8A 101B103A +496 22483B8B 102C101B1039 +497 22483B8B 102C101B103A +498 22483B8B 102B101B1039 +499 22483B8B 102B101B103A +500 22483B8C 102D101B1039 +501 22483B8C 102D101B103A +502 22483B8D 102F101B1039 +503 22483B8D 102F101B103A +504 22483B8E 1031101B1039 +505 22483B8E 1031101B103A +506 22483B8F 1031102C101B1039 +507 22483B8F 1031102C101B103A +508 22483B8F 1031102B101B1039 +509 22483B8F 1031102B101B103A +510 22483B90 102D102F101B1039 +511 22483B90 102D102F101B103A +512 22483B91 101C1039 +513 22483B91 101C103A +514 22483B92 102C101C1039 +515 22483B92 102C101C103A +516 22483B92 102B101C1039 +517 22483B92 102B101C103A +518 22483B93 102D101C1039 +519 22483B93 102D101C103A +520 22483B94 102F101C1039 +521 22483B94 102F101C103A +522 22483B95 1031101C1039 +523 22483B95 1031101C103A +524 22483B96 1031102C101C1039 +525 22483B96 1031102C101C103A +526 22483B96 1031102B101C1039 +527 22483B96 1031102B101C103A +528 22483B97 102D102F101C1039 +529 22483B97 102D102F101C103A +530 22483B98 101D103A +531 22483B99 102C101D103A +532 22483B99 102B101D103A +533 22483B9A 102D101D103A +534 22483B9B 102F101D103A +535 22483B9C 1031101D103A +536 22483B9D 1031102C101D103A +537 22483B9D 1031102B101D103A +538 22483B9E 102D102F101D103A +539 22483B9F 101E1039 +540 22483B9F 101E103A +541 22483BA0 102C101E1039 +542 22483BA0 102C101E103A +543 22483BA0 102B101E1039 +544 22483BA0 102B101E103A +545 22483BA1 102D101E1039 +546 22483BA1 102D101E103A +547 22483BA2 102F101E1039 +548 22483BA2 102F101E103A +549 22483BA3 1031101E1039 +550 22483BA3 1031101E103A +551 22483BA4 1031102C101E1039 +552 22483BA4 1031102C101E103A +553 22483BA4 1031102B101E1039 +554 22483BA4 1031102B101E103A +555 22483BA5 102D102F101E1039 +556 22483BA5 102D102F101E103A +557 22483BA6 101F1039 +558 22483BA6 101F103A +559 22483BA7 102C101F1039 +560 22483BA7 102C101F103A +561 22483BA7 102B101F1039 +562 22483BA7 102B101F103A +563 22483BA8 102D101F1039 +564 22483BA8 102D101F103A +565 22483BA9 102F101F1039 +566 22483BA9 102F101F103A +567 22483BAA 1031101F1039 +568 22483BAA 1031101F103A +569 22483BAB 1031102C101F1039 +570 22483BAB 1031102C101F103A +571 22483BAB 1031102B101F1039 +572 22483BAB 1031102B101F103A +573 22483BAC 102D102F101F1039 +574 22483BAC 102D102F101F103A +575 22483BAD 1020103A +576 22483BAE 102C1020103A +577 22483BAE 102B1020103A +578 22483BAF 102D1020103A +579 22483BB0 102F1020103A +580 22483BB1 10311020103A +581 22483BB2 1031102C1020103A +582 22483BB2 1031102B1020103A +583 22483BB3 102D102F1020103A +584 22483BB4 1021103A +585 22483BB5 102C1021103A +586 22483BB5 102B1021103A +587 22483BB6 102D1021103A +588 22483BB7 102F1021103A +589 22483BB8 10311021103A +590 22483BB9 1031102C1021103A +591 22483BB9 1031102B1021103A +592 22483BBA 102D102F1021103A +593 --- Medials +594 22483BBB 105E +595 22483BBC 105F +596 22483BBD 103B +597 22483BBE 103C +598 22483BBF 1060 +599 22483BC0 103D +600 22483BC1 1082 +601 22483BC2 103E +602 22483BC3 103B103D +603 22483BC4 103C103D +604 22483BC5 103B103E +605 22483BC6 103C103E +606 22483BC7 103D103E +607 22483BC8 103B103D103E +608 22483BC9 103C103D103E +609 --- Independent vowels +610 22242236 1021102D +611 22242236 1023 +612 22242238 1021102E +613 22242238 1024 +614 2224223A 1021102F +615 2224223A 1025 +616 2224223D 10211030 +617 2224223D 1026 +618 22242242 10211031 +619 22242242 1027 +620 22242242 1028 +621 222422463ACB 10211031102C +622 222422463ACB 1029 +623 222422463ACC 10211031102C103A +624 222422463ACC 102A +625 22483B7E 102D1019103A +626 22483B7E3ACB 102D1036 +627 22483B7E3ACC 102D1019103A1037 +628 22483B7E3ACD 102D10361037 +629 22483B7E3ACE 102D1019103A1038 +630 22483B7E3ACF 102D10361038 +631 22483B7F 102F1019103A +632 22483B7F3ACB 102F1036 +633 22483B7F3ACC 102F1019103A1037 +634 22483B7F3ACD 102F10361037 +635 22483B7F3ACE 102F1019103A1038 +636 22483B7F3ACF 102F10361038 +637 222422483B7F3ACB 1021102F1036 +638 222422483B7F3ACB 1025102F1036 +639 --- Independent vowels with finals +640 222422483ACF 1021102D10001039 +641 222422483ACF 102310001039 +642 222422483ACF 1021102D1000103A +643 222422483ACF 10231000103A +644 222422483AD0 1021102F10001039 +645 222422483AD0 102510001039 +646 222422483AD0 1021102F1000103A +647 222422483AD0 10251000103A +648 222422483AD1 1021103110001039 +649 222422483AD1 102710001039 +650 222422483AD1 102110311000103A +651 222422483AD1 10271000103A +652 222422483AD2 10211031102C10001039 +653 222422483AD2 102910001039 +654 222422483AD2 10211031102C1000103A +655 222422483AD2 10291000103A +656 222422483AD2 10211031102C10001039 +657 222422483AD2 10291031102C10001039 +658 222422483AD2 10211031102C1000103A +659 222422483AD2 10291031102C1000103A +660 222422483AD6 1021102D10011039 +661 222422483AD6 102310011039 +662 222422483AD6 1021102D1001103A +663 222422483AD6 10231001103A +664 222422483AD7 1021102F10011039 +665 222422483AD7 102510011039 +666 222422483AD7 1021102F1001103A +667 222422483AD7 10251001103A +668 222422483AD8 1021103110011039 +669 222422483AD8 102710011039 +670 222422483AD8 102110311001103A +671 222422483AD8 10271001103A +672 222422483AD9 10211031102C10011039 +673 222422483AD9 102910011039 +674 222422483AD9 10211031102C1001103A +675 222422483AD9 10291001103A +676 222422483AD9 10211031102C10011039 +677 222422483AD9 10291031102C10011039 +678 222422483AD9 10211031102C1001103A +679 222422483AD9 10291031102C1001103A +680 222422483ADD 1021102D10021039 +681 222422483ADD 102310021039 +682 222422483ADD 1021102D1002103A +683 222422483ADD 10231002103A +684 222422483ADE 1021102F10021039 +685 222422483ADE 102510021039 +686 222422483ADE 1021102F1002103A +687 222422483ADE 10251002103A +688 222422483ADF 1021103110021039 +689 222422483ADF 102710021039 +690 222422483ADF 102110311002103A +691 222422483ADF 10271002103A +692 222422483AE0 10211031102C10021039 +693 222422483AE0 102910021039 +694 222422483AE0 10211031102C1002103A +695 222422483AE0 10291002103A +696 222422483AE0 10211031102C10021039 +697 222422483AE0 10291031102C10021039 +698 222422483AE0 10211031102C1002103A +699 222422483AE0 10291031102C1002103A +700 222422483AE4 1021102D10031039 +701 222422483AE4 102310031039 +702 222422483AE4 1021102D1003103A +703 222422483AE4 10231003103A +704 222422483AE5 1021102F10031039 +705 222422483AE5 102510031039 +706 222422483AE5 1021102F1003103A +707 222422483AE5 10251003103A +708 222422483AE6 1021103110031039 +709 222422483AE6 102710031039 +710 222422483AE6 102110311003103A +711 222422483AE6 10271003103A +712 222422483AE7 10211031102C10031039 +713 222422483AE7 102910031039 +714 222422483AE7 10211031102C1003103A +715 222422483AE7 10291003103A +716 222422483AE7 10211031102C10031039 +717 222422483AE7 10291031102C10031039 +718 222422483AE7 10211031102C1003103A +719 222422483AE7 10291031102C1003103A +720 2224223621D5224D 1021102D10041039 +721 2224223621D5224D 102310041039 +722 222422483AEB 1021102D1004103A +723 222422483AEB 10231004103A +724 2224223A21D5224D 1021102F10041039 +725 2224223A21D5224D 102510041039 +726 222422483AEC 1021102F1004103A +727 222422483AEC 10251004103A +728 2224224221D5224D 1021103110041039 +729 2224224221D5224D 102710041039 +730 222422483AED 102110311004103A +731 222422483AED 10271004103A +732 222422463ACB21D5224D 10211031102C10041039 +733 222422463ACB21D5224D 102910041039 +734 222422483AEE 10211031102C1004103A +735 222422483AEE 10291004103A +736 222422463ACB21D5224D 10211031102C10041039 +737 222422463ACB21D5224D 10291031102C10041039 +738 222422483AEE 10211031102C1004103A +739 222422483AEE 10291031102C1004103A +740 222422483AF2 1021102D10051039 +741 222422483AF2 102310051039 +742 222422483AF2 1021102D1005103A +743 222422483AF2 10231005103A +744 222422483AF3 1021102F10051039 +745 222422483AF3 102510051039 +746 222422483AF3 1021102F1005103A +747 222422483AF3 10251005103A +748 222422483AF4 1021103110051039 +749 222422483AF4 102710051039 +750 222422483AF4 102110311005103A +751 222422483AF4 10271005103A +752 222422483AF5 10211031102C10051039 +753 222422483AF5 102910051039 +754 222422483AF5 10211031102C1005103A +755 222422483AF5 10291005103A +756 222422483AF5 10211031102C10051039 +757 222422483AF5 10291031102C10051039 +758 222422483AF5 10211031102C1005103A +759 222422483AF5 10291031102C1005103A +760 222422483AF9 1021102D10061039 +761 222422483AF9 102310061039 +762 222422483AF9 1021102D1006103A +763 222422483AF9 10231006103A +764 222422483AFA 1021102F10061039 +765 222422483AFA 102510061039 +766 222422483AFA 1021102F1006103A +767 222422483AFA 10251006103A +768 222422483AFB 1021103110061039 +769 222422483AFB 102710061039 +770 222422483AFB 102110311006103A +771 222422483AFB 10271006103A +772 222422483AFC 10211031102C10061039 +773 222422483AFC 102910061039 +774 222422483AFC 10211031102C1006103A +775 222422483AFC 10291006103A +776 222422483AFC 10211031102C10061039 +777 222422483AFC 10291031102C10061039 +778 222422483AFC 10211031102C1006103A +779 222422483AFC 10291031102C1006103A +780 222422483B00 1021102D10071039 +781 222422483B00 102310071039 +782 222422483B00 1021102D1007103A +783 222422483B00 10231007103A +784 222422483B01 1021102F10071039 +785 222422483B01 102510071039 +786 222422483B01 1021102F1007103A +787 222422483B01 10251007103A +788 222422483B02 1021103110071039 +789 222422483B02 102710071039 +790 222422483B02 102110311007103A +791 222422483B02 10271007103A +792 222422483B03 10211031102C10071039 +793 222422483B03 102910071039 +794 222422483B03 10211031102C1007103A +795 222422483B03 10291007103A +796 222422483B03 10211031102C10071039 +797 222422483B03 10291031102C10071039 +798 222422483B03 10211031102C1007103A +799 222422483B03 10291031102C1007103A +800 222422483B0E 1021102D10091039 +801 222422483B0E 102310091039 +802 222422483B0E 1021102D1009103A +803 222422483B0E 10231009103A +804 222422483B0F 1021102F10091039 +805 222422483B0F 102510091039 +806 222422483B0F 1021102F1009103A +807 222422483B0F 10251009103A +808 222422483B10 1021103110091039 +809 222422483B10 102710091039 +810 222422483B10 102110311009103A +811 222422483B10 10271009103A +812 222422483B11 10211031102C10091039 +813 222422483B11 102910091039 +814 222422483B11 10211031102C1009103A +815 222422483B11 10291009103A +816 222422483B11 10211031102C10091039 +817 222422483B11 10291031102C10091039 +818 222422483B11 10211031102C1009103A +819 222422483B11 10291031102C1009103A +820 222422483B15 1021102D100A1039 +821 222422483B15 1023100A1039 +822 222422483B15 1021102D100A103A +823 222422483B15 1023100A103A +824 222422483B16 1021102F100A1039 +825 222422483B16 1025100A1039 +826 222422483B16 1021102F100A103A +827 222422483B16 1025100A103A +828 222422483B17 10211031100A1039 +829 222422483B17 1027100A1039 +830 222422483B17 10211031100A103A +831 222422483B17 1027100A103A +832 222422483B18 10211031102C100A1039 +833 222422483B18 1029100A1039 +834 222422483B18 10211031102C100A103A +835 222422483B18 1029100A103A +836 222422483B18 10211031102C100A1039 +837 222422483B18 10291031102C100A1039 +838 222422483B18 10211031102C100A103A +839 222422483B18 10291031102C100A103A +840 222422483B1C 1021102D100B1039 +841 222422483B1C 1023100B1039 +842 222422483B1C 1021102D100B103A +843 222422483B1C 1023100B103A +844 222422483B1D 1021102F100B1039 +845 222422483B1D 1025100B1039 +846 222422483B1D 1021102F100B103A +847 222422483B1D 1025100B103A +848 222422483B1E 10211031100B1039 +849 222422483B1E 1027100B1039 +850 222422483B1E 10211031100B103A +851 222422483B1E 1027100B103A +852 222422483B1F 10211031102C100B1039 +853 222422483B1F 1029100B1039 +854 222422483B1F 10211031102C100B103A +855 222422483B1F 1029100B103A +856 222422483B1F 10211031102C100B1039 +857 222422483B1F 10291031102C100B1039 +858 222422483B1F 10211031102C100B103A +859 222422483B1F 10291031102C100B103A +860 222422483B23 1021102D100C1039 +861 222422483B23 1023100C1039 +862 222422483B23 1021102D100C103A +863 222422483B23 1023100C103A +864 222422483B24 1021102F100C1039 +865 222422483B24 1025100C1039 +866 222422483B24 1021102F100C103A +867 222422483B24 1025100C103A +868 222422483B25 10211031100C1039 +869 222422483B25 1027100C1039 +870 222422483B25 10211031100C103A +871 222422483B25 1027100C103A +872 222422483B26 10211031102C100C1039 +873 222422483B26 1029100C1039 +874 222422483B26 10211031102C100C103A +875 222422483B26 1029100C103A +876 222422483B26 10211031102C100C1039 +877 222422483B26 10291031102C100C1039 +878 222422483B26 10211031102C100C103A +879 222422483B26 10291031102C100C103A +880 222422483B2A 1021102D100D1039 +881 222422483B2A 1023100D1039 +882 222422483B2A 1021102D100D103A +883 222422483B2A 1023100D103A +884 222422483B2B 1021102F100D1039 +885 222422483B2B 1025100D1039 +886 222422483B2B 1021102F100D103A +887 222422483B2B 1025100D103A +888 222422483B2C 10211031100D1039 +889 222422483B2C 1027100D1039 +890 222422483B2C 10211031100D103A +891 222422483B2C 1027100D103A +892 222422483B2D 10211031102C100D1039 +893 222422483B2D 1029100D1039 +894 222422483B2D 10211031102C100D103A +895 222422483B2D 1029100D103A +896 222422483B2D 10211031102C100D1039 +897 222422483B2D 10291031102C100D1039 +898 222422483B2D 10211031102C100D103A +899 222422483B2D 10291031102C100D103A +900 222422483B31 1021102D100E1039 +901 222422483B31 1023100E1039 +902 222422483B31 1021102D100E103A +903 222422483B31 1023100E103A +904 222422483B32 1021102F100E1039 +905 222422483B32 1025100E1039 +906 222422483B32 1021102F100E103A +907 222422483B32 1025100E103A +908 222422483B33 10211031100E1039 +909 222422483B33 1027100E1039 +910 222422483B33 10211031100E103A +911 222422483B33 1027100E103A +912 222422483B34 10211031102C100E1039 +913 222422483B34 1029100E1039 +914 222422483B34 10211031102C100E103A +915 222422483B34 1029100E103A +916 222422483B34 10211031102C100E1039 +917 222422483B34 10291031102C100E1039 +918 222422483B34 10211031102C100E103A +919 222422483B34 10291031102C100E103A +920 222422483B38 1021102D100F1039 +921 222422483B38 1023100F1039 +922 222422483B38 1021102D100F103A +923 222422483B38 1023100F103A +924 222422483B39 1021102F100F1039 +925 222422483B39 1025100F1039 +926 222422483B39 1021102F100F103A +927 222422483B39 1025100F103A +928 222422483B3A 10211031100F1039 +929 222422483B3A 1027100F1039 +930 222422483B3A 10211031100F103A +931 222422483B3A 1027100F103A +932 222422483B3B 10211031102C100F1039 +933 222422483B3B 1029100F1039 +934 222422483B3B 10211031102C100F103A +935 222422483B3B 1029100F103A +936 222422483B3B 10211031102C100F1039 +937 222422483B3B 10291031102C100F1039 +938 222422483B3B 10211031102C100F103A +939 222422483B3B 10291031102C100F103A +940 222422483B3F 1021102D10101039 +941 222422483B3F 102310101039 +942 222422483B3F 1021102D1010103A +943 222422483B3F 10231010103A +944 222422483B40 1021102F10101039 +945 222422483B40 102510101039 +946 222422483B40 1021102F1010103A +947 222422483B40 10251010103A +948 222422483B41 1021103110101039 +949 222422483B41 102710101039 +950 222422483B41 102110311010103A +951 222422483B41 10271010103A +952 222422483B42 10211031102C10101039 +953 222422483B42 102910101039 +954 222422483B42 10211031102C1010103A +955 222422483B42 10291010103A +956 222422483B42 10211031102C10101039 +957 222422483B42 10291031102C10101039 +958 222422483B42 10211031102C1010103A +959 222422483B42 10291031102C1010103A +960 222422483B46 1021102D10111039 +961 222422483B46 102310111039 +962 222422483B46 1021102D1011103A +963 222422483B46 10231011103A +964 222422483B47 1021102F10111039 +965 222422483B47 102510111039 +966 222422483B47 1021102F1011103A +967 222422483B47 10251011103A +968 222422483B48 1021103110111039 +969 222422483B48 102710111039 +970 222422483B48 102110311011103A +971 222422483B48 10271011103A +972 222422483B49 10211031102C10111039 +973 222422483B49 102910111039 +974 222422483B49 10211031102C1011103A +975 222422483B49 10291011103A +976 222422483B49 10211031102C10111039 +977 222422483B49 10291031102C10111039 +978 222422483B49 10211031102C1011103A +979 222422483B49 10291031102C1011103A +980 222422483B4D 1021102D10121039 +981 222422483B4D 102310121039 +982 222422483B4D 1021102D1012103A +983 222422483B4D 10231012103A +984 222422483B4E 1021102F10121039 +985 222422483B4E 102510121039 +986 222422483B4E 1021102F1012103A +987 222422483B4E 10251012103A +988 222422483B4F 1021103110121039 +989 222422483B4F 102710121039 +990 222422483B4F 102110311012103A +991 222422483B4F 10271012103A +992 222422483B50 10211031102C10121039 +993 222422483B50 102910121039 +994 222422483B50 10211031102C1012103A +995 222422483B50 10291012103A +996 222422483B50 10211031102C10121039 +997 222422483B50 10291031102C10121039 +998 222422483B50 10211031102C1012103A +999 222422483B50 10291031102C1012103A +1000 222422483B54 1021102D10131039 +1001 222422483B54 102310131039 +1002 222422483B54 1021102D1013103A +1003 222422483B54 10231013103A +1004 222422483B55 1021102F10131039 +1005 222422483B55 102510131039 +1006 222422483B55 1021102F1013103A +1007 222422483B55 10251013103A +1008 222422483B56 1021103110131039 +1009 222422483B56 102710131039 +1010 222422483B56 102110311013103A +1011 222422483B56 10271013103A +1012 222422483B57 10211031102C10131039 +1013 222422483B57 102910131039 +1014 222422483B57 10211031102C1013103A +1015 222422483B57 10291013103A +1016 222422483B57 10211031102C10131039 +1017 222422483B57 10291031102C10131039 +1018 222422483B57 10211031102C1013103A +1019 222422483B57 10291031102C1013103A +1020 222422483B5B 1021102D10141039 +1021 222422483B5B 102310141039 +1022 222422483B5B 1021102D1014103A +1023 222422483B5B 10231014103A +1024 222422483B5C 1021102F10141039 +1025 222422483B5C 102510141039 +1026 222422483B5C 1021102F1014103A +1027 222422483B5C 10251014103A +1028 222422483B5D 1021103110141039 +1029 222422483B5D 102710141039 +1030 222422483B5D 102110311014103A +1031 222422483B5D 10271014103A +1032 222422483B5E 10211031102C10141039 +1033 222422483B5E 102910141039 +1034 222422483B5E 10211031102C1014103A +1035 222422483B5E 10291014103A +1036 222422483B5E 10211031102C10141039 +1037 222422483B5E 10291031102C10141039 +1038 222422483B5E 10211031102C1014103A +1039 222422483B5E 10291031102C1014103A +1040 222422483B62 1021102D10151039 +1041 222422483B62 102310151039 +1042 222422483B62 1021102D1015103A +1043 222422483B62 10231015103A +1044 222422483B63 1021102F10151039 +1045 222422483B63 102510151039 +1046 222422483B63 1021102F1015103A +1047 222422483B63 10251015103A +1048 222422483B64 1021103110151039 +1049 222422483B64 102710151039 +1050 222422483B64 102110311015103A +1051 222422483B64 10271015103A +1052 222422483B65 10211031102C10151039 +1053 222422483B65 102910151039 +1054 222422483B65 10211031102C1015103A +1055 222422483B65 10291015103A +1056 222422483B65 10211031102C10151039 +1057 222422483B65 10291031102C10151039 +1058 222422483B65 10211031102C1015103A +1059 222422483B65 10291031102C1015103A +1060 222422483B69 1021102D10161039 +1061 222422483B69 102310161039 +1062 222422483B69 1021102D1016103A +1063 222422483B69 10231016103A +1064 222422483B6A 1021102F10161039 +1065 222422483B6A 102510161039 +1066 222422483B6A 1021102F1016103A +1067 222422483B6A 10251016103A +1068 222422483B6B 1021103110161039 +1069 222422483B6B 102710161039 +1070 222422483B6B 102110311016103A +1071 222422483B6B 10271016103A +1072 222422483B6C 10211031102C10161039 +1073 222422483B6C 102910161039 +1074 222422483B6C 10211031102C1016103A +1075 222422483B6C 10291016103A +1076 222422483B6C 10211031102C10161039 +1077 222422483B6C 10291031102C10161039 +1078 222422483B6C 10211031102C1016103A +1079 222422483B6C 10291031102C1016103A +1080 222422483B70 1021102D10171039 +1081 222422483B70 102310171039 +1082 222422483B70 1021102D1017103A +1083 222422483B70 10231017103A +1084 222422483B71 1021102F10171039 +1085 222422483B71 102510171039 +1086 222422483B71 1021102F1017103A +1087 222422483B71 10251017103A +1088 222422483B72 1021103110171039 +1089 222422483B72 102710171039 +1090 222422483B72 102110311017103A +1091 222422483B72 10271017103A +1092 222422483B73 10211031102C10171039 +1093 222422483B73 102910171039 +1094 222422483B73 10211031102C1017103A +1095 222422483B73 10291017103A +1096 222422483B73 10211031102C10171039 +1097 222422483B73 10291031102C10171039 +1098 222422483B73 10211031102C1017103A +1099 222422483B73 10291031102C1017103A +1100 222422483B77 1021102D10181039 +1101 222422483B77 102310181039 +1102 222422483B77 1021102D1018103A +1103 222422483B77 10231018103A +1104 222422483B78 1021102F10181039 +1105 222422483B78 102510181039 +1106 222422483B78 1021102F1018103A +1107 222422483B78 10251018103A +1108 222422483B79 1021103110181039 +1109 222422483B79 102710181039 +1110 222422483B79 102110311018103A +1111 222422483B79 10271018103A +1112 222422483B7A 10211031102C10181039 +1113 222422483B7A 102910181039 +1114 222422483B7A 10211031102C1018103A +1115 222422483B7A 10291018103A +1116 222422483B7A 10211031102C10181039 +1117 222422483B7A 10291031102C10181039 +1118 222422483B7A 10211031102C1018103A +1119 222422483B7A 10291031102C1018103A +1120 222422483B7E 1021102D10191039 +1121 222422483B7E 102310191039 +1122 222422483B7E 1021102D1019103A +1123 222422483B7E 10231019103A +1124 222422483B7F 1021102F10191039 +1125 222422483B7F 102510191039 +1126 222422483B7F 1021102F1019103A +1127 222422483B7F 10251019103A +1128 222422483B80 1021103110191039 +1129 222422483B80 102710191039 +1130 222422483B80 102110311019103A +1131 222422483B80 10271019103A +1132 222422483B81 10211031102C10191039 +1133 222422483B81 102910191039 +1134 222422483B81 10211031102C1019103A +1135 222422483B81 10291019103A +1136 222422483B81 10211031102C10191039 +1137 222422483B81 10291031102C10191039 +1138 222422483B81 10211031102C1019103A +1139 222422483B81 10291031102C1019103A +1140 222422483B85 1021102D101A1039 +1141 222422483B85 1023101A1039 +1142 222422483B85 1021102D101A103A +1143 222422483B85 1023101A103A +1144 222422483B86 1021102F101A1039 +1145 222422483B86 1025101A1039 +1146 222422483B86 1021102F101A103A +1147 222422483B86 1025101A103A +1148 222422483B87 10211031101A1039 +1149 222422483B87 1027101A1039 +1150 222422483B87 10211031101A103A +1151 222422483B87 1027101A103A +1152 222422483B88 10211031102C101A1039 +1153 222422483B88 1029101A1039 +1154 222422483B88 10211031102C101A103A +1155 222422483B88 1029101A103A +1156 222422483B88 10211031102C101A1039 +1157 222422483B88 10291031102C101A1039 +1158 222422483B88 10211031102C101A103A +1159 222422483B88 10291031102C101A103A +1160 222422483B8C 1021102D101B1039 +1161 222422483B8C 1023101B1039 +1162 222422483B8C 1021102D101B103A +1163 222422483B8C 1023101B103A +1164 222422483B8D 1021102F101B1039 +1165 222422483B8D 1025101B1039 +1166 222422483B8D 1021102F101B103A +1167 222422483B8D 1025101B103A +1168 222422483B8E 10211031101B1039 +1169 222422483B8E 1027101B1039 +1170 222422483B8E 10211031101B103A +1171 222422483B8E 1027101B103A +1172 222422483B8F 10211031102C101B1039 +1173 222422483B8F 1029101B1039 +1174 222422483B8F 10211031102C101B103A +1175 222422483B8F 1029101B103A +1176 222422483B8F 10211031102C101B1039 +1177 222422483B8F 10291031102C101B1039 +1178 222422483B8F 10211031102C101B103A +1179 222422483B8F 10291031102C101B103A +1180 222422483B93 1021102D101C1039 +1181 222422483B93 1023101C1039 +1182 222422483B93 1021102D101C103A +1183 222422483B93 1023101C103A +1184 222422483B94 1021102F101C1039 +1185 222422483B94 1025101C1039 +1186 222422483B94 1021102F101C103A +1187 222422483B94 1025101C103A +1188 222422483B95 10211031101C1039 +1189 222422483B95 1027101C1039 +1190 222422483B95 10211031101C103A +1191 222422483B95 1027101C103A +1192 222422483B96 10211031102C101C1039 +1193 222422483B96 1029101C1039 +1194 222422483B96 10211031102C101C103A +1195 222422483B96 1029101C103A +1196 222422483B96 10211031102C101C1039 +1197 222422483B96 10291031102C101C1039 +1198 222422483B96 10211031102C101C103A +1199 222422483B96 10291031102C101C103A +1200 222422483BA1 1021102D101E1039 +1201 222422483BA1 1023101E1039 +1202 222422483BA1 1021102D101E103A +1203 222422483BA1 1023101E103A +1204 222422483BA2 1021102F101E1039 +1205 222422483BA2 1025101E1039 +1206 222422483BA2 1021102F101E103A +1207 222422483BA2 1025101E103A +1208 222422483BA3 10211031101E1039 +1209 222422483BA3 1027101E1039 +1210 222422483BA3 10211031101E103A +1211 222422483BA3 1027101E103A +1212 222422483BA4 10211031102C101E1039 +1213 222422483BA4 1029101E1039 +1214 222422483BA4 10211031102C101E103A +1215 222422483BA4 1029101E103A +1216 222422483BA4 10211031102C101E1039 +1217 222422483BA4 10291031102C101E1039 +1218 222422483BA4 10211031102C101E103A +1219 222422483BA4 10291031102C101E103A +1220 222422483BA8 1021102D101F1039 +1221 222422483BA8 1023101F1039 +1222 222422483BA8 1021102D101F103A +1223 222422483BA8 1023101F103A +1224 222422483BA9 1021102F101F1039 +1225 222422483BA9 1025101F1039 +1226 222422483BA9 1021102F101F103A +1227 222422483BA9 1025101F103A +1228 222422483BAA 10211031101F1039 +1229 222422483BAA 1027101F1039 +1230 222422483BAA 10211031101F103A +1231 222422483BAA 1027101F103A +1232 222422483BAB 10211031102C101F1039 +1233 222422483BAB 1029101F1039 +1234 222422483BAB 10211031102C101F103A +1235 222422483BAB 1029101F103A +1236 222422483BAB 10211031102C101F1039 +1237 222422483BAB 10291031102C101F1039 +1238 222422483BAB 10211031102C101F103A +1239 222422483BAB 10291031102C101F103A +1240 --- Contractions +1241 22483AD221CD22483BBD 1031102C1000103A1000103B +1242 22483AD221CD22483BBD 1031102C1000103A103B +1243 22483B5921F822483B63 1014103A1014102F1015103A +1244 22483B5921F822483B63 1014103A102F1015103A +1245 --- Great Sa +1246 22483BA32216 1031101E1039101E +1247 22483BA32216 1031103F +1248 22483BA12216 102D101E1039101E +1249 22483BA12216 102D103F +1250 22483BA22216 102F101E1039101E +1251 22483BA22216 102F103F +1252 222422483BA12216 1021102D101E1039101E +1253 222422483BA12216 1023103F +1254 222422483BA22216 1021102F101E1039101E +1255 222422483BA22216 1025103F +1256 22483B9F2216 101E1039101E +1257 22483B9F2216 103F +1258 --- Symbols - collate as long form +1259 21F822483BC222483AD3 1014103E102D102F1000103A +1260 21F822483BC222483AD3 104C +1261 220922483BC0224222593ACB 101B103D10311037 +1262 220922483BC0224222593ACB 104D +1263 220D22483B1322593ACC21CD22483AEE22593ACC 101C100A103A103810001031102C1004103A1038 +1264 220D22483B1322593ACC21CD22483AEE22593ACC 104E1004103A1038 +1265 22242236 1021102D +1266 22242236 104F +1267 --- Short Forms may need to be added here +1268 220D22483ACD22072232 101C1000103A101A102C +1269 220D22483ACD22072232 101C1000103A103B102C +1270 221622052238 101E1019102E +1271 221622052238 101E10391019102E +1272 21F3220522483AE922593ACC 101110191004103A1038 +1273 21F3220522483AE922593ACC 1011103910191004103A1038 +1274 220D22483ACD220422483ACD 101C1000103A10181000103A +1275 220D22483ACD220422483ACD 101C103910181000103A +DROP TABLE t1; +# +# END of ctype_myanmar.inc +# +SET collation_connection=ucs2_myanmar_ci; +# +# Start of ctype_myanmar.inc +# +SELECT @@collation_connection; +@@collation_connection +ucs2_myanmar_ci +CREATE TABLE t1 AS SELECT 100000 AS id, REPEAT(' ', 64) AS s1 LIMIT 0; +SELECT COLLATION(s1) FROM t1; +COLLATION(s1) +DELETE FROM t1; +ALTER TABLE t1 MODIFY id INT NOT NULL AUTO_INCREMENT PRIMARY KEY; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `s1` varchar(64) CHARACTER SET ucs2 COLLATE ucs2_myanmar_ci NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 (s1) VALUES +(_ucs2 0x108C), +(_ucs2 0x1037), +(_ucs2 0x1038), +(_ucs2 0x10371038), +('--- Vowels'), +(_ucs2 0x102C), +(_ucs2 0x102B), +(_ucs2 0x1032), +(_ucs2 0x1031102C), +(_ucs2 0x1031102B), +(_ucs2 0x1031102C103A), +(_ucs2 0x1031102B103A), +(_ucs2 0x1034), +(_ucs2 0x1036), +(_ucs2 0x102D102F), +('--- Vowels with finals'), +(_ucs2 0x10001039), +(_ucs2 0x1000103A), +(_ucs2 0x102C10001039), +(_ucs2 0x102C1000103A), +(_ucs2 0x102B10001039), +(_ucs2 0x102B1000103A), +(_ucs2 0x102D10001039), +(_ucs2 0x102D1000103A), +(_ucs2 0x102F10001039), +(_ucs2 0x102F1000103A), +(_ucs2 0x103110001039), +(_ucs2 0x10311000103A), +(_ucs2 0x1031102C10001039), +(_ucs2 0x1031102C1000103A), +(_ucs2 0x1031102B10001039), +(_ucs2 0x1031102B1000103A), +(_ucs2 0x102D102F10001039), +(_ucs2 0x102D102F1000103A), +(_ucs2 0x10011039), +(_ucs2 0x1001103A), +(_ucs2 0x102C10011039), +(_ucs2 0x102C1001103A), +(_ucs2 0x102B10011039), +(_ucs2 0x102B1001103A), +(_ucs2 0x102D10011039), +(_ucs2 0x102D1001103A), +(_ucs2 0x102F10011039), +(_ucs2 0x102F1001103A), +(_ucs2 0x103110011039), +(_ucs2 0x10311001103A), +(_ucs2 0x1031102C10011039), +(_ucs2 0x1031102C1001103A), +(_ucs2 0x1031102B10011039), +(_ucs2 0x1031102B1001103A), +(_ucs2 0x102D102F10011039), +(_ucs2 0x102D102F1001103A), +(_ucs2 0x10021039), +(_ucs2 0x1002103A), +(_ucs2 0x102C10021039), +(_ucs2 0x102C1002103A), +(_ucs2 0x102B10021039), +(_ucs2 0x102B1002103A), +(_ucs2 0x102D10021039), +(_ucs2 0x102D1002103A), +(_ucs2 0x102F10021039), +(_ucs2 0x102F1002103A), +(_ucs2 0x103110021039), +(_ucs2 0x10311002103A), +(_ucs2 0x1031102C10021039), +(_ucs2 0x1031102C1002103A), +(_ucs2 0x1031102B10021039), +(_ucs2 0x1031102B1002103A), +(_ucs2 0x102D102F10021039), +(_ucs2 0x102D102F1002103A), +(_ucs2 0x10031039), +(_ucs2 0x1003103A), +(_ucs2 0x102C10031039), +(_ucs2 0x102C1003103A), +(_ucs2 0x102B10031039), +(_ucs2 0x102B1003103A), +(_ucs2 0x102D10031039), +(_ucs2 0x102D1003103A), +(_ucs2 0x102F10031039), +(_ucs2 0x102F1003103A), +(_ucs2 0x103110031039), +(_ucs2 0x10311003103A), +(_ucs2 0x1031102C10031039), +(_ucs2 0x1031102C1003103A), +(_ucs2 0x1031102B10031039), +(_ucs2 0x1031102B1003103A), +(_ucs2 0x102D102F10031039), +(_ucs2 0x102D102F1003103A), +(_ucs2 0x1004103A1039), +(_ucs2 0x1004103A), +(_ucs2 0x102C1004103A1039), +(_ucs2 0x102C1004103A), +(_ucs2 0x102B1004103A1039), +(_ucs2 0x102B1004103A), +(_ucs2 0x102D1004103A1039), +(_ucs2 0x102D1004103A), +(_ucs2 0x102F1004103A1039), +(_ucs2 0x102F1004103A), +(_ucs2 0x10311004103A1039), +(_ucs2 0x10311004103A), +(_ucs2 0x1031102C1004103A1039), +(_ucs2 0x1031102C1004103A), +(_ucs2 0x1031102B1004103A1039), +(_ucs2 0x1031102B1004103A), +(_ucs2 0x102D102F1004103A1039), +(_ucs2 0x102D102F1004103A), +(_ucs2 0x10051039), +(_ucs2 0x1005103A), +(_ucs2 0x102C10051039), +(_ucs2 0x102C1005103A), +(_ucs2 0x102B10051039), +(_ucs2 0x102B1005103A), +(_ucs2 0x102D10051039), +(_ucs2 0x102D1005103A), +(_ucs2 0x102F10051039), +(_ucs2 0x102F1005103A), +(_ucs2 0x103110051039), +(_ucs2 0x10311005103A), +(_ucs2 0x1031102C10051039), +(_ucs2 0x1031102C1005103A), +(_ucs2 0x1031102B10051039), +(_ucs2 0x1031102B1005103A), +(_ucs2 0x102D102F10051039), +(_ucs2 0x102D102F1005103A), +(_ucs2 0x10061039), +(_ucs2 0x1006103A), +(_ucs2 0x102C10061039), +(_ucs2 0x102C1006103A), +(_ucs2 0x102B10061039), +(_ucs2 0x102B1006103A), +(_ucs2 0x102D10061039), +(_ucs2 0x102D1006103A), +(_ucs2 0x102F10061039), +(_ucs2 0x102F1006103A), +(_ucs2 0x103110061039), +(_ucs2 0x10311006103A), +(_ucs2 0x1031102C10061039), +(_ucs2 0x1031102C1006103A), +(_ucs2 0x1031102B10061039), +(_ucs2 0x1031102B1006103A), +(_ucs2 0x102D102F10061039), +(_ucs2 0x102D102F1006103A), +(_ucs2 0x10071039), +(_ucs2 0x1007103A), +(_ucs2 0x102C10071039), +(_ucs2 0x102C1007103A), +(_ucs2 0x102B10071039), +(_ucs2 0x102B1007103A), +(_ucs2 0x102D10071039), +(_ucs2 0x102D1007103A), +(_ucs2 0x102F10071039), +(_ucs2 0x102F1007103A), +(_ucs2 0x103110071039), +(_ucs2 0x10311007103A), +(_ucs2 0x1031102C10071039), +(_ucs2 0x1031102C1007103A), +(_ucs2 0x1031102B10071039), +(_ucs2 0x1031102B1007103A), +(_ucs2 0x102D102F10071039), +(_ucs2 0x102D102F1007103A), +(_ucs2 0x1008103A), +(_ucs2 0x102C1008103A), +(_ucs2 0x102B1008103A), +(_ucs2 0x102D1008103A), +(_ucs2 0x102F1008103A), +(_ucs2 0x10311008103A), +(_ucs2 0x1031102C1008103A), +(_ucs2 0x1031102B1008103A), +(_ucs2 0x102D102F1008103A), +(_ucs2 0x10091039), +(_ucs2 0x1009103A), +(_ucs2 0x102C10091039), +(_ucs2 0x102C1009103A), +(_ucs2 0x102B10091039), +(_ucs2 0x102B1009103A), +(_ucs2 0x102D10091039), +(_ucs2 0x102D1009103A), +(_ucs2 0x102F10091039), +(_ucs2 0x102F1009103A), +(_ucs2 0x103110091039), +(_ucs2 0x10311009103A), +(_ucs2 0x1031102C10091039), +(_ucs2 0x1031102C1009103A), +(_ucs2 0x1031102B10091039), +(_ucs2 0x1031102B1009103A), +(_ucs2 0x102D102F10091039), +(_ucs2 0x102D102F1009103A), +(_ucs2 0x100A1039), +(_ucs2 0x100A103A), +(_ucs2 0x102C100A1039), +(_ucs2 0x102C100A103A), +(_ucs2 0x102B100A1039), +(_ucs2 0x102B100A103A), +(_ucs2 0x102D100A1039), +(_ucs2 0x102D100A103A), +(_ucs2 0x102F100A1039), +(_ucs2 0x102F100A103A), +(_ucs2 0x1031100A1039), +(_ucs2 0x1031100A103A), +(_ucs2 0x1031102C100A1039), +(_ucs2 0x1031102C100A103A), +(_ucs2 0x1031102B100A1039), +(_ucs2 0x1031102B100A103A), +(_ucs2 0x102D102F100A1039), +(_ucs2 0x102D102F100A103A), +(_ucs2 0x100B1039), +(_ucs2 0x100B103A), +(_ucs2 0x102C100B1039), +(_ucs2 0x102C100B103A), +(_ucs2 0x102B100B1039), +(_ucs2 0x102B100B103A), +(_ucs2 0x102D100B1039), +(_ucs2 0x102D100B103A), +(_ucs2 0x102F100B1039), +(_ucs2 0x102F100B103A), +(_ucs2 0x1031100B1039), +(_ucs2 0x1031100B103A), +(_ucs2 0x1031102C100B1039), +(_ucs2 0x1031102C100B103A), +(_ucs2 0x1031102B100B1039), +(_ucs2 0x1031102B100B103A), +(_ucs2 0x102D102F100B1039), +(_ucs2 0x102D102F100B103A), +(_ucs2 0x100C1039), +(_ucs2 0x100C103A), +(_ucs2 0x102C100C1039), +(_ucs2 0x102C100C103A), +(_ucs2 0x102B100C1039), +(_ucs2 0x102B100C103A), +(_ucs2 0x102D100C1039), +(_ucs2 0x102D100C103A), +(_ucs2 0x102F100C1039), +(_ucs2 0x102F100C103A), +(_ucs2 0x1031100C1039), +(_ucs2 0x1031100C103A), +(_ucs2 0x1031102C100C1039), +(_ucs2 0x1031102C100C103A), +(_ucs2 0x1031102B100C1039), +(_ucs2 0x1031102B100C103A), +(_ucs2 0x102D102F100C1039), +(_ucs2 0x102D102F100C103A), +(_ucs2 0x100D1039), +(_ucs2 0x100D103A), +(_ucs2 0x102C100D1039), +(_ucs2 0x102C100D103A), +(_ucs2 0x102B100D1039), +(_ucs2 0x102B100D103A), +(_ucs2 0x102D100D1039), +(_ucs2 0x102D100D103A), +(_ucs2 0x102F100D1039), +(_ucs2 0x102F100D103A), +(_ucs2 0x1031100D1039), +(_ucs2 0x1031100D103A), +(_ucs2 0x1031102C100D1039), +(_ucs2 0x1031102C100D103A), +(_ucs2 0x1031102B100D1039), +(_ucs2 0x1031102B100D103A), +(_ucs2 0x102D102F100D1039), +(_ucs2 0x102D102F100D103A), +(_ucs2 0x100E1039), +(_ucs2 0x100E103A), +(_ucs2 0x102C100E1039), +(_ucs2 0x102C100E103A), +(_ucs2 0x102B100E1039), +(_ucs2 0x102B100E103A), +(_ucs2 0x102D100E1039), +(_ucs2 0x102D100E103A), +(_ucs2 0x102F100E1039), +(_ucs2 0x102F100E103A), +(_ucs2 0x1031100E1039), +(_ucs2 0x1031100E103A), +(_ucs2 0x1031102C100E1039), +(_ucs2 0x1031102C100E103A), +(_ucs2 0x1031102B100E1039), +(_ucs2 0x1031102B100E103A), +(_ucs2 0x102D102F100E1039), +(_ucs2 0x102D102F100E103A), +(_ucs2 0x100F1039), +(_ucs2 0x100F103A), +(_ucs2 0x102C100F1039), +(_ucs2 0x102C100F103A), +(_ucs2 0x102B100F1039), +(_ucs2 0x102B100F103A), +(_ucs2 0x102D100F1039), +(_ucs2 0x102D100F103A), +(_ucs2 0x102F100F1039), +(_ucs2 0x102F100F103A), +(_ucs2 0x1031100F1039), +(_ucs2 0x1031100F103A), +(_ucs2 0x1031102C100F1039), +(_ucs2 0x1031102C100F103A), +(_ucs2 0x1031102B100F1039), +(_ucs2 0x1031102B100F103A), +(_ucs2 0x102D102F100F1039), +(_ucs2 0x102D102F100F103A), +(_ucs2 0x10101039), +(_ucs2 0x1010103A), +(_ucs2 0x102C10101039), +(_ucs2 0x102C1010103A), +(_ucs2 0x102B10101039), +(_ucs2 0x102B1010103A), +(_ucs2 0x102D10101039), +(_ucs2 0x102D1010103A), +(_ucs2 0x102F10101039), +(_ucs2 0x102F1010103A), +(_ucs2 0x103110101039), +(_ucs2 0x10311010103A), +(_ucs2 0x1031102C10101039), +(_ucs2 0x1031102C1010103A), +(_ucs2 0x1031102B10101039), +(_ucs2 0x1031102B1010103A), +(_ucs2 0x102D102F10101039), +(_ucs2 0x102D102F1010103A), +(_ucs2 0x10111039), +(_ucs2 0x1011103A), +(_ucs2 0x102C10111039), +(_ucs2 0x102C1011103A), +(_ucs2 0x102B10111039), +(_ucs2 0x102B1011103A), +(_ucs2 0x102D10111039), +(_ucs2 0x102D1011103A), +(_ucs2 0x102F10111039), +(_ucs2 0x102F1011103A), +(_ucs2 0x103110111039), +(_ucs2 0x10311011103A), +(_ucs2 0x1031102C10111039), +(_ucs2 0x1031102C1011103A), +(_ucs2 0x1031102B10111039), +(_ucs2 0x1031102B1011103A), +(_ucs2 0x102D102F10111039), +(_ucs2 0x102D102F1011103A), +(_ucs2 0x10121039), +(_ucs2 0x1012103A), +(_ucs2 0x102C10121039), +(_ucs2 0x102C1012103A), +(_ucs2 0x102B10121039), +(_ucs2 0x102B1012103A), +(_ucs2 0x102D10121039), +(_ucs2 0x102D1012103A), +(_ucs2 0x102F10121039), +(_ucs2 0x102F1012103A), +(_ucs2 0x103110121039), +(_ucs2 0x10311012103A), +(_ucs2 0x1031102C10121039), +(_ucs2 0x1031102C1012103A), +(_ucs2 0x1031102B10121039), +(_ucs2 0x1031102B1012103A), +(_ucs2 0x102D102F10121039), +(_ucs2 0x102D102F1012103A), +(_ucs2 0x10131039), +(_ucs2 0x1013103A), +(_ucs2 0x102C10131039), +(_ucs2 0x102C1013103A), +(_ucs2 0x102B10131039), +(_ucs2 0x102B1013103A), +(_ucs2 0x102D10131039), +(_ucs2 0x102D1013103A), +(_ucs2 0x102F10131039), +(_ucs2 0x102F1013103A), +(_ucs2 0x103110131039), +(_ucs2 0x10311013103A), +(_ucs2 0x1031102C10131039), +(_ucs2 0x1031102C1013103A), +(_ucs2 0x1031102B10131039), +(_ucs2 0x1031102B1013103A), +(_ucs2 0x102D102F10131039), +(_ucs2 0x102D102F1013103A), +(_ucs2 0x10141039), +(_ucs2 0x1014103A), +(_ucs2 0x102C10141039), +(_ucs2 0x102C1014103A), +(_ucs2 0x102B10141039), +(_ucs2 0x102B1014103A), +(_ucs2 0x102D10141039), +(_ucs2 0x102D1014103A), +(_ucs2 0x102F10141039), +(_ucs2 0x102F1014103A), +(_ucs2 0x103110141039), +(_ucs2 0x10311014103A), +(_ucs2 0x1031102C10141039), +(_ucs2 0x1031102C1014103A), +(_ucs2 0x1031102B10141039), +(_ucs2 0x1031102B1014103A), +(_ucs2 0x102D102F10141039), +(_ucs2 0x102D102F1014103A), +(_ucs2 0x10151039), +(_ucs2 0x1015103A), +(_ucs2 0x102C10151039), +(_ucs2 0x102C1015103A), +(_ucs2 0x102B10151039), +(_ucs2 0x102B1015103A), +(_ucs2 0x102D10151039), +(_ucs2 0x102D1015103A), +(_ucs2 0x102F10151039), +(_ucs2 0x102F1015103A), +(_ucs2 0x103110151039), +(_ucs2 0x10311015103A), +(_ucs2 0x1031102C10151039), +(_ucs2 0x1031102C1015103A), +(_ucs2 0x1031102B10151039), +(_ucs2 0x1031102B1015103A), +(_ucs2 0x102D102F10151039), +(_ucs2 0x102D102F1015103A), +(_ucs2 0x10161039), +(_ucs2 0x1016103A), +(_ucs2 0x102C10161039), +(_ucs2 0x102C1016103A), +(_ucs2 0x102B10161039), +(_ucs2 0x102B1016103A), +(_ucs2 0x102D10161039), +(_ucs2 0x102D1016103A), +(_ucs2 0x102F10161039), +(_ucs2 0x102F1016103A), +(_ucs2 0x103110161039), +(_ucs2 0x10311016103A), +(_ucs2 0x1031102C10161039), +(_ucs2 0x1031102C1016103A), +(_ucs2 0x1031102B10161039), +(_ucs2 0x1031102B1016103A), +(_ucs2 0x102D102F10161039), +(_ucs2 0x102D102F1016103A), +(_ucs2 0x10171039), +(_ucs2 0x1017103A), +(_ucs2 0x102C10171039), +(_ucs2 0x102C1017103A), +(_ucs2 0x102B10171039), +(_ucs2 0x102B1017103A), +(_ucs2 0x102D10171039), +(_ucs2 0x102D1017103A), +(_ucs2 0x102F10171039), +(_ucs2 0x102F1017103A), +(_ucs2 0x103110171039), +(_ucs2 0x10311017103A), +(_ucs2 0x1031102C10171039), +(_ucs2 0x1031102C1017103A), +(_ucs2 0x1031102B10171039), +(_ucs2 0x1031102B1017103A), +(_ucs2 0x102D102F10171039), +(_ucs2 0x102D102F1017103A), +(_ucs2 0x10181039), +(_ucs2 0x1018103A), +(_ucs2 0x102C10181039), +(_ucs2 0x102C1018103A), +(_ucs2 0x102B10181039), +(_ucs2 0x102B1018103A), +(_ucs2 0x102D10181039), +(_ucs2 0x102D1018103A), +(_ucs2 0x102F10181039), +(_ucs2 0x102F1018103A), +(_ucs2 0x103110181039), +(_ucs2 0x10311018103A), +(_ucs2 0x1031102C10181039), +(_ucs2 0x1031102C1018103A), +(_ucs2 0x1031102B10181039), +(_ucs2 0x1031102B1018103A), +(_ucs2 0x102D102F10181039), +(_ucs2 0x102D102F1018103A), +(_ucs2 0x10191039), +(_ucs2 0x1019103A), +(_ucs2 0x102C10191039), +(_ucs2 0x102C1019103A), +(_ucs2 0x102B10191039), +(_ucs2 0x102B1019103A), +(_ucs2 0x102D10191039), +(_ucs2 0x102D1019103A), +(_ucs2 0x102F10191039), +(_ucs2 0x102F1019103A), +(_ucs2 0x103110191039), +(_ucs2 0x10311019103A), +(_ucs2 0x1031102C10191039), +(_ucs2 0x1031102C1019103A), +(_ucs2 0x1031102B10191039), +(_ucs2 0x1031102B1019103A), +(_ucs2 0x102D102F10191039), +(_ucs2 0x102D102F1019103A), +(_ucs2 0x101A1039), +(_ucs2 0x101A103A), +(_ucs2 0x102C101A1039), +(_ucs2 0x102C101A103A), +(_ucs2 0x102B101A1039), +(_ucs2 0x102B101A103A), +(_ucs2 0x102D101A1039), +(_ucs2 0x102D101A103A), +(_ucs2 0x102F101A1039), +(_ucs2 0x102F101A103A), +(_ucs2 0x1031101A1039), +(_ucs2 0x1031101A103A), +(_ucs2 0x1031102C101A1039), +(_ucs2 0x1031102C101A103A), +(_ucs2 0x1031102B101A1039), +(_ucs2 0x1031102B101A103A), +(_ucs2 0x102D102F101A1039), +(_ucs2 0x102D102F101A103A), +(_ucs2 0x101B1039), +(_ucs2 0x101B103A), +(_ucs2 0x102C101B1039), +(_ucs2 0x102C101B103A), +(_ucs2 0x102B101B1039), +(_ucs2 0x102B101B103A), +(_ucs2 0x102D101B1039), +(_ucs2 0x102D101B103A), +(_ucs2 0x102F101B1039), +(_ucs2 0x102F101B103A), +(_ucs2 0x1031101B1039), +(_ucs2 0x1031101B103A), +(_ucs2 0x1031102C101B1039), +(_ucs2 0x1031102C101B103A), +(_ucs2 0x1031102B101B1039), +(_ucs2 0x1031102B101B103A), +(_ucs2 0x102D102F101B1039), +(_ucs2 0x102D102F101B103A), +(_ucs2 0x101C1039), +(_ucs2 0x101C103A), +(_ucs2 0x102C101C1039), +(_ucs2 0x102C101C103A), +(_ucs2 0x102B101C1039), +(_ucs2 0x102B101C103A), +(_ucs2 0x102D101C1039), +(_ucs2 0x102D101C103A), +(_ucs2 0x102F101C1039), +(_ucs2 0x102F101C103A), +(_ucs2 0x1031101C1039), +(_ucs2 0x1031101C103A), +(_ucs2 0x1031102C101C1039), +(_ucs2 0x1031102C101C103A), +(_ucs2 0x1031102B101C1039), +(_ucs2 0x1031102B101C103A), +(_ucs2 0x102D102F101C1039), +(_ucs2 0x102D102F101C103A), +(_ucs2 0x101D103A), +(_ucs2 0x102C101D103A), +(_ucs2 0x102B101D103A), +(_ucs2 0x102D101D103A), +(_ucs2 0x102F101D103A), +(_ucs2 0x1031101D103A), +(_ucs2 0x1031102C101D103A), +(_ucs2 0x1031102B101D103A), +(_ucs2 0x102D102F101D103A), +(_ucs2 0x101E1039), +(_ucs2 0x101E103A), +(_ucs2 0x102C101E1039), +(_ucs2 0x102C101E103A), +(_ucs2 0x102B101E1039), +(_ucs2 0x102B101E103A), +(_ucs2 0x102D101E1039), +(_ucs2 0x102D101E103A), +(_ucs2 0x102F101E1039), +(_ucs2 0x102F101E103A), +(_ucs2 0x1031101E1039), +(_ucs2 0x1031101E103A), +(_ucs2 0x1031102C101E1039), +(_ucs2 0x1031102C101E103A), +(_ucs2 0x1031102B101E1039), +(_ucs2 0x1031102B101E103A), +(_ucs2 0x102D102F101E1039), +(_ucs2 0x102D102F101E103A), +(_ucs2 0x101F1039), +(_ucs2 0x101F103A), +(_ucs2 0x102C101F1039), +(_ucs2 0x102C101F103A), +(_ucs2 0x102B101F1039), +(_ucs2 0x102B101F103A), +(_ucs2 0x102D101F1039), +(_ucs2 0x102D101F103A), +(_ucs2 0x102F101F1039), +(_ucs2 0x102F101F103A), +(_ucs2 0x1031101F1039), +(_ucs2 0x1031101F103A), +(_ucs2 0x1031102C101F1039), +(_ucs2 0x1031102C101F103A), +(_ucs2 0x1031102B101F1039), +(_ucs2 0x1031102B101F103A), +(_ucs2 0x102D102F101F1039), +(_ucs2 0x102D102F101F103A), +(_ucs2 0x1020103A), +(_ucs2 0x102C1020103A), +(_ucs2 0x102B1020103A), +(_ucs2 0x102D1020103A), +(_ucs2 0x102F1020103A), +(_ucs2 0x10311020103A), +(_ucs2 0x1031102C1020103A), +(_ucs2 0x1031102B1020103A), +(_ucs2 0x102D102F1020103A), +(_ucs2 0x1021103A), +(_ucs2 0x102C1021103A), +(_ucs2 0x102B1021103A), +(_ucs2 0x102D1021103A), +(_ucs2 0x102F1021103A), +(_ucs2 0x10311021103A), +(_ucs2 0x1031102C1021103A), +(_ucs2 0x1031102B1021103A), +(_ucs2 0x102D102F1021103A), +('--- Medials'), +(_ucs2 0x105E), +(_ucs2 0x105F), +(_ucs2 0x103B), +(_ucs2 0x103C), +(_ucs2 0x1060), +(_ucs2 0x103D), +(_ucs2 0x1082), +(_ucs2 0x103E), +(_ucs2 0x103B103D), +(_ucs2 0x103C103D), +(_ucs2 0x103B103E), +(_ucs2 0x103C103E), +(_ucs2 0x103D103E), +(_ucs2 0x103B103D103E), +(_ucs2 0x103C103D103E), +('--- Independent vowels'), +(_ucs2 0x1021102D), +(_ucs2 0x1023), +(_ucs2 0x1021102E), +(_ucs2 0x1024), +(_ucs2 0x1021102F), +(_ucs2 0x1025), +(_ucs2 0x10211030), +(_ucs2 0x1026), +(_ucs2 0x10211031), +(_ucs2 0x1027), +(_ucs2 0x1028), +(_ucs2 0x10211031102C), +(_ucs2 0x1029), +(_ucs2 0x10211031102C103A), +(_ucs2 0x102A), +(_ucs2 0x102D1019103A), +(_ucs2 0x102D1036), +(_ucs2 0x102D1019103A1037), +(_ucs2 0x102D10361037), +(_ucs2 0x102D1019103A1038), +(_ucs2 0x102D10361038), +(_ucs2 0x102F1019103A), +(_ucs2 0x102F1036), +(_ucs2 0x102F1019103A1037), +(_ucs2 0x102F10361037), +(_ucs2 0x102F1019103A1038), +(_ucs2 0x102F10361038), +(_ucs2 0x1021102F1036), +(_ucs2 0x1025102F1036), +('--- Independent vowels with finals'), +(_ucs2 0x1021102D10001039), +(_ucs2 0x102310001039), +(_ucs2 0x1021102D1000103A), +(_ucs2 0x10231000103A), +(_ucs2 0x1021102F10001039), +(_ucs2 0x102510001039), +(_ucs2 0x1021102F1000103A), +(_ucs2 0x10251000103A), +(_ucs2 0x1021103110001039), +(_ucs2 0x102710001039), +(_ucs2 0x102110311000103A), +(_ucs2 0x10271000103A), +(_ucs2 0x10211031102C10001039), +(_ucs2 0x102910001039), +(_ucs2 0x10211031102C1000103A), +(_ucs2 0x10291000103A), +(_ucs2 0x10211031102C10001039), +(_ucs2 0x10291031102C10001039), +(_ucs2 0x10211031102C1000103A), +(_ucs2 0x10291031102C1000103A), +(_ucs2 0x1021102D10011039), +(_ucs2 0x102310011039), +(_ucs2 0x1021102D1001103A), +(_ucs2 0x10231001103A), +(_ucs2 0x1021102F10011039), +(_ucs2 0x102510011039), +(_ucs2 0x1021102F1001103A), +(_ucs2 0x10251001103A), +(_ucs2 0x1021103110011039), +(_ucs2 0x102710011039), +(_ucs2 0x102110311001103A), +(_ucs2 0x10271001103A), +(_ucs2 0x10211031102C10011039), +(_ucs2 0x102910011039), +(_ucs2 0x10211031102C1001103A), +(_ucs2 0x10291001103A), +(_ucs2 0x10211031102C10011039), +(_ucs2 0x10291031102C10011039), +(_ucs2 0x10211031102C1001103A), +(_ucs2 0x10291031102C1001103A), +(_ucs2 0x1021102D10021039), +(_ucs2 0x102310021039), +(_ucs2 0x1021102D1002103A), +(_ucs2 0x10231002103A), +(_ucs2 0x1021102F10021039), +(_ucs2 0x102510021039), +(_ucs2 0x1021102F1002103A), +(_ucs2 0x10251002103A), +(_ucs2 0x1021103110021039), +(_ucs2 0x102710021039), +(_ucs2 0x102110311002103A), +(_ucs2 0x10271002103A), +(_ucs2 0x10211031102C10021039), +(_ucs2 0x102910021039), +(_ucs2 0x10211031102C1002103A), +(_ucs2 0x10291002103A), +(_ucs2 0x10211031102C10021039), +(_ucs2 0x10291031102C10021039), +(_ucs2 0x10211031102C1002103A), +(_ucs2 0x10291031102C1002103A), +(_ucs2 0x1021102D10031039), +(_ucs2 0x102310031039), +(_ucs2 0x1021102D1003103A), +(_ucs2 0x10231003103A), +(_ucs2 0x1021102F10031039), +(_ucs2 0x102510031039), +(_ucs2 0x1021102F1003103A), +(_ucs2 0x10251003103A), +(_ucs2 0x1021103110031039), +(_ucs2 0x102710031039), +(_ucs2 0x102110311003103A), +(_ucs2 0x10271003103A), +(_ucs2 0x10211031102C10031039), +(_ucs2 0x102910031039), +(_ucs2 0x10211031102C1003103A), +(_ucs2 0x10291003103A), +(_ucs2 0x10211031102C10031039), +(_ucs2 0x10291031102C10031039), +(_ucs2 0x10211031102C1003103A), +(_ucs2 0x10291031102C1003103A), +(_ucs2 0x1021102D10041039), +(_ucs2 0x102310041039), +(_ucs2 0x1021102D1004103A), +(_ucs2 0x10231004103A), +(_ucs2 0x1021102F10041039), +(_ucs2 0x102510041039), +(_ucs2 0x1021102F1004103A), +(_ucs2 0x10251004103A), +(_ucs2 0x1021103110041039), +(_ucs2 0x102710041039), +(_ucs2 0x102110311004103A), +(_ucs2 0x10271004103A), +(_ucs2 0x10211031102C10041039), +(_ucs2 0x102910041039), +(_ucs2 0x10211031102C1004103A), +(_ucs2 0x10291004103A), +(_ucs2 0x10211031102C10041039), +(_ucs2 0x10291031102C10041039), +(_ucs2 0x10211031102C1004103A), +(_ucs2 0x10291031102C1004103A), +(_ucs2 0x1021102D10051039), +(_ucs2 0x102310051039), +(_ucs2 0x1021102D1005103A), +(_ucs2 0x10231005103A), +(_ucs2 0x1021102F10051039), +(_ucs2 0x102510051039), +(_ucs2 0x1021102F1005103A), +(_ucs2 0x10251005103A), +(_ucs2 0x1021103110051039), +(_ucs2 0x102710051039), +(_ucs2 0x102110311005103A), +(_ucs2 0x10271005103A), +(_ucs2 0x10211031102C10051039), +(_ucs2 0x102910051039), +(_ucs2 0x10211031102C1005103A), +(_ucs2 0x10291005103A), +(_ucs2 0x10211031102C10051039), +(_ucs2 0x10291031102C10051039), +(_ucs2 0x10211031102C1005103A), +(_ucs2 0x10291031102C1005103A), +(_ucs2 0x1021102D10061039), +(_ucs2 0x102310061039), +(_ucs2 0x1021102D1006103A), +(_ucs2 0x10231006103A), +(_ucs2 0x1021102F10061039), +(_ucs2 0x102510061039), +(_ucs2 0x1021102F1006103A), +(_ucs2 0x10251006103A), +(_ucs2 0x1021103110061039), +(_ucs2 0x102710061039), +(_ucs2 0x102110311006103A), +(_ucs2 0x10271006103A), +(_ucs2 0x10211031102C10061039), +(_ucs2 0x102910061039), +(_ucs2 0x10211031102C1006103A), +(_ucs2 0x10291006103A), +(_ucs2 0x10211031102C10061039), +(_ucs2 0x10291031102C10061039), +(_ucs2 0x10211031102C1006103A), +(_ucs2 0x10291031102C1006103A), +(_ucs2 0x1021102D10071039), +(_ucs2 0x102310071039), +(_ucs2 0x1021102D1007103A), +(_ucs2 0x10231007103A), +(_ucs2 0x1021102F10071039), +(_ucs2 0x102510071039), +(_ucs2 0x1021102F1007103A), +(_ucs2 0x10251007103A), +(_ucs2 0x1021103110071039), +(_ucs2 0x102710071039), +(_ucs2 0x102110311007103A), +(_ucs2 0x10271007103A), +(_ucs2 0x10211031102C10071039), +(_ucs2 0x102910071039), +(_ucs2 0x10211031102C1007103A), +(_ucs2 0x10291007103A), +(_ucs2 0x10211031102C10071039), +(_ucs2 0x10291031102C10071039), +(_ucs2 0x10211031102C1007103A), +(_ucs2 0x10291031102C1007103A), +(_ucs2 0x1021102D10091039), +(_ucs2 0x102310091039), +(_ucs2 0x1021102D1009103A), +(_ucs2 0x10231009103A), +(_ucs2 0x1021102F10091039), +(_ucs2 0x102510091039), +(_ucs2 0x1021102F1009103A), +(_ucs2 0x10251009103A), +(_ucs2 0x1021103110091039), +(_ucs2 0x102710091039), +(_ucs2 0x102110311009103A), +(_ucs2 0x10271009103A), +(_ucs2 0x10211031102C10091039), +(_ucs2 0x102910091039), +(_ucs2 0x10211031102C1009103A), +(_ucs2 0x10291009103A), +(_ucs2 0x10211031102C10091039), +(_ucs2 0x10291031102C10091039), +(_ucs2 0x10211031102C1009103A), +(_ucs2 0x10291031102C1009103A), +(_ucs2 0x1021102D100A1039), +(_ucs2 0x1023100A1039), +(_ucs2 0x1021102D100A103A), +(_ucs2 0x1023100A103A), +(_ucs2 0x1021102F100A1039), +(_ucs2 0x1025100A1039), +(_ucs2 0x1021102F100A103A), +(_ucs2 0x1025100A103A), +(_ucs2 0x10211031100A1039), +(_ucs2 0x1027100A1039), +(_ucs2 0x10211031100A103A), +(_ucs2 0x1027100A103A), +(_ucs2 0x10211031102C100A1039), +(_ucs2 0x1029100A1039), +(_ucs2 0x10211031102C100A103A), +(_ucs2 0x1029100A103A), +(_ucs2 0x10211031102C100A1039), +(_ucs2 0x10291031102C100A1039), +(_ucs2 0x10211031102C100A103A), +(_ucs2 0x10291031102C100A103A), +(_ucs2 0x1021102D100B1039), +(_ucs2 0x1023100B1039), +(_ucs2 0x1021102D100B103A), +(_ucs2 0x1023100B103A), +(_ucs2 0x1021102F100B1039), +(_ucs2 0x1025100B1039), +(_ucs2 0x1021102F100B103A), +(_ucs2 0x1025100B103A), +(_ucs2 0x10211031100B1039), +(_ucs2 0x1027100B1039), +(_ucs2 0x10211031100B103A), +(_ucs2 0x1027100B103A), +(_ucs2 0x10211031102C100B1039), +(_ucs2 0x1029100B1039), +(_ucs2 0x10211031102C100B103A), +(_ucs2 0x1029100B103A), +(_ucs2 0x10211031102C100B1039), +(_ucs2 0x10291031102C100B1039), +(_ucs2 0x10211031102C100B103A), +(_ucs2 0x10291031102C100B103A), +(_ucs2 0x1021102D100C1039), +(_ucs2 0x1023100C1039), +(_ucs2 0x1021102D100C103A), +(_ucs2 0x1023100C103A), +(_ucs2 0x1021102F100C1039), +(_ucs2 0x1025100C1039), +(_ucs2 0x1021102F100C103A), +(_ucs2 0x1025100C103A), +(_ucs2 0x10211031100C1039), +(_ucs2 0x1027100C1039), +(_ucs2 0x10211031100C103A), +(_ucs2 0x1027100C103A), +(_ucs2 0x10211031102C100C1039), +(_ucs2 0x1029100C1039), +(_ucs2 0x10211031102C100C103A), +(_ucs2 0x1029100C103A), +(_ucs2 0x10211031102C100C1039), +(_ucs2 0x10291031102C100C1039), +(_ucs2 0x10211031102C100C103A), +(_ucs2 0x10291031102C100C103A), +(_ucs2 0x1021102D100D1039), +(_ucs2 0x1023100D1039), +(_ucs2 0x1021102D100D103A), +(_ucs2 0x1023100D103A), +(_ucs2 0x1021102F100D1039), +(_ucs2 0x1025100D1039), +(_ucs2 0x1021102F100D103A), +(_ucs2 0x1025100D103A), +(_ucs2 0x10211031100D1039), +(_ucs2 0x1027100D1039), +(_ucs2 0x10211031100D103A), +(_ucs2 0x1027100D103A), +(_ucs2 0x10211031102C100D1039), +(_ucs2 0x1029100D1039), +(_ucs2 0x10211031102C100D103A), +(_ucs2 0x1029100D103A), +(_ucs2 0x10211031102C100D1039), +(_ucs2 0x10291031102C100D1039), +(_ucs2 0x10211031102C100D103A), +(_ucs2 0x10291031102C100D103A), +(_ucs2 0x1021102D100E1039), +(_ucs2 0x1023100E1039), +(_ucs2 0x1021102D100E103A), +(_ucs2 0x1023100E103A), +(_ucs2 0x1021102F100E1039), +(_ucs2 0x1025100E1039), +(_ucs2 0x1021102F100E103A), +(_ucs2 0x1025100E103A), +(_ucs2 0x10211031100E1039), +(_ucs2 0x1027100E1039), +(_ucs2 0x10211031100E103A), +(_ucs2 0x1027100E103A), +(_ucs2 0x10211031102C100E1039), +(_ucs2 0x1029100E1039), +(_ucs2 0x10211031102C100E103A), +(_ucs2 0x1029100E103A), +(_ucs2 0x10211031102C100E1039), +(_ucs2 0x10291031102C100E1039), +(_ucs2 0x10211031102C100E103A), +(_ucs2 0x10291031102C100E103A), +(_ucs2 0x1021102D100F1039), +(_ucs2 0x1023100F1039), +(_ucs2 0x1021102D100F103A), +(_ucs2 0x1023100F103A), +(_ucs2 0x1021102F100F1039), +(_ucs2 0x1025100F1039), +(_ucs2 0x1021102F100F103A), +(_ucs2 0x1025100F103A), +(_ucs2 0x10211031100F1039), +(_ucs2 0x1027100F1039), +(_ucs2 0x10211031100F103A), +(_ucs2 0x1027100F103A), +(_ucs2 0x10211031102C100F1039), +(_ucs2 0x1029100F1039), +(_ucs2 0x10211031102C100F103A), +(_ucs2 0x1029100F103A), +(_ucs2 0x10211031102C100F1039), +(_ucs2 0x10291031102C100F1039), +(_ucs2 0x10211031102C100F103A), +(_ucs2 0x10291031102C100F103A), +(_ucs2 0x1021102D10101039), +(_ucs2 0x102310101039), +(_ucs2 0x1021102D1010103A), +(_ucs2 0x10231010103A), +(_ucs2 0x1021102F10101039), +(_ucs2 0x102510101039), +(_ucs2 0x1021102F1010103A), +(_ucs2 0x10251010103A), +(_ucs2 0x1021103110101039), +(_ucs2 0x102710101039), +(_ucs2 0x102110311010103A), +(_ucs2 0x10271010103A), +(_ucs2 0x10211031102C10101039), +(_ucs2 0x102910101039), +(_ucs2 0x10211031102C1010103A), +(_ucs2 0x10291010103A), +(_ucs2 0x10211031102C10101039), +(_ucs2 0x10291031102C10101039), +(_ucs2 0x10211031102C1010103A), +(_ucs2 0x10291031102C1010103A), +(_ucs2 0x1021102D10111039), +(_ucs2 0x102310111039), +(_ucs2 0x1021102D1011103A), +(_ucs2 0x10231011103A), +(_ucs2 0x1021102F10111039), +(_ucs2 0x102510111039), +(_ucs2 0x1021102F1011103A), +(_ucs2 0x10251011103A), +(_ucs2 0x1021103110111039), +(_ucs2 0x102710111039), +(_ucs2 0x102110311011103A), +(_ucs2 0x10271011103A), +(_ucs2 0x10211031102C10111039), +(_ucs2 0x102910111039), +(_ucs2 0x10211031102C1011103A), +(_ucs2 0x10291011103A), +(_ucs2 0x10211031102C10111039), +(_ucs2 0x10291031102C10111039), +(_ucs2 0x10211031102C1011103A), +(_ucs2 0x10291031102C1011103A), +(_ucs2 0x1021102D10121039), +(_ucs2 0x102310121039), +(_ucs2 0x1021102D1012103A), +(_ucs2 0x10231012103A), +(_ucs2 0x1021102F10121039), +(_ucs2 0x102510121039), +(_ucs2 0x1021102F1012103A), +(_ucs2 0x10251012103A), +(_ucs2 0x1021103110121039), +(_ucs2 0x102710121039), +(_ucs2 0x102110311012103A), +(_ucs2 0x10271012103A), +(_ucs2 0x10211031102C10121039), +(_ucs2 0x102910121039), +(_ucs2 0x10211031102C1012103A), +(_ucs2 0x10291012103A), +(_ucs2 0x10211031102C10121039), +(_ucs2 0x10291031102C10121039), +(_ucs2 0x10211031102C1012103A), +(_ucs2 0x10291031102C1012103A), +(_ucs2 0x1021102D10131039), +(_ucs2 0x102310131039), +(_ucs2 0x1021102D1013103A), +(_ucs2 0x10231013103A), +(_ucs2 0x1021102F10131039), +(_ucs2 0x102510131039), +(_ucs2 0x1021102F1013103A), +(_ucs2 0x10251013103A), +(_ucs2 0x1021103110131039), +(_ucs2 0x102710131039), +(_ucs2 0x102110311013103A), +(_ucs2 0x10271013103A), +(_ucs2 0x10211031102C10131039), +(_ucs2 0x102910131039), +(_ucs2 0x10211031102C1013103A), +(_ucs2 0x10291013103A), +(_ucs2 0x10211031102C10131039), +(_ucs2 0x10291031102C10131039), +(_ucs2 0x10211031102C1013103A), +(_ucs2 0x10291031102C1013103A), +(_ucs2 0x1021102D10141039), +(_ucs2 0x102310141039), +(_ucs2 0x1021102D1014103A), +(_ucs2 0x10231014103A), +(_ucs2 0x1021102F10141039), +(_ucs2 0x102510141039), +(_ucs2 0x1021102F1014103A), +(_ucs2 0x10251014103A), +(_ucs2 0x1021103110141039), +(_ucs2 0x102710141039), +(_ucs2 0x102110311014103A), +(_ucs2 0x10271014103A), +(_ucs2 0x10211031102C10141039), +(_ucs2 0x102910141039), +(_ucs2 0x10211031102C1014103A), +(_ucs2 0x10291014103A), +(_ucs2 0x10211031102C10141039), +(_ucs2 0x10291031102C10141039), +(_ucs2 0x10211031102C1014103A), +(_ucs2 0x10291031102C1014103A), +(_ucs2 0x1021102D10151039), +(_ucs2 0x102310151039), +(_ucs2 0x1021102D1015103A), +(_ucs2 0x10231015103A), +(_ucs2 0x1021102F10151039), +(_ucs2 0x102510151039), +(_ucs2 0x1021102F1015103A), +(_ucs2 0x10251015103A), +(_ucs2 0x1021103110151039), +(_ucs2 0x102710151039), +(_ucs2 0x102110311015103A), +(_ucs2 0x10271015103A), +(_ucs2 0x10211031102C10151039), +(_ucs2 0x102910151039), +(_ucs2 0x10211031102C1015103A), +(_ucs2 0x10291015103A), +(_ucs2 0x10211031102C10151039), +(_ucs2 0x10291031102C10151039), +(_ucs2 0x10211031102C1015103A), +(_ucs2 0x10291031102C1015103A), +(_ucs2 0x1021102D10161039), +(_ucs2 0x102310161039), +(_ucs2 0x1021102D1016103A), +(_ucs2 0x10231016103A), +(_ucs2 0x1021102F10161039), +(_ucs2 0x102510161039), +(_ucs2 0x1021102F1016103A), +(_ucs2 0x10251016103A), +(_ucs2 0x1021103110161039), +(_ucs2 0x102710161039), +(_ucs2 0x102110311016103A), +(_ucs2 0x10271016103A), +(_ucs2 0x10211031102C10161039), +(_ucs2 0x102910161039), +(_ucs2 0x10211031102C1016103A), +(_ucs2 0x10291016103A), +(_ucs2 0x10211031102C10161039), +(_ucs2 0x10291031102C10161039), +(_ucs2 0x10211031102C1016103A), +(_ucs2 0x10291031102C1016103A), +(_ucs2 0x1021102D10171039), +(_ucs2 0x102310171039), +(_ucs2 0x1021102D1017103A), +(_ucs2 0x10231017103A), +(_ucs2 0x1021102F10171039), +(_ucs2 0x102510171039), +(_ucs2 0x1021102F1017103A), +(_ucs2 0x10251017103A), +(_ucs2 0x1021103110171039), +(_ucs2 0x102710171039), +(_ucs2 0x102110311017103A), +(_ucs2 0x10271017103A), +(_ucs2 0x10211031102C10171039), +(_ucs2 0x102910171039), +(_ucs2 0x10211031102C1017103A), +(_ucs2 0x10291017103A), +(_ucs2 0x10211031102C10171039), +(_ucs2 0x10291031102C10171039), +(_ucs2 0x10211031102C1017103A), +(_ucs2 0x10291031102C1017103A), +(_ucs2 0x1021102D10181039), +(_ucs2 0x102310181039), +(_ucs2 0x1021102D1018103A), +(_ucs2 0x10231018103A), +(_ucs2 0x1021102F10181039), +(_ucs2 0x102510181039), +(_ucs2 0x1021102F1018103A), +(_ucs2 0x10251018103A), +(_ucs2 0x1021103110181039), +(_ucs2 0x102710181039), +(_ucs2 0x102110311018103A), +(_ucs2 0x10271018103A), +(_ucs2 0x10211031102C10181039), +(_ucs2 0x102910181039), +(_ucs2 0x10211031102C1018103A), +(_ucs2 0x10291018103A), +(_ucs2 0x10211031102C10181039), +(_ucs2 0x10291031102C10181039), +(_ucs2 0x10211031102C1018103A), +(_ucs2 0x10291031102C1018103A), +(_ucs2 0x1021102D10191039), +(_ucs2 0x102310191039), +(_ucs2 0x1021102D1019103A), +(_ucs2 0x10231019103A), +(_ucs2 0x1021102F10191039), +(_ucs2 0x102510191039), +(_ucs2 0x1021102F1019103A), +(_ucs2 0x10251019103A), +(_ucs2 0x1021103110191039), +(_ucs2 0x102710191039), +(_ucs2 0x102110311019103A), +(_ucs2 0x10271019103A), +(_ucs2 0x10211031102C10191039), +(_ucs2 0x102910191039), +(_ucs2 0x10211031102C1019103A), +(_ucs2 0x10291019103A), +(_ucs2 0x10211031102C10191039), +(_ucs2 0x10291031102C10191039), +(_ucs2 0x10211031102C1019103A), +(_ucs2 0x10291031102C1019103A), +(_ucs2 0x1021102D101A1039), +(_ucs2 0x1023101A1039), +(_ucs2 0x1021102D101A103A), +(_ucs2 0x1023101A103A), +(_ucs2 0x1021102F101A1039), +(_ucs2 0x1025101A1039), +(_ucs2 0x1021102F101A103A), +(_ucs2 0x1025101A103A), +(_ucs2 0x10211031101A1039), +(_ucs2 0x1027101A1039), +(_ucs2 0x10211031101A103A), +(_ucs2 0x1027101A103A), +(_ucs2 0x10211031102C101A1039), +(_ucs2 0x1029101A1039), +(_ucs2 0x10211031102C101A103A), +(_ucs2 0x1029101A103A), +(_ucs2 0x10211031102C101A1039), +(_ucs2 0x10291031102C101A1039), +(_ucs2 0x10211031102C101A103A), +(_ucs2 0x10291031102C101A103A), +(_ucs2 0x1021102D101B1039), +(_ucs2 0x1023101B1039), +(_ucs2 0x1021102D101B103A), +(_ucs2 0x1023101B103A), +(_ucs2 0x1021102F101B1039), +(_ucs2 0x1025101B1039), +(_ucs2 0x1021102F101B103A), +(_ucs2 0x1025101B103A), +(_ucs2 0x10211031101B1039), +(_ucs2 0x1027101B1039), +(_ucs2 0x10211031101B103A), +(_ucs2 0x1027101B103A), +(_ucs2 0x10211031102C101B1039), +(_ucs2 0x1029101B1039), +(_ucs2 0x10211031102C101B103A), +(_ucs2 0x1029101B103A), +(_ucs2 0x10211031102C101B1039), +(_ucs2 0x10291031102C101B1039), +(_ucs2 0x10211031102C101B103A), +(_ucs2 0x10291031102C101B103A), +(_ucs2 0x1021102D101C1039), +(_ucs2 0x1023101C1039), +(_ucs2 0x1021102D101C103A), +(_ucs2 0x1023101C103A), +(_ucs2 0x1021102F101C1039), +(_ucs2 0x1025101C1039), +(_ucs2 0x1021102F101C103A), +(_ucs2 0x1025101C103A), +(_ucs2 0x10211031101C1039), +(_ucs2 0x1027101C1039), +(_ucs2 0x10211031101C103A), +(_ucs2 0x1027101C103A), +(_ucs2 0x10211031102C101C1039), +(_ucs2 0x1029101C1039), +(_ucs2 0x10211031102C101C103A), +(_ucs2 0x1029101C103A), +(_ucs2 0x10211031102C101C1039), +(_ucs2 0x10291031102C101C1039), +(_ucs2 0x10211031102C101C103A), +(_ucs2 0x10291031102C101C103A), +(_ucs2 0x1021102D101E1039), +(_ucs2 0x1023101E1039), +(_ucs2 0x1021102D101E103A), +(_ucs2 0x1023101E103A), +(_ucs2 0x1021102F101E1039), +(_ucs2 0x1025101E1039), +(_ucs2 0x1021102F101E103A), +(_ucs2 0x1025101E103A), +(_ucs2 0x10211031101E1039), +(_ucs2 0x1027101E1039), +(_ucs2 0x10211031101E103A), +(_ucs2 0x1027101E103A), +(_ucs2 0x10211031102C101E1039), +(_ucs2 0x1029101E1039), +(_ucs2 0x10211031102C101E103A), +(_ucs2 0x1029101E103A), +(_ucs2 0x10211031102C101E1039), +(_ucs2 0x10291031102C101E1039), +(_ucs2 0x10211031102C101E103A), +(_ucs2 0x10291031102C101E103A), +(_ucs2 0x1021102D101F1039), +(_ucs2 0x1023101F1039), +(_ucs2 0x1021102D101F103A), +(_ucs2 0x1023101F103A), +(_ucs2 0x1021102F101F1039), +(_ucs2 0x1025101F1039), +(_ucs2 0x1021102F101F103A), +(_ucs2 0x1025101F103A), +(_ucs2 0x10211031101F1039), +(_ucs2 0x1027101F1039), +(_ucs2 0x10211031101F103A), +(_ucs2 0x1027101F103A), +(_ucs2 0x10211031102C101F1039), +(_ucs2 0x1029101F1039), +(_ucs2 0x10211031102C101F103A), +(_ucs2 0x1029101F103A), +(_ucs2 0x10211031102C101F1039), +(_ucs2 0x10291031102C101F1039), +(_ucs2 0x10211031102C101F103A), +(_ucs2 0x10291031102C101F103A), +('--- Contractions'), +(_ucs2 0x1031102C1000103A1000103B), +(_ucs2 0x1031102C1000103A103B /* (suffix of) man */), +(_ucs2 0x1014103A1014102F1015103A), +(_ucs2 0x1014103A102F1015103A /* (suffix of) I */), +('--- Great Sa'), +(_ucs2 0x1031101E1039101E), +(_ucs2 0x1031103F), +(_ucs2 0x102D101E1039101E), +(_ucs2 0x102D103F), +(_ucs2 0x102F101E1039101E), +(_ucs2 0x102F103F), +(_ucs2 0x1021102D101E1039101E), +(_ucs2 0x1023103F), +(_ucs2 0x1021102F101E1039101E), +(_ucs2 0x1025103F), +(_ucs2 0x101E1039101E), +(_ucs2 0x103F), +('--- Symbols - collate as long form'), +(_ucs2 0x1014103E102D102F1000103A), +(_ucs2 0x104C), +(_ucs2 0x101B103D10311037), +(_ucs2 0x104D), +(_ucs2 0x101C100A103A103810001031102C1004103A1038), +(_ucs2 0x104E1004103A1038), +(_ucs2 0x1021102D), +(_ucs2 0x104F), +('--- Short Forms may need to be added here'), +(_ucs2 0x101C1000103A101A102C), +(_ucs2 0x101C1000103A103B102C /* right hand side */), +(_ucs2 0x101E1019102E), +(_ucs2 0x101E10391019102E /* daughter */), +(_ucs2 0x101110191004103A1038), +(_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)))) +1 2259 108C +2 22593ACB 1037 +3 22593ACC 1038 +4 22593ACD 10371038 +5 --- Vowels +6 2232 102C +7 2232 102B +8 2246 1032 +9 22463ACB 1031102C +10 22463ACB 1031102B +11 22463ACC 1031102C103A +12 22463ACC 1031102B103A +13 2248 1034 +14 22483ACB 1036 +15 22483ACC 102D102F +16 --- Vowels with finals +17 22483ACD 10001039 +18 22483ACD 1000103A +19 22483ACE 102C10001039 +20 22483ACE 102C1000103A +21 22483ACE 102B10001039 +22 22483ACE 102B1000103A +23 22483ACF 102D10001039 +24 22483ACF 102D1000103A +25 22483AD0 102F10001039 +26 22483AD0 102F1000103A +27 22483AD1 103110001039 +28 22483AD1 10311000103A +29 22483AD2 1031102C10001039 +30 22483AD2 1031102C1000103A +31 22483AD2 1031102B10001039 +32 22483AD2 1031102B1000103A +33 22483AD3 102D102F10001039 +34 22483AD3 102D102F1000103A +35 22483AD4 10011039 +36 22483AD4 1001103A +37 22483AD5 102C10011039 +38 22483AD5 102C1001103A +39 22483AD5 102B10011039 +40 22483AD5 102B1001103A +41 22483AD6 102D10011039 +42 22483AD6 102D1001103A +43 22483AD7 102F10011039 +44 22483AD7 102F1001103A +45 22483AD8 103110011039 +46 22483AD8 10311001103A +47 22483AD9 1031102C10011039 +48 22483AD9 1031102C1001103A +49 22483AD9 1031102B10011039 +50 22483AD9 1031102B1001103A +51 22483ADA 102D102F10011039 +52 22483ADA 102D102F1001103A +53 22483ADB 10021039 +54 22483ADB 1002103A +55 22483ADC 102C10021039 +56 22483ADC 102C1002103A +57 22483ADC 102B10021039 +58 22483ADC 102B1002103A +59 22483ADD 102D10021039 +60 22483ADD 102D1002103A +61 22483ADE 102F10021039 +62 22483ADE 102F1002103A +63 22483ADF 103110021039 +64 22483ADF 10311002103A +65 22483AE0 1031102C10021039 +66 22483AE0 1031102C1002103A +67 22483AE0 1031102B10021039 +68 22483AE0 1031102B1002103A +69 22483AE1 102D102F10021039 +70 22483AE1 102D102F1002103A +71 22483AE2 10031039 +72 22483AE2 1003103A +73 22483AE3 102C10031039 +74 22483AE3 102C1003103A +75 22483AE3 102B10031039 +76 22483AE3 102B1003103A +77 22483AE4 102D10031039 +78 22483AE4 102D1003103A +79 22483AE5 102F10031039 +80 22483AE5 102F1003103A +81 22483AE6 103110031039 +82 22483AE6 10311003103A +83 22483AE7 1031102C10031039 +84 22483AE7 1031102C1003103A +85 22483AE7 1031102B10031039 +86 22483AE7 1031102B1003103A +87 22483AE8 102D102F10031039 +88 22483AE8 102D102F1003103A +89 22483AE9 1004103A1039 +90 22483AE9 1004103A +91 22483AEA 102C1004103A1039 +92 22483AEA 102C1004103A +93 22483AEA 102B1004103A1039 +94 22483AEA 102B1004103A +95 22483AEB 102D1004103A1039 +96 22483AEB 102D1004103A +97 22483AEC 102F1004103A1039 +98 22483AEC 102F1004103A +99 22483AED 10311004103A1039 +100 22483AED 10311004103A +101 22483AEE 1031102C1004103A1039 +102 22483AEE 1031102C1004103A +103 22483AEE 1031102B1004103A1039 +104 22483AEE 1031102B1004103A +105 22483AEF 102D102F1004103A1039 +106 22483AEF 102D102F1004103A +107 22483AF0 10051039 +108 22483AF0 1005103A +109 22483AF1 102C10051039 +110 22483AF1 102C1005103A +111 22483AF1 102B10051039 +112 22483AF1 102B1005103A +113 22483AF2 102D10051039 +114 22483AF2 102D1005103A +115 22483AF3 102F10051039 +116 22483AF3 102F1005103A +117 22483AF4 103110051039 +118 22483AF4 10311005103A +119 22483AF5 1031102C10051039 +120 22483AF5 1031102C1005103A +121 22483AF5 1031102B10051039 +122 22483AF5 1031102B1005103A +123 22483AF6 102D102F10051039 +124 22483AF6 102D102F1005103A +125 22483AF7 10061039 +126 22483AF7 1006103A +127 22483AF8 102C10061039 +128 22483AF8 102C1006103A +129 22483AF8 102B10061039 +130 22483AF8 102B1006103A +131 22483AF9 102D10061039 +132 22483AF9 102D1006103A +133 22483AFA 102F10061039 +134 22483AFA 102F1006103A +135 22483AFB 103110061039 +136 22483AFB 10311006103A +137 22483AFC 1031102C10061039 +138 22483AFC 1031102C1006103A +139 22483AFC 1031102B10061039 +140 22483AFC 1031102B1006103A +141 22483AFD 102D102F10061039 +142 22483AFD 102D102F1006103A +143 22483AFE 10071039 +144 22483AFE 1007103A +145 22483AFF 102C10071039 +146 22483AFF 102C1007103A +147 22483AFF 102B10071039 +148 22483AFF 102B1007103A +149 22483B00 102D10071039 +150 22483B00 102D1007103A +151 22483B01 102F10071039 +152 22483B01 102F1007103A +153 22483B02 103110071039 +154 22483B02 10311007103A +155 22483B03 1031102C10071039 +156 22483B03 1031102C1007103A +157 22483B03 1031102B10071039 +158 22483B03 1031102B1007103A +159 22483B04 102D102F10071039 +160 22483B04 102D102F1007103A +161 22483B05 1008103A +162 22483B06 102C1008103A +163 22483B06 102B1008103A +164 22483B07 102D1008103A +165 22483B08 102F1008103A +166 22483B09 10311008103A +167 22483B0A 1031102C1008103A +168 22483B0A 1031102B1008103A +169 22483B0B 102D102F1008103A +170 22483B0C 10091039 +171 22483B0C 1009103A +172 22483B0D 102C10091039 +173 22483B0D 102C1009103A +174 22483B0D 102B10091039 +175 22483B0D 102B1009103A +176 22483B0E 102D10091039 +177 22483B0E 102D1009103A +178 22483B0F 102F10091039 +179 22483B0F 102F1009103A +180 22483B10 103110091039 +181 22483B10 10311009103A +182 22483B11 1031102C10091039 +183 22483B11 1031102C1009103A +184 22483B11 1031102B10091039 +185 22483B11 1031102B1009103A +186 22483B12 102D102F10091039 +187 22483B12 102D102F1009103A +188 22483B13 100A1039 +189 22483B13 100A103A +190 22483B14 102C100A1039 +191 22483B14 102C100A103A +192 22483B14 102B100A1039 +193 22483B14 102B100A103A +194 22483B15 102D100A1039 +195 22483B15 102D100A103A +196 22483B16 102F100A1039 +197 22483B16 102F100A103A +198 22483B17 1031100A1039 +199 22483B17 1031100A103A +200 22483B18 1031102C100A1039 +201 22483B18 1031102C100A103A +202 22483B18 1031102B100A1039 +203 22483B18 1031102B100A103A +204 22483B19 102D102F100A1039 +205 22483B19 102D102F100A103A +206 22483B1A 100B1039 +207 22483B1A 100B103A +208 22483B1B 102C100B1039 +209 22483B1B 102C100B103A +210 22483B1B 102B100B1039 +211 22483B1B 102B100B103A +212 22483B1C 102D100B1039 +213 22483B1C 102D100B103A +214 22483B1D 102F100B1039 +215 22483B1D 102F100B103A +216 22483B1E 1031100B1039 +217 22483B1E 1031100B103A +218 22483B1F 1031102C100B1039 +219 22483B1F 1031102C100B103A +220 22483B1F 1031102B100B1039 +221 22483B1F 1031102B100B103A +222 22483B20 102D102F100B1039 +223 22483B20 102D102F100B103A +224 22483B21 100C1039 +225 22483B21 100C103A +226 22483B22 102C100C1039 +227 22483B22 102C100C103A +228 22483B22 102B100C1039 +229 22483B22 102B100C103A +230 22483B23 102D100C1039 +231 22483B23 102D100C103A +232 22483B24 102F100C1039 +233 22483B24 102F100C103A +234 22483B25 1031100C1039 +235 22483B25 1031100C103A +236 22483B26 1031102C100C1039 +237 22483B26 1031102C100C103A +238 22483B26 1031102B100C1039 +239 22483B26 1031102B100C103A +240 22483B27 102D102F100C1039 +241 22483B27 102D102F100C103A +242 22483B28 100D1039 +243 22483B28 100D103A +244 22483B29 102C100D1039 +245 22483B29 102C100D103A +246 22483B29 102B100D1039 +247 22483B29 102B100D103A +248 22483B2A 102D100D1039 +249 22483B2A 102D100D103A +250 22483B2B 102F100D1039 +251 22483B2B 102F100D103A +252 22483B2C 1031100D1039 +253 22483B2C 1031100D103A +254 22483B2D 1031102C100D1039 +255 22483B2D 1031102C100D103A +256 22483B2D 1031102B100D1039 +257 22483B2D 1031102B100D103A +258 22483B2E 102D102F100D1039 +259 22483B2E 102D102F100D103A +260 22483B2F 100E1039 +261 22483B2F 100E103A +262 22483B30 102C100E1039 +263 22483B30 102C100E103A +264 22483B30 102B100E1039 +265 22483B30 102B100E103A +266 22483B31 102D100E1039 +267 22483B31 102D100E103A +268 22483B32 102F100E1039 +269 22483B32 102F100E103A +270 22483B33 1031100E1039 +271 22483B33 1031100E103A +272 22483B34 1031102C100E1039 +273 22483B34 1031102C100E103A +274 22483B34 1031102B100E1039 +275 22483B34 1031102B100E103A +276 22483B35 102D102F100E1039 +277 22483B35 102D102F100E103A +278 22483B36 100F1039 +279 22483B36 100F103A +280 22483B37 102C100F1039 +281 22483B37 102C100F103A +282 22483B37 102B100F1039 +283 22483B37 102B100F103A +284 22483B38 102D100F1039 +285 22483B38 102D100F103A +286 22483B39 102F100F1039 +287 22483B39 102F100F103A +288 22483B3A 1031100F1039 +289 22483B3A 1031100F103A +290 22483B3B 1031102C100F1039 +291 22483B3B 1031102C100F103A +292 22483B3B 1031102B100F1039 +293 22483B3B 1031102B100F103A +294 22483B3C 102D102F100F1039 +295 22483B3C 102D102F100F103A +296 22483B3D 10101039 +297 22483B3D 1010103A +298 22483B3E 102C10101039 +299 22483B3E 102C1010103A +300 22483B3E 102B10101039 +301 22483B3E 102B1010103A +302 22483B3F 102D10101039 +303 22483B3F 102D1010103A +304 22483B40 102F10101039 +305 22483B40 102F1010103A +306 22483B41 103110101039 +307 22483B41 10311010103A +308 22483B42 1031102C10101039 +309 22483B42 1031102C1010103A +310 22483B42 1031102B10101039 +311 22483B42 1031102B1010103A +312 22483B43 102D102F10101039 +313 22483B43 102D102F1010103A +314 22483B44 10111039 +315 22483B44 1011103A +316 22483B45 102C10111039 +317 22483B45 102C1011103A +318 22483B45 102B10111039 +319 22483B45 102B1011103A +320 22483B46 102D10111039 +321 22483B46 102D1011103A +322 22483B47 102F10111039 +323 22483B47 102F1011103A +324 22483B48 103110111039 +325 22483B48 10311011103A +326 22483B49 1031102C10111039 +327 22483B49 1031102C1011103A +328 22483B49 1031102B10111039 +329 22483B49 1031102B1011103A +330 22483B4A 102D102F10111039 +331 22483B4A 102D102F1011103A +332 22483B4B 10121039 +333 22483B4B 1012103A +334 22483B4C 102C10121039 +335 22483B4C 102C1012103A +336 22483B4C 102B10121039 +337 22483B4C 102B1012103A +338 22483B4D 102D10121039 +339 22483B4D 102D1012103A +340 22483B4E 102F10121039 +341 22483B4E 102F1012103A +342 22483B4F 103110121039 +343 22483B4F 10311012103A +344 22483B50 1031102C10121039 +345 22483B50 1031102C1012103A +346 22483B50 1031102B10121039 +347 22483B50 1031102B1012103A +348 22483B51 102D102F10121039 +349 22483B51 102D102F1012103A +350 22483B52 10131039 +351 22483B52 1013103A +352 22483B53 102C10131039 +353 22483B53 102C1013103A +354 22483B53 102B10131039 +355 22483B53 102B1013103A +356 22483B54 102D10131039 +357 22483B54 102D1013103A +358 22483B55 102F10131039 +359 22483B55 102F1013103A +360 22483B56 103110131039 +361 22483B56 10311013103A +362 22483B57 1031102C10131039 +363 22483B57 1031102C1013103A +364 22483B57 1031102B10131039 +365 22483B57 1031102B1013103A +366 22483B58 102D102F10131039 +367 22483B58 102D102F1013103A +368 22483B59 10141039 +369 22483B59 1014103A +370 22483B5A 102C10141039 +371 22483B5A 102C1014103A +372 22483B5A 102B10141039 +373 22483B5A 102B1014103A +374 22483B5B 102D10141039 +375 22483B5B 102D1014103A +376 22483B5C 102F10141039 +377 22483B5C 102F1014103A +378 22483B5D 103110141039 +379 22483B5D 10311014103A +380 22483B5E 1031102C10141039 +381 22483B5E 1031102C1014103A +382 22483B5E 1031102B10141039 +383 22483B5E 1031102B1014103A +384 22483B5F 102D102F10141039 +385 22483B5F 102D102F1014103A +386 22483B60 10151039 +387 22483B60 1015103A +388 22483B61 102C10151039 +389 22483B61 102C1015103A +390 22483B61 102B10151039 +391 22483B61 102B1015103A +392 22483B62 102D10151039 +393 22483B62 102D1015103A +394 22483B63 102F10151039 +395 22483B63 102F1015103A +396 22483B64 103110151039 +397 22483B64 10311015103A +398 22483B65 1031102C10151039 +399 22483B65 1031102C1015103A +400 22483B65 1031102B10151039 +401 22483B65 1031102B1015103A +402 22483B66 102D102F10151039 +403 22483B66 102D102F1015103A +404 22483B67 10161039 +405 22483B67 1016103A +406 22483B68 102C10161039 +407 22483B68 102C1016103A +408 22483B68 102B10161039 +409 22483B68 102B1016103A +410 22483B69 102D10161039 +411 22483B69 102D1016103A +412 22483B6A 102F10161039 +413 22483B6A 102F1016103A +414 22483B6B 103110161039 +415 22483B6B 10311016103A +416 22483B6C 1031102C10161039 +417 22483B6C 1031102C1016103A +418 22483B6C 1031102B10161039 +419 22483B6C 1031102B1016103A +420 22483B6D 102D102F10161039 +421 22483B6D 102D102F1016103A +422 22483B6E 10171039 +423 22483B6E 1017103A +424 22483B6F 102C10171039 +425 22483B6F 102C1017103A +426 22483B6F 102B10171039 +427 22483B6F 102B1017103A +428 22483B70 102D10171039 +429 22483B70 102D1017103A +430 22483B71 102F10171039 +431 22483B71 102F1017103A +432 22483B72 103110171039 +433 22483B72 10311017103A +434 22483B73 1031102C10171039 +435 22483B73 1031102C1017103A +436 22483B73 1031102B10171039 +437 22483B73 1031102B1017103A +438 22483B74 102D102F10171039 +439 22483B74 102D102F1017103A +440 22483B75 10181039 +441 22483B75 1018103A +442 22483B76 102C10181039 +443 22483B76 102C1018103A +444 22483B76 102B10181039 +445 22483B76 102B1018103A +446 22483B77 102D10181039 +447 22483B77 102D1018103A +448 22483B78 102F10181039 +449 22483B78 102F1018103A +450 22483B79 103110181039 +451 22483B79 10311018103A +452 22483B7A 1031102C10181039 +453 22483B7A 1031102C1018103A +454 22483B7A 1031102B10181039 +455 22483B7A 1031102B1018103A +456 22483B7B 102D102F10181039 +457 22483B7B 102D102F1018103A +458 22483B7C 10191039 +459 22483B7C 1019103A +460 22483B7D 102C10191039 +461 22483B7D 102C1019103A +462 22483B7D 102B10191039 +463 22483B7D 102B1019103A +464 22483B7E 102D10191039 +465 22483B7E 102D1019103A +466 22483B7F 102F10191039 +467 22483B7F 102F1019103A +468 22483B80 103110191039 +469 22483B80 10311019103A +470 22483B81 1031102C10191039 +471 22483B81 1031102C1019103A +472 22483B81 1031102B10191039 +473 22483B81 1031102B1019103A +474 22483B82 102D102F10191039 +475 22483B82 102D102F1019103A +476 22483B83 101A1039 +477 22483B83 101A103A +478 22483B84 102C101A1039 +479 22483B84 102C101A103A +480 22483B84 102B101A1039 +481 22483B84 102B101A103A +482 22483B85 102D101A1039 +483 22483B85 102D101A103A +484 22483B86 102F101A1039 +485 22483B86 102F101A103A +486 22483B87 1031101A1039 +487 22483B87 1031101A103A +488 22483B88 1031102C101A1039 +489 22483B88 1031102C101A103A +490 22483B88 1031102B101A1039 +491 22483B88 1031102B101A103A +492 22483B89 102D102F101A1039 +493 22483B89 102D102F101A103A +494 22483B8A 101B1039 +495 22483B8A 101B103A +496 22483B8B 102C101B1039 +497 22483B8B 102C101B103A +498 22483B8B 102B101B1039 +499 22483B8B 102B101B103A +500 22483B8C 102D101B1039 +501 22483B8C 102D101B103A +502 22483B8D 102F101B1039 +503 22483B8D 102F101B103A +504 22483B8E 1031101B1039 +505 22483B8E 1031101B103A +506 22483B8F 1031102C101B1039 +507 22483B8F 1031102C101B103A +508 22483B8F 1031102B101B1039 +509 22483B8F 1031102B101B103A +510 22483B90 102D102F101B1039 +511 22483B90 102D102F101B103A +512 22483B91 101C1039 +513 22483B91 101C103A +514 22483B92 102C101C1039 +515 22483B92 102C101C103A +516 22483B92 102B101C1039 +517 22483B92 102B101C103A +518 22483B93 102D101C1039 +519 22483B93 102D101C103A +520 22483B94 102F101C1039 +521 22483B94 102F101C103A +522 22483B95 1031101C1039 +523 22483B95 1031101C103A +524 22483B96 1031102C101C1039 +525 22483B96 1031102C101C103A +526 22483B96 1031102B101C1039 +527 22483B96 1031102B101C103A +528 22483B97 102D102F101C1039 +529 22483B97 102D102F101C103A +530 22483B98 101D103A +531 22483B99 102C101D103A +532 22483B99 102B101D103A +533 22483B9A 102D101D103A +534 22483B9B 102F101D103A +535 22483B9C 1031101D103A +536 22483B9D 1031102C101D103A +537 22483B9D 1031102B101D103A +538 22483B9E 102D102F101D103A +539 22483B9F 101E1039 +540 22483B9F 101E103A +541 22483BA0 102C101E1039 +542 22483BA0 102C101E103A +543 22483BA0 102B101E1039 +544 22483BA0 102B101E103A +545 22483BA1 102D101E1039 +546 22483BA1 102D101E103A +547 22483BA2 102F101E1039 +548 22483BA2 102F101E103A +549 22483BA3 1031101E1039 +550 22483BA3 1031101E103A +551 22483BA4 1031102C101E1039 +552 22483BA4 1031102C101E103A +553 22483BA4 1031102B101E1039 +554 22483BA4 1031102B101E103A +555 22483BA5 102D102F101E1039 +556 22483BA5 102D102F101E103A +557 22483BA6 101F1039 +558 22483BA6 101F103A +559 22483BA7 102C101F1039 +560 22483BA7 102C101F103A +561 22483BA7 102B101F1039 +562 22483BA7 102B101F103A +563 22483BA8 102D101F1039 +564 22483BA8 102D101F103A +565 22483BA9 102F101F1039 +566 22483BA9 102F101F103A +567 22483BAA 1031101F1039 +568 22483BAA 1031101F103A +569 22483BAB 1031102C101F1039 +570 22483BAB 1031102C101F103A +571 22483BAB 1031102B101F1039 +572 22483BAB 1031102B101F103A +573 22483BAC 102D102F101F1039 +574 22483BAC 102D102F101F103A +575 22483BAD 1020103A +576 22483BAE 102C1020103A +577 22483BAE 102B1020103A +578 22483BAF 102D1020103A +579 22483BB0 102F1020103A +580 22483BB1 10311020103A +581 22483BB2 1031102C1020103A +582 22483BB2 1031102B1020103A +583 22483BB3 102D102F1020103A +584 22483BB4 1021103A +585 22483BB5 102C1021103A +586 22483BB5 102B1021103A +587 22483BB6 102D1021103A +588 22483BB7 102F1021103A +589 22483BB8 10311021103A +590 22483BB9 1031102C1021103A +591 22483BB9 1031102B1021103A +592 22483BBA 102D102F1021103A +593 --- Medials +594 22483BBB 105E +595 22483BBC 105F +596 22483BBD 103B +597 22483BBE 103C +598 22483BBF 1060 +599 22483BC0 103D +600 22483BC1 1082 +601 22483BC2 103E +602 22483BC3 103B103D +603 22483BC4 103C103D +604 22483BC5 103B103E +605 22483BC6 103C103E +606 22483BC7 103D103E +607 22483BC8 103B103D103E +608 22483BC9 103C103D103E +609 --- Independent vowels +610 22242236 1021102D +611 22242236 1023 +612 22242238 1021102E +613 22242238 1024 +614 2224223A 1021102F +615 2224223A 1025 +616 2224223D 10211030 +617 2224223D 1026 +618 22242242 10211031 +619 22242242 1027 +620 22242242 1028 +621 222422463ACB 10211031102C +622 222422463ACB 1029 +623 222422463ACC 10211031102C103A +624 222422463ACC 102A +625 22483B7E 102D1019103A +626 22483B7E3ACB 102D1036 +627 22483B7E3ACC 102D1019103A1037 +628 22483B7E3ACD 102D10361037 +629 22483B7E3ACE 102D1019103A1038 +630 22483B7E3ACF 102D10361038 +631 22483B7F 102F1019103A +632 22483B7F3ACB 102F1036 +633 22483B7F3ACC 102F1019103A1037 +634 22483B7F3ACD 102F10361037 +635 22483B7F3ACE 102F1019103A1038 +636 22483B7F3ACF 102F10361038 +637 222422483B7F3ACB 1021102F1036 +638 222422483B7F3ACB 1025102F1036 +639 --- Independent vowels with finals +640 222422483ACF 1021102D10001039 +641 222422483ACF 102310001039 +642 222422483ACF 1021102D1000103A +643 222422483ACF 10231000103A +644 222422483AD0 1021102F10001039 +645 222422483AD0 102510001039 +646 222422483AD0 1021102F1000103A +647 222422483AD0 10251000103A +648 222422483AD1 1021103110001039 +649 222422483AD1 102710001039 +650 222422483AD1 102110311000103A +651 222422483AD1 10271000103A +652 222422483AD2 10211031102C10001039 +653 222422483AD2 102910001039 +654 222422483AD2 10211031102C1000103A +655 222422483AD2 10291000103A +656 222422483AD2 10211031102C10001039 +657 222422483AD2 10291031102C10001039 +658 222422483AD2 10211031102C1000103A +659 222422483AD2 10291031102C1000103A +660 222422483AD6 1021102D10011039 +661 222422483AD6 102310011039 +662 222422483AD6 1021102D1001103A +663 222422483AD6 10231001103A +664 222422483AD7 1021102F10011039 +665 222422483AD7 102510011039 +666 222422483AD7 1021102F1001103A +667 222422483AD7 10251001103A +668 222422483AD8 1021103110011039 +669 222422483AD8 102710011039 +670 222422483AD8 102110311001103A +671 222422483AD8 10271001103A +672 222422483AD9 10211031102C10011039 +673 222422483AD9 102910011039 +674 222422483AD9 10211031102C1001103A +675 222422483AD9 10291001103A +676 222422483AD9 10211031102C10011039 +677 222422483AD9 10291031102C10011039 +678 222422483AD9 10211031102C1001103A +679 222422483AD9 10291031102C1001103A +680 222422483ADD 1021102D10021039 +681 222422483ADD 102310021039 +682 222422483ADD 1021102D1002103A +683 222422483ADD 10231002103A +684 222422483ADE 1021102F10021039 +685 222422483ADE 102510021039 +686 222422483ADE 1021102F1002103A +687 222422483ADE 10251002103A +688 222422483ADF 1021103110021039 +689 222422483ADF 102710021039 +690 222422483ADF 102110311002103A +691 222422483ADF 10271002103A +692 222422483AE0 10211031102C10021039 +693 222422483AE0 102910021039 +694 222422483AE0 10211031102C1002103A +695 222422483AE0 10291002103A +696 222422483AE0 10211031102C10021039 +697 222422483AE0 10291031102C10021039 +698 222422483AE0 10211031102C1002103A +699 222422483AE0 10291031102C1002103A +700 222422483AE4 1021102D10031039 +701 222422483AE4 102310031039 +702 222422483AE4 1021102D1003103A +703 222422483AE4 10231003103A +704 222422483AE5 1021102F10031039 +705 222422483AE5 102510031039 +706 222422483AE5 1021102F1003103A +707 222422483AE5 10251003103A +708 222422483AE6 1021103110031039 +709 222422483AE6 102710031039 +710 222422483AE6 102110311003103A +711 222422483AE6 10271003103A +712 222422483AE7 10211031102C10031039 +713 222422483AE7 102910031039 +714 222422483AE7 10211031102C1003103A +715 222422483AE7 10291003103A +716 222422483AE7 10211031102C10031039 +717 222422483AE7 10291031102C10031039 +718 222422483AE7 10211031102C1003103A +719 222422483AE7 10291031102C1003103A +720 2224223621D5224D 1021102D10041039 +721 2224223621D5224D 102310041039 +722 222422483AEB 1021102D1004103A +723 222422483AEB 10231004103A +724 2224223A21D5224D 1021102F10041039 +725 2224223A21D5224D 102510041039 +726 222422483AEC 1021102F1004103A +727 222422483AEC 10251004103A +728 2224224221D5224D 1021103110041039 +729 2224224221D5224D 102710041039 +730 222422483AED 102110311004103A +731 222422483AED 10271004103A +732 222422463ACB21D5224D 10211031102C10041039 +733 222422463ACB21D5224D 102910041039 +734 222422483AEE 10211031102C1004103A +735 222422483AEE 10291004103A +736 222422463ACB21D5224D 10211031102C10041039 +737 222422463ACB21D5224D 10291031102C10041039 +738 222422483AEE 10211031102C1004103A +739 222422483AEE 10291031102C1004103A +740 222422483AF2 1021102D10051039 +741 222422483AF2 102310051039 +742 222422483AF2 1021102D1005103A +743 222422483AF2 10231005103A +744 222422483AF3 1021102F10051039 +745 222422483AF3 102510051039 +746 222422483AF3 1021102F1005103A +747 222422483AF3 10251005103A +748 222422483AF4 1021103110051039 +749 222422483AF4 102710051039 +750 222422483AF4 102110311005103A +751 222422483AF4 10271005103A +752 222422483AF5 10211031102C10051039 +753 222422483AF5 102910051039 +754 222422483AF5 10211031102C1005103A +755 222422483AF5 10291005103A +756 222422483AF5 10211031102C10051039 +757 222422483AF5 10291031102C10051039 +758 222422483AF5 10211031102C1005103A +759 222422483AF5 10291031102C1005103A +760 222422483AF9 1021102D10061039 +761 222422483AF9 102310061039 +762 222422483AF9 1021102D1006103A +763 222422483AF9 10231006103A +764 222422483AFA 1021102F10061039 +765 222422483AFA 102510061039 +766 222422483AFA 1021102F1006103A +767 222422483AFA 10251006103A +768 222422483AFB 1021103110061039 +769 222422483AFB 102710061039 +770 222422483AFB 102110311006103A +771 222422483AFB 10271006103A +772 222422483AFC 10211031102C10061039 +773 222422483AFC 102910061039 +774 222422483AFC 10211031102C1006103A +775 222422483AFC 10291006103A +776 222422483AFC 10211031102C10061039 +777 222422483AFC 10291031102C10061039 +778 222422483AFC 10211031102C1006103A +779 222422483AFC 10291031102C1006103A +780 222422483B00 1021102D10071039 +781 222422483B00 102310071039 +782 222422483B00 1021102D1007103A +783 222422483B00 10231007103A +784 222422483B01 1021102F10071039 +785 222422483B01 102510071039 +786 222422483B01 1021102F1007103A +787 222422483B01 10251007103A +788 222422483B02 1021103110071039 +789 222422483B02 102710071039 +790 222422483B02 102110311007103A +791 222422483B02 10271007103A +792 222422483B03 10211031102C10071039 +793 222422483B03 102910071039 +794 222422483B03 10211031102C1007103A +795 222422483B03 10291007103A +796 222422483B03 10211031102C10071039 +797 222422483B03 10291031102C10071039 +798 222422483B03 10211031102C1007103A +799 222422483B03 10291031102C1007103A +800 222422483B0E 1021102D10091039 +801 222422483B0E 102310091039 +802 222422483B0E 1021102D1009103A +803 222422483B0E 10231009103A +804 222422483B0F 1021102F10091039 +805 222422483B0F 102510091039 +806 222422483B0F 1021102F1009103A +807 222422483B0F 10251009103A +808 222422483B10 1021103110091039 +809 222422483B10 102710091039 +810 222422483B10 102110311009103A +811 222422483B10 10271009103A +812 222422483B11 10211031102C10091039 +813 222422483B11 102910091039 +814 222422483B11 10211031102C1009103A +815 222422483B11 10291009103A +816 222422483B11 10211031102C10091039 +817 222422483B11 10291031102C10091039 +818 222422483B11 10211031102C1009103A +819 222422483B11 10291031102C1009103A +820 222422483B15 1021102D100A1039 +821 222422483B15 1023100A1039 +822 222422483B15 1021102D100A103A +823 222422483B15 1023100A103A +824 222422483B16 1021102F100A1039 +825 222422483B16 1025100A1039 +826 222422483B16 1021102F100A103A +827 222422483B16 1025100A103A +828 222422483B17 10211031100A1039 +829 222422483B17 1027100A1039 +830 222422483B17 10211031100A103A +831 222422483B17 1027100A103A +832 222422483B18 10211031102C100A1039 +833 222422483B18 1029100A1039 +834 222422483B18 10211031102C100A103A +835 222422483B18 1029100A103A +836 222422483B18 10211031102C100A1039 +837 222422483B18 10291031102C100A1039 +838 222422483B18 10211031102C100A103A +839 222422483B18 10291031102C100A103A +840 222422483B1C 1021102D100B1039 +841 222422483B1C 1023100B1039 +842 222422483B1C 1021102D100B103A +843 222422483B1C 1023100B103A +844 222422483B1D 1021102F100B1039 +845 222422483B1D 1025100B1039 +846 222422483B1D 1021102F100B103A +847 222422483B1D 1025100B103A +848 222422483B1E 10211031100B1039 +849 222422483B1E 1027100B1039 +850 222422483B1E 10211031100B103A +851 222422483B1E 1027100B103A +852 222422483B1F 10211031102C100B1039 +853 222422483B1F 1029100B1039 +854 222422483B1F 10211031102C100B103A +855 222422483B1F 1029100B103A +856 222422483B1F 10211031102C100B1039 +857 222422483B1F 10291031102C100B1039 +858 222422483B1F 10211031102C100B103A +859 222422483B1F 10291031102C100B103A +860 222422483B23 1021102D100C1039 +861 222422483B23 1023100C1039 +862 222422483B23 1021102D100C103A +863 222422483B23 1023100C103A +864 222422483B24 1021102F100C1039 +865 222422483B24 1025100C1039 +866 222422483B24 1021102F100C103A +867 222422483B24 1025100C103A +868 222422483B25 10211031100C1039 +869 222422483B25 1027100C1039 +870 222422483B25 10211031100C103A +871 222422483B25 1027100C103A +872 222422483B26 10211031102C100C1039 +873 222422483B26 1029100C1039 +874 222422483B26 10211031102C100C103A +875 222422483B26 1029100C103A +876 222422483B26 10211031102C100C1039 +877 222422483B26 10291031102C100C1039 +878 222422483B26 10211031102C100C103A +879 222422483B26 10291031102C100C103A +880 222422483B2A 1021102D100D1039 +881 222422483B2A 1023100D1039 +882 222422483B2A 1021102D100D103A +883 222422483B2A 1023100D103A +884 222422483B2B 1021102F100D1039 +885 222422483B2B 1025100D1039 +886 222422483B2B 1021102F100D103A +887 222422483B2B 1025100D103A +888 222422483B2C 10211031100D1039 +889 222422483B2C 1027100D1039 +890 222422483B2C 10211031100D103A +891 222422483B2C 1027100D103A +892 222422483B2D 10211031102C100D1039 +893 222422483B2D 1029100D1039 +894 222422483B2D 10211031102C100D103A +895 222422483B2D 1029100D103A +896 222422483B2D 10211031102C100D1039 +897 222422483B2D 10291031102C100D1039 +898 222422483B2D 10211031102C100D103A +899 222422483B2D 10291031102C100D103A +900 222422483B31 1021102D100E1039 +901 222422483B31 1023100E1039 +902 222422483B31 1021102D100E103A +903 222422483B31 1023100E103A +904 222422483B32 1021102F100E1039 +905 222422483B32 1025100E1039 +906 222422483B32 1021102F100E103A +907 222422483B32 1025100E103A +908 222422483B33 10211031100E1039 +909 222422483B33 1027100E1039 +910 222422483B33 10211031100E103A +911 222422483B33 1027100E103A +912 222422483B34 10211031102C100E1039 +913 222422483B34 1029100E1039 +914 222422483B34 10211031102C100E103A +915 222422483B34 1029100E103A +916 222422483B34 10211031102C100E1039 +917 222422483B34 10291031102C100E1039 +918 222422483B34 10211031102C100E103A +919 222422483B34 10291031102C100E103A +920 222422483B38 1021102D100F1039 +921 222422483B38 1023100F1039 +922 222422483B38 1021102D100F103A +923 222422483B38 1023100F103A +924 222422483B39 1021102F100F1039 +925 222422483B39 1025100F1039 +926 222422483B39 1021102F100F103A +927 222422483B39 1025100F103A +928 222422483B3A 10211031100F1039 +929 222422483B3A 1027100F1039 +930 222422483B3A 10211031100F103A +931 222422483B3A 1027100F103A +932 222422483B3B 10211031102C100F1039 +933 222422483B3B 1029100F1039 +934 222422483B3B 10211031102C100F103A +935 222422483B3B 1029100F103A +936 222422483B3B 10211031102C100F1039 +937 222422483B3B 10291031102C100F1039 +938 222422483B3B 10211031102C100F103A +939 222422483B3B 10291031102C100F103A +940 222422483B3F 1021102D10101039 +941 222422483B3F 102310101039 +942 222422483B3F 1021102D1010103A +943 222422483B3F 10231010103A +944 222422483B40 1021102F10101039 +945 222422483B40 102510101039 +946 222422483B40 1021102F1010103A +947 222422483B40 10251010103A +948 222422483B41 1021103110101039 +949 222422483B41 102710101039 +950 222422483B41 102110311010103A +951 222422483B41 10271010103A +952 222422483B42 10211031102C10101039 +953 222422483B42 102910101039 +954 222422483B42 10211031102C1010103A +955 222422483B42 10291010103A +956 222422483B42 10211031102C10101039 +957 222422483B42 10291031102C10101039 +958 222422483B42 10211031102C1010103A +959 222422483B42 10291031102C1010103A +960 222422483B46 1021102D10111039 +961 222422483B46 102310111039 +962 222422483B46 1021102D1011103A +963 222422483B46 10231011103A +964 222422483B47 1021102F10111039 +965 222422483B47 102510111039 +966 222422483B47 1021102F1011103A +967 222422483B47 10251011103A +968 222422483B48 1021103110111039 +969 222422483B48 102710111039 +970 222422483B48 102110311011103A +971 222422483B48 10271011103A +972 222422483B49 10211031102C10111039 +973 222422483B49 102910111039 +974 222422483B49 10211031102C1011103A +975 222422483B49 10291011103A +976 222422483B49 10211031102C10111039 +977 222422483B49 10291031102C10111039 +978 222422483B49 10211031102C1011103A +979 222422483B49 10291031102C1011103A +980 222422483B4D 1021102D10121039 +981 222422483B4D 102310121039 +982 222422483B4D 1021102D1012103A +983 222422483B4D 10231012103A +984 222422483B4E 1021102F10121039 +985 222422483B4E 102510121039 +986 222422483B4E 1021102F1012103A +987 222422483B4E 10251012103A +988 222422483B4F 1021103110121039 +989 222422483B4F 102710121039 +990 222422483B4F 102110311012103A +991 222422483B4F 10271012103A +992 222422483B50 10211031102C10121039 +993 222422483B50 102910121039 +994 222422483B50 10211031102C1012103A +995 222422483B50 10291012103A +996 222422483B50 10211031102C10121039 +997 222422483B50 10291031102C10121039 +998 222422483B50 10211031102C1012103A +999 222422483B50 10291031102C1012103A +1000 222422483B54 1021102D10131039 +1001 222422483B54 102310131039 +1002 222422483B54 1021102D1013103A +1003 222422483B54 10231013103A +1004 222422483B55 1021102F10131039 +1005 222422483B55 102510131039 +1006 222422483B55 1021102F1013103A +1007 222422483B55 10251013103A +1008 222422483B56 1021103110131039 +1009 222422483B56 102710131039 +1010 222422483B56 102110311013103A +1011 222422483B56 10271013103A +1012 222422483B57 10211031102C10131039 +1013 222422483B57 102910131039 +1014 222422483B57 10211031102C1013103A +1015 222422483B57 10291013103A +1016 222422483B57 10211031102C10131039 +1017 222422483B57 10291031102C10131039 +1018 222422483B57 10211031102C1013103A +1019 222422483B57 10291031102C1013103A +1020 222422483B5B 1021102D10141039 +1021 222422483B5B 102310141039 +1022 222422483B5B 1021102D1014103A +1023 222422483B5B 10231014103A +1024 222422483B5C 1021102F10141039 +1025 222422483B5C 102510141039 +1026 222422483B5C 1021102F1014103A +1027 222422483B5C 10251014103A +1028 222422483B5D 1021103110141039 +1029 222422483B5D 102710141039 +1030 222422483B5D 102110311014103A +1031 222422483B5D 10271014103A +1032 222422483B5E 10211031102C10141039 +1033 222422483B5E 102910141039 +1034 222422483B5E 10211031102C1014103A +1035 222422483B5E 10291014103A +1036 222422483B5E 10211031102C10141039 +1037 222422483B5E 10291031102C10141039 +1038 222422483B5E 10211031102C1014103A +1039 222422483B5E 10291031102C1014103A +1040 222422483B62 1021102D10151039 +1041 222422483B62 102310151039 +1042 222422483B62 1021102D1015103A +1043 222422483B62 10231015103A +1044 222422483B63 1021102F10151039 +1045 222422483B63 102510151039 +1046 222422483B63 1021102F1015103A +1047 222422483B63 10251015103A +1048 222422483B64 1021103110151039 +1049 222422483B64 102710151039 +1050 222422483B64 102110311015103A +1051 222422483B64 10271015103A +1052 222422483B65 10211031102C10151039 +1053 222422483B65 102910151039 +1054 222422483B65 10211031102C1015103A +1055 222422483B65 10291015103A +1056 222422483B65 10211031102C10151039 +1057 222422483B65 10291031102C10151039 +1058 222422483B65 10211031102C1015103A +1059 222422483B65 10291031102C1015103A +1060 222422483B69 1021102D10161039 +1061 222422483B69 102310161039 +1062 222422483B69 1021102D1016103A +1063 222422483B69 10231016103A +1064 222422483B6A 1021102F10161039 +1065 222422483B6A 102510161039 +1066 222422483B6A 1021102F1016103A +1067 222422483B6A 10251016103A +1068 222422483B6B 1021103110161039 +1069 222422483B6B 102710161039 +1070 222422483B6B 102110311016103A +1071 222422483B6B 10271016103A +1072 222422483B6C 10211031102C10161039 +1073 222422483B6C 102910161039 +1074 222422483B6C 10211031102C1016103A +1075 222422483B6C 10291016103A +1076 222422483B6C 10211031102C10161039 +1077 222422483B6C 10291031102C10161039 +1078 222422483B6C 10211031102C1016103A +1079 222422483B6C 10291031102C1016103A +1080 222422483B70 1021102D10171039 +1081 222422483B70 102310171039 +1082 222422483B70 1021102D1017103A +1083 222422483B70 10231017103A +1084 222422483B71 1021102F10171039 +1085 222422483B71 102510171039 +1086 222422483B71 1021102F1017103A +1087 222422483B71 10251017103A +1088 222422483B72 1021103110171039 +1089 222422483B72 102710171039 +1090 222422483B72 102110311017103A +1091 222422483B72 10271017103A +1092 222422483B73 10211031102C10171039 +1093 222422483B73 102910171039 +1094 222422483B73 10211031102C1017103A +1095 222422483B73 10291017103A +1096 222422483B73 10211031102C10171039 +1097 222422483B73 10291031102C10171039 +1098 222422483B73 10211031102C1017103A +1099 222422483B73 10291031102C1017103A +1100 222422483B77 1021102D10181039 +1101 222422483B77 102310181039 +1102 222422483B77 1021102D1018103A +1103 222422483B77 10231018103A +1104 222422483B78 1021102F10181039 +1105 222422483B78 102510181039 +1106 222422483B78 1021102F1018103A +1107 222422483B78 10251018103A +1108 222422483B79 1021103110181039 +1109 222422483B79 102710181039 +1110 222422483B79 102110311018103A +1111 222422483B79 10271018103A +1112 222422483B7A 10211031102C10181039 +1113 222422483B7A 102910181039 +1114 222422483B7A 10211031102C1018103A +1115 222422483B7A 10291018103A +1116 222422483B7A 10211031102C10181039 +1117 222422483B7A 10291031102C10181039 +1118 222422483B7A 10211031102C1018103A +1119 222422483B7A 10291031102C1018103A +1120 222422483B7E 1021102D10191039 +1121 222422483B7E 102310191039 +1122 222422483B7E 1021102D1019103A +1123 222422483B7E 10231019103A +1124 222422483B7F 1021102F10191039 +1125 222422483B7F 102510191039 +1126 222422483B7F 1021102F1019103A +1127 222422483B7F 10251019103A +1128 222422483B80 1021103110191039 +1129 222422483B80 102710191039 +1130 222422483B80 102110311019103A +1131 222422483B80 10271019103A +1132 222422483B81 10211031102C10191039 +1133 222422483B81 102910191039 +1134 222422483B81 10211031102C1019103A +1135 222422483B81 10291019103A +1136 222422483B81 10211031102C10191039 +1137 222422483B81 10291031102C10191039 +1138 222422483B81 10211031102C1019103A +1139 222422483B81 10291031102C1019103A +1140 222422483B85 1021102D101A1039 +1141 222422483B85 1023101A1039 +1142 222422483B85 1021102D101A103A +1143 222422483B85 1023101A103A +1144 222422483B86 1021102F101A1039 +1145 222422483B86 1025101A1039 +1146 222422483B86 1021102F101A103A +1147 222422483B86 1025101A103A +1148 222422483B87 10211031101A1039 +1149 222422483B87 1027101A1039 +1150 222422483B87 10211031101A103A +1151 222422483B87 1027101A103A +1152 222422483B88 10211031102C101A1039 +1153 222422483B88 1029101A1039 +1154 222422483B88 10211031102C101A103A +1155 222422483B88 1029101A103A +1156 222422483B88 10211031102C101A1039 +1157 222422483B88 10291031102C101A1039 +1158 222422483B88 10211031102C101A103A +1159 222422483B88 10291031102C101A103A +1160 222422483B8C 1021102D101B1039 +1161 222422483B8C 1023101B1039 +1162 222422483B8C 1021102D101B103A +1163 222422483B8C 1023101B103A +1164 222422483B8D 1021102F101B1039 +1165 222422483B8D 1025101B1039 +1166 222422483B8D 1021102F101B103A +1167 222422483B8D 1025101B103A +1168 222422483B8E 10211031101B1039 +1169 222422483B8E 1027101B1039 +1170 222422483B8E 10211031101B103A +1171 222422483B8E 1027101B103A +1172 222422483B8F 10211031102C101B1039 +1173 222422483B8F 1029101B1039 +1174 222422483B8F 10211031102C101B103A +1175 222422483B8F 1029101B103A +1176 222422483B8F 10211031102C101B1039 +1177 222422483B8F 10291031102C101B1039 +1178 222422483B8F 10211031102C101B103A +1179 222422483B8F 10291031102C101B103A +1180 222422483B93 1021102D101C1039 +1181 222422483B93 1023101C1039 +1182 222422483B93 1021102D101C103A +1183 222422483B93 1023101C103A +1184 222422483B94 1021102F101C1039 +1185 222422483B94 1025101C1039 +1186 222422483B94 1021102F101C103A +1187 222422483B94 1025101C103A +1188 222422483B95 10211031101C1039 +1189 222422483B95 1027101C1039 +1190 222422483B95 10211031101C103A +1191 222422483B95 1027101C103A +1192 222422483B96 10211031102C101C1039 +1193 222422483B96 1029101C1039 +1194 222422483B96 10211031102C101C103A +1195 222422483B96 1029101C103A +1196 222422483B96 10211031102C101C1039 +1197 222422483B96 10291031102C101C1039 +1198 222422483B96 10211031102C101C103A +1199 222422483B96 10291031102C101C103A +1200 222422483BA1 1021102D101E1039 +1201 222422483BA1 1023101E1039 +1202 222422483BA1 1021102D101E103A +1203 222422483BA1 1023101E103A +1204 222422483BA2 1021102F101E1039 +1205 222422483BA2 1025101E1039 +1206 222422483BA2 1021102F101E103A +1207 222422483BA2 1025101E103A +1208 222422483BA3 10211031101E1039 +1209 222422483BA3 1027101E1039 +1210 222422483BA3 10211031101E103A +1211 222422483BA3 1027101E103A +1212 222422483BA4 10211031102C101E1039 +1213 222422483BA4 1029101E1039 +1214 222422483BA4 10211031102C101E103A +1215 222422483BA4 1029101E103A +1216 222422483BA4 10211031102C101E1039 +1217 222422483BA4 10291031102C101E1039 +1218 222422483BA4 10211031102C101E103A +1219 222422483BA4 10291031102C101E103A +1220 222422483BA8 1021102D101F1039 +1221 222422483BA8 1023101F1039 +1222 222422483BA8 1021102D101F103A +1223 222422483BA8 1023101F103A +1224 222422483BA9 1021102F101F1039 +1225 222422483BA9 1025101F1039 +1226 222422483BA9 1021102F101F103A +1227 222422483BA9 1025101F103A +1228 222422483BAA 10211031101F1039 +1229 222422483BAA 1027101F1039 +1230 222422483BAA 10211031101F103A +1231 222422483BAA 1027101F103A +1232 222422483BAB 10211031102C101F1039 +1233 222422483BAB 1029101F1039 +1234 222422483BAB 10211031102C101F103A +1235 222422483BAB 1029101F103A +1236 222422483BAB 10211031102C101F1039 +1237 222422483BAB 10291031102C101F1039 +1238 222422483BAB 10211031102C101F103A +1239 222422483BAB 10291031102C101F103A +1240 --- Contractions +1241 22483AD221CD22483BBD 1031102C1000103A1000103B +1242 22483AD221CD22483BBD 1031102C1000103A103B +1243 22483B5921F822483B63 1014103A1014102F1015103A +1244 22483B5921F822483B63 1014103A102F1015103A +1245 --- Great Sa +1246 22483BA32216 1031101E1039101E +1247 22483BA32216 1031103F +1248 22483BA12216 102D101E1039101E +1249 22483BA12216 102D103F +1250 22483BA22216 102F101E1039101E +1251 22483BA22216 102F103F +1252 222422483BA12216 1021102D101E1039101E +1253 222422483BA12216 1023103F +1254 222422483BA22216 1021102F101E1039101E +1255 222422483BA22216 1025103F +1256 22483B9F2216 101E1039101E +1257 22483B9F2216 103F +1258 --- Symbols - collate as long form +1259 21F822483BC222483AD3 1014103E102D102F1000103A +1260 21F822483BC222483AD3 104C +1261 220922483BC0224222593ACB 101B103D10311037 +1262 220922483BC0224222593ACB 104D +1263 220D22483B1322593ACC21CD22483AEE22593ACC 101C100A103A103810001031102C1004103A1038 +1264 220D22483B1322593ACC21CD22483AEE22593ACC 104E1004103A1038 +1265 22242236 1021102D +1266 22242236 104F +1267 --- Short Forms may need to be added here +1268 220D22483ACD22072232 101C1000103A101A102C +1269 220D22483ACD22072232 101C1000103A103B102C +1270 221622052238 101E1019102E +1271 221622052238 101E10391019102E +1272 21F3220522483AE922593ACC 101110191004103A1038 +1273 21F3220522483AE922593ACC 1011103910191004103A1038 +1274 220D22483ACD220422483ACD 101C1000103A10181000103A +1275 220D22483ACD220422483ACD 101C103910181000103A +DROP TABLE t1; +# +# END of ctype_myanmar.inc +# +# +# MDEV-7366 SELECT 'a' = BINARY 'A' returns 1 (utf8 charset, utf8_unicode_ci collation) +# +SET NAMES utf8 COLLATE utf8_unicode_ci; +SELECT 'a' = BINARY 'A'; +'a' = BINARY 'A' +0 +SELECT BINARY 'A' = 'a'; +BINARY 'A' = 'a' +0 +# +# Wrong result set for WHERE a='oe' COLLATE utf8_german2_ci AND a='oe' +# +SET NAMES utf8 COLLATE utf8_german2_ci; +CREATE TABLE t1 (a CHAR(10) CHARACTER SET utf8); +INSERT INTO t1 VALUES ('ö'),('oe'); +SELECT * FROM t1 WHERE a='oe' AND a='oe' COLLATE utf8_german2_ci; +a +oe +SELECT * FROM t1 WHERE a='oe' COLLATE utf8_german2_ci AND a='oe'; +a +oe +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='oe' AND a='oe' COLLATE utf8_german2_ci; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 'oe') and (`test`.`t1`.`a` = 'oe')) +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='oe' COLLATE utf8_german2_ci AND a='oe'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 'oe') and (`test`.`t1`.`a` = 'oe')) +DROP TABLE t1; +# +# End of MariaDB-10.0 tests +# diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index 1bbd3af4af7..6520694a804 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -237,7 +237,17 @@ lpad(f1, 12, "-o-/") drop table t2; SET NAMES koi8r; SET character_set_connection=ucs2; -create table t1 (a varchar(10) character set ucs2, key(a)); +select @@collation_connection; +@@collation_connection +ucs2_general_ci +create table t1 as select repeat(' ',10) as a union select null; +alter table t1 add key(a); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET ucs2 DEFAULT NULL, + KEY `a` (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test"); explain select * from t1 where a like 'abc%'; id select_type table type possible_keys key key_len ref rows Extra @@ -760,6 +770,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +ucs2_general_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection ucs2_general_ci @@ -778,41 +839,122 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; c2h ab_def drop table t1; +"BEGIN ctype_german.inc" drop table if exists t1; create table t1 as select repeat(' ', 64) as s1; select collation(s1) from t1; collation(s1) ucs2_general_ci delete from t1; +INSERT INTO t1 VALUES ('ud'),('uf'); +INSERT INTO t1 VALUES ('od'),('of'); +INSERT INTO t1 VALUES ('e'); +INSERT INTO t1 VALUES ('ad'),('af'); insert into t1 values ('a'),('ae'),(_latin1 0xE4); insert into t1 values ('o'),('oe'),(_latin1 0xF6); insert into t1 values ('s'),('ss'),(_latin1 0xDF); insert into t1 values ('u'),('ue'),(_latin1 0xFC); +INSERT INTO t1 VALUES (_latin1 0xE6), (_latin1 0xC6); +INSERT INTO t1 VALUES (_latin1 0x9C), (_latin1 0x8C); select s1, hex(s1) from t1 order by s1, binary s1; s1 hex(s1) a 0061 ä 00E4 +ad 00610064 ae 00610065 +af 00610066 +e 0065 o 006F ö 00F6 +od 006F0064 oe 006F0065 +of 006F0066 s 0073 ß 00DF ss 00730073 u 0075 ü 00FC +ud 00750064 ue 00750065 +uf 00750066 +Æ 00C6 +æ 00E6 +Œ 0152 +œ 0153 select group_concat(s1 order by binary s1) from t1 group by s1; group_concat(s1 order by binary s1) a,ä +ad ae +af +e o,ö +od oe +of s,ß ss u,ü +ud ue +uf +Æ,æ +Œ,œ +SELECT s1, hex(s1), hex(weight_string(s1)) FROM t1 ORDER BY s1, BINARY(s1); +s1 hex(s1) hex(weight_string(s1)) +a 0061 0041 +ä 00E4 0041 +ad 00610064 00410044 +ae 00610065 00410045 +af 00610066 00410046 +e 0065 0045 +o 006F 004F +ö 00F6 004F +od 006F0064 004F0044 +oe 006F0065 004F0045 +of 006F0066 004F0046 +s 0073 0053 +ß 00DF 0053 +ss 00730073 00530053 +u 0075 0055 +ü 00FC 0055 +ud 00750064 00550044 +ue 00750065 00550045 +uf 00750066 00550046 +Æ 00C6 00C6 +æ 00E6 00C6 +Œ 0152 0152 +œ 0153 0152 +SELECT s1, hex(s1) FROM t1 WHERE s1='ae' ORDER BY s1, BINARY(s1); +s1 hex(s1) +ae 00610065 drop table t1; +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET ucs2 NOT NULL DEFAULT '', + `b` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); +SELECT * FROM t1 ORDER BY a, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY a DESC, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a), b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a) DESC, b; +a b +s 0 +ß 1 +DROP TABLE t1; +"END ctype_german.inc" CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); @@ -847,7 +989,7 @@ pattern varchar(64) NO INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d'); SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1; HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern) -003200300030003100F70030003100F700300031 0025005900F70025006D00F700250064 2001-01-01 00:00:00 +003200300030003100F70030003100F700300031 0025005900F70025006D00F700250064 2001-01-01 00:00:00.000000 DROP TABLE t1; SET NAMES latin1; SET collation_connection='ucs2_bin'; @@ -877,6 +1019,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +ucs2_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection ucs2_bin @@ -1336,7 +1529,7 @@ SELECT CONVERT(QUOTE(CHAR(0xf5 using ucs2)), SIGNED); CONVERT(QUOTE(CHAR(0xf5 using ucs2)), SIGNED) 0 Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' +Warning 1292 Truncated incorrect INTEGER value: ''õ'' End of 5.0 tests # # Start of 5.1 tests @@ -4399,3 +4592,1012 @@ DROP TABLE t1; # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set collation_connection=ucs2_general_ci; +select @@collation_connection; +@@collation_connection +ucs2_general_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET ucs2 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0041 +SELECT HEX(ws) FROM t2; +HEX(ws) +0041 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET ucs2 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +00410041004100410041 +SELECT HEX(ws) FROM t2; +HEX(ws) +00410041004100410041 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +004100410041 +SELECT HEX(ws) FROM t2; +HEX(ws) +004100410041 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +0041004100410041004100200020002000200020 +SELECT HEX(ws) FROM t2; +HEX(ws) +0041004100410041004100200020002000200020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +0041 +select hex(weight_string('A')); +hex(weight_string('A')) +0041 +select hex(weight_string('abc')); +hex(weight_string('abc')) +004100420043 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +00410042 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +004100420043 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +00410042004300200020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +00 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0041 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +004100 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +00410042002000200020002000200020002000200020002000 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +00 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0041 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +004100 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +00410042004300200020002000200020002000200020002000 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +00 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0041 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +004100 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +00410042004300200020002000200020002000200020002000 +select @@collation_connection; +@@collation_connection +ucs2_general_ci +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +20AC20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +20AC20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +20AC20AC20AC00200020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +20AC20AC00 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +20AC20AC002000200020002000200020002000200020002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +20AC20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +20AC20AC20AC00200020002000200020002000200020002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +20AC20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +20AC20AC20AC00200020002000200020002000200020002000 +select @@collation_connection; +@@collation_connection +ucs2_general_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +0041 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +0041 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +004100420043 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +00410042 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +004100420043 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +00410042004300200020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +20002000430042004100 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +FFBEFFBDFFBCFFDFFFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFFFDFFFBCFFBDFFBEFF +set collation_connection=ucs2_bin; +select @@collation_connection; +@@collation_connection +ucs2_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0061 +SELECT HEX(ws) FROM t2; +HEX(ws) +0061 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +00610061006100610061 +SELECT HEX(ws) FROM t2; +HEX(ws) +00610061006100610061 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +006100610061 +SELECT HEX(ws) FROM t2; +HEX(ws) +006100610061 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +0061006100610061006100200020002000200020 +SELECT HEX(ws) FROM t2; +HEX(ws) +0061006100610061006100200020002000200020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +0061 +select hex(weight_string('A')); +hex(weight_string('A')) +0041 +select hex(weight_string('abc')); +hex(weight_string('abc')) +006100620063 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +00610062 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +006100620063 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +00610062006300200020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +00 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0061 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +006100 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +00610062 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0061006200 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +00610062002000200020002000200020002000200020002000 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +00 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0061 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +006100 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +00610062 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0061006200 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +00610062006300200020002000200020002000200020002000 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +00 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0061 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +006100 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +00610062 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0061006200 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +00610062006300200020002000200020002000200020002000 +select @@collation_connection; +@@collation_connection +ucs2_bin +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +20AC20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +20AC20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +20AC20AC20AC00200020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +20AC20AC00 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +20AC20AC002000200020002000200020002000200020002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +20AC20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +20AC20AC20AC00200020002000200020002000200020002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +20AC20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +20AC20AC20AC00200020002000200020002000200020002000 +select @@collation_connection; +@@collation_connection +ucs2_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +0061 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +0041 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +006100620063 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +00610062 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +006100620063 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +00610062006300200020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +20002000630062006100 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +FF9EFF9DFF9CFFDFFFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFFFDFFF9CFF9DFF9EFF +# +# Bug #36418 Character sets: crash if char(256 using utf32) +# +select hex(char(0x01 using ucs2)); +hex(char(0x01 using ucs2)) +0001 +select hex(char(0x0102 using ucs2)); +hex(char(0x0102 using ucs2)) +0102 +select hex(char(0x010203 using ucs2)); +hex(char(0x010203 using ucs2)) +00010203 +select hex(char(0x01020304 using ucs2)); +hex(char(0x01020304 using ucs2)) +01020304 +# +# Bug#10094 Displays wrong error message for UNIQUE key index on CHAR(255) Unicode datatype +# +CREATE TABLE t1 (f1 CHAR(255) unicode); +INSERT INTO t1 values ('abc'),('bcd'),('abc'); +ALTER TABLE t1 ADD UNIQUE Index_1 (f1); +ERROR 23000: Duplicate entry 'abc' for key 'Index_1' +DROP TABLE t1; +# +# Test how character set works with date/time +# +SET collation_connection=ucs2_general_ci; +# +# Bug#32390 Character sets: casting utf32 to/from date doesn't work +# +CREATE TABLE t1 AS SELECT repeat('a',20) AS s1 LIMIT 0; +SET time_zone=_latin1'+03:00'; +SET timestamp=1216359724; +INSERT INTO t1 VALUES (current_date); +INSERT INTO t1 VALUES (current_time); +INSERT INTO t1 VALUES (current_timestamp); +SELECT s1, hex(s1) FROM t1; +s1 hex(s1) +2008-07-18 0032003000300038002D00300037002D00310038 +08:42:04 00300038003A00340032003A00300034 +2008-07-18 08:42:04 0032003000300038002D00300037002D00310038002000300038003A00340032003A00300034 +DROP TABLE t1; +SET timestamp=0; +SET time_zone=default; +# +# MDEV-5298 Illegal mix of collations on timestamp +# +SELECT CHARSET('2013-11-15 00:41:28' - INTERVAL 7 DAY); +CHARSET('2013-11-15 00:41:28' - INTERVAL 7 DAY) +ucs2 +SELECT COERCIBILITY('2013-11-15 00:41:28' - INTERVAL 7 DAY); +COERCIBILITY('2013-11-15 00:41:28' - INTERVAL 7 DAY) +4 +SELECT CHARSET(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY); +CHARSET(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY) +binary +SELECT COERCIBILITY(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY); +COERCIBILITY(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY) +5 +SELECT CHARSET(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)); +CHARSET(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)) +ucs2 +SELECT COERCIBILITY(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)) +4 +SELECT CHARSET(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)); +CHARSET(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)) +ucs2 +SELECT COERCIBILITY(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)) +4 +SELECT CHARSET(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)); +CHARSET(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)) +ucs2 +SELECT COERCIBILITY(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)) +4 +SELECT HEX(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)); +HEX(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)) +0032003000300031002D00300031002D00300031002000300030003A00300030003A00300030 +SELECT CHARSET(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)); +CHARSET(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +ucs2 +SELECT COERCIBILITY(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +4 +SELECT HEX(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)); +HEX(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +0032003000300031002D00300031002D00300031002000300030003A00300030003A00300030 +CREATE TABLE t1 AS SELECT REPEAT('a', 64) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(64) CHARACTER SET ucs2 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (''); +SELECT CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +ucs2 +SELECT COERCIBILITY(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +COERCIBILITY(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +2 +SELECT HEX(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +HEX(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +0032003000300031002D00300031002D00300031002000300030003A00300030003A00300030 +SELECT CHARSET(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +CHARSET(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +ucs2 +SELECT COERCIBILITY(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +COERCIBILITY(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +2 +SELECT HEX(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +HEX(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +0032003000300031002D00300031002D00300031002000300030003A00300030003A00300030 +DROP TABLE t1; +CREATE TABLE t1 (t TIMESTAMP NOT NULL); +INSERT INTO t1 VALUES ('2001-01-01 00:00:00'); +SELECT * FROM t1 WHERE t < '2013-11-15 00:41:28' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t = '2001-01-08 00:00:00' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t < CONCAT('2013-11-15 00:41:28',LEFT(RAND(),0)) - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t = CONCAT('2001-01-08 00:00:00',LEFT(RAND(),0)) - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t < TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t = TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +DROP TABLE t1; +SET NAMES latin1; +# +# WL#4013 Unicode german2 collation +# +SET collation_connection=ucs2_german2_ci; +"BEGIN ctype_german.inc" +drop table if exists t1; +create table t1 as select repeat(' ', 64) as s1; +select collation(s1) from t1; +collation(s1) +ucs2_german2_ci +delete from t1; +INSERT INTO t1 VALUES ('ud'),('uf'); +INSERT INTO t1 VALUES ('od'),('of'); +INSERT INTO t1 VALUES ('e'); +INSERT INTO t1 VALUES ('ad'),('af'); +insert into t1 values ('a'),('ae'),(_latin1 0xE4); +insert into t1 values ('o'),('oe'),(_latin1 0xF6); +insert into t1 values ('s'),('ss'),(_latin1 0xDF); +insert into t1 values ('u'),('ue'),(_latin1 0xFC); +INSERT INTO t1 VALUES (_latin1 0xE6), (_latin1 0xC6); +INSERT INTO t1 VALUES (_latin1 0x9C), (_latin1 0x8C); +select s1, hex(s1) from t1 order by s1, binary s1; +s1 hex(s1) +a 0061 +ad 00610064 +ae 00610065 +Æ 00C6 +ä 00E4 +æ 00E6 +af 00610066 +e 0065 +o 006F +od 006F0064 +oe 006F0065 +ö 00F6 +Œ 0152 +œ 0153 +of 006F0066 +s 0073 +ss 00730073 +ß 00DF +u 0075 +ud 00750064 +ue 00750065 +ü 00FC +uf 00750066 +select group_concat(s1 order by binary s1) from t1 group by s1; +group_concat(s1 order by binary s1) +a +ad +ae,Æ,ä,æ +af +e +o +od +oe,ö,Œ,œ +of +s +ss,ß +u +ud +ue,ü +uf +SELECT s1, hex(s1), hex(weight_string(s1)) FROM t1 ORDER BY s1, BINARY(s1); +s1 hex(s1) hex(weight_string(s1)) +a 0061 0E33 +ad 00610064 0E330E6D +ae 00610065 0E330E8B +Æ 00C6 0E330E8B +ä 00E4 0E330E8B +æ 00E6 0E330E8B +af 00610066 0E330EB9 +e 0065 0E8B +o 006F 0F82 +od 006F0064 0F820E6D +oe 006F0065 0F820E8B +ö 00F6 0F820E8B +Œ 0152 0F820E8B +œ 0153 0F820E8B +of 006F0066 0F820EB9 +s 0073 0FEA +ss 00730073 0FEA0FEA +ß 00DF 0FEA0FEA +u 0075 101F +ud 00750064 101F0E6D +ue 00750065 101F0E8B +ü 00FC 101F0E8B +uf 00750066 101F0EB9 +SELECT s1, hex(s1) FROM t1 WHERE s1='ae' ORDER BY s1, BINARY(s1); +s1 hex(s1) +ae 00610065 +Æ 00C6 +ä 00E4 +æ 00E6 +drop table t1; +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET ucs2 COLLATE ucs2_german2_ci NOT NULL DEFAULT '', + `b` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); +SELECT * FROM t1 ORDER BY a, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY a DESC, b; +a b +ß 1 +s 0 +SELECT * FROM t1 ORDER BY CONCAT(a), b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a) DESC, b; +a b +ß 1 +s 0 +DROP TABLE t1; +"END ctype_german.inc" +# +# Bug#59145 valgrind warnings for uninitialized values in my_strtoll10_mb2 +# +SET NAMES latin1; +SELECT CONVERT(CHAR(NULL USING ucs2), UNSIGNED); +CONVERT(CHAR(NULL USING ucs2), UNSIGNED) +0 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '' +DO IFNULL(CHAR(NULL USING ucs2), ''); +DO CAST(CONVERT('' USING ucs2) AS UNSIGNED); +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '' +# +# Test error message for conversion using different charset +# +CREATE TABLE t1 (a DECIMAL(2,0)); +SET sql_mode='strict_all_tables'; +INSERT INTO t1 VALUES (CONVERT('9e99999999' USING ucs2)); +ERROR 22007: Incorrect decimal value: '9e99999999' for column 'a' at row 1 +SET sql_mode=DEFAULT; +INSERT INTO t1 VALUES (CONVERT('aaa' USING ucs2)); +Warnings: +Warning 1366 Incorrect decimal value: 'aaa' for column 'a' at row 1 +DROP TABLE t1; +# +# End of 5.6 tests +# +# +# Start of 10.0 tests +# +SET NAMES latin1, collation_connection=ucs2_bin; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a ')) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +SET NAMES latin1, collation_connection=ucs2_general_ci; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a ')) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +SET NAMES latin1; +# +# MDEV-6661 PI() does not work well in UCS2/UTF16/UTF32 context +# +SELECT CONCAT(CONVERT('pi=' USING ucs2),PI()) AS PI; +PI +pi=3.141593 +# +# MDEV-6695 Bad column name for UCS2 string literals +# +SET NAMES utf8, character_set_connection=ucs2; +SELECT 'a','aa'; +a aa +a aa +# +# MDEV-10306 Wrong results with combination of CONCAT, SUBSTR and CONVERT in subquery +# +SET NAMES utf8, character_set_connection=ucs2; +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch=_utf8'derived_merge=on'; +CREATE TABLE t1 (t VARCHAR(10) CHARSET latin1); +INSERT INTO t1 VALUES('abcdefghi'); +SET NAMES utf8, character_set_connection=ucs2; +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT HEX(t) t2 FROM t1) sub; +c2 +616263646566676869-616263646566676869 +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT TO_BASE64(t) t2 FROM t1) sub; +c2 +YWJjZGVmZ2hp-YWJjZGVmZ2hp +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/ctype_ucs2_def.result b/mysql-test/r/ctype_ucs2_def.result index af69a9e77d6..9d8f5181103 100644 --- a/mysql-test/r/ctype_ucs2_def.result +++ b/mysql-test/r/ctype_ucs2_def.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("'ucs2' can not be used as client character set"); show variables like 'collation_server'; Variable_name Value collation_server ucs2_unicode_ci diff --git a/mysql-test/r/ctype_ucs2_query_cache.result b/mysql-test/r/ctype_ucs2_query_cache.result index 6f26bed02da..eba7f2fb0fc 100644 --- a/mysql-test/r/ctype_ucs2_query_cache.result +++ b/mysql-test/r/ctype_ucs2_query_cache.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("'ucs2' can not be used as client character set"); # # Start of 5.5 tests # diff --git a/mysql-test/r/ctype_ujis.result b/mysql-test/r/ctype_ujis.result index e4641ceeb54..413ab4efe31 100644 --- a/mysql-test/r/ctype_ujis.result +++ b/mysql-test/r/ctype_ujis.result @@ -94,7 +94,7 @@ select @ujis4 = CONVERT(@utf84 USING ujis); 1 drop table if exists t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' create table t1 (c1 varchar(8)) default character set 'ujis'; insert into t1 values (0xA4A2),(0xA2A2),(0xA4A2); select c1 as 'no index' from t1 where c1 like cast(concat(0xA4A2, '%') as char character set ujis); @@ -168,7 +168,7 @@ a b DROP TABLE t1; DROP TABLE IF EXISTS t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE t1(c char(1)) character set ujis; INSERT INTO t1 VALUES(0xA2AF); INSERT INTO t1 VALUES(0xA2B0); @@ -2234,6 +2234,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +ujis_japanese_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; create table t1 engine=innodb select repeat('a',50) as c1; alter table t1 add index(c1(5)); insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111'); @@ -2318,6 +2369,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +ujis_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; create table t1 engine=innodb select repeat('a',50) as c1; alter table t1 add index(c1(5)); insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111'); @@ -2421,6 +2523,7 @@ Warning 1292 Truncated incorrect INTEGER value: 'a' set names default; set character_set_database=default; set character_set_server=default; +End of 5.1 tests # # Start of 5.5 tests # @@ -24950,3 +25053,895 @@ DROP TABLE t1; # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set names ujis; +select @@collation_connection; +@@collation_connection +ujis_japanese_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET ujis NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +41 +SELECT HEX(ws) FROM t2; +HEX(ws) +41 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET ujis NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(15) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +4141414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +4141414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(9) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +414141 +SELECT HEX(ws) FROM t2; +HEX(ws) +414141 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(30) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +41414141412020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +41414141412020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +41 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +414243 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +4142 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +414243 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +4142432020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +41 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +4142 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +414220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +41422020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +4142202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +41422020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +41 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +4142 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +414243 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +41424320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +41 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +4142 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +414243 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +41424320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +4142432020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +41424320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +ujis_japanese_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +41 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +414243 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +4142 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +414243 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +4142432020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020434241 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +BEBDBCDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDFBCBDBE +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +ujis_japanese_ci +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +4141 +select hex(weight_string(cast(0xA1A1 as char))); +hex(weight_string(cast(0xA1A1 as char))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1 as char) as char(3))) +A1A12020 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))) +A1A1A1A120 +select hex(weight_string(cast(0x40A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1 as char) as char(3))) +40A1A120 +select hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))) +4040A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)) +A1A1A1A120 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)) +A1A1A1A1202020202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +ujis_japanese_ci +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +4141 +select hex(weight_string(cast(0x8EA1 as char))); +hex(weight_string(cast(0x8EA1 as char))) +8EA1 +select hex(weight_string(cast(0x8EA1 as char) as char(1))); +hex(weight_string(cast(0x8EA1 as char) as char(1))) +8EA1 +select hex(weight_string(cast(0x8EA18EA1 as char) as char(1))); +hex(weight_string(cast(0x8EA18EA1 as char) as char(1))) +8EA1 +select hex(weight_string(cast(0x8EA1 as char) as char(3))); +hex(weight_string(cast(0x8EA1 as char) as char(3))) +8EA12020 +select hex(weight_string(cast(0x8EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x8EA18EA1 as char) as char(3))) +8EA18EA120 +select hex(weight_string(cast(0x408EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA1 as char) as char(3))) +408EA120 +select hex(weight_string(cast(0x408EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA18EA1 as char) as char(3))) +408EA18EA1 +select hex(weight_string(cast(0x408EA18EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA18EA18EA1 as char) as char(3))) +408EA18EA1 +select hex(weight_string(cast(0x40408EA18EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x40408EA18EA18EA1 as char) as char(3))) +40408EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 2, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 2, 0xC0)) +8EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 2, 0xC0)) +8EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 2, 0xC0)) +8EA18EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 2, 0xC0)) +8EA18EA120 +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 2, 0xC0)) +8EA18EA1202020202020202020202020202020202020202020 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 3, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 3, 0xC0)) +8EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 3, 0xC0)) +8EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 3, 0xC0)) +8EA18EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 3, 0xC0)) +8EA18EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 3, 0xC0)) +8EA18EA18EA120202020202020202020202020202020202020 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 4, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 4, 0xC0)) +8EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 4, 0xC0)) +8EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 4, 0xC0)) +8EA18EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 4, 0xC0)) +8EA18EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0)) +8EA18EA18EA120202020202020202020202020202020202020 +select collation(cast(0x8FA2C3 as char)); +collation(cast(0x8FA2C3 as char)) +ujis_japanese_ci +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +4141 +select hex(weight_string(cast(0x8FA2C3 as char))); +hex(weight_string(cast(0x8FA2C3 as char))) +8FA2C3 +select hex(weight_string(cast(0x8FA2C3 as char) as char(1))); +hex(weight_string(cast(0x8FA2C3 as char) as char(1))) +8FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C3 as char) as char(1))); +hex(weight_string(cast(0x8FA2C38FA2C3 as char) as char(1))) +8FA2C3 +select hex(weight_string(cast(0x8FA2C3 as char) as char(3))); +hex(weight_string(cast(0x8FA2C3 as char) as char(3))) +8FA2C32020 +select hex(weight_string(cast(0x8FA2C38FA2C3 as char) as char(3))); +hex(weight_string(cast(0x8FA2C38FA2C3 as char) as char(3))) +8FA2C38FA2C320 +select hex(weight_string(cast(0x408FA2C3 as char) as char(3))); +hex(weight_string(cast(0x408FA2C3 as char) as char(3))) +408FA2C320 +select hex(weight_string(cast(0x408FA2C38FA2C3 as char) as char(3))); +hex(weight_string(cast(0x408FA2C38FA2C3 as char) as char(3))) +408FA2C38FA2C3 +select hex(weight_string(cast(0x408FA2C38FA2C38FA2C3 as char) as char(3))); +hex(weight_string(cast(0x408FA2C38FA2C38FA2C3 as char) as char(3))) +408FA2C38FA2C3 +select hex(weight_string(cast(0x40408FA2C38FA2C38FA2C3 as char) as char(3))); +hex(weight_string(cast(0x40408FA2C38FA2C38FA2C3 as char) as char(3))) +40408FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 2, 0xC0)) +8F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 2, 0xC0)) +8FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 2, 0xC0)) +8FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 2, 0xC0)) +8FA2C38F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 2, 0xC0)) +8FA2C38FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 2, 0xC0)) +8FA2C38FA2C320202020202020202020202020202020202020 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 3, 0xC0)) +8F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 3, 0xC0)) +8FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 3, 0xC0)) +8FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 3, 0xC0)) +8FA2C38F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 3, 0xC0)) +8FA2C38FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 3, 0xC0)) +8FA2C38FA2C38FA2C320202020202020202020202020202020 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 4, 0xC0)) +8F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 4, 0xC0)) +8FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 4, 0xC0)) +8FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 4, 0xC0)) +8FA2C38F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 4, 0xC0)) +8FA2C38FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 4, 0xC0)) +8FA2C38FA2C38FA2C320202020202020202020202020202020 +set collation_connection=ujis_bin; +select @@collation_connection; +@@collation_connection +ujis_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET ujis COLLATE ujis_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +61 +SELECT HEX(ws) FROM t2; +HEX(ws) +61 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET ujis COLLATE ujis_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(15) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +6161616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +6161616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(9) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +616161 +SELECT HEX(ws) FROM t2; +HEX(ws) +616161 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(30) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +61616161612020202020 +SELECT HEX(ws) FROM t2; +HEX(ws) +61616161612020202020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +61 +select hex(weight_string('A')); +hex(weight_string('A')) +41 +select hex(weight_string('abc')); +hex(weight_string('abc')) +616263 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +6162 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +616263 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +6162632020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +61 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +6162 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +616220 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +61622020 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +6162202020 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +61622020202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +61 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +6162 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +616263 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +61626320202020202020202020202020202020202020202020 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +61 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +6162 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +616263 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +61626320 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +6162632020 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +61626320202020202020202020202020202020202020202020 +select @@collation_connection; +@@collation_connection +ujis_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +61 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +41 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +616263 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +6162 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +616263 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +6162632020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +2020636261 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +9E9D9CDFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFDF9C9D9E +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +ujis_bin +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +6141 +select hex(weight_string(cast(0xA1A1 as char))); +hex(weight_string(cast(0xA1A1 as char))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(1))) +A1A1 +select hex(weight_string(cast(0xA1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1 as char) as char(3))) +A1A12020 +select hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0xA1A1A1A1 as char) as char(3))) +A1A1A1A120 +select hex(weight_string(cast(0x40A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1 as char) as char(3))) +40A1A120 +select hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x40A1A1A1A1A1A1 as char) as char(3))) +40A1A1A1A1 +select hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))); +hex(weight_string(cast(0x4040A1A1A1A1A1A1 as char) as char(3))) +4040A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 2, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 2, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 2, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 2, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 2, 0xC0)) +A1A1A1A120 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 2, 0xC0)) +A1A1A1A1202020202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 3, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 3, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 3, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 3, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 3, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 3, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 1, 4, 0xC0)) +A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 2, 4, 0xC0)) +A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 3, 4, 0xC0)) +A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 4, 4, 0xC0)) +A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char), 5, 4, 0xC0)) +A1A1A1A1A1 +select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0)) +A1A1A1A1A1A120202020202020202020202020202020202020 +select collation(cast(0xA1A1 as char)); +collation(cast(0xA1A1 as char)) +ujis_bin +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +6141 +select hex(weight_string(cast(0x8EA1 as char))); +hex(weight_string(cast(0x8EA1 as char))) +8EA1 +select hex(weight_string(cast(0x8EA1 as char) as char(1))); +hex(weight_string(cast(0x8EA1 as char) as char(1))) +8EA1 +select hex(weight_string(cast(0x8EA18EA1 as char) as char(1))); +hex(weight_string(cast(0x8EA18EA1 as char) as char(1))) +8EA1 +select hex(weight_string(cast(0x8EA1 as char) as char(3))); +hex(weight_string(cast(0x8EA1 as char) as char(3))) +8EA12020 +select hex(weight_string(cast(0x8EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x8EA18EA1 as char) as char(3))) +8EA18EA120 +select hex(weight_string(cast(0x408EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA1 as char) as char(3))) +408EA120 +select hex(weight_string(cast(0x408EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA18EA1 as char) as char(3))) +408EA18EA1 +select hex(weight_string(cast(0x408EA18EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x408EA18EA18EA1 as char) as char(3))) +408EA18EA1 +select hex(weight_string(cast(0x40408EA18EA18EA1 as char) as char(3))); +hex(weight_string(cast(0x40408EA18EA18EA1 as char) as char(3))) +40408EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 2, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 2, 0xC0)) +8EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 2, 0xC0)) +8EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 2, 0xC0)) +8EA18EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 2, 0xC0)) +8EA18EA120 +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 2, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 2, 0xC0)) +8EA18EA1202020202020202020202020202020202020202020 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 3, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 3, 0xC0)) +8EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 3, 0xC0)) +8EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 3, 0xC0)) +8EA18EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 3, 0xC0)) +8EA18EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 3, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 3, 0xC0)) +8EA18EA18EA120202020202020202020202020202020202020 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 4, 0xC0)) +8E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 4, 0xC0)) +8EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 4, 0xC0)) +8EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 4, 0xC0)) +8EA18EA1 +select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 4, 0xC0)) +8EA18EA18E +select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0)); +hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0)) +8EA18EA18EA120202020202020202020202020202020202020 +select collation(cast(0x8FA2C3 as char)); +collation(cast(0x8FA2C3 as char)) +ujis_bin +select hex(weight_string(cast(0x6141 as char))); +hex(weight_string(cast(0x6141 as char))) +6141 +select hex(weight_string(cast(0x8FA2C3 as char))); +hex(weight_string(cast(0x8FA2C3 as char))) +8FA2C3 +select hex(weight_string(cast(0x8FA2C3 as char) as char(1))); +hex(weight_string(cast(0x8FA2C3 as char) as char(1))) +8FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C3 as char) as char(1))); +hex(weight_string(cast(0x8FA2C38FA2C3 as char) as char(1))) +8FA2C3 +select hex(weight_string(cast(0x8FA2C3 as char) as char(3))); +hex(weight_string(cast(0x8FA2C3 as char) as char(3))) +8FA2C32020 +select hex(weight_string(cast(0x8FA2C38FA2C3 as char) as char(3))); +hex(weight_string(cast(0x8FA2C38FA2C3 as char) as char(3))) +8FA2C38FA2C320 +select hex(weight_string(cast(0x408FA2C3 as char) as char(3))); +hex(weight_string(cast(0x408FA2C3 as char) as char(3))) +408FA2C320 +select hex(weight_string(cast(0x408FA2C38FA2C3 as char) as char(3))); +hex(weight_string(cast(0x408FA2C38FA2C3 as char) as char(3))) +408FA2C38FA2C3 +select hex(weight_string(cast(0x408FA2C38FA2C38FA2C3 as char) as char(3))); +hex(weight_string(cast(0x408FA2C38FA2C38FA2C3 as char) as char(3))) +408FA2C38FA2C3 +select hex(weight_string(cast(0x40408FA2C38FA2C38FA2C3 as char) as char(3))); +hex(weight_string(cast(0x40408FA2C38FA2C38FA2C3 as char) as char(3))) +40408FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 2, 0xC0)) +8F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 2, 0xC0)) +8FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 2, 0xC0)) +8FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 2, 0xC0)) +8FA2C38F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 2, 0xC0)) +8FA2C38FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 2, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 2, 0xC0)) +8FA2C38FA2C320202020202020202020202020202020202020 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 3, 0xC0)) +8F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 3, 0xC0)) +8FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 3, 0xC0)) +8FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 3, 0xC0)) +8FA2C38F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 3, 0xC0)) +8FA2C38FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 3, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 3, 0xC0)) +8FA2C38FA2C38FA2C320202020202020202020202020202020 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 1, 4, 0xC0)) +8F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 2, 4, 0xC0)) +8FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 3, 4, 0xC0)) +8FA2C3 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 4, 4, 0xC0)) +8FA2C38F +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char), 5, 4, 0xC0)) +8FA2C38FA2 +select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 4, 0xC0)); +hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 4, 0xC0)) +8FA2C38FA2C38FA2C320202020202020202020202020202020 +# +# End of 5.6 tests +# +# +# Start of 10.0 tests +# +# +# MDEV-6776 ujis and eucjmps erroneously accept 0x8EA0 as a valid byte sequence +# +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ujis); +INSERT INTO t1 VALUES (0x8EA0); +SELECT HEX(a), CHAR_LENGTH(a) FROM t1; +HEX(a) CHAR_LENGTH(a) + 0 +DROP TABLE t1; +SELECT _ujis 0x8EA0; +ERROR HY000: Invalid ujis character string: '8EA0' +# +# End of 10.0 tests +# diff --git a/mysql-test/r/ctype_upgrade.result b/mysql-test/r/ctype_upgrade.result new file mode 100644 index 00000000000..6bef89f6cd6 --- /dev/null +++ b/mysql-test/r/ctype_upgrade.result @@ -0,0 +1,397 @@ +call mtr.add_suppression("Table rebuild required"); +# +# Upgrade from Maria-5.3.13: +# Checking utf8_croatian_ci in a VARCHAR column +# +# Copying maria050313_utf8_croatian_ci.* to MYSQLD_DATADIR +CHECK TABLE maria050313_utf8_croatian_ci FOR UPGRADE; +Table Op Msg_type Msg_text +test.maria050313_utf8_croatian_ci check error Table upgrade required. Please do "REPAIR TABLE `maria050313_utf8_croatian_ci`" or dump/reload to fix it! +SHOW CREATE TABLE maria050313_utf8_croatian_ci; +ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.maria050313_utf8_croatian_c` FORCE" or dump/reload to fix it! +REPAIR TABLE maria050313_utf8_croatian_ci; +Table Op Msg_type Msg_text +test.maria050313_utf8_croatian_ci repair status OK +CHECK TABLE maria050313_utf8_croatian_ci FOR UPGRADE; +Table Op Msg_type Msg_text +test.maria050313_utf8_croatian_ci check status OK +SHOW CREATE TABLE maria050313_utf8_croatian_ci; +Table Create Table +maria050313_utf8_croatian_ci CREATE TABLE `maria050313_utf8_croatian_ci` ( + `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_croatian_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT count(*) FROM maria050313_utf8_croatian_ci; +count(*) +4 +DROP TABLE maria050313_utf8_croatian_ci; +# Copying maria050313_utf8_croatian_ci.* to MYSQLD_DATADIR +ALTER TABLE maria050313_utf8_croatian_ci FORCE; +SHOW CREATE TABLE maria050313_utf8_croatian_ci; +Table Create Table +maria050313_utf8_croatian_ci CREATE TABLE `maria050313_utf8_croatian_ci` ( + `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_croatian_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM maria050313_utf8_croatian_ci GROUP BY a; +GROUP_CONCAT(a ORDER BY BINARY a) +nJ +NJ,Nj,nj +DROP TABLE maria050313_utf8_croatian_ci; +# +# Upgrade from Maria-5.3.13: +# Checking ucs2_croatian_ci in the table default collation +# +# Copying maria050313_ucs2_croatian_ci.* to MYSQLD_DATADIR +CHECK TABLE maria050313_ucs2_croatian_ci_def FOR UPGRADE; +Table Op Msg_type Msg_text +test.maria050313_ucs2_croatian_ci_def check error Table upgrade required. Please do "REPAIR TABLE `maria050313_ucs2_croatian_ci_def`" or dump/reload to fix it! +SELECT count(*) FROM maria050313_ucs2_croatian_ci_def; +ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.maria050313_ucs2_croatian_c` FORCE" or dump/reload to fix it! +REPAIR TABLE maria050313_ucs2_croatian_ci_def; +Table Op Msg_type Msg_text +test.maria050313_ucs2_croatian_ci_def repair status OK +SHOW CREATE TABLE maria050313_ucs2_croatian_ci_def; +Table Create Table +maria050313_ucs2_croatian_ci_def CREATE TABLE `maria050313_ucs2_croatian_ci_def` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_croatian_ci +DROP TABLE maria050313_ucs2_croatian_ci_def; +# Copying maria050313_ucs2_croatian_ci.* to MYSQLD_DATADIR +CHECK TABLE maria050313_ucs2_croatian_ci_def; +Table Op Msg_type Msg_text +test.maria050313_ucs2_croatian_ci_def check error Table upgrade required. Please do "REPAIR TABLE `maria050313_ucs2_croatian_ci_def`" or dump/reload to fix it! +REPAIR TABLE maria050313_ucs2_croatian_ci_def; +Table Op Msg_type Msg_text +test.maria050313_ucs2_croatian_ci_def repair status OK +CHECK TABLE maria050313_ucs2_croatian_ci_def; +Table Op Msg_type Msg_text +test.maria050313_ucs2_croatian_ci_def check status OK +SHOW CREATE TABLE maria050313_ucs2_croatian_ci_def; +Table Create Table +maria050313_ucs2_croatian_ci_def CREATE TABLE `maria050313_ucs2_croatian_ci_def` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_croatian_ci +SELECT * FROM maria050313_ucs2_croatian_ci_def ORDER BY a; +a +1 +2 +3 +DROP TABLE maria050313_ucs2_croatian_ci_def; +# +# Upgrade from Maria-5.5.33 +# Checking utf8_croatian_ci, utf8mb4_croatian_ci, ucs2_croatian_ci, +# utf16_croatian_ci, utf32_croatian_ci +# +# Copying maria050533_xxx_croatian_ci.* to MYSQLD_DATADIR +CHECK TABLE maria050533_xxx_croatian_ci FOR UPGRADE; +Table Op Msg_type Msg_text +test.maria050533_xxx_croatian_ci check error Table upgrade required. Please do "REPAIR TABLE `maria050533_xxx_croatian_ci`" or dump/reload to fix it! +REPAIR TABLE maria050533_xxx_croatian_ci; +Table Op Msg_type Msg_text +test.maria050533_xxx_croatian_ci repair status OK +SHOW CREATE TABLE maria050533_xxx_croatian_ci; +Table Create Table +maria050533_xxx_croatian_ci CREATE TABLE `maria050533_xxx_croatian_ci` ( + `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_croatian_ci DEFAULT NULL, + `b` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_croatian_ci DEFAULT NULL, + `c` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_croatian_ci DEFAULT NULL, + `d` varchar(10) CHARACTER SET utf16 COLLATE utf16_croatian_ci DEFAULT NULL, + `e` varchar(10) CHARACTER SET utf32 COLLATE utf32_croatian_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT count(*) FROM maria050533_xxx_croatian_ci; +count(*) +4 +DROP TABLE maria050533_xxx_croatian_ci; +# Copying maria050533_xxx_croatian_ci.* to MYSQLD_DATADIR +ALTER TABLE maria050533_xxx_croatian_ci FORCE; +SHOW CREATE TABLE maria050533_xxx_croatian_ci; +Table Create Table +maria050533_xxx_croatian_ci CREATE TABLE `maria050533_xxx_croatian_ci` ( + `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_croatian_ci DEFAULT NULL, + `b` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_croatian_ci DEFAULT NULL, + `c` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_croatian_ci DEFAULT NULL, + `d` varchar(10) CHARACTER SET utf16 COLLATE utf16_croatian_ci DEFAULT NULL, + `e` varchar(10) CHARACTER SET utf32 COLLATE utf32_croatian_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM maria050533_xxx_croatian_ci GROUP BY a; +GROUP_CONCAT(a ORDER BY BINARY a) +nJ +NJ,Nj,nj +SELECT GROUP_CONCAT(b ORDER BY BINARY b) FROM maria050533_xxx_croatian_ci GROUP BY b; +GROUP_CONCAT(b ORDER BY BINARY b) +nJ +NJ,Nj,nj +SELECT GROUP_CONCAT(c ORDER BY BINARY c) FROM maria050533_xxx_croatian_ci GROUP BY c; +GROUP_CONCAT(c ORDER BY BINARY c) +nJ +NJ,Nj,nj +SELECT GROUP_CONCAT(d ORDER BY BINARY d) FROM maria050533_xxx_croatian_ci GROUP BY d; +GROUP_CONCAT(d ORDER BY BINARY d) +nJ +NJ,Nj,nj +SELECT GROUP_CONCAT(e ORDER BY BINARY e) FROM maria050533_xxx_croatian_ci GROUP BY e; +GROUP_CONCAT(e ORDER BY BINARY e) +nJ +NJ,Nj,nj +DROP TABLE maria050533_xxx_croatian_ci; +# +# Upgrade from Maria-10.0.4 +# Checking utf8_croatian_ci, utf8mb4_croatian_ci, ucs2_croatian_ci, +# utf16_croatian_ci, utf32_croatian_ci +# +# Copying maria100004_xxx_croatian_ci.* to MYSQLD_DATADIR +CHECK TABLE maria100004_xxx_croatian_ci FOR UPGRADE; +Table Op Msg_type Msg_text +test.maria100004_xxx_croatian_ci check error Table upgrade required. Please do "REPAIR TABLE `maria100004_xxx_croatian_ci`" or dump/reload to fix it! +SELECT count(*) FROM maria100004_xxx_croatian_ci; +ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.maria100004_xxx_croatian_ci` FORCE" or dump/reload to fix it! +REPAIR TABLE maria100004_xxx_croatian_ci; +Table Op Msg_type Msg_text +test.maria100004_xxx_croatian_ci repair status OK +SHOW CREATE TABLE maria100004_xxx_croatian_ci; +Table Create Table +maria100004_xxx_croatian_ci CREATE TABLE `maria100004_xxx_croatian_ci` ( + `a` varchar(10) COLLATE utf8_croatian_ci DEFAULT NULL, + `b` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_croatian_ci DEFAULT NULL, + `c` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_croatian_ci DEFAULT NULL, + `d` varchar(10) CHARACTER SET utf16 COLLATE utf16_croatian_ci DEFAULT NULL, + `e` varchar(10) CHARACTER SET utf32 COLLATE utf32_croatian_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_croatian_ci +DROP TABLE maria100004_xxx_croatian_ci; +# Copying maria100004_xxx_croatian_ci.* to MYSQLD_DATADIR +ALTER TABLE maria100004_xxx_croatian_ci FORCE; +SHOW CREATE TABLE maria100004_xxx_croatian_ci; +Table Create Table +maria100004_xxx_croatian_ci CREATE TABLE `maria100004_xxx_croatian_ci` ( + `a` varchar(10) COLLATE utf8_croatian_ci DEFAULT NULL, + `b` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_croatian_ci DEFAULT NULL, + `c` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_croatian_ci DEFAULT NULL, + `d` varchar(10) CHARACTER SET utf16 COLLATE utf16_croatian_ci DEFAULT NULL, + `e` varchar(10) CHARACTER SET utf32 COLLATE utf32_croatian_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_croatian_ci +SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM maria100004_xxx_croatian_ci GROUP BY a; +GROUP_CONCAT(a ORDER BY BINARY a) +nJ +NJ,Nj,nj +SELECT GROUP_CONCAT(b ORDER BY BINARY b) FROM maria100004_xxx_croatian_ci GROUP BY b; +GROUP_CONCAT(b ORDER BY BINARY b) +nJ +NJ,Nj,nj +SELECT GROUP_CONCAT(c ORDER BY BINARY c) FROM maria100004_xxx_croatian_ci GROUP BY c; +GROUP_CONCAT(c ORDER BY BINARY c) +nJ +NJ,Nj,nj +SELECT GROUP_CONCAT(d ORDER BY BINARY d) FROM maria100004_xxx_croatian_ci GROUP BY d; +GROUP_CONCAT(d ORDER BY BINARY d) +nJ +NJ,Nj,nj +SELECT GROUP_CONCAT(e ORDER BY BINARY e) FROM maria100004_xxx_croatian_ci GROUP BY e; +GROUP_CONCAT(e ORDER BY BINARY e) +nJ +NJ,Nj,nj +DROP TABLE maria100004_xxx_croatian_ci; +# +# Upgrade from MySQL-5.6.14 +# Checking utf8_croatian_ci, utf8mb4_croatian_ci, ucs2_croatian_ci, +# utf16_croatian_ci, utf32_croatian_ci +# +# Copying mysql050614_xxx_croatian_ci.* to MYSQLD_DATADIR +CHECK TABLE mysql050614_xxx_croatian_ci FOR UPGRADE; +Table Op Msg_type Msg_text +test.mysql050614_xxx_croatian_ci check status OK +SHOW CREATE TABLE mysql050614_xxx_croatian_ci; +Table Create Table +mysql050614_xxx_croatian_ci CREATE TABLE `mysql050614_xxx_croatian_ci` ( + `a` varchar(10) COLLATE utf8_croatian_mysql561_ci DEFAULT NULL, + `b` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_croatian_mysql561_ci DEFAULT NULL, + `c` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_croatian_mysql561_ci DEFAULT NULL, + `d` varchar(10) CHARACTER SET utf16 COLLATE utf16_croatian_mysql561_ci DEFAULT NULL, + `e` varchar(10) CHARACTER SET utf32 COLLATE utf32_croatian_mysql561_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_croatian_mysql561_ci +SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM mysql050614_xxx_croatian_ci GROUP BY a; +GROUP_CONCAT(a ORDER BY BINARY a) +NJ,Nj,nJ,nj +SELECT GROUP_CONCAT(b ORDER BY BINARY b) FROM mysql050614_xxx_croatian_ci GROUP BY b; +GROUP_CONCAT(b ORDER BY BINARY b) +NJ,Nj,nJ,nj +SELECT GROUP_CONCAT(c ORDER BY BINARY c) FROM mysql050614_xxx_croatian_ci GROUP BY c; +GROUP_CONCAT(c ORDER BY BINARY c) +NJ,Nj,nJ,nj +SELECT GROUP_CONCAT(d ORDER BY BINARY d) FROM mysql050614_xxx_croatian_ci GROUP BY d; +GROUP_CONCAT(d ORDER BY BINARY d) +NJ,Nj,nJ,nj +SELECT GROUP_CONCAT(e ORDER BY BINARY e) FROM mysql050614_xxx_croatian_ci GROUP BY e; +GROUP_CONCAT(e ORDER BY BINARY e) +NJ,Nj,nJ,nj +DROP TABLE mysql050614_xxx_croatian_ci; +# +# Checking mysql_upgrade +# +# Running mysql_upgrade +Phase 1/6: Checking and upgrading mysql database +Processing databases +mysql +mysql.column_stats OK +mysql.columns_priv OK +mysql.db OK +mysql.event OK +mysql.func OK +mysql.gtid_slave_pos OK +mysql.help_category OK +mysql.help_keyword OK +mysql.help_relation OK +mysql.help_topic OK +mysql.host OK +mysql.index_stats OK +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK +mysql.plugin OK +mysql.proc OK +mysql.procs_priv OK +mysql.proxies_priv OK +mysql.roles_mapping OK +mysql.servers OK +mysql.table_stats OK +mysql.tables_priv OK +mysql.time_zone OK +mysql.time_zone_leap_second OK +mysql.time_zone_name OK +mysql.time_zone_transition OK +mysql.time_zone_transition_type OK +mysql.user OK +Phase 2/6: Fixing views +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names +Phase 5/6: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK +performance_schema +test +test.maria050313_ucs2_croatian_ci_def Needs upgrade +test.maria050313_utf8_croatian_ci Needs upgrade +test.maria050533_xxx_croatian_ci Needs upgrade +test.maria100004_xxx_croatian_ci Needs upgrade +test.mysql050614_xxx_croatian_ci OK + +Repairing tables +test.maria050313_ucs2_croatian_ci_def OK +test.maria050313_utf8_croatian_ci OK +test.maria050533_xxx_croatian_ci OK +test.maria100004_xxx_croatian_ci OK +Phase 6/6: Running 'FLUSH PRIVILEGES' +OK +# Running mysql_upgrade for the second time +# This should report OK for all tables +Phase 1/6: Checking and upgrading mysql database +Processing databases +mysql +mysql.column_stats OK +mysql.columns_priv OK +mysql.db OK +mysql.event OK +mysql.func OK +mysql.gtid_slave_pos OK +mysql.help_category OK +mysql.help_keyword OK +mysql.help_relation OK +mysql.help_topic OK +mysql.host OK +mysql.index_stats OK +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK +mysql.plugin OK +mysql.proc OK +mysql.procs_priv OK +mysql.proxies_priv OK +mysql.roles_mapping OK +mysql.servers OK +mysql.table_stats OK +mysql.tables_priv OK +mysql.time_zone OK +mysql.time_zone_leap_second OK +mysql.time_zone_name OK +mysql.time_zone_transition OK +mysql.time_zone_transition_type OK +mysql.user OK +Phase 2/6: Fixing views +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names +Phase 5/6: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK +performance_schema +test +test.maria050313_ucs2_croatian_ci_def OK +test.maria050313_utf8_croatian_ci OK +test.maria050533_xxx_croatian_ci OK +test.maria100004_xxx_croatian_ci OK +test.mysql050614_xxx_croatian_ci OK +Phase 6/6: Running 'FLUSH PRIVILEGES' +OK +SHOW CREATE TABLE maria050313_ucs2_croatian_ci_def; +Table Create Table +maria050313_ucs2_croatian_ci_def CREATE TABLE `maria050313_ucs2_croatian_ci_def` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_croatian_ci +SELECT * FROM maria050313_ucs2_croatian_ci_def ORDER BY a; +a +1 +2 +3 +SHOW CREATE TABLE maria050313_utf8_croatian_ci; +Table Create Table +maria050313_utf8_croatian_ci CREATE TABLE `maria050313_utf8_croatian_ci` ( + `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_croatian_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM maria050313_utf8_croatian_ci GROUP BY a; +GROUP_CONCAT(a ORDER BY BINARY a) +nJ +NJ,Nj,nj +SHOW CREATE TABLE maria050533_xxx_croatian_ci; +Table Create Table +maria050533_xxx_croatian_ci CREATE TABLE `maria050533_xxx_croatian_ci` ( + `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_croatian_ci DEFAULT NULL, + `b` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_croatian_ci DEFAULT NULL, + `c` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_croatian_ci DEFAULT NULL, + `d` varchar(10) CHARACTER SET utf16 COLLATE utf16_croatian_ci DEFAULT NULL, + `e` varchar(10) CHARACTER SET utf32 COLLATE utf32_croatian_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM maria050533_xxx_croatian_ci GROUP BY a; +GROUP_CONCAT(a ORDER BY BINARY a) +nJ +NJ,Nj,nj +SHOW CREATE TABLE maria100004_xxx_croatian_ci; +Table Create Table +maria100004_xxx_croatian_ci CREATE TABLE `maria100004_xxx_croatian_ci` ( + `a` varchar(10) COLLATE utf8_croatian_ci DEFAULT NULL, + `b` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_croatian_ci DEFAULT NULL, + `c` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_croatian_ci DEFAULT NULL, + `d` varchar(10) CHARACTER SET utf16 COLLATE utf16_croatian_ci DEFAULT NULL, + `e` varchar(10) CHARACTER SET utf32 COLLATE utf32_croatian_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_croatian_ci +SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM maria100004_xxx_croatian_ci GROUP BY a; +GROUP_CONCAT(a ORDER BY BINARY a) +nJ +NJ,Nj,nj +SHOW CREATE TABLE mysql050614_xxx_croatian_ci; +Table Create Table +mysql050614_xxx_croatian_ci CREATE TABLE `mysql050614_xxx_croatian_ci` ( + `a` varchar(10) COLLATE utf8_croatian_mysql561_ci DEFAULT NULL, + `b` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_croatian_mysql561_ci DEFAULT NULL, + `c` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_croatian_mysql561_ci DEFAULT NULL, + `d` varchar(10) CHARACTER SET utf16 COLLATE utf16_croatian_mysql561_ci DEFAULT NULL, + `e` varchar(10) CHARACTER SET utf32 COLLATE utf32_croatian_mysql561_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_croatian_mysql561_ci +SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM mysql050614_xxx_croatian_ci GROUP BY a; +GROUP_CONCAT(a ORDER BY BINARY a) +NJ,Nj,nJ,nj +DROP TABLE maria050313_ucs2_croatian_ci_def; +DROP TABLE maria050313_utf8_croatian_ci; +DROP TABLE maria050533_xxx_croatian_ci; +DROP TABLE maria100004_xxx_croatian_ci; +DROP TABLE mysql050614_xxx_croatian_ci; diff --git a/mysql-test/r/ctype_utf16.result b/mysql-test/r/ctype_utf16.result index 0846811e2e6..958ade902df 100644 --- a/mysql-test/r/ctype_utf16.result +++ b/mysql-test/r/ctype_utf16.result @@ -600,6 +600,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf16_general_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf16_general_ci @@ -647,6 +698,57 @@ i 1 DROP TABLE t1; # +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf16_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; +# # Bug#55980 Character sets: supplementary character _bin ordering is wrong # CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a LIMIT 0; @@ -970,6 +1072,182 @@ Warning 1292 Truncated incorrect DOUBLE value: '1.2xxx' select left('aaa','1'); left('aaa','1') a +# +# Testing cs->cset->strtoll10() +# +SELECT @@character_set_connection; +@@character_set_connection +utf16 +SELECT CAST('1' AS UNSIGNED); +CAST('1' AS UNSIGNED) +1 +SELECT CAST('12' AS UNSIGNED); +CAST('12' AS UNSIGNED) +12 +SELECT CAST('123' AS UNSIGNED); +CAST('123' AS UNSIGNED) +123 +SELECT CAST('1234' AS UNSIGNED); +CAST('1234' AS UNSIGNED) +1234 +SELECT CAST('12345' AS UNSIGNED); +CAST('12345' AS UNSIGNED) +12345 +SELECT CAST('123456' AS UNSIGNED); +CAST('123456' AS UNSIGNED) +123456 +SELECT CAST('1234567' AS UNSIGNED); +CAST('1234567' AS UNSIGNED) +1234567 +SELECT CAST('12345678' AS UNSIGNED); +CAST('12345678' AS UNSIGNED) +12345678 +SELECT CAST('123456789' AS UNSIGNED); +CAST('123456789' AS UNSIGNED) +123456789 +SELECT CAST('1234567891' AS UNSIGNED); +CAST('1234567891' AS UNSIGNED) +1234567891 +SELECT CAST('12345678912' AS UNSIGNED); +CAST('12345678912' AS UNSIGNED) +12345678912 +SELECT CAST('123456789123' AS UNSIGNED); +CAST('123456789123' AS UNSIGNED) +123456789123 +SELECT CAST('1234567891234' AS UNSIGNED); +CAST('1234567891234' AS UNSIGNED) +1234567891234 +SELECT CAST('12345678912345' AS UNSIGNED); +CAST('12345678912345' AS UNSIGNED) +12345678912345 +SELECT CAST('123456789123456' AS UNSIGNED); +CAST('123456789123456' AS UNSIGNED) +123456789123456 +SELECT CAST('1234567891234567' AS UNSIGNED); +CAST('1234567891234567' AS UNSIGNED) +1234567891234567 +SELECT CAST('12345678912345678' AS UNSIGNED); +CAST('12345678912345678' AS UNSIGNED) +12345678912345678 +SELECT CAST('123456789123456789' AS UNSIGNED); +CAST('123456789123456789' AS UNSIGNED) +123456789123456789 +SELECT CAST('1234567891234567891' AS UNSIGNED); +CAST('1234567891234567891' AS UNSIGNED) +1234567891234567891 +SELECT CAST('12345678912345678912' AS UNSIGNED); +CAST('12345678912345678912' AS UNSIGNED) +12345678912345678912 +SELECT CAST('123456789123456789123' AS UNSIGNED); +CAST('123456789123456789123' AS UNSIGNED) +18446744073709551615 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789123456789123' +SELECT CAST('1x' AS UNSIGNED); +CAST('1x' AS UNSIGNED) +1 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1x' +SELECT CAST('12x' AS UNSIGNED); +CAST('12x' AS UNSIGNED) +12 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12x' +SELECT CAST('123x' AS UNSIGNED); +CAST('123x' AS UNSIGNED) +123 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123x' +SELECT CAST('1234x' AS UNSIGNED); +CAST('1234x' AS UNSIGNED) +1234 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234x' +SELECT CAST('12345x' AS UNSIGNED); +CAST('12345x' AS UNSIGNED) +12345 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345x' +SELECT CAST('123456x' AS UNSIGNED); +CAST('123456x' AS UNSIGNED) +123456 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456x' +SELECT CAST('1234567x' AS UNSIGNED); +CAST('1234567x' AS UNSIGNED) +1234567 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234567x' +SELECT CAST('12345678x' AS UNSIGNED); +CAST('12345678x' AS UNSIGNED) +12345678 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345678x' +SELECT CAST('123456789x' AS UNSIGNED); +CAST('123456789x' AS UNSIGNED) +123456789 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789x' +SELECT CAST('1234567891x' AS UNSIGNED); +CAST('1234567891x' AS UNSIGNED) +1234567891 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234567891x' +SELECT CAST('12345678912x' AS UNSIGNED); +CAST('12345678912x' AS UNSIGNED) +12345678912 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345678912x' +SELECT CAST('123456789123x' AS UNSIGNED); +CAST('123456789123x' AS UNSIGNED) +123456789123 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789123x' +SELECT CAST('1234567891234x' AS UNSIGNED); +CAST('1234567891234x' AS UNSIGNED) +1234567891234 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234567891234x' +SELECT CAST('12345678912345x' AS UNSIGNED); +CAST('12345678912345x' AS UNSIGNED) +12345678912345 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345678912345x' +SELECT CAST('123456789123456x' AS UNSIGNED); +CAST('123456789123456x' AS UNSIGNED) +123456789123456 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789123456x' +SELECT CAST('1234567891234567x' AS UNSIGNED); +CAST('1234567891234567x' AS UNSIGNED) +1234567891234567 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234567891234567x' +SELECT CAST('12345678912345678x' AS UNSIGNED); +CAST('12345678912345678x' AS UNSIGNED) +12345678912345678 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345678912345678x' +SELECT CAST('123456789123456789x' AS UNSIGNED); +CAST('123456789123456789x' AS UNSIGNED) +123456789123456789 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789123456789x' +SELECT CAST('1234567891234567891x' AS UNSIGNED); +CAST('1234567891234567891x' AS UNSIGNED) +1234567891234567891 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234567891234567891x' +SELECT CAST('12345678912345678912x' AS UNSIGNED); +CAST('12345678912345678912x' AS UNSIGNED) +12345678912345678912 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345678912345678912x' +SELECT CAST('123456789123456789123x' AS UNSIGNED); +CAST('123456789123456789123x' AS UNSIGNED) +18446744073709551615 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789123456789123x' create table t1 (a int); insert into t1 values ('-1234.1e2'); insert into t1 values ('-1234.1e2xxxx'); @@ -1071,7 +1349,11 @@ NULL drop table t1; set names latin1; SET collation_connection=utf16_general_ci; +# +# Bug#32390 Character sets: casting utf32 to/from date doesn't work +# CREATE TABLE t1 AS SELECT repeat('a',20) AS s1 LIMIT 0; +SET time_zone=_latin1'+03:00'; SET timestamp=1216359724; INSERT INTO t1 VALUES (current_date); INSERT INTO t1 VALUES (current_time); @@ -1083,6 +1365,99 @@ s1 hex(s1) 2008-07-18 08:42:04 0032003000300038002D00300037002D00310038002000300038003A00340032003A00300034 DROP TABLE t1; SET timestamp=0; +SET time_zone=default; +# +# MDEV-5298 Illegal mix of collations on timestamp +# +SELECT CHARSET('2013-11-15 00:41:28' - INTERVAL 7 DAY); +CHARSET('2013-11-15 00:41:28' - INTERVAL 7 DAY) +utf16 +SELECT COERCIBILITY('2013-11-15 00:41:28' - INTERVAL 7 DAY); +COERCIBILITY('2013-11-15 00:41:28' - INTERVAL 7 DAY) +4 +SELECT CHARSET(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY); +CHARSET(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY) +binary +SELECT COERCIBILITY(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY); +COERCIBILITY(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY) +5 +SELECT CHARSET(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)); +CHARSET(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)) +utf16 +SELECT COERCIBILITY(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)) +4 +SELECT CHARSET(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)); +CHARSET(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)) +utf16 +SELECT COERCIBILITY(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)) +4 +SELECT CHARSET(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)); +CHARSET(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)) +utf16 +SELECT COERCIBILITY(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)) +4 +SELECT HEX(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)); +HEX(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)) +0032003000300031002D00300031002D00300031002000300030003A00300030003A00300030 +SELECT CHARSET(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)); +CHARSET(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +utf16 +SELECT COERCIBILITY(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +4 +SELECT HEX(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)); +HEX(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +0032003000300031002D00300031002D00300031002000300030003A00300030003A00300030 +CREATE TABLE t1 AS SELECT REPEAT('a', 64) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(64) CHARACTER SET utf16 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (''); +SELECT CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +utf16 +SELECT COERCIBILITY(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +COERCIBILITY(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +2 +SELECT HEX(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +HEX(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +0032003000300031002D00300031002D00300031002000300030003A00300030003A00300030 +SELECT CHARSET(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +CHARSET(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +utf16 +SELECT COERCIBILITY(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +COERCIBILITY(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +2 +SELECT HEX(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +HEX(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +0032003000300031002D00300031002D00300031002000300030003A00300030003A00300030 +DROP TABLE t1; +CREATE TABLE t1 (t TIMESTAMP NOT NULL); +INSERT INTO t1 VALUES ('2001-01-01 00:00:00'); +SELECT * FROM t1 WHERE t < '2013-11-15 00:41:28' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t = '2001-01-08 00:00:00' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t < CONCAT('2013-11-15 00:41:28',LEFT(RAND(),0)) - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t = CONCAT('2001-01-08 00:00:00',LEFT(RAND(),0)) - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t < TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t = TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +DROP TABLE t1; SET NAMES latin1; SET collation_connection=utf16_general_ci; CREATE TABLE t1 AS SELECT repeat('a',2) as s1 LIMIT 0; @@ -1174,7 +1549,7 @@ SELECT space(date_add(101, INTERVAL CHAR('1' USING utf16) hour_second)); space(date_add(101, INTERVAL CHAR('1' USING utf16) hour_second)) NULL Warnings: -Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated +Warning 1301 Result of space() was larger than max_allowed_packet (1048576) - truncated # # Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT # @@ -1201,11 +1576,9 @@ Warning 1260 Row 1 was cut by GROUP_CONCAT() # MDEV-6865 Merge Bug#18935421 RPAD DIES WITH CERTAIN PADSTR INTPUTS.. # DO RPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999); -Warnings: -Warning 1300 Invalid utf16 character string: 'DE9899' +ERROR HY000: Invalid utf16 character string: 'DE9899' DO LPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999); -Warnings: -Warning 1300 Invalid utf16 character string: 'DE9899' +ERROR HY000: Invalid utf16 character string: 'DE9899' # # MDEV-11685: sql_mode can't be set with non-ascii connection charset # @@ -1219,3 +1592,548 @@ SET NAMES utf8; # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set collation_connection=utf16_general_ci; +select @@collation_connection; +@@collation_connection +utf16_general_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf16 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0041 +SELECT HEX(ws) FROM t2; +HEX(ws) +0041 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET utf16 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +00410041004100410041 +SELECT HEX(ws) FROM t2; +HEX(ws) +00410041004100410041 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +004100410041 +SELECT HEX(ws) FROM t2; +HEX(ws) +004100410041 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +0041004100410041004100200020002000200020 +SELECT HEX(ws) FROM t2; +HEX(ws) +0041004100410041004100200020002000200020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +0041 +select hex(weight_string('A')); +hex(weight_string('A')) +0041 +select hex(weight_string('abc')); +hex(weight_string('abc')) +004100420043 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +00410042 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +004100420043 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +00410042004300200020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +00 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0041 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +004100 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +00410042002000200020002000200020002000200020002000 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +00 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0041 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +004100 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +00410042004300200020002000200020002000200020002000 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +00 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0041 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +004100 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +00410042004300200020002000200020002000200020002000 +select @@collation_connection; +@@collation_connection +utf16_general_ci +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +20AC20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +20AC20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +20AC20AC20AC00200020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +20AC20AC00 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +20AC20AC002000200020002000200020002000200020002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +20AC20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +20AC20AC20AC00200020002000200020002000200020002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +20AC20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +20AC20AC20AC00200020002000200020002000200020002000 +select hex(weight_string(_utf16 0xD800DC00)); +hex(weight_string(_utf16 0xD800DC00)) +FFFD +select hex(weight_string(_utf16 0xD800DC01)); +hex(weight_string(_utf16 0xD800DC01)) +FFFD +select @@collation_connection; +@@collation_connection +utf16_general_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +0041 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +0041 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +004100420043 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +00410042 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +004100420043 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +00410042004300200020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +20002000430042004100 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +FFBEFFBDFFBCFFDFFFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFFFDFFFBCFFBDFFBEFF +set collation_connection=utf16_bin; +select @@collation_connection; +@@collation_connection +utf16_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +000061 +SELECT HEX(ws) FROM t2; +HEX(ws) +000061 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET utf16 COLLATE utf16_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(15) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +000061000061000061000061000061 +SELECT HEX(ws) FROM t2; +HEX(ws) +000061000061000061000061000061 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(9) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +000061000061000061 +SELECT HEX(ws) FROM t2; +HEX(ws) +000061000061000061 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(30) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +000061000061000061000061000061000020000020000020000020000020 +SELECT HEX(ws) FROM t2; +HEX(ws) +000061000061000061000061000061000020000020000020000020000020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +000061 +select hex(weight_string('A')); +hex(weight_string('A')) +000041 +select hex(weight_string('abc')); +hex(weight_string('abc')) +000061000062000063 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +000061000062 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +000061000062000063 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +000061000062000063000020000020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +00 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0000 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +000061 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +00006100 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0000610000 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +00006100006200002000002000002000002000002000002000 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +00 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0000 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +000061 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +00006100 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0000610000 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +00006100006200006300002000002000002000002000002000 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +00 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0000 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +000061 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +00006100 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0000610000 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +00006100006200006300002000002000002000002000002000 +select @@collation_connection; +@@collation_connection +utf16_bin +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +0020AC +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +0020AC0020AC0020AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +0020AC0020AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +0020AC0020AC0020AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +0020AC0020AC0020AC000020000020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +00 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +0020 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +0020AC +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +0020AC00 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +0020AC0020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +0020AC0020AC00002000002000002000002000002000002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +00 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +0020 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +0020AC +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +0020AC00 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +0020AC0020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +0020AC0020AC0020AC00002000002000002000002000002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +00 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +0020 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +0020AC +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +0020AC00 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +0020AC0020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +0020AC0020AC0020AC00002000002000002000002000002000 +select @@collation_connection; +@@collation_connection +utf16_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +000061 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +000041 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +000061000062000063 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +000061000062 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +000061000062000063 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +000061000062000063000020000020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +200000200000630000620000610000 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +FFFF9EFFFF9DFFFF9CFFFFDFFFFFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFFFFFDFFFFF9CFFFF9DFFFF9EFFFF +# +# End of 5.6 tests +# +# +# Start of 10.0 tests +# +# +# MDEV-6661 PI() does not work well in UCS2/UTF16/UTF32 context +# +SELECT CONCAT(CONVERT('pi=' USING utf16),PI()) AS PI; +PI +pi=3.141593 +# +# MDEV-6666 Malformed result for CONCAT(utf8_column, binary_string) +# +SET NAMES utf8mb4; +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf16); +INSERT INTO t1 VALUES ('a'); +SELECT CONCAT(a,0xD800) FROM t1; +ERROR HY000: Invalid utf16 character string: 'D800' +SELECT CONCAT(a,0xD800DC00) FROM t1; +CONCAT(a,0xD800DC00) +að€€ +SELECT CONCAT(a,0x00FF) FROM t1; +CONCAT(a,0x00FF) +aÿ +DROP TABLE t1; +SELECT CONCAT(_utf16'a' COLLATE utf16_unicode_ci, _binary 0xD800); +ERROR HY000: Invalid utf16 character string: 'D800' +PREPARE stmt FROM "SELECT CONCAT(_utf16'a' COLLATE utf16_unicode_ci, ?)"; +SET @arg00=_binary 0xD800; +EXECUTE stmt USING @arg00; +ERROR HY000: Invalid utf16 character string: 'D800' +SET @arg00=_binary 0xD800DC00; +EXECUTE stmt USING @arg00; +CONCAT(_utf16'a' COLLATE utf16_unicode_ci, ?) +að€€ +SET @arg00=_binary 0x00FF; +EXECUTE stmt USING @arg00; +CONCAT(_utf16'a' COLLATE utf16_unicode_ci, ?) +aÿ +DEALLOCATE PREPARE stmt; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/ctype_utf16_def.result b/mysql-test/r/ctype_utf16_def.result index 6514734cb38..98b6f7d913d 100644 --- a/mysql-test/r/ctype_utf16_def.result +++ b/mysql-test/r/ctype_utf16_def.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("'utf16' can not be used as client character set"); SHOW VARIABLES LIKE 'collation_server'; Variable_name Value collation_server utf16_general_ci diff --git a/mysql-test/r/ctype_utf16_uca.result b/mysql-test/r/ctype_utf16_uca.result index 1b0d541bc3c..e3ba73a9047 100644 --- a/mysql-test/r/ctype_utf16_uca.result +++ b/mysql-test/r/ctype_utf16_uca.result @@ -69,105 +69,128 @@ insert into t1 values ('W'),('w'); insert into t1 values ('X'),('x'); insert into t1 values ('Y'),('y'); insert into t1 values ('Z'),('z'); -insert into t1 values (0x00e0),(0x00c0); -insert into t1 values (0x00e1),(0x00c1); -insert into t1 values (0x00e2),(0x00c2); -insert into t1 values (0x00e3),(0x00c3); -insert into t1 values (0x00e4),(0x00c4); -insert into t1 values (0x00e5),(0x00c5); -insert into t1 values (0x00e6),(0x00c6); -insert into t1 values (0x00e7),(0x00c7); -insert into t1 values (0x00e8),(0x00c8); -insert into t1 values (0x00e9),(0x00c9); -insert into t1 values (0x00ea),(0x00ca); -insert into t1 values (0x00eb),(0x00cb); -insert into t1 values (0x00ec),(0x00cc); -insert into t1 values (0x00ed),(0x00cd); -insert into t1 values (0x00ee),(0x00ce); -insert into t1 values (0x00ef),(0x00cf); -insert into t1 values (0x00f0),(0x00d0); -insert into t1 values (0x00f1),(0x00d1); -insert into t1 values (0x00f2),(0x00d2); -insert into t1 values (0x00f3),(0x00d3); -insert into t1 values (0x00f4),(0x00d4); -insert into t1 values (0x00f5),(0x00d5); -insert into t1 values (0x00f6),(0x00d6); -insert into t1 values (0x00f7),(0x00d7); -insert into t1 values (0x00f8),(0x00d8); -insert into t1 values (0x00f9),(0x00d9); -insert into t1 values (0x00fa),(0x00da); -insert into t1 values (0x00fb),(0x00db); -insert into t1 values (0x00fc),(0x00dc); -insert into t1 values (0x00fd),(0x00dd); -insert into t1 values (0x00fe),(0x00de); -insert into t1 values (0x00ff),(0x00df); -insert into t1 values (0x0100),(0x0101),(0x0102),(0x0103); -insert into t1 values (0x0104),(0x0105),(0x0106),(0x0107); -insert into t1 values (0x0108),(0x0109),(0x010a),(0x010b); -insert into t1 values (0x010c),(0x010d),(0x010e),(0x010f); -insert into t1 values (0x0110),(0x0111),(0x0112),(0x0113); -insert into t1 values (0x0114),(0x0115),(0x0116),(0x0117); -insert into t1 values (0x0118),(0x0119),(0x011a),(0x011b); -insert into t1 values (0x011c),(0x011d),(0x011e),(0x011f); -insert into t1 values (0x0120),(0x0121),(0x0122),(0x0123); -insert into t1 values (0x0124),(0x0125),(0x0126),(0x0127); -insert into t1 values (0x0128),(0x0129),(0x012a),(0x012b); -insert into t1 values (0x012c),(0x012d),(0x012e),(0x012f); -insert into t1 values (0x0130),(0x0131),(0x0132),(0x0133); -insert into t1 values (0x0134),(0x0135),(0x0136),(0x0137); -insert into t1 values (0x0138),(0x0139),(0x013a),(0x013b); -insert into t1 values (0x013c),(0x013d),(0x013e),(0x013f); -insert into t1 values (0x0140),(0x0141),(0x0142),(0x0143); -insert into t1 values (0x0144),(0x0145),(0x0146),(0x0147); -insert into t1 values (0x0148),(0x0149),(0x014a),(0x014b); -insert into t1 values (0x014c),(0x014d),(0x014e),(0x014f); -insert into t1 values (0x0150),(0x0151),(0x0152),(0x0153); -insert into t1 values (0x0154),(0x0155),(0x0156),(0x0157); -insert into t1 values (0x0158),(0x0159),(0x015a),(0x015b); -insert into t1 values (0x015c),(0x015d),(0x015e),(0x015f); -insert into t1 values (0x0160),(0x0161),(0x0162),(0x0163); -insert into t1 values (0x0164),(0x0165),(0x0166),(0x0167); -insert into t1 values (0x0168),(0x0169),(0x016a),(0x016b); -insert into t1 values (0x016c),(0x016d),(0x016e),(0x016f); -insert into t1 values (0x0170),(0x0171),(0x0172),(0x0173); -insert into t1 values (0x0174),(0x0175),(0x0176),(0x0177); -insert into t1 values (0x0178),(0x0179),(0x017a),(0x017b); -insert into t1 values (0x017c),(0x017d),(0x017e),(0x017f); -insert into t1 values (0x0180),(0x0181),(0x0182),(0x0183); -insert into t1 values (0x0184),(0x0185),(0x0186),(0x0187); -insert into t1 values (0x0188),(0x0189),(0x018a),(0x018b); -insert into t1 values (0x018c),(0x018d),(0x018e),(0x018f); -insert into t1 values (0x0190),(0x0191),(0x0192),(0x0193); -insert into t1 values (0x0194),(0x0195),(0x0196),(0x0197); -insert into t1 values (0x0198),(0x0199),(0x019a),(0x019b); -insert into t1 values (0x019c),(0x019d),(0x019e),(0x019f); -insert into t1 values (0x01a0),(0x01a1),(0x01a2),(0x01a3); -insert into t1 values (0x01a4),(0x01a5),(0x01a6),(0x01a7); -insert into t1 values (0x01a8),(0x01a9),(0x01aa),(0x01ab); -insert into t1 values (0x01ac),(0x01ad),(0x01ae),(0x01af); -insert into t1 values (0x01b0),(0x01b1),(0x01b2),(0x01b3); -insert into t1 values (0x01b4),(0x01b5),(0x01b6),(0x01b7); -insert into t1 values (0x01b8),(0x01b9),(0x01ba),(0x01bb); -insert into t1 values (0x01bc),(0x01bd),(0x01be),(0x01bf); -insert into t1 values (0x01c0),(0x01c1),(0x01c2),(0x01c3); -insert into t1 values (0x01c4),(0x01c5),(0x01c6),(0x01c7); -insert into t1 values (0x01c8),(0x01c9),(0x01ca),(0x01cb); -insert into t1 values (0x01cc),(0x01cd),(0x01ce),(0x01cf); -insert into t1 values (0x01d0),(0x01d1),(0x01d2),(0x01d3); -insert into t1 values (0x01d4),(0x01d5),(0x01d6),(0x01d7); -insert into t1 values (0x01d8),(0x01d9),(0x01da),(0x01db); -insert into t1 values (0x01dc),(0x01dd),(0x01de),(0x01df); -insert into t1 values (0x01e0),(0x01e1),(0x01e2),(0x01e3); -insert into t1 values (0x01e4),(0x01e5),(0x01e6),(0x01e7); -insert into t1 values (0x01e8),(0x01e9),(0x01ea),(0x01eb); -insert into t1 values (0x01ec),(0x01ed),(0x01ee),(0x01ef); -insert into t1 values (0x01f0),(0x01f1),(0x01f2),(0x01f3); -insert into t1 values (0x01f4),(0x01f5),(0x01f6),(0x01f7); -insert into t1 values (0x01f8),(0x01f9),(0x01fa),(0x01fb); -insert into t1 values (0x01fc),(0x01fd),(0x01fe),(0x01ff); +insert into t1 values (_ucs2 0x00e0),(_ucs2 0x00c0); +insert into t1 values (_ucs2 0x00e1),(_ucs2 0x00c1); +insert into t1 values (_ucs2 0x00e2),(_ucs2 0x00c2); +insert into t1 values (_ucs2 0x00e3),(_ucs2 0x00c3); +insert into t1 values (_ucs2 0x00e4),(_ucs2 0x00c4); +insert into t1 values (_ucs2 0x00e5),(_ucs2 0x00c5); +insert into t1 values (_ucs2 0x00e6),(_ucs2 0x00c6); +insert into t1 values (_ucs2 0x00e7),(_ucs2 0x00c7); +insert into t1 values (_ucs2 0x00e8),(_ucs2 0x00c8); +insert into t1 values (_ucs2 0x00e9),(_ucs2 0x00c9); +insert into t1 values (_ucs2 0x00ea),(_ucs2 0x00ca); +insert into t1 values (_ucs2 0x00eb),(_ucs2 0x00cb); +insert into t1 values (_ucs2 0x00ec),(_ucs2 0x00cc); +insert into t1 values (_ucs2 0x00ed),(_ucs2 0x00cd); +insert into t1 values (_ucs2 0x00ee),(_ucs2 0x00ce); +insert into t1 values (_ucs2 0x00ef),(_ucs2 0x00cf); +insert into t1 values (_ucs2 0x00f0),(_ucs2 0x00d0); +insert into t1 values (_ucs2 0x00f1),(_ucs2 0x00d1); +insert into t1 values (_ucs2 0x00f2),(_ucs2 0x00d2); +insert into t1 values (_ucs2 0x00f3),(_ucs2 0x00d3); +insert into t1 values (_ucs2 0x00f4),(_ucs2 0x00d4); +insert into t1 values (_ucs2 0x00f5),(_ucs2 0x00d5); +insert into t1 values (_ucs2 0x00f6),(_ucs2 0x00d6); +insert into t1 values (_ucs2 0x00f7),(_ucs2 0x00d7); +insert into t1 values (_ucs2 0x00f8),(_ucs2 0x00d8); +insert into t1 values (_ucs2 0x00f9),(_ucs2 0x00d9); +insert into t1 values (_ucs2 0x00fa),(_ucs2 0x00da); +insert into t1 values (_ucs2 0x00fb),(_ucs2 0x00db); +insert into t1 values (_ucs2 0x00fc),(_ucs2 0x00dc); +insert into t1 values (_ucs2 0x00fd),(_ucs2 0x00dd); +insert into t1 values (_ucs2 0x00fe),(_ucs2 0x00de); +insert into t1 values (_ucs2 0x00ff),(_ucs2 0x00df); +insert into t1 values (_ucs2 0x0100),(_ucs2 0x0101),(_ucs2 0x0102),(_ucs2 0x0103); +insert into t1 values (_ucs2 0x0104),(_ucs2 0x0105),(_ucs2 0x0106),(_ucs2 0x0107); +insert into t1 values (_ucs2 0x0108),(_ucs2 0x0109),(_ucs2 0x010a),(_ucs2 0x010b); +insert into t1 values (_ucs2 0x010c),(_ucs2 0x010d),(_ucs2 0x010e),(_ucs2 0x010f); +insert into t1 values (_ucs2 0x0110),(_ucs2 0x0111),(_ucs2 0x0112),(_ucs2 0x0113); +insert into t1 values (_ucs2 0x0114),(_ucs2 0x0115),(_ucs2 0x0116),(_ucs2 0x0117); +insert into t1 values (_ucs2 0x0118),(_ucs2 0x0119),(_ucs2 0x011a),(_ucs2 0x011b); +insert into t1 values (_ucs2 0x011c),(_ucs2 0x011d),(_ucs2 0x011e),(_ucs2 0x011f); +insert into t1 values (_ucs2 0x0120),(_ucs2 0x0121),(_ucs2 0x0122),(_ucs2 0x0123); +insert into t1 values (_ucs2 0x0124),(_ucs2 0x0125),(_ucs2 0x0126),(_ucs2 0x0127); +insert into t1 values (_ucs2 0x0128),(_ucs2 0x0129),(_ucs2 0x012a),(_ucs2 0x012b); +insert into t1 values (_ucs2 0x012c),(_ucs2 0x012d),(_ucs2 0x012e),(_ucs2 0x012f); +insert into t1 values (_ucs2 0x0130),(_ucs2 0x0131),(_ucs2 0x0132),(_ucs2 0x0133); +insert into t1 values (_ucs2 0x0134),(_ucs2 0x0135),(_ucs2 0x0136),(_ucs2 0x0137); +insert into t1 values (_ucs2 0x0138),(_ucs2 0x0139),(_ucs2 0x013a),(_ucs2 0x013b); +insert into t1 values (_ucs2 0x013c),(_ucs2 0x013d),(_ucs2 0x013e),(_ucs2 0x013f); +insert into t1 values (_ucs2 0x0140),(_ucs2 0x0141),(_ucs2 0x0142),(_ucs2 0x0143); +insert into t1 values (_ucs2 0x0144),(_ucs2 0x0145),(_ucs2 0x0146),(_ucs2 0x0147); +insert into t1 values (_ucs2 0x0148),(_ucs2 0x0149),(_ucs2 0x014a),(_ucs2 0x014b); +insert into t1 values (_ucs2 0x014c),(_ucs2 0x014d),(_ucs2 0x014e),(_ucs2 0x014f); +insert into t1 values (_ucs2 0x0150),(_ucs2 0x0151),(_ucs2 0x0152),(_ucs2 0x0153); +insert into t1 values (_ucs2 0x0154),(_ucs2 0x0155),(_ucs2 0x0156),(_ucs2 0x0157); +insert into t1 values (_ucs2 0x0158),(_ucs2 0x0159),(_ucs2 0x015a),(_ucs2 0x015b); +insert into t1 values (_ucs2 0x015c),(_ucs2 0x015d),(_ucs2 0x015e),(_ucs2 0x015f); +insert into t1 values (_ucs2 0x0160),(_ucs2 0x0161),(_ucs2 0x0162),(_ucs2 0x0163); +insert into t1 values (_ucs2 0x0164),(_ucs2 0x0165),(_ucs2 0x0166),(_ucs2 0x0167); +insert into t1 values (_ucs2 0x0168),(_ucs2 0x0169),(_ucs2 0x016a),(_ucs2 0x016b); +insert into t1 values (_ucs2 0x016c),(_ucs2 0x016d),(_ucs2 0x016e),(_ucs2 0x016f); +insert into t1 values (_ucs2 0x0170),(_ucs2 0x0171),(_ucs2 0x0172),(_ucs2 0x0173); +insert into t1 values (_ucs2 0x0174),(_ucs2 0x0175),(_ucs2 0x0176),(_ucs2 0x0177); +insert into t1 values (_ucs2 0x0178),(_ucs2 0x0179),(_ucs2 0x017a),(_ucs2 0x017b); +insert into t1 values (_ucs2 0x017c),(_ucs2 0x017d),(_ucs2 0x017e),(_ucs2 0x017f); +insert into t1 values (_ucs2 0x0180),(_ucs2 0x0181),(_ucs2 0x0182),(_ucs2 0x0183); +insert into t1 values (_ucs2 0x0184),(_ucs2 0x0185),(_ucs2 0x0186),(_ucs2 0x0187); +insert into t1 values (_ucs2 0x0188),(_ucs2 0x0189),(_ucs2 0x018a),(_ucs2 0x018b); +insert into t1 values (_ucs2 0x018c),(_ucs2 0x018d),(_ucs2 0x018e),(_ucs2 0x018f); +insert into t1 values (_ucs2 0x0190),(_ucs2 0x0191),(_ucs2 0x0192),(_ucs2 0x0193); +insert into t1 values (_ucs2 0x0194),(_ucs2 0x0195),(_ucs2 0x0196),(_ucs2 0x0197); +insert into t1 values (_ucs2 0x0198),(_ucs2 0x0199),(_ucs2 0x019a),(_ucs2 0x019b); +insert into t1 values (_ucs2 0x019c),(_ucs2 0x019d),(_ucs2 0x019e),(_ucs2 0x019f); +insert into t1 values (_ucs2 0x01a0),(_ucs2 0x01a1),(_ucs2 0x01a2),(_ucs2 0x01a3); +insert into t1 values (_ucs2 0x01a4),(_ucs2 0x01a5),(_ucs2 0x01a6),(_ucs2 0x01a7); +insert into t1 values (_ucs2 0x01a8),(_ucs2 0x01a9),(_ucs2 0x01aa),(_ucs2 0x01ab); +insert into t1 values (_ucs2 0x01ac),(_ucs2 0x01ad),(_ucs2 0x01ae),(_ucs2 0x01af); +insert into t1 values (_ucs2 0x01b0),(_ucs2 0x01b1),(_ucs2 0x01b2),(_ucs2 0x01b3); +insert into t1 values (_ucs2 0x01b4),(_ucs2 0x01b5),(_ucs2 0x01b6),(_ucs2 0x01b7); +insert into t1 values (_ucs2 0x01b8),(_ucs2 0x01b9),(_ucs2 0x01ba),(_ucs2 0x01bb); +insert into t1 values (_ucs2 0x01bc),(_ucs2 0x01bd),(_ucs2 0x01be),(_ucs2 0x01bf); +insert into t1 values (_ucs2 0x01c0),(_ucs2 0x01c1),(_ucs2 0x01c2),(_ucs2 0x01c3); +insert into t1 values (_ucs2 0x01c4),(_ucs2 0x01c5),(_ucs2 0x01c6),(_ucs2 0x01c7); +insert into t1 values (_ucs2 0x01c8),(_ucs2 0x01c9),(_ucs2 0x01ca),(_ucs2 0x01cb); +insert into t1 values (_ucs2 0x01cc),(_ucs2 0x01cd),(_ucs2 0x01ce),(_ucs2 0x01cf); +insert into t1 values (_ucs2 0x01d0),(_ucs2 0x01d1),(_ucs2 0x01d2),(_ucs2 0x01d3); +insert into t1 values (_ucs2 0x01d4),(_ucs2 0x01d5),(_ucs2 0x01d6),(_ucs2 0x01d7); +insert into t1 values (_ucs2 0x01d8),(_ucs2 0x01d9),(_ucs2 0x01da),(_ucs2 0x01db); +insert into t1 values (_ucs2 0x01dc),(_ucs2 0x01dd),(_ucs2 0x01de),(_ucs2 0x01df); +insert into t1 values (_ucs2 0x01e0),(_ucs2 0x01e1),(_ucs2 0x01e2),(_ucs2 0x01e3); +insert into t1 values (_ucs2 0x01e4),(_ucs2 0x01e5),(_ucs2 0x01e6),(_ucs2 0x01e7); +insert into t1 values (_ucs2 0x01e8),(_ucs2 0x01e9),(_ucs2 0x01ea),(_ucs2 0x01eb); +insert into t1 values (_ucs2 0x01ec),(_ucs2 0x01ed),(_ucs2 0x01ee),(_ucs2 0x01ef); +insert into t1 values (_ucs2 0x01f0),(_ucs2 0x01f1),(_ucs2 0x01f2),(_ucs2 0x01f3); +insert into t1 values (_ucs2 0x01f4),(_ucs2 0x01f5),(_ucs2 0x01f6),(_ucs2 0x01f7); +insert into t1 values (_ucs2 0x01f8),(_ucs2 0x01f9),(_ucs2 0x01fa),(_ucs2 0x01fb); +insert into t1 values (_ucs2 0x01fc),(_ucs2 0x01fd),(_ucs2 0x01fe),(_ucs2 0x01ff); +INSERT INTO t1 VALUES (_ucs2 0x1EA0),(_ucs2 0x1EA1),(_ucs2 0x1EA2),(_ucs2 0x1EA3); +INSERT INTO t1 VALUES (_ucs2 0x1EA4),(_ucs2 0x1EA5),(_ucs2 0x1EA6),(_ucs2 0x1EA7); +INSERT INTO t1 VALUES (_ucs2 0x1EA8),(_ucs2 0x1EA9),(_ucs2 0x1EAA),(_ucs2 0x1EAB); +INSERT INTO t1 VALUES (_ucs2 0x1EAC),(_ucs2 0x1EAD),(_ucs2 0x1EAE),(_ucs2 0x1EAF); +INSERT INTO t1 VALUES (_ucs2 0x1EB0),(_ucs2 0x1EB1),(_ucs2 0x1EB2),(_ucs2 0x1EB3); +INSERT INTO t1 VALUES (_ucs2 0x1EB4),(_ucs2 0x1EB5),(_ucs2 0x1EB6),(_ucs2 0x1EB7); +INSERT INTO t1 VALUES (_ucs2 0x1EB8),(_ucs2 0x1EB9),(_ucs2 0x1EBA),(_ucs2 0x1EBB); +INSERT INTO t1 VALUES (_ucs2 0x1EBC),(_ucs2 0x1EBD),(_ucs2 0x1EBE),(_ucs2 0x1EBF); +INSERT INTO t1 VALUES (_ucs2 0x1EC0),(_ucs2 0x1EC1),(_ucs2 0x1EC2),(_ucs2 0x1EC3); +INSERT INTO t1 VALUES (_ucs2 0x1EC4),(_ucs2 0x1EC5),(_ucs2 0x1EC6),(_ucs2 0x1EC7); +INSERT INTO t1 VALUES (_ucs2 0x1EC8),(_ucs2 0x1EC9),(_ucs2 0x1ECA),(_ucs2 0x1ECB); +INSERT INTO t1 VALUES (_ucs2 0x1ECC),(_ucs2 0x1ECD),(_ucs2 0x1ECE),(_ucs2 0x1ECF); +INSERT INTO t1 VALUES (_ucs2 0x1ED0),(_ucs2 0x1ED1),(_ucs2 0x1ED2),(_ucs2 0x1ED3); +INSERT INTO t1 VALUES (_ucs2 0x1ED4),(_ucs2 0x1ED5),(_ucs2 0x1ED6),(_ucs2 0x1ED7); +INSERT INTO t1 VALUES (_ucs2 0x1ED8),(_ucs2 0x1ED9),(_ucs2 0x1EDA),(_ucs2 0x1EDB); +INSERT INTO t1 VALUES (_ucs2 0x1EDC),(_ucs2 0x1EDD),(_ucs2 0x1EDE),(_ucs2 0x1EDF); +INSERT INTO t1 VALUES (_ucs2 0x1EE0),(_ucs2 0x1EE1),(_ucs2 0x1EE2),(_ucs2 0x1EE3); +INSERT INTO t1 VALUES (_ucs2 0x1EE4),(_ucs2 0x1EE5),(_ucs2 0x1EE6),(_ucs2 0x1EE7); +INSERT INTO t1 VALUES (_ucs2 0x1EE8),(_ucs2 0x1EE9),(_ucs2 0x1EEA),(_ucs2 0x1EEB); +INSERT INTO t1 VALUES (_ucs2 0x1EEC),(_ucs2 0x1EED),(_ucs2 0x1EEE),(_ucs2 0x1EEF); +INSERT INTO t1 VALUES (_ucs2 0x1EF0),(_ucs2 0x1EF1); insert into t1 values ('AA'),('Aa'),('aa'),('aA'); +insert into t1 values ('AE'),('Ae'),('ae'),('aE'); insert into t1 values ('CH'),('Ch'),('ch'),('cH'); insert into t1 values ('DZ'),('Dz'),('dz'),('dZ'); +insert into t1 values ('DŽ'),('Dž'),('dž'),('dŽ'); insert into t1 values ('IJ'),('Ij'),('ij'),('iJ'); insert into t1 values ('LJ'),('Lj'),('lj'),('lJ'); insert into t1 values ('LL'),('Ll'),('ll'),('lL'); @@ -179,8 +202,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -190,13 +214,13 @@ CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ CHChcHch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -210,7 +234,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -231,7 +255,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -253,7 +277,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -283,8 +307,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÂÃà âãĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÂÃà âãĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae Ãá ǢǣǼǽ Bb @@ -295,13 +320,13 @@ CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ CHChcHch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz Ãð ÄÄ‘ Ɖ ÆŠ Ƌƌ -EeÈÊËèêëĒēĔĕĖėĘęĚě +EeÈÊËèêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ Éé ÆŽÇ Æ @@ -316,7 +341,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÌÎÃìîïĨĩĪīĬÄĮįİÇÇ +IiÌÎÃìîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij Ãà ı @@ -338,7 +363,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÔÕòôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÔÕòôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ Óó Ǿǿ @@ -361,7 +386,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÛÜùûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÛÜùûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Úú Æœ Ʊ @@ -396,8 +421,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -409,12 +435,13 @@ CHChcHch Ƈƈ DdÄŽÄ DZDzdZdzDŽDždžDZDzdz +DŽDždŽdž ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -429,7 +456,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij Yy ı @@ -454,7 +481,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -478,7 +505,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -509,8 +536,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÃÄÅà áãäåĀÄĄąÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÃÄÅà áãäåĀÄĄąÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae Ăă Ââ ÆæǢǣǼǽ @@ -522,13 +550,13 @@ CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ CHChcHch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -542,7 +570,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃìÃïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃìÃïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij Îî ı @@ -564,7 +592,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -588,7 +616,7 @@ TtŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -618,8 +646,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -631,12 +660,13 @@ CHChcHch Ƈƈ DdÄŽÄ DZDzdZdzDŽDždžDZDzdz +DŽDždŽdž ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -650,7 +680,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -671,7 +701,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -694,7 +724,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -725,8 +755,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂăÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂăÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae Ąą ÆæǢǣǼǽ Bb @@ -738,13 +769,13 @@ CHChcHch Ćć Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĚě +EeÈÉÊËèéêëĒēĔĕĖėĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ Ęę ÆŽÇ Æ @@ -759,7 +790,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -781,7 +812,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÔÕÖòôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÔÕÖòôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ Óó ØøǾǿ @@ -805,7 +836,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -837,8 +868,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÅà áâãåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÅà áâãåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -849,13 +881,14 @@ CHChcHch Ƈƈ DdÄŽÄ DZDzdZdz +DŽDždŽdž DŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -869,7 +902,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -890,7 +923,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔòóôŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔòóôŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -915,7 +948,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -949,8 +982,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -960,13 +994,13 @@ CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ CHChcHch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -980,7 +1014,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -1002,7 +1036,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -1024,7 +1058,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -1054,8 +1088,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃà áâãĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃà áâãĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ǢǣǼǽ Bb Æ€ @@ -1065,13 +1100,13 @@ CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ CHChcHch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1085,7 +1120,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -1106,7 +1141,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕòóôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕòóôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ Ǿǿ Ɔ @@ -1128,7 +1163,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -1161,8 +1196,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -1173,13 +1209,13 @@ CHChcHch Çç Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1196,7 +1232,7 @@ Iı IJIj ƕǶ Ħħ -iÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +iÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị iJijIJij Æ— Æ– @@ -1216,7 +1252,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕòóôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕòóôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ Öö ØøǾǿ @@ -1240,7 +1276,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Üü Æœ Ʊ @@ -1271,8 +1307,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -1284,12 +1321,13 @@ cH Ƈƈ DdÄŽÄ DZDzdZdzDŽDždžDZDzdz +DŽDždŽdž ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1304,7 +1342,7 @@ HhĤĥ CHChch ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -1325,7 +1363,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -1349,7 +1387,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -1380,8 +1418,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃà áâãĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃà áâãĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· aA +AEAeaEae ǢǣǼǽ Bb Æ€ @@ -1391,13 +1430,13 @@ CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ CHChcHch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1411,7 +1450,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -1432,7 +1471,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕòóôõŌÅÅŽÅÆ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕòóôõŌÅÅŽÅÆ ơǑǒǪǫǬÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ Ǿǿ Ɔ @@ -1454,7 +1493,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛùúûŨũŪūŬÅŮůŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛùúûŨũŪūŬÅŮůŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -1487,8 +1526,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -1500,12 +1540,13 @@ cH Ƈƈ DdÄŽÄ DZDzdZdzDŽDždžDZDzdz +DŽDždŽdž ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1519,7 +1560,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IYiyÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IYiyÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -1540,7 +1581,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -1563,7 +1604,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -1594,8 +1635,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÅà áâãåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÅà áâãåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae Ää ÆæǢǣǼǽ Bb @@ -1608,12 +1650,13 @@ cH Ƈƈ DdÄŽÄ DZDzdZdzDŽDždžDZDzdz +DŽDždŽdž ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1628,7 +1671,7 @@ HhĤĥ CHChch ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -1649,7 +1692,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÕÖòóõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÕÖòóõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ Ôô ØøǾǿ @@ -1673,7 +1716,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -1704,8 +1747,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -1716,13 +1760,13 @@ cH CHChch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1736,7 +1780,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -1759,7 +1803,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -1781,7 +1825,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -1811,8 +1855,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -1822,13 +1867,13 @@ CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ CHChcHch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1842,7 +1887,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IJijÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IJijÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJij IJij ı @@ -1866,7 +1911,7 @@ NJNjnJnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -1888,7 +1933,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -ÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +ÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ UVuv @@ -1918,8 +1963,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -1930,13 +1976,13 @@ CHChcHch Ĉĉ Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1952,7 +1998,7 @@ Hh Ĥĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -1974,7 +2020,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -1997,7 +2043,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± ŬŠƜ Ʊ @@ -2028,8 +2074,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -2039,13 +2086,13 @@ CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ CHChcHch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -2059,7 +2106,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -2080,7 +2127,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕòóôõŌÅÅŽÅÆ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕòóôõŌÅÅŽÅÆ ơǑǒǪǫǬÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ÖöÅÅ‘ ØøǾǿ @@ -2103,7 +2150,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛùúûŨũŪūŬÅŮůŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛùúûŨũŪūŬÅŮůŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± ÜüŰű Æœ Ʊ @@ -2130,6 +2177,544 @@ ZzŹźŻżŽž Ç Ç‚ ǃ +select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_croatian_mysql561_ci; +group_concat(c1 order by binary c1 separator '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÇçĈĉĊċ +CHChcHch +ÄŒÄ +Ćć +Ƈƈ +DdÄŽÄ +DZDzdZdzDZDzdz +DŽDždŽdžDŽDždž +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LLLllLll +LJLjlJljLJLjlj +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşſ +SSSssSssß +Å Å¡ +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻż +Æ +Žž +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_croatian_ci; +group_concat(c1 order by binary c1 separator '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÇçĈĉĊċ +CHChcHch +ÄŒÄ +Ćć +Ƈƈ +DdÄŽÄ +DZDzdZdzDZDzdz +dŽ +DŽDždžDŽDždž +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +lJ +LLLllLll +LJLjljLJLjlj +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +nJ +NJNjnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşſ +SSSssSssß +Å Å¡ +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻż +Æ +Žž +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_german2_ci; +group_concat(c1 order by binary c1 separator '') +÷ +× +AaÀÃÂÃÅà áâãåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEaeÄÆäæ +ǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕòóôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÖöŒœ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Üü +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_unicode_520_ci; +group_concat(c1 order by binary c1 separator '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEaeÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÃðĎÄÄÄ‘ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +Ɖ +ÆŠ +Ƌƌ +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥĦħ +ƕǶ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľĿŀÅÅ‚ +LJLjlJljLJLjlj +LLLllLll +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖØòóôõöøŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇǾǿỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_vietnamese_ci; +group_concat(c1 order by binary c1 separator '') +÷ +× +AaÀÃÃÄÅà áãäåĀÄĄąÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£ +AAAaaAaa +AEAeaEae +ĂăẮắẰằẲẳẴẵẶặ +ÂâẤấẦầẨẩẪẫẬẠ+ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉËèéëĒēĔĕĖėĘęĚěẸẹẺẻẼẽ +ÊêẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÕÖòóõöŌÅÅŽÅÅőǑǒǪǫǬÇỌá»á»Žá» +OEOeoEoeÅ’Å“ +Ôôá»á»‘ỒồỔổỖỗỘộ +Æ Æ¡á»šá»›á»œá»á»žá»Ÿá» ỡỢợ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųǓǔǕǖǗǘǙǚǛǜỤụỦủ +ƯưỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ drop table t1; SET NAMES utf8; CREATE TABLE t1 (c varchar(200) CHARACTER SET utf16 COLLATE utf16_general_ci NOT NULL, INDEX (c)); @@ -2298,6 +2883,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf16_unicode_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf16_unicode_ci @@ -2316,6 +2952,121 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; c2h ab_def drop table t1; +"BEGIN ctype_german.inc" +drop table if exists t1; +create table t1 as select repeat(' ', 64) as s1; +select collation(s1) from t1; +collation(s1) +utf16_unicode_ci +delete from t1; +INSERT INTO t1 VALUES ('ud'),('uf'); +INSERT INTO t1 VALUES ('od'),('of'); +INSERT INTO t1 VALUES ('e'); +INSERT INTO t1 VALUES ('ad'),('af'); +insert into t1 values ('a'),('ae'),(_latin1 0xE4); +insert into t1 values ('o'),('oe'),(_latin1 0xF6); +insert into t1 values ('s'),('ss'),(_latin1 0xDF); +insert into t1 values ('u'),('ue'),(_latin1 0xFC); +INSERT INTO t1 VALUES (_latin1 0xE6), (_latin1 0xC6); +INSERT INTO t1 VALUES (_latin1 0x9C), (_latin1 0x8C); +select s1, hex(s1) from t1 order by s1, binary s1; +s1 hex(s1) +a 0061 +ä 00E4 +ad 00610064 +ae 00610065 +af 00610066 +Æ 00C6 +æ 00E6 +e 0065 +o 006F +ö 00F6 +od 006F0064 +oe 006F0065 +Å’ 0152 +Å“ 0153 +of 006F0066 +s 0073 +ss 00730073 +ß 00DF +u 0075 +ü 00FC +ud 00750064 +ue 00750065 +uf 00750066 +select group_concat(s1 order by binary s1) from t1 group by s1; +group_concat(s1 order by binary s1) +a,ä +ad +ae +af +Æ,æ +e +o,ö +od +oe,Å’,Å“ +of +s +ss,ß +u,ü +ud +ue +uf +SELECT s1, hex(s1), hex(weight_string(s1)) FROM t1 ORDER BY s1, BINARY(s1); +s1 hex(s1) hex(weight_string(s1)) +a 0061 0E33 +ä 00E4 0E33 +ad 00610064 0E330E6D +ae 00610065 0E330E8B +af 00610066 0E330EB9 +Æ 00C6 0E38 +æ 00E6 0E38 +e 0065 0E8B +o 006F 0F82 +ö 00F6 0F82 +od 006F0064 0F820E6D +oe 006F0065 0F820E8B +Å’ 0152 0F820E8B +Å“ 0153 0F820E8B +of 006F0066 0F820EB9 +s 0073 0FEA +ss 00730073 0FEA0FEA +ß 00DF 0FEA0FEA +u 0075 101F +ü 00FC 101F +ud 00750064 101F0E6D +ue 00750065 101F0E8B +uf 00750066 101F0EB9 +SELECT s1, hex(s1) FROM t1 WHERE s1='ae' ORDER BY s1, BINARY(s1); +s1 hex(s1) +ae 00610065 +drop table t1; +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_unicode_ci NOT NULL DEFAULT '', + `b` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); +SELECT * FROM t1 ORDER BY a, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY a DESC, b; +a b +ß 1 +s 0 +SELECT * FROM t1 ORDER BY CONCAT(a), b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a) DESC, b; +a b +ß 1 +s 0 +DROP TABLE t1; +"END ctype_german.inc" End of 4.1 tests CREATE TABLE t1 (id int, a varchar(30) character set utf16); INSERT INTO t1 VALUES (1, 0x01310069), (2, 0x01310131); @@ -2443,3 +3194,3414 @@ DROP TABLE t1; # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set collation_connection=utf16_unicode_ci; +select @@collation_connection; +@@collation_connection +utf16_unicode_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(16) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0E33 +SELECT HEX(ws) FROM t2; +HEX(ws) +0E33 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET utf16 COLLATE utf16_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(80) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0E330E330E330E330E33 +SELECT HEX(ws) FROM t2; +HEX(ws) +0E330E330E330E330E33 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(48) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +0E330E330E33 +SELECT HEX(ws) FROM t2; +HEX(ws) +0E330E330E33 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(160) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +0E330E330E330E330E3302090209020902090209 +SELECT HEX(ws) FROM t2; +HEX(ws) +0E330E330E330E330E3302090209020902090209 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +0E33 +select hex(weight_string('A')); +hex(weight_string('A')) +0E33 +select hex(weight_string('abc')); +hex(weight_string('abc')) +0E330E4A0E60 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +0E330E4A +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +0E330E4A0E60 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +0E330E4A0E6002090209 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +0E +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0E33 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +0E330E +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +0E330E4A +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0E330E4A02 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +0E330E4A020902090209020902090209020902090209020902 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +0E +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0E33 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +0E330E +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +0E330E4A +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0E330E4A0E +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +0E330E4A0E6002090209020902090209020902090209020902 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +0E +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0E33 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +0E330E +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +0E330E4A +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0E330E4A0E +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +0E330E4A0E6002090209020902090209020902090209020902 +select @@collation_connection; +@@collation_connection +utf16_unicode_ci +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +0E23 +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +0E230E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +0E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +0E230E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +0E230E230E2302090209 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +0E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +0E230E +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +0E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +0E230E2302 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +0E230E23020902090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +0E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +0E230E +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +0E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +0E230E230E +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +0E230E230E2302090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +0E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +0E230E +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +0E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +0E230E230E +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +0E230E230E2302090209020902090209020902090209020902 +select hex(weight_string(_utf16 0xD800DC00 collate utf16_unicode_ci)); +hex(weight_string(_utf16 0xD800DC00 collate utf16_unicode_ci)) +FFFD +select hex(weight_string(_utf16 0xD800DC01 collate utf16_unicode_ci)); +hex(weight_string(_utf16 0xD800DC01 collate utf16_unicode_ci)) +FFFD +select @@collation_connection; +@@collation_connection +utf16_unicode_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +0E33 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +0E33 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +0E330E4A0E60 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +0E330E4A +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +0E330E4A0E60 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +0E330E4A0E6002090209 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +09020902600E4A0E330E +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +F1CCF1B5F19FFDF6FDF6 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +F6FDF6FD9FF1B5F1CCF1 +set @@collation_connection=utf16_czech_ci; +select @@collation_connection; +@@collation_connection +utf16_czech_ci +select collation(cast(_latin1 0xDF as char)); +collation(cast(_latin1 0xDF as char)) +utf16_czech_ci +select hex(weight_string('s')); +hex(weight_string('s')) +0FEA +select hex(weight_string(cast(_latin1 0xDF as char))); +hex(weight_string(cast(_latin1 0xDF as char))) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF as char) as char(1))); +hex(weight_string(cast(_latin1 0xDF as char) as char(1))) +0FEA +select hex(weight_string('c')); +hex(weight_string('c')) +0E60 +select hex(weight_string('h')); +hex(weight_string('h')) +0EE1 +select hex(weight_string('ch')); +hex(weight_string('ch')) +0EE2 +select hex(weight_string('i')); +hex(weight_string('i')) +0EFB +select hex(weight_string(cast(_latin1 0x6368DF as char))); +hex(weight_string(cast(_latin1 0x6368DF as char))) +0EE20FEA0FEA +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(1))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(1))) +0EE2 +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(2))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(2))) +0EE20FEA +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(3))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(3))) +0EE20FEA0FEA +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(4))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(4))) +0EE20FEA0FEA0209 +select hex(weight_string(cast(_latin1 0xDF6368 as char))); +hex(weight_string(cast(_latin1 0xDF6368 as char))) +0FEA0FEA0EE2 +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(1))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(1))) +0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(2))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(2))) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(3))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(3))) +0FEA0FEA0EE2 +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(4))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(4))) +0FEA0FEA0EE20209 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 2, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 2, 0xC0)) +0EE2 +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 2, 0xC0)) +0EE20F +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 2, 0xC0)) +0EE20FEA +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 2, 0xC0)) +0EE20FEA020902090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 3, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 3, 0xC0)) +0EE2 +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 3, 0xC0)) +0EE20F +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 3, 0xC0)) +0EE20FEA +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 3, 0xC0)) +0EE20FEA0FEA02090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 4, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 4, 0xC0)) +0EE2 +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 4, 0xC0)) +0EE20F +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 4, 0xC0)) +0EE20FEA +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 4, 0xC0)) +0EE20FEA0FEA02090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 2,0xC0)) +0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 2,0xC0)) +0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 2,0xC0)) +0FEA0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 2,0xC0)) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 2,0xC0)) +0FEA0FEA020902090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 3,0xC0)) +0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 3,0xC0)) +0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 3,0xC0)) +0FEA0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 3,0xC0)) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 3,0xC0)) +0FEA0FEA0EE202090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 4,0xC0)) +0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 4,0xC0)) +0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 4,0xC0)) +0FEA0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 4,0xC0)) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0)) +0FEA0FEA0EE202090209020902090209020902090209020902 +SET NAMES utf8; +SET collation_connection=utf16_german2_ci; +"BEGIN ctype_german.inc" +drop table if exists t1; +create table t1 as select repeat(' ', 64) as s1; +select collation(s1) from t1; +collation(s1) +utf16_german2_ci +delete from t1; +INSERT INTO t1 VALUES ('ud'),('uf'); +INSERT INTO t1 VALUES ('od'),('of'); +INSERT INTO t1 VALUES ('e'); +INSERT INTO t1 VALUES ('ad'),('af'); +insert into t1 values ('a'),('ae'),(_latin1 0xE4); +insert into t1 values ('o'),('oe'),(_latin1 0xF6); +insert into t1 values ('s'),('ss'),(_latin1 0xDF); +insert into t1 values ('u'),('ue'),(_latin1 0xFC); +INSERT INTO t1 VALUES (_latin1 0xE6), (_latin1 0xC6); +INSERT INTO t1 VALUES (_latin1 0x9C), (_latin1 0x8C); +select s1, hex(s1) from t1 order by s1, binary s1; +s1 hex(s1) +a 0061 +ad 00610064 +ae 00610065 +Æ 00C6 +ä 00E4 +æ 00E6 +af 00610066 +e 0065 +o 006F +od 006F0064 +oe 006F0065 +ö 00F6 +Å’ 0152 +Å“ 0153 +of 006F0066 +s 0073 +ss 00730073 +ß 00DF +u 0075 +ud 00750064 +ue 00750065 +ü 00FC +uf 00750066 +select group_concat(s1 order by binary s1) from t1 group by s1; +group_concat(s1 order by binary s1) +a +ad +ae,Æ,ä,æ +af +e +o +od +oe,ö,Å’,Å“ +of +s +ss,ß +u +ud +ue,ü +uf +SELECT s1, hex(s1), hex(weight_string(s1)) FROM t1 ORDER BY s1, BINARY(s1); +s1 hex(s1) hex(weight_string(s1)) +a 0061 0E33 +ad 00610064 0E330E6D +ae 00610065 0E330E8B +Æ 00C6 0E330E8B +ä 00E4 0E330E8B +æ 00E6 0E330E8B +af 00610066 0E330EB9 +e 0065 0E8B +o 006F 0F82 +od 006F0064 0F820E6D +oe 006F0065 0F820E8B +ö 00F6 0F820E8B +Å’ 0152 0F820E8B +Å“ 0153 0F820E8B +of 006F0066 0F820EB9 +s 0073 0FEA +ss 00730073 0FEA0FEA +ß 00DF 0FEA0FEA +u 0075 101F +ud 00750064 101F0E6D +ue 00750065 101F0E8B +ü 00FC 101F0E8B +uf 00750066 101F0EB9 +SELECT s1, hex(s1) FROM t1 WHERE s1='ae' ORDER BY s1, BINARY(s1); +s1 hex(s1) +ae 00610065 +Æ 00C6 +ä 00E4 +æ 00E6 +drop table t1; +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_german2_ci NOT NULL DEFAULT '', + `b` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); +SELECT * FROM t1 ORDER BY a, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY a DESC, b; +a b +ß 1 +s 0 +SELECT * FROM t1 ORDER BY CONCAT(a), b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a) DESC, b; +a b +ß 1 +s 0 +DROP TABLE t1; +"END ctype_german.inc" +# +# WL#2673 Unicode Collation Algorithm new version +# +SET NAMES utf8mb4; +SET collation_connection=utf16_unicode_520_ci; +CREATE TABLE t1 AS SELECT repeat('a', 10) as c LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` varchar(10) CHARACTER SET utf16 COLLATE utf16_unicode_520_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (_utf32 0x0180),(_utf32 0x023A); +INSERT INTO t1 VALUES (_utf32 0x023B),(_utf32 0x023C); +INSERT INTO t1 VALUES (_utf32 0x023D),(_utf32 0x023E); +INSERT INTO t1 VALUES (_utf32 0x0241),(_utf32 0x0242); +INSERT INTO t1 VALUES (_utf32 0x0243),(_utf32 0x0244); +INSERT INTO t1 VALUES (_utf32 0x0245),(_utf32 0x0246); +INSERT INTO t1 VALUES (_utf32 0x0247),(_utf32 0x0248); +INSERT INTO t1 VALUES (_utf32 0x0249),(_utf32 0x024A); +INSERT INTO t1 VALUES (_utf32 0x024B),(_utf32 0x024C); +INSERT INTO t1 VALUES (_utf32 0x024D),(_utf32 0x024E); +INSERT INTO t1 VALUES (_utf32 0x024F),(_utf32 0x026B); +INSERT INTO t1 VALUES (_utf32 0x027D),(_utf32 0x0289); +INSERT INTO t1 VALUES (_utf32 0x028C); +INSERT INTO t1 VALUES (_utf32 0x037B), (_utf32 0x037C); +INSERT INTO t1 VALUES (_utf32 0x037D), (_utf32 0x03FD); +INSERT INTO t1 VALUES (_utf32 0x03FE), (_utf32 0x03FF); +INSERT INTO t1 VALUES (_utf32 0x04C0), (_utf32 0x04CF); +INSERT INTO t1 VALUES (_utf32 0x04F6), (_utf32 0x04F7); +INSERT INTO t1 VALUES (_utf32 0x04FA), (_utf32 0x04FB); +INSERT INTO t1 VALUES (_utf32 0x04FC), (_utf32 0x04FD); +INSERT INTO t1 VALUES (_utf32 0x04FE), (_utf32 0x04FF); +INSERT INTO t1 VALUES (_utf32 0x0510), (_utf32 0x0511); +INSERT INTO t1 VALUES (_utf32 0x0512), (_utf32 0x0513); +INSERT INTO t1 VALUES (_utf32 0x10A0), (_utf32 0x10A1); +INSERT INTO t1 VALUES (_utf32 0x10A2), (_utf32 0x10A3); +INSERT INTO t1 VALUES (_utf32 0x10A4), (_utf32 0x10A5); +INSERT INTO t1 VALUES (_utf32 0x10A6), (_utf32 0x10A7); +INSERT INTO t1 VALUES (_utf32 0x2D00), (_utf32 0x2D01); +INSERT INTO t1 VALUES (_utf32 0x2D02), (_utf32 0x2D03); +INSERT INTO t1 VALUES (_utf32 0x2D04), (_utf32 0x2D05); +INSERT INTO t1 VALUES (_utf32 0x2D06), (_utf32 0x2D07); +INSERT INTO t1 VALUES (_utf32 0x1D7D); +INSERT INTO t1 VALUES (_utf32 0x2132),(_utf32 0x214E); +INSERT INTO t1 VALUES (_utf32 0x2183),(_utf32 0x2184); +INSERT INTO t1 VALUES (_utf32 0x2C80), (_utf32 0x2C81); +INSERT INTO t1 VALUES (_utf32 0x2C82), (_utf32 0x2C83); +INSERT INTO t1 VALUES (_utf32 0x2C84), (_utf32 0x2C85); +INSERT INTO t1 VALUES (_utf32 0x2C86), (_utf32 0x2C87); +INSERT INTO t1 VALUES (_utf32 0x2C88), (_utf32 0x2C89); +INSERT INTO t1 VALUES (_utf32 0x2C8A), (_utf32 0x2C8B); +INSERT INTO t1 VALUES (_utf32 0x2C8C), (_utf32 0x2C8D); +INSERT INTO t1 VALUES (_utf32 0x2C8E), (_utf32 0x2C8F); +INSERT INTO t1 VALUES (_utf32 0x2C60), (_utf32 0x2C61); +INSERT INTO t1 VALUES (_utf32 0x2C62), (_utf32 0x2C63); +INSERT INTO t1 VALUES (_utf32 0x2C64), (_utf32 0x2C65); +INSERT INTO t1 VALUES (_utf32 0x2C66), (_utf32 0x2C67); +INSERT INTO t1 VALUES (_utf32 0x2C68), (_utf32 0x2C69); +INSERT INTO t1 VALUES (_utf32 0x2C6A), (_utf32 0x2C6B); +INSERT INTO t1 VALUES (_utf32 0x2C6C), (_utf32 0x2C75); +INSERT INTO t1 VALUES (_utf32 0x2C76); +INSERT INTO t1 VALUES (_utf32 0x2C00), (_utf32 0x2C01); +INSERT INTO t1 VALUES (_utf32 0x2C02), (_utf32 0x2C03); +INSERT INTO t1 VALUES (_utf32 0x2C04), (_utf32 0x2C05); +INSERT INTO t1 VALUES (_utf32 0x2C06), (_utf32 0x2C07); +INSERT INTO t1 VALUES (_utf32 0x2C30), (_utf32 0x2C31); +INSERT INTO t1 VALUES (_utf32 0x2C32), (_utf32 0x2C33); +INSERT INTO t1 VALUES (_utf32 0x2C34), (_utf32 0x2C35); +INSERT INTO t1 VALUES (_utf32 0x2C36), (_utf32 0x2C37); +INSERT INTO t1 VALUES (_utf32 0x10400), (_utf32 0x10401); +INSERT INTO t1 VALUES (_utf32 0x10402), (_utf32 0x10403); +INSERT INTO t1 VALUES (_utf32 0x10404), (_utf32 0x10405); +INSERT INTO t1 VALUES (_utf32 0x10406), (_utf32 0x10407); +INSERT INTO t1 VALUES (_utf32 0x10428), (_utf32 0x10429); +INSERT INTO t1 VALUES (_utf32 0x1042A), (_utf32 0x1042B); +INSERT INTO t1 VALUES (_utf32 0x1042C), (_utf32 0x1042D); +INSERT INTO t1 VALUES (_utf32 0x1042E), (_utf32 0x1042F); +INSERT INTO t1 VALUES (_utf32 0x0370); +INSERT INTO t1 VALUES (_utf32 0x0371); +INSERT INTO t1 VALUES (_utf32 0x0372); +INSERT INTO t1 VALUES (_utf32 0x0373); +INSERT INTO t1 VALUES (_utf32 0x0514); +INSERT INTO t1 VALUES (_utf32 0x0515); +INSERT INTO t1 VALUES (_utf32 0x0516); +INSERT INTO t1 VALUES (_utf32 0x0517); +INSERT INTO t1 VALUES (_utf32 0xA640); +INSERT INTO t1 VALUES (_utf32 0xA641); +INSERT INTO t1 VALUES (_utf32 0xA642); +INSERT INTO t1 VALUES (_utf32 0xA643); +INSERT INTO t1 VALUES (_utf32 0xA722); +INSERT INTO t1 VALUES (_utf32 0xA723); +INSERT INTO t1 VALUES (_utf32 0xA724); +INSERT INTO t1 VALUES (_utf32 0xA725); +INSERT INTO t1 VALUES (_utf32 0xA726); +INSERT INTO t1 VALUES (_utf32 0xA727); +INSERT INTO t1 VALUES (_utf32 0xA728); +INSERT INTO t1 VALUES (_utf32 0xA729); +INSERT INTO t1 VALUES (_utf32 0xA72A); +INSERT INTO t1 VALUES (_utf32 0xA72B); +INSERT INTO t1 VALUES (_utf32 0x2CEB); +INSERT INTO t1 VALUES (_utf32 0x2CEC); +INSERT INTO t1 VALUES (_utf32 0x2CED); +INSERT INTO t1 VALUES (_utf32 0x2CEE); +SELECT hex(c), hex(lower(c)), hex(upper(c)), hex(weight_string(c)), c +FROM t1 ORDER BY c, BINARY c; +hex(c) hex(lower(c)) hex(upper(c)) hex(weight_string(c)) c +023A 2C65 023A 1214 Ⱥ +2C65 2C65 023A 1214 â±¥ +0180 0180 0243 122D Æ€ +0243 0180 0243 122D Ƀ +023B 023C 023B 1242 È» +023C 023C 023B 1242 ȼ +2183 2184 2183 124E Ↄ +2184 2184 2183 124E ↄ +0246 0247 0246 1270 Ɇ +0247 0247 0246 1270 ɇ +2132 214E 2132 12AE Ⅎ +214E 214E 2132 12AE â…Ž +2C67 2C68 2C67 12E3 â±§ +2C68 2C68 2C67 12E3 ⱨ +2C75 2C76 2C75 12E4 â±µ +2C76 2C76 2C75 12E4 â±¶ +A726 A727 A726 12E5 Ꜧ +A727 A727 A726 12E5 ꜧ +0248 0249 0248 130E Ɉ +0249 0249 0248 130E ɉ +2C69 2C6A 2C69 1328 Ⱪ +2C6A 2C6A 2C69 1328 ⱪ +023D 019A 023D 133B Ƚ +2C60 2C61 2C60 133F â± +2C61 2C61 2C60 133F ⱡ +026B 026B 2C62 1340 É« +2C62 026B 2C62 1340 â±¢ +1D7D 1D7D 2C63 13B8 áµ½ +2C63 1D7D 2C63 13B8 â±£ +024A 024B 024A 13D2 ÉŠ +024B 024B 024A 13D2 É‹ +024C 024D 024C 13E4 ÉŒ +024D 024D 024C 13E4 É +027D 027D 2C64 13FC ɽ +2C64 027D 2C64 13FC Ɽ +A728 A729 A728 143314AD Ꜩ +A729 A729 A728 143314AD ꜩ +023E 2C66 023E 143C Ⱦ +2C66 2C66 023E 143C ⱦ +0244 0289 0244 145B É„ +0289 0289 0244 145B ʉ +0245 028C 0245 1489 É… +028C 028C 0245 1489 ÊŒ +024E 024F 024E 14A4 ÉŽ +024F 024F 024E 14A4 É +2C6B 2C6C 2C6B 14C8 Ⱬ +2C6C 2C6C 2C6B 14C8 ⱬ +A72A A72B A72A 14F3 Ꜫ +A72B A72B A72A 14F3 ꜫ +0241 0242 0241 1506 É +0242 0242 0241 1506 É‚ +A722 A723 A722 150E Ꜣ +A723 A723 A722 150E ꜣ +A724 A725 A724 1518 Ꜥ +A725 A725 A724 1518 ꜥ +0370 0371 0370 154F Ͱ +0371 0371 0370 154F ͱ +037C 037C 03FE 1564 ͼ +03FE 037C 03FE 1564 Ͼ +037B 037B 03FD 1565 Í» +03FD 037B 03FD 1565 Ͻ +037D 037D 03FF 1566 ͽ +03FF 037D 03FF 1566 Ï¿ +0372 0373 0372 156F Ͳ +0373 0373 0372 156F ͳ +2C80 2C81 2C80 1571 â²€ +2C81 2C81 2C80 1571 â² +2C82 2C83 2C82 1572 Ⲃ +2C83 2C83 2C82 1572 ⲃ +2C84 2C85 2C84 1573 Ⲅ +2C85 2C85 2C84 1573 â²… +2C86 2C87 2C86 1574 Ⲇ +2C87 2C87 2C86 1574 ⲇ +2C88 2C89 2C88 1575 Ⲉ +2C89 2C89 2C88 1575 ⲉ +2C8A 2C8B 2C8A 1577 Ⲋ +2C8B 2C8B 2C8A 1577 ⲋ +2C8C 2C8D 2C8C 1578 Ⲍ +2C8D 2C8D 2C8C 1578 â² +2C8E 2C8F 2C8E 1579 Ⲏ +2C8F 2C8F 2C8E 1579 â² +2CEB 2CEC 2CEB 1591 Ⳬ +2CEC 2CEC 2CEB 1591 ⳬ +2CED 2CEE 2CED 15A0 â³ +2CEE 2CEE 2CED 15A0 â³® +04FA 04FB 04FA 15D4 Óº +04FB 04FB 04FA 15D4 Ó» +04F6 04F7 04F6 15DC Ó¶ +04F7 04F7 04F6 15DC Ó· +A640 A641 A640 1611 Ꙁ +A641 A641 A640 1611 ê™ +0510 0511 0510 1613 Ô +0511 0511 0510 1613 Ô‘ +A642 A643 A642 1618 Ꙃ +A643 A643 A642 1618 ꙃ +0512 0513 0512 1666 Ô’ +0513 0513 0512 1666 Ô“ +0514 0515 0514 166E Ô” +0515 0515 0514 166E Ô• +0516 0517 0516 16B7 Ô– +0517 0517 0516 16B7 Ô— +04FC 04FD 04FC 16F9 Ó¼ +04FD 04FD 04FC 16F9 Ó½ +04FE 04FF 04FE 16FD Ó¾ +04FF 04FF 04FE 16FD Ó¿ +04C0 04CF 04C0 17B1 Ó€ +04CF 04CF 04C0 17B1 Ó +2C00 2C30 2C00 17B5 â°€ +2C30 2C30 2C00 17B5 â°° +2C01 2C31 2C01 17B6 â° +2C31 2C31 2C01 17B6 â°± +2C02 2C32 2C02 17B7 â°‚ +2C32 2C32 2C02 17B7 â°² +2C03 2C33 2C03 17B8 â°ƒ +2C33 2C33 2C03 17B8 â°³ +2C04 2C34 2C04 17B9 â°„ +2C34 2C34 2C04 17B9 â°´ +2C05 2C35 2C05 17BA â°… +2C35 2C35 2C05 17BA â°µ +2C06 2C36 2C06 17BB â°† +2C36 2C36 2C06 17BB â°¶ +2C07 2C37 2C07 17BC â°‡ +2C37 2C37 2C07 17BC â°· +10A0 2D00 10A0 17E5 á‚ +2D00 2D00 10A0 17E5 â´€ +10A1 2D01 10A1 17E7 á‚¡ +2D01 2D01 10A1 17E7 â´ +10A2 2D02 10A2 17E9 á‚¢ +2D02 2D02 10A2 17E9 â´‚ +10A3 2D03 10A3 17EB á‚£ +2D03 2D03 10A3 17EB â´ƒ +10A4 2D04 10A4 17ED Ⴄ +2D04 2D04 10A4 17ED â´„ +10A5 2D05 10A5 17EF á‚¥ +2D05 2D05 10A5 17EF â´… +10A6 2D06 10A6 17F1 Ⴆ +2D06 2D06 10A6 17F1 â´† +10A7 2D07 10A7 17F5 á‚§ +2D07 2D07 10A7 17F5 â´‡ +D801DC00 D801DC28 D801DC00 30D2 ð€ +D801DC28 D801DC28 D801DC00 30D2 ð¨ +D801DC01 D801DC29 D801DC01 30D3 ð +D801DC29 D801DC29 D801DC01 30D3 ð© +D801DC02 D801DC2A D801DC02 30D4 ð‚ +D801DC2A D801DC2A D801DC02 30D4 ðª +D801DC03 D801DC2B D801DC03 30D5 ðƒ +D801DC2B D801DC2B D801DC03 30D5 ð« +D801DC04 D801DC2C D801DC04 30D6 ð„ +D801DC2C D801DC2C D801DC04 30D6 ð¬ +D801DC05 D801DC2D D801DC05 30D7 ð… +D801DC2D D801DC2D D801DC05 30D7 ð +D801DC06 D801DC2E D801DC06 30D8 ð† +D801DC2E D801DC2E D801DC06 30D8 ð® +D801DC07 D801DC2F D801DC07 30D9 ð‡ +D801DC2F D801DC2F D801DC07 30D9 ð¯ +INSERT INTO t1 VALUES ('a'); +INSERT INTO t1 VALUES (concat(_utf32 0x61, _utf32 0xFFFF)); +INSERT INTO t1 VALUES (concat(_utf32 0x61, _utf32 0x10FFFF)); +INSERT INTO t1 VALUES (concat(_utf32 0x61, _utf32 0x10400)); +SELECT hex(c), hex(weight_string(c)) FROM t1 WHERE c LIKE 'a%' ORDER BY c; +hex(c) hex(weight_string(c)) +0061 120F +0061D801DC00 120F30D2 +0061FFFF 120FFBC1FFFF +0061DBFFDFFF 120FFBE1FFFF +SELECT hex(c), hex(weight_string(c)), c FROM t1 WHERE c LIKE _utf32 0x10400 ORDER BY c, BINARY c; +hex(c) hex(weight_string(c)) c +D801DC00 30D2 ð€ +D801DC28 30D2 ð¨ +SELECT hex(c), hex(weight_string(c)), c FROM t1 WHERE c LIKE _utf32 0x10428 ORDER BY c, BINARY c; +hex(c) hex(weight_string(c)) c +D801DC00 30D2 ð€ +D801DC28 30D2 ð¨ +ALTER TABLE t1 ADD KEY(c); +EXPLAIN SELECT hex(c) FROM t1 WHERE c LIKE 'a%' ORDER BY c; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 42 NULL 2 Using where; Using index +SELECT hex(c), hex(weight_string(c)) FROM t1 WHERE c LIKE 'a%' ORDER BY c; +hex(c) hex(weight_string(c)) +0061 120F +0061D801DC00 120F30D2 +0061FFFF 120FFBC1FFFF +0061DBFFDFFF 120FFBE1FFFF +SELECT hex(c), hex(weight_string(c)), c FROM t1 WHERE c LIKE _utf32 0x10400 ORDER BY c, BINARY c; +hex(c) hex(weight_string(c)) c +D801DC00 30D2 ð€ +D801DC28 30D2 ð¨ +SELECT hex(c), hex(weight_string(c)), c FROM t1 WHERE c LIKE _utf32 0x10428 ORDER BY c, BINARY c; +hex(c) hex(weight_string(c)) c +D801DC00 30D2 ð€ +D801DC28 30D2 ð¨ +DROP TABLE t1; +# +# End of 5.6 tests +# +# +# Start of MariaDB-10.0 tests +# + +# +# MDEV-4929 Myanmar collation +# +SET NAMES utf8; +SET collation_connection=utf16_myanmar_ci; +# +# Start of ctype_myanmar.inc +# +SELECT @@collation_connection; +@@collation_connection +utf16_myanmar_ci +CREATE TABLE t1 AS SELECT 100000 AS id, REPEAT(' ', 64) AS s1 LIMIT 0; +SELECT COLLATION(s1) FROM t1; +COLLATION(s1) +DELETE FROM t1; +ALTER TABLE t1 MODIFY id INT NOT NULL AUTO_INCREMENT PRIMARY KEY; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `s1` varchar(64) CHARACTER SET utf16 COLLATE utf16_myanmar_ci NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 (s1) VALUES +(_ucs2 0x108C), +(_ucs2 0x1037), +(_ucs2 0x1038), +(_ucs2 0x10371038), +('--- Vowels'), +(_ucs2 0x102C), +(_ucs2 0x102B), +(_ucs2 0x1032), +(_ucs2 0x1031102C), +(_ucs2 0x1031102B), +(_ucs2 0x1031102C103A), +(_ucs2 0x1031102B103A), +(_ucs2 0x1034), +(_ucs2 0x1036), +(_ucs2 0x102D102F), +('--- Vowels with finals'), +(_ucs2 0x10001039), +(_ucs2 0x1000103A), +(_ucs2 0x102C10001039), +(_ucs2 0x102C1000103A), +(_ucs2 0x102B10001039), +(_ucs2 0x102B1000103A), +(_ucs2 0x102D10001039), +(_ucs2 0x102D1000103A), +(_ucs2 0x102F10001039), +(_ucs2 0x102F1000103A), +(_ucs2 0x103110001039), +(_ucs2 0x10311000103A), +(_ucs2 0x1031102C10001039), +(_ucs2 0x1031102C1000103A), +(_ucs2 0x1031102B10001039), +(_ucs2 0x1031102B1000103A), +(_ucs2 0x102D102F10001039), +(_ucs2 0x102D102F1000103A), +(_ucs2 0x10011039), +(_ucs2 0x1001103A), +(_ucs2 0x102C10011039), +(_ucs2 0x102C1001103A), +(_ucs2 0x102B10011039), +(_ucs2 0x102B1001103A), +(_ucs2 0x102D10011039), +(_ucs2 0x102D1001103A), +(_ucs2 0x102F10011039), +(_ucs2 0x102F1001103A), +(_ucs2 0x103110011039), +(_ucs2 0x10311001103A), +(_ucs2 0x1031102C10011039), +(_ucs2 0x1031102C1001103A), +(_ucs2 0x1031102B10011039), +(_ucs2 0x1031102B1001103A), +(_ucs2 0x102D102F10011039), +(_ucs2 0x102D102F1001103A), +(_ucs2 0x10021039), +(_ucs2 0x1002103A), +(_ucs2 0x102C10021039), +(_ucs2 0x102C1002103A), +(_ucs2 0x102B10021039), +(_ucs2 0x102B1002103A), +(_ucs2 0x102D10021039), +(_ucs2 0x102D1002103A), +(_ucs2 0x102F10021039), +(_ucs2 0x102F1002103A), +(_ucs2 0x103110021039), +(_ucs2 0x10311002103A), +(_ucs2 0x1031102C10021039), +(_ucs2 0x1031102C1002103A), +(_ucs2 0x1031102B10021039), +(_ucs2 0x1031102B1002103A), +(_ucs2 0x102D102F10021039), +(_ucs2 0x102D102F1002103A), +(_ucs2 0x10031039), +(_ucs2 0x1003103A), +(_ucs2 0x102C10031039), +(_ucs2 0x102C1003103A), +(_ucs2 0x102B10031039), +(_ucs2 0x102B1003103A), +(_ucs2 0x102D10031039), +(_ucs2 0x102D1003103A), +(_ucs2 0x102F10031039), +(_ucs2 0x102F1003103A), +(_ucs2 0x103110031039), +(_ucs2 0x10311003103A), +(_ucs2 0x1031102C10031039), +(_ucs2 0x1031102C1003103A), +(_ucs2 0x1031102B10031039), +(_ucs2 0x1031102B1003103A), +(_ucs2 0x102D102F10031039), +(_ucs2 0x102D102F1003103A), +(_ucs2 0x1004103A1039), +(_ucs2 0x1004103A), +(_ucs2 0x102C1004103A1039), +(_ucs2 0x102C1004103A), +(_ucs2 0x102B1004103A1039), +(_ucs2 0x102B1004103A), +(_ucs2 0x102D1004103A1039), +(_ucs2 0x102D1004103A), +(_ucs2 0x102F1004103A1039), +(_ucs2 0x102F1004103A), +(_ucs2 0x10311004103A1039), +(_ucs2 0x10311004103A), +(_ucs2 0x1031102C1004103A1039), +(_ucs2 0x1031102C1004103A), +(_ucs2 0x1031102B1004103A1039), +(_ucs2 0x1031102B1004103A), +(_ucs2 0x102D102F1004103A1039), +(_ucs2 0x102D102F1004103A), +(_ucs2 0x10051039), +(_ucs2 0x1005103A), +(_ucs2 0x102C10051039), +(_ucs2 0x102C1005103A), +(_ucs2 0x102B10051039), +(_ucs2 0x102B1005103A), +(_ucs2 0x102D10051039), +(_ucs2 0x102D1005103A), +(_ucs2 0x102F10051039), +(_ucs2 0x102F1005103A), +(_ucs2 0x103110051039), +(_ucs2 0x10311005103A), +(_ucs2 0x1031102C10051039), +(_ucs2 0x1031102C1005103A), +(_ucs2 0x1031102B10051039), +(_ucs2 0x1031102B1005103A), +(_ucs2 0x102D102F10051039), +(_ucs2 0x102D102F1005103A), +(_ucs2 0x10061039), +(_ucs2 0x1006103A), +(_ucs2 0x102C10061039), +(_ucs2 0x102C1006103A), +(_ucs2 0x102B10061039), +(_ucs2 0x102B1006103A), +(_ucs2 0x102D10061039), +(_ucs2 0x102D1006103A), +(_ucs2 0x102F10061039), +(_ucs2 0x102F1006103A), +(_ucs2 0x103110061039), +(_ucs2 0x10311006103A), +(_ucs2 0x1031102C10061039), +(_ucs2 0x1031102C1006103A), +(_ucs2 0x1031102B10061039), +(_ucs2 0x1031102B1006103A), +(_ucs2 0x102D102F10061039), +(_ucs2 0x102D102F1006103A), +(_ucs2 0x10071039), +(_ucs2 0x1007103A), +(_ucs2 0x102C10071039), +(_ucs2 0x102C1007103A), +(_ucs2 0x102B10071039), +(_ucs2 0x102B1007103A), +(_ucs2 0x102D10071039), +(_ucs2 0x102D1007103A), +(_ucs2 0x102F10071039), +(_ucs2 0x102F1007103A), +(_ucs2 0x103110071039), +(_ucs2 0x10311007103A), +(_ucs2 0x1031102C10071039), +(_ucs2 0x1031102C1007103A), +(_ucs2 0x1031102B10071039), +(_ucs2 0x1031102B1007103A), +(_ucs2 0x102D102F10071039), +(_ucs2 0x102D102F1007103A), +(_ucs2 0x1008103A), +(_ucs2 0x102C1008103A), +(_ucs2 0x102B1008103A), +(_ucs2 0x102D1008103A), +(_ucs2 0x102F1008103A), +(_ucs2 0x10311008103A), +(_ucs2 0x1031102C1008103A), +(_ucs2 0x1031102B1008103A), +(_ucs2 0x102D102F1008103A), +(_ucs2 0x10091039), +(_ucs2 0x1009103A), +(_ucs2 0x102C10091039), +(_ucs2 0x102C1009103A), +(_ucs2 0x102B10091039), +(_ucs2 0x102B1009103A), +(_ucs2 0x102D10091039), +(_ucs2 0x102D1009103A), +(_ucs2 0x102F10091039), +(_ucs2 0x102F1009103A), +(_ucs2 0x103110091039), +(_ucs2 0x10311009103A), +(_ucs2 0x1031102C10091039), +(_ucs2 0x1031102C1009103A), +(_ucs2 0x1031102B10091039), +(_ucs2 0x1031102B1009103A), +(_ucs2 0x102D102F10091039), +(_ucs2 0x102D102F1009103A), +(_ucs2 0x100A1039), +(_ucs2 0x100A103A), +(_ucs2 0x102C100A1039), +(_ucs2 0x102C100A103A), +(_ucs2 0x102B100A1039), +(_ucs2 0x102B100A103A), +(_ucs2 0x102D100A1039), +(_ucs2 0x102D100A103A), +(_ucs2 0x102F100A1039), +(_ucs2 0x102F100A103A), +(_ucs2 0x1031100A1039), +(_ucs2 0x1031100A103A), +(_ucs2 0x1031102C100A1039), +(_ucs2 0x1031102C100A103A), +(_ucs2 0x1031102B100A1039), +(_ucs2 0x1031102B100A103A), +(_ucs2 0x102D102F100A1039), +(_ucs2 0x102D102F100A103A), +(_ucs2 0x100B1039), +(_ucs2 0x100B103A), +(_ucs2 0x102C100B1039), +(_ucs2 0x102C100B103A), +(_ucs2 0x102B100B1039), +(_ucs2 0x102B100B103A), +(_ucs2 0x102D100B1039), +(_ucs2 0x102D100B103A), +(_ucs2 0x102F100B1039), +(_ucs2 0x102F100B103A), +(_ucs2 0x1031100B1039), +(_ucs2 0x1031100B103A), +(_ucs2 0x1031102C100B1039), +(_ucs2 0x1031102C100B103A), +(_ucs2 0x1031102B100B1039), +(_ucs2 0x1031102B100B103A), +(_ucs2 0x102D102F100B1039), +(_ucs2 0x102D102F100B103A), +(_ucs2 0x100C1039), +(_ucs2 0x100C103A), +(_ucs2 0x102C100C1039), +(_ucs2 0x102C100C103A), +(_ucs2 0x102B100C1039), +(_ucs2 0x102B100C103A), +(_ucs2 0x102D100C1039), +(_ucs2 0x102D100C103A), +(_ucs2 0x102F100C1039), +(_ucs2 0x102F100C103A), +(_ucs2 0x1031100C1039), +(_ucs2 0x1031100C103A), +(_ucs2 0x1031102C100C1039), +(_ucs2 0x1031102C100C103A), +(_ucs2 0x1031102B100C1039), +(_ucs2 0x1031102B100C103A), +(_ucs2 0x102D102F100C1039), +(_ucs2 0x102D102F100C103A), +(_ucs2 0x100D1039), +(_ucs2 0x100D103A), +(_ucs2 0x102C100D1039), +(_ucs2 0x102C100D103A), +(_ucs2 0x102B100D1039), +(_ucs2 0x102B100D103A), +(_ucs2 0x102D100D1039), +(_ucs2 0x102D100D103A), +(_ucs2 0x102F100D1039), +(_ucs2 0x102F100D103A), +(_ucs2 0x1031100D1039), +(_ucs2 0x1031100D103A), +(_ucs2 0x1031102C100D1039), +(_ucs2 0x1031102C100D103A), +(_ucs2 0x1031102B100D1039), +(_ucs2 0x1031102B100D103A), +(_ucs2 0x102D102F100D1039), +(_ucs2 0x102D102F100D103A), +(_ucs2 0x100E1039), +(_ucs2 0x100E103A), +(_ucs2 0x102C100E1039), +(_ucs2 0x102C100E103A), +(_ucs2 0x102B100E1039), +(_ucs2 0x102B100E103A), +(_ucs2 0x102D100E1039), +(_ucs2 0x102D100E103A), +(_ucs2 0x102F100E1039), +(_ucs2 0x102F100E103A), +(_ucs2 0x1031100E1039), +(_ucs2 0x1031100E103A), +(_ucs2 0x1031102C100E1039), +(_ucs2 0x1031102C100E103A), +(_ucs2 0x1031102B100E1039), +(_ucs2 0x1031102B100E103A), +(_ucs2 0x102D102F100E1039), +(_ucs2 0x102D102F100E103A), +(_ucs2 0x100F1039), +(_ucs2 0x100F103A), +(_ucs2 0x102C100F1039), +(_ucs2 0x102C100F103A), +(_ucs2 0x102B100F1039), +(_ucs2 0x102B100F103A), +(_ucs2 0x102D100F1039), +(_ucs2 0x102D100F103A), +(_ucs2 0x102F100F1039), +(_ucs2 0x102F100F103A), +(_ucs2 0x1031100F1039), +(_ucs2 0x1031100F103A), +(_ucs2 0x1031102C100F1039), +(_ucs2 0x1031102C100F103A), +(_ucs2 0x1031102B100F1039), +(_ucs2 0x1031102B100F103A), +(_ucs2 0x102D102F100F1039), +(_ucs2 0x102D102F100F103A), +(_ucs2 0x10101039), +(_ucs2 0x1010103A), +(_ucs2 0x102C10101039), +(_ucs2 0x102C1010103A), +(_ucs2 0x102B10101039), +(_ucs2 0x102B1010103A), +(_ucs2 0x102D10101039), +(_ucs2 0x102D1010103A), +(_ucs2 0x102F10101039), +(_ucs2 0x102F1010103A), +(_ucs2 0x103110101039), +(_ucs2 0x10311010103A), +(_ucs2 0x1031102C10101039), +(_ucs2 0x1031102C1010103A), +(_ucs2 0x1031102B10101039), +(_ucs2 0x1031102B1010103A), +(_ucs2 0x102D102F10101039), +(_ucs2 0x102D102F1010103A), +(_ucs2 0x10111039), +(_ucs2 0x1011103A), +(_ucs2 0x102C10111039), +(_ucs2 0x102C1011103A), +(_ucs2 0x102B10111039), +(_ucs2 0x102B1011103A), +(_ucs2 0x102D10111039), +(_ucs2 0x102D1011103A), +(_ucs2 0x102F10111039), +(_ucs2 0x102F1011103A), +(_ucs2 0x103110111039), +(_ucs2 0x10311011103A), +(_ucs2 0x1031102C10111039), +(_ucs2 0x1031102C1011103A), +(_ucs2 0x1031102B10111039), +(_ucs2 0x1031102B1011103A), +(_ucs2 0x102D102F10111039), +(_ucs2 0x102D102F1011103A), +(_ucs2 0x10121039), +(_ucs2 0x1012103A), +(_ucs2 0x102C10121039), +(_ucs2 0x102C1012103A), +(_ucs2 0x102B10121039), +(_ucs2 0x102B1012103A), +(_ucs2 0x102D10121039), +(_ucs2 0x102D1012103A), +(_ucs2 0x102F10121039), +(_ucs2 0x102F1012103A), +(_ucs2 0x103110121039), +(_ucs2 0x10311012103A), +(_ucs2 0x1031102C10121039), +(_ucs2 0x1031102C1012103A), +(_ucs2 0x1031102B10121039), +(_ucs2 0x1031102B1012103A), +(_ucs2 0x102D102F10121039), +(_ucs2 0x102D102F1012103A), +(_ucs2 0x10131039), +(_ucs2 0x1013103A), +(_ucs2 0x102C10131039), +(_ucs2 0x102C1013103A), +(_ucs2 0x102B10131039), +(_ucs2 0x102B1013103A), +(_ucs2 0x102D10131039), +(_ucs2 0x102D1013103A), +(_ucs2 0x102F10131039), +(_ucs2 0x102F1013103A), +(_ucs2 0x103110131039), +(_ucs2 0x10311013103A), +(_ucs2 0x1031102C10131039), +(_ucs2 0x1031102C1013103A), +(_ucs2 0x1031102B10131039), +(_ucs2 0x1031102B1013103A), +(_ucs2 0x102D102F10131039), +(_ucs2 0x102D102F1013103A), +(_ucs2 0x10141039), +(_ucs2 0x1014103A), +(_ucs2 0x102C10141039), +(_ucs2 0x102C1014103A), +(_ucs2 0x102B10141039), +(_ucs2 0x102B1014103A), +(_ucs2 0x102D10141039), +(_ucs2 0x102D1014103A), +(_ucs2 0x102F10141039), +(_ucs2 0x102F1014103A), +(_ucs2 0x103110141039), +(_ucs2 0x10311014103A), +(_ucs2 0x1031102C10141039), +(_ucs2 0x1031102C1014103A), +(_ucs2 0x1031102B10141039), +(_ucs2 0x1031102B1014103A), +(_ucs2 0x102D102F10141039), +(_ucs2 0x102D102F1014103A), +(_ucs2 0x10151039), +(_ucs2 0x1015103A), +(_ucs2 0x102C10151039), +(_ucs2 0x102C1015103A), +(_ucs2 0x102B10151039), +(_ucs2 0x102B1015103A), +(_ucs2 0x102D10151039), +(_ucs2 0x102D1015103A), +(_ucs2 0x102F10151039), +(_ucs2 0x102F1015103A), +(_ucs2 0x103110151039), +(_ucs2 0x10311015103A), +(_ucs2 0x1031102C10151039), +(_ucs2 0x1031102C1015103A), +(_ucs2 0x1031102B10151039), +(_ucs2 0x1031102B1015103A), +(_ucs2 0x102D102F10151039), +(_ucs2 0x102D102F1015103A), +(_ucs2 0x10161039), +(_ucs2 0x1016103A), +(_ucs2 0x102C10161039), +(_ucs2 0x102C1016103A), +(_ucs2 0x102B10161039), +(_ucs2 0x102B1016103A), +(_ucs2 0x102D10161039), +(_ucs2 0x102D1016103A), +(_ucs2 0x102F10161039), +(_ucs2 0x102F1016103A), +(_ucs2 0x103110161039), +(_ucs2 0x10311016103A), +(_ucs2 0x1031102C10161039), +(_ucs2 0x1031102C1016103A), +(_ucs2 0x1031102B10161039), +(_ucs2 0x1031102B1016103A), +(_ucs2 0x102D102F10161039), +(_ucs2 0x102D102F1016103A), +(_ucs2 0x10171039), +(_ucs2 0x1017103A), +(_ucs2 0x102C10171039), +(_ucs2 0x102C1017103A), +(_ucs2 0x102B10171039), +(_ucs2 0x102B1017103A), +(_ucs2 0x102D10171039), +(_ucs2 0x102D1017103A), +(_ucs2 0x102F10171039), +(_ucs2 0x102F1017103A), +(_ucs2 0x103110171039), +(_ucs2 0x10311017103A), +(_ucs2 0x1031102C10171039), +(_ucs2 0x1031102C1017103A), +(_ucs2 0x1031102B10171039), +(_ucs2 0x1031102B1017103A), +(_ucs2 0x102D102F10171039), +(_ucs2 0x102D102F1017103A), +(_ucs2 0x10181039), +(_ucs2 0x1018103A), +(_ucs2 0x102C10181039), +(_ucs2 0x102C1018103A), +(_ucs2 0x102B10181039), +(_ucs2 0x102B1018103A), +(_ucs2 0x102D10181039), +(_ucs2 0x102D1018103A), +(_ucs2 0x102F10181039), +(_ucs2 0x102F1018103A), +(_ucs2 0x103110181039), +(_ucs2 0x10311018103A), +(_ucs2 0x1031102C10181039), +(_ucs2 0x1031102C1018103A), +(_ucs2 0x1031102B10181039), +(_ucs2 0x1031102B1018103A), +(_ucs2 0x102D102F10181039), +(_ucs2 0x102D102F1018103A), +(_ucs2 0x10191039), +(_ucs2 0x1019103A), +(_ucs2 0x102C10191039), +(_ucs2 0x102C1019103A), +(_ucs2 0x102B10191039), +(_ucs2 0x102B1019103A), +(_ucs2 0x102D10191039), +(_ucs2 0x102D1019103A), +(_ucs2 0x102F10191039), +(_ucs2 0x102F1019103A), +(_ucs2 0x103110191039), +(_ucs2 0x10311019103A), +(_ucs2 0x1031102C10191039), +(_ucs2 0x1031102C1019103A), +(_ucs2 0x1031102B10191039), +(_ucs2 0x1031102B1019103A), +(_ucs2 0x102D102F10191039), +(_ucs2 0x102D102F1019103A), +(_ucs2 0x101A1039), +(_ucs2 0x101A103A), +(_ucs2 0x102C101A1039), +(_ucs2 0x102C101A103A), +(_ucs2 0x102B101A1039), +(_ucs2 0x102B101A103A), +(_ucs2 0x102D101A1039), +(_ucs2 0x102D101A103A), +(_ucs2 0x102F101A1039), +(_ucs2 0x102F101A103A), +(_ucs2 0x1031101A1039), +(_ucs2 0x1031101A103A), +(_ucs2 0x1031102C101A1039), +(_ucs2 0x1031102C101A103A), +(_ucs2 0x1031102B101A1039), +(_ucs2 0x1031102B101A103A), +(_ucs2 0x102D102F101A1039), +(_ucs2 0x102D102F101A103A), +(_ucs2 0x101B1039), +(_ucs2 0x101B103A), +(_ucs2 0x102C101B1039), +(_ucs2 0x102C101B103A), +(_ucs2 0x102B101B1039), +(_ucs2 0x102B101B103A), +(_ucs2 0x102D101B1039), +(_ucs2 0x102D101B103A), +(_ucs2 0x102F101B1039), +(_ucs2 0x102F101B103A), +(_ucs2 0x1031101B1039), +(_ucs2 0x1031101B103A), +(_ucs2 0x1031102C101B1039), +(_ucs2 0x1031102C101B103A), +(_ucs2 0x1031102B101B1039), +(_ucs2 0x1031102B101B103A), +(_ucs2 0x102D102F101B1039), +(_ucs2 0x102D102F101B103A), +(_ucs2 0x101C1039), +(_ucs2 0x101C103A), +(_ucs2 0x102C101C1039), +(_ucs2 0x102C101C103A), +(_ucs2 0x102B101C1039), +(_ucs2 0x102B101C103A), +(_ucs2 0x102D101C1039), +(_ucs2 0x102D101C103A), +(_ucs2 0x102F101C1039), +(_ucs2 0x102F101C103A), +(_ucs2 0x1031101C1039), +(_ucs2 0x1031101C103A), +(_ucs2 0x1031102C101C1039), +(_ucs2 0x1031102C101C103A), +(_ucs2 0x1031102B101C1039), +(_ucs2 0x1031102B101C103A), +(_ucs2 0x102D102F101C1039), +(_ucs2 0x102D102F101C103A), +(_ucs2 0x101D103A), +(_ucs2 0x102C101D103A), +(_ucs2 0x102B101D103A), +(_ucs2 0x102D101D103A), +(_ucs2 0x102F101D103A), +(_ucs2 0x1031101D103A), +(_ucs2 0x1031102C101D103A), +(_ucs2 0x1031102B101D103A), +(_ucs2 0x102D102F101D103A), +(_ucs2 0x101E1039), +(_ucs2 0x101E103A), +(_ucs2 0x102C101E1039), +(_ucs2 0x102C101E103A), +(_ucs2 0x102B101E1039), +(_ucs2 0x102B101E103A), +(_ucs2 0x102D101E1039), +(_ucs2 0x102D101E103A), +(_ucs2 0x102F101E1039), +(_ucs2 0x102F101E103A), +(_ucs2 0x1031101E1039), +(_ucs2 0x1031101E103A), +(_ucs2 0x1031102C101E1039), +(_ucs2 0x1031102C101E103A), +(_ucs2 0x1031102B101E1039), +(_ucs2 0x1031102B101E103A), +(_ucs2 0x102D102F101E1039), +(_ucs2 0x102D102F101E103A), +(_ucs2 0x101F1039), +(_ucs2 0x101F103A), +(_ucs2 0x102C101F1039), +(_ucs2 0x102C101F103A), +(_ucs2 0x102B101F1039), +(_ucs2 0x102B101F103A), +(_ucs2 0x102D101F1039), +(_ucs2 0x102D101F103A), +(_ucs2 0x102F101F1039), +(_ucs2 0x102F101F103A), +(_ucs2 0x1031101F1039), +(_ucs2 0x1031101F103A), +(_ucs2 0x1031102C101F1039), +(_ucs2 0x1031102C101F103A), +(_ucs2 0x1031102B101F1039), +(_ucs2 0x1031102B101F103A), +(_ucs2 0x102D102F101F1039), +(_ucs2 0x102D102F101F103A), +(_ucs2 0x1020103A), +(_ucs2 0x102C1020103A), +(_ucs2 0x102B1020103A), +(_ucs2 0x102D1020103A), +(_ucs2 0x102F1020103A), +(_ucs2 0x10311020103A), +(_ucs2 0x1031102C1020103A), +(_ucs2 0x1031102B1020103A), +(_ucs2 0x102D102F1020103A), +(_ucs2 0x1021103A), +(_ucs2 0x102C1021103A), +(_ucs2 0x102B1021103A), +(_ucs2 0x102D1021103A), +(_ucs2 0x102F1021103A), +(_ucs2 0x10311021103A), +(_ucs2 0x1031102C1021103A), +(_ucs2 0x1031102B1021103A), +(_ucs2 0x102D102F1021103A), +('--- Medials'), +(_ucs2 0x105E), +(_ucs2 0x105F), +(_ucs2 0x103B), +(_ucs2 0x103C), +(_ucs2 0x1060), +(_ucs2 0x103D), +(_ucs2 0x1082), +(_ucs2 0x103E), +(_ucs2 0x103B103D), +(_ucs2 0x103C103D), +(_ucs2 0x103B103E), +(_ucs2 0x103C103E), +(_ucs2 0x103D103E), +(_ucs2 0x103B103D103E), +(_ucs2 0x103C103D103E), +('--- Independent vowels'), +(_ucs2 0x1021102D), +(_ucs2 0x1023), +(_ucs2 0x1021102E), +(_ucs2 0x1024), +(_ucs2 0x1021102F), +(_ucs2 0x1025), +(_ucs2 0x10211030), +(_ucs2 0x1026), +(_ucs2 0x10211031), +(_ucs2 0x1027), +(_ucs2 0x1028), +(_ucs2 0x10211031102C), +(_ucs2 0x1029), +(_ucs2 0x10211031102C103A), +(_ucs2 0x102A), +(_ucs2 0x102D1019103A), +(_ucs2 0x102D1036), +(_ucs2 0x102D1019103A1037), +(_ucs2 0x102D10361037), +(_ucs2 0x102D1019103A1038), +(_ucs2 0x102D10361038), +(_ucs2 0x102F1019103A), +(_ucs2 0x102F1036), +(_ucs2 0x102F1019103A1037), +(_ucs2 0x102F10361037), +(_ucs2 0x102F1019103A1038), +(_ucs2 0x102F10361038), +(_ucs2 0x1021102F1036), +(_ucs2 0x1025102F1036), +('--- Independent vowels with finals'), +(_ucs2 0x1021102D10001039), +(_ucs2 0x102310001039), +(_ucs2 0x1021102D1000103A), +(_ucs2 0x10231000103A), +(_ucs2 0x1021102F10001039), +(_ucs2 0x102510001039), +(_ucs2 0x1021102F1000103A), +(_ucs2 0x10251000103A), +(_ucs2 0x1021103110001039), +(_ucs2 0x102710001039), +(_ucs2 0x102110311000103A), +(_ucs2 0x10271000103A), +(_ucs2 0x10211031102C10001039), +(_ucs2 0x102910001039), +(_ucs2 0x10211031102C1000103A), +(_ucs2 0x10291000103A), +(_ucs2 0x10211031102C10001039), +(_ucs2 0x10291031102C10001039), +(_ucs2 0x10211031102C1000103A), +(_ucs2 0x10291031102C1000103A), +(_ucs2 0x1021102D10011039), +(_ucs2 0x102310011039), +(_ucs2 0x1021102D1001103A), +(_ucs2 0x10231001103A), +(_ucs2 0x1021102F10011039), +(_ucs2 0x102510011039), +(_ucs2 0x1021102F1001103A), +(_ucs2 0x10251001103A), +(_ucs2 0x1021103110011039), +(_ucs2 0x102710011039), +(_ucs2 0x102110311001103A), +(_ucs2 0x10271001103A), +(_ucs2 0x10211031102C10011039), +(_ucs2 0x102910011039), +(_ucs2 0x10211031102C1001103A), +(_ucs2 0x10291001103A), +(_ucs2 0x10211031102C10011039), +(_ucs2 0x10291031102C10011039), +(_ucs2 0x10211031102C1001103A), +(_ucs2 0x10291031102C1001103A), +(_ucs2 0x1021102D10021039), +(_ucs2 0x102310021039), +(_ucs2 0x1021102D1002103A), +(_ucs2 0x10231002103A), +(_ucs2 0x1021102F10021039), +(_ucs2 0x102510021039), +(_ucs2 0x1021102F1002103A), +(_ucs2 0x10251002103A), +(_ucs2 0x1021103110021039), +(_ucs2 0x102710021039), +(_ucs2 0x102110311002103A), +(_ucs2 0x10271002103A), +(_ucs2 0x10211031102C10021039), +(_ucs2 0x102910021039), +(_ucs2 0x10211031102C1002103A), +(_ucs2 0x10291002103A), +(_ucs2 0x10211031102C10021039), +(_ucs2 0x10291031102C10021039), +(_ucs2 0x10211031102C1002103A), +(_ucs2 0x10291031102C1002103A), +(_ucs2 0x1021102D10031039), +(_ucs2 0x102310031039), +(_ucs2 0x1021102D1003103A), +(_ucs2 0x10231003103A), +(_ucs2 0x1021102F10031039), +(_ucs2 0x102510031039), +(_ucs2 0x1021102F1003103A), +(_ucs2 0x10251003103A), +(_ucs2 0x1021103110031039), +(_ucs2 0x102710031039), +(_ucs2 0x102110311003103A), +(_ucs2 0x10271003103A), +(_ucs2 0x10211031102C10031039), +(_ucs2 0x102910031039), +(_ucs2 0x10211031102C1003103A), +(_ucs2 0x10291003103A), +(_ucs2 0x10211031102C10031039), +(_ucs2 0x10291031102C10031039), +(_ucs2 0x10211031102C1003103A), +(_ucs2 0x10291031102C1003103A), +(_ucs2 0x1021102D10041039), +(_ucs2 0x102310041039), +(_ucs2 0x1021102D1004103A), +(_ucs2 0x10231004103A), +(_ucs2 0x1021102F10041039), +(_ucs2 0x102510041039), +(_ucs2 0x1021102F1004103A), +(_ucs2 0x10251004103A), +(_ucs2 0x1021103110041039), +(_ucs2 0x102710041039), +(_ucs2 0x102110311004103A), +(_ucs2 0x10271004103A), +(_ucs2 0x10211031102C10041039), +(_ucs2 0x102910041039), +(_ucs2 0x10211031102C1004103A), +(_ucs2 0x10291004103A), +(_ucs2 0x10211031102C10041039), +(_ucs2 0x10291031102C10041039), +(_ucs2 0x10211031102C1004103A), +(_ucs2 0x10291031102C1004103A), +(_ucs2 0x1021102D10051039), +(_ucs2 0x102310051039), +(_ucs2 0x1021102D1005103A), +(_ucs2 0x10231005103A), +(_ucs2 0x1021102F10051039), +(_ucs2 0x102510051039), +(_ucs2 0x1021102F1005103A), +(_ucs2 0x10251005103A), +(_ucs2 0x1021103110051039), +(_ucs2 0x102710051039), +(_ucs2 0x102110311005103A), +(_ucs2 0x10271005103A), +(_ucs2 0x10211031102C10051039), +(_ucs2 0x102910051039), +(_ucs2 0x10211031102C1005103A), +(_ucs2 0x10291005103A), +(_ucs2 0x10211031102C10051039), +(_ucs2 0x10291031102C10051039), +(_ucs2 0x10211031102C1005103A), +(_ucs2 0x10291031102C1005103A), +(_ucs2 0x1021102D10061039), +(_ucs2 0x102310061039), +(_ucs2 0x1021102D1006103A), +(_ucs2 0x10231006103A), +(_ucs2 0x1021102F10061039), +(_ucs2 0x102510061039), +(_ucs2 0x1021102F1006103A), +(_ucs2 0x10251006103A), +(_ucs2 0x1021103110061039), +(_ucs2 0x102710061039), +(_ucs2 0x102110311006103A), +(_ucs2 0x10271006103A), +(_ucs2 0x10211031102C10061039), +(_ucs2 0x102910061039), +(_ucs2 0x10211031102C1006103A), +(_ucs2 0x10291006103A), +(_ucs2 0x10211031102C10061039), +(_ucs2 0x10291031102C10061039), +(_ucs2 0x10211031102C1006103A), +(_ucs2 0x10291031102C1006103A), +(_ucs2 0x1021102D10071039), +(_ucs2 0x102310071039), +(_ucs2 0x1021102D1007103A), +(_ucs2 0x10231007103A), +(_ucs2 0x1021102F10071039), +(_ucs2 0x102510071039), +(_ucs2 0x1021102F1007103A), +(_ucs2 0x10251007103A), +(_ucs2 0x1021103110071039), +(_ucs2 0x102710071039), +(_ucs2 0x102110311007103A), +(_ucs2 0x10271007103A), +(_ucs2 0x10211031102C10071039), +(_ucs2 0x102910071039), +(_ucs2 0x10211031102C1007103A), +(_ucs2 0x10291007103A), +(_ucs2 0x10211031102C10071039), +(_ucs2 0x10291031102C10071039), +(_ucs2 0x10211031102C1007103A), +(_ucs2 0x10291031102C1007103A), +(_ucs2 0x1021102D10091039), +(_ucs2 0x102310091039), +(_ucs2 0x1021102D1009103A), +(_ucs2 0x10231009103A), +(_ucs2 0x1021102F10091039), +(_ucs2 0x102510091039), +(_ucs2 0x1021102F1009103A), +(_ucs2 0x10251009103A), +(_ucs2 0x1021103110091039), +(_ucs2 0x102710091039), +(_ucs2 0x102110311009103A), +(_ucs2 0x10271009103A), +(_ucs2 0x10211031102C10091039), +(_ucs2 0x102910091039), +(_ucs2 0x10211031102C1009103A), +(_ucs2 0x10291009103A), +(_ucs2 0x10211031102C10091039), +(_ucs2 0x10291031102C10091039), +(_ucs2 0x10211031102C1009103A), +(_ucs2 0x10291031102C1009103A), +(_ucs2 0x1021102D100A1039), +(_ucs2 0x1023100A1039), +(_ucs2 0x1021102D100A103A), +(_ucs2 0x1023100A103A), +(_ucs2 0x1021102F100A1039), +(_ucs2 0x1025100A1039), +(_ucs2 0x1021102F100A103A), +(_ucs2 0x1025100A103A), +(_ucs2 0x10211031100A1039), +(_ucs2 0x1027100A1039), +(_ucs2 0x10211031100A103A), +(_ucs2 0x1027100A103A), +(_ucs2 0x10211031102C100A1039), +(_ucs2 0x1029100A1039), +(_ucs2 0x10211031102C100A103A), +(_ucs2 0x1029100A103A), +(_ucs2 0x10211031102C100A1039), +(_ucs2 0x10291031102C100A1039), +(_ucs2 0x10211031102C100A103A), +(_ucs2 0x10291031102C100A103A), +(_ucs2 0x1021102D100B1039), +(_ucs2 0x1023100B1039), +(_ucs2 0x1021102D100B103A), +(_ucs2 0x1023100B103A), +(_ucs2 0x1021102F100B1039), +(_ucs2 0x1025100B1039), +(_ucs2 0x1021102F100B103A), +(_ucs2 0x1025100B103A), +(_ucs2 0x10211031100B1039), +(_ucs2 0x1027100B1039), +(_ucs2 0x10211031100B103A), +(_ucs2 0x1027100B103A), +(_ucs2 0x10211031102C100B1039), +(_ucs2 0x1029100B1039), +(_ucs2 0x10211031102C100B103A), +(_ucs2 0x1029100B103A), +(_ucs2 0x10211031102C100B1039), +(_ucs2 0x10291031102C100B1039), +(_ucs2 0x10211031102C100B103A), +(_ucs2 0x10291031102C100B103A), +(_ucs2 0x1021102D100C1039), +(_ucs2 0x1023100C1039), +(_ucs2 0x1021102D100C103A), +(_ucs2 0x1023100C103A), +(_ucs2 0x1021102F100C1039), +(_ucs2 0x1025100C1039), +(_ucs2 0x1021102F100C103A), +(_ucs2 0x1025100C103A), +(_ucs2 0x10211031100C1039), +(_ucs2 0x1027100C1039), +(_ucs2 0x10211031100C103A), +(_ucs2 0x1027100C103A), +(_ucs2 0x10211031102C100C1039), +(_ucs2 0x1029100C1039), +(_ucs2 0x10211031102C100C103A), +(_ucs2 0x1029100C103A), +(_ucs2 0x10211031102C100C1039), +(_ucs2 0x10291031102C100C1039), +(_ucs2 0x10211031102C100C103A), +(_ucs2 0x10291031102C100C103A), +(_ucs2 0x1021102D100D1039), +(_ucs2 0x1023100D1039), +(_ucs2 0x1021102D100D103A), +(_ucs2 0x1023100D103A), +(_ucs2 0x1021102F100D1039), +(_ucs2 0x1025100D1039), +(_ucs2 0x1021102F100D103A), +(_ucs2 0x1025100D103A), +(_ucs2 0x10211031100D1039), +(_ucs2 0x1027100D1039), +(_ucs2 0x10211031100D103A), +(_ucs2 0x1027100D103A), +(_ucs2 0x10211031102C100D1039), +(_ucs2 0x1029100D1039), +(_ucs2 0x10211031102C100D103A), +(_ucs2 0x1029100D103A), +(_ucs2 0x10211031102C100D1039), +(_ucs2 0x10291031102C100D1039), +(_ucs2 0x10211031102C100D103A), +(_ucs2 0x10291031102C100D103A), +(_ucs2 0x1021102D100E1039), +(_ucs2 0x1023100E1039), +(_ucs2 0x1021102D100E103A), +(_ucs2 0x1023100E103A), +(_ucs2 0x1021102F100E1039), +(_ucs2 0x1025100E1039), +(_ucs2 0x1021102F100E103A), +(_ucs2 0x1025100E103A), +(_ucs2 0x10211031100E1039), +(_ucs2 0x1027100E1039), +(_ucs2 0x10211031100E103A), +(_ucs2 0x1027100E103A), +(_ucs2 0x10211031102C100E1039), +(_ucs2 0x1029100E1039), +(_ucs2 0x10211031102C100E103A), +(_ucs2 0x1029100E103A), +(_ucs2 0x10211031102C100E1039), +(_ucs2 0x10291031102C100E1039), +(_ucs2 0x10211031102C100E103A), +(_ucs2 0x10291031102C100E103A), +(_ucs2 0x1021102D100F1039), +(_ucs2 0x1023100F1039), +(_ucs2 0x1021102D100F103A), +(_ucs2 0x1023100F103A), +(_ucs2 0x1021102F100F1039), +(_ucs2 0x1025100F1039), +(_ucs2 0x1021102F100F103A), +(_ucs2 0x1025100F103A), +(_ucs2 0x10211031100F1039), +(_ucs2 0x1027100F1039), +(_ucs2 0x10211031100F103A), +(_ucs2 0x1027100F103A), +(_ucs2 0x10211031102C100F1039), +(_ucs2 0x1029100F1039), +(_ucs2 0x10211031102C100F103A), +(_ucs2 0x1029100F103A), +(_ucs2 0x10211031102C100F1039), +(_ucs2 0x10291031102C100F1039), +(_ucs2 0x10211031102C100F103A), +(_ucs2 0x10291031102C100F103A), +(_ucs2 0x1021102D10101039), +(_ucs2 0x102310101039), +(_ucs2 0x1021102D1010103A), +(_ucs2 0x10231010103A), +(_ucs2 0x1021102F10101039), +(_ucs2 0x102510101039), +(_ucs2 0x1021102F1010103A), +(_ucs2 0x10251010103A), +(_ucs2 0x1021103110101039), +(_ucs2 0x102710101039), +(_ucs2 0x102110311010103A), +(_ucs2 0x10271010103A), +(_ucs2 0x10211031102C10101039), +(_ucs2 0x102910101039), +(_ucs2 0x10211031102C1010103A), +(_ucs2 0x10291010103A), +(_ucs2 0x10211031102C10101039), +(_ucs2 0x10291031102C10101039), +(_ucs2 0x10211031102C1010103A), +(_ucs2 0x10291031102C1010103A), +(_ucs2 0x1021102D10111039), +(_ucs2 0x102310111039), +(_ucs2 0x1021102D1011103A), +(_ucs2 0x10231011103A), +(_ucs2 0x1021102F10111039), +(_ucs2 0x102510111039), +(_ucs2 0x1021102F1011103A), +(_ucs2 0x10251011103A), +(_ucs2 0x1021103110111039), +(_ucs2 0x102710111039), +(_ucs2 0x102110311011103A), +(_ucs2 0x10271011103A), +(_ucs2 0x10211031102C10111039), +(_ucs2 0x102910111039), +(_ucs2 0x10211031102C1011103A), +(_ucs2 0x10291011103A), +(_ucs2 0x10211031102C10111039), +(_ucs2 0x10291031102C10111039), +(_ucs2 0x10211031102C1011103A), +(_ucs2 0x10291031102C1011103A), +(_ucs2 0x1021102D10121039), +(_ucs2 0x102310121039), +(_ucs2 0x1021102D1012103A), +(_ucs2 0x10231012103A), +(_ucs2 0x1021102F10121039), +(_ucs2 0x102510121039), +(_ucs2 0x1021102F1012103A), +(_ucs2 0x10251012103A), +(_ucs2 0x1021103110121039), +(_ucs2 0x102710121039), +(_ucs2 0x102110311012103A), +(_ucs2 0x10271012103A), +(_ucs2 0x10211031102C10121039), +(_ucs2 0x102910121039), +(_ucs2 0x10211031102C1012103A), +(_ucs2 0x10291012103A), +(_ucs2 0x10211031102C10121039), +(_ucs2 0x10291031102C10121039), +(_ucs2 0x10211031102C1012103A), +(_ucs2 0x10291031102C1012103A), +(_ucs2 0x1021102D10131039), +(_ucs2 0x102310131039), +(_ucs2 0x1021102D1013103A), +(_ucs2 0x10231013103A), +(_ucs2 0x1021102F10131039), +(_ucs2 0x102510131039), +(_ucs2 0x1021102F1013103A), +(_ucs2 0x10251013103A), +(_ucs2 0x1021103110131039), +(_ucs2 0x102710131039), +(_ucs2 0x102110311013103A), +(_ucs2 0x10271013103A), +(_ucs2 0x10211031102C10131039), +(_ucs2 0x102910131039), +(_ucs2 0x10211031102C1013103A), +(_ucs2 0x10291013103A), +(_ucs2 0x10211031102C10131039), +(_ucs2 0x10291031102C10131039), +(_ucs2 0x10211031102C1013103A), +(_ucs2 0x10291031102C1013103A), +(_ucs2 0x1021102D10141039), +(_ucs2 0x102310141039), +(_ucs2 0x1021102D1014103A), +(_ucs2 0x10231014103A), +(_ucs2 0x1021102F10141039), +(_ucs2 0x102510141039), +(_ucs2 0x1021102F1014103A), +(_ucs2 0x10251014103A), +(_ucs2 0x1021103110141039), +(_ucs2 0x102710141039), +(_ucs2 0x102110311014103A), +(_ucs2 0x10271014103A), +(_ucs2 0x10211031102C10141039), +(_ucs2 0x102910141039), +(_ucs2 0x10211031102C1014103A), +(_ucs2 0x10291014103A), +(_ucs2 0x10211031102C10141039), +(_ucs2 0x10291031102C10141039), +(_ucs2 0x10211031102C1014103A), +(_ucs2 0x10291031102C1014103A), +(_ucs2 0x1021102D10151039), +(_ucs2 0x102310151039), +(_ucs2 0x1021102D1015103A), +(_ucs2 0x10231015103A), +(_ucs2 0x1021102F10151039), +(_ucs2 0x102510151039), +(_ucs2 0x1021102F1015103A), +(_ucs2 0x10251015103A), +(_ucs2 0x1021103110151039), +(_ucs2 0x102710151039), +(_ucs2 0x102110311015103A), +(_ucs2 0x10271015103A), +(_ucs2 0x10211031102C10151039), +(_ucs2 0x102910151039), +(_ucs2 0x10211031102C1015103A), +(_ucs2 0x10291015103A), +(_ucs2 0x10211031102C10151039), +(_ucs2 0x10291031102C10151039), +(_ucs2 0x10211031102C1015103A), +(_ucs2 0x10291031102C1015103A), +(_ucs2 0x1021102D10161039), +(_ucs2 0x102310161039), +(_ucs2 0x1021102D1016103A), +(_ucs2 0x10231016103A), +(_ucs2 0x1021102F10161039), +(_ucs2 0x102510161039), +(_ucs2 0x1021102F1016103A), +(_ucs2 0x10251016103A), +(_ucs2 0x1021103110161039), +(_ucs2 0x102710161039), +(_ucs2 0x102110311016103A), +(_ucs2 0x10271016103A), +(_ucs2 0x10211031102C10161039), +(_ucs2 0x102910161039), +(_ucs2 0x10211031102C1016103A), +(_ucs2 0x10291016103A), +(_ucs2 0x10211031102C10161039), +(_ucs2 0x10291031102C10161039), +(_ucs2 0x10211031102C1016103A), +(_ucs2 0x10291031102C1016103A), +(_ucs2 0x1021102D10171039), +(_ucs2 0x102310171039), +(_ucs2 0x1021102D1017103A), +(_ucs2 0x10231017103A), +(_ucs2 0x1021102F10171039), +(_ucs2 0x102510171039), +(_ucs2 0x1021102F1017103A), +(_ucs2 0x10251017103A), +(_ucs2 0x1021103110171039), +(_ucs2 0x102710171039), +(_ucs2 0x102110311017103A), +(_ucs2 0x10271017103A), +(_ucs2 0x10211031102C10171039), +(_ucs2 0x102910171039), +(_ucs2 0x10211031102C1017103A), +(_ucs2 0x10291017103A), +(_ucs2 0x10211031102C10171039), +(_ucs2 0x10291031102C10171039), +(_ucs2 0x10211031102C1017103A), +(_ucs2 0x10291031102C1017103A), +(_ucs2 0x1021102D10181039), +(_ucs2 0x102310181039), +(_ucs2 0x1021102D1018103A), +(_ucs2 0x10231018103A), +(_ucs2 0x1021102F10181039), +(_ucs2 0x102510181039), +(_ucs2 0x1021102F1018103A), +(_ucs2 0x10251018103A), +(_ucs2 0x1021103110181039), +(_ucs2 0x102710181039), +(_ucs2 0x102110311018103A), +(_ucs2 0x10271018103A), +(_ucs2 0x10211031102C10181039), +(_ucs2 0x102910181039), +(_ucs2 0x10211031102C1018103A), +(_ucs2 0x10291018103A), +(_ucs2 0x10211031102C10181039), +(_ucs2 0x10291031102C10181039), +(_ucs2 0x10211031102C1018103A), +(_ucs2 0x10291031102C1018103A), +(_ucs2 0x1021102D10191039), +(_ucs2 0x102310191039), +(_ucs2 0x1021102D1019103A), +(_ucs2 0x10231019103A), +(_ucs2 0x1021102F10191039), +(_ucs2 0x102510191039), +(_ucs2 0x1021102F1019103A), +(_ucs2 0x10251019103A), +(_ucs2 0x1021103110191039), +(_ucs2 0x102710191039), +(_ucs2 0x102110311019103A), +(_ucs2 0x10271019103A), +(_ucs2 0x10211031102C10191039), +(_ucs2 0x102910191039), +(_ucs2 0x10211031102C1019103A), +(_ucs2 0x10291019103A), +(_ucs2 0x10211031102C10191039), +(_ucs2 0x10291031102C10191039), +(_ucs2 0x10211031102C1019103A), +(_ucs2 0x10291031102C1019103A), +(_ucs2 0x1021102D101A1039), +(_ucs2 0x1023101A1039), +(_ucs2 0x1021102D101A103A), +(_ucs2 0x1023101A103A), +(_ucs2 0x1021102F101A1039), +(_ucs2 0x1025101A1039), +(_ucs2 0x1021102F101A103A), +(_ucs2 0x1025101A103A), +(_ucs2 0x10211031101A1039), +(_ucs2 0x1027101A1039), +(_ucs2 0x10211031101A103A), +(_ucs2 0x1027101A103A), +(_ucs2 0x10211031102C101A1039), +(_ucs2 0x1029101A1039), +(_ucs2 0x10211031102C101A103A), +(_ucs2 0x1029101A103A), +(_ucs2 0x10211031102C101A1039), +(_ucs2 0x10291031102C101A1039), +(_ucs2 0x10211031102C101A103A), +(_ucs2 0x10291031102C101A103A), +(_ucs2 0x1021102D101B1039), +(_ucs2 0x1023101B1039), +(_ucs2 0x1021102D101B103A), +(_ucs2 0x1023101B103A), +(_ucs2 0x1021102F101B1039), +(_ucs2 0x1025101B1039), +(_ucs2 0x1021102F101B103A), +(_ucs2 0x1025101B103A), +(_ucs2 0x10211031101B1039), +(_ucs2 0x1027101B1039), +(_ucs2 0x10211031101B103A), +(_ucs2 0x1027101B103A), +(_ucs2 0x10211031102C101B1039), +(_ucs2 0x1029101B1039), +(_ucs2 0x10211031102C101B103A), +(_ucs2 0x1029101B103A), +(_ucs2 0x10211031102C101B1039), +(_ucs2 0x10291031102C101B1039), +(_ucs2 0x10211031102C101B103A), +(_ucs2 0x10291031102C101B103A), +(_ucs2 0x1021102D101C1039), +(_ucs2 0x1023101C1039), +(_ucs2 0x1021102D101C103A), +(_ucs2 0x1023101C103A), +(_ucs2 0x1021102F101C1039), +(_ucs2 0x1025101C1039), +(_ucs2 0x1021102F101C103A), +(_ucs2 0x1025101C103A), +(_ucs2 0x10211031101C1039), +(_ucs2 0x1027101C1039), +(_ucs2 0x10211031101C103A), +(_ucs2 0x1027101C103A), +(_ucs2 0x10211031102C101C1039), +(_ucs2 0x1029101C1039), +(_ucs2 0x10211031102C101C103A), +(_ucs2 0x1029101C103A), +(_ucs2 0x10211031102C101C1039), +(_ucs2 0x10291031102C101C1039), +(_ucs2 0x10211031102C101C103A), +(_ucs2 0x10291031102C101C103A), +(_ucs2 0x1021102D101E1039), +(_ucs2 0x1023101E1039), +(_ucs2 0x1021102D101E103A), +(_ucs2 0x1023101E103A), +(_ucs2 0x1021102F101E1039), +(_ucs2 0x1025101E1039), +(_ucs2 0x1021102F101E103A), +(_ucs2 0x1025101E103A), +(_ucs2 0x10211031101E1039), +(_ucs2 0x1027101E1039), +(_ucs2 0x10211031101E103A), +(_ucs2 0x1027101E103A), +(_ucs2 0x10211031102C101E1039), +(_ucs2 0x1029101E1039), +(_ucs2 0x10211031102C101E103A), +(_ucs2 0x1029101E103A), +(_ucs2 0x10211031102C101E1039), +(_ucs2 0x10291031102C101E1039), +(_ucs2 0x10211031102C101E103A), +(_ucs2 0x10291031102C101E103A), +(_ucs2 0x1021102D101F1039), +(_ucs2 0x1023101F1039), +(_ucs2 0x1021102D101F103A), +(_ucs2 0x1023101F103A), +(_ucs2 0x1021102F101F1039), +(_ucs2 0x1025101F1039), +(_ucs2 0x1021102F101F103A), +(_ucs2 0x1025101F103A), +(_ucs2 0x10211031101F1039), +(_ucs2 0x1027101F1039), +(_ucs2 0x10211031101F103A), +(_ucs2 0x1027101F103A), +(_ucs2 0x10211031102C101F1039), +(_ucs2 0x1029101F1039), +(_ucs2 0x10211031102C101F103A), +(_ucs2 0x1029101F103A), +(_ucs2 0x10211031102C101F1039), +(_ucs2 0x10291031102C101F1039), +(_ucs2 0x10211031102C101F103A), +(_ucs2 0x10291031102C101F103A), +('--- Contractions'), +(_ucs2 0x1031102C1000103A1000103B), +(_ucs2 0x1031102C1000103A103B /* (suffix of) man */), +(_ucs2 0x1014103A1014102F1015103A), +(_ucs2 0x1014103A102F1015103A /* (suffix of) I */), +('--- Great Sa'), +(_ucs2 0x1031101E1039101E), +(_ucs2 0x1031103F), +(_ucs2 0x102D101E1039101E), +(_ucs2 0x102D103F), +(_ucs2 0x102F101E1039101E), +(_ucs2 0x102F103F), +(_ucs2 0x1021102D101E1039101E), +(_ucs2 0x1023103F), +(_ucs2 0x1021102F101E1039101E), +(_ucs2 0x1025103F), +(_ucs2 0x101E1039101E), +(_ucs2 0x103F), +('--- Symbols - collate as long form'), +(_ucs2 0x1014103E102D102F1000103A), +(_ucs2 0x104C), +(_ucs2 0x101B103D10311037), +(_ucs2 0x104D), +(_ucs2 0x101C100A103A103810001031102C1004103A1038), +(_ucs2 0x104E1004103A1038), +(_ucs2 0x1021102D), +(_ucs2 0x104F), +('--- Short Forms may need to be added here'), +(_ucs2 0x101C1000103A101A102C), +(_ucs2 0x101C1000103A103B102C /* right hand side */), +(_ucs2 0x101E1019102E), +(_ucs2 0x101E10391019102E /* daughter */), +(_ucs2 0x101110191004103A1038), +(_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)))) +1 2259 108C +2 22593ACB 1037 +3 22593ACC 1038 +4 22593ACD 10371038 +5 --- Vowels +6 2232 102C +7 2232 102B +8 2246 1032 +9 22463ACB 1031102C +10 22463ACB 1031102B +11 22463ACC 1031102C103A +12 22463ACC 1031102B103A +13 2248 1034 +14 22483ACB 1036 +15 22483ACC 102D102F +16 --- Vowels with finals +17 22483ACD 10001039 +18 22483ACD 1000103A +19 22483ACE 102C10001039 +20 22483ACE 102C1000103A +21 22483ACE 102B10001039 +22 22483ACE 102B1000103A +23 22483ACF 102D10001039 +24 22483ACF 102D1000103A +25 22483AD0 102F10001039 +26 22483AD0 102F1000103A +27 22483AD1 103110001039 +28 22483AD1 10311000103A +29 22483AD2 1031102C10001039 +30 22483AD2 1031102C1000103A +31 22483AD2 1031102B10001039 +32 22483AD2 1031102B1000103A +33 22483AD3 102D102F10001039 +34 22483AD3 102D102F1000103A +35 22483AD4 10011039 +36 22483AD4 1001103A +37 22483AD5 102C10011039 +38 22483AD5 102C1001103A +39 22483AD5 102B10011039 +40 22483AD5 102B1001103A +41 22483AD6 102D10011039 +42 22483AD6 102D1001103A +43 22483AD7 102F10011039 +44 22483AD7 102F1001103A +45 22483AD8 103110011039 +46 22483AD8 10311001103A +47 22483AD9 1031102C10011039 +48 22483AD9 1031102C1001103A +49 22483AD9 1031102B10011039 +50 22483AD9 1031102B1001103A +51 22483ADA 102D102F10011039 +52 22483ADA 102D102F1001103A +53 22483ADB 10021039 +54 22483ADB 1002103A +55 22483ADC 102C10021039 +56 22483ADC 102C1002103A +57 22483ADC 102B10021039 +58 22483ADC 102B1002103A +59 22483ADD 102D10021039 +60 22483ADD 102D1002103A +61 22483ADE 102F10021039 +62 22483ADE 102F1002103A +63 22483ADF 103110021039 +64 22483ADF 10311002103A +65 22483AE0 1031102C10021039 +66 22483AE0 1031102C1002103A +67 22483AE0 1031102B10021039 +68 22483AE0 1031102B1002103A +69 22483AE1 102D102F10021039 +70 22483AE1 102D102F1002103A +71 22483AE2 10031039 +72 22483AE2 1003103A +73 22483AE3 102C10031039 +74 22483AE3 102C1003103A +75 22483AE3 102B10031039 +76 22483AE3 102B1003103A +77 22483AE4 102D10031039 +78 22483AE4 102D1003103A +79 22483AE5 102F10031039 +80 22483AE5 102F1003103A +81 22483AE6 103110031039 +82 22483AE6 10311003103A +83 22483AE7 1031102C10031039 +84 22483AE7 1031102C1003103A +85 22483AE7 1031102B10031039 +86 22483AE7 1031102B1003103A +87 22483AE8 102D102F10031039 +88 22483AE8 102D102F1003103A +89 22483AE9 1004103A1039 +90 22483AE9 1004103A +91 22483AEA 102C1004103A1039 +92 22483AEA 102C1004103A +93 22483AEA 102B1004103A1039 +94 22483AEA 102B1004103A +95 22483AEB 102D1004103A1039 +96 22483AEB 102D1004103A +97 22483AEC 102F1004103A1039 +98 22483AEC 102F1004103A +99 22483AED 10311004103A1039 +100 22483AED 10311004103A +101 22483AEE 1031102C1004103A1039 +102 22483AEE 1031102C1004103A +103 22483AEE 1031102B1004103A1039 +104 22483AEE 1031102B1004103A +105 22483AEF 102D102F1004103A1039 +106 22483AEF 102D102F1004103A +107 22483AF0 10051039 +108 22483AF0 1005103A +109 22483AF1 102C10051039 +110 22483AF1 102C1005103A +111 22483AF1 102B10051039 +112 22483AF1 102B1005103A +113 22483AF2 102D10051039 +114 22483AF2 102D1005103A +115 22483AF3 102F10051039 +116 22483AF3 102F1005103A +117 22483AF4 103110051039 +118 22483AF4 10311005103A +119 22483AF5 1031102C10051039 +120 22483AF5 1031102C1005103A +121 22483AF5 1031102B10051039 +122 22483AF5 1031102B1005103A +123 22483AF6 102D102F10051039 +124 22483AF6 102D102F1005103A +125 22483AF7 10061039 +126 22483AF7 1006103A +127 22483AF8 102C10061039 +128 22483AF8 102C1006103A +129 22483AF8 102B10061039 +130 22483AF8 102B1006103A +131 22483AF9 102D10061039 +132 22483AF9 102D1006103A +133 22483AFA 102F10061039 +134 22483AFA 102F1006103A +135 22483AFB 103110061039 +136 22483AFB 10311006103A +137 22483AFC 1031102C10061039 +138 22483AFC 1031102C1006103A +139 22483AFC 1031102B10061039 +140 22483AFC 1031102B1006103A +141 22483AFD 102D102F10061039 +142 22483AFD 102D102F1006103A +143 22483AFE 10071039 +144 22483AFE 1007103A +145 22483AFF 102C10071039 +146 22483AFF 102C1007103A +147 22483AFF 102B10071039 +148 22483AFF 102B1007103A +149 22483B00 102D10071039 +150 22483B00 102D1007103A +151 22483B01 102F10071039 +152 22483B01 102F1007103A +153 22483B02 103110071039 +154 22483B02 10311007103A +155 22483B03 1031102C10071039 +156 22483B03 1031102C1007103A +157 22483B03 1031102B10071039 +158 22483B03 1031102B1007103A +159 22483B04 102D102F10071039 +160 22483B04 102D102F1007103A +161 22483B05 1008103A +162 22483B06 102C1008103A +163 22483B06 102B1008103A +164 22483B07 102D1008103A +165 22483B08 102F1008103A +166 22483B09 10311008103A +167 22483B0A 1031102C1008103A +168 22483B0A 1031102B1008103A +169 22483B0B 102D102F1008103A +170 22483B0C 10091039 +171 22483B0C 1009103A +172 22483B0D 102C10091039 +173 22483B0D 102C1009103A +174 22483B0D 102B10091039 +175 22483B0D 102B1009103A +176 22483B0E 102D10091039 +177 22483B0E 102D1009103A +178 22483B0F 102F10091039 +179 22483B0F 102F1009103A +180 22483B10 103110091039 +181 22483B10 10311009103A +182 22483B11 1031102C10091039 +183 22483B11 1031102C1009103A +184 22483B11 1031102B10091039 +185 22483B11 1031102B1009103A +186 22483B12 102D102F10091039 +187 22483B12 102D102F1009103A +188 22483B13 100A1039 +189 22483B13 100A103A +190 22483B14 102C100A1039 +191 22483B14 102C100A103A +192 22483B14 102B100A1039 +193 22483B14 102B100A103A +194 22483B15 102D100A1039 +195 22483B15 102D100A103A +196 22483B16 102F100A1039 +197 22483B16 102F100A103A +198 22483B17 1031100A1039 +199 22483B17 1031100A103A +200 22483B18 1031102C100A1039 +201 22483B18 1031102C100A103A +202 22483B18 1031102B100A1039 +203 22483B18 1031102B100A103A +204 22483B19 102D102F100A1039 +205 22483B19 102D102F100A103A +206 22483B1A 100B1039 +207 22483B1A 100B103A +208 22483B1B 102C100B1039 +209 22483B1B 102C100B103A +210 22483B1B 102B100B1039 +211 22483B1B 102B100B103A +212 22483B1C 102D100B1039 +213 22483B1C 102D100B103A +214 22483B1D 102F100B1039 +215 22483B1D 102F100B103A +216 22483B1E 1031100B1039 +217 22483B1E 1031100B103A +218 22483B1F 1031102C100B1039 +219 22483B1F 1031102C100B103A +220 22483B1F 1031102B100B1039 +221 22483B1F 1031102B100B103A +222 22483B20 102D102F100B1039 +223 22483B20 102D102F100B103A +224 22483B21 100C1039 +225 22483B21 100C103A +226 22483B22 102C100C1039 +227 22483B22 102C100C103A +228 22483B22 102B100C1039 +229 22483B22 102B100C103A +230 22483B23 102D100C1039 +231 22483B23 102D100C103A +232 22483B24 102F100C1039 +233 22483B24 102F100C103A +234 22483B25 1031100C1039 +235 22483B25 1031100C103A +236 22483B26 1031102C100C1039 +237 22483B26 1031102C100C103A +238 22483B26 1031102B100C1039 +239 22483B26 1031102B100C103A +240 22483B27 102D102F100C1039 +241 22483B27 102D102F100C103A +242 22483B28 100D1039 +243 22483B28 100D103A +244 22483B29 102C100D1039 +245 22483B29 102C100D103A +246 22483B29 102B100D1039 +247 22483B29 102B100D103A +248 22483B2A 102D100D1039 +249 22483B2A 102D100D103A +250 22483B2B 102F100D1039 +251 22483B2B 102F100D103A +252 22483B2C 1031100D1039 +253 22483B2C 1031100D103A +254 22483B2D 1031102C100D1039 +255 22483B2D 1031102C100D103A +256 22483B2D 1031102B100D1039 +257 22483B2D 1031102B100D103A +258 22483B2E 102D102F100D1039 +259 22483B2E 102D102F100D103A +260 22483B2F 100E1039 +261 22483B2F 100E103A +262 22483B30 102C100E1039 +263 22483B30 102C100E103A +264 22483B30 102B100E1039 +265 22483B30 102B100E103A +266 22483B31 102D100E1039 +267 22483B31 102D100E103A +268 22483B32 102F100E1039 +269 22483B32 102F100E103A +270 22483B33 1031100E1039 +271 22483B33 1031100E103A +272 22483B34 1031102C100E1039 +273 22483B34 1031102C100E103A +274 22483B34 1031102B100E1039 +275 22483B34 1031102B100E103A +276 22483B35 102D102F100E1039 +277 22483B35 102D102F100E103A +278 22483B36 100F1039 +279 22483B36 100F103A +280 22483B37 102C100F1039 +281 22483B37 102C100F103A +282 22483B37 102B100F1039 +283 22483B37 102B100F103A +284 22483B38 102D100F1039 +285 22483B38 102D100F103A +286 22483B39 102F100F1039 +287 22483B39 102F100F103A +288 22483B3A 1031100F1039 +289 22483B3A 1031100F103A +290 22483B3B 1031102C100F1039 +291 22483B3B 1031102C100F103A +292 22483B3B 1031102B100F1039 +293 22483B3B 1031102B100F103A +294 22483B3C 102D102F100F1039 +295 22483B3C 102D102F100F103A +296 22483B3D 10101039 +297 22483B3D 1010103A +298 22483B3E 102C10101039 +299 22483B3E 102C1010103A +300 22483B3E 102B10101039 +301 22483B3E 102B1010103A +302 22483B3F 102D10101039 +303 22483B3F 102D1010103A +304 22483B40 102F10101039 +305 22483B40 102F1010103A +306 22483B41 103110101039 +307 22483B41 10311010103A +308 22483B42 1031102C10101039 +309 22483B42 1031102C1010103A +310 22483B42 1031102B10101039 +311 22483B42 1031102B1010103A +312 22483B43 102D102F10101039 +313 22483B43 102D102F1010103A +314 22483B44 10111039 +315 22483B44 1011103A +316 22483B45 102C10111039 +317 22483B45 102C1011103A +318 22483B45 102B10111039 +319 22483B45 102B1011103A +320 22483B46 102D10111039 +321 22483B46 102D1011103A +322 22483B47 102F10111039 +323 22483B47 102F1011103A +324 22483B48 103110111039 +325 22483B48 10311011103A +326 22483B49 1031102C10111039 +327 22483B49 1031102C1011103A +328 22483B49 1031102B10111039 +329 22483B49 1031102B1011103A +330 22483B4A 102D102F10111039 +331 22483B4A 102D102F1011103A +332 22483B4B 10121039 +333 22483B4B 1012103A +334 22483B4C 102C10121039 +335 22483B4C 102C1012103A +336 22483B4C 102B10121039 +337 22483B4C 102B1012103A +338 22483B4D 102D10121039 +339 22483B4D 102D1012103A +340 22483B4E 102F10121039 +341 22483B4E 102F1012103A +342 22483B4F 103110121039 +343 22483B4F 10311012103A +344 22483B50 1031102C10121039 +345 22483B50 1031102C1012103A +346 22483B50 1031102B10121039 +347 22483B50 1031102B1012103A +348 22483B51 102D102F10121039 +349 22483B51 102D102F1012103A +350 22483B52 10131039 +351 22483B52 1013103A +352 22483B53 102C10131039 +353 22483B53 102C1013103A +354 22483B53 102B10131039 +355 22483B53 102B1013103A +356 22483B54 102D10131039 +357 22483B54 102D1013103A +358 22483B55 102F10131039 +359 22483B55 102F1013103A +360 22483B56 103110131039 +361 22483B56 10311013103A +362 22483B57 1031102C10131039 +363 22483B57 1031102C1013103A +364 22483B57 1031102B10131039 +365 22483B57 1031102B1013103A +366 22483B58 102D102F10131039 +367 22483B58 102D102F1013103A +368 22483B59 10141039 +369 22483B59 1014103A +370 22483B5A 102C10141039 +371 22483B5A 102C1014103A +372 22483B5A 102B10141039 +373 22483B5A 102B1014103A +374 22483B5B 102D10141039 +375 22483B5B 102D1014103A +376 22483B5C 102F10141039 +377 22483B5C 102F1014103A +378 22483B5D 103110141039 +379 22483B5D 10311014103A +380 22483B5E 1031102C10141039 +381 22483B5E 1031102C1014103A +382 22483B5E 1031102B10141039 +383 22483B5E 1031102B1014103A +384 22483B5F 102D102F10141039 +385 22483B5F 102D102F1014103A +386 22483B60 10151039 +387 22483B60 1015103A +388 22483B61 102C10151039 +389 22483B61 102C1015103A +390 22483B61 102B10151039 +391 22483B61 102B1015103A +392 22483B62 102D10151039 +393 22483B62 102D1015103A +394 22483B63 102F10151039 +395 22483B63 102F1015103A +396 22483B64 103110151039 +397 22483B64 10311015103A +398 22483B65 1031102C10151039 +399 22483B65 1031102C1015103A +400 22483B65 1031102B10151039 +401 22483B65 1031102B1015103A +402 22483B66 102D102F10151039 +403 22483B66 102D102F1015103A +404 22483B67 10161039 +405 22483B67 1016103A +406 22483B68 102C10161039 +407 22483B68 102C1016103A +408 22483B68 102B10161039 +409 22483B68 102B1016103A +410 22483B69 102D10161039 +411 22483B69 102D1016103A +412 22483B6A 102F10161039 +413 22483B6A 102F1016103A +414 22483B6B 103110161039 +415 22483B6B 10311016103A +416 22483B6C 1031102C10161039 +417 22483B6C 1031102C1016103A +418 22483B6C 1031102B10161039 +419 22483B6C 1031102B1016103A +420 22483B6D 102D102F10161039 +421 22483B6D 102D102F1016103A +422 22483B6E 10171039 +423 22483B6E 1017103A +424 22483B6F 102C10171039 +425 22483B6F 102C1017103A +426 22483B6F 102B10171039 +427 22483B6F 102B1017103A +428 22483B70 102D10171039 +429 22483B70 102D1017103A +430 22483B71 102F10171039 +431 22483B71 102F1017103A +432 22483B72 103110171039 +433 22483B72 10311017103A +434 22483B73 1031102C10171039 +435 22483B73 1031102C1017103A +436 22483B73 1031102B10171039 +437 22483B73 1031102B1017103A +438 22483B74 102D102F10171039 +439 22483B74 102D102F1017103A +440 22483B75 10181039 +441 22483B75 1018103A +442 22483B76 102C10181039 +443 22483B76 102C1018103A +444 22483B76 102B10181039 +445 22483B76 102B1018103A +446 22483B77 102D10181039 +447 22483B77 102D1018103A +448 22483B78 102F10181039 +449 22483B78 102F1018103A +450 22483B79 103110181039 +451 22483B79 10311018103A +452 22483B7A 1031102C10181039 +453 22483B7A 1031102C1018103A +454 22483B7A 1031102B10181039 +455 22483B7A 1031102B1018103A +456 22483B7B 102D102F10181039 +457 22483B7B 102D102F1018103A +458 22483B7C 10191039 +459 22483B7C 1019103A +460 22483B7D 102C10191039 +461 22483B7D 102C1019103A +462 22483B7D 102B10191039 +463 22483B7D 102B1019103A +464 22483B7E 102D10191039 +465 22483B7E 102D1019103A +466 22483B7F 102F10191039 +467 22483B7F 102F1019103A +468 22483B80 103110191039 +469 22483B80 10311019103A +470 22483B81 1031102C10191039 +471 22483B81 1031102C1019103A +472 22483B81 1031102B10191039 +473 22483B81 1031102B1019103A +474 22483B82 102D102F10191039 +475 22483B82 102D102F1019103A +476 22483B83 101A1039 +477 22483B83 101A103A +478 22483B84 102C101A1039 +479 22483B84 102C101A103A +480 22483B84 102B101A1039 +481 22483B84 102B101A103A +482 22483B85 102D101A1039 +483 22483B85 102D101A103A +484 22483B86 102F101A1039 +485 22483B86 102F101A103A +486 22483B87 1031101A1039 +487 22483B87 1031101A103A +488 22483B88 1031102C101A1039 +489 22483B88 1031102C101A103A +490 22483B88 1031102B101A1039 +491 22483B88 1031102B101A103A +492 22483B89 102D102F101A1039 +493 22483B89 102D102F101A103A +494 22483B8A 101B1039 +495 22483B8A 101B103A +496 22483B8B 102C101B1039 +497 22483B8B 102C101B103A +498 22483B8B 102B101B1039 +499 22483B8B 102B101B103A +500 22483B8C 102D101B1039 +501 22483B8C 102D101B103A +502 22483B8D 102F101B1039 +503 22483B8D 102F101B103A +504 22483B8E 1031101B1039 +505 22483B8E 1031101B103A +506 22483B8F 1031102C101B1039 +507 22483B8F 1031102C101B103A +508 22483B8F 1031102B101B1039 +509 22483B8F 1031102B101B103A +510 22483B90 102D102F101B1039 +511 22483B90 102D102F101B103A +512 22483B91 101C1039 +513 22483B91 101C103A +514 22483B92 102C101C1039 +515 22483B92 102C101C103A +516 22483B92 102B101C1039 +517 22483B92 102B101C103A +518 22483B93 102D101C1039 +519 22483B93 102D101C103A +520 22483B94 102F101C1039 +521 22483B94 102F101C103A +522 22483B95 1031101C1039 +523 22483B95 1031101C103A +524 22483B96 1031102C101C1039 +525 22483B96 1031102C101C103A +526 22483B96 1031102B101C1039 +527 22483B96 1031102B101C103A +528 22483B97 102D102F101C1039 +529 22483B97 102D102F101C103A +530 22483B98 101D103A +531 22483B99 102C101D103A +532 22483B99 102B101D103A +533 22483B9A 102D101D103A +534 22483B9B 102F101D103A +535 22483B9C 1031101D103A +536 22483B9D 1031102C101D103A +537 22483B9D 1031102B101D103A +538 22483B9E 102D102F101D103A +539 22483B9F 101E1039 +540 22483B9F 101E103A +541 22483BA0 102C101E1039 +542 22483BA0 102C101E103A +543 22483BA0 102B101E1039 +544 22483BA0 102B101E103A +545 22483BA1 102D101E1039 +546 22483BA1 102D101E103A +547 22483BA2 102F101E1039 +548 22483BA2 102F101E103A +549 22483BA3 1031101E1039 +550 22483BA3 1031101E103A +551 22483BA4 1031102C101E1039 +552 22483BA4 1031102C101E103A +553 22483BA4 1031102B101E1039 +554 22483BA4 1031102B101E103A +555 22483BA5 102D102F101E1039 +556 22483BA5 102D102F101E103A +557 22483BA6 101F1039 +558 22483BA6 101F103A +559 22483BA7 102C101F1039 +560 22483BA7 102C101F103A +561 22483BA7 102B101F1039 +562 22483BA7 102B101F103A +563 22483BA8 102D101F1039 +564 22483BA8 102D101F103A +565 22483BA9 102F101F1039 +566 22483BA9 102F101F103A +567 22483BAA 1031101F1039 +568 22483BAA 1031101F103A +569 22483BAB 1031102C101F1039 +570 22483BAB 1031102C101F103A +571 22483BAB 1031102B101F1039 +572 22483BAB 1031102B101F103A +573 22483BAC 102D102F101F1039 +574 22483BAC 102D102F101F103A +575 22483BAD 1020103A +576 22483BAE 102C1020103A +577 22483BAE 102B1020103A +578 22483BAF 102D1020103A +579 22483BB0 102F1020103A +580 22483BB1 10311020103A +581 22483BB2 1031102C1020103A +582 22483BB2 1031102B1020103A +583 22483BB3 102D102F1020103A +584 22483BB4 1021103A +585 22483BB5 102C1021103A +586 22483BB5 102B1021103A +587 22483BB6 102D1021103A +588 22483BB7 102F1021103A +589 22483BB8 10311021103A +590 22483BB9 1031102C1021103A +591 22483BB9 1031102B1021103A +592 22483BBA 102D102F1021103A +593 --- Medials +594 22483BBB 105E +595 22483BBC 105F +596 22483BBD 103B +597 22483BBE 103C +598 22483BBF 1060 +599 22483BC0 103D +600 22483BC1 1082 +601 22483BC2 103E +602 22483BC3 103B103D +603 22483BC4 103C103D +604 22483BC5 103B103E +605 22483BC6 103C103E +606 22483BC7 103D103E +607 22483BC8 103B103D103E +608 22483BC9 103C103D103E +609 --- Independent vowels +610 22242236 1021102D +611 22242236 1023 +612 22242238 1021102E +613 22242238 1024 +614 2224223A 1021102F +615 2224223A 1025 +616 2224223D 10211030 +617 2224223D 1026 +618 22242242 10211031 +619 22242242 1027 +620 22242242 1028 +621 222422463ACB 10211031102C +622 222422463ACB 1029 +623 222422463ACC 10211031102C103A +624 222422463ACC 102A +625 22483B7E 102D1019103A +626 22483B7E3ACB 102D1036 +627 22483B7E3ACC 102D1019103A1037 +628 22483B7E3ACD 102D10361037 +629 22483B7E3ACE 102D1019103A1038 +630 22483B7E3ACF 102D10361038 +631 22483B7F 102F1019103A +632 22483B7F3ACB 102F1036 +633 22483B7F3ACC 102F1019103A1037 +634 22483B7F3ACD 102F10361037 +635 22483B7F3ACE 102F1019103A1038 +636 22483B7F3ACF 102F10361038 +637 222422483B7F3ACB 1021102F1036 +638 222422483B7F3ACB 1025102F1036 +639 --- Independent vowels with finals +640 222422483ACF 1021102D10001039 +641 222422483ACF 102310001039 +642 222422483ACF 1021102D1000103A +643 222422483ACF 10231000103A +644 222422483AD0 1021102F10001039 +645 222422483AD0 102510001039 +646 222422483AD0 1021102F1000103A +647 222422483AD0 10251000103A +648 222422483AD1 1021103110001039 +649 222422483AD1 102710001039 +650 222422483AD1 102110311000103A +651 222422483AD1 10271000103A +652 222422483AD2 10211031102C10001039 +653 222422483AD2 102910001039 +654 222422483AD2 10211031102C1000103A +655 222422483AD2 10291000103A +656 222422483AD2 10211031102C10001039 +657 222422483AD2 10291031102C10001039 +658 222422483AD2 10211031102C1000103A +659 222422483AD2 10291031102C1000103A +660 222422483AD6 1021102D10011039 +661 222422483AD6 102310011039 +662 222422483AD6 1021102D1001103A +663 222422483AD6 10231001103A +664 222422483AD7 1021102F10011039 +665 222422483AD7 102510011039 +666 222422483AD7 1021102F1001103A +667 222422483AD7 10251001103A +668 222422483AD8 1021103110011039 +669 222422483AD8 102710011039 +670 222422483AD8 102110311001103A +671 222422483AD8 10271001103A +672 222422483AD9 10211031102C10011039 +673 222422483AD9 102910011039 +674 222422483AD9 10211031102C1001103A +675 222422483AD9 10291001103A +676 222422483AD9 10211031102C10011039 +677 222422483AD9 10291031102C10011039 +678 222422483AD9 10211031102C1001103A +679 222422483AD9 10291031102C1001103A +680 222422483ADD 1021102D10021039 +681 222422483ADD 102310021039 +682 222422483ADD 1021102D1002103A +683 222422483ADD 10231002103A +684 222422483ADE 1021102F10021039 +685 222422483ADE 102510021039 +686 222422483ADE 1021102F1002103A +687 222422483ADE 10251002103A +688 222422483ADF 1021103110021039 +689 222422483ADF 102710021039 +690 222422483ADF 102110311002103A +691 222422483ADF 10271002103A +692 222422483AE0 10211031102C10021039 +693 222422483AE0 102910021039 +694 222422483AE0 10211031102C1002103A +695 222422483AE0 10291002103A +696 222422483AE0 10211031102C10021039 +697 222422483AE0 10291031102C10021039 +698 222422483AE0 10211031102C1002103A +699 222422483AE0 10291031102C1002103A +700 222422483AE4 1021102D10031039 +701 222422483AE4 102310031039 +702 222422483AE4 1021102D1003103A +703 222422483AE4 10231003103A +704 222422483AE5 1021102F10031039 +705 222422483AE5 102510031039 +706 222422483AE5 1021102F1003103A +707 222422483AE5 10251003103A +708 222422483AE6 1021103110031039 +709 222422483AE6 102710031039 +710 222422483AE6 102110311003103A +711 222422483AE6 10271003103A +712 222422483AE7 10211031102C10031039 +713 222422483AE7 102910031039 +714 222422483AE7 10211031102C1003103A +715 222422483AE7 10291003103A +716 222422483AE7 10211031102C10031039 +717 222422483AE7 10291031102C10031039 +718 222422483AE7 10211031102C1003103A +719 222422483AE7 10291031102C1003103A +720 2224223621D5224D 1021102D10041039 +721 2224223621D5224D 102310041039 +722 222422483AEB 1021102D1004103A +723 222422483AEB 10231004103A +724 2224223A21D5224D 1021102F10041039 +725 2224223A21D5224D 102510041039 +726 222422483AEC 1021102F1004103A +727 222422483AEC 10251004103A +728 2224224221D5224D 1021103110041039 +729 2224224221D5224D 102710041039 +730 222422483AED 102110311004103A +731 222422483AED 10271004103A +732 222422463ACB21D5224D 10211031102C10041039 +733 222422463ACB21D5224D 102910041039 +734 222422483AEE 10211031102C1004103A +735 222422483AEE 10291004103A +736 222422463ACB21D5224D 10211031102C10041039 +737 222422463ACB21D5224D 10291031102C10041039 +738 222422483AEE 10211031102C1004103A +739 222422483AEE 10291031102C1004103A +740 222422483AF2 1021102D10051039 +741 222422483AF2 102310051039 +742 222422483AF2 1021102D1005103A +743 222422483AF2 10231005103A +744 222422483AF3 1021102F10051039 +745 222422483AF3 102510051039 +746 222422483AF3 1021102F1005103A +747 222422483AF3 10251005103A +748 222422483AF4 1021103110051039 +749 222422483AF4 102710051039 +750 222422483AF4 102110311005103A +751 222422483AF4 10271005103A +752 222422483AF5 10211031102C10051039 +753 222422483AF5 102910051039 +754 222422483AF5 10211031102C1005103A +755 222422483AF5 10291005103A +756 222422483AF5 10211031102C10051039 +757 222422483AF5 10291031102C10051039 +758 222422483AF5 10211031102C1005103A +759 222422483AF5 10291031102C1005103A +760 222422483AF9 1021102D10061039 +761 222422483AF9 102310061039 +762 222422483AF9 1021102D1006103A +763 222422483AF9 10231006103A +764 222422483AFA 1021102F10061039 +765 222422483AFA 102510061039 +766 222422483AFA 1021102F1006103A +767 222422483AFA 10251006103A +768 222422483AFB 1021103110061039 +769 222422483AFB 102710061039 +770 222422483AFB 102110311006103A +771 222422483AFB 10271006103A +772 222422483AFC 10211031102C10061039 +773 222422483AFC 102910061039 +774 222422483AFC 10211031102C1006103A +775 222422483AFC 10291006103A +776 222422483AFC 10211031102C10061039 +777 222422483AFC 10291031102C10061039 +778 222422483AFC 10211031102C1006103A +779 222422483AFC 10291031102C1006103A +780 222422483B00 1021102D10071039 +781 222422483B00 102310071039 +782 222422483B00 1021102D1007103A +783 222422483B00 10231007103A +784 222422483B01 1021102F10071039 +785 222422483B01 102510071039 +786 222422483B01 1021102F1007103A +787 222422483B01 10251007103A +788 222422483B02 1021103110071039 +789 222422483B02 102710071039 +790 222422483B02 102110311007103A +791 222422483B02 10271007103A +792 222422483B03 10211031102C10071039 +793 222422483B03 102910071039 +794 222422483B03 10211031102C1007103A +795 222422483B03 10291007103A +796 222422483B03 10211031102C10071039 +797 222422483B03 10291031102C10071039 +798 222422483B03 10211031102C1007103A +799 222422483B03 10291031102C1007103A +800 222422483B0E 1021102D10091039 +801 222422483B0E 102310091039 +802 222422483B0E 1021102D1009103A +803 222422483B0E 10231009103A +804 222422483B0F 1021102F10091039 +805 222422483B0F 102510091039 +806 222422483B0F 1021102F1009103A +807 222422483B0F 10251009103A +808 222422483B10 1021103110091039 +809 222422483B10 102710091039 +810 222422483B10 102110311009103A +811 222422483B10 10271009103A +812 222422483B11 10211031102C10091039 +813 222422483B11 102910091039 +814 222422483B11 10211031102C1009103A +815 222422483B11 10291009103A +816 222422483B11 10211031102C10091039 +817 222422483B11 10291031102C10091039 +818 222422483B11 10211031102C1009103A +819 222422483B11 10291031102C1009103A +820 222422483B15 1021102D100A1039 +821 222422483B15 1023100A1039 +822 222422483B15 1021102D100A103A +823 222422483B15 1023100A103A +824 222422483B16 1021102F100A1039 +825 222422483B16 1025100A1039 +826 222422483B16 1021102F100A103A +827 222422483B16 1025100A103A +828 222422483B17 10211031100A1039 +829 222422483B17 1027100A1039 +830 222422483B17 10211031100A103A +831 222422483B17 1027100A103A +832 222422483B18 10211031102C100A1039 +833 222422483B18 1029100A1039 +834 222422483B18 10211031102C100A103A +835 222422483B18 1029100A103A +836 222422483B18 10211031102C100A1039 +837 222422483B18 10291031102C100A1039 +838 222422483B18 10211031102C100A103A +839 222422483B18 10291031102C100A103A +840 222422483B1C 1021102D100B1039 +841 222422483B1C 1023100B1039 +842 222422483B1C 1021102D100B103A +843 222422483B1C 1023100B103A +844 222422483B1D 1021102F100B1039 +845 222422483B1D 1025100B1039 +846 222422483B1D 1021102F100B103A +847 222422483B1D 1025100B103A +848 222422483B1E 10211031100B1039 +849 222422483B1E 1027100B1039 +850 222422483B1E 10211031100B103A +851 222422483B1E 1027100B103A +852 222422483B1F 10211031102C100B1039 +853 222422483B1F 1029100B1039 +854 222422483B1F 10211031102C100B103A +855 222422483B1F 1029100B103A +856 222422483B1F 10211031102C100B1039 +857 222422483B1F 10291031102C100B1039 +858 222422483B1F 10211031102C100B103A +859 222422483B1F 10291031102C100B103A +860 222422483B23 1021102D100C1039 +861 222422483B23 1023100C1039 +862 222422483B23 1021102D100C103A +863 222422483B23 1023100C103A +864 222422483B24 1021102F100C1039 +865 222422483B24 1025100C1039 +866 222422483B24 1021102F100C103A +867 222422483B24 1025100C103A +868 222422483B25 10211031100C1039 +869 222422483B25 1027100C1039 +870 222422483B25 10211031100C103A +871 222422483B25 1027100C103A +872 222422483B26 10211031102C100C1039 +873 222422483B26 1029100C1039 +874 222422483B26 10211031102C100C103A +875 222422483B26 1029100C103A +876 222422483B26 10211031102C100C1039 +877 222422483B26 10291031102C100C1039 +878 222422483B26 10211031102C100C103A +879 222422483B26 10291031102C100C103A +880 222422483B2A 1021102D100D1039 +881 222422483B2A 1023100D1039 +882 222422483B2A 1021102D100D103A +883 222422483B2A 1023100D103A +884 222422483B2B 1021102F100D1039 +885 222422483B2B 1025100D1039 +886 222422483B2B 1021102F100D103A +887 222422483B2B 1025100D103A +888 222422483B2C 10211031100D1039 +889 222422483B2C 1027100D1039 +890 222422483B2C 10211031100D103A +891 222422483B2C 1027100D103A +892 222422483B2D 10211031102C100D1039 +893 222422483B2D 1029100D1039 +894 222422483B2D 10211031102C100D103A +895 222422483B2D 1029100D103A +896 222422483B2D 10211031102C100D1039 +897 222422483B2D 10291031102C100D1039 +898 222422483B2D 10211031102C100D103A +899 222422483B2D 10291031102C100D103A +900 222422483B31 1021102D100E1039 +901 222422483B31 1023100E1039 +902 222422483B31 1021102D100E103A +903 222422483B31 1023100E103A +904 222422483B32 1021102F100E1039 +905 222422483B32 1025100E1039 +906 222422483B32 1021102F100E103A +907 222422483B32 1025100E103A +908 222422483B33 10211031100E1039 +909 222422483B33 1027100E1039 +910 222422483B33 10211031100E103A +911 222422483B33 1027100E103A +912 222422483B34 10211031102C100E1039 +913 222422483B34 1029100E1039 +914 222422483B34 10211031102C100E103A +915 222422483B34 1029100E103A +916 222422483B34 10211031102C100E1039 +917 222422483B34 10291031102C100E1039 +918 222422483B34 10211031102C100E103A +919 222422483B34 10291031102C100E103A +920 222422483B38 1021102D100F1039 +921 222422483B38 1023100F1039 +922 222422483B38 1021102D100F103A +923 222422483B38 1023100F103A +924 222422483B39 1021102F100F1039 +925 222422483B39 1025100F1039 +926 222422483B39 1021102F100F103A +927 222422483B39 1025100F103A +928 222422483B3A 10211031100F1039 +929 222422483B3A 1027100F1039 +930 222422483B3A 10211031100F103A +931 222422483B3A 1027100F103A +932 222422483B3B 10211031102C100F1039 +933 222422483B3B 1029100F1039 +934 222422483B3B 10211031102C100F103A +935 222422483B3B 1029100F103A +936 222422483B3B 10211031102C100F1039 +937 222422483B3B 10291031102C100F1039 +938 222422483B3B 10211031102C100F103A +939 222422483B3B 10291031102C100F103A +940 222422483B3F 1021102D10101039 +941 222422483B3F 102310101039 +942 222422483B3F 1021102D1010103A +943 222422483B3F 10231010103A +944 222422483B40 1021102F10101039 +945 222422483B40 102510101039 +946 222422483B40 1021102F1010103A +947 222422483B40 10251010103A +948 222422483B41 1021103110101039 +949 222422483B41 102710101039 +950 222422483B41 102110311010103A +951 222422483B41 10271010103A +952 222422483B42 10211031102C10101039 +953 222422483B42 102910101039 +954 222422483B42 10211031102C1010103A +955 222422483B42 10291010103A +956 222422483B42 10211031102C10101039 +957 222422483B42 10291031102C10101039 +958 222422483B42 10211031102C1010103A +959 222422483B42 10291031102C1010103A +960 222422483B46 1021102D10111039 +961 222422483B46 102310111039 +962 222422483B46 1021102D1011103A +963 222422483B46 10231011103A +964 222422483B47 1021102F10111039 +965 222422483B47 102510111039 +966 222422483B47 1021102F1011103A +967 222422483B47 10251011103A +968 222422483B48 1021103110111039 +969 222422483B48 102710111039 +970 222422483B48 102110311011103A +971 222422483B48 10271011103A +972 222422483B49 10211031102C10111039 +973 222422483B49 102910111039 +974 222422483B49 10211031102C1011103A +975 222422483B49 10291011103A +976 222422483B49 10211031102C10111039 +977 222422483B49 10291031102C10111039 +978 222422483B49 10211031102C1011103A +979 222422483B49 10291031102C1011103A +980 222422483B4D 1021102D10121039 +981 222422483B4D 102310121039 +982 222422483B4D 1021102D1012103A +983 222422483B4D 10231012103A +984 222422483B4E 1021102F10121039 +985 222422483B4E 102510121039 +986 222422483B4E 1021102F1012103A +987 222422483B4E 10251012103A +988 222422483B4F 1021103110121039 +989 222422483B4F 102710121039 +990 222422483B4F 102110311012103A +991 222422483B4F 10271012103A +992 222422483B50 10211031102C10121039 +993 222422483B50 102910121039 +994 222422483B50 10211031102C1012103A +995 222422483B50 10291012103A +996 222422483B50 10211031102C10121039 +997 222422483B50 10291031102C10121039 +998 222422483B50 10211031102C1012103A +999 222422483B50 10291031102C1012103A +1000 222422483B54 1021102D10131039 +1001 222422483B54 102310131039 +1002 222422483B54 1021102D1013103A +1003 222422483B54 10231013103A +1004 222422483B55 1021102F10131039 +1005 222422483B55 102510131039 +1006 222422483B55 1021102F1013103A +1007 222422483B55 10251013103A +1008 222422483B56 1021103110131039 +1009 222422483B56 102710131039 +1010 222422483B56 102110311013103A +1011 222422483B56 10271013103A +1012 222422483B57 10211031102C10131039 +1013 222422483B57 102910131039 +1014 222422483B57 10211031102C1013103A +1015 222422483B57 10291013103A +1016 222422483B57 10211031102C10131039 +1017 222422483B57 10291031102C10131039 +1018 222422483B57 10211031102C1013103A +1019 222422483B57 10291031102C1013103A +1020 222422483B5B 1021102D10141039 +1021 222422483B5B 102310141039 +1022 222422483B5B 1021102D1014103A +1023 222422483B5B 10231014103A +1024 222422483B5C 1021102F10141039 +1025 222422483B5C 102510141039 +1026 222422483B5C 1021102F1014103A +1027 222422483B5C 10251014103A +1028 222422483B5D 1021103110141039 +1029 222422483B5D 102710141039 +1030 222422483B5D 102110311014103A +1031 222422483B5D 10271014103A +1032 222422483B5E 10211031102C10141039 +1033 222422483B5E 102910141039 +1034 222422483B5E 10211031102C1014103A +1035 222422483B5E 10291014103A +1036 222422483B5E 10211031102C10141039 +1037 222422483B5E 10291031102C10141039 +1038 222422483B5E 10211031102C1014103A +1039 222422483B5E 10291031102C1014103A +1040 222422483B62 1021102D10151039 +1041 222422483B62 102310151039 +1042 222422483B62 1021102D1015103A +1043 222422483B62 10231015103A +1044 222422483B63 1021102F10151039 +1045 222422483B63 102510151039 +1046 222422483B63 1021102F1015103A +1047 222422483B63 10251015103A +1048 222422483B64 1021103110151039 +1049 222422483B64 102710151039 +1050 222422483B64 102110311015103A +1051 222422483B64 10271015103A +1052 222422483B65 10211031102C10151039 +1053 222422483B65 102910151039 +1054 222422483B65 10211031102C1015103A +1055 222422483B65 10291015103A +1056 222422483B65 10211031102C10151039 +1057 222422483B65 10291031102C10151039 +1058 222422483B65 10211031102C1015103A +1059 222422483B65 10291031102C1015103A +1060 222422483B69 1021102D10161039 +1061 222422483B69 102310161039 +1062 222422483B69 1021102D1016103A +1063 222422483B69 10231016103A +1064 222422483B6A 1021102F10161039 +1065 222422483B6A 102510161039 +1066 222422483B6A 1021102F1016103A +1067 222422483B6A 10251016103A +1068 222422483B6B 1021103110161039 +1069 222422483B6B 102710161039 +1070 222422483B6B 102110311016103A +1071 222422483B6B 10271016103A +1072 222422483B6C 10211031102C10161039 +1073 222422483B6C 102910161039 +1074 222422483B6C 10211031102C1016103A +1075 222422483B6C 10291016103A +1076 222422483B6C 10211031102C10161039 +1077 222422483B6C 10291031102C10161039 +1078 222422483B6C 10211031102C1016103A +1079 222422483B6C 10291031102C1016103A +1080 222422483B70 1021102D10171039 +1081 222422483B70 102310171039 +1082 222422483B70 1021102D1017103A +1083 222422483B70 10231017103A +1084 222422483B71 1021102F10171039 +1085 222422483B71 102510171039 +1086 222422483B71 1021102F1017103A +1087 222422483B71 10251017103A +1088 222422483B72 1021103110171039 +1089 222422483B72 102710171039 +1090 222422483B72 102110311017103A +1091 222422483B72 10271017103A +1092 222422483B73 10211031102C10171039 +1093 222422483B73 102910171039 +1094 222422483B73 10211031102C1017103A +1095 222422483B73 10291017103A +1096 222422483B73 10211031102C10171039 +1097 222422483B73 10291031102C10171039 +1098 222422483B73 10211031102C1017103A +1099 222422483B73 10291031102C1017103A +1100 222422483B77 1021102D10181039 +1101 222422483B77 102310181039 +1102 222422483B77 1021102D1018103A +1103 222422483B77 10231018103A +1104 222422483B78 1021102F10181039 +1105 222422483B78 102510181039 +1106 222422483B78 1021102F1018103A +1107 222422483B78 10251018103A +1108 222422483B79 1021103110181039 +1109 222422483B79 102710181039 +1110 222422483B79 102110311018103A +1111 222422483B79 10271018103A +1112 222422483B7A 10211031102C10181039 +1113 222422483B7A 102910181039 +1114 222422483B7A 10211031102C1018103A +1115 222422483B7A 10291018103A +1116 222422483B7A 10211031102C10181039 +1117 222422483B7A 10291031102C10181039 +1118 222422483B7A 10211031102C1018103A +1119 222422483B7A 10291031102C1018103A +1120 222422483B7E 1021102D10191039 +1121 222422483B7E 102310191039 +1122 222422483B7E 1021102D1019103A +1123 222422483B7E 10231019103A +1124 222422483B7F 1021102F10191039 +1125 222422483B7F 102510191039 +1126 222422483B7F 1021102F1019103A +1127 222422483B7F 10251019103A +1128 222422483B80 1021103110191039 +1129 222422483B80 102710191039 +1130 222422483B80 102110311019103A +1131 222422483B80 10271019103A +1132 222422483B81 10211031102C10191039 +1133 222422483B81 102910191039 +1134 222422483B81 10211031102C1019103A +1135 222422483B81 10291019103A +1136 222422483B81 10211031102C10191039 +1137 222422483B81 10291031102C10191039 +1138 222422483B81 10211031102C1019103A +1139 222422483B81 10291031102C1019103A +1140 222422483B85 1021102D101A1039 +1141 222422483B85 1023101A1039 +1142 222422483B85 1021102D101A103A +1143 222422483B85 1023101A103A +1144 222422483B86 1021102F101A1039 +1145 222422483B86 1025101A1039 +1146 222422483B86 1021102F101A103A +1147 222422483B86 1025101A103A +1148 222422483B87 10211031101A1039 +1149 222422483B87 1027101A1039 +1150 222422483B87 10211031101A103A +1151 222422483B87 1027101A103A +1152 222422483B88 10211031102C101A1039 +1153 222422483B88 1029101A1039 +1154 222422483B88 10211031102C101A103A +1155 222422483B88 1029101A103A +1156 222422483B88 10211031102C101A1039 +1157 222422483B88 10291031102C101A1039 +1158 222422483B88 10211031102C101A103A +1159 222422483B88 10291031102C101A103A +1160 222422483B8C 1021102D101B1039 +1161 222422483B8C 1023101B1039 +1162 222422483B8C 1021102D101B103A +1163 222422483B8C 1023101B103A +1164 222422483B8D 1021102F101B1039 +1165 222422483B8D 1025101B1039 +1166 222422483B8D 1021102F101B103A +1167 222422483B8D 1025101B103A +1168 222422483B8E 10211031101B1039 +1169 222422483B8E 1027101B1039 +1170 222422483B8E 10211031101B103A +1171 222422483B8E 1027101B103A +1172 222422483B8F 10211031102C101B1039 +1173 222422483B8F 1029101B1039 +1174 222422483B8F 10211031102C101B103A +1175 222422483B8F 1029101B103A +1176 222422483B8F 10211031102C101B1039 +1177 222422483B8F 10291031102C101B1039 +1178 222422483B8F 10211031102C101B103A +1179 222422483B8F 10291031102C101B103A +1180 222422483B93 1021102D101C1039 +1181 222422483B93 1023101C1039 +1182 222422483B93 1021102D101C103A +1183 222422483B93 1023101C103A +1184 222422483B94 1021102F101C1039 +1185 222422483B94 1025101C1039 +1186 222422483B94 1021102F101C103A +1187 222422483B94 1025101C103A +1188 222422483B95 10211031101C1039 +1189 222422483B95 1027101C1039 +1190 222422483B95 10211031101C103A +1191 222422483B95 1027101C103A +1192 222422483B96 10211031102C101C1039 +1193 222422483B96 1029101C1039 +1194 222422483B96 10211031102C101C103A +1195 222422483B96 1029101C103A +1196 222422483B96 10211031102C101C1039 +1197 222422483B96 10291031102C101C1039 +1198 222422483B96 10211031102C101C103A +1199 222422483B96 10291031102C101C103A +1200 222422483BA1 1021102D101E1039 +1201 222422483BA1 1023101E1039 +1202 222422483BA1 1021102D101E103A +1203 222422483BA1 1023101E103A +1204 222422483BA2 1021102F101E1039 +1205 222422483BA2 1025101E1039 +1206 222422483BA2 1021102F101E103A +1207 222422483BA2 1025101E103A +1208 222422483BA3 10211031101E1039 +1209 222422483BA3 1027101E1039 +1210 222422483BA3 10211031101E103A +1211 222422483BA3 1027101E103A +1212 222422483BA4 10211031102C101E1039 +1213 222422483BA4 1029101E1039 +1214 222422483BA4 10211031102C101E103A +1215 222422483BA4 1029101E103A +1216 222422483BA4 10211031102C101E1039 +1217 222422483BA4 10291031102C101E1039 +1218 222422483BA4 10211031102C101E103A +1219 222422483BA4 10291031102C101E103A +1220 222422483BA8 1021102D101F1039 +1221 222422483BA8 1023101F1039 +1222 222422483BA8 1021102D101F103A +1223 222422483BA8 1023101F103A +1224 222422483BA9 1021102F101F1039 +1225 222422483BA9 1025101F1039 +1226 222422483BA9 1021102F101F103A +1227 222422483BA9 1025101F103A +1228 222422483BAA 10211031101F1039 +1229 222422483BAA 1027101F1039 +1230 222422483BAA 10211031101F103A +1231 222422483BAA 1027101F103A +1232 222422483BAB 10211031102C101F1039 +1233 222422483BAB 1029101F1039 +1234 222422483BAB 10211031102C101F103A +1235 222422483BAB 1029101F103A +1236 222422483BAB 10211031102C101F1039 +1237 222422483BAB 10291031102C101F1039 +1238 222422483BAB 10211031102C101F103A +1239 222422483BAB 10291031102C101F103A +1240 --- Contractions +1241 22483AD221CD22483BBD 1031102C1000103A1000103B +1242 22483AD221CD22483BBD 1031102C1000103A103B +1243 22483B5921F822483B63 1014103A1014102F1015103A +1244 22483B5921F822483B63 1014103A102F1015103A +1245 --- Great Sa +1246 22483BA32216 1031101E1039101E +1247 22483BA32216 1031103F +1248 22483BA12216 102D101E1039101E +1249 22483BA12216 102D103F +1250 22483BA22216 102F101E1039101E +1251 22483BA22216 102F103F +1252 222422483BA12216 1021102D101E1039101E +1253 222422483BA12216 1023103F +1254 222422483BA22216 1021102F101E1039101E +1255 222422483BA22216 1025103F +1256 22483B9F2216 101E1039101E +1257 22483B9F2216 103F +1258 --- Symbols - collate as long form +1259 21F822483BC222483AD3 1014103E102D102F1000103A +1260 21F822483BC222483AD3 104C +1261 220922483BC0224222593ACB 101B103D10311037 +1262 220922483BC0224222593ACB 104D +1263 220D22483B1322593ACC21CD22483AEE22593ACC 101C100A103A103810001031102C1004103A1038 +1264 220D22483B1322593ACC21CD22483AEE22593ACC 104E1004103A1038 +1265 22242236 1021102D +1266 22242236 104F +1267 --- Short Forms may need to be added here +1268 220D22483ACD22072232 101C1000103A101A102C +1269 220D22483ACD22072232 101C1000103A103B102C +1270 221622052238 101E1019102E +1271 221622052238 101E10391019102E +1272 21F3220522483AE922593ACC 101110191004103A1038 +1273 21F3220522483AE922593ACC 1011103910191004103A1038 +1274 220D22483ACD220422483ACD 101C1000103A10181000103A +1275 220D22483ACD220422483ACD 101C103910181000103A +DROP TABLE t1; +# +# END of ctype_myanmar.inc +# +# +# End of MariaDB-10.0 tests +# diff --git a/mysql-test/r/ctype_utf16le.result b/mysql-test/r/ctype_utf16le.result new file mode 100644 index 00000000000..8098b0d1666 --- /dev/null +++ b/mysql-test/r/ctype_utf16le.result @@ -0,0 +1,2321 @@ +SET TIME_ZONE='+03:00'; +DROP TABLE IF EXISTS t1; +# +# Start of 5.6 tests +# +SET NAMES utf8mb4, collation_connection=utf16le_general_ci; +SELECT HEX('a'), HEX('a '); +HEX('a') HEX('a ') +6100 61002000 +select 'a' = 'a', 'a' = 'a ', 'a ' = 'a'; +'a' = 'a' 'a' = 'a ' 'a ' = 'a' +1 1 1 +select 'a\0' = 'a', 'a\0' < 'a', 'a\0' > 'a'; +'a\0' = 'a' 'a\0' < 'a' 'a\0' > 'a' +0 1 0 +select 'a' = 'a\0', 'a' < 'a\0', 'a' > 'a\0'; +'a' = 'a\0' 'a' < 'a\0' 'a' > 'a\0' +0 0 1 +select 'a\0' = 'a ', 'a\0' < 'a ', 'a\0' > 'a '; +'a\0' = 'a ' 'a\0' < 'a ' 'a\0' > 'a ' +0 1 0 +select 'a ' = 'a\0', 'a ' < 'a\0', 'a ' > 'a\0'; +'a ' = 'a\0' 'a ' < 'a\0' 'a ' > 'a\0' +0 0 1 +select 'a a' > 'a', 'a \0' < 'a'; +'a a' > 'a' 'a \0' < 'a' +1 1 +select binary 'a a' > 'a', binary 'a \0' > 'a', binary 'a\0' > 'a'; +binary 'a a' > 'a' binary 'a \0' > 'a' binary 'a\0' > 'a' +1 1 1 +# +# Check that incomplete utf16le characters in HEX notation +# are left-padded with zeros +# +SELECT HEX(_utf16le 0x44); +HEX(_utf16le 0x44) +0044 +SELECT HEX(_utf16le 0x3344); +HEX(_utf16le 0x3344) +3344 +SELECT HEX(_utf16le 0x113344); +HEX(_utf16le 0x113344) +00113344 +# +# Check that 0x20 is only trimmed when it is +# a part of real SPACE character, not just a part +# of a multibyte sequence. +# Note, CYRILLIC LETTER ER is used as an example, which +# is stored as 0x0420 in utf16le, thus contains 0x20 in the +# low byte. The second character is THREE-PER-M, U+2004, +# which contains 0x20 in the high byte. +# +CREATE TABLE t1 (word VARCHAR(64), word2 CHAR(64)) CHARACTER SET utf16le; +INSERT INTO t1 VALUES (_koi8r 0xF2, _koi8r 0xF2), (_ucs2 X'2004',_ucs2 X'2004'); +SELECT HEX(word) FROM t1 ORDER BY word; +HEX(word) +2004 +0420 +SELECT HEX(word2) FROM t1 ORDER BY word2; +HEX(word2) +2004 +0420 +DELETE FROM t1; +# +# Check that real spaces are correctly trimmed. +# +INSERT INTO t1 VALUES (_ucs2 X'042000200020', _ucs2 X'042000200020'); +INSERT INTO t1 VALUES (_ucs2 X'200400200020', _ucs2 X'200400200020'); +SELECT HEX(word) FROM t1 ORDER BY word; +HEX(word) +200420002000 +042020002000 +SELECT HEX(word2) FROM t1 ORDER BY word2; +HEX(word2) +2004 +0420 +DROP TABLE t1; +# +# Check LPAD/RPAD +# +CREATE TABLE t1 (a VARCHAR(10), pad INT, b VARCHAR(10)) CHARACTER SET utf16le; +INSERT INTO t1 VALUES (_ucs2 X'0420', 10, _ucs2 X'0421'); +INSERT INTO t1 VALUES (_ucs2 X'0420', 10, _ucs2 X'04210422'); +INSERT INTO t1 VALUES (_ucs2 X'0420', 10, _ucs2 X'042104220423'); +INSERT INTO t1 VALUES (_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423'); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +INSERT INTO t1 VALUES (_utf32 X'010000', 10, _ucs2 X'0421'); +INSERT INTO t1 VALUES (_ucs2 X'0421', 10, _utf32 X'010000'); +SELECT a, pad, b, LPAD(a, pad, b), HEX(LPAD(a, pad, b)) FROM t1; +a pad b LPAD(a, pad, b) HEX(LPAD(a, pad, b)) +Ð 10 С СССССССССР2104210421042104210421042104210421042004 +Ð 10 СТ СТСТСТСТСР2104220421042204210422042104220421042004 +Ð 10 СТУ СТУСТУСТУР2104220423042104220423042104220423042004 +РСТУФХЦЧШЩ 10 СТУ РСТУФХЦЧШЩ 2004210422042304240425042604270428042904 +ð€€ 10 С Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡Ð¡ð€€ 21042104210421042104210421042104210400D800DC +С 10 ð€€ ð€€ð€€ð€€ð€€ð€€ð€€ð€€ð€€ð€€Ð¡ 00D800DC00D800DC00D800DC00D800DC00D800DC00D800DC00D800DC00D800DC00D800DC2104 +DROP TABLE t1; +CREATE TABLE t1 SELECT +LPAD(_utf16le X'2004',10,_utf16le X'2104') l, +RPAD(_utf16le X'2004',10,_utf16le X'2104') r; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `l` varchar(10) CHARACTER SET utf16le NOT NULL DEFAULT '', + `r` varchar(10) CHARACTER SET utf16le NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(l), HEX(r) FROM t1; +HEX(l) HEX(r) +2104210421042104210421042104210421042004 2004210421042104210421042104210421042104 +DROP TABLE t1; +CREATE TABLE t1 (f1 CHAR(30)); +INSERT INTO t1 VALUES ("103000"), ("22720000"), ("3401200"), ("78000"); +SELECT LPAD(f1, 12, "-o-/") FROM t1; +LPAD(f1, 12, "-o-/") +-o-/-o103000 +-o-/22720000 +-o-/-3401200 +-o-/-o-78000 +DROP TABLE t1; +# +# Testing LIKE +# +SET NAMES utf8, collation_connection=utf16le_general_ci; +select @@collation_connection; +@@collation_connection +utf16le_general_ci +create table t1 as select repeat(' ',10) as a union select null; +alter table t1 add key(a); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) CHARACTER SET utf16le DEFAULT NULL, + KEY `a` (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test"); +explain select * from t1 where a like 'abc%'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 43 NULL 1 Using where; Using index +explain select * from t1 where a like concat('abc','%'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 43 NULL 1 Using where; Using index +select * from t1 where a like "abc%"; +a +abc +abcd +select * from t1 where a like concat("abc","%"); +a +abc +abcd +select * from t1 where a like "ABC%"; +a +abc +abcd +select * from t1 where a like "test%"; +a +test +select * from t1 where a like "te_t"; +a +test +select * from t1 where a like "%a%"; +a +a +abc +abcd +select * from t1 where a like "%abcd%"; +a +abcd +select * from t1 where a like "%abc\d%"; +a +abcd +drop table t1; +select 'AA' like 'AA'; +'AA' like 'AA' +1 +select 'AA' like 'A%A'; +'AA' like 'A%A' +1 +select 'AA' like 'A%%A'; +'AA' like 'A%%A' +1 +select 'AA' like 'AA%'; +'AA' like 'AA%' +1 +select 'AA' like '%AA%'; +'AA' like '%AA%' +1 +select 'AA' like '%A'; +'AA' like '%A' +1 +select 'AA' like '%AA'; +'AA' like '%AA' +1 +select 'AA' like 'A%A%'; +'AA' like 'A%A%' +1 +select 'AA' like '_%_%'; +'AA' like '_%_%' +1 +select 'AA' like '%A%A'; +'AA' like '%A%A' +1 +select 'AAA'like 'A%A%A'; +'AAA'like 'A%A%A' +1 +select 'AZ' like 'AZ'; +'AZ' like 'AZ' +1 +select 'AZ' like 'A%Z'; +'AZ' like 'A%Z' +1 +select 'AZ' like 'A%%Z'; +'AZ' like 'A%%Z' +1 +select 'AZ' like 'AZ%'; +'AZ' like 'AZ%' +1 +select 'AZ' like '%AZ%'; +'AZ' like '%AZ%' +1 +select 'AZ' like '%Z'; +'AZ' like '%Z' +1 +select 'AZ' like '%AZ'; +'AZ' like '%AZ' +1 +select 'AZ' like 'A%Z%'; +'AZ' like 'A%Z%' +1 +select 'AZ' like '_%_%'; +'AZ' like '_%_%' +1 +select 'AZ' like '%A%Z'; +'AZ' like '%A%Z' +1 +select 'AZ' like 'A_'; +'AZ' like 'A_' +1 +select 'AZ' like '_Z'; +'AZ' like '_Z' +1 +select 'AMZ'like 'A%M%Z'; +'AMZ'like 'A%M%Z' +1 +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf16le); +INSERT INTO t1 VALUES ('фыва'),('Фыва'),('фЫва'),('фыВа'),('фывÐ'),('ФЫВÐ'); +INSERT INTO t1 VALUES ('фывапролдж'),('Фывапролдж'),('фЫвапролдж'),('фыВапролдж'); +INSERT INTO t1 VALUES ('фывÐпролдж'),('фываПролдж'),('фывапРолдж'),('фывапрОлдж'); +INSERT INTO t1 VALUES ('фывапроЛдж'),('фывапролДж'),('фывапролдЖ'),('ФЫВÐПРОЛДЖ'); +SELECT * FROM t1 WHERE a LIKE '%фЫва%' ORDER BY BINARY a; +a +ФЫВР+ФЫВÐПРОЛДЖ +Фыва +Фывапролдж +фЫва +фЫвапролдж +фыВа +фыВапролдж +фывР+фывÐпролдж +фыва +фываПролдж +фывапРолдж +фывапрОлдж +фывапроЛдж +фывапролДж +фывапролдЖ +фывапролдж +SELECT * FROM t1 WHERE a LIKE '%фЫв%' ORDER BY BINARY a; +a +ФЫВР+ФЫВÐПРОЛДЖ +Фыва +Фывапролдж +фЫва +фЫвапролдж +фыВа +фыВапролдж +фывР+фывÐпролдж +фыва +фываПролдж +фывапРолдж +фывапрОлдж +фывапроЛдж +фывапролДж +фывапролдЖ +фывапролдж +SELECT * FROM t1 WHERE a LIKE 'фЫва%' ORDER BY BINARY a; +a +ФЫВР+ФЫВÐПРОЛДЖ +Фыва +Фывапролдж +фЫва +фЫвапролдж +фыВа +фыВапролдж +фывР+фывÐпролдж +фыва +фываПролдж +фывапРолдж +фывапрОлдж +фывапроЛдж +фывапролДж +фывапролдЖ +фывапролдж +SELECT * FROM t1 WHERE a LIKE 'фЫва%' COLLATE utf16le_bin ORDER BY BINARY a; +a +фЫва +фЫвапролдж +DROP TABLE t1; +CREATE TABLE t1 (word VARCHAR(64) NOT NULL, PRIMARY KEY (word)) +ENGINE=MyISAM CHARACTER SET utf16le; +INSERT INTO t1 (word) VALUES ("cat"); +SELECT * FROM t1 WHERE word LIKE "c%"; +word +cat +SELECT * FROM t1 WHERE word LIKE "ca_"; +word +cat +SELECT * FROM t1 WHERE word LIKE "cat"; +word +cat +SELECT * FROM t1 WHERE word LIKE _ucs2 x'00630025'; +word +cat +SELECT * FROM t1 WHERE word LIKE _ucs2 x'00630061005F'; +word +cat +DROP TABLE t1; +# +# Check that INSERT() works fine. +# This invokes charpos() function. +# +CREATE TABLE t1 ( +a VARCHAR(10) CHARACTER SET utf16le, +b VARCHAR(10) CHARACTER SET utf16le); +INSERT INTO t1 VALUES ('abc', 'def'); +SELECT INSERT(a, 10, 2, b) FROM t1; +INSERT(a, 10, 2, b) +abc +SELECT INSERT(a, 1, 2, b) FROM t1; +INSERT(a, 1, 2, b) +defc +DROP TABLE t1; +# +# Bug#1264 +# +SET NAMES utf8, collation_connection=utf16le_general_ci; +# +# Two fields, index +# +CREATE TABLE t1 ( +word VARCHAR(64), +bar INT(11) DEFAULT 0, +PRIMARY KEY (word)) +ENGINE=MyISAM +CHARSET utf16le +COLLATE utf16le_general_ci ; +INSERT INTO t1 (word) VALUES ("aar"); +INSERT INTO t1 (word) VALUES ("a"); +INSERT INTO t1 (word) VALUES ("aardvar"); +INSERT INTO t1 (word) VALUES ("aardvark"); +INSERT INTO t1 (word) VALUES ("aardvara"); +INSERT INTO t1 (word) VALUES ("aardvarz"); +EXPLAIN SELECT * FROM t1 ORDER BY word; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using filesort +SELECT * FROM t1 ORDER BY word; +word bar +a 0 +aar 0 +aardvar 0 +aardvara 0 +aardvark 0 +aardvarz 0 +EXPLAIN SELECT word FROM t1 ORDER BY word; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL PRIMARY 258 NULL 6 Using index +SELECT word FROM t1 ORDER by word; +word +a +aar +aardvar +aardvara +aardvark +aardvarz +DROP TABLE t1; +# +# One field, index +# +CREATE TABLE t1 ( +word VARCHAR(64) , +PRIMARY KEY (word)) +ENGINE=MyISAM +CHARSET utf16le +COLLATE utf16le_general_ci; +INSERT INTO t1 (word) VALUES ("aar"); +INSERT INTO t1 (word) VALUES ("a"); +INSERT INTO t1 (word) VALUES ("aardvar"); +INSERT INTO t1 (word) VALUES ("aardvark"); +INSERT INTO t1 (word) VALUES ("aardvara"); +INSERT INTO t1 (word) VALUES ("aardvarz"); +EXPLAIN SELECT * FROM t1 ORDER BY WORD; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL PRIMARY 258 NULL 6 Using index +SELECT * FROM t1 ORDER BY word; +word +a +aar +aardvar +aardvara +aardvark +aardvarz +DROP TABLE t1; +# +# Two fields, no index +# +CREATE TABLE t1 ( +word TEXT, +bar INT(11) AUTO_INCREMENT, +PRIMARY KEY (bar)) +ENGINE=MyISAM +CHARSET utf16le +COLLATE utf16le_general_ci ; +INSERT INTO t1 (word) VALUES ("aar"); +INSERT INTO t1 (word) VALUES ("a" ); +INSERT INTO t1 (word) VALUES ("aardvar"); +INSERT INTO t1 (word) VALUES ("aardvark"); +INSERT INTO t1 (word) VALUES ("aardvara"); +INSERT INTO t1 (word) VALUES ("aardvarz"); +EXPLAIN SELECT * FROM t1 ORDER BY word; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using filesort +SELECT * FROM t1 ORDER BY word; +word bar +a 2 +aar 1 +aardvar 3 +aardvara 5 +aardvark 4 +aardvarz 6 +EXPLAIN SELECT word FROM t1 ORDER BY word; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using filesort +SELECT word FROM t1 ORDER BY word; +word +a +aar +aardvar +aardvara +aardvark +aardvarz +DROP TABLE t1; +# +# END OF Bug 1264 test +# +# +# Check alignment for from-binary-conversion with CAST and CONVERT +# +SELECT HEX(CAST(0xAA as char CHARACTER SET utf16le)); +HEX(CAST(0xAA as char CHARACTER SET utf16le)) +00AA +SELECT HEX(CONVERT(0xAA USING utf16le)); +HEX(CONVERT(0xAA USING utf16le)) +00AA +# +# Check alignment for string types +# +CREATE TABLE t1 (a CHAR(10) CHARACTER SET utf16le); +INSERT INTO t1 VALUES (0x1),(0x11),(0x111),(0x1111),(0x11111); +SELECT HEX(a) FROM t1; +HEX(a) +0001 +0011 +0111 +1111 +00011111 +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf16le); +INSERT INTO t1 VALUES (0x1),(0x11),(0x111),(0x1111),(0x11111); +SELECT HEX(a) FROM t1; +HEX(a) +0001 +0011 +0111 +1111 +00011111 +DROP TABLE t1; +CREATE TABLE t1 (a TEXT CHARACTER SET utf16le); +INSERT INTO t1 VALUES (0x1),(0x11),(0x111),(0x1111),(0x11111); +SELECT HEX(a) FROM t1; +HEX(a) +0001 +0011 +0111 +1111 +00011111 +DROP TABLE t1; +CREATE TABLE t1 (a MEDIUMTEXT CHARACTER SET utf16le); +INSERT INTO t1 VALUES (0x1),(0x11),(0x111),(0x1111),(0x11111); +SELECT HEX(a) FROM t1; +HEX(a) +0001 +0011 +0111 +1111 +00011111 +DROP TABLE t1; +CREATE TABLE t1 (a LONGTEXT CHARACTER SET utf16le); +INSERT INTO t1 VALUES (0x1),(0x11),(0x111),(0x1111),(0x11111); +SELECT HEX(a) FROM t1; +HEX(a) +0001 +0011 +0111 +1111 +00011111 +DROP TABLE t1; +# +# Bug#5081 : UCS2 fields are filled with '0x2020' +# after extending field length +# +CREATE TABLE t1(a CHAR(1)) DEFAULT CHARSET utf16le; +INSERT INTO t1 VALUES ('a'),('b'),('c'); +ALTER TABLE t1 MODIFY a CHAR(5); +SELECT a, HEX(a) FROM t1; +a HEX(a) +a 6100 +b 6200 +c 6300 +DROP TABLE t1; +# +# Check prepare statement from an UTF16 string +# +SET NAMES latin1; +SET @ivar= 1234; +SET @str1 = 'SELECT ?'; +SET @str2 = CONVERT(@str1 USING utf16le); +PREPARE stmt1 FROM @str2; +EXECUTE stmt1 USING @ivar; +? +1234 +# +# Check that utf16le works with ENUM and SET type +# +SET NAMES utf8, collation_connection=utf16le_general_ci; +CREATE TABLE t1 (a ENUM('x','y','z') CHARACTER SET utf16le); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` enum('x','y','z') CHARACTER SET utf16le DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('x'); +INSERT INTO t1 VALUES ('y'); +INSERT INTO t1 VALUES ('z'); +SELECT a, HEX(a) FROM t1 ORDER BY a; +a HEX(a) +x 7800 +y 7900 +z 7A00 +ALTER TABLE t1 CHANGE a a ENUM('x','y','z','d','e','ä','ö','ü') CHARACTER SET utf16le; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` enum('x','y','z','d','e','ä','ö','ü') CHARACTER SET utf16le DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('D'); +INSERT INTO t1 VALUES ('E '); +INSERT INTO t1 VALUES ('ä'); +INSERT INTO t1 VALUES ('ö'); +INSERT INTO t1 VALUES ('ü'); +SELECT a, HEX(a) FROM t1 ORDER BY a; +a HEX(a) +x 7800 +y 7900 +z 7A00 +d 6400 +e 6500 +ä E400 +ö F600 +ü FC00 +DROP TABLE t1; +CREATE TABLE t1 (a set ('x','y','z','ä','ö','ü') CHARACTER SET utf16le); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` set('x','y','z','ä','ö','ü') CHARACTER SET utf16le DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('x'); +INSERT INTO t1 VALUES ('y'); +INSERT INTO t1 VALUES ('z'); +INSERT INTO t1 VALUES ('x,y'); +INSERT INTO t1 VALUES ('x,y,z,ä,ö,ü'); +SELECT a, HEX(a) FROM t1 ORDER BY a; +a HEX(a) +x 7800 +y 7900 +x,y 78002C007900 +z 7A00 +x,y,z,ä,ö,ü 78002C0079002C007A002C00E4002C00F6002C00FC00 +DROP TABLE t1; +# +# Bug#7302 UCS2 data in ENUM fields get truncated when new column is added +# +CREATE TABLE t1(a ENUM('a','b','c')) DEFAULT CHARACTER SET utf16le; +INSERT INTO t1 VALUES('a'),('b'),('c'); +ALTER TABLE t1 ADD b CHAR(1); +SHOW WARNINGS; +Level Code Message +SELECT * FROM t1 ORDER BY a; +a b +a NULL +b NULL +c NULL +DROP TABLE t1; +SET NAMES utf8, collation_connection='utf16le_general_ci'; +create table t1 select repeat('a',4000) a; +delete from t1; +insert into t1 values ('a'), ('a '), ('a\t'); +select collation(a),hex(a) from t1 order by a; +collation(a) hex(a) +utf16le_general_ci 61000900 +utf16le_general_ci 6100 +utf16le_general_ci 61002000 +drop table t1; +# +# MDEV-5453 Assertion `src' fails in my_strnxfrm_unicode on GROUP BY MID(..) WITH ROLLUP +# +SELECT @@collation_connection; +@@collation_connection +utf16le_general_ci +CREATE TABLE t1 (i INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +SELECT * FROM t1 GROUP BY MID(CURRENT_USER,0) WITH ROLLUP; +i +1 +1 +SELECT * FROM t1 GROUP BY MID('test',0) WITH ROLLUP; +i +1 +1 +DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf16le_general_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; +select @@collation_connection; +@@collation_connection +utf16le_general_ci +create table t1 ROW_FORMAT=DYNAMIC select repeat('a',50) as c1 ; +insert into t1 values('abcdef'); +insert into t1 values('_bcdef'); +insert into t1 values('a_cdef'); +insert into t1 values('ab_def'); +insert into t1 values('abc_ef'); +insert into t1 values('abcd_f'); +insert into t1 values('abcde_'); +select c1 as c1u from t1 where c1 like 'ab\_def'; +c1u +ab_def +select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; +c2h +ab_def +drop table t1; +SET NAMES utf8, collation_connection='utf16le_bin'; +create table t1 select repeat('a',4000) a; +delete from t1; +insert into t1 values ('a'), ('a '), ('a\t'); +select collation(a),hex(a) from t1 order by a; +collation(a) hex(a) +utf16le_bin 61000900 +utf16le_bin 6100 +utf16le_bin 61002000 +drop table t1; +# +# MDEV-5453 Assertion `src' fails in my_strnxfrm_unicode on GROUP BY MID(..) WITH ROLLUP +# +SELECT @@collation_connection; +@@collation_connection +utf16le_bin +CREATE TABLE t1 (i INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +SELECT * FROM t1 GROUP BY MID(CURRENT_USER,0) WITH ROLLUP; +i +1 +1 +SELECT * FROM t1 GROUP BY MID('test',0) WITH ROLLUP; +i +1 +1 +DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf16le_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; +# +# Bug#55980 Character sets: supplementary character _bin ordering is wrong +# +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf16le COLLATE utf16le_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (_utf8mb4 0xEFBE9D),(_utf8mb4 0xF0908E84); +INSERT INTO t1 VALUES (_utf8mb4 0xCE85),(_utf8mb4 0xF4808080); +SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a; +HEX(a) HEX(CONVERT(a USING utf8mb4)) +8503 CE85 +9DFF EFBE9D +00D884DF F0908E84 +C0DB00DC F4808080 +ALTER TABLE t1 ADD KEY(a); +SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a; +HEX(a) HEX(CONVERT(a USING utf8mb4)) +8503 CE85 +9DFF EFBE9D +00D884DF F0908E84 +C0DB00DC F4808080 +DROP TABLE IF EXISTS t1; +# +# BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES +# OUT-OF-ORDER RESULTS +# +CREATE TABLE t1 SELECT ('a a') as n; +INSERT INTO t1 VALUES('a b'); +SELECT * FROM t1 ORDER BY LOWER(n) ASC; +n +a a +a b +SELECT * FROM t1 ORDER BY LOWER(n) DESC; +n +a b +a a +DROP TABLE t1; +select @@collation_connection; +@@collation_connection +utf16le_bin +create table t1 ROW_FORMAT=DYNAMIC select repeat('a',50) as c1 ; +insert into t1 values('abcdef'); +insert into t1 values('_bcdef'); +insert into t1 values('a_cdef'); +insert into t1 values('ab_def'); +insert into t1 values('abc_ef'); +insert into t1 values('abcd_f'); +insert into t1 values('abcde_'); +select c1 as c1u from t1 where c1 like 'ab\_def'; +c1u +ab_def +select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; +c2h +ab_def +drop table t1; +# +# Bug#10344 Some string functions fail for UCS2 +# +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf16le, pos INT); +INSERT INTO t1 VALUES (_ucs2 0x00e400e50068,1); +INSERT INTO t1 VALUES (_ucs2 0x00e400e50068,2); +INSERT INTO t1 VALUES (_ucs2 0x00e400e50068,3); +INSERT INTO t1 VALUES (_ucs2 0x00e400e50068,-1); +INSERT INTO t1 VALUES (_ucs2 0x00e400e50068,-2); +INSERT INTO t1 VALUES (_ucs2 0x00e400e50068,-3); +INSERT INTO t1 VALUES (_utf32 0x000000e4000000e500010000, 1); +INSERT INTO t1 VALUES (_utf32 0x000000e4000000e500010000, 2); +INSERT INTO t1 VALUES (_utf32 0x000000e4000000e500010000, 3); +INSERT INTO t1 VALUES (_utf32 0x000000e4000000e500010000, -1); +INSERT INTO t1 VALUES (_utf32 0x000000e4000000e500010000, -2); +INSERT INTO t1 VALUES (_utf32 0x000000e4000000e500010000, -3); +SELECT HEX(SUBSTR(a, pos)), SUBSTR(a, pos) FROM t1; +HEX(SUBSTR(a, pos)) SUBSTR(a, pos) +E400E5006800 äåh +E5006800 Ã¥h +6800 h +6800 h +E5006800 Ã¥h +E400E5006800 äåh +E400E50000D800DC äå? +E50000D800DC Ã¥? +00D800DC ? +00D800DC ? +E50000D800DC Ã¥? +E400E50000D800DC äå? +DROP TABLE t1; +SET NAMES utf8, collation_connection=utf16le_general_ci; +# +# Bug#9442 Set parameter make query fail if column CHARACTER SET is UCS2 +# +CREATE TABLE t1 (utext VARCHAR(20) CHARACTER SET utf16le); +INSERT INTO t1 VALUES ("lily"); +INSERT INTO t1 VALUES ("river"); +PREPARE stmt FROM 'SELECT utext FROM t1 where utext like ?'; +SET @param1='%%'; +EXECUTE stmt USING @param1; +utext +lily +river +EXECUTE stmt USING @param1; +utext +lily +river +SELECT utext FROM t1 where utext like '%%'; +utext +lily +river +DROP TABLE t1; +DEALLOCATE PREPARE stmt; +# +# Bug#22052 Trailing spaces are not removed FROM UNICODE fields in an index +# +CREATE TABLE t1 ( +a CHAR(10) CHARACTER SET utf16le NOT NULL, +INDEX a (a) +) engine=myisam; +INSERT INTO t1 VALUES (REPEAT(_ucs2 0x201f, 10)); +INSERT INTO t1 VALUES (REPEAT(_ucs2 0x2020, 10)); +INSERT INTO t1 VALUES (REPEAT(_ucs2 0x2021, 10)); +# make sure "index read" is used +explain SELECT HEX(a) FROM t1 ORDER BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 40 NULL 3 Using index +SELECT HEX(a) FROM t1 ORDER BY a; +HEX(a) +1F201F201F201F201F201F201F201F201F201F20 +2020202020202020202020202020202020202020 +2120212021202120212021202120212021202120 +ALTER TABLE t1 DROP INDEX a; +SELECT HEX(a) FROM t1 ORDER BY a; +HEX(a) +1F201F201F201F201F201F201F201F201F201F20 +2020202020202020202020202020202020202020 +2120212021202120212021202120212021202120 +DROP TABLE t1; +# +# Bug #20108: corrupted default enum value for a ucs2 field +# +CREATE TABLE t1 ( +status ENUM('active','passive') CHARACTER SET utf16le COLLATE utf16le_general_ci +NOT NULL DEFAULT 'passive' +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `status` enum('active','passive') CHARACTER SET utf16le NOT NULL DEFAULT 'passive' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +ALTER TABLE t1 ADD a int NOT NULL AFTER status; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `status` enum('active','passive') CHARACTER SET utf16le NOT NULL DEFAULT 'passive', + `a` int(11) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +# +# Conversion FROM an UTF16LE string to a decimal column +# +CREATE TABLE t1 (a VARCHAR(64) CHARACTER SET utf16le, b DECIMAL(10,3)); +INSERT INTO t1 VALUES ("1.1", 0), ("2.1", 0); +UPDATE t1 set b=a; +SELECT *, HEX(a) FROM t1; +a b HEX(a) +1.1 1.100 31002E003100 +2.1 2.100 32002E003100 +DROP TABLE t1; +# +# Bug#9442 Set parameter make query fail if column CHARACTER SET is UCS2 +# +CREATE TABLE t1 (utext VARCHAR(20) CHARACTER SET utf16le); +INSERT INTO t1 VALUES ("lily"); +INSERT INTO t1 VALUES ("river"); +PREPARE stmt FROM 'SELECT utext FROM t1 where utext like ?'; +SET @param1='%%'; +EXECUTE stmt USING @param1; +utext +lily +river +EXECUTE stmt USING @param1; +utext +lily +river +SELECT utext FROM t1 where utext like '%%'; +utext +lily +river +DROP TABLE t1; +DEALLOCATE PREPARE stmt; +# +# Bug#22638 SOUNDEX broken for international characters +# +SET NAMES utf8, collation_connection=utf16le_general_ci; +SELECT SOUNDEX(''),SOUNDEX('he'),SOUNDEX('hello all folks'),SOUNDEX('#3556 in bugdb'); +SOUNDEX('') SOUNDEX('he') SOUNDEX('hello all folks') SOUNDEX('#3556 in bugdb') + H000 H4142 I51231 +SELECT HEX(SOUNDEX('')),HEX(SOUNDEX('he')),HEX(SOUNDEX('hello all folks')),HEX(SOUNDEX('#3556 in bugdb')); +HEX(SOUNDEX('')) HEX(SOUNDEX('he')) HEX(SOUNDEX('hello all folks')) HEX(SOUNDEX('#3556 in bugdb')) + 4800300030003000 48003400310034003200 490035003100320033003100 +SELECT 'mood' sounds like 'mud'; +'mood' sounds like 'mud' +1 +# Cyrillic A, BE, VE +SELECT HEX(SOUNDEX(_utf16le 0x041004110412)); +HEX(SOUNDEX(_utf16le 0x041004110412)) +0410300030003000 +# Make sure that "U+00BF INVERTED QUESTION MARK" is not considered as letter +SELECT HEX(SOUNDEX(_utf16le 0x00BF00C0)); +HEX(SOUNDEX(_utf16le 0x00BF00C0)) +00BF300030003000 +# +# Bug#14290: character_maximum_length for text fields +# +CREATE TABLE t1(a BLOB, b TEXT CHARSET utf16le); +SELECT data_type, character_octet_length, character_maximum_length +FROM information_schema.columns where table_name='t1'; +data_type character_octet_length character_maximum_length +blob 65535 65535 +text 65535 32767 +DROP TABLE t1; +SET NAMES utf8, collation_connection=utf16le_general_ci; +# +# Testing cs->coll->instr() +# +SELECT POSITION('bb' IN 'abba'); +POSITION('bb' IN 'abba') +2 +# +# Testing cs->coll->hash_sort() +# +SET NAMES utf8, collation_connection=utf16le_bin; +# +# Test that cs->coll->hash_sort() ignores trailing spaces +# +SELECT @@collation_connection; +@@collation_connection +utf16le_bin +CREATE TABLE t1 ENGINE=HEAP AS SELECT REPEAT (' ', 10) AS a LIMIT 0; +ALTER TABLE t1 ADD KEY (a); +CREATE TABLE t2 (a VARCHAR(10)); +INSERT INTO t2 VALUES ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'); +INSERT INTO t2 VALUES ('8'),('9'),('A'),('B'),('C'),('D'),('E'),('F'); +INSERT INTO t1 SELECT CONCAT('a',t21.a,t22.a) FROM t2 t21, t2 t22 ORDER BY 1; +DROP TABLE t2; +INSERT INTO t1 VALUES ('a '); +SELECT a, HEX(a) FROM t1 WHERE a='a'; +a HEX(a) +a 61002000 +DROP TABLE t1; +SET NAMES utf8, collation_connection=utf16le_general_ci; +# +# Test that cs->coll->hash_sort() ignores trailing spaces +# +SELECT @@collation_connection; +@@collation_connection +utf16le_general_ci +CREATE TABLE t1 ENGINE=HEAP AS SELECT REPEAT (' ', 10) AS a LIMIT 0; +ALTER TABLE t1 ADD KEY (a); +CREATE TABLE t2 (a VARCHAR(10)); +INSERT INTO t2 VALUES ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'); +INSERT INTO t2 VALUES ('8'),('9'),('A'),('B'),('C'),('D'),('E'),('F'); +INSERT INTO t1 SELECT CONCAT('a',t21.a,t22.a) FROM t2 t21, t2 t22 ORDER BY 1; +DROP TABLE t2; +INSERT INTO t1 VALUES ('a '); +SELECT a, HEX(a) FROM t1 WHERE a='a'; +a HEX(a) +a 61002000 +DROP TABLE t1; +# +# Testing cs->cset->numchars() +# +SELECT CHAR_LENGTH('abcd'), OCTET_LENGTH('abcd'); +CHAR_LENGTH('abcd') OCTET_LENGTH('abcd') +4 8 +SELECT CHAR_LENGTH(_utf16le 0x00D800DC), OCTET_LENGTH(_utf16le 0x00D800DC); +CHAR_LENGTH(_utf16le 0x00D800DC) OCTET_LENGTH(_utf16le 0x00D800DC) +1 4 +SELECT CHAR_LENGTH(_utf16le 0x7DD8FFDF), OCTET_LENGTH(_utf16le 0x7FD8DDDF); +CHAR_LENGTH(_utf16le 0x7DD8FFDF) OCTET_LENGTH(_utf16le 0x7FD8DDDF) +1 4 +# +# Testing cs->cset->charpos() +# +SELECT LEFT('abcd',2); +LEFT('abcd',2) +ab +SELECT HEX(LEFT(_utf16le 0x00D800DC7FD8FFDF, 1)); +HEX(LEFT(_utf16le 0x00D800DC7FD8FFDF, 1)) +00D800DC +SELECT HEX(RIGHT(_utf16le 0x00D800DC7FD8FFDF, 1)); +HEX(RIGHT(_utf16le 0x00D800DC7FD8FFDF, 1)) +7FD8FFDF +# +# Testing cs->cset->well_formed_length() +# +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf16le); +# Bad sequences +INSERT INTO t1 VALUES (_utf16le 0x00D8); +ERROR HY000: Invalid utf16le character string: '00D8' +INSERT INTO t1 VALUES (_utf16le 0x00DC); +ERROR HY000: Invalid utf16le character string: '00DC' +INSERT INTO t1 VALUES (_utf16le 0x00D800D8); +ERROR HY000: Invalid utf16le character string: '00D800' +INSERT INTO t1 VALUES (_utf16le 0x00D800E8); +ERROR HY000: Invalid utf16le character string: '00D800' +INSERT INTO t1 VALUES (_utf16le 0x00D80008); +ERROR HY000: Invalid utf16le character string: '00D800' +# Good sequences +INSERT INTO t1 VALUES (_utf16le 0x00D800DC); +INSERT INTO t1 VALUES (_utf16le 0x00D8FFDC); +INSERT INTO t1 VALUES (_utf16le 0xFFDB00DC); +INSERT INTO t1 VALUES (_utf16le 0xFFDBFFDC); +SELECT HEX(a) FROM t1; +HEX(a) +00D800DC +00D8FFDC +FFDB00DC +FFDBFFDC +DROP TABLE t1; +# +# Bug#32393 Character sets: illegal characters in utf16le columns +# +# Tests that cs->cset->wc_mb() doesn't accept surrogate parts +# +# via ALTER +# +CREATE TABLE t1 (s1 VARCHAR(50) CHARACTER SET ucs2); +INSERT INTO t1 VALUES (0xDF84); +ALTER TABLE t1 MODIFY column s1 VARCHAR(50) CHARACTER SET utf16le; +Warnings: +Warning 1366 Incorrect string value: '\xDF\x84' for column 's1' at row 1 +SELECT HEX(s1) FROM t1; +HEX(s1) +3F00 +DROP TABLE t1; +# +# via UPDATE +# +CREATE TABLE t1 (s1 VARCHAR(5) CHARACTER SET ucs2, s2 VARCHAR(5) CHARACTER SET utf16le); +INSERT INTO t1 (s1) VALUES (0xdf84); +UPDATE t1 set s2 = s1; +Warnings: +Warning 1366 Incorrect string value: '\xDF\x84' for column 's2' at row 1 +SELECT HEX(s2) FROM t1; +HEX(s2) +3F00 +DROP TABLE t1; +# +# Testing cs->cset->lengthsp() +# +CREATE TABLE t1 (a CHAR(10)) CHARACTER SET utf16le; +INSERT INTO t1 VALUES ('a '); +SELECT HEX(a) FROM t1; +HEX(a) +6100 +DROP TABLE t1; +# +# Testing cs->cset->caseup() and cs->cset->casedn() +# +SELECT UPPER('abcd'), LOWER('ABCD'); +UPPER('abcd') LOWER('ABCD') +ABCD abcd +# +# Checking str_to_datetime() +# +select @@collation_connection; +@@collation_connection +utf16le_general_ci +CREATE TABLE t1 (a date); +INSERT INTO t1 VALUES ('2007-09-16'); +SELECT * FROM t1; +a +2007-09-16 +DROP TABLE t1; +# +# Testing cs->cset->ll10tostr +# +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf16le); +INSERT INTO t1 VALUES (123456); +SELECT a, HEX(a) FROM t1; +a HEX(a) +123456 310032003300340035003600 +DROP TABLE t1; +# +# Testing cs->cset->fill +# SOUNDEX fills strings with DIGIT ZERO up to four characters +# +SELECT SOUNDEX('a'), HEX(SOUNDEX('a')); +SOUNDEX('a') HEX(SOUNDEX('a')) +A000 4100300030003000 +# +# Testing cs->cset->strntoul +# +CREATE TABLE t1 (a enum ('a','b','c')) CHARACTER SET utf16le; +INSERT INTO t1 VALUES ('1'); +SELECT * FROM t1; +a +a +DROP TABLE t1; +# +# Testing cs->cset->strntoll and cs->cset->strntoull +# +SET NAMES latin1; +SELECT HEX(CONV(CONVERT('123' USING utf16le), -10, 16)); +HEX(CONV(CONVERT('123' USING utf16le), -10, 16)) +3742 +SELECT HEX(CONV(CONVERT('123' USING utf16le), 10, 16)); +HEX(CONV(CONVERT('123' USING utf16le), 10, 16)) +3742 +SET NAMES utf8, collation_connection=utf16le_general_ci; +# +# Testing cs->cset->strntod +# +SET NAMES utf8, collation_connection=utf16le_general_ci; +SELECT 1.1 + '1.2'; +1.1 + '1.2' +2.3 +SELECT 1.1 + '1.2xxx'; +1.1 + '1.2xxx' +2.3 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: '1.2xxx' +# +# Testing cs->cset->strtoll10 +# +SELECT LEFT('aaa','1'); +LEFT('aaa','1') +a +CREATE TABLE t1 AS SELECT REPEAT('abcd', 128) AS a; +SELECT LEFT(a, '2') FROM t1; +LEFT(a, '2') +ab +SELECT LEFT(a, ' \t \t 2') FROM t1; +LEFT(a, ' \t \t 2') +ab +SELECT LEFT(a, ' \t \t +2') FROM t1; +LEFT(a, ' \t \t +2') +ab +SELECT SUBSTR(a, '-2') FROM t1; +SUBSTR(a, '-2') +cd +SELECT SUBSTR(a, ' \t \t -2') FROM t1; +SUBSTR(a, ' \t \t -2') +cd +SELECT LEFT(a, '00002') FROM t1; +LEFT(a, '00002') +ab +SELECT LEFT(a, ' \t \t 00002') FROM t1; +LEFT(a, ' \t \t 00002') +ab +SELECT LEFT(a, ' \t \t +00002') FROM t1; +LEFT(a, ' \t \t +00002') +ab +SELECT SUBSTR(a, '-00002') FROM t1; +SUBSTR(a, '-00002') +cd +SELECT SUBSTR(a, ' \t \t -00002') FROM t1; +SUBSTR(a, ' \t \t -00002') +cd +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('abcd', 128) AS a LIMIT 0; +INSERT INTO t1 VALUES ('255'), ('65535'),('16777215'),('4294967295'), +('1099511627775'),('281474976710655'),('72057594037927935'), +('1844674407370955161'),('18446744073709551614'), ('18446744073709551615'); +SELECT a, CAST(a AS SIGNED), CAST(a AS UNSIGNED) FROM t1; +a CAST(a AS SIGNED) CAST(a AS UNSIGNED) +255 255 255 +65535 65535 65535 +16777215 16777215 16777215 +4294967295 4294967295 4294967295 +1099511627775 1099511627775 1099511627775 +281474976710655 281474976710655 281474976710655 +72057594037927935 72057594037927935 72057594037927935 +1844674407370955161 1844674407370955161 1844674407370955161 +18446744073709551614 -2 18446744073709551614 +18446744073709551615 -1 18446744073709551615 +Warnings: +Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement +Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement +UPDATE t1 SET a=CONCAT('-', a); +SELECT a, CAST(a AS SIGNED) FROM t1; +a CAST(a AS SIGNED) +-255 -255 +-65535 -65535 +-16777215 -16777215 +-4294967295 -4294967295 +-1099511627775 -1099511627775 +-281474976710655 -281474976710655 +-72057594037927935 -72057594037927935 +-1844674407370955161 -1844674407370955161 +-18446744073709551614 -9223372036854775808 +-18446744073709551615 -9223372036854775808 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-18446744073709551614' +Warning 1292 Truncated incorrect INTEGER value: '-18446744073709551615' +DROP TABLE t1; +# +# Testing cs->cset->strtoll10() +# +SELECT @@character_set_connection; +@@character_set_connection +utf16le +SELECT CAST('1' AS UNSIGNED); +CAST('1' AS UNSIGNED) +1 +SELECT CAST('12' AS UNSIGNED); +CAST('12' AS UNSIGNED) +12 +SELECT CAST('123' AS UNSIGNED); +CAST('123' AS UNSIGNED) +123 +SELECT CAST('1234' AS UNSIGNED); +CAST('1234' AS UNSIGNED) +1234 +SELECT CAST('12345' AS UNSIGNED); +CAST('12345' AS UNSIGNED) +12345 +SELECT CAST('123456' AS UNSIGNED); +CAST('123456' AS UNSIGNED) +123456 +SELECT CAST('1234567' AS UNSIGNED); +CAST('1234567' AS UNSIGNED) +1234567 +SELECT CAST('12345678' AS UNSIGNED); +CAST('12345678' AS UNSIGNED) +12345678 +SELECT CAST('123456789' AS UNSIGNED); +CAST('123456789' AS UNSIGNED) +123456789 +SELECT CAST('1234567891' AS UNSIGNED); +CAST('1234567891' AS UNSIGNED) +1234567891 +SELECT CAST('12345678912' AS UNSIGNED); +CAST('12345678912' AS UNSIGNED) +12345678912 +SELECT CAST('123456789123' AS UNSIGNED); +CAST('123456789123' AS UNSIGNED) +123456789123 +SELECT CAST('1234567891234' AS UNSIGNED); +CAST('1234567891234' AS UNSIGNED) +1234567891234 +SELECT CAST('12345678912345' AS UNSIGNED); +CAST('12345678912345' AS UNSIGNED) +12345678912345 +SELECT CAST('123456789123456' AS UNSIGNED); +CAST('123456789123456' AS UNSIGNED) +123456789123456 +SELECT CAST('1234567891234567' AS UNSIGNED); +CAST('1234567891234567' AS UNSIGNED) +1234567891234567 +SELECT CAST('12345678912345678' AS UNSIGNED); +CAST('12345678912345678' AS UNSIGNED) +12345678912345678 +SELECT CAST('123456789123456789' AS UNSIGNED); +CAST('123456789123456789' AS UNSIGNED) +123456789123456789 +SELECT CAST('1234567891234567891' AS UNSIGNED); +CAST('1234567891234567891' AS UNSIGNED) +1234567891234567891 +SELECT CAST('12345678912345678912' AS UNSIGNED); +CAST('12345678912345678912' AS UNSIGNED) +12345678912345678912 +SELECT CAST('123456789123456789123' AS UNSIGNED); +CAST('123456789123456789123' AS UNSIGNED) +18446744073709551615 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789123456789123' +SELECT CAST('1x' AS UNSIGNED); +CAST('1x' AS UNSIGNED) +1 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1x' +SELECT CAST('12x' AS UNSIGNED); +CAST('12x' AS UNSIGNED) +12 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12x' +SELECT CAST('123x' AS UNSIGNED); +CAST('123x' AS UNSIGNED) +123 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123x' +SELECT CAST('1234x' AS UNSIGNED); +CAST('1234x' AS UNSIGNED) +1234 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234x' +SELECT CAST('12345x' AS UNSIGNED); +CAST('12345x' AS UNSIGNED) +12345 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345x' +SELECT CAST('123456x' AS UNSIGNED); +CAST('123456x' AS UNSIGNED) +123456 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456x' +SELECT CAST('1234567x' AS UNSIGNED); +CAST('1234567x' AS UNSIGNED) +1234567 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234567x' +SELECT CAST('12345678x' AS UNSIGNED); +CAST('12345678x' AS UNSIGNED) +12345678 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345678x' +SELECT CAST('123456789x' AS UNSIGNED); +CAST('123456789x' AS UNSIGNED) +123456789 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789x' +SELECT CAST('1234567891x' AS UNSIGNED); +CAST('1234567891x' AS UNSIGNED) +1234567891 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234567891x' +SELECT CAST('12345678912x' AS UNSIGNED); +CAST('12345678912x' AS UNSIGNED) +12345678912 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345678912x' +SELECT CAST('123456789123x' AS UNSIGNED); +CAST('123456789123x' AS UNSIGNED) +123456789123 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789123x' +SELECT CAST('1234567891234x' AS UNSIGNED); +CAST('1234567891234x' AS UNSIGNED) +1234567891234 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234567891234x' +SELECT CAST('12345678912345x' AS UNSIGNED); +CAST('12345678912345x' AS UNSIGNED) +12345678912345 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345678912345x' +SELECT CAST('123456789123456x' AS UNSIGNED); +CAST('123456789123456x' AS UNSIGNED) +123456789123456 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789123456x' +SELECT CAST('1234567891234567x' AS UNSIGNED); +CAST('1234567891234567x' AS UNSIGNED) +1234567891234567 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234567891234567x' +SELECT CAST('12345678912345678x' AS UNSIGNED); +CAST('12345678912345678x' AS UNSIGNED) +12345678912345678 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345678912345678x' +SELECT CAST('123456789123456789x' AS UNSIGNED); +CAST('123456789123456789x' AS UNSIGNED) +123456789123456789 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789123456789x' +SELECT CAST('1234567891234567891x' AS UNSIGNED); +CAST('1234567891234567891x' AS UNSIGNED) +1234567891234567891 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234567891234567891x' +SELECT CAST('12345678912345678912x' AS UNSIGNED); +CAST('12345678912345678912x' AS UNSIGNED) +12345678912345678912 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345678912345678912x' +SELECT CAST('123456789123456789123x' AS UNSIGNED); +CAST('123456789123456789123x' AS UNSIGNED) +18446744073709551615 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789123456789123x' +# +# Testing cs->cset->strntoull10rnd +# +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES ('-1234.1e2'); +INSERT INTO t1 VALUES ('-1234.1e2xxxx'); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +INSERT INTO t1 VALUES ('-1234.1e2 '); +INSERT INTO t1 VALUES ('123'); +INSERT INTO t1 VALUES ('-124'); +INSERT INTO t1 VALUES ('+125'); +INSERT INTO t1 VALUES (' \t \t 123'); +INSERT INTO t1 VALUES (' \t \t -124'); +INSERT INTO t1 VALUES (' \t \t +125'); +INSERT INTO t1 VALUES (' \t \t 000123'); +INSERT INTO t1 VALUES (' \t \t -000124'); +INSERT INTO t1 VALUES (' \t \t +000125'); +SELECT * FROM t1; +a +-123410 +-123410 +-123410 +123 +-124 +125 +123 +-124 +125 +123 +-124 +125 +DROP TABLE t1; +CREATE TABLE t1 (a BIGINT UNSIGNED); +INSERT INTO t1 VALUES ('255'), ('65535'),('16777215'),('4294967295'), +('1099511627775'),('281474976710655'),('72057594037927935'), +('1844674407370955161'),('18446744073709551614'), ('18446744073709551615'); +SELECT * FROM t1; +a +255 +65535 +16777215 +4294967295 +1099511627775 +281474976710655 +72057594037927935 +1844674407370955161 +18446744073709551614 +18446744073709551615 +DROP TABLE t1; +# +# Testing cs->cset->scan +# +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES ('1 '); +INSERT INTO t1 VALUES ('1 x'); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +SELECT * FROM t1; +a +1 +1 +DROP TABLE t1; +# +# Testing auto-conversion to TEXT +# +CREATE TABLE t1 (a VARCHAR(17000) CHARACTER SET utf16le); +Warnings: +Note 1246 Converting column 'a' from VARCHAR to TEXT +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` mediumtext CHARACTER SET utf16le +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +# +# Testing that maximim possible key length is 1000 bytes +# +CREATE TABLE t1 (a VARCHAR(250) CHARACTER SET utf16le PRIMARY KEY); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(250) CHARACTER SET utf16le NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(334) CHARACTER SET utf16le PRIMARY KEY); +ERROR 42000: Specified key was too long; max key length is 1000 bytes +# +# Conversion to utf8 +# +CREATE TABLE t1 (a CHAR(1) CHARACTER SET utf16le); +INSERT INTO t1 VALUES (0x00D800DC),(0x00D8FFDC),(0x7FDB00DC),(0x7FDBFFDC); +INSERT INTO t1 VALUES (0xC000), (0xFF00),(0x00E0), (0xFFFF); +SELECT HEX(a), HEX(@a:=CONVERT(a USING utf8mb4)), HEX(CONVERT(@a USING utf16le)) FROM t1; +HEX(a) HEX(@a:=CONVERT(a USING utf8mb4)) HEX(CONVERT(@a USING utf16le)) +00D800DC F0908080 00D800DC +00D8FFDC F09083BF 00D8FFDC +7FDB00DC F3AFB080 7FDB00DC +7FDBFFDC F3AFB3BF 7FDBFFDC +C000 C380 C000 +FF00 C3BF FF00 +00E0 EE8080 00E0 +FFFF EFBFBF FFFF +DROP TABLE t1; +# +# Test basic regex functionality +# +SET NAMES utf8, collation_connection=utf16le_general_ci; +drop table if exists t1; +create table t1 as +select repeat(' ', 64) as s1, repeat(' ',64) as s2 +union +select null, null; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `s1` varchar(64) CHARACTER SET utf16le DEFAULT NULL, + `s2` varchar(64) CHARACTER SET utf16le DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +delete from t1; +insert into t1 values('aaa','aaa'); +insert into t1 values('aaa|qqq','qqq'); +insert into t1 values('gheis','^[^a-dXYZ]+$'); +insert into t1 values('aab','^aa?b'); +insert into t1 values('Baaan','^Ba*n'); +insert into t1 values('aaa','qqq|aaa'); +insert into t1 values('qqq','qqq|aaa'); +insert into t1 values('bbb','qqq|aaa'); +insert into t1 values('bbb','qqq'); +insert into t1 values('aaa','aba'); +insert into t1 values(null,'abc'); +insert into t1 values('def',null); +insert into t1 values(null,null); +insert into t1 values('ghi','ghi['); +select HIGH_PRIORITY s1 regexp s2 from t1; +s1 regexp s2 +0 +0 +0 +1 +1 +1 +1 +1 +1 +1 +NULL +NULL +NULL +NULL +drop table t1; +# +# Test how CHARACTER SET works with date/time +# +# +# Bug#32390 Character sets: casting utf32 to/from date doesn't work +# +CREATE TABLE t1 AS SELECT repeat('a',20) AS s1 LIMIT 0; +SET time_zone=_latin1'+03:00'; +SET timestamp=1216359724; +INSERT INTO t1 VALUES (current_date); +INSERT INTO t1 VALUES (current_time); +INSERT INTO t1 VALUES (current_timestamp); +SELECT s1, hex(s1) FROM t1; +s1 hex(s1) +2008-07-18 32003000300038002D00300037002D0031003800 +08:42:04 300038003A00340032003A0030003400 +2008-07-18 08:42:04 32003000300038002D00300037002D00310038002000300038003A00340032003A0030003400 +DROP TABLE t1; +SET timestamp=0; +SET time_zone=default; +# +# MDEV-5298 Illegal mix of collations on timestamp +# +SELECT CHARSET('2013-11-15 00:41:28' - INTERVAL 7 DAY); +CHARSET('2013-11-15 00:41:28' - INTERVAL 7 DAY) +utf16le +SELECT COERCIBILITY('2013-11-15 00:41:28' - INTERVAL 7 DAY); +COERCIBILITY('2013-11-15 00:41:28' - INTERVAL 7 DAY) +4 +SELECT CHARSET(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY); +CHARSET(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY) +binary +SELECT COERCIBILITY(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY); +COERCIBILITY(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY) +5 +SELECT CHARSET(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)); +CHARSET(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)) +utf16le +SELECT COERCIBILITY(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)) +4 +SELECT CHARSET(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)); +CHARSET(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)) +utf16le +SELECT COERCIBILITY(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)) +4 +SELECT CHARSET(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)); +CHARSET(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)) +utf16le +SELECT COERCIBILITY(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)) +4 +SELECT HEX(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)); +HEX(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)) +32003000300031002D00300031002D00300031002000300030003A00300030003A0030003000 +SELECT CHARSET(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)); +CHARSET(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +utf16le +SELECT COERCIBILITY(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +4 +SELECT HEX(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)); +HEX(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +32003000300031002D00300031002D00300031002000300030003A00300030003A0030003000 +CREATE TABLE t1 AS SELECT REPEAT('a', 64) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(64) CHARACTER SET utf16le NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (''); +SELECT CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +utf16le +SELECT COERCIBILITY(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +COERCIBILITY(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +2 +SELECT HEX(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +HEX(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +32003000300031002D00300031002D00300031002000300030003A00300030003A0030003000 +SELECT CHARSET(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +CHARSET(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +utf16le +SELECT COERCIBILITY(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +COERCIBILITY(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +2 +SELECT HEX(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +HEX(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +32003000300031002D00300031002D00300031002000300030003A00300030003A0030003000 +DROP TABLE t1; +CREATE TABLE t1 (t TIMESTAMP NOT NULL); +INSERT INTO t1 VALUES ('2001-01-01 00:00:00'); +SELECT * FROM t1 WHERE t < '2013-11-15 00:41:28' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t = '2001-01-08 00:00:00' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t < CONCAT('2013-11-15 00:41:28',LEFT(RAND(),0)) - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t = CONCAT('2001-01-08 00:00:00',LEFT(RAND(),0)) - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t < TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t = TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +DROP TABLE t1; +# +# Bug#33073 Character sets: ordering fails with utf32 +# +SET NAMES utf8, collation_connection=utf16le_general_ci; +CREATE TABLE t1 AS SELECT REPEAT('a',2) as s1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `s1` varchar(2) CHARACTER SET utf16le NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('ab'),('AE'),('ab'),('AE'); +SELECT * FROM t1 ORDER BY s1; +s1 +ab +ab +AE +AE +SET max_sort_length=4; +SELECT * FROM t1 ORDER BY s1; +s1 +ab +ab +AE +AE +DROP TABLE t1; +SET max_sort_length=DEFAULT; +# +# Bug#52520 Difference in tinytext utf column metadata +# +CREATE TABLE t1 ( +s1 TINYTEXT CHARACTER SET utf16le, +s2 TEXT CHARACTER SET utf16le, +s3 MEDIUMTEXT CHARACTER SET utf16le, +s4 LONGTEXT CHARACTER SET utf16le +); +SET NAMES utf8, @@character_set_results=NULL; +SELECT *, HEX(s1) FROM t1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def test t1 t1 s1 s1 252 255 0 Y 16 0 56 +def test t1 t1 s2 s2 252 65535 0 Y 16 0 56 +def test t1 t1 s3 s3 252 16777215 0 Y 16 0 56 +def test t1 t1 s4 s4 252 4294967295 0 Y 16 0 56 +def HEX(s1) 253 6120 0 Y 0 0 33 +s1 s2 s3 s4 HEX(s1) +SET NAMES latin1; +SELECT *, HEX(s1) FROM t1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def test t1 t1 s1 s1 252 127 0 Y 16 0 8 +def test t1 t1 s2 s2 252 32767 0 Y 16 0 8 +def test t1 t1 s3 s3 252 8388607 0 Y 16 0 8 +def test t1 t1 s4 s4 252 2147483647 0 Y 16 0 8 +def HEX(s1) 253 2040 0 Y 0 0 8 +s1 s2 s3 s4 HEX(s1) +SET NAMES utf8; +SELECT *, HEX(s1) FROM t1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def test t1 t1 s1 s1 252 381 0 Y 16 0 33 +def test t1 t1 s2 s2 252 98301 0 Y 16 0 33 +def test t1 t1 s3 s3 252 25165821 0 Y 16 0 33 +def test t1 t1 s4 s4 252 4294967295 0 Y 16 0 33 +def HEX(s1) 253 6120 0 Y 0 0 33 +s1 s2 s3 s4 HEX(s1) +CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `CONCAT(s1)` varchar(255) CHARACTER SET utf16le DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1, t2; +# +# Problem found by Roy during review +# MY_CS_BINSORT was not set for utf16le_bin, +# so filesort did not work well +# +SET NAMES utf8, @@collation_connection=utf16le_bin; +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) as c LIMIT 0; +ALTER TABLE t1 ADD PRIMARY KEY(c); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` varchar(10) CHARACTER SET utf16le COLLATE utf16le_bin NOT NULL DEFAULT '', + PRIMARY KEY (`c`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('abc'),('zyx'),('acb'); +SELECT UPPER(c) FROM t1 ORDER BY 1 DESC; +UPPER(c) +ZYX +ACB +ABC +DROP TABLE t1; +# +# WL#3664 WEIGHT_STRING +# +SET NAMES utf8, collation_connection=utf16le_general_ci; +select @@collation_connection; +@@collation_connection +utf16le_general_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf16le NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0041 +SELECT HEX(ws) FROM t2; +HEX(ws) +0041 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET utf16le NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +00410041004100410041 +SELECT HEX(ws) FROM t2; +HEX(ws) +00410041004100410041 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +004100410041 +SELECT HEX(ws) FROM t2; +HEX(ws) +004100410041 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +0041004100410041004100200020002000200020 +SELECT HEX(ws) FROM t2; +HEX(ws) +0041004100410041004100200020002000200020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +0041 +select hex(weight_string('A')); +hex(weight_string('A')) +0041 +select hex(weight_string('abc')); +hex(weight_string('abc')) +004100420043 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +00410042 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +004100420043 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +00410042004300200020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +00 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0041 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +004100 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +00410042002000200020002000200020002000200020002000 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +00 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0041 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +004100 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +00410042004300200020002000200020002000200020002000 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +00 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0041 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +004100 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +00410042004300200020002000200020002000200020002000 +select @@collation_connection; +@@collation_connection +utf16le_general_ci +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +20AC20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +20AC20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +20AC20AC20AC00200020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +20AC20AC00 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +20AC20AC002000200020002000200020002000200020002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +20AC20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +20AC20AC20AC00200020002000200020002000200020002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +20AC20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +20AC20AC20AC00200020002000200020002000200020002000 +SELECT HEX(WEIGHT_STRING(_utf16le 0x00D800DC)); +HEX(WEIGHT_STRING(_utf16le 0x00D800DC)) +FFFD +SELECT HEX(WEIGHT_STRING(_utf16le 0x00D801DC)); +HEX(WEIGHT_STRING(_utf16le 0x00D801DC)) +FFFD +select @@collation_connection; +@@collation_connection +utf16le_general_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +0041 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +0041 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +004100420043 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +00410042 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +004100420043 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +00410042004300200020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +20002000430042004100 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +FFBEFFBDFFBCFFDFFFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFFFDFFFBCFFBDFFBEFF +SET NAMES utf8, collation_connection=utf16le_bin; +select @@collation_connection; +@@collation_connection +utf16le_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf16le COLLATE utf16le_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +000061 +SELECT HEX(ws) FROM t2; +HEX(ws) +000061 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET utf16le COLLATE utf16le_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(15) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +000061000061000061000061000061 +SELECT HEX(ws) FROM t2; +HEX(ws) +000061000061000061000061000061 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(9) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +000061000061000061 +SELECT HEX(ws) FROM t2; +HEX(ws) +000061000061000061 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(30) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +000061000061000061000061000061000020000020000020000020000020 +SELECT HEX(ws) FROM t2; +HEX(ws) +000061000061000061000061000061000020000020000020000020000020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +000061 +select hex(weight_string('A')); +hex(weight_string('A')) +000041 +select hex(weight_string('abc')); +hex(weight_string('abc')) +000061000062000063 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +000061000062 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +000061000062000063 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +000061000062000063000020000020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +00 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0000 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +000061 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +00006100 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0000610000 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +00006100006200002000002000002000002000002000002000 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +00 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0000 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +000061 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +00006100 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0000610000 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +00006100006200006300002000002000002000002000002000 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +00 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0000 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +000061 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +00006100 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0000610000 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +00006100006200006300002000002000002000002000002000 +select @@collation_connection; +@@collation_connection +utf16le_bin +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +0020AC +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +0020AC0020AC0020AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +0020AC0020AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +0020AC0020AC0020AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +0020AC0020AC0020AC000020000020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +00 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +0020 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +0020AC +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +0020AC00 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +0020AC0020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +0020AC0020AC00002000002000002000002000002000002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +00 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +0020 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +0020AC +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +0020AC00 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +0020AC0020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +0020AC0020AC0020AC00002000002000002000002000002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +00 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +0020 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +0020AC +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +0020AC00 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +0020AC0020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +0020AC0020AC0020AC00002000002000002000002000002000 +select @@collation_connection; +@@collation_connection +utf16le_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +000061 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +000041 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +000061000062000063 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +000061000062 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +000061000062000063 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +000061000062000063000020000020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +200000200000630000620000610000 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +FFFF9EFFFF9DFFFF9CFFFFDFFFFFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFFFFFDFFFFF9CFFFF9DFFFF9EFFFF +# +# End of 5.6 tests +# diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result index 02683bc66e6..1f3e519a525 100644 --- a/mysql-test/r/ctype_utf32.result +++ b/mysql-test/r/ctype_utf32.result @@ -599,6 +599,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf32_general_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf32_general_ci @@ -646,6 +697,57 @@ i 1 DROP TABLE t1; # +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf32_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; +# # Bug#55980 Character sets: supplementary character _bin ordering is wrong # CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a LIMIT 0; @@ -968,6 +1070,182 @@ Warning 1292 Truncated incorrect DOUBLE value: '1.2xxx' select left('aaa','1'); left('aaa','1') a +# +# Testing cs->cset->strtoll10() +# +SELECT @@character_set_connection; +@@character_set_connection +utf32 +SELECT CAST('1' AS UNSIGNED); +CAST('1' AS UNSIGNED) +1 +SELECT CAST('12' AS UNSIGNED); +CAST('12' AS UNSIGNED) +12 +SELECT CAST('123' AS UNSIGNED); +CAST('123' AS UNSIGNED) +123 +SELECT CAST('1234' AS UNSIGNED); +CAST('1234' AS UNSIGNED) +1234 +SELECT CAST('12345' AS UNSIGNED); +CAST('12345' AS UNSIGNED) +12345 +SELECT CAST('123456' AS UNSIGNED); +CAST('123456' AS UNSIGNED) +123456 +SELECT CAST('1234567' AS UNSIGNED); +CAST('1234567' AS UNSIGNED) +1234567 +SELECT CAST('12345678' AS UNSIGNED); +CAST('12345678' AS UNSIGNED) +12345678 +SELECT CAST('123456789' AS UNSIGNED); +CAST('123456789' AS UNSIGNED) +123456789 +SELECT CAST('1234567891' AS UNSIGNED); +CAST('1234567891' AS UNSIGNED) +1234567891 +SELECT CAST('12345678912' AS UNSIGNED); +CAST('12345678912' AS UNSIGNED) +12345678912 +SELECT CAST('123456789123' AS UNSIGNED); +CAST('123456789123' AS UNSIGNED) +123456789123 +SELECT CAST('1234567891234' AS UNSIGNED); +CAST('1234567891234' AS UNSIGNED) +1234567891234 +SELECT CAST('12345678912345' AS UNSIGNED); +CAST('12345678912345' AS UNSIGNED) +12345678912345 +SELECT CAST('123456789123456' AS UNSIGNED); +CAST('123456789123456' AS UNSIGNED) +123456789123456 +SELECT CAST('1234567891234567' AS UNSIGNED); +CAST('1234567891234567' AS UNSIGNED) +1234567891234567 +SELECT CAST('12345678912345678' AS UNSIGNED); +CAST('12345678912345678' AS UNSIGNED) +12345678912345678 +SELECT CAST('123456789123456789' AS UNSIGNED); +CAST('123456789123456789' AS UNSIGNED) +123456789123456789 +SELECT CAST('1234567891234567891' AS UNSIGNED); +CAST('1234567891234567891' AS UNSIGNED) +1234567891234567891 +SELECT CAST('12345678912345678912' AS UNSIGNED); +CAST('12345678912345678912' AS UNSIGNED) +12345678912345678912 +SELECT CAST('123456789123456789123' AS UNSIGNED); +CAST('123456789123456789123' AS UNSIGNED) +18446744073709551615 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789123456789123' +SELECT CAST('1x' AS UNSIGNED); +CAST('1x' AS UNSIGNED) +1 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1x' +SELECT CAST('12x' AS UNSIGNED); +CAST('12x' AS UNSIGNED) +12 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12x' +SELECT CAST('123x' AS UNSIGNED); +CAST('123x' AS UNSIGNED) +123 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123x' +SELECT CAST('1234x' AS UNSIGNED); +CAST('1234x' AS UNSIGNED) +1234 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234x' +SELECT CAST('12345x' AS UNSIGNED); +CAST('12345x' AS UNSIGNED) +12345 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345x' +SELECT CAST('123456x' AS UNSIGNED); +CAST('123456x' AS UNSIGNED) +123456 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456x' +SELECT CAST('1234567x' AS UNSIGNED); +CAST('1234567x' AS UNSIGNED) +1234567 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234567x' +SELECT CAST('12345678x' AS UNSIGNED); +CAST('12345678x' AS UNSIGNED) +12345678 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345678x' +SELECT CAST('123456789x' AS UNSIGNED); +CAST('123456789x' AS UNSIGNED) +123456789 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789x' +SELECT CAST('1234567891x' AS UNSIGNED); +CAST('1234567891x' AS UNSIGNED) +1234567891 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234567891x' +SELECT CAST('12345678912x' AS UNSIGNED); +CAST('12345678912x' AS UNSIGNED) +12345678912 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345678912x' +SELECT CAST('123456789123x' AS UNSIGNED); +CAST('123456789123x' AS UNSIGNED) +123456789123 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789123x' +SELECT CAST('1234567891234x' AS UNSIGNED); +CAST('1234567891234x' AS UNSIGNED) +1234567891234 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234567891234x' +SELECT CAST('12345678912345x' AS UNSIGNED); +CAST('12345678912345x' AS UNSIGNED) +12345678912345 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345678912345x' +SELECT CAST('123456789123456x' AS UNSIGNED); +CAST('123456789123456x' AS UNSIGNED) +123456789123456 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789123456x' +SELECT CAST('1234567891234567x' AS UNSIGNED); +CAST('1234567891234567x' AS UNSIGNED) +1234567891234567 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234567891234567x' +SELECT CAST('12345678912345678x' AS UNSIGNED); +CAST('12345678912345678x' AS UNSIGNED) +12345678912345678 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345678912345678x' +SELECT CAST('123456789123456789x' AS UNSIGNED); +CAST('123456789123456789x' AS UNSIGNED) +123456789123456789 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789123456789x' +SELECT CAST('1234567891234567891x' AS UNSIGNED); +CAST('1234567891234567891x' AS UNSIGNED) +1234567891234567891 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '1234567891234567891x' +SELECT CAST('12345678912345678912x' AS UNSIGNED); +CAST('12345678912345678912x' AS UNSIGNED) +12345678912345678912 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '12345678912345678912x' +SELECT CAST('123456789123456789123x' AS UNSIGNED); +CAST('123456789123456789123x' AS UNSIGNED) +18446744073709551615 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '123456789123456789123x' create table t1 (a int); insert into t1 values ('-1234.1e2'); insert into t1 values ('-1234.1e2xxxx'); @@ -1019,7 +1297,11 @@ Table Op Msg_type Msg_text test.t1 check status OK drop table t1; SET collation_connection=utf32_general_ci; +# +# Bug#32390 Character sets: casting utf32 to/from date doesn't work +# CREATE TABLE t1 AS SELECT repeat('a',20) AS s1 LIMIT 0; +SET time_zone=_latin1'+03:00'; SET timestamp=1216359724; INSERT INTO t1 VALUES (current_date); INSERT INTO t1 VALUES (current_time); @@ -1031,6 +1313,99 @@ s1 hex(s1) 2008-07-18 08:42:04 000000320000003000000030000000380000002D00000030000000370000002D00000031000000380000002000000030000000380000003A00000034000000320000003A0000003000000034 DROP TABLE t1; SET timestamp=0; +SET time_zone=default; +# +# MDEV-5298 Illegal mix of collations on timestamp +# +SELECT CHARSET('2013-11-15 00:41:28' - INTERVAL 7 DAY); +CHARSET('2013-11-15 00:41:28' - INTERVAL 7 DAY) +utf32 +SELECT COERCIBILITY('2013-11-15 00:41:28' - INTERVAL 7 DAY); +COERCIBILITY('2013-11-15 00:41:28' - INTERVAL 7 DAY) +4 +SELECT CHARSET(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY); +CHARSET(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY) +binary +SELECT COERCIBILITY(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY); +COERCIBILITY(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY) +5 +SELECT CHARSET(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)); +CHARSET(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)) +utf32 +SELECT COERCIBILITY(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT('2013-11-15 00:41:28' - INTERVAL 7 DAY)) +4 +SELECT CHARSET(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)); +CHARSET(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)) +utf32 +SELECT COERCIBILITY(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT(TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY)) +4 +SELECT CHARSET(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)); +CHARSET(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)) +utf32 +SELECT COERCIBILITY(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)) +4 +SELECT HEX(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)); +HEX(CONCAT('','2001-01-08 00:00:00' - INTERVAL 7 DAY)) +000000320000003000000030000000310000002D00000030000000310000002D00000030000000310000002000000030000000300000003A00000030000000300000003A0000003000000030 +SELECT CHARSET(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)); +CHARSET(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +utf32 +SELECT COERCIBILITY(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)); +COERCIBILITY(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +4 +SELECT HEX(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)); +HEX(CONCAT('',TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +000000320000003000000030000000310000002D00000030000000310000002D00000030000000310000002000000030000000300000003A00000030000000300000003A0000003000000030 +CREATE TABLE t1 AS SELECT REPEAT('a', 64) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(64) CHARACTER SET utf32 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (''); +SELECT CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +utf32 +SELECT COERCIBILITY(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +COERCIBILITY(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +2 +SELECT HEX(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +HEX(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +000000320000003000000030000000310000002D00000030000000310000002D00000030000000310000002000000030000000300000003A00000030000000300000003A0000003000000030 +SELECT CHARSET(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +CHARSET(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +utf32 +SELECT COERCIBILITY(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +COERCIBILITY(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +2 +SELECT HEX(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; +HEX(CONCAT(a,TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY)) +000000320000003000000030000000310000002D00000030000000310000002D00000030000000310000002000000030000000300000003A00000030000000300000003A0000003000000030 +DROP TABLE t1; +CREATE TABLE t1 (t TIMESTAMP NOT NULL); +INSERT INTO t1 VALUES ('2001-01-01 00:00:00'); +SELECT * FROM t1 WHERE t < '2013-11-15 00:41:28' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t = '2001-01-08 00:00:00' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t < CONCAT('2013-11-15 00:41:28',LEFT(RAND(),0)) - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t = CONCAT('2001-01-08 00:00:00',LEFT(RAND(),0)) - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t < TIMESTAMP'2013-11-15 00:41:28' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +SELECT * FROM t1 WHERE t = TIMESTAMP'2001-01-08 00:00:00' - INTERVAL 7 DAY; +t +2001-01-01 00:00:00 +DROP TABLE t1; SET NAMES latin1; set collation_connection=utf32_general_ci; drop table if exists t1; @@ -1175,6 +1550,20 @@ my_col 00 DROP TABLE t1; # +# Bug#32859 Character sets: no warning with non-fitting chariot wheel +# +CREATE TABLE t1 (utf32 CHAR(5) CHARACTER SET utf32, latin1 CHAR(5) CHARACTER SET latin1); +INSERT INTO t1 (utf32) VALUES (0xc581); +UPDATE t1 SET latin1 = utf32; +Warnings: +Warning 1366 Incorrect string value: '\x00\x00\xC5\x81' for column 'latin1' at row 1 +DELETE FROM t1; +INSERT INTO t1 (utf32) VALUES (0x100cc); +UPDATE t1 SET latin1 = utf32; +Warnings: +Warning 1366 Incorrect string value: '\x00\x01\x00\xCC' for column 'latin1' at row 1 +DROP TABLE t1; +# # Bug#55912 FORMAT with locale set fails for numbers < 1000 # SET collation_connection=utf32_general_ci; @@ -1300,3 +1689,548 @@ DROP TABLE t1; # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set collation_connection=utf32_general_ci; +select @@collation_connection; +@@collation_connection +utf32_general_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf32 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0041 +SELECT HEX(ws) FROM t2; +HEX(ws) +0041 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET utf32 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +00410041004100410041 +SELECT HEX(ws) FROM t2; +HEX(ws) +00410041004100410041 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +004100410041 +SELECT HEX(ws) FROM t2; +HEX(ws) +004100410041 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +0041004100410041004100200020002000200020 +SELECT HEX(ws) FROM t2; +HEX(ws) +0041004100410041004100200020002000200020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +0041 +select hex(weight_string('A')); +hex(weight_string('A')) +0041 +select hex(weight_string('abc')); +hex(weight_string('abc')) +004100420043 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +00410042 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +004100420043 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +00410042004300200020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +00 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0041 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +004100 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +00410042002000200020002000200020002000200020002000 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +00 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0041 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +004100 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +00410042004300200020002000200020002000200020002000 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +00 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0041 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +004100 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +00410042004300200020002000200020002000200020002000 +select @@collation_connection; +@@collation_connection +utf32_general_ci +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +20AC20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +20AC20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +20AC20AC20AC00200020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +20AC20AC00 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +20AC20AC002000200020002000200020002000200020002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +20AC20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +20AC20AC20AC00200020002000200020002000200020002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +20AC20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +20AC20AC20AC00200020002000200020002000200020002000 +select hex(weight_string(_utf32 0x10000)); +hex(weight_string(_utf32 0x10000)) +FFFD +select hex(weight_string(_utf32 0x10001)); +hex(weight_string(_utf32 0x10001)) +FFFD +select @@collation_connection; +@@collation_connection +utf32_general_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +0041 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +0041 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +004100420043 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +00410042 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +004100420043 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +00410042004300200020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +20002000430042004100 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +FFBEFFBDFFBCFFDFFFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFFFDFFFBCFFBDFFBEFF +set collation_connection=utf32_bin; +select @@collation_connection; +@@collation_connection +utf32_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +000061 +SELECT HEX(ws) FROM t2; +HEX(ws) +000061 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET utf32 COLLATE utf32_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(15) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +000061000061000061000061000061 +SELECT HEX(ws) FROM t2; +HEX(ws) +000061000061000061000061000061 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(9) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +000061000061000061 +SELECT HEX(ws) FROM t2; +HEX(ws) +000061000061000061 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(30) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +000061000061000061000061000061000020000020000020000020000020 +SELECT HEX(ws) FROM t2; +HEX(ws) +000061000061000061000061000061000020000020000020000020000020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +000061 +select hex(weight_string('A')); +hex(weight_string('A')) +000041 +select hex(weight_string('abc')); +hex(weight_string('abc')) +000061000062000063 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +000061000062 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +000061000062000063 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +000061000062000063000020000020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +00 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0000 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +000061 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +00006100 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0000610000 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +00006100006200002000002000002000002000002000002000 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +00 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0000 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +000061 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +00006100 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0000610000 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +00006100006200006300002000002000002000002000002000 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +00 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0000 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +000061 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +00006100 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0000610000 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +00006100006200006300002000002000002000002000002000 +select @@collation_connection; +@@collation_connection +utf32_bin +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +0020AC +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +0020AC0020AC0020AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +0020AC0020AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +0020AC0020AC0020AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +0020AC0020AC0020AC000020000020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +00 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +0020 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +0020AC +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +0020AC00 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +0020AC0020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +0020AC0020AC00002000002000002000002000002000002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +00 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +0020 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +0020AC +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +0020AC00 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +0020AC0020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +0020AC0020AC0020AC00002000002000002000002000002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +00 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +0020 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +0020AC +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +0020AC00 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +0020AC0020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +0020AC0020AC0020AC00002000002000002000002000002000 +select @@collation_connection; +@@collation_connection +utf32_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +000061 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +000041 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +000061000062000063 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +000061000062 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +000061000062000063 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +000061000062000063000020000020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +200000200000630000620000610000 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +FFFF9EFFFF9DFFFF9CFFFFDFFFFFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFFFFFDFFFFF9CFFFF9DFFFF9EFFFF +# +# End of 5.6 tests +# +# +# Start of 10.0 tests +# +# +# MDEV-6661 PI() does not work well in UCS2/UTF16/UTF32 context +# +SELECT CONCAT(CONVERT('pi=' USING utf32),PI()) AS PI; +PI +pi=3.141593 +# +# MDEV-6666 Malformed result for CONCAT(utf8_column, binary_string) +# +SET NAMES utf8mb4; +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf32); +INSERT INTO t1 VALUES ('a'); +SELECT CONCAT(a,0x20FFFF) FROM t1; +ERROR HY000: Invalid utf32 character string: '0020FF' +SELECT CONCAT(a,0x010000) FROM t1; +CONCAT(a,0x010000) +að€€ +SELECT CONCAT(a,0x00FF) FROM t1; +CONCAT(a,0x00FF) +aÿ +DROP TABLE t1; +SELECT CONCAT(_utf32'a' COLLATE utf32_unicode_ci, _binary 0x20FFFF); +ERROR HY000: Invalid utf32 character string: '0020FF' +PREPARE stmt FROM "SELECT CONCAT(_utf32'a' COLLATE utf32_unicode_ci, ?)"; +SET @arg00=_binary 0x20FFFF; +EXECUTE stmt USING @arg00; +ERROR HY000: Invalid utf32 character string: '0020FF' +SET @arg00=_binary 0x010000; +EXECUTE stmt USING @arg00; +CONCAT(_utf32'a' COLLATE utf32_unicode_ci, ?) +að€€ +SET @arg00=_binary 0x00FF; +EXECUTE stmt USING @arg00; +CONCAT(_utf32'a' COLLATE utf32_unicode_ci, ?) +aÿ +DEALLOCATE PREPARE stmt; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/ctype_utf32_uca.result b/mysql-test/r/ctype_utf32_uca.result index e05b81f195a..d2032d401df 100644 --- a/mysql-test/r/ctype_utf32_uca.result +++ b/mysql-test/r/ctype_utf32_uca.result @@ -165,9 +165,32 @@ insert into t1 values (_ucs2 0x01f0),(_ucs2 0x01f1),(_ucs2 0x01f2),(_ucs2 0x01f3 insert into t1 values (_ucs2 0x01f4),(_ucs2 0x01f5),(_ucs2 0x01f6),(_ucs2 0x01f7); insert into t1 values (_ucs2 0x01f8),(_ucs2 0x01f9),(_ucs2 0x01fa),(_ucs2 0x01fb); insert into t1 values (_ucs2 0x01fc),(_ucs2 0x01fd),(_ucs2 0x01fe),(_ucs2 0x01ff); +INSERT INTO t1 VALUES (_ucs2 0x1EA0),(_ucs2 0x1EA1),(_ucs2 0x1EA2),(_ucs2 0x1EA3); +INSERT INTO t1 VALUES (_ucs2 0x1EA4),(_ucs2 0x1EA5),(_ucs2 0x1EA6),(_ucs2 0x1EA7); +INSERT INTO t1 VALUES (_ucs2 0x1EA8),(_ucs2 0x1EA9),(_ucs2 0x1EAA),(_ucs2 0x1EAB); +INSERT INTO t1 VALUES (_ucs2 0x1EAC),(_ucs2 0x1EAD),(_ucs2 0x1EAE),(_ucs2 0x1EAF); +INSERT INTO t1 VALUES (_ucs2 0x1EB0),(_ucs2 0x1EB1),(_ucs2 0x1EB2),(_ucs2 0x1EB3); +INSERT INTO t1 VALUES (_ucs2 0x1EB4),(_ucs2 0x1EB5),(_ucs2 0x1EB6),(_ucs2 0x1EB7); +INSERT INTO t1 VALUES (_ucs2 0x1EB8),(_ucs2 0x1EB9),(_ucs2 0x1EBA),(_ucs2 0x1EBB); +INSERT INTO t1 VALUES (_ucs2 0x1EBC),(_ucs2 0x1EBD),(_ucs2 0x1EBE),(_ucs2 0x1EBF); +INSERT INTO t1 VALUES (_ucs2 0x1EC0),(_ucs2 0x1EC1),(_ucs2 0x1EC2),(_ucs2 0x1EC3); +INSERT INTO t1 VALUES (_ucs2 0x1EC4),(_ucs2 0x1EC5),(_ucs2 0x1EC6),(_ucs2 0x1EC7); +INSERT INTO t1 VALUES (_ucs2 0x1EC8),(_ucs2 0x1EC9),(_ucs2 0x1ECA),(_ucs2 0x1ECB); +INSERT INTO t1 VALUES (_ucs2 0x1ECC),(_ucs2 0x1ECD),(_ucs2 0x1ECE),(_ucs2 0x1ECF); +INSERT INTO t1 VALUES (_ucs2 0x1ED0),(_ucs2 0x1ED1),(_ucs2 0x1ED2),(_ucs2 0x1ED3); +INSERT INTO t1 VALUES (_ucs2 0x1ED4),(_ucs2 0x1ED5),(_ucs2 0x1ED6),(_ucs2 0x1ED7); +INSERT INTO t1 VALUES (_ucs2 0x1ED8),(_ucs2 0x1ED9),(_ucs2 0x1EDA),(_ucs2 0x1EDB); +INSERT INTO t1 VALUES (_ucs2 0x1EDC),(_ucs2 0x1EDD),(_ucs2 0x1EDE),(_ucs2 0x1EDF); +INSERT INTO t1 VALUES (_ucs2 0x1EE0),(_ucs2 0x1EE1),(_ucs2 0x1EE2),(_ucs2 0x1EE3); +INSERT INTO t1 VALUES (_ucs2 0x1EE4),(_ucs2 0x1EE5),(_ucs2 0x1EE6),(_ucs2 0x1EE7); +INSERT INTO t1 VALUES (_ucs2 0x1EE8),(_ucs2 0x1EE9),(_ucs2 0x1EEA),(_ucs2 0x1EEB); +INSERT INTO t1 VALUES (_ucs2 0x1EEC),(_ucs2 0x1EED),(_ucs2 0x1EEE),(_ucs2 0x1EEF); +INSERT INTO t1 VALUES (_ucs2 0x1EF0),(_ucs2 0x1EF1); insert into t1 values ('AA'),('Aa'),('aa'),('aA'); +insert into t1 values ('AE'),('Ae'),('ae'),('aE'); insert into t1 values ('CH'),('Ch'),('ch'),('cH'); insert into t1 values ('DZ'),('Dz'),('dz'),('dZ'); +insert into t1 values ('DŽ'),('Dž'),('dž'),('dŽ'); insert into t1 values ('IJ'),('Ij'),('ij'),('iJ'); insert into t1 values ('LJ'),('Lj'),('lj'),('lJ'); insert into t1 values ('LL'),('Ll'),('ll'),('lL'); @@ -179,8 +202,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -190,13 +214,13 @@ CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ CHChcHch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -210,7 +234,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -231,7 +255,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -253,7 +277,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -283,8 +307,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÂÃà âãĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÂÃà âãĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae Ãá ǢǣǼǽ Bb @@ -295,13 +320,13 @@ CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ CHChcHch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz Ãð ÄÄ‘ Ɖ ÆŠ Ƌƌ -EeÈÊËèêëĒēĔĕĖėĘęĚě +EeÈÊËèêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ Éé ÆŽÇ Æ @@ -316,7 +341,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÌÎÃìîïĨĩĪīĬÄĮįİÇÇ +IiÌÎÃìîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij Ãà ı @@ -338,7 +363,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÔÕòôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÔÕòôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ Óó Ǿǿ @@ -361,7 +386,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÛÜùûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÛÜùûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Úú Æœ Ʊ @@ -396,8 +421,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -409,12 +435,13 @@ CHChcHch Ƈƈ DdÄŽÄ DZDzdZdzDŽDždžDZDzdz +DŽDždŽdž ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -429,7 +456,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij Yy ı @@ -454,7 +481,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -478,7 +505,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -509,8 +536,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÃÄÅà áãäåĀÄĄąÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÃÄÅà áãäåĀÄĄąÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae Ăă Ââ ÆæǢǣǼǽ @@ -522,13 +550,13 @@ CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ CHChcHch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -542,7 +570,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃìÃïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃìÃïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij Îî ı @@ -564,7 +592,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -588,7 +616,7 @@ TtŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -618,8 +646,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -631,12 +660,13 @@ CHChcHch Ƈƈ DdÄŽÄ DZDzdZdzDŽDždžDZDzdz +DŽDždŽdž ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -650,7 +680,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -671,7 +701,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -694,7 +724,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -725,8 +755,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂăÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂăÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae Ąą ÆæǢǣǼǽ Bb @@ -738,13 +769,13 @@ CHChcHch Ćć Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĚě +EeÈÉÊËèéêëĒēĔĕĖėĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ Ęę ÆŽÇ Æ @@ -759,7 +790,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -781,7 +812,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÔÕÖòôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÔÕÖòôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ Óó ØøǾǿ @@ -805,7 +836,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -837,8 +868,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÅà áâãåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÅà áâãåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -849,13 +881,14 @@ CHChcHch Ƈƈ DdÄŽÄ DZDzdZdz +DŽDždŽdž DŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -869,7 +902,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -890,7 +923,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔòóôŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔòóôŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -915,7 +948,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -949,8 +982,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -960,13 +994,13 @@ CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ CHChcHch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -980,7 +1014,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -1002,7 +1036,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -1024,7 +1058,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -1054,8 +1088,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃà áâãĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃà áâãĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ǢǣǼǽ Bb Æ€ @@ -1065,13 +1100,13 @@ CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ CHChcHch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1085,7 +1120,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -1106,7 +1141,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕòóôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕòóôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ Ǿǿ Ɔ @@ -1128,7 +1163,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -1161,8 +1196,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -1173,13 +1209,13 @@ CHChcHch Çç Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1196,7 +1232,7 @@ Iı IJIj ƕǶ Ħħ -iÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +iÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị iJijIJij Æ— Æ– @@ -1216,7 +1252,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕòóôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕòóôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ Öö ØøǾǿ @@ -1240,7 +1276,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Üü Æœ Ʊ @@ -1271,8 +1307,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -1284,12 +1321,13 @@ cH Ƈƈ DdÄŽÄ DZDzdZdzDŽDždžDZDzdz +DŽDždŽdž ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1304,7 +1342,7 @@ HhĤĥ CHChch ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -1325,7 +1363,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -1349,7 +1387,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -1380,8 +1418,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃà áâãĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃà áâãĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· aA +AEAeaEae ǢǣǼǽ Bb Æ€ @@ -1391,13 +1430,13 @@ CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ CHChcHch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1411,7 +1450,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -1432,7 +1471,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕòóôõŌÅÅŽÅÆ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕòóôõŌÅÅŽÅÆ ơǑǒǪǫǬÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ Ǿǿ Ɔ @@ -1454,7 +1493,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛùúûŨũŪūŬÅŮůŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛùúûŨũŪūŬÅŮůŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -1487,8 +1526,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -1500,12 +1540,13 @@ cH Ƈƈ DdÄŽÄ DZDzdZdzDŽDždžDZDzdz +DŽDždŽdž ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1519,7 +1560,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IYiyÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IYiyÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -1540,7 +1581,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -1563,7 +1604,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -1594,8 +1635,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÅà áâãåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÅà áâãåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae Ää ÆæǢǣǼǽ Bb @@ -1608,12 +1650,13 @@ cH Ƈƈ DdÄŽÄ DZDzdZdzDŽDždžDZDzdz +DŽDždŽdž ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1628,7 +1671,7 @@ HhĤĥ CHChch ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -1649,7 +1692,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÕÖòóõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÕÖòóõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ Ôô ØøǾǿ @@ -1673,7 +1716,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -1704,8 +1747,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -1716,13 +1760,13 @@ cH CHChch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1736,7 +1780,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -1759,7 +1803,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -1781,7 +1825,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ Vv @@ -1811,8 +1855,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -1822,13 +1867,13 @@ CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ CHChcHch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1842,7 +1887,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IJijÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IJijÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJij IJij ı @@ -1866,7 +1911,7 @@ NJNjnJnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -1888,7 +1933,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -ÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +ÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± Æœ Ʊ UVuv @@ -1918,8 +1963,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -1930,13 +1976,13 @@ CHChcHch Ĉĉ Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -1952,7 +1998,7 @@ Hh Ĥĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -1974,7 +2020,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ØøǾǿ Ɔ @@ -1997,7 +2043,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛÜùúûüŨũŪūŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛÜùúûüŨũŪūŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± ŬŠƜ Ʊ @@ -2028,8 +2074,9 @@ select group_concat(c1 order by binary c1 separator '') from t1 group by c1 coll group_concat(c1 order by binary c1 separator '') ÷ × -AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ» +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· AAAaaAaa +AEAeaEae ÆæǢǣǼǽ Bb Æ€ @@ -2039,13 +2086,13 @@ CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ CHChcHch Ƈƈ DdÄŽÄ -DZDzdZdzDŽDždžDZDzdz +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz ÄÄ‘ Ɖ ÆŠ Ƌƌ Ãð -EeÈÉÊËèéêëĒēĔĕĖėĘęĚě +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ ÆŽÇ Æ Æ @@ -2059,7 +2106,7 @@ GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ HhĤĥ ƕǶ Ħħ -IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị IJIjiJijIJij ı Æ— @@ -2080,7 +2127,7 @@ NJNjnJnjNJNjnj Æ Æž ÅŠÅ‹ -OoÒÓÔÕòóôõŌÅÅŽÅÆ Æ¡Ç‘Ç’ÇªÇ«Ç¬Ç +OoÒÓÔÕòóôõŌÅÅŽÅÆ ơǑǒǪǫǬÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ OEOeoEoeÅ’Å“ ÖöÅÅ‘ ØøǾǿ @@ -2103,7 +2150,7 @@ TtŢţŤť Æ« Æ¬Æ Æ® -UuÙÚÛùúûŨũŪūŬÅŮůŲųƯưǓǔǕǖǗǘǙǚǛǜ +UuÙÚÛùúûŨũŪūŬÅŮůŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± ÜüŰű Æœ Ʊ @@ -2130,6 +2177,544 @@ ZzŹźŻżŽž Ç Ç‚ ǃ +select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_croatian_mysql561_ci; +group_concat(c1 order by binary c1 separator '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÇçĈĉĊċ +CHChcHch +ÄŒÄ +Ćć +Ƈƈ +DdÄŽÄ +DZDzdZdzDZDzdz +DŽDždŽdžDŽDždž +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LLLllLll +LJLjlJljLJLjlj +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşſ +SSSssSssß +Å Å¡ +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻż +Æ +Žž +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_croatian_ci; +group_concat(c1 order by binary c1 separator '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÇçĈĉĊċ +CHChcHch +ÄŒÄ +Ćć +Ƈƈ +DdÄŽÄ +DZDzdZdzDZDzdz +dŽ +DŽDždžDŽDždž +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +lJ +LLLllLll +LJLjljLJLjlj +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +nJ +NJNjnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşſ +SSSssSssß +Å Å¡ +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻż +Æ +Žž +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_german2_ci; +group_concat(c1 order by binary c1 separator '') +÷ +× +AaÀÃÂÃÅà áâãåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEaeÄÆäæ +ǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕòóôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÖöŒœ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Üü +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_unicode_520_ci; +group_concat(c1 order by binary c1 separator '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEaeÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÃðĎÄÄÄ‘ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +Ɖ +ÆŠ +Ƌƌ +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥĦħ +ƕǶ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľĿŀÅÅ‚ +LJLjlJljLJLjlj +LLLllLll +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖØòóôõöøŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇǾǿỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_vietnamese_ci; +group_concat(c1 order by binary c1 separator '') +÷ +× +AaÀÃÃÄÅà áãäåĀÄĄąÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£ +AAAaaAaa +AEAeaEae +ĂăẮắẰằẲẳẴẵẶặ +ÂâẤấẦầẨẩẪẫẬẠ+ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉËèéëĒēĔĕĖėĘęĚěẸẹẺẻẼẽ +ÊêẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÕÖòóõöŌÅÅŽÅÅőǑǒǪǫǬÇỌá»á»Žá» +OEOeoEoeÅ’Å“ +Ôôá»á»‘ỒồỔổỖỗỘộ +Æ Æ¡á»šá»›á»œá»á»žá»Ÿá» ỡỢợ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųǓǔǕǖǗǘǙǚǛǜỤụỦủ +ƯưỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ drop table t1; SET NAMES utf8; CREATE TABLE t1 (c varchar(200) CHARACTER SET utf32 COLLATE utf32_general_ci NOT NULL, INDEX (c)); @@ -2298,6 +2883,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf32_unicode_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf32_unicode_ci @@ -2316,6 +2952,121 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; c2h ab_def drop table t1; +"BEGIN ctype_german.inc" +drop table if exists t1; +create table t1 as select repeat(' ', 64) as s1; +select collation(s1) from t1; +collation(s1) +utf32_unicode_ci +delete from t1; +INSERT INTO t1 VALUES ('ud'),('uf'); +INSERT INTO t1 VALUES ('od'),('of'); +INSERT INTO t1 VALUES ('e'); +INSERT INTO t1 VALUES ('ad'),('af'); +insert into t1 values ('a'),('ae'),(_latin1 0xE4); +insert into t1 values ('o'),('oe'),(_latin1 0xF6); +insert into t1 values ('s'),('ss'),(_latin1 0xDF); +insert into t1 values ('u'),('ue'),(_latin1 0xFC); +INSERT INTO t1 VALUES (_latin1 0xE6), (_latin1 0xC6); +INSERT INTO t1 VALUES (_latin1 0x9C), (_latin1 0x8C); +select s1, hex(s1) from t1 order by s1, binary s1; +s1 hex(s1) +a 00000061 +ä 000000E4 +ad 0000006100000064 +ae 0000006100000065 +af 0000006100000066 +Æ 000000C6 +æ 000000E6 +e 00000065 +o 0000006F +ö 000000F6 +od 0000006F00000064 +oe 0000006F00000065 +Å’ 00000152 +Å“ 00000153 +of 0000006F00000066 +s 00000073 +ss 0000007300000073 +ß 000000DF +u 00000075 +ü 000000FC +ud 0000007500000064 +ue 0000007500000065 +uf 0000007500000066 +select group_concat(s1 order by binary s1) from t1 group by s1; +group_concat(s1 order by binary s1) +a,ä +ad +ae +af +Æ,æ +e +o,ö +od +oe,Å’,Å“ +of +s +ss,ß +u,ü +ud +ue +uf +SELECT s1, hex(s1), hex(weight_string(s1)) FROM t1 ORDER BY s1, BINARY(s1); +s1 hex(s1) hex(weight_string(s1)) +a 00000061 0E33 +ä 000000E4 0E33 +ad 0000006100000064 0E330E6D +ae 0000006100000065 0E330E8B +af 0000006100000066 0E330EB9 +Æ 000000C6 0E38 +æ 000000E6 0E38 +e 00000065 0E8B +o 0000006F 0F82 +ö 000000F6 0F82 +od 0000006F00000064 0F820E6D +oe 0000006F00000065 0F820E8B +Å’ 00000152 0F820E8B +Å“ 00000153 0F820E8B +of 0000006F00000066 0F820EB9 +s 00000073 0FEA +ss 0000007300000073 0FEA0FEA +ß 000000DF 0FEA0FEA +u 00000075 101F +ü 000000FC 101F +ud 0000007500000064 101F0E6D +ue 0000007500000065 101F0E8B +uf 0000007500000066 101F0EB9 +SELECT s1, hex(s1) FROM t1 WHERE s1='ae' ORDER BY s1, BINARY(s1); +s1 hex(s1) +ae 0000006100000065 +drop table t1; +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_unicode_ci NOT NULL DEFAULT '', + `b` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); +SELECT * FROM t1 ORDER BY a, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY a DESC, b; +a b +ß 1 +s 0 +SELECT * FROM t1 ORDER BY CONCAT(a), b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a) DESC, b; +a b +ß 1 +s 0 +DROP TABLE t1; +"END ctype_german.inc" End of 4.1 tests CREATE TABLE t1 (id int, a varchar(30) character set utf32); INSERT INTO t1 VALUES (1, _ucs2 0x01310069), (2, _ucs2 0x01310131); @@ -2463,3 +3214,3414 @@ DROP TABLE t1,t2; # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set collation_connection=utf32_unicode_ci; +select @@collation_connection; +@@collation_connection +utf32_unicode_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(16) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0E33 +SELECT HEX(ws) FROM t2; +HEX(ws) +0E33 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET utf32 COLLATE utf32_unicode_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(80) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0E330E330E330E330E33 +SELECT HEX(ws) FROM t2; +HEX(ws) +0E330E330E330E330E33 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(48) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +0E330E330E33 +SELECT HEX(ws) FROM t2; +HEX(ws) +0E330E330E33 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(160) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +0E330E330E330E330E3302090209020902090209 +SELECT HEX(ws) FROM t2; +HEX(ws) +0E330E330E330E330E3302090209020902090209 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +0E33 +select hex(weight_string('A')); +hex(weight_string('A')) +0E33 +select hex(weight_string('abc')); +hex(weight_string('abc')) +0E330E4A0E60 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +0E330E4A +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +0E330E4A0E60 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +0E330E4A0E6002090209 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +0E +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0E33 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +0E330E +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +0E330E4A +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0E330E4A02 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +0E330E4A020902090209020902090209020902090209020902 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +0E +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0E33 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +0E330E +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +0E330E4A +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0E330E4A0E +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +0E330E4A0E6002090209020902090209020902090209020902 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +0E +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0E33 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +0E330E +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +0E330E4A +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0E330E4A0E +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +0E330E4A0E6002090209020902090209020902090209020902 +select @@collation_connection; +@@collation_connection +utf32_unicode_ci +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +0E23 +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +0E230E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +0E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +0E230E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +0E230E230E2302090209 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +0E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +0E230E +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +0E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +0E230E2302 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +0E230E23020902090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +0E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +0E230E +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +0E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +0E230E230E +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +0E230E230E2302090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +0E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +0E230E +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +0E230E23 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +0E230E230E +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +0E230E230E2302090209020902090209020902090209020902 +select hex(weight_string(_utf32 0x10000 collate utf32_unicode_ci)); +hex(weight_string(_utf32 0x10000 collate utf32_unicode_ci)) +FFFD +select hex(weight_string(_utf32 0x10001 collate utf32_unicode_ci)); +hex(weight_string(_utf32 0x10001 collate utf32_unicode_ci)) +FFFD +select @@collation_connection; +@@collation_connection +utf32_unicode_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +0E33 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +0E33 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +0E330E4A0E60 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +0E330E4A +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +0E330E4A0E60 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +0E330E4A0E6002090209 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +09020902600E4A0E330E +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +F1CCF1B5F19FFDF6FDF6 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +F6FDF6FD9FF1B5F1CCF1 +set @@collation_connection=utf32_czech_ci; +select @@collation_connection; +@@collation_connection +utf32_czech_ci +select collation(cast(_latin1 0xDF as char)); +collation(cast(_latin1 0xDF as char)) +utf32_czech_ci +select hex(weight_string('s')); +hex(weight_string('s')) +0FEA +select hex(weight_string(cast(_latin1 0xDF as char))); +hex(weight_string(cast(_latin1 0xDF as char))) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF as char) as char(1))); +hex(weight_string(cast(_latin1 0xDF as char) as char(1))) +0FEA +select hex(weight_string('c')); +hex(weight_string('c')) +0E60 +select hex(weight_string('h')); +hex(weight_string('h')) +0EE1 +select hex(weight_string('ch')); +hex(weight_string('ch')) +0EE2 +select hex(weight_string('i')); +hex(weight_string('i')) +0EFB +select hex(weight_string(cast(_latin1 0x6368DF as char))); +hex(weight_string(cast(_latin1 0x6368DF as char))) +0EE20FEA0FEA +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(1))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(1))) +0EE2 +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(2))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(2))) +0EE20FEA +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(3))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(3))) +0EE20FEA0FEA +select hex(weight_string(cast(_latin1 0x6368DF as char) as char(4))); +hex(weight_string(cast(_latin1 0x6368DF as char) as char(4))) +0EE20FEA0FEA0209 +select hex(weight_string(cast(_latin1 0xDF6368 as char))); +hex(weight_string(cast(_latin1 0xDF6368 as char))) +0FEA0FEA0EE2 +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(1))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(1))) +0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(2))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(2))) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(3))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(3))) +0FEA0FEA0EE2 +select hex(weight_string(cast(_latin1 0xDF6368 as char) as char(4))); +hex(weight_string(cast(_latin1 0xDF6368 as char) as char(4))) +0FEA0FEA0EE20209 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 2, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 2, 0xC0)) +0EE2 +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 2, 0xC0)) +0EE20F +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 2, 0xC0)) +0EE20FEA +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 2, 0xC0)) +0EE20FEA020902090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 3, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 3, 0xC0)) +0EE2 +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 3, 0xC0)) +0EE20F +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 3, 0xC0)) +0EE20FEA +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 3, 0xC0)) +0EE20FEA0FEA02090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 1, 4, 0xC0)) +0E +select hex(weight_string(cast(_latin1 0x6368DF as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 2, 4, 0xC0)) +0EE2 +select hex(weight_string(cast(_latin1 0x6368DF as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 3, 4, 0xC0)) +0EE20F +select hex(weight_string(cast(_latin1 0x6368DF as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char), 4, 4, 0xC0)) +0EE20FEA +select hex(weight_string(cast(_latin1 0x6368DF as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x6368DF as char),25, 4, 0xC0)) +0EE20FEA0FEA02090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 2,0xC0)) +0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 2,0xC0)) +0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 2,0xC0)) +0FEA0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 2,0xC0)) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 2,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 2,0xC0)) +0FEA0FEA020902090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 3,0xC0)) +0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 3,0xC0)) +0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 3,0xC0)) +0FEA0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 3,0xC0)) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 3,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 3,0xC0)) +0FEA0FEA0EE202090209020902090209020902090209020902 +select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 4,0xC0)) +0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 2, 4,0xC0)) +0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 3, 4,0xC0)) +0FEA0F +select hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 4,0xC0)) +0FEA0FEA +select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0)); +hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0)) +0FEA0FEA0EE202090209020902090209020902090209020902 +SET NAMES utf8; +SET collation_connection=utf32_german2_ci; +"BEGIN ctype_german.inc" +drop table if exists t1; +create table t1 as select repeat(' ', 64) as s1; +select collation(s1) from t1; +collation(s1) +utf32_german2_ci +delete from t1; +INSERT INTO t1 VALUES ('ud'),('uf'); +INSERT INTO t1 VALUES ('od'),('of'); +INSERT INTO t1 VALUES ('e'); +INSERT INTO t1 VALUES ('ad'),('af'); +insert into t1 values ('a'),('ae'),(_latin1 0xE4); +insert into t1 values ('o'),('oe'),(_latin1 0xF6); +insert into t1 values ('s'),('ss'),(_latin1 0xDF); +insert into t1 values ('u'),('ue'),(_latin1 0xFC); +INSERT INTO t1 VALUES (_latin1 0xE6), (_latin1 0xC6); +INSERT INTO t1 VALUES (_latin1 0x9C), (_latin1 0x8C); +select s1, hex(s1) from t1 order by s1, binary s1; +s1 hex(s1) +a 00000061 +ad 0000006100000064 +ae 0000006100000065 +Æ 000000C6 +ä 000000E4 +æ 000000E6 +af 0000006100000066 +e 00000065 +o 0000006F +od 0000006F00000064 +oe 0000006F00000065 +ö 000000F6 +Å’ 00000152 +Å“ 00000153 +of 0000006F00000066 +s 00000073 +ss 0000007300000073 +ß 000000DF +u 00000075 +ud 0000007500000064 +ue 0000007500000065 +ü 000000FC +uf 0000007500000066 +select group_concat(s1 order by binary s1) from t1 group by s1; +group_concat(s1 order by binary s1) +a +ad +ae,Æ,ä,æ +af +e +o +od +oe,ö,Å’,Å“ +of +s +ss,ß +u +ud +ue,ü +uf +SELECT s1, hex(s1), hex(weight_string(s1)) FROM t1 ORDER BY s1, BINARY(s1); +s1 hex(s1) hex(weight_string(s1)) +a 00000061 0E33 +ad 0000006100000064 0E330E6D +ae 0000006100000065 0E330E8B +Æ 000000C6 0E330E8B +ä 000000E4 0E330E8B +æ 000000E6 0E330E8B +af 0000006100000066 0E330EB9 +e 00000065 0E8B +o 0000006F 0F82 +od 0000006F00000064 0F820E6D +oe 0000006F00000065 0F820E8B +ö 000000F6 0F820E8B +Å’ 00000152 0F820E8B +Å“ 00000153 0F820E8B +of 0000006F00000066 0F820EB9 +s 00000073 0FEA +ss 0000007300000073 0FEA0FEA +ß 000000DF 0FEA0FEA +u 00000075 101F +ud 0000007500000064 101F0E6D +ue 0000007500000065 101F0E8B +ü 000000FC 101F0E8B +uf 0000007500000066 101F0EB9 +SELECT s1, hex(s1) FROM t1 WHERE s1='ae' ORDER BY s1, BINARY(s1); +s1 hex(s1) +ae 0000006100000065 +Æ 000000C6 +ä 000000E4 +æ 000000E6 +drop table t1; +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_german2_ci NOT NULL DEFAULT '', + `b` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); +SELECT * FROM t1 ORDER BY a, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY a DESC, b; +a b +ß 1 +s 0 +SELECT * FROM t1 ORDER BY CONCAT(a), b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a) DESC, b; +a b +ß 1 +s 0 +DROP TABLE t1; +"END ctype_german.inc" +# +# WL#2673 Unicode Collation Algorithm new version +# +SET NAMES utf8mb4; +SET collation_connection=utf32_unicode_520_ci; +CREATE TABLE t1 AS SELECT repeat('a', 10) as c LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` varchar(10) CHARACTER SET utf32 COLLATE utf32_unicode_520_ci NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (_utf32 0x0180),(_utf32 0x023A); +INSERT INTO t1 VALUES (_utf32 0x023B),(_utf32 0x023C); +INSERT INTO t1 VALUES (_utf32 0x023D),(_utf32 0x023E); +INSERT INTO t1 VALUES (_utf32 0x0241),(_utf32 0x0242); +INSERT INTO t1 VALUES (_utf32 0x0243),(_utf32 0x0244); +INSERT INTO t1 VALUES (_utf32 0x0245),(_utf32 0x0246); +INSERT INTO t1 VALUES (_utf32 0x0247),(_utf32 0x0248); +INSERT INTO t1 VALUES (_utf32 0x0249),(_utf32 0x024A); +INSERT INTO t1 VALUES (_utf32 0x024B),(_utf32 0x024C); +INSERT INTO t1 VALUES (_utf32 0x024D),(_utf32 0x024E); +INSERT INTO t1 VALUES (_utf32 0x024F),(_utf32 0x026B); +INSERT INTO t1 VALUES (_utf32 0x027D),(_utf32 0x0289); +INSERT INTO t1 VALUES (_utf32 0x028C); +INSERT INTO t1 VALUES (_utf32 0x037B), (_utf32 0x037C); +INSERT INTO t1 VALUES (_utf32 0x037D), (_utf32 0x03FD); +INSERT INTO t1 VALUES (_utf32 0x03FE), (_utf32 0x03FF); +INSERT INTO t1 VALUES (_utf32 0x04C0), (_utf32 0x04CF); +INSERT INTO t1 VALUES (_utf32 0x04F6), (_utf32 0x04F7); +INSERT INTO t1 VALUES (_utf32 0x04FA), (_utf32 0x04FB); +INSERT INTO t1 VALUES (_utf32 0x04FC), (_utf32 0x04FD); +INSERT INTO t1 VALUES (_utf32 0x04FE), (_utf32 0x04FF); +INSERT INTO t1 VALUES (_utf32 0x0510), (_utf32 0x0511); +INSERT INTO t1 VALUES (_utf32 0x0512), (_utf32 0x0513); +INSERT INTO t1 VALUES (_utf32 0x10A0), (_utf32 0x10A1); +INSERT INTO t1 VALUES (_utf32 0x10A2), (_utf32 0x10A3); +INSERT INTO t1 VALUES (_utf32 0x10A4), (_utf32 0x10A5); +INSERT INTO t1 VALUES (_utf32 0x10A6), (_utf32 0x10A7); +INSERT INTO t1 VALUES (_utf32 0x2D00), (_utf32 0x2D01); +INSERT INTO t1 VALUES (_utf32 0x2D02), (_utf32 0x2D03); +INSERT INTO t1 VALUES (_utf32 0x2D04), (_utf32 0x2D05); +INSERT INTO t1 VALUES (_utf32 0x2D06), (_utf32 0x2D07); +INSERT INTO t1 VALUES (_utf32 0x1D7D); +INSERT INTO t1 VALUES (_utf32 0x2132),(_utf32 0x214E); +INSERT INTO t1 VALUES (_utf32 0x2183),(_utf32 0x2184); +INSERT INTO t1 VALUES (_utf32 0x2C80), (_utf32 0x2C81); +INSERT INTO t1 VALUES (_utf32 0x2C82), (_utf32 0x2C83); +INSERT INTO t1 VALUES (_utf32 0x2C84), (_utf32 0x2C85); +INSERT INTO t1 VALUES (_utf32 0x2C86), (_utf32 0x2C87); +INSERT INTO t1 VALUES (_utf32 0x2C88), (_utf32 0x2C89); +INSERT INTO t1 VALUES (_utf32 0x2C8A), (_utf32 0x2C8B); +INSERT INTO t1 VALUES (_utf32 0x2C8C), (_utf32 0x2C8D); +INSERT INTO t1 VALUES (_utf32 0x2C8E), (_utf32 0x2C8F); +INSERT INTO t1 VALUES (_utf32 0x2C60), (_utf32 0x2C61); +INSERT INTO t1 VALUES (_utf32 0x2C62), (_utf32 0x2C63); +INSERT INTO t1 VALUES (_utf32 0x2C64), (_utf32 0x2C65); +INSERT INTO t1 VALUES (_utf32 0x2C66), (_utf32 0x2C67); +INSERT INTO t1 VALUES (_utf32 0x2C68), (_utf32 0x2C69); +INSERT INTO t1 VALUES (_utf32 0x2C6A), (_utf32 0x2C6B); +INSERT INTO t1 VALUES (_utf32 0x2C6C), (_utf32 0x2C75); +INSERT INTO t1 VALUES (_utf32 0x2C76); +INSERT INTO t1 VALUES (_utf32 0x2C00), (_utf32 0x2C01); +INSERT INTO t1 VALUES (_utf32 0x2C02), (_utf32 0x2C03); +INSERT INTO t1 VALUES (_utf32 0x2C04), (_utf32 0x2C05); +INSERT INTO t1 VALUES (_utf32 0x2C06), (_utf32 0x2C07); +INSERT INTO t1 VALUES (_utf32 0x2C30), (_utf32 0x2C31); +INSERT INTO t1 VALUES (_utf32 0x2C32), (_utf32 0x2C33); +INSERT INTO t1 VALUES (_utf32 0x2C34), (_utf32 0x2C35); +INSERT INTO t1 VALUES (_utf32 0x2C36), (_utf32 0x2C37); +INSERT INTO t1 VALUES (_utf32 0x10400), (_utf32 0x10401); +INSERT INTO t1 VALUES (_utf32 0x10402), (_utf32 0x10403); +INSERT INTO t1 VALUES (_utf32 0x10404), (_utf32 0x10405); +INSERT INTO t1 VALUES (_utf32 0x10406), (_utf32 0x10407); +INSERT INTO t1 VALUES (_utf32 0x10428), (_utf32 0x10429); +INSERT INTO t1 VALUES (_utf32 0x1042A), (_utf32 0x1042B); +INSERT INTO t1 VALUES (_utf32 0x1042C), (_utf32 0x1042D); +INSERT INTO t1 VALUES (_utf32 0x1042E), (_utf32 0x1042F); +INSERT INTO t1 VALUES (_utf32 0x0370); +INSERT INTO t1 VALUES (_utf32 0x0371); +INSERT INTO t1 VALUES (_utf32 0x0372); +INSERT INTO t1 VALUES (_utf32 0x0373); +INSERT INTO t1 VALUES (_utf32 0x0514); +INSERT INTO t1 VALUES (_utf32 0x0515); +INSERT INTO t1 VALUES (_utf32 0x0516); +INSERT INTO t1 VALUES (_utf32 0x0517); +INSERT INTO t1 VALUES (_utf32 0xA640); +INSERT INTO t1 VALUES (_utf32 0xA641); +INSERT INTO t1 VALUES (_utf32 0xA642); +INSERT INTO t1 VALUES (_utf32 0xA643); +INSERT INTO t1 VALUES (_utf32 0xA722); +INSERT INTO t1 VALUES (_utf32 0xA723); +INSERT INTO t1 VALUES (_utf32 0xA724); +INSERT INTO t1 VALUES (_utf32 0xA725); +INSERT INTO t1 VALUES (_utf32 0xA726); +INSERT INTO t1 VALUES (_utf32 0xA727); +INSERT INTO t1 VALUES (_utf32 0xA728); +INSERT INTO t1 VALUES (_utf32 0xA729); +INSERT INTO t1 VALUES (_utf32 0xA72A); +INSERT INTO t1 VALUES (_utf32 0xA72B); +INSERT INTO t1 VALUES (_utf32 0x2CEB); +INSERT INTO t1 VALUES (_utf32 0x2CEC); +INSERT INTO t1 VALUES (_utf32 0x2CED); +INSERT INTO t1 VALUES (_utf32 0x2CEE); +SELECT hex(c), hex(lower(c)), hex(upper(c)), hex(weight_string(c)), c +FROM t1 ORDER BY c, BINARY c; +hex(c) hex(lower(c)) hex(upper(c)) hex(weight_string(c)) c +0000023A 00002C65 0000023A 1214 Ⱥ +00002C65 00002C65 0000023A 1214 â±¥ +00000180 00000180 00000243 122D Æ€ +00000243 00000180 00000243 122D Ƀ +0000023B 0000023C 0000023B 1242 È» +0000023C 0000023C 0000023B 1242 ȼ +00002183 00002184 00002183 124E Ↄ +00002184 00002184 00002183 124E ↄ +00000246 00000247 00000246 1270 Ɇ +00000247 00000247 00000246 1270 ɇ +00002132 0000214E 00002132 12AE Ⅎ +0000214E 0000214E 00002132 12AE â…Ž +00002C67 00002C68 00002C67 12E3 â±§ +00002C68 00002C68 00002C67 12E3 ⱨ +00002C75 00002C76 00002C75 12E4 â±µ +00002C76 00002C76 00002C75 12E4 â±¶ +0000A726 0000A727 0000A726 12E5 Ꜧ +0000A727 0000A727 0000A726 12E5 ꜧ +00000248 00000249 00000248 130E Ɉ +00000249 00000249 00000248 130E ɉ +00002C69 00002C6A 00002C69 1328 Ⱪ +00002C6A 00002C6A 00002C69 1328 ⱪ +0000023D 0000019A 0000023D 133B Ƚ +00002C60 00002C61 00002C60 133F â± +00002C61 00002C61 00002C60 133F ⱡ +0000026B 0000026B 00002C62 1340 É« +00002C62 0000026B 00002C62 1340 â±¢ +00001D7D 00001D7D 00002C63 13B8 áµ½ +00002C63 00001D7D 00002C63 13B8 â±£ +0000024A 0000024B 0000024A 13D2 ÉŠ +0000024B 0000024B 0000024A 13D2 É‹ +0000024C 0000024D 0000024C 13E4 ÉŒ +0000024D 0000024D 0000024C 13E4 É +0000027D 0000027D 00002C64 13FC ɽ +00002C64 0000027D 00002C64 13FC Ɽ +0000A728 0000A729 0000A728 143314AD Ꜩ +0000A729 0000A729 0000A728 143314AD ꜩ +0000023E 00002C66 0000023E 143C Ⱦ +00002C66 00002C66 0000023E 143C ⱦ +00000244 00000289 00000244 145B É„ +00000289 00000289 00000244 145B ʉ +00000245 0000028C 00000245 1489 É… +0000028C 0000028C 00000245 1489 ÊŒ +0000024E 0000024F 0000024E 14A4 ÉŽ +0000024F 0000024F 0000024E 14A4 É +00002C6B 00002C6C 00002C6B 14C8 Ⱬ +00002C6C 00002C6C 00002C6B 14C8 ⱬ +0000A72A 0000A72B 0000A72A 14F3 Ꜫ +0000A72B 0000A72B 0000A72A 14F3 ꜫ +00000241 00000242 00000241 1506 É +00000242 00000242 00000241 1506 É‚ +0000A722 0000A723 0000A722 150E Ꜣ +0000A723 0000A723 0000A722 150E ꜣ +0000A724 0000A725 0000A724 1518 Ꜥ +0000A725 0000A725 0000A724 1518 ꜥ +00000370 00000371 00000370 154F Ͱ +00000371 00000371 00000370 154F ͱ +0000037C 0000037C 000003FE 1564 ͼ +000003FE 0000037C 000003FE 1564 Ͼ +0000037B 0000037B 000003FD 1565 Í» +000003FD 0000037B 000003FD 1565 Ͻ +0000037D 0000037D 000003FF 1566 ͽ +000003FF 0000037D 000003FF 1566 Ï¿ +00000372 00000373 00000372 156F Ͳ +00000373 00000373 00000372 156F ͳ +00002C80 00002C81 00002C80 1571 â²€ +00002C81 00002C81 00002C80 1571 â² +00002C82 00002C83 00002C82 1572 Ⲃ +00002C83 00002C83 00002C82 1572 ⲃ +00002C84 00002C85 00002C84 1573 Ⲅ +00002C85 00002C85 00002C84 1573 â²… +00002C86 00002C87 00002C86 1574 Ⲇ +00002C87 00002C87 00002C86 1574 ⲇ +00002C88 00002C89 00002C88 1575 Ⲉ +00002C89 00002C89 00002C88 1575 ⲉ +00002C8A 00002C8B 00002C8A 1577 Ⲋ +00002C8B 00002C8B 00002C8A 1577 ⲋ +00002C8C 00002C8D 00002C8C 1578 Ⲍ +00002C8D 00002C8D 00002C8C 1578 â² +00002C8E 00002C8F 00002C8E 1579 Ⲏ +00002C8F 00002C8F 00002C8E 1579 â² +00002CEB 00002CEC 00002CEB 1591 Ⳬ +00002CEC 00002CEC 00002CEB 1591 ⳬ +00002CED 00002CEE 00002CED 15A0 â³ +00002CEE 00002CEE 00002CED 15A0 â³® +000004FA 000004FB 000004FA 15D4 Óº +000004FB 000004FB 000004FA 15D4 Ó» +000004F6 000004F7 000004F6 15DC Ó¶ +000004F7 000004F7 000004F6 15DC Ó· +0000A640 0000A641 0000A640 1611 Ꙁ +0000A641 0000A641 0000A640 1611 ê™ +00000510 00000511 00000510 1613 Ô +00000511 00000511 00000510 1613 Ô‘ +0000A642 0000A643 0000A642 1618 Ꙃ +0000A643 0000A643 0000A642 1618 ꙃ +00000512 00000513 00000512 1666 Ô’ +00000513 00000513 00000512 1666 Ô“ +00000514 00000515 00000514 166E Ô” +00000515 00000515 00000514 166E Ô• +00000516 00000517 00000516 16B7 Ô– +00000517 00000517 00000516 16B7 Ô— +000004FC 000004FD 000004FC 16F9 Ó¼ +000004FD 000004FD 000004FC 16F9 Ó½ +000004FE 000004FF 000004FE 16FD Ó¾ +000004FF 000004FF 000004FE 16FD Ó¿ +000004C0 000004CF 000004C0 17B1 Ó€ +000004CF 000004CF 000004C0 17B1 Ó +00002C00 00002C30 00002C00 17B5 â°€ +00002C30 00002C30 00002C00 17B5 â°° +00002C01 00002C31 00002C01 17B6 â° +00002C31 00002C31 00002C01 17B6 â°± +00002C02 00002C32 00002C02 17B7 â°‚ +00002C32 00002C32 00002C02 17B7 â°² +00002C03 00002C33 00002C03 17B8 â°ƒ +00002C33 00002C33 00002C03 17B8 â°³ +00002C04 00002C34 00002C04 17B9 â°„ +00002C34 00002C34 00002C04 17B9 â°´ +00002C05 00002C35 00002C05 17BA â°… +00002C35 00002C35 00002C05 17BA â°µ +00002C06 00002C36 00002C06 17BB â°† +00002C36 00002C36 00002C06 17BB â°¶ +00002C07 00002C37 00002C07 17BC â°‡ +00002C37 00002C37 00002C07 17BC â°· +000010A0 00002D00 000010A0 17E5 á‚ +00002D00 00002D00 000010A0 17E5 â´€ +000010A1 00002D01 000010A1 17E7 á‚¡ +00002D01 00002D01 000010A1 17E7 â´ +000010A2 00002D02 000010A2 17E9 á‚¢ +00002D02 00002D02 000010A2 17E9 â´‚ +000010A3 00002D03 000010A3 17EB á‚£ +00002D03 00002D03 000010A3 17EB â´ƒ +000010A4 00002D04 000010A4 17ED Ⴄ +00002D04 00002D04 000010A4 17ED â´„ +000010A5 00002D05 000010A5 17EF á‚¥ +00002D05 00002D05 000010A5 17EF â´… +000010A6 00002D06 000010A6 17F1 Ⴆ +00002D06 00002D06 000010A6 17F1 â´† +000010A7 00002D07 000010A7 17F5 á‚§ +00002D07 00002D07 000010A7 17F5 â´‡ +00010400 00010428 00010400 30D2 ð€ +00010428 00010428 00010400 30D2 ð¨ +00010401 00010429 00010401 30D3 ð +00010429 00010429 00010401 30D3 ð© +00010402 0001042A 00010402 30D4 ð‚ +0001042A 0001042A 00010402 30D4 ðª +00010403 0001042B 00010403 30D5 ðƒ +0001042B 0001042B 00010403 30D5 ð« +00010404 0001042C 00010404 30D6 ð„ +0001042C 0001042C 00010404 30D6 ð¬ +00010405 0001042D 00010405 30D7 ð… +0001042D 0001042D 00010405 30D7 ð +00010406 0001042E 00010406 30D8 ð† +0001042E 0001042E 00010406 30D8 ð® +00010407 0001042F 00010407 30D9 ð‡ +0001042F 0001042F 00010407 30D9 ð¯ +INSERT INTO t1 VALUES ('a'); +INSERT INTO t1 VALUES (concat(_utf32 0x61, _utf32 0xFFFF)); +INSERT INTO t1 VALUES (concat(_utf32 0x61, _utf32 0x10FFFF)); +INSERT INTO t1 VALUES (concat(_utf32 0x61, _utf32 0x10400)); +SELECT hex(c), hex(weight_string(c)) FROM t1 WHERE c LIKE 'a%' ORDER BY c; +hex(c) hex(weight_string(c)) +00000061 120F +0000006100010400 120F30D2 +000000610000FFFF 120FFBC1FFFF +000000610010FFFF 120FFBE1FFFF +SELECT hex(c), hex(weight_string(c)), c FROM t1 WHERE c LIKE _utf32 0x10400 ORDER BY c, BINARY c; +hex(c) hex(weight_string(c)) c +00010400 30D2 ð€ +00010428 30D2 ð¨ +SELECT hex(c), hex(weight_string(c)), c FROM t1 WHERE c LIKE _utf32 0x10428 ORDER BY c, BINARY c; +hex(c) hex(weight_string(c)) c +00010400 30D2 ð€ +00010428 30D2 ð¨ +ALTER TABLE t1 ADD KEY(c); +EXPLAIN SELECT hex(c) FROM t1 WHERE c LIKE 'a%' ORDER BY c; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 42 NULL 2 Using where; Using index +SELECT hex(c), hex(weight_string(c)) FROM t1 WHERE c LIKE 'a%' ORDER BY c; +hex(c) hex(weight_string(c)) +00000061 120F +0000006100010400 120F30D2 +000000610000FFFF 120FFBC1FFFF +000000610010FFFF 120FFBE1FFFF +SELECT hex(c), hex(weight_string(c)), c FROM t1 WHERE c LIKE _utf32 0x10400 ORDER BY c, BINARY c; +hex(c) hex(weight_string(c)) c +00010400 30D2 ð€ +00010428 30D2 ð¨ +SELECT hex(c), hex(weight_string(c)), c FROM t1 WHERE c LIKE _utf32 0x10428 ORDER BY c, BINARY c; +hex(c) hex(weight_string(c)) c +00010400 30D2 ð€ +00010428 30D2 ð¨ +DROP TABLE t1; +# +# End of 5.6 tests +# +# +# Start of MariaDB-10.0 tests +# + +# +# MDEV-4929 Myanmar collation +# +SET NAMES utf8; +SET collation_connection=utf32_myanmar_ci; +# +# Start of ctype_myanmar.inc +# +SELECT @@collation_connection; +@@collation_connection +utf32_myanmar_ci +CREATE TABLE t1 AS SELECT 100000 AS id, REPEAT(' ', 64) AS s1 LIMIT 0; +SELECT COLLATION(s1) FROM t1; +COLLATION(s1) +DELETE FROM t1; +ALTER TABLE t1 MODIFY id INT NOT NULL AUTO_INCREMENT PRIMARY KEY; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `s1` varchar(64) CHARACTER SET utf32 COLLATE utf32_myanmar_ci NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 (s1) VALUES +(_ucs2 0x108C), +(_ucs2 0x1037), +(_ucs2 0x1038), +(_ucs2 0x10371038), +('--- Vowels'), +(_ucs2 0x102C), +(_ucs2 0x102B), +(_ucs2 0x1032), +(_ucs2 0x1031102C), +(_ucs2 0x1031102B), +(_ucs2 0x1031102C103A), +(_ucs2 0x1031102B103A), +(_ucs2 0x1034), +(_ucs2 0x1036), +(_ucs2 0x102D102F), +('--- Vowels with finals'), +(_ucs2 0x10001039), +(_ucs2 0x1000103A), +(_ucs2 0x102C10001039), +(_ucs2 0x102C1000103A), +(_ucs2 0x102B10001039), +(_ucs2 0x102B1000103A), +(_ucs2 0x102D10001039), +(_ucs2 0x102D1000103A), +(_ucs2 0x102F10001039), +(_ucs2 0x102F1000103A), +(_ucs2 0x103110001039), +(_ucs2 0x10311000103A), +(_ucs2 0x1031102C10001039), +(_ucs2 0x1031102C1000103A), +(_ucs2 0x1031102B10001039), +(_ucs2 0x1031102B1000103A), +(_ucs2 0x102D102F10001039), +(_ucs2 0x102D102F1000103A), +(_ucs2 0x10011039), +(_ucs2 0x1001103A), +(_ucs2 0x102C10011039), +(_ucs2 0x102C1001103A), +(_ucs2 0x102B10011039), +(_ucs2 0x102B1001103A), +(_ucs2 0x102D10011039), +(_ucs2 0x102D1001103A), +(_ucs2 0x102F10011039), +(_ucs2 0x102F1001103A), +(_ucs2 0x103110011039), +(_ucs2 0x10311001103A), +(_ucs2 0x1031102C10011039), +(_ucs2 0x1031102C1001103A), +(_ucs2 0x1031102B10011039), +(_ucs2 0x1031102B1001103A), +(_ucs2 0x102D102F10011039), +(_ucs2 0x102D102F1001103A), +(_ucs2 0x10021039), +(_ucs2 0x1002103A), +(_ucs2 0x102C10021039), +(_ucs2 0x102C1002103A), +(_ucs2 0x102B10021039), +(_ucs2 0x102B1002103A), +(_ucs2 0x102D10021039), +(_ucs2 0x102D1002103A), +(_ucs2 0x102F10021039), +(_ucs2 0x102F1002103A), +(_ucs2 0x103110021039), +(_ucs2 0x10311002103A), +(_ucs2 0x1031102C10021039), +(_ucs2 0x1031102C1002103A), +(_ucs2 0x1031102B10021039), +(_ucs2 0x1031102B1002103A), +(_ucs2 0x102D102F10021039), +(_ucs2 0x102D102F1002103A), +(_ucs2 0x10031039), +(_ucs2 0x1003103A), +(_ucs2 0x102C10031039), +(_ucs2 0x102C1003103A), +(_ucs2 0x102B10031039), +(_ucs2 0x102B1003103A), +(_ucs2 0x102D10031039), +(_ucs2 0x102D1003103A), +(_ucs2 0x102F10031039), +(_ucs2 0x102F1003103A), +(_ucs2 0x103110031039), +(_ucs2 0x10311003103A), +(_ucs2 0x1031102C10031039), +(_ucs2 0x1031102C1003103A), +(_ucs2 0x1031102B10031039), +(_ucs2 0x1031102B1003103A), +(_ucs2 0x102D102F10031039), +(_ucs2 0x102D102F1003103A), +(_ucs2 0x1004103A1039), +(_ucs2 0x1004103A), +(_ucs2 0x102C1004103A1039), +(_ucs2 0x102C1004103A), +(_ucs2 0x102B1004103A1039), +(_ucs2 0x102B1004103A), +(_ucs2 0x102D1004103A1039), +(_ucs2 0x102D1004103A), +(_ucs2 0x102F1004103A1039), +(_ucs2 0x102F1004103A), +(_ucs2 0x10311004103A1039), +(_ucs2 0x10311004103A), +(_ucs2 0x1031102C1004103A1039), +(_ucs2 0x1031102C1004103A), +(_ucs2 0x1031102B1004103A1039), +(_ucs2 0x1031102B1004103A), +(_ucs2 0x102D102F1004103A1039), +(_ucs2 0x102D102F1004103A), +(_ucs2 0x10051039), +(_ucs2 0x1005103A), +(_ucs2 0x102C10051039), +(_ucs2 0x102C1005103A), +(_ucs2 0x102B10051039), +(_ucs2 0x102B1005103A), +(_ucs2 0x102D10051039), +(_ucs2 0x102D1005103A), +(_ucs2 0x102F10051039), +(_ucs2 0x102F1005103A), +(_ucs2 0x103110051039), +(_ucs2 0x10311005103A), +(_ucs2 0x1031102C10051039), +(_ucs2 0x1031102C1005103A), +(_ucs2 0x1031102B10051039), +(_ucs2 0x1031102B1005103A), +(_ucs2 0x102D102F10051039), +(_ucs2 0x102D102F1005103A), +(_ucs2 0x10061039), +(_ucs2 0x1006103A), +(_ucs2 0x102C10061039), +(_ucs2 0x102C1006103A), +(_ucs2 0x102B10061039), +(_ucs2 0x102B1006103A), +(_ucs2 0x102D10061039), +(_ucs2 0x102D1006103A), +(_ucs2 0x102F10061039), +(_ucs2 0x102F1006103A), +(_ucs2 0x103110061039), +(_ucs2 0x10311006103A), +(_ucs2 0x1031102C10061039), +(_ucs2 0x1031102C1006103A), +(_ucs2 0x1031102B10061039), +(_ucs2 0x1031102B1006103A), +(_ucs2 0x102D102F10061039), +(_ucs2 0x102D102F1006103A), +(_ucs2 0x10071039), +(_ucs2 0x1007103A), +(_ucs2 0x102C10071039), +(_ucs2 0x102C1007103A), +(_ucs2 0x102B10071039), +(_ucs2 0x102B1007103A), +(_ucs2 0x102D10071039), +(_ucs2 0x102D1007103A), +(_ucs2 0x102F10071039), +(_ucs2 0x102F1007103A), +(_ucs2 0x103110071039), +(_ucs2 0x10311007103A), +(_ucs2 0x1031102C10071039), +(_ucs2 0x1031102C1007103A), +(_ucs2 0x1031102B10071039), +(_ucs2 0x1031102B1007103A), +(_ucs2 0x102D102F10071039), +(_ucs2 0x102D102F1007103A), +(_ucs2 0x1008103A), +(_ucs2 0x102C1008103A), +(_ucs2 0x102B1008103A), +(_ucs2 0x102D1008103A), +(_ucs2 0x102F1008103A), +(_ucs2 0x10311008103A), +(_ucs2 0x1031102C1008103A), +(_ucs2 0x1031102B1008103A), +(_ucs2 0x102D102F1008103A), +(_ucs2 0x10091039), +(_ucs2 0x1009103A), +(_ucs2 0x102C10091039), +(_ucs2 0x102C1009103A), +(_ucs2 0x102B10091039), +(_ucs2 0x102B1009103A), +(_ucs2 0x102D10091039), +(_ucs2 0x102D1009103A), +(_ucs2 0x102F10091039), +(_ucs2 0x102F1009103A), +(_ucs2 0x103110091039), +(_ucs2 0x10311009103A), +(_ucs2 0x1031102C10091039), +(_ucs2 0x1031102C1009103A), +(_ucs2 0x1031102B10091039), +(_ucs2 0x1031102B1009103A), +(_ucs2 0x102D102F10091039), +(_ucs2 0x102D102F1009103A), +(_ucs2 0x100A1039), +(_ucs2 0x100A103A), +(_ucs2 0x102C100A1039), +(_ucs2 0x102C100A103A), +(_ucs2 0x102B100A1039), +(_ucs2 0x102B100A103A), +(_ucs2 0x102D100A1039), +(_ucs2 0x102D100A103A), +(_ucs2 0x102F100A1039), +(_ucs2 0x102F100A103A), +(_ucs2 0x1031100A1039), +(_ucs2 0x1031100A103A), +(_ucs2 0x1031102C100A1039), +(_ucs2 0x1031102C100A103A), +(_ucs2 0x1031102B100A1039), +(_ucs2 0x1031102B100A103A), +(_ucs2 0x102D102F100A1039), +(_ucs2 0x102D102F100A103A), +(_ucs2 0x100B1039), +(_ucs2 0x100B103A), +(_ucs2 0x102C100B1039), +(_ucs2 0x102C100B103A), +(_ucs2 0x102B100B1039), +(_ucs2 0x102B100B103A), +(_ucs2 0x102D100B1039), +(_ucs2 0x102D100B103A), +(_ucs2 0x102F100B1039), +(_ucs2 0x102F100B103A), +(_ucs2 0x1031100B1039), +(_ucs2 0x1031100B103A), +(_ucs2 0x1031102C100B1039), +(_ucs2 0x1031102C100B103A), +(_ucs2 0x1031102B100B1039), +(_ucs2 0x1031102B100B103A), +(_ucs2 0x102D102F100B1039), +(_ucs2 0x102D102F100B103A), +(_ucs2 0x100C1039), +(_ucs2 0x100C103A), +(_ucs2 0x102C100C1039), +(_ucs2 0x102C100C103A), +(_ucs2 0x102B100C1039), +(_ucs2 0x102B100C103A), +(_ucs2 0x102D100C1039), +(_ucs2 0x102D100C103A), +(_ucs2 0x102F100C1039), +(_ucs2 0x102F100C103A), +(_ucs2 0x1031100C1039), +(_ucs2 0x1031100C103A), +(_ucs2 0x1031102C100C1039), +(_ucs2 0x1031102C100C103A), +(_ucs2 0x1031102B100C1039), +(_ucs2 0x1031102B100C103A), +(_ucs2 0x102D102F100C1039), +(_ucs2 0x102D102F100C103A), +(_ucs2 0x100D1039), +(_ucs2 0x100D103A), +(_ucs2 0x102C100D1039), +(_ucs2 0x102C100D103A), +(_ucs2 0x102B100D1039), +(_ucs2 0x102B100D103A), +(_ucs2 0x102D100D1039), +(_ucs2 0x102D100D103A), +(_ucs2 0x102F100D1039), +(_ucs2 0x102F100D103A), +(_ucs2 0x1031100D1039), +(_ucs2 0x1031100D103A), +(_ucs2 0x1031102C100D1039), +(_ucs2 0x1031102C100D103A), +(_ucs2 0x1031102B100D1039), +(_ucs2 0x1031102B100D103A), +(_ucs2 0x102D102F100D1039), +(_ucs2 0x102D102F100D103A), +(_ucs2 0x100E1039), +(_ucs2 0x100E103A), +(_ucs2 0x102C100E1039), +(_ucs2 0x102C100E103A), +(_ucs2 0x102B100E1039), +(_ucs2 0x102B100E103A), +(_ucs2 0x102D100E1039), +(_ucs2 0x102D100E103A), +(_ucs2 0x102F100E1039), +(_ucs2 0x102F100E103A), +(_ucs2 0x1031100E1039), +(_ucs2 0x1031100E103A), +(_ucs2 0x1031102C100E1039), +(_ucs2 0x1031102C100E103A), +(_ucs2 0x1031102B100E1039), +(_ucs2 0x1031102B100E103A), +(_ucs2 0x102D102F100E1039), +(_ucs2 0x102D102F100E103A), +(_ucs2 0x100F1039), +(_ucs2 0x100F103A), +(_ucs2 0x102C100F1039), +(_ucs2 0x102C100F103A), +(_ucs2 0x102B100F1039), +(_ucs2 0x102B100F103A), +(_ucs2 0x102D100F1039), +(_ucs2 0x102D100F103A), +(_ucs2 0x102F100F1039), +(_ucs2 0x102F100F103A), +(_ucs2 0x1031100F1039), +(_ucs2 0x1031100F103A), +(_ucs2 0x1031102C100F1039), +(_ucs2 0x1031102C100F103A), +(_ucs2 0x1031102B100F1039), +(_ucs2 0x1031102B100F103A), +(_ucs2 0x102D102F100F1039), +(_ucs2 0x102D102F100F103A), +(_ucs2 0x10101039), +(_ucs2 0x1010103A), +(_ucs2 0x102C10101039), +(_ucs2 0x102C1010103A), +(_ucs2 0x102B10101039), +(_ucs2 0x102B1010103A), +(_ucs2 0x102D10101039), +(_ucs2 0x102D1010103A), +(_ucs2 0x102F10101039), +(_ucs2 0x102F1010103A), +(_ucs2 0x103110101039), +(_ucs2 0x10311010103A), +(_ucs2 0x1031102C10101039), +(_ucs2 0x1031102C1010103A), +(_ucs2 0x1031102B10101039), +(_ucs2 0x1031102B1010103A), +(_ucs2 0x102D102F10101039), +(_ucs2 0x102D102F1010103A), +(_ucs2 0x10111039), +(_ucs2 0x1011103A), +(_ucs2 0x102C10111039), +(_ucs2 0x102C1011103A), +(_ucs2 0x102B10111039), +(_ucs2 0x102B1011103A), +(_ucs2 0x102D10111039), +(_ucs2 0x102D1011103A), +(_ucs2 0x102F10111039), +(_ucs2 0x102F1011103A), +(_ucs2 0x103110111039), +(_ucs2 0x10311011103A), +(_ucs2 0x1031102C10111039), +(_ucs2 0x1031102C1011103A), +(_ucs2 0x1031102B10111039), +(_ucs2 0x1031102B1011103A), +(_ucs2 0x102D102F10111039), +(_ucs2 0x102D102F1011103A), +(_ucs2 0x10121039), +(_ucs2 0x1012103A), +(_ucs2 0x102C10121039), +(_ucs2 0x102C1012103A), +(_ucs2 0x102B10121039), +(_ucs2 0x102B1012103A), +(_ucs2 0x102D10121039), +(_ucs2 0x102D1012103A), +(_ucs2 0x102F10121039), +(_ucs2 0x102F1012103A), +(_ucs2 0x103110121039), +(_ucs2 0x10311012103A), +(_ucs2 0x1031102C10121039), +(_ucs2 0x1031102C1012103A), +(_ucs2 0x1031102B10121039), +(_ucs2 0x1031102B1012103A), +(_ucs2 0x102D102F10121039), +(_ucs2 0x102D102F1012103A), +(_ucs2 0x10131039), +(_ucs2 0x1013103A), +(_ucs2 0x102C10131039), +(_ucs2 0x102C1013103A), +(_ucs2 0x102B10131039), +(_ucs2 0x102B1013103A), +(_ucs2 0x102D10131039), +(_ucs2 0x102D1013103A), +(_ucs2 0x102F10131039), +(_ucs2 0x102F1013103A), +(_ucs2 0x103110131039), +(_ucs2 0x10311013103A), +(_ucs2 0x1031102C10131039), +(_ucs2 0x1031102C1013103A), +(_ucs2 0x1031102B10131039), +(_ucs2 0x1031102B1013103A), +(_ucs2 0x102D102F10131039), +(_ucs2 0x102D102F1013103A), +(_ucs2 0x10141039), +(_ucs2 0x1014103A), +(_ucs2 0x102C10141039), +(_ucs2 0x102C1014103A), +(_ucs2 0x102B10141039), +(_ucs2 0x102B1014103A), +(_ucs2 0x102D10141039), +(_ucs2 0x102D1014103A), +(_ucs2 0x102F10141039), +(_ucs2 0x102F1014103A), +(_ucs2 0x103110141039), +(_ucs2 0x10311014103A), +(_ucs2 0x1031102C10141039), +(_ucs2 0x1031102C1014103A), +(_ucs2 0x1031102B10141039), +(_ucs2 0x1031102B1014103A), +(_ucs2 0x102D102F10141039), +(_ucs2 0x102D102F1014103A), +(_ucs2 0x10151039), +(_ucs2 0x1015103A), +(_ucs2 0x102C10151039), +(_ucs2 0x102C1015103A), +(_ucs2 0x102B10151039), +(_ucs2 0x102B1015103A), +(_ucs2 0x102D10151039), +(_ucs2 0x102D1015103A), +(_ucs2 0x102F10151039), +(_ucs2 0x102F1015103A), +(_ucs2 0x103110151039), +(_ucs2 0x10311015103A), +(_ucs2 0x1031102C10151039), +(_ucs2 0x1031102C1015103A), +(_ucs2 0x1031102B10151039), +(_ucs2 0x1031102B1015103A), +(_ucs2 0x102D102F10151039), +(_ucs2 0x102D102F1015103A), +(_ucs2 0x10161039), +(_ucs2 0x1016103A), +(_ucs2 0x102C10161039), +(_ucs2 0x102C1016103A), +(_ucs2 0x102B10161039), +(_ucs2 0x102B1016103A), +(_ucs2 0x102D10161039), +(_ucs2 0x102D1016103A), +(_ucs2 0x102F10161039), +(_ucs2 0x102F1016103A), +(_ucs2 0x103110161039), +(_ucs2 0x10311016103A), +(_ucs2 0x1031102C10161039), +(_ucs2 0x1031102C1016103A), +(_ucs2 0x1031102B10161039), +(_ucs2 0x1031102B1016103A), +(_ucs2 0x102D102F10161039), +(_ucs2 0x102D102F1016103A), +(_ucs2 0x10171039), +(_ucs2 0x1017103A), +(_ucs2 0x102C10171039), +(_ucs2 0x102C1017103A), +(_ucs2 0x102B10171039), +(_ucs2 0x102B1017103A), +(_ucs2 0x102D10171039), +(_ucs2 0x102D1017103A), +(_ucs2 0x102F10171039), +(_ucs2 0x102F1017103A), +(_ucs2 0x103110171039), +(_ucs2 0x10311017103A), +(_ucs2 0x1031102C10171039), +(_ucs2 0x1031102C1017103A), +(_ucs2 0x1031102B10171039), +(_ucs2 0x1031102B1017103A), +(_ucs2 0x102D102F10171039), +(_ucs2 0x102D102F1017103A), +(_ucs2 0x10181039), +(_ucs2 0x1018103A), +(_ucs2 0x102C10181039), +(_ucs2 0x102C1018103A), +(_ucs2 0x102B10181039), +(_ucs2 0x102B1018103A), +(_ucs2 0x102D10181039), +(_ucs2 0x102D1018103A), +(_ucs2 0x102F10181039), +(_ucs2 0x102F1018103A), +(_ucs2 0x103110181039), +(_ucs2 0x10311018103A), +(_ucs2 0x1031102C10181039), +(_ucs2 0x1031102C1018103A), +(_ucs2 0x1031102B10181039), +(_ucs2 0x1031102B1018103A), +(_ucs2 0x102D102F10181039), +(_ucs2 0x102D102F1018103A), +(_ucs2 0x10191039), +(_ucs2 0x1019103A), +(_ucs2 0x102C10191039), +(_ucs2 0x102C1019103A), +(_ucs2 0x102B10191039), +(_ucs2 0x102B1019103A), +(_ucs2 0x102D10191039), +(_ucs2 0x102D1019103A), +(_ucs2 0x102F10191039), +(_ucs2 0x102F1019103A), +(_ucs2 0x103110191039), +(_ucs2 0x10311019103A), +(_ucs2 0x1031102C10191039), +(_ucs2 0x1031102C1019103A), +(_ucs2 0x1031102B10191039), +(_ucs2 0x1031102B1019103A), +(_ucs2 0x102D102F10191039), +(_ucs2 0x102D102F1019103A), +(_ucs2 0x101A1039), +(_ucs2 0x101A103A), +(_ucs2 0x102C101A1039), +(_ucs2 0x102C101A103A), +(_ucs2 0x102B101A1039), +(_ucs2 0x102B101A103A), +(_ucs2 0x102D101A1039), +(_ucs2 0x102D101A103A), +(_ucs2 0x102F101A1039), +(_ucs2 0x102F101A103A), +(_ucs2 0x1031101A1039), +(_ucs2 0x1031101A103A), +(_ucs2 0x1031102C101A1039), +(_ucs2 0x1031102C101A103A), +(_ucs2 0x1031102B101A1039), +(_ucs2 0x1031102B101A103A), +(_ucs2 0x102D102F101A1039), +(_ucs2 0x102D102F101A103A), +(_ucs2 0x101B1039), +(_ucs2 0x101B103A), +(_ucs2 0x102C101B1039), +(_ucs2 0x102C101B103A), +(_ucs2 0x102B101B1039), +(_ucs2 0x102B101B103A), +(_ucs2 0x102D101B1039), +(_ucs2 0x102D101B103A), +(_ucs2 0x102F101B1039), +(_ucs2 0x102F101B103A), +(_ucs2 0x1031101B1039), +(_ucs2 0x1031101B103A), +(_ucs2 0x1031102C101B1039), +(_ucs2 0x1031102C101B103A), +(_ucs2 0x1031102B101B1039), +(_ucs2 0x1031102B101B103A), +(_ucs2 0x102D102F101B1039), +(_ucs2 0x102D102F101B103A), +(_ucs2 0x101C1039), +(_ucs2 0x101C103A), +(_ucs2 0x102C101C1039), +(_ucs2 0x102C101C103A), +(_ucs2 0x102B101C1039), +(_ucs2 0x102B101C103A), +(_ucs2 0x102D101C1039), +(_ucs2 0x102D101C103A), +(_ucs2 0x102F101C1039), +(_ucs2 0x102F101C103A), +(_ucs2 0x1031101C1039), +(_ucs2 0x1031101C103A), +(_ucs2 0x1031102C101C1039), +(_ucs2 0x1031102C101C103A), +(_ucs2 0x1031102B101C1039), +(_ucs2 0x1031102B101C103A), +(_ucs2 0x102D102F101C1039), +(_ucs2 0x102D102F101C103A), +(_ucs2 0x101D103A), +(_ucs2 0x102C101D103A), +(_ucs2 0x102B101D103A), +(_ucs2 0x102D101D103A), +(_ucs2 0x102F101D103A), +(_ucs2 0x1031101D103A), +(_ucs2 0x1031102C101D103A), +(_ucs2 0x1031102B101D103A), +(_ucs2 0x102D102F101D103A), +(_ucs2 0x101E1039), +(_ucs2 0x101E103A), +(_ucs2 0x102C101E1039), +(_ucs2 0x102C101E103A), +(_ucs2 0x102B101E1039), +(_ucs2 0x102B101E103A), +(_ucs2 0x102D101E1039), +(_ucs2 0x102D101E103A), +(_ucs2 0x102F101E1039), +(_ucs2 0x102F101E103A), +(_ucs2 0x1031101E1039), +(_ucs2 0x1031101E103A), +(_ucs2 0x1031102C101E1039), +(_ucs2 0x1031102C101E103A), +(_ucs2 0x1031102B101E1039), +(_ucs2 0x1031102B101E103A), +(_ucs2 0x102D102F101E1039), +(_ucs2 0x102D102F101E103A), +(_ucs2 0x101F1039), +(_ucs2 0x101F103A), +(_ucs2 0x102C101F1039), +(_ucs2 0x102C101F103A), +(_ucs2 0x102B101F1039), +(_ucs2 0x102B101F103A), +(_ucs2 0x102D101F1039), +(_ucs2 0x102D101F103A), +(_ucs2 0x102F101F1039), +(_ucs2 0x102F101F103A), +(_ucs2 0x1031101F1039), +(_ucs2 0x1031101F103A), +(_ucs2 0x1031102C101F1039), +(_ucs2 0x1031102C101F103A), +(_ucs2 0x1031102B101F1039), +(_ucs2 0x1031102B101F103A), +(_ucs2 0x102D102F101F1039), +(_ucs2 0x102D102F101F103A), +(_ucs2 0x1020103A), +(_ucs2 0x102C1020103A), +(_ucs2 0x102B1020103A), +(_ucs2 0x102D1020103A), +(_ucs2 0x102F1020103A), +(_ucs2 0x10311020103A), +(_ucs2 0x1031102C1020103A), +(_ucs2 0x1031102B1020103A), +(_ucs2 0x102D102F1020103A), +(_ucs2 0x1021103A), +(_ucs2 0x102C1021103A), +(_ucs2 0x102B1021103A), +(_ucs2 0x102D1021103A), +(_ucs2 0x102F1021103A), +(_ucs2 0x10311021103A), +(_ucs2 0x1031102C1021103A), +(_ucs2 0x1031102B1021103A), +(_ucs2 0x102D102F1021103A), +('--- Medials'), +(_ucs2 0x105E), +(_ucs2 0x105F), +(_ucs2 0x103B), +(_ucs2 0x103C), +(_ucs2 0x1060), +(_ucs2 0x103D), +(_ucs2 0x1082), +(_ucs2 0x103E), +(_ucs2 0x103B103D), +(_ucs2 0x103C103D), +(_ucs2 0x103B103E), +(_ucs2 0x103C103E), +(_ucs2 0x103D103E), +(_ucs2 0x103B103D103E), +(_ucs2 0x103C103D103E), +('--- Independent vowels'), +(_ucs2 0x1021102D), +(_ucs2 0x1023), +(_ucs2 0x1021102E), +(_ucs2 0x1024), +(_ucs2 0x1021102F), +(_ucs2 0x1025), +(_ucs2 0x10211030), +(_ucs2 0x1026), +(_ucs2 0x10211031), +(_ucs2 0x1027), +(_ucs2 0x1028), +(_ucs2 0x10211031102C), +(_ucs2 0x1029), +(_ucs2 0x10211031102C103A), +(_ucs2 0x102A), +(_ucs2 0x102D1019103A), +(_ucs2 0x102D1036), +(_ucs2 0x102D1019103A1037), +(_ucs2 0x102D10361037), +(_ucs2 0x102D1019103A1038), +(_ucs2 0x102D10361038), +(_ucs2 0x102F1019103A), +(_ucs2 0x102F1036), +(_ucs2 0x102F1019103A1037), +(_ucs2 0x102F10361037), +(_ucs2 0x102F1019103A1038), +(_ucs2 0x102F10361038), +(_ucs2 0x1021102F1036), +(_ucs2 0x1025102F1036), +('--- Independent vowels with finals'), +(_ucs2 0x1021102D10001039), +(_ucs2 0x102310001039), +(_ucs2 0x1021102D1000103A), +(_ucs2 0x10231000103A), +(_ucs2 0x1021102F10001039), +(_ucs2 0x102510001039), +(_ucs2 0x1021102F1000103A), +(_ucs2 0x10251000103A), +(_ucs2 0x1021103110001039), +(_ucs2 0x102710001039), +(_ucs2 0x102110311000103A), +(_ucs2 0x10271000103A), +(_ucs2 0x10211031102C10001039), +(_ucs2 0x102910001039), +(_ucs2 0x10211031102C1000103A), +(_ucs2 0x10291000103A), +(_ucs2 0x10211031102C10001039), +(_ucs2 0x10291031102C10001039), +(_ucs2 0x10211031102C1000103A), +(_ucs2 0x10291031102C1000103A), +(_ucs2 0x1021102D10011039), +(_ucs2 0x102310011039), +(_ucs2 0x1021102D1001103A), +(_ucs2 0x10231001103A), +(_ucs2 0x1021102F10011039), +(_ucs2 0x102510011039), +(_ucs2 0x1021102F1001103A), +(_ucs2 0x10251001103A), +(_ucs2 0x1021103110011039), +(_ucs2 0x102710011039), +(_ucs2 0x102110311001103A), +(_ucs2 0x10271001103A), +(_ucs2 0x10211031102C10011039), +(_ucs2 0x102910011039), +(_ucs2 0x10211031102C1001103A), +(_ucs2 0x10291001103A), +(_ucs2 0x10211031102C10011039), +(_ucs2 0x10291031102C10011039), +(_ucs2 0x10211031102C1001103A), +(_ucs2 0x10291031102C1001103A), +(_ucs2 0x1021102D10021039), +(_ucs2 0x102310021039), +(_ucs2 0x1021102D1002103A), +(_ucs2 0x10231002103A), +(_ucs2 0x1021102F10021039), +(_ucs2 0x102510021039), +(_ucs2 0x1021102F1002103A), +(_ucs2 0x10251002103A), +(_ucs2 0x1021103110021039), +(_ucs2 0x102710021039), +(_ucs2 0x102110311002103A), +(_ucs2 0x10271002103A), +(_ucs2 0x10211031102C10021039), +(_ucs2 0x102910021039), +(_ucs2 0x10211031102C1002103A), +(_ucs2 0x10291002103A), +(_ucs2 0x10211031102C10021039), +(_ucs2 0x10291031102C10021039), +(_ucs2 0x10211031102C1002103A), +(_ucs2 0x10291031102C1002103A), +(_ucs2 0x1021102D10031039), +(_ucs2 0x102310031039), +(_ucs2 0x1021102D1003103A), +(_ucs2 0x10231003103A), +(_ucs2 0x1021102F10031039), +(_ucs2 0x102510031039), +(_ucs2 0x1021102F1003103A), +(_ucs2 0x10251003103A), +(_ucs2 0x1021103110031039), +(_ucs2 0x102710031039), +(_ucs2 0x102110311003103A), +(_ucs2 0x10271003103A), +(_ucs2 0x10211031102C10031039), +(_ucs2 0x102910031039), +(_ucs2 0x10211031102C1003103A), +(_ucs2 0x10291003103A), +(_ucs2 0x10211031102C10031039), +(_ucs2 0x10291031102C10031039), +(_ucs2 0x10211031102C1003103A), +(_ucs2 0x10291031102C1003103A), +(_ucs2 0x1021102D10041039), +(_ucs2 0x102310041039), +(_ucs2 0x1021102D1004103A), +(_ucs2 0x10231004103A), +(_ucs2 0x1021102F10041039), +(_ucs2 0x102510041039), +(_ucs2 0x1021102F1004103A), +(_ucs2 0x10251004103A), +(_ucs2 0x1021103110041039), +(_ucs2 0x102710041039), +(_ucs2 0x102110311004103A), +(_ucs2 0x10271004103A), +(_ucs2 0x10211031102C10041039), +(_ucs2 0x102910041039), +(_ucs2 0x10211031102C1004103A), +(_ucs2 0x10291004103A), +(_ucs2 0x10211031102C10041039), +(_ucs2 0x10291031102C10041039), +(_ucs2 0x10211031102C1004103A), +(_ucs2 0x10291031102C1004103A), +(_ucs2 0x1021102D10051039), +(_ucs2 0x102310051039), +(_ucs2 0x1021102D1005103A), +(_ucs2 0x10231005103A), +(_ucs2 0x1021102F10051039), +(_ucs2 0x102510051039), +(_ucs2 0x1021102F1005103A), +(_ucs2 0x10251005103A), +(_ucs2 0x1021103110051039), +(_ucs2 0x102710051039), +(_ucs2 0x102110311005103A), +(_ucs2 0x10271005103A), +(_ucs2 0x10211031102C10051039), +(_ucs2 0x102910051039), +(_ucs2 0x10211031102C1005103A), +(_ucs2 0x10291005103A), +(_ucs2 0x10211031102C10051039), +(_ucs2 0x10291031102C10051039), +(_ucs2 0x10211031102C1005103A), +(_ucs2 0x10291031102C1005103A), +(_ucs2 0x1021102D10061039), +(_ucs2 0x102310061039), +(_ucs2 0x1021102D1006103A), +(_ucs2 0x10231006103A), +(_ucs2 0x1021102F10061039), +(_ucs2 0x102510061039), +(_ucs2 0x1021102F1006103A), +(_ucs2 0x10251006103A), +(_ucs2 0x1021103110061039), +(_ucs2 0x102710061039), +(_ucs2 0x102110311006103A), +(_ucs2 0x10271006103A), +(_ucs2 0x10211031102C10061039), +(_ucs2 0x102910061039), +(_ucs2 0x10211031102C1006103A), +(_ucs2 0x10291006103A), +(_ucs2 0x10211031102C10061039), +(_ucs2 0x10291031102C10061039), +(_ucs2 0x10211031102C1006103A), +(_ucs2 0x10291031102C1006103A), +(_ucs2 0x1021102D10071039), +(_ucs2 0x102310071039), +(_ucs2 0x1021102D1007103A), +(_ucs2 0x10231007103A), +(_ucs2 0x1021102F10071039), +(_ucs2 0x102510071039), +(_ucs2 0x1021102F1007103A), +(_ucs2 0x10251007103A), +(_ucs2 0x1021103110071039), +(_ucs2 0x102710071039), +(_ucs2 0x102110311007103A), +(_ucs2 0x10271007103A), +(_ucs2 0x10211031102C10071039), +(_ucs2 0x102910071039), +(_ucs2 0x10211031102C1007103A), +(_ucs2 0x10291007103A), +(_ucs2 0x10211031102C10071039), +(_ucs2 0x10291031102C10071039), +(_ucs2 0x10211031102C1007103A), +(_ucs2 0x10291031102C1007103A), +(_ucs2 0x1021102D10091039), +(_ucs2 0x102310091039), +(_ucs2 0x1021102D1009103A), +(_ucs2 0x10231009103A), +(_ucs2 0x1021102F10091039), +(_ucs2 0x102510091039), +(_ucs2 0x1021102F1009103A), +(_ucs2 0x10251009103A), +(_ucs2 0x1021103110091039), +(_ucs2 0x102710091039), +(_ucs2 0x102110311009103A), +(_ucs2 0x10271009103A), +(_ucs2 0x10211031102C10091039), +(_ucs2 0x102910091039), +(_ucs2 0x10211031102C1009103A), +(_ucs2 0x10291009103A), +(_ucs2 0x10211031102C10091039), +(_ucs2 0x10291031102C10091039), +(_ucs2 0x10211031102C1009103A), +(_ucs2 0x10291031102C1009103A), +(_ucs2 0x1021102D100A1039), +(_ucs2 0x1023100A1039), +(_ucs2 0x1021102D100A103A), +(_ucs2 0x1023100A103A), +(_ucs2 0x1021102F100A1039), +(_ucs2 0x1025100A1039), +(_ucs2 0x1021102F100A103A), +(_ucs2 0x1025100A103A), +(_ucs2 0x10211031100A1039), +(_ucs2 0x1027100A1039), +(_ucs2 0x10211031100A103A), +(_ucs2 0x1027100A103A), +(_ucs2 0x10211031102C100A1039), +(_ucs2 0x1029100A1039), +(_ucs2 0x10211031102C100A103A), +(_ucs2 0x1029100A103A), +(_ucs2 0x10211031102C100A1039), +(_ucs2 0x10291031102C100A1039), +(_ucs2 0x10211031102C100A103A), +(_ucs2 0x10291031102C100A103A), +(_ucs2 0x1021102D100B1039), +(_ucs2 0x1023100B1039), +(_ucs2 0x1021102D100B103A), +(_ucs2 0x1023100B103A), +(_ucs2 0x1021102F100B1039), +(_ucs2 0x1025100B1039), +(_ucs2 0x1021102F100B103A), +(_ucs2 0x1025100B103A), +(_ucs2 0x10211031100B1039), +(_ucs2 0x1027100B1039), +(_ucs2 0x10211031100B103A), +(_ucs2 0x1027100B103A), +(_ucs2 0x10211031102C100B1039), +(_ucs2 0x1029100B1039), +(_ucs2 0x10211031102C100B103A), +(_ucs2 0x1029100B103A), +(_ucs2 0x10211031102C100B1039), +(_ucs2 0x10291031102C100B1039), +(_ucs2 0x10211031102C100B103A), +(_ucs2 0x10291031102C100B103A), +(_ucs2 0x1021102D100C1039), +(_ucs2 0x1023100C1039), +(_ucs2 0x1021102D100C103A), +(_ucs2 0x1023100C103A), +(_ucs2 0x1021102F100C1039), +(_ucs2 0x1025100C1039), +(_ucs2 0x1021102F100C103A), +(_ucs2 0x1025100C103A), +(_ucs2 0x10211031100C1039), +(_ucs2 0x1027100C1039), +(_ucs2 0x10211031100C103A), +(_ucs2 0x1027100C103A), +(_ucs2 0x10211031102C100C1039), +(_ucs2 0x1029100C1039), +(_ucs2 0x10211031102C100C103A), +(_ucs2 0x1029100C103A), +(_ucs2 0x10211031102C100C1039), +(_ucs2 0x10291031102C100C1039), +(_ucs2 0x10211031102C100C103A), +(_ucs2 0x10291031102C100C103A), +(_ucs2 0x1021102D100D1039), +(_ucs2 0x1023100D1039), +(_ucs2 0x1021102D100D103A), +(_ucs2 0x1023100D103A), +(_ucs2 0x1021102F100D1039), +(_ucs2 0x1025100D1039), +(_ucs2 0x1021102F100D103A), +(_ucs2 0x1025100D103A), +(_ucs2 0x10211031100D1039), +(_ucs2 0x1027100D1039), +(_ucs2 0x10211031100D103A), +(_ucs2 0x1027100D103A), +(_ucs2 0x10211031102C100D1039), +(_ucs2 0x1029100D1039), +(_ucs2 0x10211031102C100D103A), +(_ucs2 0x1029100D103A), +(_ucs2 0x10211031102C100D1039), +(_ucs2 0x10291031102C100D1039), +(_ucs2 0x10211031102C100D103A), +(_ucs2 0x10291031102C100D103A), +(_ucs2 0x1021102D100E1039), +(_ucs2 0x1023100E1039), +(_ucs2 0x1021102D100E103A), +(_ucs2 0x1023100E103A), +(_ucs2 0x1021102F100E1039), +(_ucs2 0x1025100E1039), +(_ucs2 0x1021102F100E103A), +(_ucs2 0x1025100E103A), +(_ucs2 0x10211031100E1039), +(_ucs2 0x1027100E1039), +(_ucs2 0x10211031100E103A), +(_ucs2 0x1027100E103A), +(_ucs2 0x10211031102C100E1039), +(_ucs2 0x1029100E1039), +(_ucs2 0x10211031102C100E103A), +(_ucs2 0x1029100E103A), +(_ucs2 0x10211031102C100E1039), +(_ucs2 0x10291031102C100E1039), +(_ucs2 0x10211031102C100E103A), +(_ucs2 0x10291031102C100E103A), +(_ucs2 0x1021102D100F1039), +(_ucs2 0x1023100F1039), +(_ucs2 0x1021102D100F103A), +(_ucs2 0x1023100F103A), +(_ucs2 0x1021102F100F1039), +(_ucs2 0x1025100F1039), +(_ucs2 0x1021102F100F103A), +(_ucs2 0x1025100F103A), +(_ucs2 0x10211031100F1039), +(_ucs2 0x1027100F1039), +(_ucs2 0x10211031100F103A), +(_ucs2 0x1027100F103A), +(_ucs2 0x10211031102C100F1039), +(_ucs2 0x1029100F1039), +(_ucs2 0x10211031102C100F103A), +(_ucs2 0x1029100F103A), +(_ucs2 0x10211031102C100F1039), +(_ucs2 0x10291031102C100F1039), +(_ucs2 0x10211031102C100F103A), +(_ucs2 0x10291031102C100F103A), +(_ucs2 0x1021102D10101039), +(_ucs2 0x102310101039), +(_ucs2 0x1021102D1010103A), +(_ucs2 0x10231010103A), +(_ucs2 0x1021102F10101039), +(_ucs2 0x102510101039), +(_ucs2 0x1021102F1010103A), +(_ucs2 0x10251010103A), +(_ucs2 0x1021103110101039), +(_ucs2 0x102710101039), +(_ucs2 0x102110311010103A), +(_ucs2 0x10271010103A), +(_ucs2 0x10211031102C10101039), +(_ucs2 0x102910101039), +(_ucs2 0x10211031102C1010103A), +(_ucs2 0x10291010103A), +(_ucs2 0x10211031102C10101039), +(_ucs2 0x10291031102C10101039), +(_ucs2 0x10211031102C1010103A), +(_ucs2 0x10291031102C1010103A), +(_ucs2 0x1021102D10111039), +(_ucs2 0x102310111039), +(_ucs2 0x1021102D1011103A), +(_ucs2 0x10231011103A), +(_ucs2 0x1021102F10111039), +(_ucs2 0x102510111039), +(_ucs2 0x1021102F1011103A), +(_ucs2 0x10251011103A), +(_ucs2 0x1021103110111039), +(_ucs2 0x102710111039), +(_ucs2 0x102110311011103A), +(_ucs2 0x10271011103A), +(_ucs2 0x10211031102C10111039), +(_ucs2 0x102910111039), +(_ucs2 0x10211031102C1011103A), +(_ucs2 0x10291011103A), +(_ucs2 0x10211031102C10111039), +(_ucs2 0x10291031102C10111039), +(_ucs2 0x10211031102C1011103A), +(_ucs2 0x10291031102C1011103A), +(_ucs2 0x1021102D10121039), +(_ucs2 0x102310121039), +(_ucs2 0x1021102D1012103A), +(_ucs2 0x10231012103A), +(_ucs2 0x1021102F10121039), +(_ucs2 0x102510121039), +(_ucs2 0x1021102F1012103A), +(_ucs2 0x10251012103A), +(_ucs2 0x1021103110121039), +(_ucs2 0x102710121039), +(_ucs2 0x102110311012103A), +(_ucs2 0x10271012103A), +(_ucs2 0x10211031102C10121039), +(_ucs2 0x102910121039), +(_ucs2 0x10211031102C1012103A), +(_ucs2 0x10291012103A), +(_ucs2 0x10211031102C10121039), +(_ucs2 0x10291031102C10121039), +(_ucs2 0x10211031102C1012103A), +(_ucs2 0x10291031102C1012103A), +(_ucs2 0x1021102D10131039), +(_ucs2 0x102310131039), +(_ucs2 0x1021102D1013103A), +(_ucs2 0x10231013103A), +(_ucs2 0x1021102F10131039), +(_ucs2 0x102510131039), +(_ucs2 0x1021102F1013103A), +(_ucs2 0x10251013103A), +(_ucs2 0x1021103110131039), +(_ucs2 0x102710131039), +(_ucs2 0x102110311013103A), +(_ucs2 0x10271013103A), +(_ucs2 0x10211031102C10131039), +(_ucs2 0x102910131039), +(_ucs2 0x10211031102C1013103A), +(_ucs2 0x10291013103A), +(_ucs2 0x10211031102C10131039), +(_ucs2 0x10291031102C10131039), +(_ucs2 0x10211031102C1013103A), +(_ucs2 0x10291031102C1013103A), +(_ucs2 0x1021102D10141039), +(_ucs2 0x102310141039), +(_ucs2 0x1021102D1014103A), +(_ucs2 0x10231014103A), +(_ucs2 0x1021102F10141039), +(_ucs2 0x102510141039), +(_ucs2 0x1021102F1014103A), +(_ucs2 0x10251014103A), +(_ucs2 0x1021103110141039), +(_ucs2 0x102710141039), +(_ucs2 0x102110311014103A), +(_ucs2 0x10271014103A), +(_ucs2 0x10211031102C10141039), +(_ucs2 0x102910141039), +(_ucs2 0x10211031102C1014103A), +(_ucs2 0x10291014103A), +(_ucs2 0x10211031102C10141039), +(_ucs2 0x10291031102C10141039), +(_ucs2 0x10211031102C1014103A), +(_ucs2 0x10291031102C1014103A), +(_ucs2 0x1021102D10151039), +(_ucs2 0x102310151039), +(_ucs2 0x1021102D1015103A), +(_ucs2 0x10231015103A), +(_ucs2 0x1021102F10151039), +(_ucs2 0x102510151039), +(_ucs2 0x1021102F1015103A), +(_ucs2 0x10251015103A), +(_ucs2 0x1021103110151039), +(_ucs2 0x102710151039), +(_ucs2 0x102110311015103A), +(_ucs2 0x10271015103A), +(_ucs2 0x10211031102C10151039), +(_ucs2 0x102910151039), +(_ucs2 0x10211031102C1015103A), +(_ucs2 0x10291015103A), +(_ucs2 0x10211031102C10151039), +(_ucs2 0x10291031102C10151039), +(_ucs2 0x10211031102C1015103A), +(_ucs2 0x10291031102C1015103A), +(_ucs2 0x1021102D10161039), +(_ucs2 0x102310161039), +(_ucs2 0x1021102D1016103A), +(_ucs2 0x10231016103A), +(_ucs2 0x1021102F10161039), +(_ucs2 0x102510161039), +(_ucs2 0x1021102F1016103A), +(_ucs2 0x10251016103A), +(_ucs2 0x1021103110161039), +(_ucs2 0x102710161039), +(_ucs2 0x102110311016103A), +(_ucs2 0x10271016103A), +(_ucs2 0x10211031102C10161039), +(_ucs2 0x102910161039), +(_ucs2 0x10211031102C1016103A), +(_ucs2 0x10291016103A), +(_ucs2 0x10211031102C10161039), +(_ucs2 0x10291031102C10161039), +(_ucs2 0x10211031102C1016103A), +(_ucs2 0x10291031102C1016103A), +(_ucs2 0x1021102D10171039), +(_ucs2 0x102310171039), +(_ucs2 0x1021102D1017103A), +(_ucs2 0x10231017103A), +(_ucs2 0x1021102F10171039), +(_ucs2 0x102510171039), +(_ucs2 0x1021102F1017103A), +(_ucs2 0x10251017103A), +(_ucs2 0x1021103110171039), +(_ucs2 0x102710171039), +(_ucs2 0x102110311017103A), +(_ucs2 0x10271017103A), +(_ucs2 0x10211031102C10171039), +(_ucs2 0x102910171039), +(_ucs2 0x10211031102C1017103A), +(_ucs2 0x10291017103A), +(_ucs2 0x10211031102C10171039), +(_ucs2 0x10291031102C10171039), +(_ucs2 0x10211031102C1017103A), +(_ucs2 0x10291031102C1017103A), +(_ucs2 0x1021102D10181039), +(_ucs2 0x102310181039), +(_ucs2 0x1021102D1018103A), +(_ucs2 0x10231018103A), +(_ucs2 0x1021102F10181039), +(_ucs2 0x102510181039), +(_ucs2 0x1021102F1018103A), +(_ucs2 0x10251018103A), +(_ucs2 0x1021103110181039), +(_ucs2 0x102710181039), +(_ucs2 0x102110311018103A), +(_ucs2 0x10271018103A), +(_ucs2 0x10211031102C10181039), +(_ucs2 0x102910181039), +(_ucs2 0x10211031102C1018103A), +(_ucs2 0x10291018103A), +(_ucs2 0x10211031102C10181039), +(_ucs2 0x10291031102C10181039), +(_ucs2 0x10211031102C1018103A), +(_ucs2 0x10291031102C1018103A), +(_ucs2 0x1021102D10191039), +(_ucs2 0x102310191039), +(_ucs2 0x1021102D1019103A), +(_ucs2 0x10231019103A), +(_ucs2 0x1021102F10191039), +(_ucs2 0x102510191039), +(_ucs2 0x1021102F1019103A), +(_ucs2 0x10251019103A), +(_ucs2 0x1021103110191039), +(_ucs2 0x102710191039), +(_ucs2 0x102110311019103A), +(_ucs2 0x10271019103A), +(_ucs2 0x10211031102C10191039), +(_ucs2 0x102910191039), +(_ucs2 0x10211031102C1019103A), +(_ucs2 0x10291019103A), +(_ucs2 0x10211031102C10191039), +(_ucs2 0x10291031102C10191039), +(_ucs2 0x10211031102C1019103A), +(_ucs2 0x10291031102C1019103A), +(_ucs2 0x1021102D101A1039), +(_ucs2 0x1023101A1039), +(_ucs2 0x1021102D101A103A), +(_ucs2 0x1023101A103A), +(_ucs2 0x1021102F101A1039), +(_ucs2 0x1025101A1039), +(_ucs2 0x1021102F101A103A), +(_ucs2 0x1025101A103A), +(_ucs2 0x10211031101A1039), +(_ucs2 0x1027101A1039), +(_ucs2 0x10211031101A103A), +(_ucs2 0x1027101A103A), +(_ucs2 0x10211031102C101A1039), +(_ucs2 0x1029101A1039), +(_ucs2 0x10211031102C101A103A), +(_ucs2 0x1029101A103A), +(_ucs2 0x10211031102C101A1039), +(_ucs2 0x10291031102C101A1039), +(_ucs2 0x10211031102C101A103A), +(_ucs2 0x10291031102C101A103A), +(_ucs2 0x1021102D101B1039), +(_ucs2 0x1023101B1039), +(_ucs2 0x1021102D101B103A), +(_ucs2 0x1023101B103A), +(_ucs2 0x1021102F101B1039), +(_ucs2 0x1025101B1039), +(_ucs2 0x1021102F101B103A), +(_ucs2 0x1025101B103A), +(_ucs2 0x10211031101B1039), +(_ucs2 0x1027101B1039), +(_ucs2 0x10211031101B103A), +(_ucs2 0x1027101B103A), +(_ucs2 0x10211031102C101B1039), +(_ucs2 0x1029101B1039), +(_ucs2 0x10211031102C101B103A), +(_ucs2 0x1029101B103A), +(_ucs2 0x10211031102C101B1039), +(_ucs2 0x10291031102C101B1039), +(_ucs2 0x10211031102C101B103A), +(_ucs2 0x10291031102C101B103A), +(_ucs2 0x1021102D101C1039), +(_ucs2 0x1023101C1039), +(_ucs2 0x1021102D101C103A), +(_ucs2 0x1023101C103A), +(_ucs2 0x1021102F101C1039), +(_ucs2 0x1025101C1039), +(_ucs2 0x1021102F101C103A), +(_ucs2 0x1025101C103A), +(_ucs2 0x10211031101C1039), +(_ucs2 0x1027101C1039), +(_ucs2 0x10211031101C103A), +(_ucs2 0x1027101C103A), +(_ucs2 0x10211031102C101C1039), +(_ucs2 0x1029101C1039), +(_ucs2 0x10211031102C101C103A), +(_ucs2 0x1029101C103A), +(_ucs2 0x10211031102C101C1039), +(_ucs2 0x10291031102C101C1039), +(_ucs2 0x10211031102C101C103A), +(_ucs2 0x10291031102C101C103A), +(_ucs2 0x1021102D101E1039), +(_ucs2 0x1023101E1039), +(_ucs2 0x1021102D101E103A), +(_ucs2 0x1023101E103A), +(_ucs2 0x1021102F101E1039), +(_ucs2 0x1025101E1039), +(_ucs2 0x1021102F101E103A), +(_ucs2 0x1025101E103A), +(_ucs2 0x10211031101E1039), +(_ucs2 0x1027101E1039), +(_ucs2 0x10211031101E103A), +(_ucs2 0x1027101E103A), +(_ucs2 0x10211031102C101E1039), +(_ucs2 0x1029101E1039), +(_ucs2 0x10211031102C101E103A), +(_ucs2 0x1029101E103A), +(_ucs2 0x10211031102C101E1039), +(_ucs2 0x10291031102C101E1039), +(_ucs2 0x10211031102C101E103A), +(_ucs2 0x10291031102C101E103A), +(_ucs2 0x1021102D101F1039), +(_ucs2 0x1023101F1039), +(_ucs2 0x1021102D101F103A), +(_ucs2 0x1023101F103A), +(_ucs2 0x1021102F101F1039), +(_ucs2 0x1025101F1039), +(_ucs2 0x1021102F101F103A), +(_ucs2 0x1025101F103A), +(_ucs2 0x10211031101F1039), +(_ucs2 0x1027101F1039), +(_ucs2 0x10211031101F103A), +(_ucs2 0x1027101F103A), +(_ucs2 0x10211031102C101F1039), +(_ucs2 0x1029101F1039), +(_ucs2 0x10211031102C101F103A), +(_ucs2 0x1029101F103A), +(_ucs2 0x10211031102C101F1039), +(_ucs2 0x10291031102C101F1039), +(_ucs2 0x10211031102C101F103A), +(_ucs2 0x10291031102C101F103A), +('--- Contractions'), +(_ucs2 0x1031102C1000103A1000103B), +(_ucs2 0x1031102C1000103A103B /* (suffix of) man */), +(_ucs2 0x1014103A1014102F1015103A), +(_ucs2 0x1014103A102F1015103A /* (suffix of) I */), +('--- Great Sa'), +(_ucs2 0x1031101E1039101E), +(_ucs2 0x1031103F), +(_ucs2 0x102D101E1039101E), +(_ucs2 0x102D103F), +(_ucs2 0x102F101E1039101E), +(_ucs2 0x102F103F), +(_ucs2 0x1021102D101E1039101E), +(_ucs2 0x1023103F), +(_ucs2 0x1021102F101E1039101E), +(_ucs2 0x1025103F), +(_ucs2 0x101E1039101E), +(_ucs2 0x103F), +('--- Symbols - collate as long form'), +(_ucs2 0x1014103E102D102F1000103A), +(_ucs2 0x104C), +(_ucs2 0x101B103D10311037), +(_ucs2 0x104D), +(_ucs2 0x101C100A103A103810001031102C1004103A1038), +(_ucs2 0x104E1004103A1038), +(_ucs2 0x1021102D), +(_ucs2 0x104F), +('--- Short Forms may need to be added here'), +(_ucs2 0x101C1000103A101A102C), +(_ucs2 0x101C1000103A103B102C /* right hand side */), +(_ucs2 0x101E1019102E), +(_ucs2 0x101E10391019102E /* daughter */), +(_ucs2 0x101110191004103A1038), +(_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)))) +1 2259 108C +2 22593ACB 1037 +3 22593ACC 1038 +4 22593ACD 10371038 +5 --- Vowels +6 2232 102C +7 2232 102B +8 2246 1032 +9 22463ACB 1031102C +10 22463ACB 1031102B +11 22463ACC 1031102C103A +12 22463ACC 1031102B103A +13 2248 1034 +14 22483ACB 1036 +15 22483ACC 102D102F +16 --- Vowels with finals +17 22483ACD 10001039 +18 22483ACD 1000103A +19 22483ACE 102C10001039 +20 22483ACE 102C1000103A +21 22483ACE 102B10001039 +22 22483ACE 102B1000103A +23 22483ACF 102D10001039 +24 22483ACF 102D1000103A +25 22483AD0 102F10001039 +26 22483AD0 102F1000103A +27 22483AD1 103110001039 +28 22483AD1 10311000103A +29 22483AD2 1031102C10001039 +30 22483AD2 1031102C1000103A +31 22483AD2 1031102B10001039 +32 22483AD2 1031102B1000103A +33 22483AD3 102D102F10001039 +34 22483AD3 102D102F1000103A +35 22483AD4 10011039 +36 22483AD4 1001103A +37 22483AD5 102C10011039 +38 22483AD5 102C1001103A +39 22483AD5 102B10011039 +40 22483AD5 102B1001103A +41 22483AD6 102D10011039 +42 22483AD6 102D1001103A +43 22483AD7 102F10011039 +44 22483AD7 102F1001103A +45 22483AD8 103110011039 +46 22483AD8 10311001103A +47 22483AD9 1031102C10011039 +48 22483AD9 1031102C1001103A +49 22483AD9 1031102B10011039 +50 22483AD9 1031102B1001103A +51 22483ADA 102D102F10011039 +52 22483ADA 102D102F1001103A +53 22483ADB 10021039 +54 22483ADB 1002103A +55 22483ADC 102C10021039 +56 22483ADC 102C1002103A +57 22483ADC 102B10021039 +58 22483ADC 102B1002103A +59 22483ADD 102D10021039 +60 22483ADD 102D1002103A +61 22483ADE 102F10021039 +62 22483ADE 102F1002103A +63 22483ADF 103110021039 +64 22483ADF 10311002103A +65 22483AE0 1031102C10021039 +66 22483AE0 1031102C1002103A +67 22483AE0 1031102B10021039 +68 22483AE0 1031102B1002103A +69 22483AE1 102D102F10021039 +70 22483AE1 102D102F1002103A +71 22483AE2 10031039 +72 22483AE2 1003103A +73 22483AE3 102C10031039 +74 22483AE3 102C1003103A +75 22483AE3 102B10031039 +76 22483AE3 102B1003103A +77 22483AE4 102D10031039 +78 22483AE4 102D1003103A +79 22483AE5 102F10031039 +80 22483AE5 102F1003103A +81 22483AE6 103110031039 +82 22483AE6 10311003103A +83 22483AE7 1031102C10031039 +84 22483AE7 1031102C1003103A +85 22483AE7 1031102B10031039 +86 22483AE7 1031102B1003103A +87 22483AE8 102D102F10031039 +88 22483AE8 102D102F1003103A +89 22483AE9 1004103A1039 +90 22483AE9 1004103A +91 22483AEA 102C1004103A1039 +92 22483AEA 102C1004103A +93 22483AEA 102B1004103A1039 +94 22483AEA 102B1004103A +95 22483AEB 102D1004103A1039 +96 22483AEB 102D1004103A +97 22483AEC 102F1004103A1039 +98 22483AEC 102F1004103A +99 22483AED 10311004103A1039 +100 22483AED 10311004103A +101 22483AEE 1031102C1004103A1039 +102 22483AEE 1031102C1004103A +103 22483AEE 1031102B1004103A1039 +104 22483AEE 1031102B1004103A +105 22483AEF 102D102F1004103A1039 +106 22483AEF 102D102F1004103A +107 22483AF0 10051039 +108 22483AF0 1005103A +109 22483AF1 102C10051039 +110 22483AF1 102C1005103A +111 22483AF1 102B10051039 +112 22483AF1 102B1005103A +113 22483AF2 102D10051039 +114 22483AF2 102D1005103A +115 22483AF3 102F10051039 +116 22483AF3 102F1005103A +117 22483AF4 103110051039 +118 22483AF4 10311005103A +119 22483AF5 1031102C10051039 +120 22483AF5 1031102C1005103A +121 22483AF5 1031102B10051039 +122 22483AF5 1031102B1005103A +123 22483AF6 102D102F10051039 +124 22483AF6 102D102F1005103A +125 22483AF7 10061039 +126 22483AF7 1006103A +127 22483AF8 102C10061039 +128 22483AF8 102C1006103A +129 22483AF8 102B10061039 +130 22483AF8 102B1006103A +131 22483AF9 102D10061039 +132 22483AF9 102D1006103A +133 22483AFA 102F10061039 +134 22483AFA 102F1006103A +135 22483AFB 103110061039 +136 22483AFB 10311006103A +137 22483AFC 1031102C10061039 +138 22483AFC 1031102C1006103A +139 22483AFC 1031102B10061039 +140 22483AFC 1031102B1006103A +141 22483AFD 102D102F10061039 +142 22483AFD 102D102F1006103A +143 22483AFE 10071039 +144 22483AFE 1007103A +145 22483AFF 102C10071039 +146 22483AFF 102C1007103A +147 22483AFF 102B10071039 +148 22483AFF 102B1007103A +149 22483B00 102D10071039 +150 22483B00 102D1007103A +151 22483B01 102F10071039 +152 22483B01 102F1007103A +153 22483B02 103110071039 +154 22483B02 10311007103A +155 22483B03 1031102C10071039 +156 22483B03 1031102C1007103A +157 22483B03 1031102B10071039 +158 22483B03 1031102B1007103A +159 22483B04 102D102F10071039 +160 22483B04 102D102F1007103A +161 22483B05 1008103A +162 22483B06 102C1008103A +163 22483B06 102B1008103A +164 22483B07 102D1008103A +165 22483B08 102F1008103A +166 22483B09 10311008103A +167 22483B0A 1031102C1008103A +168 22483B0A 1031102B1008103A +169 22483B0B 102D102F1008103A +170 22483B0C 10091039 +171 22483B0C 1009103A +172 22483B0D 102C10091039 +173 22483B0D 102C1009103A +174 22483B0D 102B10091039 +175 22483B0D 102B1009103A +176 22483B0E 102D10091039 +177 22483B0E 102D1009103A +178 22483B0F 102F10091039 +179 22483B0F 102F1009103A +180 22483B10 103110091039 +181 22483B10 10311009103A +182 22483B11 1031102C10091039 +183 22483B11 1031102C1009103A +184 22483B11 1031102B10091039 +185 22483B11 1031102B1009103A +186 22483B12 102D102F10091039 +187 22483B12 102D102F1009103A +188 22483B13 100A1039 +189 22483B13 100A103A +190 22483B14 102C100A1039 +191 22483B14 102C100A103A +192 22483B14 102B100A1039 +193 22483B14 102B100A103A +194 22483B15 102D100A1039 +195 22483B15 102D100A103A +196 22483B16 102F100A1039 +197 22483B16 102F100A103A +198 22483B17 1031100A1039 +199 22483B17 1031100A103A +200 22483B18 1031102C100A1039 +201 22483B18 1031102C100A103A +202 22483B18 1031102B100A1039 +203 22483B18 1031102B100A103A +204 22483B19 102D102F100A1039 +205 22483B19 102D102F100A103A +206 22483B1A 100B1039 +207 22483B1A 100B103A +208 22483B1B 102C100B1039 +209 22483B1B 102C100B103A +210 22483B1B 102B100B1039 +211 22483B1B 102B100B103A +212 22483B1C 102D100B1039 +213 22483B1C 102D100B103A +214 22483B1D 102F100B1039 +215 22483B1D 102F100B103A +216 22483B1E 1031100B1039 +217 22483B1E 1031100B103A +218 22483B1F 1031102C100B1039 +219 22483B1F 1031102C100B103A +220 22483B1F 1031102B100B1039 +221 22483B1F 1031102B100B103A +222 22483B20 102D102F100B1039 +223 22483B20 102D102F100B103A +224 22483B21 100C1039 +225 22483B21 100C103A +226 22483B22 102C100C1039 +227 22483B22 102C100C103A +228 22483B22 102B100C1039 +229 22483B22 102B100C103A +230 22483B23 102D100C1039 +231 22483B23 102D100C103A +232 22483B24 102F100C1039 +233 22483B24 102F100C103A +234 22483B25 1031100C1039 +235 22483B25 1031100C103A +236 22483B26 1031102C100C1039 +237 22483B26 1031102C100C103A +238 22483B26 1031102B100C1039 +239 22483B26 1031102B100C103A +240 22483B27 102D102F100C1039 +241 22483B27 102D102F100C103A +242 22483B28 100D1039 +243 22483B28 100D103A +244 22483B29 102C100D1039 +245 22483B29 102C100D103A +246 22483B29 102B100D1039 +247 22483B29 102B100D103A +248 22483B2A 102D100D1039 +249 22483B2A 102D100D103A +250 22483B2B 102F100D1039 +251 22483B2B 102F100D103A +252 22483B2C 1031100D1039 +253 22483B2C 1031100D103A +254 22483B2D 1031102C100D1039 +255 22483B2D 1031102C100D103A +256 22483B2D 1031102B100D1039 +257 22483B2D 1031102B100D103A +258 22483B2E 102D102F100D1039 +259 22483B2E 102D102F100D103A +260 22483B2F 100E1039 +261 22483B2F 100E103A +262 22483B30 102C100E1039 +263 22483B30 102C100E103A +264 22483B30 102B100E1039 +265 22483B30 102B100E103A +266 22483B31 102D100E1039 +267 22483B31 102D100E103A +268 22483B32 102F100E1039 +269 22483B32 102F100E103A +270 22483B33 1031100E1039 +271 22483B33 1031100E103A +272 22483B34 1031102C100E1039 +273 22483B34 1031102C100E103A +274 22483B34 1031102B100E1039 +275 22483B34 1031102B100E103A +276 22483B35 102D102F100E1039 +277 22483B35 102D102F100E103A +278 22483B36 100F1039 +279 22483B36 100F103A +280 22483B37 102C100F1039 +281 22483B37 102C100F103A +282 22483B37 102B100F1039 +283 22483B37 102B100F103A +284 22483B38 102D100F1039 +285 22483B38 102D100F103A +286 22483B39 102F100F1039 +287 22483B39 102F100F103A +288 22483B3A 1031100F1039 +289 22483B3A 1031100F103A +290 22483B3B 1031102C100F1039 +291 22483B3B 1031102C100F103A +292 22483B3B 1031102B100F1039 +293 22483B3B 1031102B100F103A +294 22483B3C 102D102F100F1039 +295 22483B3C 102D102F100F103A +296 22483B3D 10101039 +297 22483B3D 1010103A +298 22483B3E 102C10101039 +299 22483B3E 102C1010103A +300 22483B3E 102B10101039 +301 22483B3E 102B1010103A +302 22483B3F 102D10101039 +303 22483B3F 102D1010103A +304 22483B40 102F10101039 +305 22483B40 102F1010103A +306 22483B41 103110101039 +307 22483B41 10311010103A +308 22483B42 1031102C10101039 +309 22483B42 1031102C1010103A +310 22483B42 1031102B10101039 +311 22483B42 1031102B1010103A +312 22483B43 102D102F10101039 +313 22483B43 102D102F1010103A +314 22483B44 10111039 +315 22483B44 1011103A +316 22483B45 102C10111039 +317 22483B45 102C1011103A +318 22483B45 102B10111039 +319 22483B45 102B1011103A +320 22483B46 102D10111039 +321 22483B46 102D1011103A +322 22483B47 102F10111039 +323 22483B47 102F1011103A +324 22483B48 103110111039 +325 22483B48 10311011103A +326 22483B49 1031102C10111039 +327 22483B49 1031102C1011103A +328 22483B49 1031102B10111039 +329 22483B49 1031102B1011103A +330 22483B4A 102D102F10111039 +331 22483B4A 102D102F1011103A +332 22483B4B 10121039 +333 22483B4B 1012103A +334 22483B4C 102C10121039 +335 22483B4C 102C1012103A +336 22483B4C 102B10121039 +337 22483B4C 102B1012103A +338 22483B4D 102D10121039 +339 22483B4D 102D1012103A +340 22483B4E 102F10121039 +341 22483B4E 102F1012103A +342 22483B4F 103110121039 +343 22483B4F 10311012103A +344 22483B50 1031102C10121039 +345 22483B50 1031102C1012103A +346 22483B50 1031102B10121039 +347 22483B50 1031102B1012103A +348 22483B51 102D102F10121039 +349 22483B51 102D102F1012103A +350 22483B52 10131039 +351 22483B52 1013103A +352 22483B53 102C10131039 +353 22483B53 102C1013103A +354 22483B53 102B10131039 +355 22483B53 102B1013103A +356 22483B54 102D10131039 +357 22483B54 102D1013103A +358 22483B55 102F10131039 +359 22483B55 102F1013103A +360 22483B56 103110131039 +361 22483B56 10311013103A +362 22483B57 1031102C10131039 +363 22483B57 1031102C1013103A +364 22483B57 1031102B10131039 +365 22483B57 1031102B1013103A +366 22483B58 102D102F10131039 +367 22483B58 102D102F1013103A +368 22483B59 10141039 +369 22483B59 1014103A +370 22483B5A 102C10141039 +371 22483B5A 102C1014103A +372 22483B5A 102B10141039 +373 22483B5A 102B1014103A +374 22483B5B 102D10141039 +375 22483B5B 102D1014103A +376 22483B5C 102F10141039 +377 22483B5C 102F1014103A +378 22483B5D 103110141039 +379 22483B5D 10311014103A +380 22483B5E 1031102C10141039 +381 22483B5E 1031102C1014103A +382 22483B5E 1031102B10141039 +383 22483B5E 1031102B1014103A +384 22483B5F 102D102F10141039 +385 22483B5F 102D102F1014103A +386 22483B60 10151039 +387 22483B60 1015103A +388 22483B61 102C10151039 +389 22483B61 102C1015103A +390 22483B61 102B10151039 +391 22483B61 102B1015103A +392 22483B62 102D10151039 +393 22483B62 102D1015103A +394 22483B63 102F10151039 +395 22483B63 102F1015103A +396 22483B64 103110151039 +397 22483B64 10311015103A +398 22483B65 1031102C10151039 +399 22483B65 1031102C1015103A +400 22483B65 1031102B10151039 +401 22483B65 1031102B1015103A +402 22483B66 102D102F10151039 +403 22483B66 102D102F1015103A +404 22483B67 10161039 +405 22483B67 1016103A +406 22483B68 102C10161039 +407 22483B68 102C1016103A +408 22483B68 102B10161039 +409 22483B68 102B1016103A +410 22483B69 102D10161039 +411 22483B69 102D1016103A +412 22483B6A 102F10161039 +413 22483B6A 102F1016103A +414 22483B6B 103110161039 +415 22483B6B 10311016103A +416 22483B6C 1031102C10161039 +417 22483B6C 1031102C1016103A +418 22483B6C 1031102B10161039 +419 22483B6C 1031102B1016103A +420 22483B6D 102D102F10161039 +421 22483B6D 102D102F1016103A +422 22483B6E 10171039 +423 22483B6E 1017103A +424 22483B6F 102C10171039 +425 22483B6F 102C1017103A +426 22483B6F 102B10171039 +427 22483B6F 102B1017103A +428 22483B70 102D10171039 +429 22483B70 102D1017103A +430 22483B71 102F10171039 +431 22483B71 102F1017103A +432 22483B72 103110171039 +433 22483B72 10311017103A +434 22483B73 1031102C10171039 +435 22483B73 1031102C1017103A +436 22483B73 1031102B10171039 +437 22483B73 1031102B1017103A +438 22483B74 102D102F10171039 +439 22483B74 102D102F1017103A +440 22483B75 10181039 +441 22483B75 1018103A +442 22483B76 102C10181039 +443 22483B76 102C1018103A +444 22483B76 102B10181039 +445 22483B76 102B1018103A +446 22483B77 102D10181039 +447 22483B77 102D1018103A +448 22483B78 102F10181039 +449 22483B78 102F1018103A +450 22483B79 103110181039 +451 22483B79 10311018103A +452 22483B7A 1031102C10181039 +453 22483B7A 1031102C1018103A +454 22483B7A 1031102B10181039 +455 22483B7A 1031102B1018103A +456 22483B7B 102D102F10181039 +457 22483B7B 102D102F1018103A +458 22483B7C 10191039 +459 22483B7C 1019103A +460 22483B7D 102C10191039 +461 22483B7D 102C1019103A +462 22483B7D 102B10191039 +463 22483B7D 102B1019103A +464 22483B7E 102D10191039 +465 22483B7E 102D1019103A +466 22483B7F 102F10191039 +467 22483B7F 102F1019103A +468 22483B80 103110191039 +469 22483B80 10311019103A +470 22483B81 1031102C10191039 +471 22483B81 1031102C1019103A +472 22483B81 1031102B10191039 +473 22483B81 1031102B1019103A +474 22483B82 102D102F10191039 +475 22483B82 102D102F1019103A +476 22483B83 101A1039 +477 22483B83 101A103A +478 22483B84 102C101A1039 +479 22483B84 102C101A103A +480 22483B84 102B101A1039 +481 22483B84 102B101A103A +482 22483B85 102D101A1039 +483 22483B85 102D101A103A +484 22483B86 102F101A1039 +485 22483B86 102F101A103A +486 22483B87 1031101A1039 +487 22483B87 1031101A103A +488 22483B88 1031102C101A1039 +489 22483B88 1031102C101A103A +490 22483B88 1031102B101A1039 +491 22483B88 1031102B101A103A +492 22483B89 102D102F101A1039 +493 22483B89 102D102F101A103A +494 22483B8A 101B1039 +495 22483B8A 101B103A +496 22483B8B 102C101B1039 +497 22483B8B 102C101B103A +498 22483B8B 102B101B1039 +499 22483B8B 102B101B103A +500 22483B8C 102D101B1039 +501 22483B8C 102D101B103A +502 22483B8D 102F101B1039 +503 22483B8D 102F101B103A +504 22483B8E 1031101B1039 +505 22483B8E 1031101B103A +506 22483B8F 1031102C101B1039 +507 22483B8F 1031102C101B103A +508 22483B8F 1031102B101B1039 +509 22483B8F 1031102B101B103A +510 22483B90 102D102F101B1039 +511 22483B90 102D102F101B103A +512 22483B91 101C1039 +513 22483B91 101C103A +514 22483B92 102C101C1039 +515 22483B92 102C101C103A +516 22483B92 102B101C1039 +517 22483B92 102B101C103A +518 22483B93 102D101C1039 +519 22483B93 102D101C103A +520 22483B94 102F101C1039 +521 22483B94 102F101C103A +522 22483B95 1031101C1039 +523 22483B95 1031101C103A +524 22483B96 1031102C101C1039 +525 22483B96 1031102C101C103A +526 22483B96 1031102B101C1039 +527 22483B96 1031102B101C103A +528 22483B97 102D102F101C1039 +529 22483B97 102D102F101C103A +530 22483B98 101D103A +531 22483B99 102C101D103A +532 22483B99 102B101D103A +533 22483B9A 102D101D103A +534 22483B9B 102F101D103A +535 22483B9C 1031101D103A +536 22483B9D 1031102C101D103A +537 22483B9D 1031102B101D103A +538 22483B9E 102D102F101D103A +539 22483B9F 101E1039 +540 22483B9F 101E103A +541 22483BA0 102C101E1039 +542 22483BA0 102C101E103A +543 22483BA0 102B101E1039 +544 22483BA0 102B101E103A +545 22483BA1 102D101E1039 +546 22483BA1 102D101E103A +547 22483BA2 102F101E1039 +548 22483BA2 102F101E103A +549 22483BA3 1031101E1039 +550 22483BA3 1031101E103A +551 22483BA4 1031102C101E1039 +552 22483BA4 1031102C101E103A +553 22483BA4 1031102B101E1039 +554 22483BA4 1031102B101E103A +555 22483BA5 102D102F101E1039 +556 22483BA5 102D102F101E103A +557 22483BA6 101F1039 +558 22483BA6 101F103A +559 22483BA7 102C101F1039 +560 22483BA7 102C101F103A +561 22483BA7 102B101F1039 +562 22483BA7 102B101F103A +563 22483BA8 102D101F1039 +564 22483BA8 102D101F103A +565 22483BA9 102F101F1039 +566 22483BA9 102F101F103A +567 22483BAA 1031101F1039 +568 22483BAA 1031101F103A +569 22483BAB 1031102C101F1039 +570 22483BAB 1031102C101F103A +571 22483BAB 1031102B101F1039 +572 22483BAB 1031102B101F103A +573 22483BAC 102D102F101F1039 +574 22483BAC 102D102F101F103A +575 22483BAD 1020103A +576 22483BAE 102C1020103A +577 22483BAE 102B1020103A +578 22483BAF 102D1020103A +579 22483BB0 102F1020103A +580 22483BB1 10311020103A +581 22483BB2 1031102C1020103A +582 22483BB2 1031102B1020103A +583 22483BB3 102D102F1020103A +584 22483BB4 1021103A +585 22483BB5 102C1021103A +586 22483BB5 102B1021103A +587 22483BB6 102D1021103A +588 22483BB7 102F1021103A +589 22483BB8 10311021103A +590 22483BB9 1031102C1021103A +591 22483BB9 1031102B1021103A +592 22483BBA 102D102F1021103A +593 --- Medials +594 22483BBB 105E +595 22483BBC 105F +596 22483BBD 103B +597 22483BBE 103C +598 22483BBF 1060 +599 22483BC0 103D +600 22483BC1 1082 +601 22483BC2 103E +602 22483BC3 103B103D +603 22483BC4 103C103D +604 22483BC5 103B103E +605 22483BC6 103C103E +606 22483BC7 103D103E +607 22483BC8 103B103D103E +608 22483BC9 103C103D103E +609 --- Independent vowels +610 22242236 1021102D +611 22242236 1023 +612 22242238 1021102E +613 22242238 1024 +614 2224223A 1021102F +615 2224223A 1025 +616 2224223D 10211030 +617 2224223D 1026 +618 22242242 10211031 +619 22242242 1027 +620 22242242 1028 +621 222422463ACB 10211031102C +622 222422463ACB 1029 +623 222422463ACC 10211031102C103A +624 222422463ACC 102A +625 22483B7E 102D1019103A +626 22483B7E3ACB 102D1036 +627 22483B7E3ACC 102D1019103A1037 +628 22483B7E3ACD 102D10361037 +629 22483B7E3ACE 102D1019103A1038 +630 22483B7E3ACF 102D10361038 +631 22483B7F 102F1019103A +632 22483B7F3ACB 102F1036 +633 22483B7F3ACC 102F1019103A1037 +634 22483B7F3ACD 102F10361037 +635 22483B7F3ACE 102F1019103A1038 +636 22483B7F3ACF 102F10361038 +637 222422483B7F3ACB 1021102F1036 +638 222422483B7F3ACB 1025102F1036 +639 --- Independent vowels with finals +640 222422483ACF 1021102D10001039 +641 222422483ACF 102310001039 +642 222422483ACF 1021102D1000103A +643 222422483ACF 10231000103A +644 222422483AD0 1021102F10001039 +645 222422483AD0 102510001039 +646 222422483AD0 1021102F1000103A +647 222422483AD0 10251000103A +648 222422483AD1 1021103110001039 +649 222422483AD1 102710001039 +650 222422483AD1 102110311000103A +651 222422483AD1 10271000103A +652 222422483AD2 10211031102C10001039 +653 222422483AD2 102910001039 +654 222422483AD2 10211031102C1000103A +655 222422483AD2 10291000103A +656 222422483AD2 10211031102C10001039 +657 222422483AD2 10291031102C10001039 +658 222422483AD2 10211031102C1000103A +659 222422483AD2 10291031102C1000103A +660 222422483AD6 1021102D10011039 +661 222422483AD6 102310011039 +662 222422483AD6 1021102D1001103A +663 222422483AD6 10231001103A +664 222422483AD7 1021102F10011039 +665 222422483AD7 102510011039 +666 222422483AD7 1021102F1001103A +667 222422483AD7 10251001103A +668 222422483AD8 1021103110011039 +669 222422483AD8 102710011039 +670 222422483AD8 102110311001103A +671 222422483AD8 10271001103A +672 222422483AD9 10211031102C10011039 +673 222422483AD9 102910011039 +674 222422483AD9 10211031102C1001103A +675 222422483AD9 10291001103A +676 222422483AD9 10211031102C10011039 +677 222422483AD9 10291031102C10011039 +678 222422483AD9 10211031102C1001103A +679 222422483AD9 10291031102C1001103A +680 222422483ADD 1021102D10021039 +681 222422483ADD 102310021039 +682 222422483ADD 1021102D1002103A +683 222422483ADD 10231002103A +684 222422483ADE 1021102F10021039 +685 222422483ADE 102510021039 +686 222422483ADE 1021102F1002103A +687 222422483ADE 10251002103A +688 222422483ADF 1021103110021039 +689 222422483ADF 102710021039 +690 222422483ADF 102110311002103A +691 222422483ADF 10271002103A +692 222422483AE0 10211031102C10021039 +693 222422483AE0 102910021039 +694 222422483AE0 10211031102C1002103A +695 222422483AE0 10291002103A +696 222422483AE0 10211031102C10021039 +697 222422483AE0 10291031102C10021039 +698 222422483AE0 10211031102C1002103A +699 222422483AE0 10291031102C1002103A +700 222422483AE4 1021102D10031039 +701 222422483AE4 102310031039 +702 222422483AE4 1021102D1003103A +703 222422483AE4 10231003103A +704 222422483AE5 1021102F10031039 +705 222422483AE5 102510031039 +706 222422483AE5 1021102F1003103A +707 222422483AE5 10251003103A +708 222422483AE6 1021103110031039 +709 222422483AE6 102710031039 +710 222422483AE6 102110311003103A +711 222422483AE6 10271003103A +712 222422483AE7 10211031102C10031039 +713 222422483AE7 102910031039 +714 222422483AE7 10211031102C1003103A +715 222422483AE7 10291003103A +716 222422483AE7 10211031102C10031039 +717 222422483AE7 10291031102C10031039 +718 222422483AE7 10211031102C1003103A +719 222422483AE7 10291031102C1003103A +720 2224223621D5224D 1021102D10041039 +721 2224223621D5224D 102310041039 +722 222422483AEB 1021102D1004103A +723 222422483AEB 10231004103A +724 2224223A21D5224D 1021102F10041039 +725 2224223A21D5224D 102510041039 +726 222422483AEC 1021102F1004103A +727 222422483AEC 10251004103A +728 2224224221D5224D 1021103110041039 +729 2224224221D5224D 102710041039 +730 222422483AED 102110311004103A +731 222422483AED 10271004103A +732 222422463ACB21D5224D 10211031102C10041039 +733 222422463ACB21D5224D 102910041039 +734 222422483AEE 10211031102C1004103A +735 222422483AEE 10291004103A +736 222422463ACB21D5224D 10211031102C10041039 +737 222422463ACB21D5224D 10291031102C10041039 +738 222422483AEE 10211031102C1004103A +739 222422483AEE 10291031102C1004103A +740 222422483AF2 1021102D10051039 +741 222422483AF2 102310051039 +742 222422483AF2 1021102D1005103A +743 222422483AF2 10231005103A +744 222422483AF3 1021102F10051039 +745 222422483AF3 102510051039 +746 222422483AF3 1021102F1005103A +747 222422483AF3 10251005103A +748 222422483AF4 1021103110051039 +749 222422483AF4 102710051039 +750 222422483AF4 102110311005103A +751 222422483AF4 10271005103A +752 222422483AF5 10211031102C10051039 +753 222422483AF5 102910051039 +754 222422483AF5 10211031102C1005103A +755 222422483AF5 10291005103A +756 222422483AF5 10211031102C10051039 +757 222422483AF5 10291031102C10051039 +758 222422483AF5 10211031102C1005103A +759 222422483AF5 10291031102C1005103A +760 222422483AF9 1021102D10061039 +761 222422483AF9 102310061039 +762 222422483AF9 1021102D1006103A +763 222422483AF9 10231006103A +764 222422483AFA 1021102F10061039 +765 222422483AFA 102510061039 +766 222422483AFA 1021102F1006103A +767 222422483AFA 10251006103A +768 222422483AFB 1021103110061039 +769 222422483AFB 102710061039 +770 222422483AFB 102110311006103A +771 222422483AFB 10271006103A +772 222422483AFC 10211031102C10061039 +773 222422483AFC 102910061039 +774 222422483AFC 10211031102C1006103A +775 222422483AFC 10291006103A +776 222422483AFC 10211031102C10061039 +777 222422483AFC 10291031102C10061039 +778 222422483AFC 10211031102C1006103A +779 222422483AFC 10291031102C1006103A +780 222422483B00 1021102D10071039 +781 222422483B00 102310071039 +782 222422483B00 1021102D1007103A +783 222422483B00 10231007103A +784 222422483B01 1021102F10071039 +785 222422483B01 102510071039 +786 222422483B01 1021102F1007103A +787 222422483B01 10251007103A +788 222422483B02 1021103110071039 +789 222422483B02 102710071039 +790 222422483B02 102110311007103A +791 222422483B02 10271007103A +792 222422483B03 10211031102C10071039 +793 222422483B03 102910071039 +794 222422483B03 10211031102C1007103A +795 222422483B03 10291007103A +796 222422483B03 10211031102C10071039 +797 222422483B03 10291031102C10071039 +798 222422483B03 10211031102C1007103A +799 222422483B03 10291031102C1007103A +800 222422483B0E 1021102D10091039 +801 222422483B0E 102310091039 +802 222422483B0E 1021102D1009103A +803 222422483B0E 10231009103A +804 222422483B0F 1021102F10091039 +805 222422483B0F 102510091039 +806 222422483B0F 1021102F1009103A +807 222422483B0F 10251009103A +808 222422483B10 1021103110091039 +809 222422483B10 102710091039 +810 222422483B10 102110311009103A +811 222422483B10 10271009103A +812 222422483B11 10211031102C10091039 +813 222422483B11 102910091039 +814 222422483B11 10211031102C1009103A +815 222422483B11 10291009103A +816 222422483B11 10211031102C10091039 +817 222422483B11 10291031102C10091039 +818 222422483B11 10211031102C1009103A +819 222422483B11 10291031102C1009103A +820 222422483B15 1021102D100A1039 +821 222422483B15 1023100A1039 +822 222422483B15 1021102D100A103A +823 222422483B15 1023100A103A +824 222422483B16 1021102F100A1039 +825 222422483B16 1025100A1039 +826 222422483B16 1021102F100A103A +827 222422483B16 1025100A103A +828 222422483B17 10211031100A1039 +829 222422483B17 1027100A1039 +830 222422483B17 10211031100A103A +831 222422483B17 1027100A103A +832 222422483B18 10211031102C100A1039 +833 222422483B18 1029100A1039 +834 222422483B18 10211031102C100A103A +835 222422483B18 1029100A103A +836 222422483B18 10211031102C100A1039 +837 222422483B18 10291031102C100A1039 +838 222422483B18 10211031102C100A103A +839 222422483B18 10291031102C100A103A +840 222422483B1C 1021102D100B1039 +841 222422483B1C 1023100B1039 +842 222422483B1C 1021102D100B103A +843 222422483B1C 1023100B103A +844 222422483B1D 1021102F100B1039 +845 222422483B1D 1025100B1039 +846 222422483B1D 1021102F100B103A +847 222422483B1D 1025100B103A +848 222422483B1E 10211031100B1039 +849 222422483B1E 1027100B1039 +850 222422483B1E 10211031100B103A +851 222422483B1E 1027100B103A +852 222422483B1F 10211031102C100B1039 +853 222422483B1F 1029100B1039 +854 222422483B1F 10211031102C100B103A +855 222422483B1F 1029100B103A +856 222422483B1F 10211031102C100B1039 +857 222422483B1F 10291031102C100B1039 +858 222422483B1F 10211031102C100B103A +859 222422483B1F 10291031102C100B103A +860 222422483B23 1021102D100C1039 +861 222422483B23 1023100C1039 +862 222422483B23 1021102D100C103A +863 222422483B23 1023100C103A +864 222422483B24 1021102F100C1039 +865 222422483B24 1025100C1039 +866 222422483B24 1021102F100C103A +867 222422483B24 1025100C103A +868 222422483B25 10211031100C1039 +869 222422483B25 1027100C1039 +870 222422483B25 10211031100C103A +871 222422483B25 1027100C103A +872 222422483B26 10211031102C100C1039 +873 222422483B26 1029100C1039 +874 222422483B26 10211031102C100C103A +875 222422483B26 1029100C103A +876 222422483B26 10211031102C100C1039 +877 222422483B26 10291031102C100C1039 +878 222422483B26 10211031102C100C103A +879 222422483B26 10291031102C100C103A +880 222422483B2A 1021102D100D1039 +881 222422483B2A 1023100D1039 +882 222422483B2A 1021102D100D103A +883 222422483B2A 1023100D103A +884 222422483B2B 1021102F100D1039 +885 222422483B2B 1025100D1039 +886 222422483B2B 1021102F100D103A +887 222422483B2B 1025100D103A +888 222422483B2C 10211031100D1039 +889 222422483B2C 1027100D1039 +890 222422483B2C 10211031100D103A +891 222422483B2C 1027100D103A +892 222422483B2D 10211031102C100D1039 +893 222422483B2D 1029100D1039 +894 222422483B2D 10211031102C100D103A +895 222422483B2D 1029100D103A +896 222422483B2D 10211031102C100D1039 +897 222422483B2D 10291031102C100D1039 +898 222422483B2D 10211031102C100D103A +899 222422483B2D 10291031102C100D103A +900 222422483B31 1021102D100E1039 +901 222422483B31 1023100E1039 +902 222422483B31 1021102D100E103A +903 222422483B31 1023100E103A +904 222422483B32 1021102F100E1039 +905 222422483B32 1025100E1039 +906 222422483B32 1021102F100E103A +907 222422483B32 1025100E103A +908 222422483B33 10211031100E1039 +909 222422483B33 1027100E1039 +910 222422483B33 10211031100E103A +911 222422483B33 1027100E103A +912 222422483B34 10211031102C100E1039 +913 222422483B34 1029100E1039 +914 222422483B34 10211031102C100E103A +915 222422483B34 1029100E103A +916 222422483B34 10211031102C100E1039 +917 222422483B34 10291031102C100E1039 +918 222422483B34 10211031102C100E103A +919 222422483B34 10291031102C100E103A +920 222422483B38 1021102D100F1039 +921 222422483B38 1023100F1039 +922 222422483B38 1021102D100F103A +923 222422483B38 1023100F103A +924 222422483B39 1021102F100F1039 +925 222422483B39 1025100F1039 +926 222422483B39 1021102F100F103A +927 222422483B39 1025100F103A +928 222422483B3A 10211031100F1039 +929 222422483B3A 1027100F1039 +930 222422483B3A 10211031100F103A +931 222422483B3A 1027100F103A +932 222422483B3B 10211031102C100F1039 +933 222422483B3B 1029100F1039 +934 222422483B3B 10211031102C100F103A +935 222422483B3B 1029100F103A +936 222422483B3B 10211031102C100F1039 +937 222422483B3B 10291031102C100F1039 +938 222422483B3B 10211031102C100F103A +939 222422483B3B 10291031102C100F103A +940 222422483B3F 1021102D10101039 +941 222422483B3F 102310101039 +942 222422483B3F 1021102D1010103A +943 222422483B3F 10231010103A +944 222422483B40 1021102F10101039 +945 222422483B40 102510101039 +946 222422483B40 1021102F1010103A +947 222422483B40 10251010103A +948 222422483B41 1021103110101039 +949 222422483B41 102710101039 +950 222422483B41 102110311010103A +951 222422483B41 10271010103A +952 222422483B42 10211031102C10101039 +953 222422483B42 102910101039 +954 222422483B42 10211031102C1010103A +955 222422483B42 10291010103A +956 222422483B42 10211031102C10101039 +957 222422483B42 10291031102C10101039 +958 222422483B42 10211031102C1010103A +959 222422483B42 10291031102C1010103A +960 222422483B46 1021102D10111039 +961 222422483B46 102310111039 +962 222422483B46 1021102D1011103A +963 222422483B46 10231011103A +964 222422483B47 1021102F10111039 +965 222422483B47 102510111039 +966 222422483B47 1021102F1011103A +967 222422483B47 10251011103A +968 222422483B48 1021103110111039 +969 222422483B48 102710111039 +970 222422483B48 102110311011103A +971 222422483B48 10271011103A +972 222422483B49 10211031102C10111039 +973 222422483B49 102910111039 +974 222422483B49 10211031102C1011103A +975 222422483B49 10291011103A +976 222422483B49 10211031102C10111039 +977 222422483B49 10291031102C10111039 +978 222422483B49 10211031102C1011103A +979 222422483B49 10291031102C1011103A +980 222422483B4D 1021102D10121039 +981 222422483B4D 102310121039 +982 222422483B4D 1021102D1012103A +983 222422483B4D 10231012103A +984 222422483B4E 1021102F10121039 +985 222422483B4E 102510121039 +986 222422483B4E 1021102F1012103A +987 222422483B4E 10251012103A +988 222422483B4F 1021103110121039 +989 222422483B4F 102710121039 +990 222422483B4F 102110311012103A +991 222422483B4F 10271012103A +992 222422483B50 10211031102C10121039 +993 222422483B50 102910121039 +994 222422483B50 10211031102C1012103A +995 222422483B50 10291012103A +996 222422483B50 10211031102C10121039 +997 222422483B50 10291031102C10121039 +998 222422483B50 10211031102C1012103A +999 222422483B50 10291031102C1012103A +1000 222422483B54 1021102D10131039 +1001 222422483B54 102310131039 +1002 222422483B54 1021102D1013103A +1003 222422483B54 10231013103A +1004 222422483B55 1021102F10131039 +1005 222422483B55 102510131039 +1006 222422483B55 1021102F1013103A +1007 222422483B55 10251013103A +1008 222422483B56 1021103110131039 +1009 222422483B56 102710131039 +1010 222422483B56 102110311013103A +1011 222422483B56 10271013103A +1012 222422483B57 10211031102C10131039 +1013 222422483B57 102910131039 +1014 222422483B57 10211031102C1013103A +1015 222422483B57 10291013103A +1016 222422483B57 10211031102C10131039 +1017 222422483B57 10291031102C10131039 +1018 222422483B57 10211031102C1013103A +1019 222422483B57 10291031102C1013103A +1020 222422483B5B 1021102D10141039 +1021 222422483B5B 102310141039 +1022 222422483B5B 1021102D1014103A +1023 222422483B5B 10231014103A +1024 222422483B5C 1021102F10141039 +1025 222422483B5C 102510141039 +1026 222422483B5C 1021102F1014103A +1027 222422483B5C 10251014103A +1028 222422483B5D 1021103110141039 +1029 222422483B5D 102710141039 +1030 222422483B5D 102110311014103A +1031 222422483B5D 10271014103A +1032 222422483B5E 10211031102C10141039 +1033 222422483B5E 102910141039 +1034 222422483B5E 10211031102C1014103A +1035 222422483B5E 10291014103A +1036 222422483B5E 10211031102C10141039 +1037 222422483B5E 10291031102C10141039 +1038 222422483B5E 10211031102C1014103A +1039 222422483B5E 10291031102C1014103A +1040 222422483B62 1021102D10151039 +1041 222422483B62 102310151039 +1042 222422483B62 1021102D1015103A +1043 222422483B62 10231015103A +1044 222422483B63 1021102F10151039 +1045 222422483B63 102510151039 +1046 222422483B63 1021102F1015103A +1047 222422483B63 10251015103A +1048 222422483B64 1021103110151039 +1049 222422483B64 102710151039 +1050 222422483B64 102110311015103A +1051 222422483B64 10271015103A +1052 222422483B65 10211031102C10151039 +1053 222422483B65 102910151039 +1054 222422483B65 10211031102C1015103A +1055 222422483B65 10291015103A +1056 222422483B65 10211031102C10151039 +1057 222422483B65 10291031102C10151039 +1058 222422483B65 10211031102C1015103A +1059 222422483B65 10291031102C1015103A +1060 222422483B69 1021102D10161039 +1061 222422483B69 102310161039 +1062 222422483B69 1021102D1016103A +1063 222422483B69 10231016103A +1064 222422483B6A 1021102F10161039 +1065 222422483B6A 102510161039 +1066 222422483B6A 1021102F1016103A +1067 222422483B6A 10251016103A +1068 222422483B6B 1021103110161039 +1069 222422483B6B 102710161039 +1070 222422483B6B 102110311016103A +1071 222422483B6B 10271016103A +1072 222422483B6C 10211031102C10161039 +1073 222422483B6C 102910161039 +1074 222422483B6C 10211031102C1016103A +1075 222422483B6C 10291016103A +1076 222422483B6C 10211031102C10161039 +1077 222422483B6C 10291031102C10161039 +1078 222422483B6C 10211031102C1016103A +1079 222422483B6C 10291031102C1016103A +1080 222422483B70 1021102D10171039 +1081 222422483B70 102310171039 +1082 222422483B70 1021102D1017103A +1083 222422483B70 10231017103A +1084 222422483B71 1021102F10171039 +1085 222422483B71 102510171039 +1086 222422483B71 1021102F1017103A +1087 222422483B71 10251017103A +1088 222422483B72 1021103110171039 +1089 222422483B72 102710171039 +1090 222422483B72 102110311017103A +1091 222422483B72 10271017103A +1092 222422483B73 10211031102C10171039 +1093 222422483B73 102910171039 +1094 222422483B73 10211031102C1017103A +1095 222422483B73 10291017103A +1096 222422483B73 10211031102C10171039 +1097 222422483B73 10291031102C10171039 +1098 222422483B73 10211031102C1017103A +1099 222422483B73 10291031102C1017103A +1100 222422483B77 1021102D10181039 +1101 222422483B77 102310181039 +1102 222422483B77 1021102D1018103A +1103 222422483B77 10231018103A +1104 222422483B78 1021102F10181039 +1105 222422483B78 102510181039 +1106 222422483B78 1021102F1018103A +1107 222422483B78 10251018103A +1108 222422483B79 1021103110181039 +1109 222422483B79 102710181039 +1110 222422483B79 102110311018103A +1111 222422483B79 10271018103A +1112 222422483B7A 10211031102C10181039 +1113 222422483B7A 102910181039 +1114 222422483B7A 10211031102C1018103A +1115 222422483B7A 10291018103A +1116 222422483B7A 10211031102C10181039 +1117 222422483B7A 10291031102C10181039 +1118 222422483B7A 10211031102C1018103A +1119 222422483B7A 10291031102C1018103A +1120 222422483B7E 1021102D10191039 +1121 222422483B7E 102310191039 +1122 222422483B7E 1021102D1019103A +1123 222422483B7E 10231019103A +1124 222422483B7F 1021102F10191039 +1125 222422483B7F 102510191039 +1126 222422483B7F 1021102F1019103A +1127 222422483B7F 10251019103A +1128 222422483B80 1021103110191039 +1129 222422483B80 102710191039 +1130 222422483B80 102110311019103A +1131 222422483B80 10271019103A +1132 222422483B81 10211031102C10191039 +1133 222422483B81 102910191039 +1134 222422483B81 10211031102C1019103A +1135 222422483B81 10291019103A +1136 222422483B81 10211031102C10191039 +1137 222422483B81 10291031102C10191039 +1138 222422483B81 10211031102C1019103A +1139 222422483B81 10291031102C1019103A +1140 222422483B85 1021102D101A1039 +1141 222422483B85 1023101A1039 +1142 222422483B85 1021102D101A103A +1143 222422483B85 1023101A103A +1144 222422483B86 1021102F101A1039 +1145 222422483B86 1025101A1039 +1146 222422483B86 1021102F101A103A +1147 222422483B86 1025101A103A +1148 222422483B87 10211031101A1039 +1149 222422483B87 1027101A1039 +1150 222422483B87 10211031101A103A +1151 222422483B87 1027101A103A +1152 222422483B88 10211031102C101A1039 +1153 222422483B88 1029101A1039 +1154 222422483B88 10211031102C101A103A +1155 222422483B88 1029101A103A +1156 222422483B88 10211031102C101A1039 +1157 222422483B88 10291031102C101A1039 +1158 222422483B88 10211031102C101A103A +1159 222422483B88 10291031102C101A103A +1160 222422483B8C 1021102D101B1039 +1161 222422483B8C 1023101B1039 +1162 222422483B8C 1021102D101B103A +1163 222422483B8C 1023101B103A +1164 222422483B8D 1021102F101B1039 +1165 222422483B8D 1025101B1039 +1166 222422483B8D 1021102F101B103A +1167 222422483B8D 1025101B103A +1168 222422483B8E 10211031101B1039 +1169 222422483B8E 1027101B1039 +1170 222422483B8E 10211031101B103A +1171 222422483B8E 1027101B103A +1172 222422483B8F 10211031102C101B1039 +1173 222422483B8F 1029101B1039 +1174 222422483B8F 10211031102C101B103A +1175 222422483B8F 1029101B103A +1176 222422483B8F 10211031102C101B1039 +1177 222422483B8F 10291031102C101B1039 +1178 222422483B8F 10211031102C101B103A +1179 222422483B8F 10291031102C101B103A +1180 222422483B93 1021102D101C1039 +1181 222422483B93 1023101C1039 +1182 222422483B93 1021102D101C103A +1183 222422483B93 1023101C103A +1184 222422483B94 1021102F101C1039 +1185 222422483B94 1025101C1039 +1186 222422483B94 1021102F101C103A +1187 222422483B94 1025101C103A +1188 222422483B95 10211031101C1039 +1189 222422483B95 1027101C1039 +1190 222422483B95 10211031101C103A +1191 222422483B95 1027101C103A +1192 222422483B96 10211031102C101C1039 +1193 222422483B96 1029101C1039 +1194 222422483B96 10211031102C101C103A +1195 222422483B96 1029101C103A +1196 222422483B96 10211031102C101C1039 +1197 222422483B96 10291031102C101C1039 +1198 222422483B96 10211031102C101C103A +1199 222422483B96 10291031102C101C103A +1200 222422483BA1 1021102D101E1039 +1201 222422483BA1 1023101E1039 +1202 222422483BA1 1021102D101E103A +1203 222422483BA1 1023101E103A +1204 222422483BA2 1021102F101E1039 +1205 222422483BA2 1025101E1039 +1206 222422483BA2 1021102F101E103A +1207 222422483BA2 1025101E103A +1208 222422483BA3 10211031101E1039 +1209 222422483BA3 1027101E1039 +1210 222422483BA3 10211031101E103A +1211 222422483BA3 1027101E103A +1212 222422483BA4 10211031102C101E1039 +1213 222422483BA4 1029101E1039 +1214 222422483BA4 10211031102C101E103A +1215 222422483BA4 1029101E103A +1216 222422483BA4 10211031102C101E1039 +1217 222422483BA4 10291031102C101E1039 +1218 222422483BA4 10211031102C101E103A +1219 222422483BA4 10291031102C101E103A +1220 222422483BA8 1021102D101F1039 +1221 222422483BA8 1023101F1039 +1222 222422483BA8 1021102D101F103A +1223 222422483BA8 1023101F103A +1224 222422483BA9 1021102F101F1039 +1225 222422483BA9 1025101F1039 +1226 222422483BA9 1021102F101F103A +1227 222422483BA9 1025101F103A +1228 222422483BAA 10211031101F1039 +1229 222422483BAA 1027101F1039 +1230 222422483BAA 10211031101F103A +1231 222422483BAA 1027101F103A +1232 222422483BAB 10211031102C101F1039 +1233 222422483BAB 1029101F1039 +1234 222422483BAB 10211031102C101F103A +1235 222422483BAB 1029101F103A +1236 222422483BAB 10211031102C101F1039 +1237 222422483BAB 10291031102C101F1039 +1238 222422483BAB 10211031102C101F103A +1239 222422483BAB 10291031102C101F103A +1240 --- Contractions +1241 22483AD221CD22483BBD 1031102C1000103A1000103B +1242 22483AD221CD22483BBD 1031102C1000103A103B +1243 22483B5921F822483B63 1014103A1014102F1015103A +1244 22483B5921F822483B63 1014103A102F1015103A +1245 --- Great Sa +1246 22483BA32216 1031101E1039101E +1247 22483BA32216 1031103F +1248 22483BA12216 102D101E1039101E +1249 22483BA12216 102D103F +1250 22483BA22216 102F101E1039101E +1251 22483BA22216 102F103F +1252 222422483BA12216 1021102D101E1039101E +1253 222422483BA12216 1023103F +1254 222422483BA22216 1021102F101E1039101E +1255 222422483BA22216 1025103F +1256 22483B9F2216 101E1039101E +1257 22483B9F2216 103F +1258 --- Symbols - collate as long form +1259 21F822483BC222483AD3 1014103E102D102F1000103A +1260 21F822483BC222483AD3 104C +1261 220922483BC0224222593ACB 101B103D10311037 +1262 220922483BC0224222593ACB 104D +1263 220D22483B1322593ACC21CD22483AEE22593ACC 101C100A103A103810001031102C1004103A1038 +1264 220D22483B1322593ACC21CD22483AEE22593ACC 104E1004103A1038 +1265 22242236 1021102D +1266 22242236 104F +1267 --- Short Forms may need to be added here +1268 220D22483ACD22072232 101C1000103A101A102C +1269 220D22483ACD22072232 101C1000103A103B102C +1270 221622052238 101E1019102E +1271 221622052238 101E10391019102E +1272 21F3220522483AE922593ACC 101110191004103A1038 +1273 21F3220522483AE922593ACC 1011103910191004103A1038 +1274 220D22483ACD220422483ACD 101C1000103A10181000103A +1275 220D22483ACD220422483ACD 101C103910181000103A +DROP TABLE t1; +# +# END of ctype_myanmar.inc +# +# +# End of MariaDB-10.0 tests +# diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index fee27ef177f..7a3ff3732c3 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -270,7 +270,7 @@ b select * from t1 where a = 'b' and a != 'b'; a drop table t1; -set collation_connection=utf8_general_ci; +set names utf8; drop table if exists t1; create table t1 as select repeat(' ', 64) as s1, repeat(' ',64) as s2 @@ -314,8 +314,21 @@ NULL NULL NULL drop table t1; -set names utf8; -set names utf8; +SELECT @@character_set_client, @@collation_connection; +@@character_set_client @@collation_connection +utf8 utf8_general_ci +select 'ваÑÑ' rlike '\\bваÑÑ\\b'; +'ваÑÑ' rlike '\\bваÑÑ\\b' +1 +select 'ваÑÑ ' rlike '\\bваÑÑ\\b'; +'ваÑÑ ' rlike '\\bваÑÑ\\b' +1 +select ' ваÑÑ' rlike '\\bваÑÑ\\b'; +' ваÑÑ' rlike '\\bваÑÑ\\b' +1 +select ' ваÑÑ ' rlike '\\bваÑÑ\\b'; +' ваÑÑ ' rlike '\\bваÑÑ\\b' +1 select 'ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'; 'ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]' 1 @@ -328,6 +341,15 @@ select ' ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'; select ' ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]'; ' ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]' 1 +select 'ваÑÑz' rlike '\\bваÑÑ\\b'; +'ваÑÑz' rlike '\\bваÑÑ\\b' +0 +select 'zваÑÑ' rlike '\\bваÑÑ\\b'; +'zваÑÑ' rlike '\\bваÑÑ\\b' +0 +select 'zваÑÑz' rlike '\\bваÑÑ\\b'; +'zваÑÑz' rlike '\\bваÑÑ\\b' +0 select 'ваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]'; 'ваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]' 0 @@ -941,6 +963,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf8_general_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf8_general_ci @@ -959,41 +1032,122 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; c2h ab_def drop table t1; +"BEGIN ctype_german.inc" drop table if exists t1; create table t1 as select repeat(' ', 64) as s1; select collation(s1) from t1; collation(s1) utf8_general_ci delete from t1; +INSERT INTO t1 VALUES ('ud'),('uf'); +INSERT INTO t1 VALUES ('od'),('of'); +INSERT INTO t1 VALUES ('e'); +INSERT INTO t1 VALUES ('ad'),('af'); insert into t1 values ('a'),('ae'),(_latin1 0xE4); insert into t1 values ('o'),('oe'),(_latin1 0xF6); insert into t1 values ('s'),('ss'),(_latin1 0xDF); insert into t1 values ('u'),('ue'),(_latin1 0xFC); +INSERT INTO t1 VALUES (_latin1 0xE6), (_latin1 0xC6); +INSERT INTO t1 VALUES (_latin1 0x9C), (_latin1 0x8C); select s1, hex(s1) from t1 order by s1, binary s1; s1 hex(s1) a 61 ä C3A4 +ad 6164 ae 6165 +af 6166 +e 65 o 6F ö C3B6 +od 6F64 oe 6F65 +of 6F66 s 73 ß C39F ss 7373 u 75 ü C3BC +ud 7564 ue 7565 +uf 7566 +Æ C386 +æ C3A6 +Å’ C592 +Å“ C593 select group_concat(s1 order by binary s1) from t1 group by s1; group_concat(s1 order by binary s1) a,ä +ad ae +af +e o,ö +od oe +of s,ß ss u,ü +ud ue +uf +Æ,æ +Å’,Å“ +SELECT s1, hex(s1), hex(weight_string(s1)) FROM t1 ORDER BY s1, BINARY(s1); +s1 hex(s1) hex(weight_string(s1)) +a 61 0041 +ä C3A4 0041 +ad 6164 00410044 +ae 6165 00410045 +af 6166 00410046 +e 65 0045 +o 6F 004F +ö C3B6 004F +od 6F64 004F0044 +oe 6F65 004F0045 +of 6F66 004F0046 +s 73 0053 +ß C39F 0053 +ss 7373 00530053 +u 75 0055 +ü C3BC 0055 +ud 7564 00550044 +ue 7565 00550045 +uf 7566 00550046 +Æ C386 00C6 +æ C3A6 00C6 +Å’ C592 0152 +Å“ C593 0152 +SELECT s1, hex(s1) FROM t1 WHERE s1='ae' ORDER BY s1, BINARY(s1); +s1 hex(s1) +ae 6165 drop table t1; +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf8 NOT NULL DEFAULT '', + `b` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); +SELECT * FROM t1 ORDER BY a, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY a DESC, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a), b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a) DESC, b; +a b +s 0 +ß 1 +DROP TABLE t1; +"END ctype_german.inc" # # MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32 # @@ -1011,7 +1165,7 @@ pattern varchar(64) NO INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d'); SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1; HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern) -32303031C3B73031C3B73031 2559C3B7256DC3B72564 2001-01-01 00:00:00 +32303031C3B73031C3B73031 2559C3B7256DC3B72564 2001-01-01 00:00:00.000000 DROP TABLE t1; SET collation_connection='utf8_bin'; create table t1 select repeat('a',4000) a; @@ -1040,6 +1194,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf8_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf8_bin @@ -1282,7 +1487,7 @@ DROP TABLE t1; SET NAMES utf8; DROP TABLE IF EXISTS t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8; INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); INSERT INTO t1 VALUES('uu'); @@ -1597,6 +1802,41 @@ substr(Z.a,-1) a 3 123 6 456 drop table t1; +SET CHARACTER SET utf8; +SHOW VARIABLES LIKE 'character\_set\_%'; +Variable_name Value +character_set_client utf8 +character_set_connection latin1 +character_set_database latin1 +character_set_filesystem binary +character_set_results utf8 +character_set_server latin1 +character_set_system utf8 +CREATE DATABASE crashtest DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; +USE crashtest; +CREATE TABLE crashtest (crash char(10)) DEFAULT CHARSET=utf8; +INSERT INTO crashtest VALUES ('35'), ('36'), ('37'); +SELECT * FROM crashtest ORDER BY CHAR(crash USING utf8); +crash +35 +36 +37 +INSERT INTO crashtest VALUES ('-1000'); +EXPLAIN SELECT * FROM crashtest ORDER BY CHAR(crash USING utf8); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE crashtest ALL NULL NULL NULL NULL 4 Using filesort +SELECT * FROM crashtest ORDER BY CHAR(crash USING utf8); +crash +-1000 +35 +36 +37 +Warnings: +Warning 1300 Invalid utf8 character string: 'FFFFFC' +DROP TABLE crashtest; +DROP DATABASE crashtest; +USE test; +SET CHARACTER SET default; CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8; INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa'); SELECT id FROM t1; @@ -5957,3 +6197,3936 @@ DROP TABLE t1; # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#3664 WEIGHT_STRING +# +set names utf8; +select @@collation_connection; +@@collation_connection +utf8_general_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf8 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0041 +SELECT HEX(ws) FROM t2; +HEX(ws) +0041 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET utf8 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +00410041004100410041 +SELECT HEX(ws) FROM t2; +HEX(ws) +00410041004100410041 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +004100410041 +SELECT HEX(ws) FROM t2; +HEX(ws) +004100410041 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +0041004100410041004100200020002000200020 +SELECT HEX(ws) FROM t2; +HEX(ws) +0041004100410041004100200020002000200020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +0041 +select hex(weight_string('A')); +hex(weight_string('A')) +0041 +select hex(weight_string('abc')); +hex(weight_string('abc')) +004100420043 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +00410042 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +004100420043 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +00410042004300200020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +00 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0041 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +004100 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +00410042002000200020002000200020002000200020002000 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +00 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0041 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +004100 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +00410042004300200020002000200020002000200020002000 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +00 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0041 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +004100 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +00410042004300200020002000200020002000200020002000 +select @@collation_connection; +@@collation_connection +utf8_general_ci +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +20AC20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +20AC20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +20AC20AC20AC00200020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +20AC20AC00 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +20AC20AC002000200020002000200020002000200020002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +20AC20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +20AC20AC20AC00200020002000200020002000200020002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +20AC20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +20AC20AC20AC00200020002000200020002000200020002000 +select @@collation_connection; +@@collation_connection +utf8_general_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +0041 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +0041 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +004100420043 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +00410042 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +004100420043 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +00410042004300200020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +20002000430042004100 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +FFBEFFBDFFBCFFDFFFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFFFDFFFBCFFBDFFBEFF +set @@collation_connection=utf8_bin; +select @@collation_connection; +@@collation_connection +utf8_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0061 +SELECT HEX(ws) FROM t2; +HEX(ws) +0061 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +00610061006100610061 +SELECT HEX(ws) FROM t2; +HEX(ws) +00610061006100610061 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +006100610061 +SELECT HEX(ws) FROM t2; +HEX(ws) +006100610061 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +0061006100610061006100200020002000200020 +SELECT HEX(ws) FROM t2; +HEX(ws) +0061006100610061006100200020002000200020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +0061 +select hex(weight_string('A')); +hex(weight_string('A')) +0041 +select hex(weight_string('abc')); +hex(weight_string('abc')) +006100620063 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +00610062 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +006100620063 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +00610062006300200020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +00 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0061 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +006100 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +00610062 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0061006200 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +00610062002000200020002000200020002000200020002000 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +00 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0061 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +006100 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +00610062 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0061006200 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +00610062006300200020002000200020002000200020002000 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +00 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0061 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +006100 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +00610062 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0061006200 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +00610062006300200020002000200020002000200020002000 +select @@collation_connection; +@@collation_connection +utf8_bin +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +20AC20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +20AC20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +20AC20AC20AC00200020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +20AC20AC00 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +20AC20AC002000200020002000200020002000200020002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +20AC20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +20AC20AC20AC00200020002000200020002000200020002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +20AC20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +20AC20AC20AC00200020002000200020002000200020002000 +select @@collation_connection; +@@collation_connection +utf8_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +0061 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +0041 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +006100620063 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +00610062 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +006100620063 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +00610062006300200020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +20002000630062006100 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +FF9EFF9DFF9CFFDFFFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFFFDFFF9CFF9DFF9EFF +# +# Checking strnxfrm() with odd length +# +set max_sort_length=5; +select @@max_sort_length; +@@max_sort_length +5 +create table t1 (a varchar(128) character set utf8 collate utf8_general_ci); +insert into t1 values ('a'),('b'),('c'); +select * from t1 order by a; +a +a +b +c +alter table t1 modify a varchar(128) character set utf8 collate utf8_bin; +select * from t1 order by a; +a +a +b +c +drop table t1; +set max_sort_length=default; +# +# End of 5.6 tests +# +# +# Start of 10.0 tests +# +SET NAMES utf8 COLLATE utf8_bin; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a ')) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +SET NAMES utf8; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE CONCAT(c1)='a'; +c1 +a +a +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a '; +c1 +a +SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a '; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a ')) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('a'),('a '); +SELECT * FROM t1 WHERE 'a'=CONCAT(c1); +c1 +a +a +SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1); +c1 +a +SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +c1 +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '% '=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('%'),('% '); +SELECT * FROM t1 WHERE '%'=CONCAT(c1); +c1 +% +% +SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1); +c1 +% +SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +c1 +% +EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`))) +DROP TABLE t1; +# +# MDEV-7149 Constant condition propagation erroneously applied for LIKE +# +CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('ae'),('ä'); +SELECT * FROM t1 WHERE c1='ä'; +c1 +ä +SELECT * FROM t1 WHERE c1 LIKE 'ae'; +c1 +ae +SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae'; +c1 +EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((`test`.`t1`.`c1` = 'ä') and (`test`.`t1`.`c1` like 'ae')) +SELECT * FROM t1 WHERE CONCAT(c1)='ä'; +c1 +ä +SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'ae'; +c1 +ae +SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae'; +c1 +EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'ä') and (concat(`test`.`t1`.`c1`) like 'ae')) +DROP TABLE IF EXISTS t1; +# +# MDEV-6666 Malformed result for CONCAT(utf8_column, binary_string) +# +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8); +INSERT INTO t1 VALUES ('a'); +SELECT CONCAT(a,0xFF) FROM t1; +ERROR HY000: Invalid utf8 character string: 'FF' +SELECT CONCAT(a,0xC3BF) FROM t1; +CONCAT(a,0xC3BF) +aÿ +DROP TABLE t1; +SELECT CONCAT('a' COLLATE utf8_unicode_ci, _binary 0xFF); +ERROR HY000: Invalid utf8 character string: 'FF' +PREPARE stmt FROM "SELECT CONCAT('a' COLLATE utf8_unicode_ci, ?)"; +SET @arg00=_binary 0xFF; +EXECUTE stmt USING @arg00; +ERROR HY000: Invalid utf8 character string: 'FF' +DEALLOCATE PREPARE stmt; +SET NAMES latin1; +PREPARE stmt FROM "SELECT CONCAT(_utf8'a' COLLATE utf8_unicode_ci, ?)"; +EXECUTE stmt USING @no_such_var; +CONCAT(_utf8'a' COLLATE utf8_unicode_ci, ?) +NULL +DEALLOCATE PREPARE stmt; +SET NAMES utf8; +# +# MDEV-6679 Different optimizer plan for "a BETWEEN 'string' AND ?" and "a BETWEEN ? AND 'string'" +# +SET NAMES utf8, collation_connection=utf8_swedish_ci; +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8, b INT NOT NULL DEFAULT 0, key(a)); +INSERT INTO t1 (a) VALUES ('a'),('b'),('c'),('d'),('¢'); +SET @arg='¢'; +PREPARE stmt FROM "EXPLAIN SELECT * FROM t1 WHERE a BETWEEN _utf8'¢' and ?"; +EXECUTE stmt USING @arg; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 33 NULL 1 Using index condition +PREPARE stmt FROM "EXPLAIN SELECT * FROM t1 WHERE a between ? and _utf8'¢'"; +EXECUTE stmt USING @arg; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 33 NULL 1 Using index condition +DEALLOCATE PREPARE stmt; +DROP TABLE t1; +# +# MDEV-6683 A parameter and a string literal with the same values are not recognized as equal by the optimizer +# +SET NAMES utf8, collation_connection=utf8_swedish_ci; +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1, b INT NOT NULL DEFAULT 0, key(a)); +INSERT INTO t1 (a) VALUES ('a'),('b'),('c'),('d'),('¢'); +SET @arg='¢'; +PREPARE stmt FROM "EXPLAIN SELECT * FROM t1 WHERE a BETWEEN _utf8'¢' and ?"; +EXECUTE stmt USING @arg; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref a a 13 const 1 Using index condition +PREPARE stmt FROM "EXPLAIN SELECT * FROM t1 WHERE a between ? and _utf8'¢'"; +EXECUTE stmt USING @arg; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref a a 13 const 1 Using index condition +DEALLOCATE PREPARE stmt; +DROP TABLE t1; +# +# MDEV-6688 Illegal mix of collation with bit string B'01100001' +# +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1, b INT); +INSERT INTO t1 VALUES ('a',1); +SELECT CONCAT(a, IF(b>10, _utf8 X'61', _utf8 X'61')) FROM t1; +CONCAT(a, IF(b>10, _utf8 X'61', _utf8 X'61')) +aa +SELECT CONCAT(a, IF(b>10, _utf8 X'61', _utf8 B'01100001')) FROM t1; +CONCAT(a, IF(b>10, _utf8 X'61', _utf8 B'01100001')) +aa +DROP TABLE t1; +# +# MDEV-6694 Illegal mix of collation with a PS parameter +# +SET NAMES utf8; +CREATE TABLE t1 (a INT, b VARCHAR(10) CHARACTER SET latin1); +INSERT INTO t1 VALUES (1,'a'); +SELECT CONCAT(b,IF(a,'b','b')) FROM t1; +CONCAT(b,IF(a,'b','b')) +ab +PREPARE stmt FROM "SELECT CONCAT(b,IF(a,?,?)) FROM t1"; +SET @b='b'; +EXECUTE stmt USING @b,@b; +CONCAT(b,IF(a,?,?)) +ab +SET @b=''; +EXECUTE stmt USING @b,@b; +CONCAT(b,IF(a,?,?)) +a +SET @b='Ñ'; +EXECUTE stmt USING @b,@b; +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'concat' +DEALLOCATE PREPARE stmt; +DROP TABLE t1; +# +# MDEV-7629 Regression: Bit and hex string literals changed column names in 10.0.14 +# +SELECT _utf8 0x7E, _utf8 X'7E', _utf8 B'01111110'; +_utf8 0x7E _utf8 X'7E' _utf8 B'01111110' +~ ~ ~ +# Start of ctype_unescape.inc +SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection'; +PREPARE stmt FROM @query; +EXECUTE stmt; +CHARSET('test') @@character_set_client @@character_set_connection +utf8 utf8 utf8 +DEALLOCATE PREPARE stmt; +CREATE TABLE allbytes (a VARBINARY(10)); +# Using selected bytes combinations +CREATE TABLE halfs (a INT); +INSERT INTO halfs VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07); +INSERT INTO halfs VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +CREATE TEMPORARY TABLE bytes (a BINARY(1), KEY(a)) ENGINE=MyISAM; +INSERT INTO bytes SELECT CHAR((t1.a << 4) | t2.a USING BINARY) FROM halfs t1, halfs t2; +DROP TABLE halfs; +CREATE TABLE selected_bytes (a VARBINARY(10)); +INSERT INTO selected_bytes (a) VALUES ('\0'),('\b'),('\t'),('\r'),('\n'),('\Z'); +INSERT INTO selected_bytes (a) VALUES ('0'),('b'),('t'),('r'),('n'),('Z'); +INSERT INTO selected_bytes (a) VALUES ('\\'),('_'),('%'),(0x22),(0x27); +INSERT INTO selected_bytes (a) VALUES ('a'); +INSERT INTO selected_bytes (a) VALUES +(0x3F), # 7bit +(0x40), # 7bit mbtail +(0x7E), # 7bit mbtail nonascii-8bit +(0x7F), # 7bit nonascii-8bit +(0x80), # mbtail bad-mb +(0x81), # mbhead mbtail +(0x9F), # mbhead mbtail bad-mb +(0xA0), # mbhead mbtail bad-mb +(0xA1), # mbhead mbtail nonascii-8bit +(0xE0), # mbhead mbtai +(0xEF), # mbhead mbtail +(0xF9), # mbhead mbtail +(0xFA), # mbhead mbtail bad-mb +(0xFC), # mbhead mbtail bad-mb +(0xFD), # mbhead mbtail bad-mb +(0xFE), # mbhead mbtial bad-mb +(0xFF); +INSERT INTO allbytes (a) SELECT a FROM bytes; +INSERT INTO allbytes (a) SELECT CONCAT(t1.a,t2.a) FROM selected_bytes t1,selected_bytes t2; +INSERT INTO allbytes (a) SELECT CONCAT(0x5C,t1.a,t2.a) FROM selected_bytes t1,selected_bytes t2; +INSERT INTO allbytes (a) SELECT CONCAT(0x5C,t1.a,0x5C,t2.a) FROM selected_bytes t1,selected_bytes t2; +DROP TABLE selected_bytes; +DELETE FROM allbytes WHERE +OCTET_LENGTH(a)>1 AND +LOCATE(0x5C,a)=0 AND +a NOT LIKE '%\'%' AND + a NOT LIKE '%"%'; +CREATE PROCEDURE p1(val VARBINARY(10)) +BEGIN +DECLARE EXIT HANDLER FOR SQLSTATE '42000' INSERT INTO t1 (a,b) VALUES(val,NULL); +SET @query=CONCAT(_binary"INSERT INTO t1 (a,b) VALUES (0x",HEX(val),",'",val,"')"); +PREPARE stmt FROM @query; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; +END// +CREATE PROCEDURE p2() +BEGIN +DECLARE val VARBINARY(10); +DECLARE done INT DEFAULT FALSE; +DECLARE stmt CURSOR FOR SELECT a FROM allbytes; +DECLARE CONTINUE HANDLER FOR NOT FOUND SET done=TRUE; +OPEN stmt; +read_loop1: LOOP +FETCH stmt INTO val; +IF done THEN +LEAVE read_loop1; +END IF; +CALL p1(val); +END LOOP; +CLOSE stmt; +END// +CREATE FUNCTION iswellformed(a VARBINARY(256)) RETURNS INT RETURN a=BINARY CONVERT(a USING utf8);// +CREATE FUNCTION unescape(a VARBINARY(256)) RETURNS VARBINARY(256) +BEGIN +# We need to do it in a way to avoid producing new escape sequences +# First, enclose all known escsape sequences to '{{xx}}' + # - Backslash not followed by a LIKE pattern characters _ and % +# - Double escapes +# This uses PCRE Branch Reset Groups: (?|(alt1)|(alt2)|(alt3)). +# So '\\1' in the last argument always means the match, no matter +# which alternative it came from. +SET a=REGEXP_REPLACE(a,'(?|(\\\\[^_%])|(\\x{27}\\x{27}))','{{\\1}}'); +# Now unescape all enclosed standard escape sequences +SET a=REPLACE(a,'{{\\0}}', '\0'); +SET a=REPLACE(a,'{{\\b}}', '\b'); +SET a=REPLACE(a,'{{\\t}}', '\t'); +SET a=REPLACE(a,'{{\\r}}', '\r'); +SET a=REPLACE(a,'{{\\n}}', '\n'); +SET a=REPLACE(a,'{{\\Z}}', '\Z'); +SET a=REPLACE(a,'{{\\\'}}', '\''); +# Unescape double quotes +SET a=REPLACE(a,'{{\'\'}}', '\''); + # Unescape the rest: all other \x sequences mean just 'x' + SET a=REGEXP_REPLACE(a, '{{\\\\(.|\\R)}}', '\\1'); + RETURN a; +END// +CREATE FUNCTION unescape_type(a VARBINARY(256),b VARBINARY(256)) RETURNS VARBINARY(256) +BEGIN +RETURN CASE +WHEN b IS NULL THEN '[SyntErr]' + WHEN a=b THEN CASE +WHEN OCTET_LENGTH(a)=1 THEN '[Preserve]' + WHEN a RLIKE '\\\\[_%]' THEN '[Preserve][LIKE]' + WHEN a RLIKE '^[[:ascii:]]+$' THEN '[Preserve][ASCII]' + ELSE '[Preserv][MB]' END +WHEN REPLACE(a,0x5C,'')=b THEN '[Trivial]' + WHEN UNESCAPE(a)=b THEN '[Regular]' + ELSE '[Special]' END; +END// +CREATE FUNCTION wellformedness(a VARBINARY(256), b VARBINARY(256)) +RETURNS VARBINARY(256) +BEGIN +RETURN CASE +WHEN b IS NULL THEN '' + WHEN NOT iswellformed(a) AND iswellformed(b) THEN '[FIXED]' + WHEN iswellformed(a) AND NOT iswellformed(b) THEN '[BROKE]' + WHEN NOT iswellformed(a) AND NOT iswellformed(b) THEN '[ILSEQ]' + ELSE '' + END; +END// +CREATE FUNCTION mysql_real_escape_string_generated(a VARBINARY(256)) +RETURNS VARBINARY(256) +BEGIN +DECLARE a1 BINARY(1) DEFAULT SUBSTR(a,1,1); +DECLARE a2 BINARY(1) DEFAULT SUBSTR(a,2,1); +DECLARE a3 BINARY(1) DEFAULT SUBSTR(a,3,1); +DECLARE a4 BINARY(1) DEFAULT SUBSTR(a,4,1); +DECLARE a2a4 BINARY(2) DEFAULT CONCAT(a2,a4); +RETURN CASE +WHEN (a1=0x5C) AND +(a3=0x5C) AND +(a2>0x7F) AND +(a4 NOT IN ('_','%','0','t','r','n','Z')) AND +iswellformed(a2a4) THEN '[USER]' + ELSE '' + END; +END// +CREATE TABLE t1 (a VARBINARY(10),b VARBINARY(10)); +CALL p2(); +SELECT HEX(a),HEX(b), +CONCAT(unescape_type(a,b), +wellformedness(a,b), +mysql_real_escape_string_generated(a), +IF(UNESCAPE(a)<>b,CONCAT('[BAD',HEX(UNESCAPE(a)),']'),'')) AS comment +FROM t1 ORDER BY LENGTH(a),a; +HEX(a) HEX(b) comment +00 00 [Preserve] +01 01 [Preserve] +02 02 [Preserve] +03 03 [Preserve] +04 04 [Preserve] +05 05 [Preserve] +06 06 [Preserve] +07 07 [Preserve] +08 08 [Preserve] +09 09 [Preserve] +0A 0A [Preserve] +0B 0B [Preserve] +0C 0C [Preserve] +0D 0D [Preserve] +0E 0E [Preserve] +0F 0F [Preserve] +10 10 [Preserve] +11 11 [Preserve] +12 12 [Preserve] +13 13 [Preserve] +14 14 [Preserve] +15 15 [Preserve] +16 16 [Preserve] +17 17 [Preserve] +18 18 [Preserve] +19 19 [Preserve] +1A 1A [Preserve] +1B 1B [Preserve] +1C 1C [Preserve] +1D 1D [Preserve] +1E 1E [Preserve] +1F 1F [Preserve] +20 20 [Preserve] +21 21 [Preserve] +22 22 [Preserve] +23 23 [Preserve] +24 24 [Preserve] +25 25 [Preserve] +26 26 [Preserve] +27 NULL [SyntErr] +28 28 [Preserve] +29 29 [Preserve] +2A 2A [Preserve] +2B 2B [Preserve] +2C 2C [Preserve] +2D 2D [Preserve] +2E 2E [Preserve] +2F 2F [Preserve] +30 30 [Preserve] +31 31 [Preserve] +32 32 [Preserve] +33 33 [Preserve] +34 34 [Preserve] +35 35 [Preserve] +36 36 [Preserve] +37 37 [Preserve] +38 38 [Preserve] +39 39 [Preserve] +3A 3A [Preserve] +3B 3B [Preserve] +3C 3C [Preserve] +3D 3D [Preserve] +3E 3E [Preserve] +3F 3F [Preserve] +40 40 [Preserve] +41 41 [Preserve] +42 42 [Preserve] +43 43 [Preserve] +44 44 [Preserve] +45 45 [Preserve] +46 46 [Preserve] +47 47 [Preserve] +48 48 [Preserve] +49 49 [Preserve] +4A 4A [Preserve] +4B 4B [Preserve] +4C 4C [Preserve] +4D 4D [Preserve] +4E 4E [Preserve] +4F 4F [Preserve] +50 50 [Preserve] +51 51 [Preserve] +52 52 [Preserve] +53 53 [Preserve] +54 54 [Preserve] +55 55 [Preserve] +56 56 [Preserve] +57 57 [Preserve] +58 58 [Preserve] +59 59 [Preserve] +5A 5A [Preserve] +5B 5B [Preserve] +5C NULL [SyntErr] +5D 5D [Preserve] +5E 5E [Preserve] +5F 5F [Preserve] +60 60 [Preserve] +61 61 [Preserve] +62 62 [Preserve] +63 63 [Preserve] +64 64 [Preserve] +65 65 [Preserve] +66 66 [Preserve] +67 67 [Preserve] +68 68 [Preserve] +69 69 [Preserve] +6A 6A [Preserve] +6B 6B [Preserve] +6C 6C [Preserve] +6D 6D [Preserve] +6E 6E [Preserve] +6F 6F [Preserve] +70 70 [Preserve] +71 71 [Preserve] +72 72 [Preserve] +73 73 [Preserve] +74 74 [Preserve] +75 75 [Preserve] +76 76 [Preserve] +77 77 [Preserve] +78 78 [Preserve] +79 79 [Preserve] +7A 7A [Preserve] +7B 7B [Preserve] +7C 7C [Preserve] +7D 7D [Preserve] +7E 7E [Preserve] +7F 7F [Preserve] +80 80 [Preserve][ILSEQ] +81 81 [Preserve][ILSEQ] +82 82 [Preserve][ILSEQ] +83 83 [Preserve][ILSEQ] +84 84 [Preserve][ILSEQ] +85 85 [Preserve][ILSEQ] +86 86 [Preserve][ILSEQ] +87 87 [Preserve][ILSEQ] +88 88 [Preserve][ILSEQ] +89 89 [Preserve][ILSEQ] +8A 8A [Preserve][ILSEQ] +8B 8B [Preserve][ILSEQ] +8C 8C [Preserve][ILSEQ] +8D 8D [Preserve][ILSEQ] +8E 8E [Preserve][ILSEQ] +8F 8F [Preserve][ILSEQ] +90 90 [Preserve][ILSEQ] +91 91 [Preserve][ILSEQ] +92 92 [Preserve][ILSEQ] +93 93 [Preserve][ILSEQ] +94 94 [Preserve][ILSEQ] +95 95 [Preserve][ILSEQ] +96 96 [Preserve][ILSEQ] +97 97 [Preserve][ILSEQ] +98 98 [Preserve][ILSEQ] +99 99 [Preserve][ILSEQ] +9A 9A [Preserve][ILSEQ] +9B 9B [Preserve][ILSEQ] +9C 9C [Preserve][ILSEQ] +9D 9D [Preserve][ILSEQ] +9E 9E [Preserve][ILSEQ] +9F 9F [Preserve][ILSEQ] +A0 A0 [Preserve][ILSEQ] +A1 A1 [Preserve][ILSEQ] +A2 A2 [Preserve][ILSEQ] +A3 A3 [Preserve][ILSEQ] +A4 A4 [Preserve][ILSEQ] +A5 A5 [Preserve][ILSEQ] +A6 A6 [Preserve][ILSEQ] +A7 A7 [Preserve][ILSEQ] +A8 A8 [Preserve][ILSEQ] +A9 A9 [Preserve][ILSEQ] +AA AA [Preserve][ILSEQ] +AB AB [Preserve][ILSEQ] +AC AC [Preserve][ILSEQ] +AD AD [Preserve][ILSEQ] +AE AE [Preserve][ILSEQ] +AF AF [Preserve][ILSEQ] +B0 B0 [Preserve][ILSEQ] +B1 B1 [Preserve][ILSEQ] +B2 B2 [Preserve][ILSEQ] +B3 B3 [Preserve][ILSEQ] +B4 B4 [Preserve][ILSEQ] +B5 B5 [Preserve][ILSEQ] +B6 B6 [Preserve][ILSEQ] +B7 B7 [Preserve][ILSEQ] +B8 B8 [Preserve][ILSEQ] +B9 B9 [Preserve][ILSEQ] +BA BA [Preserve][ILSEQ] +BB BB [Preserve][ILSEQ] +BC BC [Preserve][ILSEQ] +BD BD [Preserve][ILSEQ] +BE BE [Preserve][ILSEQ] +BF BF [Preserve][ILSEQ] +C0 C0 [Preserve][ILSEQ] +C1 C1 [Preserve][ILSEQ] +C2 C2 [Preserve][ILSEQ] +C3 C3 [Preserve][ILSEQ] +C4 C4 [Preserve][ILSEQ] +C5 C5 [Preserve][ILSEQ] +C6 C6 [Preserve][ILSEQ] +C7 C7 [Preserve][ILSEQ] +C8 C8 [Preserve][ILSEQ] +C9 C9 [Preserve][ILSEQ] +CA CA [Preserve][ILSEQ] +CB CB [Preserve][ILSEQ] +CC CC [Preserve][ILSEQ] +CD CD [Preserve][ILSEQ] +CE CE [Preserve][ILSEQ] +CF CF [Preserve][ILSEQ] +D0 D0 [Preserve][ILSEQ] +D1 D1 [Preserve][ILSEQ] +D2 D2 [Preserve][ILSEQ] +D3 D3 [Preserve][ILSEQ] +D4 D4 [Preserve][ILSEQ] +D5 D5 [Preserve][ILSEQ] +D6 D6 [Preserve][ILSEQ] +D7 D7 [Preserve][ILSEQ] +D8 D8 [Preserve][ILSEQ] +D9 D9 [Preserve][ILSEQ] +DA DA [Preserve][ILSEQ] +DB DB [Preserve][ILSEQ] +DC DC [Preserve][ILSEQ] +DD DD [Preserve][ILSEQ] +DE DE [Preserve][ILSEQ] +DF DF [Preserve][ILSEQ] +E0 E0 [Preserve][ILSEQ] +E1 E1 [Preserve][ILSEQ] +E2 E2 [Preserve][ILSEQ] +E3 E3 [Preserve][ILSEQ] +E4 E4 [Preserve][ILSEQ] +E5 E5 [Preserve][ILSEQ] +E6 E6 [Preserve][ILSEQ] +E7 E7 [Preserve][ILSEQ] +E8 E8 [Preserve][ILSEQ] +E9 E9 [Preserve][ILSEQ] +EA EA [Preserve][ILSEQ] +EB EB [Preserve][ILSEQ] +EC EC [Preserve][ILSEQ] +ED ED [Preserve][ILSEQ] +EE EE [Preserve][ILSEQ] +EF EF [Preserve][ILSEQ] +F0 F0 [Preserve][ILSEQ] +F1 F1 [Preserve][ILSEQ] +F2 F2 [Preserve][ILSEQ] +F3 F3 [Preserve][ILSEQ] +F4 F4 [Preserve][ILSEQ] +F5 F5 [Preserve][ILSEQ] +F6 F6 [Preserve][ILSEQ] +F7 F7 [Preserve][ILSEQ] +F8 F8 [Preserve][ILSEQ] +F9 F9 [Preserve][ILSEQ] +FA FA [Preserve][ILSEQ] +FB FB [Preserve][ILSEQ] +FC FC [Preserve][ILSEQ] +FD FD [Preserve][ILSEQ] +FE FE [Preserve][ILSEQ] +FF FF [Preserve][ILSEQ] +0022 0022 [Preserve][ASCII] +0027 NULL [SyntErr] +005C NULL [SyntErr] +0822 0822 [Preserve][ASCII] +0827 NULL [SyntErr] +085C NULL [SyntErr] +0922 0922 [Preserve][ASCII] +0927 NULL [SyntErr] +095C NULL [SyntErr] +0A22 0A22 [Preserve][ASCII] +0A27 NULL [SyntErr] +0A5C NULL [SyntErr] +0D22 0D22 [Preserve][ASCII] +0D27 NULL [SyntErr] +0D5C NULL [SyntErr] +1A22 1A22 [Preserve][ASCII] +1A27 NULL [SyntErr] +1A5C NULL [SyntErr] +2200 2200 [Preserve][ASCII] +2208 2208 [Preserve][ASCII] +2209 2209 [Preserve][ASCII] +220A 220A [Preserve][ASCII] +220D 220D [Preserve][ASCII] +221A 221A [Preserve][ASCII] +2222 2222 [Preserve][ASCII] +2225 2225 [Preserve][ASCII] +2227 NULL [SyntErr] +2230 2230 [Preserve][ASCII] +223F 223F [Preserve][ASCII] +2240 2240 [Preserve][ASCII] +225A 225A [Preserve][ASCII] +225C NULL [SyntErr] +225F 225F [Preserve][ASCII] +2261 2261 [Preserve][ASCII] +2262 2262 [Preserve][ASCII] +226E 226E [Preserve][ASCII] +2272 2272 [Preserve][ASCII] +2274 2274 [Preserve][ASCII] +227E 227E [Preserve][ASCII] +227F 227F [Preserve][ASCII] +2280 2280 [Preserv][MB][ILSEQ] +2281 2281 [Preserv][MB][ILSEQ] +229F 229F [Preserv][MB][ILSEQ] +22A0 22A0 [Preserv][MB][ILSEQ] +22A1 22A1 [Preserv][MB][ILSEQ] +22E0 22E0 [Preserv][MB][ILSEQ] +22EF 22EF [Preserv][MB][ILSEQ] +22F9 22F9 [Preserv][MB][ILSEQ] +22FA 22FA [Preserv][MB][ILSEQ] +22FC 22FC [Preserv][MB][ILSEQ] +22FD 22FD [Preserv][MB][ILSEQ] +22FE 22FE [Preserv][MB][ILSEQ] +22FF 22FF [Preserv][MB][ILSEQ] +2522 2522 [Preserve][ASCII] +2527 NULL [SyntErr] +255C NULL [SyntErr] +2700 NULL [SyntErr] +2708 NULL [SyntErr] +2709 NULL [SyntErr] +270A NULL [SyntErr] +270D NULL [SyntErr] +271A NULL [SyntErr] +2722 NULL [SyntErr] +2725 NULL [SyntErr] +2727 27 [Regular] +2730 NULL [SyntErr] +273F NULL [SyntErr] +2740 NULL [SyntErr] +275A NULL [SyntErr] +275C NULL [SyntErr] +275F NULL [SyntErr] +2761 NULL [SyntErr] +2762 NULL [SyntErr] +276E NULL [SyntErr] +2772 NULL [SyntErr] +2774 NULL [SyntErr] +277E NULL [SyntErr] +277F NULL [SyntErr] +2780 NULL [SyntErr] +2781 NULL [SyntErr] +279F NULL [SyntErr] +27A0 NULL [SyntErr] +27A1 NULL [SyntErr] +27E0 NULL [SyntErr] +27EF NULL [SyntErr] +27F9 NULL [SyntErr] +27FA NULL [SyntErr] +27FC NULL [SyntErr] +27FD NULL [SyntErr] +27FE NULL [SyntErr] +27FF NULL [SyntErr] +3022 3022 [Preserve][ASCII] +3027 NULL [SyntErr] +305C NULL [SyntErr] +3F22 3F22 [Preserve][ASCII] +3F27 NULL [SyntErr] +3F5C NULL [SyntErr] +4022 4022 [Preserve][ASCII] +4027 NULL [SyntErr] +405C NULL [SyntErr] +5A22 5A22 [Preserve][ASCII] +5A27 NULL [SyntErr] +5A5C NULL [SyntErr] +5C00 00 [Trivial] +5C08 08 [Trivial] +5C09 09 [Trivial] +5C0A 0A [Trivial] +5C0D 0D [Trivial] +5C1A 1A [Trivial] +5C22 22 [Trivial] +5C25 5C25 [Preserve][LIKE] +5C27 27 [Trivial] +5C30 00 [Regular] +5C3F 3F [Trivial] +5C40 40 [Trivial] +5C5A 1A [Regular] +5C5C 5C [Regular] +5C5F 5C5F [Preserve][LIKE] +5C61 61 [Trivial] +5C62 08 [Regular] +5C6E 0A [Regular] +5C72 0D [Regular] +5C74 09 [Regular] +5C7E 7E [Trivial] +5C7F 7F [Trivial] +5C80 80 [Trivial][ILSEQ] +5C81 81 [Trivial][ILSEQ] +5C9F 9F [Trivial][ILSEQ] +5CA0 A0 [Trivial][ILSEQ] +5CA1 A1 [Trivial][ILSEQ] +5CE0 E0 [Trivial][ILSEQ] +5CEF EF [Trivial][ILSEQ] +5CF9 F9 [Trivial][ILSEQ] +5CFA FA [Trivial][ILSEQ] +5CFC FC [Trivial][ILSEQ] +5CFD FD [Trivial][ILSEQ] +5CFE FE [Trivial][ILSEQ] +5CFF FF [Trivial][ILSEQ] +5F22 5F22 [Preserve][ASCII] +5F27 NULL [SyntErr] +5F5C NULL [SyntErr] +6122 6122 [Preserve][ASCII] +6127 NULL [SyntErr] +615C NULL [SyntErr] +6222 6222 [Preserve][ASCII] +6227 NULL [SyntErr] +625C NULL [SyntErr] +6E22 6E22 [Preserve][ASCII] +6E27 NULL [SyntErr] +6E5C NULL [SyntErr] +7222 7222 [Preserve][ASCII] +7227 NULL [SyntErr] +725C NULL [SyntErr] +7422 7422 [Preserve][ASCII] +7427 NULL [SyntErr] +745C NULL [SyntErr] +7E22 7E22 [Preserve][ASCII] +7E27 NULL [SyntErr] +7E5C NULL [SyntErr] +7F22 7F22 [Preserve][ASCII] +7F27 NULL [SyntErr] +7F5C NULL [SyntErr] +8022 8022 [Preserv][MB][ILSEQ] +8027 NULL [SyntErr] +805C NULL [SyntErr] +8122 8122 [Preserv][MB][ILSEQ] +8127 NULL [SyntErr] +815C NULL [SyntErr] +9F22 9F22 [Preserv][MB][ILSEQ] +9F27 NULL [SyntErr] +9F5C NULL [SyntErr] +A022 A022 [Preserv][MB][ILSEQ] +A027 NULL [SyntErr] +A05C NULL [SyntErr] +A122 A122 [Preserv][MB][ILSEQ] +A127 NULL [SyntErr] +A15C NULL [SyntErr] +E022 E022 [Preserv][MB][ILSEQ] +E027 NULL [SyntErr] +E05C NULL [SyntErr] +EF22 EF22 [Preserv][MB][ILSEQ] +EF27 NULL [SyntErr] +EF5C NULL [SyntErr] +F922 F922 [Preserv][MB][ILSEQ] +F927 NULL [SyntErr] +F95C NULL [SyntErr] +FA22 FA22 [Preserv][MB][ILSEQ] +FA27 NULL [SyntErr] +FA5C NULL [SyntErr] +FC22 FC22 [Preserv][MB][ILSEQ] +FC27 NULL [SyntErr] +FC5C NULL [SyntErr] +FD22 FD22 [Preserv][MB][ILSEQ] +FD27 NULL [SyntErr] +FD5C NULL [SyntErr] +FE22 FE22 [Preserv][MB][ILSEQ] +FE27 NULL [SyntErr] +FE5C NULL [SyntErr] +FF22 FF22 [Preserv][MB][ILSEQ] +FF27 NULL [SyntErr] +FF5C NULL [SyntErr] +5C0000 0000 [Trivial] +5C0008 0008 [Trivial] +5C0009 0009 [Trivial] +5C000A 000A [Trivial] +5C000D 000D [Trivial] +5C001A 001A [Trivial] +5C0022 0022 [Trivial] +5C0025 0025 [Trivial] +5C0027 NULL [SyntErr] +5C0030 0030 [Trivial] +5C003F 003F [Trivial] +5C0040 0040 [Trivial] +5C005A 005A [Trivial] +5C005C NULL [SyntErr] +5C005F 005F [Trivial] +5C0061 0061 [Trivial] +5C0062 0062 [Trivial] +5C006E 006E [Trivial] +5C0072 0072 [Trivial] +5C0074 0074 [Trivial] +5C007E 007E [Trivial] +5C007F 007F [Trivial] +5C0080 0080 [Trivial][ILSEQ] +5C0081 0081 [Trivial][ILSEQ] +5C009F 009F [Trivial][ILSEQ] +5C00A0 00A0 [Trivial][ILSEQ] +5C00A1 00A1 [Trivial][ILSEQ] +5C00E0 00E0 [Trivial][ILSEQ] +5C00EF 00EF [Trivial][ILSEQ] +5C00F9 00F9 [Trivial][ILSEQ] +5C00FA 00FA [Trivial][ILSEQ] +5C00FC 00FC [Trivial][ILSEQ] +5C00FD 00FD [Trivial][ILSEQ] +5C00FE 00FE [Trivial][ILSEQ] +5C00FF 00FF [Trivial][ILSEQ] +5C0800 0800 [Trivial] +5C0808 0808 [Trivial] +5C0809 0809 [Trivial] +5C080A 080A [Trivial] +5C080D 080D [Trivial] +5C081A 081A [Trivial] +5C0822 0822 [Trivial] +5C0825 0825 [Trivial] +5C0827 NULL [SyntErr] +5C0830 0830 [Trivial] +5C083F 083F [Trivial] +5C0840 0840 [Trivial] +5C085A 085A [Trivial] +5C085C NULL [SyntErr] +5C085F 085F [Trivial] +5C0861 0861 [Trivial] +5C0862 0862 [Trivial] +5C086E 086E [Trivial] +5C0872 0872 [Trivial] +5C0874 0874 [Trivial] +5C087E 087E [Trivial] +5C087F 087F [Trivial] +5C0880 0880 [Trivial][ILSEQ] +5C0881 0881 [Trivial][ILSEQ] +5C089F 089F [Trivial][ILSEQ] +5C08A0 08A0 [Trivial][ILSEQ] +5C08A1 08A1 [Trivial][ILSEQ] +5C08E0 08E0 [Trivial][ILSEQ] +5C08EF 08EF [Trivial][ILSEQ] +5C08F9 08F9 [Trivial][ILSEQ] +5C08FA 08FA [Trivial][ILSEQ] +5C08FC 08FC [Trivial][ILSEQ] +5C08FD 08FD [Trivial][ILSEQ] +5C08FE 08FE [Trivial][ILSEQ] +5C08FF 08FF [Trivial][ILSEQ] +5C0900 0900 [Trivial] +5C0908 0908 [Trivial] +5C0909 0909 [Trivial] +5C090A 090A [Trivial] +5C090D 090D [Trivial] +5C091A 091A [Trivial] +5C0922 0922 [Trivial] +5C0925 0925 [Trivial] +5C0927 NULL [SyntErr] +5C0930 0930 [Trivial] +5C093F 093F [Trivial] +5C0940 0940 [Trivial] +5C095A 095A [Trivial] +5C095C NULL [SyntErr] +5C095F 095F [Trivial] +5C0961 0961 [Trivial] +5C0962 0962 [Trivial] +5C096E 096E [Trivial] +5C0972 0972 [Trivial] +5C0974 0974 [Trivial] +5C097E 097E [Trivial] +5C097F 097F [Trivial] +5C0980 0980 [Trivial][ILSEQ] +5C0981 0981 [Trivial][ILSEQ] +5C099F 099F [Trivial][ILSEQ] +5C09A0 09A0 [Trivial][ILSEQ] +5C09A1 09A1 [Trivial][ILSEQ] +5C09E0 09E0 [Trivial][ILSEQ] +5C09EF 09EF [Trivial][ILSEQ] +5C09F9 09F9 [Trivial][ILSEQ] +5C09FA 09FA [Trivial][ILSEQ] +5C09FC 09FC [Trivial][ILSEQ] +5C09FD 09FD [Trivial][ILSEQ] +5C09FE 09FE [Trivial][ILSEQ] +5C09FF 09FF [Trivial][ILSEQ] +5C0A00 0A00 [Trivial] +5C0A08 0A08 [Trivial] +5C0A09 0A09 [Trivial] +5C0A0A 0A0A [Trivial] +5C0A0D 0A0D [Trivial] +5C0A1A 0A1A [Trivial] +5C0A22 0A22 [Trivial] +5C0A25 0A25 [Trivial] +5C0A27 NULL [SyntErr] +5C0A30 0A30 [Trivial] +5C0A3F 0A3F [Trivial] +5C0A40 0A40 [Trivial] +5C0A5A 0A5A [Trivial] +5C0A5C NULL [SyntErr] +5C0A5F 0A5F [Trivial] +5C0A61 0A61 [Trivial] +5C0A62 0A62 [Trivial] +5C0A6E 0A6E [Trivial] +5C0A72 0A72 [Trivial] +5C0A74 0A74 [Trivial] +5C0A7E 0A7E [Trivial] +5C0A7F 0A7F [Trivial] +5C0A80 0A80 [Trivial][ILSEQ] +5C0A81 0A81 [Trivial][ILSEQ] +5C0A9F 0A9F [Trivial][ILSEQ] +5C0AA0 0AA0 [Trivial][ILSEQ] +5C0AA1 0AA1 [Trivial][ILSEQ] +5C0AE0 0AE0 [Trivial][ILSEQ] +5C0AEF 0AEF [Trivial][ILSEQ] +5C0AF9 0AF9 [Trivial][ILSEQ] +5C0AFA 0AFA [Trivial][ILSEQ] +5C0AFC 0AFC [Trivial][ILSEQ] +5C0AFD 0AFD [Trivial][ILSEQ] +5C0AFE 0AFE [Trivial][ILSEQ] +5C0AFF 0AFF [Trivial][ILSEQ] +5C0D00 0D00 [Trivial] +5C0D08 0D08 [Trivial] +5C0D09 0D09 [Trivial] +5C0D0A 0D0A [Trivial] +5C0D0D 0D0D [Trivial] +5C0D1A 0D1A [Trivial] +5C0D22 0D22 [Trivial] +5C0D25 0D25 [Trivial] +5C0D27 NULL [SyntErr] +5C0D30 0D30 [Trivial] +5C0D3F 0D3F [Trivial] +5C0D40 0D40 [Trivial] +5C0D5A 0D5A [Trivial] +5C0D5C NULL [SyntErr] +5C0D5F 0D5F [Trivial] +5C0D61 0D61 [Trivial] +5C0D62 0D62 [Trivial] +5C0D6E 0D6E [Trivial] +5C0D72 0D72 [Trivial] +5C0D74 0D74 [Trivial] +5C0D7E 0D7E [Trivial] +5C0D7F 0D7F [Trivial] +5C0D80 0D80 [Trivial][ILSEQ] +5C0D81 0D81 [Trivial][ILSEQ] +5C0D9F 0D9F [Trivial][ILSEQ] +5C0DA0 0DA0 [Trivial][ILSEQ] +5C0DA1 0DA1 [Trivial][ILSEQ] +5C0DE0 0DE0 [Trivial][ILSEQ] +5C0DEF 0DEF [Trivial][ILSEQ] +5C0DF9 0DF9 [Trivial][ILSEQ] +5C0DFA 0DFA [Trivial][ILSEQ] +5C0DFC 0DFC [Trivial][ILSEQ] +5C0DFD 0DFD [Trivial][ILSEQ] +5C0DFE 0DFE [Trivial][ILSEQ] +5C0DFF 0DFF [Trivial][ILSEQ] +5C1A00 1A00 [Trivial] +5C1A08 1A08 [Trivial] +5C1A09 1A09 [Trivial] +5C1A0A 1A0A [Trivial] +5C1A0D 1A0D [Trivial] +5C1A1A 1A1A [Trivial] +5C1A22 1A22 [Trivial] +5C1A25 1A25 [Trivial] +5C1A27 NULL [SyntErr] +5C1A30 1A30 [Trivial] +5C1A3F 1A3F [Trivial] +5C1A40 1A40 [Trivial] +5C1A5A 1A5A [Trivial] +5C1A5C NULL [SyntErr] +5C1A5F 1A5F [Trivial] +5C1A61 1A61 [Trivial] +5C1A62 1A62 [Trivial] +5C1A6E 1A6E [Trivial] +5C1A72 1A72 [Trivial] +5C1A74 1A74 [Trivial] +5C1A7E 1A7E [Trivial] +5C1A7F 1A7F [Trivial] +5C1A80 1A80 [Trivial][ILSEQ] +5C1A81 1A81 [Trivial][ILSEQ] +5C1A9F 1A9F [Trivial][ILSEQ] +5C1AA0 1AA0 [Trivial][ILSEQ] +5C1AA1 1AA1 [Trivial][ILSEQ] +5C1AE0 1AE0 [Trivial][ILSEQ] +5C1AEF 1AEF [Trivial][ILSEQ] +5C1AF9 1AF9 [Trivial][ILSEQ] +5C1AFA 1AFA [Trivial][ILSEQ] +5C1AFC 1AFC [Trivial][ILSEQ] +5C1AFD 1AFD [Trivial][ILSEQ] +5C1AFE 1AFE [Trivial][ILSEQ] +5C1AFF 1AFF [Trivial][ILSEQ] +5C2200 2200 [Trivial] +5C2208 2208 [Trivial] +5C2209 2209 [Trivial] +5C220A 220A [Trivial] +5C220D 220D [Trivial] +5C221A 221A [Trivial] +5C2222 2222 [Trivial] +5C2225 2225 [Trivial] +5C2227 NULL [SyntErr] +5C2230 2230 [Trivial] +5C223F 223F [Trivial] +5C2240 2240 [Trivial] +5C225A 225A [Trivial] +5C225C NULL [SyntErr] +5C225F 225F [Trivial] +5C2261 2261 [Trivial] +5C2262 2262 [Trivial] +5C226E 226E [Trivial] +5C2272 2272 [Trivial] +5C2274 2274 [Trivial] +5C227E 227E [Trivial] +5C227F 227F [Trivial] +5C2280 2280 [Trivial][ILSEQ] +5C2281 2281 [Trivial][ILSEQ] +5C229F 229F [Trivial][ILSEQ] +5C22A0 22A0 [Trivial][ILSEQ] +5C22A1 22A1 [Trivial][ILSEQ] +5C22E0 22E0 [Trivial][ILSEQ] +5C22EF 22EF [Trivial][ILSEQ] +5C22F9 22F9 [Trivial][ILSEQ] +5C22FA 22FA [Trivial][ILSEQ] +5C22FC 22FC [Trivial][ILSEQ] +5C22FD 22FD [Trivial][ILSEQ] +5C22FE 22FE [Trivial][ILSEQ] +5C22FF 22FF [Trivial][ILSEQ] +5C2500 5C2500 [Preserve][LIKE] +5C2508 5C2508 [Preserve][LIKE] +5C2509 5C2509 [Preserve][LIKE] +5C250A 5C250A [Preserve][LIKE] +5C250D 5C250D [Preserve][LIKE] +5C251A 5C251A [Preserve][LIKE] +5C2522 5C2522 [Preserve][LIKE] +5C2525 5C2525 [Preserve][LIKE] +5C2527 NULL [SyntErr] +5C2530 5C2530 [Preserve][LIKE] +5C253F 5C253F [Preserve][LIKE] +5C2540 5C2540 [Preserve][LIKE] +5C255A 5C255A [Preserve][LIKE] +5C255C NULL [SyntErr] +5C255F 5C255F [Preserve][LIKE] +5C2561 5C2561 [Preserve][LIKE] +5C2562 5C2562 [Preserve][LIKE] +5C256E 5C256E [Preserve][LIKE] +5C2572 5C2572 [Preserve][LIKE] +5C2574 5C2574 [Preserve][LIKE] +5C257E 5C257E [Preserve][LIKE] +5C257F 5C257F [Preserve][LIKE] +5C2580 5C2580 [Preserve][LIKE][ILSEQ] +5C2581 5C2581 [Preserve][LIKE][ILSEQ] +5C259F 5C259F [Preserve][LIKE][ILSEQ] +5C25A0 5C25A0 [Preserve][LIKE][ILSEQ] +5C25A1 5C25A1 [Preserve][LIKE][ILSEQ] +5C25E0 5C25E0 [Preserve][LIKE][ILSEQ] +5C25EF 5C25EF [Preserve][LIKE][ILSEQ] +5C25F9 5C25F9 [Preserve][LIKE][ILSEQ] +5C25FA 5C25FA [Preserve][LIKE][ILSEQ] +5C25FC 5C25FC [Preserve][LIKE][ILSEQ] +5C25FD 5C25FD [Preserve][LIKE][ILSEQ] +5C25FE 5C25FE [Preserve][LIKE][ILSEQ] +5C25FF 5C25FF [Preserve][LIKE][ILSEQ] +5C2700 2700 [Trivial] +5C2708 2708 [Trivial] +5C2709 2709 [Trivial] +5C270A 270A [Trivial] +5C270D 270D [Trivial] +5C271A 271A [Trivial] +5C2722 2722 [Trivial] +5C2725 2725 [Trivial] +5C2727 NULL [SyntErr] +5C2730 2730 [Trivial] +5C273F 273F [Trivial] +5C2740 2740 [Trivial] +5C275A 275A [Trivial] +5C275C NULL [SyntErr] +5C275F 275F [Trivial] +5C2761 2761 [Trivial] +5C2762 2762 [Trivial] +5C276E 276E [Trivial] +5C2772 2772 [Trivial] +5C2774 2774 [Trivial] +5C277E 277E [Trivial] +5C277F 277F [Trivial] +5C2780 2780 [Trivial][ILSEQ] +5C2781 2781 [Trivial][ILSEQ] +5C279F 279F [Trivial][ILSEQ] +5C27A0 27A0 [Trivial][ILSEQ] +5C27A1 27A1 [Trivial][ILSEQ] +5C27E0 27E0 [Trivial][ILSEQ] +5C27EF 27EF [Trivial][ILSEQ] +5C27F9 27F9 [Trivial][ILSEQ] +5C27FA 27FA [Trivial][ILSEQ] +5C27FC 27FC [Trivial][ILSEQ] +5C27FD 27FD [Trivial][ILSEQ] +5C27FE 27FE [Trivial][ILSEQ] +5C27FF 27FF [Trivial][ILSEQ] +5C3000 0000 [Regular] +5C3008 0008 [Regular] +5C3009 0009 [Regular] +5C300A 000A [Regular] +5C300D 000D [Regular] +5C301A 001A [Regular] +5C3022 0022 [Regular] +5C3025 0025 [Regular] +5C3027 NULL [SyntErr] +5C3030 0030 [Regular] +5C303F 003F [Regular] +5C3040 0040 [Regular] +5C305A 005A [Regular] +5C305C NULL [SyntErr] +5C305F 005F [Regular] +5C3061 0061 [Regular] +5C3062 0062 [Regular] +5C306E 006E [Regular] +5C3072 0072 [Regular] +5C3074 0074 [Regular] +5C307E 007E [Regular] +5C307F 007F [Regular] +5C3080 0080 [Regular][ILSEQ] +5C3081 0081 [Regular][ILSEQ] +5C309F 009F [Regular][ILSEQ] +5C30A0 00A0 [Regular][ILSEQ] +5C30A1 00A1 [Regular][ILSEQ] +5C30E0 00E0 [Regular][ILSEQ] +5C30EF 00EF [Regular][ILSEQ] +5C30F9 00F9 [Regular][ILSEQ] +5C30FA 00FA [Regular][ILSEQ] +5C30FC 00FC [Regular][ILSEQ] +5C30FD 00FD [Regular][ILSEQ] +5C30FE 00FE [Regular][ILSEQ] +5C30FF 00FF [Regular][ILSEQ] +5C3F00 3F00 [Trivial] +5C3F08 3F08 [Trivial] +5C3F09 3F09 [Trivial] +5C3F0A 3F0A [Trivial] +5C3F0D 3F0D [Trivial] +5C3F1A 3F1A [Trivial] +5C3F22 3F22 [Trivial] +5C3F25 3F25 [Trivial] +5C3F27 NULL [SyntErr] +5C3F30 3F30 [Trivial] +5C3F3F 3F3F [Trivial] +5C3F40 3F40 [Trivial] +5C3F5A 3F5A [Trivial] +5C3F5C NULL [SyntErr] +5C3F5F 3F5F [Trivial] +5C3F61 3F61 [Trivial] +5C3F62 3F62 [Trivial] +5C3F6E 3F6E [Trivial] +5C3F72 3F72 [Trivial] +5C3F74 3F74 [Trivial] +5C3F7E 3F7E [Trivial] +5C3F7F 3F7F [Trivial] +5C3F80 3F80 [Trivial][ILSEQ] +5C3F81 3F81 [Trivial][ILSEQ] +5C3F9F 3F9F [Trivial][ILSEQ] +5C3FA0 3FA0 [Trivial][ILSEQ] +5C3FA1 3FA1 [Trivial][ILSEQ] +5C3FE0 3FE0 [Trivial][ILSEQ] +5C3FEF 3FEF [Trivial][ILSEQ] +5C3FF9 3FF9 [Trivial][ILSEQ] +5C3FFA 3FFA [Trivial][ILSEQ] +5C3FFC 3FFC [Trivial][ILSEQ] +5C3FFD 3FFD [Trivial][ILSEQ] +5C3FFE 3FFE [Trivial][ILSEQ] +5C3FFF 3FFF [Trivial][ILSEQ] +5C4000 4000 [Trivial] +5C4008 4008 [Trivial] +5C4009 4009 [Trivial] +5C400A 400A [Trivial] +5C400D 400D [Trivial] +5C401A 401A [Trivial] +5C4022 4022 [Trivial] +5C4025 4025 [Trivial] +5C4027 NULL [SyntErr] +5C4030 4030 [Trivial] +5C403F 403F [Trivial] +5C4040 4040 [Trivial] +5C405A 405A [Trivial] +5C405C NULL [SyntErr] +5C405F 405F [Trivial] +5C4061 4061 [Trivial] +5C4062 4062 [Trivial] +5C406E 406E [Trivial] +5C4072 4072 [Trivial] +5C4074 4074 [Trivial] +5C407E 407E [Trivial] +5C407F 407F [Trivial] +5C4080 4080 [Trivial][ILSEQ] +5C4081 4081 [Trivial][ILSEQ] +5C409F 409F [Trivial][ILSEQ] +5C40A0 40A0 [Trivial][ILSEQ] +5C40A1 40A1 [Trivial][ILSEQ] +5C40E0 40E0 [Trivial][ILSEQ] +5C40EF 40EF [Trivial][ILSEQ] +5C40F9 40F9 [Trivial][ILSEQ] +5C40FA 40FA [Trivial][ILSEQ] +5C40FC 40FC [Trivial][ILSEQ] +5C40FD 40FD [Trivial][ILSEQ] +5C40FE 40FE [Trivial][ILSEQ] +5C40FF 40FF [Trivial][ILSEQ] +5C5A00 1A00 [Regular] +5C5A08 1A08 [Regular] +5C5A09 1A09 [Regular] +5C5A0A 1A0A [Regular] +5C5A0D 1A0D [Regular] +5C5A1A 1A1A [Regular] +5C5A22 1A22 [Regular] +5C5A25 1A25 [Regular] +5C5A27 NULL [SyntErr] +5C5A30 1A30 [Regular] +5C5A3F 1A3F [Regular] +5C5A40 1A40 [Regular] +5C5A5A 1A5A [Regular] +5C5A5C NULL [SyntErr] +5C5A5F 1A5F [Regular] +5C5A61 1A61 [Regular] +5C5A62 1A62 [Regular] +5C5A6E 1A6E [Regular] +5C5A72 1A72 [Regular] +5C5A74 1A74 [Regular] +5C5A7E 1A7E [Regular] +5C5A7F 1A7F [Regular] +5C5A80 1A80 [Regular][ILSEQ] +5C5A81 1A81 [Regular][ILSEQ] +5C5A9F 1A9F [Regular][ILSEQ] +5C5AA0 1AA0 [Regular][ILSEQ] +5C5AA1 1AA1 [Regular][ILSEQ] +5C5AE0 1AE0 [Regular][ILSEQ] +5C5AEF 1AEF [Regular][ILSEQ] +5C5AF9 1AF9 [Regular][ILSEQ] +5C5AFA 1AFA [Regular][ILSEQ] +5C5AFC 1AFC [Regular][ILSEQ] +5C5AFD 1AFD [Regular][ILSEQ] +5C5AFE 1AFE [Regular][ILSEQ] +5C5AFF 1AFF [Regular][ILSEQ] +5C5C00 5C00 [Regular] +5C5C08 5C08 [Regular] +5C5C09 5C09 [Regular] +5C5C0A 5C0A [Regular] +5C5C0D 5C0D [Regular] +5C5C1A 5C1A [Regular] +5C5C22 5C22 [Regular] +5C5C25 5C25 [Regular] +5C5C27 NULL [SyntErr] +5C5C30 5C30 [Regular] +5C5C3F 5C3F [Regular] +5C5C40 5C40 [Regular] +5C5C5A 5C5A [Regular] +5C5C5C NULL [SyntErr] +5C5C5F 5C5F [Regular] +5C5C61 5C61 [Regular] +5C5C62 5C62 [Regular] +5C5C6E 5C6E [Regular] +5C5C72 5C72 [Regular] +5C5C74 5C74 [Regular] +5C5C7E 5C7E [Regular] +5C5C7F 5C7F [Regular] +5C5C80 5C80 [Regular][ILSEQ] +5C5C81 5C81 [Regular][ILSEQ] +5C5C9F 5C9F [Regular][ILSEQ] +5C5CA0 5CA0 [Regular][ILSEQ] +5C5CA1 5CA1 [Regular][ILSEQ] +5C5CE0 5CE0 [Regular][ILSEQ] +5C5CEF 5CEF [Regular][ILSEQ] +5C5CF9 5CF9 [Regular][ILSEQ] +5C5CFA 5CFA [Regular][ILSEQ] +5C5CFC 5CFC [Regular][ILSEQ] +5C5CFD 5CFD [Regular][ILSEQ] +5C5CFE 5CFE [Regular][ILSEQ] +5C5CFF 5CFF [Regular][ILSEQ] +5C5F00 5C5F00 [Preserve][LIKE] +5C5F08 5C5F08 [Preserve][LIKE] +5C5F09 5C5F09 [Preserve][LIKE] +5C5F0A 5C5F0A [Preserve][LIKE] +5C5F0D 5C5F0D [Preserve][LIKE] +5C5F1A 5C5F1A [Preserve][LIKE] +5C5F22 5C5F22 [Preserve][LIKE] +5C5F25 5C5F25 [Preserve][LIKE] +5C5F27 NULL [SyntErr] +5C5F30 5C5F30 [Preserve][LIKE] +5C5F3F 5C5F3F [Preserve][LIKE] +5C5F40 5C5F40 [Preserve][LIKE] +5C5F5A 5C5F5A [Preserve][LIKE] +5C5F5C NULL [SyntErr] +5C5F5F 5C5F5F [Preserve][LIKE] +5C5F61 5C5F61 [Preserve][LIKE] +5C5F62 5C5F62 [Preserve][LIKE] +5C5F6E 5C5F6E [Preserve][LIKE] +5C5F72 5C5F72 [Preserve][LIKE] +5C5F74 5C5F74 [Preserve][LIKE] +5C5F7E 5C5F7E [Preserve][LIKE] +5C5F7F 5C5F7F [Preserve][LIKE] +5C5F80 5C5F80 [Preserve][LIKE][ILSEQ] +5C5F81 5C5F81 [Preserve][LIKE][ILSEQ] +5C5F9F 5C5F9F [Preserve][LIKE][ILSEQ] +5C5FA0 5C5FA0 [Preserve][LIKE][ILSEQ] +5C5FA1 5C5FA1 [Preserve][LIKE][ILSEQ] +5C5FE0 5C5FE0 [Preserve][LIKE][ILSEQ] +5C5FEF 5C5FEF [Preserve][LIKE][ILSEQ] +5C5FF9 5C5FF9 [Preserve][LIKE][ILSEQ] +5C5FFA 5C5FFA [Preserve][LIKE][ILSEQ] +5C5FFC 5C5FFC [Preserve][LIKE][ILSEQ] +5C5FFD 5C5FFD [Preserve][LIKE][ILSEQ] +5C5FFE 5C5FFE [Preserve][LIKE][ILSEQ] +5C5FFF 5C5FFF [Preserve][LIKE][ILSEQ] +5C6100 6100 [Trivial] +5C6108 6108 [Trivial] +5C6109 6109 [Trivial] +5C610A 610A [Trivial] +5C610D 610D [Trivial] +5C611A 611A [Trivial] +5C6122 6122 [Trivial] +5C6125 6125 [Trivial] +5C6127 NULL [SyntErr] +5C6130 6130 [Trivial] +5C613F 613F [Trivial] +5C6140 6140 [Trivial] +5C615A 615A [Trivial] +5C615C NULL [SyntErr] +5C615F 615F [Trivial] +5C6161 6161 [Trivial] +5C6162 6162 [Trivial] +5C616E 616E [Trivial] +5C6172 6172 [Trivial] +5C6174 6174 [Trivial] +5C617E 617E [Trivial] +5C617F 617F [Trivial] +5C6180 6180 [Trivial][ILSEQ] +5C6181 6181 [Trivial][ILSEQ] +5C619F 619F [Trivial][ILSEQ] +5C61A0 61A0 [Trivial][ILSEQ] +5C61A1 61A1 [Trivial][ILSEQ] +5C61E0 61E0 [Trivial][ILSEQ] +5C61EF 61EF [Trivial][ILSEQ] +5C61F9 61F9 [Trivial][ILSEQ] +5C61FA 61FA [Trivial][ILSEQ] +5C61FC 61FC [Trivial][ILSEQ] +5C61FD 61FD [Trivial][ILSEQ] +5C61FE 61FE [Trivial][ILSEQ] +5C61FF 61FF [Trivial][ILSEQ] +5C6200 0800 [Regular] +5C6208 0808 [Regular] +5C6209 0809 [Regular] +5C620A 080A [Regular] +5C620D 080D [Regular] +5C621A 081A [Regular] +5C6222 0822 [Regular] +5C6225 0825 [Regular] +5C6227 NULL [SyntErr] +5C6230 0830 [Regular] +5C623F 083F [Regular] +5C6240 0840 [Regular] +5C625A 085A [Regular] +5C625C NULL [SyntErr] +5C625F 085F [Regular] +5C6261 0861 [Regular] +5C6262 0862 [Regular] +5C626E 086E [Regular] +5C6272 0872 [Regular] +5C6274 0874 [Regular] +5C627E 087E [Regular] +5C627F 087F [Regular] +5C6280 0880 [Regular][ILSEQ] +5C6281 0881 [Regular][ILSEQ] +5C629F 089F [Regular][ILSEQ] +5C62A0 08A0 [Regular][ILSEQ] +5C62A1 08A1 [Regular][ILSEQ] +5C62E0 08E0 [Regular][ILSEQ] +5C62EF 08EF [Regular][ILSEQ] +5C62F9 08F9 [Regular][ILSEQ] +5C62FA 08FA [Regular][ILSEQ] +5C62FC 08FC [Regular][ILSEQ] +5C62FD 08FD [Regular][ILSEQ] +5C62FE 08FE [Regular][ILSEQ] +5C62FF 08FF [Regular][ILSEQ] +5C6E00 0A00 [Regular] +5C6E08 0A08 [Regular] +5C6E09 0A09 [Regular] +5C6E0A 0A0A [Regular] +5C6E0D 0A0D [Regular] +5C6E1A 0A1A [Regular] +5C6E22 0A22 [Regular] +5C6E25 0A25 [Regular] +5C6E27 NULL [SyntErr] +5C6E30 0A30 [Regular] +5C6E3F 0A3F [Regular] +5C6E40 0A40 [Regular] +5C6E5A 0A5A [Regular] +5C6E5C NULL [SyntErr] +5C6E5F 0A5F [Regular] +5C6E61 0A61 [Regular] +5C6E62 0A62 [Regular] +5C6E6E 0A6E [Regular] +5C6E72 0A72 [Regular] +5C6E74 0A74 [Regular] +5C6E7E 0A7E [Regular] +5C6E7F 0A7F [Regular] +5C6E80 0A80 [Regular][ILSEQ] +5C6E81 0A81 [Regular][ILSEQ] +5C6E9F 0A9F [Regular][ILSEQ] +5C6EA0 0AA0 [Regular][ILSEQ] +5C6EA1 0AA1 [Regular][ILSEQ] +5C6EE0 0AE0 [Regular][ILSEQ] +5C6EEF 0AEF [Regular][ILSEQ] +5C6EF9 0AF9 [Regular][ILSEQ] +5C6EFA 0AFA [Regular][ILSEQ] +5C6EFC 0AFC [Regular][ILSEQ] +5C6EFD 0AFD [Regular][ILSEQ] +5C6EFE 0AFE [Regular][ILSEQ] +5C6EFF 0AFF [Regular][ILSEQ] +5C7200 0D00 [Regular] +5C7208 0D08 [Regular] +5C7209 0D09 [Regular] +5C720A 0D0A [Regular] +5C720D 0D0D [Regular] +5C721A 0D1A [Regular] +5C7222 0D22 [Regular] +5C7225 0D25 [Regular] +5C7227 NULL [SyntErr] +5C7230 0D30 [Regular] +5C723F 0D3F [Regular] +5C7240 0D40 [Regular] +5C725A 0D5A [Regular] +5C725C NULL [SyntErr] +5C725F 0D5F [Regular] +5C7261 0D61 [Regular] +5C7262 0D62 [Regular] +5C726E 0D6E [Regular] +5C7272 0D72 [Regular] +5C7274 0D74 [Regular] +5C727E 0D7E [Regular] +5C727F 0D7F [Regular] +5C7280 0D80 [Regular][ILSEQ] +5C7281 0D81 [Regular][ILSEQ] +5C729F 0D9F [Regular][ILSEQ] +5C72A0 0DA0 [Regular][ILSEQ] +5C72A1 0DA1 [Regular][ILSEQ] +5C72E0 0DE0 [Regular][ILSEQ] +5C72EF 0DEF [Regular][ILSEQ] +5C72F9 0DF9 [Regular][ILSEQ] +5C72FA 0DFA [Regular][ILSEQ] +5C72FC 0DFC [Regular][ILSEQ] +5C72FD 0DFD [Regular][ILSEQ] +5C72FE 0DFE [Regular][ILSEQ] +5C72FF 0DFF [Regular][ILSEQ] +5C7400 0900 [Regular] +5C7408 0908 [Regular] +5C7409 0909 [Regular] +5C740A 090A [Regular] +5C740D 090D [Regular] +5C741A 091A [Regular] +5C7422 0922 [Regular] +5C7425 0925 [Regular] +5C7427 NULL [SyntErr] +5C7430 0930 [Regular] +5C743F 093F [Regular] +5C7440 0940 [Regular] +5C745A 095A [Regular] +5C745C NULL [SyntErr] +5C745F 095F [Regular] +5C7461 0961 [Regular] +5C7462 0962 [Regular] +5C746E 096E [Regular] +5C7472 0972 [Regular] +5C7474 0974 [Regular] +5C747E 097E [Regular] +5C747F 097F [Regular] +5C7480 0980 [Regular][ILSEQ] +5C7481 0981 [Regular][ILSEQ] +5C749F 099F [Regular][ILSEQ] +5C74A0 09A0 [Regular][ILSEQ] +5C74A1 09A1 [Regular][ILSEQ] +5C74E0 09E0 [Regular][ILSEQ] +5C74EF 09EF [Regular][ILSEQ] +5C74F9 09F9 [Regular][ILSEQ] +5C74FA 09FA [Regular][ILSEQ] +5C74FC 09FC [Regular][ILSEQ] +5C74FD 09FD [Regular][ILSEQ] +5C74FE 09FE [Regular][ILSEQ] +5C74FF 09FF [Regular][ILSEQ] +5C7E00 7E00 [Trivial] +5C7E08 7E08 [Trivial] +5C7E09 7E09 [Trivial] +5C7E0A 7E0A [Trivial] +5C7E0D 7E0D [Trivial] +5C7E1A 7E1A [Trivial] +5C7E22 7E22 [Trivial] +5C7E25 7E25 [Trivial] +5C7E27 NULL [SyntErr] +5C7E30 7E30 [Trivial] +5C7E3F 7E3F [Trivial] +5C7E40 7E40 [Trivial] +5C7E5A 7E5A [Trivial] +5C7E5C NULL [SyntErr] +5C7E5F 7E5F [Trivial] +5C7E61 7E61 [Trivial] +5C7E62 7E62 [Trivial] +5C7E6E 7E6E [Trivial] +5C7E72 7E72 [Trivial] +5C7E74 7E74 [Trivial] +5C7E7E 7E7E [Trivial] +5C7E7F 7E7F [Trivial] +5C7E80 7E80 [Trivial][ILSEQ] +5C7E81 7E81 [Trivial][ILSEQ] +5C7E9F 7E9F [Trivial][ILSEQ] +5C7EA0 7EA0 [Trivial][ILSEQ] +5C7EA1 7EA1 [Trivial][ILSEQ] +5C7EE0 7EE0 [Trivial][ILSEQ] +5C7EEF 7EEF [Trivial][ILSEQ] +5C7EF9 7EF9 [Trivial][ILSEQ] +5C7EFA 7EFA [Trivial][ILSEQ] +5C7EFC 7EFC [Trivial][ILSEQ] +5C7EFD 7EFD [Trivial][ILSEQ] +5C7EFE 7EFE [Trivial][ILSEQ] +5C7EFF 7EFF [Trivial][ILSEQ] +5C7F00 7F00 [Trivial] +5C7F08 7F08 [Trivial] +5C7F09 7F09 [Trivial] +5C7F0A 7F0A [Trivial] +5C7F0D 7F0D [Trivial] +5C7F1A 7F1A [Trivial] +5C7F22 7F22 [Trivial] +5C7F25 7F25 [Trivial] +5C7F27 NULL [SyntErr] +5C7F30 7F30 [Trivial] +5C7F3F 7F3F [Trivial] +5C7F40 7F40 [Trivial] +5C7F5A 7F5A [Trivial] +5C7F5C NULL [SyntErr] +5C7F5F 7F5F [Trivial] +5C7F61 7F61 [Trivial] +5C7F62 7F62 [Trivial] +5C7F6E 7F6E [Trivial] +5C7F72 7F72 [Trivial] +5C7F74 7F74 [Trivial] +5C7F7E 7F7E [Trivial] +5C7F7F 7F7F [Trivial] +5C7F80 7F80 [Trivial][ILSEQ] +5C7F81 7F81 [Trivial][ILSEQ] +5C7F9F 7F9F [Trivial][ILSEQ] +5C7FA0 7FA0 [Trivial][ILSEQ] +5C7FA1 7FA1 [Trivial][ILSEQ] +5C7FE0 7FE0 [Trivial][ILSEQ] +5C7FEF 7FEF [Trivial][ILSEQ] +5C7FF9 7FF9 [Trivial][ILSEQ] +5C7FFA 7FFA [Trivial][ILSEQ] +5C7FFC 7FFC [Trivial][ILSEQ] +5C7FFD 7FFD [Trivial][ILSEQ] +5C7FFE 7FFE [Trivial][ILSEQ] +5C7FFF 7FFF [Trivial][ILSEQ] +5C8000 8000 [Trivial][ILSEQ] +5C8008 8008 [Trivial][ILSEQ] +5C8009 8009 [Trivial][ILSEQ] +5C800A 800A [Trivial][ILSEQ] +5C800D 800D [Trivial][ILSEQ] +5C801A 801A [Trivial][ILSEQ] +5C8022 8022 [Trivial][ILSEQ] +5C8025 8025 [Trivial][ILSEQ] +5C8027 NULL [SyntErr] +5C8030 8030 [Trivial][ILSEQ] +5C803F 803F [Trivial][ILSEQ] +5C8040 8040 [Trivial][ILSEQ] +5C805A 805A [Trivial][ILSEQ] +5C805C NULL [SyntErr] +5C805F 805F [Trivial][ILSEQ] +5C8061 8061 [Trivial][ILSEQ] +5C8062 8062 [Trivial][ILSEQ] +5C806E 806E [Trivial][ILSEQ] +5C8072 8072 [Trivial][ILSEQ] +5C8074 8074 [Trivial][ILSEQ] +5C807E 807E [Trivial][ILSEQ] +5C807F 807F [Trivial][ILSEQ] +5C8080 8080 [Trivial][ILSEQ] +5C8081 8081 [Trivial][ILSEQ] +5C809F 809F [Trivial][ILSEQ] +5C80A0 80A0 [Trivial][ILSEQ] +5C80A1 80A1 [Trivial][ILSEQ] +5C80E0 80E0 [Trivial][ILSEQ] +5C80EF 80EF [Trivial][ILSEQ] +5C80F9 80F9 [Trivial][ILSEQ] +5C80FA 80FA [Trivial][ILSEQ] +5C80FC 80FC [Trivial][ILSEQ] +5C80FD 80FD [Trivial][ILSEQ] +5C80FE 80FE [Trivial][ILSEQ] +5C80FF 80FF [Trivial][ILSEQ] +5C8100 8100 [Trivial][ILSEQ] +5C8108 8108 [Trivial][ILSEQ] +5C8109 8109 [Trivial][ILSEQ] +5C810A 810A [Trivial][ILSEQ] +5C810D 810D [Trivial][ILSEQ] +5C811A 811A [Trivial][ILSEQ] +5C8122 8122 [Trivial][ILSEQ] +5C8125 8125 [Trivial][ILSEQ] +5C8127 NULL [SyntErr] +5C8130 8130 [Trivial][ILSEQ] +5C813F 813F [Trivial][ILSEQ] +5C8140 8140 [Trivial][ILSEQ] +5C815A 815A [Trivial][ILSEQ] +5C815C NULL [SyntErr] +5C815F 815F [Trivial][ILSEQ] +5C8161 8161 [Trivial][ILSEQ] +5C8162 8162 [Trivial][ILSEQ] +5C816E 816E [Trivial][ILSEQ] +5C8172 8172 [Trivial][ILSEQ] +5C8174 8174 [Trivial][ILSEQ] +5C817E 817E [Trivial][ILSEQ] +5C817F 817F [Trivial][ILSEQ] +5C8180 8180 [Trivial][ILSEQ] +5C8181 8181 [Trivial][ILSEQ] +5C819F 819F [Trivial][ILSEQ] +5C81A0 81A0 [Trivial][ILSEQ] +5C81A1 81A1 [Trivial][ILSEQ] +5C81E0 81E0 [Trivial][ILSEQ] +5C81EF 81EF [Trivial][ILSEQ] +5C81F9 81F9 [Trivial][ILSEQ] +5C81FA 81FA [Trivial][ILSEQ] +5C81FC 81FC [Trivial][ILSEQ] +5C81FD 81FD [Trivial][ILSEQ] +5C81FE 81FE [Trivial][ILSEQ] +5C81FF 81FF [Trivial][ILSEQ] +5C9F00 9F00 [Trivial][ILSEQ] +5C9F08 9F08 [Trivial][ILSEQ] +5C9F09 9F09 [Trivial][ILSEQ] +5C9F0A 9F0A [Trivial][ILSEQ] +5C9F0D 9F0D [Trivial][ILSEQ] +5C9F1A 9F1A [Trivial][ILSEQ] +5C9F22 9F22 [Trivial][ILSEQ] +5C9F25 9F25 [Trivial][ILSEQ] +5C9F27 NULL [SyntErr] +5C9F30 9F30 [Trivial][ILSEQ] +5C9F3F 9F3F [Trivial][ILSEQ] +5C9F40 9F40 [Trivial][ILSEQ] +5C9F5A 9F5A [Trivial][ILSEQ] +5C9F5C NULL [SyntErr] +5C9F5F 9F5F [Trivial][ILSEQ] +5C9F61 9F61 [Trivial][ILSEQ] +5C9F62 9F62 [Trivial][ILSEQ] +5C9F6E 9F6E [Trivial][ILSEQ] +5C9F72 9F72 [Trivial][ILSEQ] +5C9F74 9F74 [Trivial][ILSEQ] +5C9F7E 9F7E [Trivial][ILSEQ] +5C9F7F 9F7F [Trivial][ILSEQ] +5C9F80 9F80 [Trivial][ILSEQ] +5C9F81 9F81 [Trivial][ILSEQ] +5C9F9F 9F9F [Trivial][ILSEQ] +5C9FA0 9FA0 [Trivial][ILSEQ] +5C9FA1 9FA1 [Trivial][ILSEQ] +5C9FE0 9FE0 [Trivial][ILSEQ] +5C9FEF 9FEF [Trivial][ILSEQ] +5C9FF9 9FF9 [Trivial][ILSEQ] +5C9FFA 9FFA [Trivial][ILSEQ] +5C9FFC 9FFC [Trivial][ILSEQ] +5C9FFD 9FFD [Trivial][ILSEQ] +5C9FFE 9FFE [Trivial][ILSEQ] +5C9FFF 9FFF [Trivial][ILSEQ] +5CA000 A000 [Trivial][ILSEQ] +5CA008 A008 [Trivial][ILSEQ] +5CA009 A009 [Trivial][ILSEQ] +5CA00A A00A [Trivial][ILSEQ] +5CA00D A00D [Trivial][ILSEQ] +5CA01A A01A [Trivial][ILSEQ] +5CA022 A022 [Trivial][ILSEQ] +5CA025 A025 [Trivial][ILSEQ] +5CA027 NULL [SyntErr] +5CA030 A030 [Trivial][ILSEQ] +5CA03F A03F [Trivial][ILSEQ] +5CA040 A040 [Trivial][ILSEQ] +5CA05A A05A [Trivial][ILSEQ] +5CA05C NULL [SyntErr] +5CA05F A05F [Trivial][ILSEQ] +5CA061 A061 [Trivial][ILSEQ] +5CA062 A062 [Trivial][ILSEQ] +5CA06E A06E [Trivial][ILSEQ] +5CA072 A072 [Trivial][ILSEQ] +5CA074 A074 [Trivial][ILSEQ] +5CA07E A07E [Trivial][ILSEQ] +5CA07F A07F [Trivial][ILSEQ] +5CA080 A080 [Trivial][ILSEQ] +5CA081 A081 [Trivial][ILSEQ] +5CA09F A09F [Trivial][ILSEQ] +5CA0A0 A0A0 [Trivial][ILSEQ] +5CA0A1 A0A1 [Trivial][ILSEQ] +5CA0E0 A0E0 [Trivial][ILSEQ] +5CA0EF A0EF [Trivial][ILSEQ] +5CA0F9 A0F9 [Trivial][ILSEQ] +5CA0FA A0FA [Trivial][ILSEQ] +5CA0FC A0FC [Trivial][ILSEQ] +5CA0FD A0FD [Trivial][ILSEQ] +5CA0FE A0FE [Trivial][ILSEQ] +5CA0FF A0FF [Trivial][ILSEQ] +5CA100 A100 [Trivial][ILSEQ] +5CA108 A108 [Trivial][ILSEQ] +5CA109 A109 [Trivial][ILSEQ] +5CA10A A10A [Trivial][ILSEQ] +5CA10D A10D [Trivial][ILSEQ] +5CA11A A11A [Trivial][ILSEQ] +5CA122 A122 [Trivial][ILSEQ] +5CA125 A125 [Trivial][ILSEQ] +5CA127 NULL [SyntErr] +5CA130 A130 [Trivial][ILSEQ] +5CA13F A13F [Trivial][ILSEQ] +5CA140 A140 [Trivial][ILSEQ] +5CA15A A15A [Trivial][ILSEQ] +5CA15C NULL [SyntErr] +5CA15F A15F [Trivial][ILSEQ] +5CA161 A161 [Trivial][ILSEQ] +5CA162 A162 [Trivial][ILSEQ] +5CA16E A16E [Trivial][ILSEQ] +5CA172 A172 [Trivial][ILSEQ] +5CA174 A174 [Trivial][ILSEQ] +5CA17E A17E [Trivial][ILSEQ] +5CA17F A17F [Trivial][ILSEQ] +5CA180 A180 [Trivial][ILSEQ] +5CA181 A181 [Trivial][ILSEQ] +5CA19F A19F [Trivial][ILSEQ] +5CA1A0 A1A0 [Trivial][ILSEQ] +5CA1A1 A1A1 [Trivial][ILSEQ] +5CA1E0 A1E0 [Trivial][ILSEQ] +5CA1EF A1EF [Trivial][ILSEQ] +5CA1F9 A1F9 [Trivial][ILSEQ] +5CA1FA A1FA [Trivial][ILSEQ] +5CA1FC A1FC [Trivial][ILSEQ] +5CA1FD A1FD [Trivial][ILSEQ] +5CA1FE A1FE [Trivial][ILSEQ] +5CA1FF A1FF [Trivial][ILSEQ] +5CE000 E000 [Trivial][ILSEQ] +5CE008 E008 [Trivial][ILSEQ] +5CE009 E009 [Trivial][ILSEQ] +5CE00A E00A [Trivial][ILSEQ] +5CE00D E00D [Trivial][ILSEQ] +5CE01A E01A [Trivial][ILSEQ] +5CE022 E022 [Trivial][ILSEQ] +5CE025 E025 [Trivial][ILSEQ] +5CE027 NULL [SyntErr] +5CE030 E030 [Trivial][ILSEQ] +5CE03F E03F [Trivial][ILSEQ] +5CE040 E040 [Trivial][ILSEQ] +5CE05A E05A [Trivial][ILSEQ] +5CE05C NULL [SyntErr] +5CE05F E05F [Trivial][ILSEQ] +5CE061 E061 [Trivial][ILSEQ] +5CE062 E062 [Trivial][ILSEQ] +5CE06E E06E [Trivial][ILSEQ] +5CE072 E072 [Trivial][ILSEQ] +5CE074 E074 [Trivial][ILSEQ] +5CE07E E07E [Trivial][ILSEQ] +5CE07F E07F [Trivial][ILSEQ] +5CE080 E080 [Trivial][ILSEQ] +5CE081 E081 [Trivial][ILSEQ] +5CE09F E09F [Trivial][ILSEQ] +5CE0A0 E0A0 [Trivial][ILSEQ] +5CE0A1 E0A1 [Trivial][ILSEQ] +5CE0E0 E0E0 [Trivial][ILSEQ] +5CE0EF E0EF [Trivial][ILSEQ] +5CE0F9 E0F9 [Trivial][ILSEQ] +5CE0FA E0FA [Trivial][ILSEQ] +5CE0FC E0FC [Trivial][ILSEQ] +5CE0FD E0FD [Trivial][ILSEQ] +5CE0FE E0FE [Trivial][ILSEQ] +5CE0FF E0FF [Trivial][ILSEQ] +5CEF00 EF00 [Trivial][ILSEQ] +5CEF08 EF08 [Trivial][ILSEQ] +5CEF09 EF09 [Trivial][ILSEQ] +5CEF0A EF0A [Trivial][ILSEQ] +5CEF0D EF0D [Trivial][ILSEQ] +5CEF1A EF1A [Trivial][ILSEQ] +5CEF22 EF22 [Trivial][ILSEQ] +5CEF25 EF25 [Trivial][ILSEQ] +5CEF27 NULL [SyntErr] +5CEF30 EF30 [Trivial][ILSEQ] +5CEF3F EF3F [Trivial][ILSEQ] +5CEF40 EF40 [Trivial][ILSEQ] +5CEF5A EF5A [Trivial][ILSEQ] +5CEF5C NULL [SyntErr] +5CEF5F EF5F [Trivial][ILSEQ] +5CEF61 EF61 [Trivial][ILSEQ] +5CEF62 EF62 [Trivial][ILSEQ] +5CEF6E EF6E [Trivial][ILSEQ] +5CEF72 EF72 [Trivial][ILSEQ] +5CEF74 EF74 [Trivial][ILSEQ] +5CEF7E EF7E [Trivial][ILSEQ] +5CEF7F EF7F [Trivial][ILSEQ] +5CEF80 EF80 [Trivial][ILSEQ] +5CEF81 EF81 [Trivial][ILSEQ] +5CEF9F EF9F [Trivial][ILSEQ] +5CEFA0 EFA0 [Trivial][ILSEQ] +5CEFA1 EFA1 [Trivial][ILSEQ] +5CEFE0 EFE0 [Trivial][ILSEQ] +5CEFEF EFEF [Trivial][ILSEQ] +5CEFF9 EFF9 [Trivial][ILSEQ] +5CEFFA EFFA [Trivial][ILSEQ] +5CEFFC EFFC [Trivial][ILSEQ] +5CEFFD EFFD [Trivial][ILSEQ] +5CEFFE EFFE [Trivial][ILSEQ] +5CEFFF EFFF [Trivial][ILSEQ] +5CF900 F900 [Trivial][ILSEQ] +5CF908 F908 [Trivial][ILSEQ] +5CF909 F909 [Trivial][ILSEQ] +5CF90A F90A [Trivial][ILSEQ] +5CF90D F90D [Trivial][ILSEQ] +5CF91A F91A [Trivial][ILSEQ] +5CF922 F922 [Trivial][ILSEQ] +5CF925 F925 [Trivial][ILSEQ] +5CF927 NULL [SyntErr] +5CF930 F930 [Trivial][ILSEQ] +5CF93F F93F [Trivial][ILSEQ] +5CF940 F940 [Trivial][ILSEQ] +5CF95A F95A [Trivial][ILSEQ] +5CF95C NULL [SyntErr] +5CF95F F95F [Trivial][ILSEQ] +5CF961 F961 [Trivial][ILSEQ] +5CF962 F962 [Trivial][ILSEQ] +5CF96E F96E [Trivial][ILSEQ] +5CF972 F972 [Trivial][ILSEQ] +5CF974 F974 [Trivial][ILSEQ] +5CF97E F97E [Trivial][ILSEQ] +5CF97F F97F [Trivial][ILSEQ] +5CF980 F980 [Trivial][ILSEQ] +5CF981 F981 [Trivial][ILSEQ] +5CF99F F99F [Trivial][ILSEQ] +5CF9A0 F9A0 [Trivial][ILSEQ] +5CF9A1 F9A1 [Trivial][ILSEQ] +5CF9E0 F9E0 [Trivial][ILSEQ] +5CF9EF F9EF [Trivial][ILSEQ] +5CF9F9 F9F9 [Trivial][ILSEQ] +5CF9FA F9FA [Trivial][ILSEQ] +5CF9FC F9FC [Trivial][ILSEQ] +5CF9FD F9FD [Trivial][ILSEQ] +5CF9FE F9FE [Trivial][ILSEQ] +5CF9FF F9FF [Trivial][ILSEQ] +5CFA00 FA00 [Trivial][ILSEQ] +5CFA08 FA08 [Trivial][ILSEQ] +5CFA09 FA09 [Trivial][ILSEQ] +5CFA0A FA0A [Trivial][ILSEQ] +5CFA0D FA0D [Trivial][ILSEQ] +5CFA1A FA1A [Trivial][ILSEQ] +5CFA22 FA22 [Trivial][ILSEQ] +5CFA25 FA25 [Trivial][ILSEQ] +5CFA27 NULL [SyntErr] +5CFA30 FA30 [Trivial][ILSEQ] +5CFA3F FA3F [Trivial][ILSEQ] +5CFA40 FA40 [Trivial][ILSEQ] +5CFA5A FA5A [Trivial][ILSEQ] +5CFA5C NULL [SyntErr] +5CFA5F FA5F [Trivial][ILSEQ] +5CFA61 FA61 [Trivial][ILSEQ] +5CFA62 FA62 [Trivial][ILSEQ] +5CFA6E FA6E [Trivial][ILSEQ] +5CFA72 FA72 [Trivial][ILSEQ] +5CFA74 FA74 [Trivial][ILSEQ] +5CFA7E FA7E [Trivial][ILSEQ] +5CFA7F FA7F [Trivial][ILSEQ] +5CFA80 FA80 [Trivial][ILSEQ] +5CFA81 FA81 [Trivial][ILSEQ] +5CFA9F FA9F [Trivial][ILSEQ] +5CFAA0 FAA0 [Trivial][ILSEQ] +5CFAA1 FAA1 [Trivial][ILSEQ] +5CFAE0 FAE0 [Trivial][ILSEQ] +5CFAEF FAEF [Trivial][ILSEQ] +5CFAF9 FAF9 [Trivial][ILSEQ] +5CFAFA FAFA [Trivial][ILSEQ] +5CFAFC FAFC [Trivial][ILSEQ] +5CFAFD FAFD [Trivial][ILSEQ] +5CFAFE FAFE [Trivial][ILSEQ] +5CFAFF FAFF [Trivial][ILSEQ] +5CFC00 FC00 [Trivial][ILSEQ] +5CFC08 FC08 [Trivial][ILSEQ] +5CFC09 FC09 [Trivial][ILSEQ] +5CFC0A FC0A [Trivial][ILSEQ] +5CFC0D FC0D [Trivial][ILSEQ] +5CFC1A FC1A [Trivial][ILSEQ] +5CFC22 FC22 [Trivial][ILSEQ] +5CFC25 FC25 [Trivial][ILSEQ] +5CFC27 NULL [SyntErr] +5CFC30 FC30 [Trivial][ILSEQ] +5CFC3F FC3F [Trivial][ILSEQ] +5CFC40 FC40 [Trivial][ILSEQ] +5CFC5A FC5A [Trivial][ILSEQ] +5CFC5C NULL [SyntErr] +5CFC5F FC5F [Trivial][ILSEQ] +5CFC61 FC61 [Trivial][ILSEQ] +5CFC62 FC62 [Trivial][ILSEQ] +5CFC6E FC6E [Trivial][ILSEQ] +5CFC72 FC72 [Trivial][ILSEQ] +5CFC74 FC74 [Trivial][ILSEQ] +5CFC7E FC7E [Trivial][ILSEQ] +5CFC7F FC7F [Trivial][ILSEQ] +5CFC80 FC80 [Trivial][ILSEQ] +5CFC81 FC81 [Trivial][ILSEQ] +5CFC9F FC9F [Trivial][ILSEQ] +5CFCA0 FCA0 [Trivial][ILSEQ] +5CFCA1 FCA1 [Trivial][ILSEQ] +5CFCE0 FCE0 [Trivial][ILSEQ] +5CFCEF FCEF [Trivial][ILSEQ] +5CFCF9 FCF9 [Trivial][ILSEQ] +5CFCFA FCFA [Trivial][ILSEQ] +5CFCFC FCFC [Trivial][ILSEQ] +5CFCFD FCFD [Trivial][ILSEQ] +5CFCFE FCFE [Trivial][ILSEQ] +5CFCFF FCFF [Trivial][ILSEQ] +5CFD00 FD00 [Trivial][ILSEQ] +5CFD08 FD08 [Trivial][ILSEQ] +5CFD09 FD09 [Trivial][ILSEQ] +5CFD0A FD0A [Trivial][ILSEQ] +5CFD0D FD0D [Trivial][ILSEQ] +5CFD1A FD1A [Trivial][ILSEQ] +5CFD22 FD22 [Trivial][ILSEQ] +5CFD25 FD25 [Trivial][ILSEQ] +5CFD27 NULL [SyntErr] +5CFD30 FD30 [Trivial][ILSEQ] +5CFD3F FD3F [Trivial][ILSEQ] +5CFD40 FD40 [Trivial][ILSEQ] +5CFD5A FD5A [Trivial][ILSEQ] +5CFD5C NULL [SyntErr] +5CFD5F FD5F [Trivial][ILSEQ] +5CFD61 FD61 [Trivial][ILSEQ] +5CFD62 FD62 [Trivial][ILSEQ] +5CFD6E FD6E [Trivial][ILSEQ] +5CFD72 FD72 [Trivial][ILSEQ] +5CFD74 FD74 [Trivial][ILSEQ] +5CFD7E FD7E [Trivial][ILSEQ] +5CFD7F FD7F [Trivial][ILSEQ] +5CFD80 FD80 [Trivial][ILSEQ] +5CFD81 FD81 [Trivial][ILSEQ] +5CFD9F FD9F [Trivial][ILSEQ] +5CFDA0 FDA0 [Trivial][ILSEQ] +5CFDA1 FDA1 [Trivial][ILSEQ] +5CFDE0 FDE0 [Trivial][ILSEQ] +5CFDEF FDEF [Trivial][ILSEQ] +5CFDF9 FDF9 [Trivial][ILSEQ] +5CFDFA FDFA [Trivial][ILSEQ] +5CFDFC FDFC [Trivial][ILSEQ] +5CFDFD FDFD [Trivial][ILSEQ] +5CFDFE FDFE [Trivial][ILSEQ] +5CFDFF FDFF [Trivial][ILSEQ] +5CFE00 FE00 [Trivial][ILSEQ] +5CFE08 FE08 [Trivial][ILSEQ] +5CFE09 FE09 [Trivial][ILSEQ] +5CFE0A FE0A [Trivial][ILSEQ] +5CFE0D FE0D [Trivial][ILSEQ] +5CFE1A FE1A [Trivial][ILSEQ] +5CFE22 FE22 [Trivial][ILSEQ] +5CFE25 FE25 [Trivial][ILSEQ] +5CFE27 NULL [SyntErr] +5CFE30 FE30 [Trivial][ILSEQ] +5CFE3F FE3F [Trivial][ILSEQ] +5CFE40 FE40 [Trivial][ILSEQ] +5CFE5A FE5A [Trivial][ILSEQ] +5CFE5C NULL [SyntErr] +5CFE5F FE5F [Trivial][ILSEQ] +5CFE61 FE61 [Trivial][ILSEQ] +5CFE62 FE62 [Trivial][ILSEQ] +5CFE6E FE6E [Trivial][ILSEQ] +5CFE72 FE72 [Trivial][ILSEQ] +5CFE74 FE74 [Trivial][ILSEQ] +5CFE7E FE7E [Trivial][ILSEQ] +5CFE7F FE7F [Trivial][ILSEQ] +5CFE80 FE80 [Trivial][ILSEQ] +5CFE81 FE81 [Trivial][ILSEQ] +5CFE9F FE9F [Trivial][ILSEQ] +5CFEA0 FEA0 [Trivial][ILSEQ] +5CFEA1 FEA1 [Trivial][ILSEQ] +5CFEE0 FEE0 [Trivial][ILSEQ] +5CFEEF FEEF [Trivial][ILSEQ] +5CFEF9 FEF9 [Trivial][ILSEQ] +5CFEFA FEFA [Trivial][ILSEQ] +5CFEFC FEFC [Trivial][ILSEQ] +5CFEFD FEFD [Trivial][ILSEQ] +5CFEFE FEFE [Trivial][ILSEQ] +5CFEFF FEFF [Trivial][ILSEQ] +5CFF00 FF00 [Trivial][ILSEQ] +5CFF08 FF08 [Trivial][ILSEQ] +5CFF09 FF09 [Trivial][ILSEQ] +5CFF0A FF0A [Trivial][ILSEQ] +5CFF0D FF0D [Trivial][ILSEQ] +5CFF1A FF1A [Trivial][ILSEQ] +5CFF22 FF22 [Trivial][ILSEQ] +5CFF25 FF25 [Trivial][ILSEQ] +5CFF27 NULL [SyntErr] +5CFF30 FF30 [Trivial][ILSEQ] +5CFF3F FF3F [Trivial][ILSEQ] +5CFF40 FF40 [Trivial][ILSEQ] +5CFF5A FF5A [Trivial][ILSEQ] +5CFF5C NULL [SyntErr] +5CFF5F FF5F [Trivial][ILSEQ] +5CFF61 FF61 [Trivial][ILSEQ] +5CFF62 FF62 [Trivial][ILSEQ] +5CFF6E FF6E [Trivial][ILSEQ] +5CFF72 FF72 [Trivial][ILSEQ] +5CFF74 FF74 [Trivial][ILSEQ] +5CFF7E FF7E [Trivial][ILSEQ] +5CFF7F FF7F [Trivial][ILSEQ] +5CFF80 FF80 [Trivial][ILSEQ] +5CFF81 FF81 [Trivial][ILSEQ] +5CFF9F FF9F [Trivial][ILSEQ] +5CFFA0 FFA0 [Trivial][ILSEQ] +5CFFA1 FFA1 [Trivial][ILSEQ] +5CFFE0 FFE0 [Trivial][ILSEQ] +5CFFEF FFEF [Trivial][ILSEQ] +5CFFF9 FFF9 [Trivial][ILSEQ] +5CFFFA FFFA [Trivial][ILSEQ] +5CFFFC FFFC [Trivial][ILSEQ] +5CFFFD FFFD [Trivial][ILSEQ] +5CFFFE FFFE [Trivial][ILSEQ] +5CFFFF FFFF [Trivial][ILSEQ] +5C005C00 0000 [Trivial] +5C005C08 0008 [Trivial] +5C005C09 0009 [Trivial] +5C005C0A 000A [Trivial] +5C005C0D 000D [Trivial] +5C005C1A 001A [Trivial] +5C005C22 0022 [Trivial] +5C005C25 005C25 [Regular] +5C005C27 0027 [Trivial] +5C005C30 0000 [Regular] +5C005C3F 003F [Trivial] +5C005C40 0040 [Trivial] +5C005C5A 001A [Regular] +5C005C5C 005C [Regular] +5C005C5F 005C5F [Regular] +5C005C61 0061 [Trivial] +5C005C62 0008 [Regular] +5C005C6E 000A [Regular] +5C005C72 000D [Regular] +5C005C74 0009 [Regular] +5C005C7E 007E [Trivial] +5C005C7F 007F [Trivial] +5C005C80 0080 [Trivial][ILSEQ] +5C005C81 0081 [Trivial][ILSEQ] +5C005C9F 009F [Trivial][ILSEQ] +5C005CA0 00A0 [Trivial][ILSEQ] +5C005CA1 00A1 [Trivial][ILSEQ] +5C005CE0 00E0 [Trivial][ILSEQ] +5C005CEF 00EF [Trivial][ILSEQ] +5C005CF9 00F9 [Trivial][ILSEQ] +5C005CFA 00FA [Trivial][ILSEQ] +5C005CFC 00FC [Trivial][ILSEQ] +5C005CFD 00FD [Trivial][ILSEQ] +5C005CFE 00FE [Trivial][ILSEQ] +5C005CFF 00FF [Trivial][ILSEQ] +5C085C00 0800 [Trivial] +5C085C08 0808 [Trivial] +5C085C09 0809 [Trivial] +5C085C0A 080A [Trivial] +5C085C0D 080D [Trivial] +5C085C1A 081A [Trivial] +5C085C22 0822 [Trivial] +5C085C25 085C25 [Regular] +5C085C27 0827 [Trivial] +5C085C30 0800 [Regular] +5C085C3F 083F [Trivial] +5C085C40 0840 [Trivial] +5C085C5A 081A [Regular] +5C085C5C 085C [Regular] +5C085C5F 085C5F [Regular] +5C085C61 0861 [Trivial] +5C085C62 0808 [Regular] +5C085C6E 080A [Regular] +5C085C72 080D [Regular] +5C085C74 0809 [Regular] +5C085C7E 087E [Trivial] +5C085C7F 087F [Trivial] +5C085C80 0880 [Trivial][ILSEQ] +5C085C81 0881 [Trivial][ILSEQ] +5C085C9F 089F [Trivial][ILSEQ] +5C085CA0 08A0 [Trivial][ILSEQ] +5C085CA1 08A1 [Trivial][ILSEQ] +5C085CE0 08E0 [Trivial][ILSEQ] +5C085CEF 08EF [Trivial][ILSEQ] +5C085CF9 08F9 [Trivial][ILSEQ] +5C085CFA 08FA [Trivial][ILSEQ] +5C085CFC 08FC [Trivial][ILSEQ] +5C085CFD 08FD [Trivial][ILSEQ] +5C085CFE 08FE [Trivial][ILSEQ] +5C085CFF 08FF [Trivial][ILSEQ] +5C095C00 0900 [Trivial] +5C095C08 0908 [Trivial] +5C095C09 0909 [Trivial] +5C095C0A 090A [Trivial] +5C095C0D 090D [Trivial] +5C095C1A 091A [Trivial] +5C095C22 0922 [Trivial] +5C095C25 095C25 [Regular] +5C095C27 0927 [Trivial] +5C095C30 0900 [Regular] +5C095C3F 093F [Trivial] +5C095C40 0940 [Trivial] +5C095C5A 091A [Regular] +5C095C5C 095C [Regular] +5C095C5F 095C5F [Regular] +5C095C61 0961 [Trivial] +5C095C62 0908 [Regular] +5C095C6E 090A [Regular] +5C095C72 090D [Regular] +5C095C74 0909 [Regular] +5C095C7E 097E [Trivial] +5C095C7F 097F [Trivial] +5C095C80 0980 [Trivial][ILSEQ] +5C095C81 0981 [Trivial][ILSEQ] +5C095C9F 099F [Trivial][ILSEQ] +5C095CA0 09A0 [Trivial][ILSEQ] +5C095CA1 09A1 [Trivial][ILSEQ] +5C095CE0 09E0 [Trivial][ILSEQ] +5C095CEF 09EF [Trivial][ILSEQ] +5C095CF9 09F9 [Trivial][ILSEQ] +5C095CFA 09FA [Trivial][ILSEQ] +5C095CFC 09FC [Trivial][ILSEQ] +5C095CFD 09FD [Trivial][ILSEQ] +5C095CFE 09FE [Trivial][ILSEQ] +5C095CFF 09FF [Trivial][ILSEQ] +5C0A5C00 0A00 [Trivial] +5C0A5C08 0A08 [Trivial] +5C0A5C09 0A09 [Trivial] +5C0A5C0A 0A0A [Trivial] +5C0A5C0D 0A0D [Trivial] +5C0A5C1A 0A1A [Trivial] +5C0A5C22 0A22 [Trivial] +5C0A5C25 0A5C25 [Regular] +5C0A5C27 0A27 [Trivial] +5C0A5C30 0A00 [Regular] +5C0A5C3F 0A3F [Trivial] +5C0A5C40 0A40 [Trivial] +5C0A5C5A 0A1A [Regular] +5C0A5C5C 0A5C [Regular] +5C0A5C5F 0A5C5F [Regular] +5C0A5C61 0A61 [Trivial] +5C0A5C62 0A08 [Regular] +5C0A5C6E 0A0A [Regular] +5C0A5C72 0A0D [Regular] +5C0A5C74 0A09 [Regular] +5C0A5C7E 0A7E [Trivial] +5C0A5C7F 0A7F [Trivial] +5C0A5C80 0A80 [Trivial][ILSEQ] +5C0A5C81 0A81 [Trivial][ILSEQ] +5C0A5C9F 0A9F [Trivial][ILSEQ] +5C0A5CA0 0AA0 [Trivial][ILSEQ] +5C0A5CA1 0AA1 [Trivial][ILSEQ] +5C0A5CE0 0AE0 [Trivial][ILSEQ] +5C0A5CEF 0AEF [Trivial][ILSEQ] +5C0A5CF9 0AF9 [Trivial][ILSEQ] +5C0A5CFA 0AFA [Trivial][ILSEQ] +5C0A5CFC 0AFC [Trivial][ILSEQ] +5C0A5CFD 0AFD [Trivial][ILSEQ] +5C0A5CFE 0AFE [Trivial][ILSEQ] +5C0A5CFF 0AFF [Trivial][ILSEQ] +5C0D5C00 0D00 [Trivial] +5C0D5C08 0D08 [Trivial] +5C0D5C09 0D09 [Trivial] +5C0D5C0A 0D0A [Trivial] +5C0D5C0D 0D0D [Trivial] +5C0D5C1A 0D1A [Trivial] +5C0D5C22 0D22 [Trivial] +5C0D5C25 0D5C25 [Regular] +5C0D5C27 0D27 [Trivial] +5C0D5C30 0D00 [Regular] +5C0D5C3F 0D3F [Trivial] +5C0D5C40 0D40 [Trivial] +5C0D5C5A 0D1A [Regular] +5C0D5C5C 0D5C [Regular] +5C0D5C5F 0D5C5F [Regular] +5C0D5C61 0D61 [Trivial] +5C0D5C62 0D08 [Regular] +5C0D5C6E 0D0A [Regular] +5C0D5C72 0D0D [Regular] +5C0D5C74 0D09 [Regular] +5C0D5C7E 0D7E [Trivial] +5C0D5C7F 0D7F [Trivial] +5C0D5C80 0D80 [Trivial][ILSEQ] +5C0D5C81 0D81 [Trivial][ILSEQ] +5C0D5C9F 0D9F [Trivial][ILSEQ] +5C0D5CA0 0DA0 [Trivial][ILSEQ] +5C0D5CA1 0DA1 [Trivial][ILSEQ] +5C0D5CE0 0DE0 [Trivial][ILSEQ] +5C0D5CEF 0DEF [Trivial][ILSEQ] +5C0D5CF9 0DF9 [Trivial][ILSEQ] +5C0D5CFA 0DFA [Trivial][ILSEQ] +5C0D5CFC 0DFC [Trivial][ILSEQ] +5C0D5CFD 0DFD [Trivial][ILSEQ] +5C0D5CFE 0DFE [Trivial][ILSEQ] +5C0D5CFF 0DFF [Trivial][ILSEQ] +5C1A5C00 1A00 [Trivial] +5C1A5C08 1A08 [Trivial] +5C1A5C09 1A09 [Trivial] +5C1A5C0A 1A0A [Trivial] +5C1A5C0D 1A0D [Trivial] +5C1A5C1A 1A1A [Trivial] +5C1A5C22 1A22 [Trivial] +5C1A5C25 1A5C25 [Regular] +5C1A5C27 1A27 [Trivial] +5C1A5C30 1A00 [Regular] +5C1A5C3F 1A3F [Trivial] +5C1A5C40 1A40 [Trivial] +5C1A5C5A 1A1A [Regular] +5C1A5C5C 1A5C [Regular] +5C1A5C5F 1A5C5F [Regular] +5C1A5C61 1A61 [Trivial] +5C1A5C62 1A08 [Regular] +5C1A5C6E 1A0A [Regular] +5C1A5C72 1A0D [Regular] +5C1A5C74 1A09 [Regular] +5C1A5C7E 1A7E [Trivial] +5C1A5C7F 1A7F [Trivial] +5C1A5C80 1A80 [Trivial][ILSEQ] +5C1A5C81 1A81 [Trivial][ILSEQ] +5C1A5C9F 1A9F [Trivial][ILSEQ] +5C1A5CA0 1AA0 [Trivial][ILSEQ] +5C1A5CA1 1AA1 [Trivial][ILSEQ] +5C1A5CE0 1AE0 [Trivial][ILSEQ] +5C1A5CEF 1AEF [Trivial][ILSEQ] +5C1A5CF9 1AF9 [Trivial][ILSEQ] +5C1A5CFA 1AFA [Trivial][ILSEQ] +5C1A5CFC 1AFC [Trivial][ILSEQ] +5C1A5CFD 1AFD [Trivial][ILSEQ] +5C1A5CFE 1AFE [Trivial][ILSEQ] +5C1A5CFF 1AFF [Trivial][ILSEQ] +5C225C00 2200 [Trivial] +5C225C08 2208 [Trivial] +5C225C09 2209 [Trivial] +5C225C0A 220A [Trivial] +5C225C0D 220D [Trivial] +5C225C1A 221A [Trivial] +5C225C22 2222 [Trivial] +5C225C25 225C25 [Regular] +5C225C27 2227 [Trivial] +5C225C30 2200 [Regular] +5C225C3F 223F [Trivial] +5C225C40 2240 [Trivial] +5C225C5A 221A [Regular] +5C225C5C 225C [Regular] +5C225C5F 225C5F [Regular] +5C225C61 2261 [Trivial] +5C225C62 2208 [Regular] +5C225C6E 220A [Regular] +5C225C72 220D [Regular] +5C225C74 2209 [Regular] +5C225C7E 227E [Trivial] +5C225C7F 227F [Trivial] +5C225C80 2280 [Trivial][ILSEQ] +5C225C81 2281 [Trivial][ILSEQ] +5C225C9F 229F [Trivial][ILSEQ] +5C225CA0 22A0 [Trivial][ILSEQ] +5C225CA1 22A1 [Trivial][ILSEQ] +5C225CE0 22E0 [Trivial][ILSEQ] +5C225CEF 22EF [Trivial][ILSEQ] +5C225CF9 22F9 [Trivial][ILSEQ] +5C225CFA 22FA [Trivial][ILSEQ] +5C225CFC 22FC [Trivial][ILSEQ] +5C225CFD 22FD [Trivial][ILSEQ] +5C225CFE 22FE [Trivial][ILSEQ] +5C225CFF 22FF [Trivial][ILSEQ] +5C255C00 5C2500 [Regular] +5C255C08 5C2508 [Regular] +5C255C09 5C2509 [Regular] +5C255C0A 5C250A [Regular] +5C255C0D 5C250D [Regular] +5C255C1A 5C251A [Regular] +5C255C22 5C2522 [Regular] +5C255C25 5C255C25 [Preserve][LIKE] +5C255C27 5C2527 [Regular] +5C255C30 5C2500 [Regular] +5C255C3F 5C253F [Regular] +5C255C40 5C2540 [Regular] +5C255C5A 5C251A [Regular] +5C255C5C 5C255C [Regular] +5C255C5F 5C255C5F [Preserve][LIKE] +5C255C61 5C2561 [Regular] +5C255C62 5C2508 [Regular] +5C255C6E 5C250A [Regular] +5C255C72 5C250D [Regular] +5C255C74 5C2509 [Regular] +5C255C7E 5C257E [Regular] +5C255C7F 5C257F [Regular] +5C255C80 5C2580 [Regular][ILSEQ] +5C255C81 5C2581 [Regular][ILSEQ] +5C255C9F 5C259F [Regular][ILSEQ] +5C255CA0 5C25A0 [Regular][ILSEQ] +5C255CA1 5C25A1 [Regular][ILSEQ] +5C255CE0 5C25E0 [Regular][ILSEQ] +5C255CEF 5C25EF [Regular][ILSEQ] +5C255CF9 5C25F9 [Regular][ILSEQ] +5C255CFA 5C25FA [Regular][ILSEQ] +5C255CFC 5C25FC [Regular][ILSEQ] +5C255CFD 5C25FD [Regular][ILSEQ] +5C255CFE 5C25FE [Regular][ILSEQ] +5C255CFF 5C25FF [Regular][ILSEQ] +5C275C00 2700 [Trivial] +5C275C08 2708 [Trivial] +5C275C09 2709 [Trivial] +5C275C0A 270A [Trivial] +5C275C0D 270D [Trivial] +5C275C1A 271A [Trivial] +5C275C22 2722 [Trivial] +5C275C25 275C25 [Regular] +5C275C27 2727 [Trivial] +5C275C30 2700 [Regular] +5C275C3F 273F [Trivial] +5C275C40 2740 [Trivial] +5C275C5A 271A [Regular] +5C275C5C 275C [Regular] +5C275C5F 275C5F [Regular] +5C275C61 2761 [Trivial] +5C275C62 2708 [Regular] +5C275C6E 270A [Regular] +5C275C72 270D [Regular] +5C275C74 2709 [Regular] +5C275C7E 277E [Trivial] +5C275C7F 277F [Trivial] +5C275C80 2780 [Trivial][ILSEQ] +5C275C81 2781 [Trivial][ILSEQ] +5C275C9F 279F [Trivial][ILSEQ] +5C275CA0 27A0 [Trivial][ILSEQ] +5C275CA1 27A1 [Trivial][ILSEQ] +5C275CE0 27E0 [Trivial][ILSEQ] +5C275CEF 27EF [Trivial][ILSEQ] +5C275CF9 27F9 [Trivial][ILSEQ] +5C275CFA 27FA [Trivial][ILSEQ] +5C275CFC 27FC [Trivial][ILSEQ] +5C275CFD 27FD [Trivial][ILSEQ] +5C275CFE 27FE [Trivial][ILSEQ] +5C275CFF 27FF [Trivial][ILSEQ] +5C305C00 0000 [Regular] +5C305C08 0008 [Regular] +5C305C09 0009 [Regular] +5C305C0A 000A [Regular] +5C305C0D 000D [Regular] +5C305C1A 001A [Regular] +5C305C22 0022 [Regular] +5C305C25 005C25 [Regular] +5C305C27 0027 [Regular] +5C305C30 0000 [Regular] +5C305C3F 003F [Regular] +5C305C40 0040 [Regular] +5C305C5A 001A [Regular] +5C305C5C 005C [Regular] +5C305C5F 005C5F [Regular] +5C305C61 0061 [Regular] +5C305C62 0008 [Regular] +5C305C6E 000A [Regular] +5C305C72 000D [Regular] +5C305C74 0009 [Regular] +5C305C7E 007E [Regular] +5C305C7F 007F [Regular] +5C305C80 0080 [Regular][ILSEQ] +5C305C81 0081 [Regular][ILSEQ] +5C305C9F 009F [Regular][ILSEQ] +5C305CA0 00A0 [Regular][ILSEQ] +5C305CA1 00A1 [Regular][ILSEQ] +5C305CE0 00E0 [Regular][ILSEQ] +5C305CEF 00EF [Regular][ILSEQ] +5C305CF9 00F9 [Regular][ILSEQ] +5C305CFA 00FA [Regular][ILSEQ] +5C305CFC 00FC [Regular][ILSEQ] +5C305CFD 00FD [Regular][ILSEQ] +5C305CFE 00FE [Regular][ILSEQ] +5C305CFF 00FF [Regular][ILSEQ] +5C3F5C00 3F00 [Trivial] +5C3F5C08 3F08 [Trivial] +5C3F5C09 3F09 [Trivial] +5C3F5C0A 3F0A [Trivial] +5C3F5C0D 3F0D [Trivial] +5C3F5C1A 3F1A [Trivial] +5C3F5C22 3F22 [Trivial] +5C3F5C25 3F5C25 [Regular] +5C3F5C27 3F27 [Trivial] +5C3F5C30 3F00 [Regular] +5C3F5C3F 3F3F [Trivial] +5C3F5C40 3F40 [Trivial] +5C3F5C5A 3F1A [Regular] +5C3F5C5C 3F5C [Regular] +5C3F5C5F 3F5C5F [Regular] +5C3F5C61 3F61 [Trivial] +5C3F5C62 3F08 [Regular] +5C3F5C6E 3F0A [Regular] +5C3F5C72 3F0D [Regular] +5C3F5C74 3F09 [Regular] +5C3F5C7E 3F7E [Trivial] +5C3F5C7F 3F7F [Trivial] +5C3F5C80 3F80 [Trivial][ILSEQ] +5C3F5C81 3F81 [Trivial][ILSEQ] +5C3F5C9F 3F9F [Trivial][ILSEQ] +5C3F5CA0 3FA0 [Trivial][ILSEQ] +5C3F5CA1 3FA1 [Trivial][ILSEQ] +5C3F5CE0 3FE0 [Trivial][ILSEQ] +5C3F5CEF 3FEF [Trivial][ILSEQ] +5C3F5CF9 3FF9 [Trivial][ILSEQ] +5C3F5CFA 3FFA [Trivial][ILSEQ] +5C3F5CFC 3FFC [Trivial][ILSEQ] +5C3F5CFD 3FFD [Trivial][ILSEQ] +5C3F5CFE 3FFE [Trivial][ILSEQ] +5C3F5CFF 3FFF [Trivial][ILSEQ] +5C405C00 4000 [Trivial] +5C405C08 4008 [Trivial] +5C405C09 4009 [Trivial] +5C405C0A 400A [Trivial] +5C405C0D 400D [Trivial] +5C405C1A 401A [Trivial] +5C405C22 4022 [Trivial] +5C405C25 405C25 [Regular] +5C405C27 4027 [Trivial] +5C405C30 4000 [Regular] +5C405C3F 403F [Trivial] +5C405C40 4040 [Trivial] +5C405C5A 401A [Regular] +5C405C5C 405C [Regular] +5C405C5F 405C5F [Regular] +5C405C61 4061 [Trivial] +5C405C62 4008 [Regular] +5C405C6E 400A [Regular] +5C405C72 400D [Regular] +5C405C74 4009 [Regular] +5C405C7E 407E [Trivial] +5C405C7F 407F [Trivial] +5C405C80 4080 [Trivial][ILSEQ] +5C405C81 4081 [Trivial][ILSEQ] +5C405C9F 409F [Trivial][ILSEQ] +5C405CA0 40A0 [Trivial][ILSEQ] +5C405CA1 40A1 [Trivial][ILSEQ] +5C405CE0 40E0 [Trivial][ILSEQ] +5C405CEF 40EF [Trivial][ILSEQ] +5C405CF9 40F9 [Trivial][ILSEQ] +5C405CFA 40FA [Trivial][ILSEQ] +5C405CFC 40FC [Trivial][ILSEQ] +5C405CFD 40FD [Trivial][ILSEQ] +5C405CFE 40FE [Trivial][ILSEQ] +5C405CFF 40FF [Trivial][ILSEQ] +5C5A5C00 1A00 [Regular] +5C5A5C08 1A08 [Regular] +5C5A5C09 1A09 [Regular] +5C5A5C0A 1A0A [Regular] +5C5A5C0D 1A0D [Regular] +5C5A5C1A 1A1A [Regular] +5C5A5C22 1A22 [Regular] +5C5A5C25 1A5C25 [Regular] +5C5A5C27 1A27 [Regular] +5C5A5C30 1A00 [Regular] +5C5A5C3F 1A3F [Regular] +5C5A5C40 1A40 [Regular] +5C5A5C5A 1A1A [Regular] +5C5A5C5C 1A5C [Regular] +5C5A5C5F 1A5C5F [Regular] +5C5A5C61 1A61 [Regular] +5C5A5C62 1A08 [Regular] +5C5A5C6E 1A0A [Regular] +5C5A5C72 1A0D [Regular] +5C5A5C74 1A09 [Regular] +5C5A5C7E 1A7E [Regular] +5C5A5C7F 1A7F [Regular] +5C5A5C80 1A80 [Regular][ILSEQ] +5C5A5C81 1A81 [Regular][ILSEQ] +5C5A5C9F 1A9F [Regular][ILSEQ] +5C5A5CA0 1AA0 [Regular][ILSEQ] +5C5A5CA1 1AA1 [Regular][ILSEQ] +5C5A5CE0 1AE0 [Regular][ILSEQ] +5C5A5CEF 1AEF [Regular][ILSEQ] +5C5A5CF9 1AF9 [Regular][ILSEQ] +5C5A5CFA 1AFA [Regular][ILSEQ] +5C5A5CFC 1AFC [Regular][ILSEQ] +5C5A5CFD 1AFD [Regular][ILSEQ] +5C5A5CFE 1AFE [Regular][ILSEQ] +5C5A5CFF 1AFF [Regular][ILSEQ] +5C5C5C00 5C00 [Regular] +5C5C5C08 5C08 [Regular] +5C5C5C09 5C09 [Regular] +5C5C5C0A 5C0A [Regular] +5C5C5C0D 5C0D [Regular] +5C5C5C1A 5C1A [Regular] +5C5C5C22 5C22 [Regular] +5C5C5C25 5C5C25 [Regular] +5C5C5C27 5C27 [Regular] +5C5C5C30 5C00 [Regular] +5C5C5C3F 5C3F [Regular] +5C5C5C40 5C40 [Regular] +5C5C5C5A 5C1A [Regular] +5C5C5C5C 5C5C [Regular] +5C5C5C5F 5C5C5F [Regular] +5C5C5C61 5C61 [Regular] +5C5C5C62 5C08 [Regular] +5C5C5C6E 5C0A [Regular] +5C5C5C72 5C0D [Regular] +5C5C5C74 5C09 [Regular] +5C5C5C7E 5C7E [Regular] +5C5C5C7F 5C7F [Regular] +5C5C5C80 5C80 [Regular][ILSEQ] +5C5C5C81 5C81 [Regular][ILSEQ] +5C5C5C9F 5C9F [Regular][ILSEQ] +5C5C5CA0 5CA0 [Regular][ILSEQ] +5C5C5CA1 5CA1 [Regular][ILSEQ] +5C5C5CE0 5CE0 [Regular][ILSEQ] +5C5C5CEF 5CEF [Regular][ILSEQ] +5C5C5CF9 5CF9 [Regular][ILSEQ] +5C5C5CFA 5CFA [Regular][ILSEQ] +5C5C5CFC 5CFC [Regular][ILSEQ] +5C5C5CFD 5CFD [Regular][ILSEQ] +5C5C5CFE 5CFE [Regular][ILSEQ] +5C5C5CFF 5CFF [Regular][ILSEQ] +5C5F5C00 5C5F00 [Regular] +5C5F5C08 5C5F08 [Regular] +5C5F5C09 5C5F09 [Regular] +5C5F5C0A 5C5F0A [Regular] +5C5F5C0D 5C5F0D [Regular] +5C5F5C1A 5C5F1A [Regular] +5C5F5C22 5C5F22 [Regular] +5C5F5C25 5C5F5C25 [Preserve][LIKE] +5C5F5C27 5C5F27 [Regular] +5C5F5C30 5C5F00 [Regular] +5C5F5C3F 5C5F3F [Regular] +5C5F5C40 5C5F40 [Regular] +5C5F5C5A 5C5F1A [Regular] +5C5F5C5C 5C5F5C [Regular] +5C5F5C5F 5C5F5C5F [Preserve][LIKE] +5C5F5C61 5C5F61 [Regular] +5C5F5C62 5C5F08 [Regular] +5C5F5C6E 5C5F0A [Regular] +5C5F5C72 5C5F0D [Regular] +5C5F5C74 5C5F09 [Regular] +5C5F5C7E 5C5F7E [Regular] +5C5F5C7F 5C5F7F [Regular] +5C5F5C80 5C5F80 [Regular][ILSEQ] +5C5F5C81 5C5F81 [Regular][ILSEQ] +5C5F5C9F 5C5F9F [Regular][ILSEQ] +5C5F5CA0 5C5FA0 [Regular][ILSEQ] +5C5F5CA1 5C5FA1 [Regular][ILSEQ] +5C5F5CE0 5C5FE0 [Regular][ILSEQ] +5C5F5CEF 5C5FEF [Regular][ILSEQ] +5C5F5CF9 5C5FF9 [Regular][ILSEQ] +5C5F5CFA 5C5FFA [Regular][ILSEQ] +5C5F5CFC 5C5FFC [Regular][ILSEQ] +5C5F5CFD 5C5FFD [Regular][ILSEQ] +5C5F5CFE 5C5FFE [Regular][ILSEQ] +5C5F5CFF 5C5FFF [Regular][ILSEQ] +5C615C00 6100 [Trivial] +5C615C08 6108 [Trivial] +5C615C09 6109 [Trivial] +5C615C0A 610A [Trivial] +5C615C0D 610D [Trivial] +5C615C1A 611A [Trivial] +5C615C22 6122 [Trivial] +5C615C25 615C25 [Regular] +5C615C27 6127 [Trivial] +5C615C30 6100 [Regular] +5C615C3F 613F [Trivial] +5C615C40 6140 [Trivial] +5C615C5A 611A [Regular] +5C615C5C 615C [Regular] +5C615C5F 615C5F [Regular] +5C615C61 6161 [Trivial] +5C615C62 6108 [Regular] +5C615C6E 610A [Regular] +5C615C72 610D [Regular] +5C615C74 6109 [Regular] +5C615C7E 617E [Trivial] +5C615C7F 617F [Trivial] +5C615C80 6180 [Trivial][ILSEQ] +5C615C81 6181 [Trivial][ILSEQ] +5C615C9F 619F [Trivial][ILSEQ] +5C615CA0 61A0 [Trivial][ILSEQ] +5C615CA1 61A1 [Trivial][ILSEQ] +5C615CE0 61E0 [Trivial][ILSEQ] +5C615CEF 61EF [Trivial][ILSEQ] +5C615CF9 61F9 [Trivial][ILSEQ] +5C615CFA 61FA [Trivial][ILSEQ] +5C615CFC 61FC [Trivial][ILSEQ] +5C615CFD 61FD [Trivial][ILSEQ] +5C615CFE 61FE [Trivial][ILSEQ] +5C615CFF 61FF [Trivial][ILSEQ] +5C625C00 0800 [Regular] +5C625C08 0808 [Regular] +5C625C09 0809 [Regular] +5C625C0A 080A [Regular] +5C625C0D 080D [Regular] +5C625C1A 081A [Regular] +5C625C22 0822 [Regular] +5C625C25 085C25 [Regular] +5C625C27 0827 [Regular] +5C625C30 0800 [Regular] +5C625C3F 083F [Regular] +5C625C40 0840 [Regular] +5C625C5A 081A [Regular] +5C625C5C 085C [Regular] +5C625C5F 085C5F [Regular] +5C625C61 0861 [Regular] +5C625C62 0808 [Regular] +5C625C6E 080A [Regular] +5C625C72 080D [Regular] +5C625C74 0809 [Regular] +5C625C7E 087E [Regular] +5C625C7F 087F [Regular] +5C625C80 0880 [Regular][ILSEQ] +5C625C81 0881 [Regular][ILSEQ] +5C625C9F 089F [Regular][ILSEQ] +5C625CA0 08A0 [Regular][ILSEQ] +5C625CA1 08A1 [Regular][ILSEQ] +5C625CE0 08E0 [Regular][ILSEQ] +5C625CEF 08EF [Regular][ILSEQ] +5C625CF9 08F9 [Regular][ILSEQ] +5C625CFA 08FA [Regular][ILSEQ] +5C625CFC 08FC [Regular][ILSEQ] +5C625CFD 08FD [Regular][ILSEQ] +5C625CFE 08FE [Regular][ILSEQ] +5C625CFF 08FF [Regular][ILSEQ] +5C6E5C00 0A00 [Regular] +5C6E5C08 0A08 [Regular] +5C6E5C09 0A09 [Regular] +5C6E5C0A 0A0A [Regular] +5C6E5C0D 0A0D [Regular] +5C6E5C1A 0A1A [Regular] +5C6E5C22 0A22 [Regular] +5C6E5C25 0A5C25 [Regular] +5C6E5C27 0A27 [Regular] +5C6E5C30 0A00 [Regular] +5C6E5C3F 0A3F [Regular] +5C6E5C40 0A40 [Regular] +5C6E5C5A 0A1A [Regular] +5C6E5C5C 0A5C [Regular] +5C6E5C5F 0A5C5F [Regular] +5C6E5C61 0A61 [Regular] +5C6E5C62 0A08 [Regular] +5C6E5C6E 0A0A [Regular] +5C6E5C72 0A0D [Regular] +5C6E5C74 0A09 [Regular] +5C6E5C7E 0A7E [Regular] +5C6E5C7F 0A7F [Regular] +5C6E5C80 0A80 [Regular][ILSEQ] +5C6E5C81 0A81 [Regular][ILSEQ] +5C6E5C9F 0A9F [Regular][ILSEQ] +5C6E5CA0 0AA0 [Regular][ILSEQ] +5C6E5CA1 0AA1 [Regular][ILSEQ] +5C6E5CE0 0AE0 [Regular][ILSEQ] +5C6E5CEF 0AEF [Regular][ILSEQ] +5C6E5CF9 0AF9 [Regular][ILSEQ] +5C6E5CFA 0AFA [Regular][ILSEQ] +5C6E5CFC 0AFC [Regular][ILSEQ] +5C6E5CFD 0AFD [Regular][ILSEQ] +5C6E5CFE 0AFE [Regular][ILSEQ] +5C6E5CFF 0AFF [Regular][ILSEQ] +5C725C00 0D00 [Regular] +5C725C08 0D08 [Regular] +5C725C09 0D09 [Regular] +5C725C0A 0D0A [Regular] +5C725C0D 0D0D [Regular] +5C725C1A 0D1A [Regular] +5C725C22 0D22 [Regular] +5C725C25 0D5C25 [Regular] +5C725C27 0D27 [Regular] +5C725C30 0D00 [Regular] +5C725C3F 0D3F [Regular] +5C725C40 0D40 [Regular] +5C725C5A 0D1A [Regular] +5C725C5C 0D5C [Regular] +5C725C5F 0D5C5F [Regular] +5C725C61 0D61 [Regular] +5C725C62 0D08 [Regular] +5C725C6E 0D0A [Regular] +5C725C72 0D0D [Regular] +5C725C74 0D09 [Regular] +5C725C7E 0D7E [Regular] +5C725C7F 0D7F [Regular] +5C725C80 0D80 [Regular][ILSEQ] +5C725C81 0D81 [Regular][ILSEQ] +5C725C9F 0D9F [Regular][ILSEQ] +5C725CA0 0DA0 [Regular][ILSEQ] +5C725CA1 0DA1 [Regular][ILSEQ] +5C725CE0 0DE0 [Regular][ILSEQ] +5C725CEF 0DEF [Regular][ILSEQ] +5C725CF9 0DF9 [Regular][ILSEQ] +5C725CFA 0DFA [Regular][ILSEQ] +5C725CFC 0DFC [Regular][ILSEQ] +5C725CFD 0DFD [Regular][ILSEQ] +5C725CFE 0DFE [Regular][ILSEQ] +5C725CFF 0DFF [Regular][ILSEQ] +5C745C00 0900 [Regular] +5C745C08 0908 [Regular] +5C745C09 0909 [Regular] +5C745C0A 090A [Regular] +5C745C0D 090D [Regular] +5C745C1A 091A [Regular] +5C745C22 0922 [Regular] +5C745C25 095C25 [Regular] +5C745C27 0927 [Regular] +5C745C30 0900 [Regular] +5C745C3F 093F [Regular] +5C745C40 0940 [Regular] +5C745C5A 091A [Regular] +5C745C5C 095C [Regular] +5C745C5F 095C5F [Regular] +5C745C61 0961 [Regular] +5C745C62 0908 [Regular] +5C745C6E 090A [Regular] +5C745C72 090D [Regular] +5C745C74 0909 [Regular] +5C745C7E 097E [Regular] +5C745C7F 097F [Regular] +5C745C80 0980 [Regular][ILSEQ] +5C745C81 0981 [Regular][ILSEQ] +5C745C9F 099F [Regular][ILSEQ] +5C745CA0 09A0 [Regular][ILSEQ] +5C745CA1 09A1 [Regular][ILSEQ] +5C745CE0 09E0 [Regular][ILSEQ] +5C745CEF 09EF [Regular][ILSEQ] +5C745CF9 09F9 [Regular][ILSEQ] +5C745CFA 09FA [Regular][ILSEQ] +5C745CFC 09FC [Regular][ILSEQ] +5C745CFD 09FD [Regular][ILSEQ] +5C745CFE 09FE [Regular][ILSEQ] +5C745CFF 09FF [Regular][ILSEQ] +5C7E5C00 7E00 [Trivial] +5C7E5C08 7E08 [Trivial] +5C7E5C09 7E09 [Trivial] +5C7E5C0A 7E0A [Trivial] +5C7E5C0D 7E0D [Trivial] +5C7E5C1A 7E1A [Trivial] +5C7E5C22 7E22 [Trivial] +5C7E5C25 7E5C25 [Regular] +5C7E5C27 7E27 [Trivial] +5C7E5C30 7E00 [Regular] +5C7E5C3F 7E3F [Trivial] +5C7E5C40 7E40 [Trivial] +5C7E5C5A 7E1A [Regular] +5C7E5C5C 7E5C [Regular] +5C7E5C5F 7E5C5F [Regular] +5C7E5C61 7E61 [Trivial] +5C7E5C62 7E08 [Regular] +5C7E5C6E 7E0A [Regular] +5C7E5C72 7E0D [Regular] +5C7E5C74 7E09 [Regular] +5C7E5C7E 7E7E [Trivial] +5C7E5C7F 7E7F [Trivial] +5C7E5C80 7E80 [Trivial][ILSEQ] +5C7E5C81 7E81 [Trivial][ILSEQ] +5C7E5C9F 7E9F [Trivial][ILSEQ] +5C7E5CA0 7EA0 [Trivial][ILSEQ] +5C7E5CA1 7EA1 [Trivial][ILSEQ] +5C7E5CE0 7EE0 [Trivial][ILSEQ] +5C7E5CEF 7EEF [Trivial][ILSEQ] +5C7E5CF9 7EF9 [Trivial][ILSEQ] +5C7E5CFA 7EFA [Trivial][ILSEQ] +5C7E5CFC 7EFC [Trivial][ILSEQ] +5C7E5CFD 7EFD [Trivial][ILSEQ] +5C7E5CFE 7EFE [Trivial][ILSEQ] +5C7E5CFF 7EFF [Trivial][ILSEQ] +5C7F5C00 7F00 [Trivial] +5C7F5C08 7F08 [Trivial] +5C7F5C09 7F09 [Trivial] +5C7F5C0A 7F0A [Trivial] +5C7F5C0D 7F0D [Trivial] +5C7F5C1A 7F1A [Trivial] +5C7F5C22 7F22 [Trivial] +5C7F5C25 7F5C25 [Regular] +5C7F5C27 7F27 [Trivial] +5C7F5C30 7F00 [Regular] +5C7F5C3F 7F3F [Trivial] +5C7F5C40 7F40 [Trivial] +5C7F5C5A 7F1A [Regular] +5C7F5C5C 7F5C [Regular] +5C7F5C5F 7F5C5F [Regular] +5C7F5C61 7F61 [Trivial] +5C7F5C62 7F08 [Regular] +5C7F5C6E 7F0A [Regular] +5C7F5C72 7F0D [Regular] +5C7F5C74 7F09 [Regular] +5C7F5C7E 7F7E [Trivial] +5C7F5C7F 7F7F [Trivial] +5C7F5C80 7F80 [Trivial][ILSEQ] +5C7F5C81 7F81 [Trivial][ILSEQ] +5C7F5C9F 7F9F [Trivial][ILSEQ] +5C7F5CA0 7FA0 [Trivial][ILSEQ] +5C7F5CA1 7FA1 [Trivial][ILSEQ] +5C7F5CE0 7FE0 [Trivial][ILSEQ] +5C7F5CEF 7FEF [Trivial][ILSEQ] +5C7F5CF9 7FF9 [Trivial][ILSEQ] +5C7F5CFA 7FFA [Trivial][ILSEQ] +5C7F5CFC 7FFC [Trivial][ILSEQ] +5C7F5CFD 7FFD [Trivial][ILSEQ] +5C7F5CFE 7FFE [Trivial][ILSEQ] +5C7F5CFF 7FFF [Trivial][ILSEQ] +5C805C00 8000 [Trivial][ILSEQ] +5C805C08 8008 [Trivial][ILSEQ] +5C805C09 8009 [Trivial][ILSEQ] +5C805C0A 800A [Trivial][ILSEQ] +5C805C0D 800D [Trivial][ILSEQ] +5C805C1A 801A [Trivial][ILSEQ] +5C805C22 8022 [Trivial][ILSEQ] +5C805C25 805C25 [Regular][ILSEQ] +5C805C27 8027 [Trivial][ILSEQ] +5C805C30 8000 [Regular][ILSEQ] +5C805C3F 803F [Trivial][ILSEQ] +5C805C40 8040 [Trivial][ILSEQ] +5C805C5A 801A [Regular][ILSEQ] +5C805C5C 805C [Regular][ILSEQ] +5C805C5F 805C5F [Regular][ILSEQ] +5C805C61 8061 [Trivial][ILSEQ] +5C805C62 8008 [Regular][ILSEQ] +5C805C6E 800A [Regular][ILSEQ] +5C805C72 800D [Regular][ILSEQ] +5C805C74 8009 [Regular][ILSEQ] +5C805C7E 807E [Trivial][ILSEQ] +5C805C7F 807F [Trivial][ILSEQ] +5C805C80 8080 [Trivial][ILSEQ] +5C805C81 8081 [Trivial][ILSEQ] +5C805C9F 809F [Trivial][ILSEQ] +5C805CA0 80A0 [Trivial][ILSEQ] +5C805CA1 80A1 [Trivial][ILSEQ] +5C805CE0 80E0 [Trivial][ILSEQ] +5C805CEF 80EF [Trivial][ILSEQ] +5C805CF9 80F9 [Trivial][ILSEQ] +5C805CFA 80FA [Trivial][ILSEQ] +5C805CFC 80FC [Trivial][ILSEQ] +5C805CFD 80FD [Trivial][ILSEQ] +5C805CFE 80FE [Trivial][ILSEQ] +5C805CFF 80FF [Trivial][ILSEQ] +5C815C00 8100 [Trivial][ILSEQ] +5C815C08 8108 [Trivial][ILSEQ] +5C815C09 8109 [Trivial][ILSEQ] +5C815C0A 810A [Trivial][ILSEQ] +5C815C0D 810D [Trivial][ILSEQ] +5C815C1A 811A [Trivial][ILSEQ] +5C815C22 8122 [Trivial][ILSEQ] +5C815C25 815C25 [Regular][ILSEQ] +5C815C27 8127 [Trivial][ILSEQ] +5C815C30 8100 [Regular][ILSEQ] +5C815C3F 813F [Trivial][ILSEQ] +5C815C40 8140 [Trivial][ILSEQ] +5C815C5A 811A [Regular][ILSEQ] +5C815C5C 815C [Regular][ILSEQ] +5C815C5F 815C5F [Regular][ILSEQ] +5C815C61 8161 [Trivial][ILSEQ] +5C815C62 8108 [Regular][ILSEQ] +5C815C6E 810A [Regular][ILSEQ] +5C815C72 810D [Regular][ILSEQ] +5C815C74 8109 [Regular][ILSEQ] +5C815C7E 817E [Trivial][ILSEQ] +5C815C7F 817F [Trivial][ILSEQ] +5C815C80 8180 [Trivial][ILSEQ] +5C815C81 8181 [Trivial][ILSEQ] +5C815C9F 819F [Trivial][ILSEQ] +5C815CA0 81A0 [Trivial][ILSEQ] +5C815CA1 81A1 [Trivial][ILSEQ] +5C815CE0 81E0 [Trivial][ILSEQ] +5C815CEF 81EF [Trivial][ILSEQ] +5C815CF9 81F9 [Trivial][ILSEQ] +5C815CFA 81FA [Trivial][ILSEQ] +5C815CFC 81FC [Trivial][ILSEQ] +5C815CFD 81FD [Trivial][ILSEQ] +5C815CFE 81FE [Trivial][ILSEQ] +5C815CFF 81FF [Trivial][ILSEQ] +5C9F5C00 9F00 [Trivial][ILSEQ] +5C9F5C08 9F08 [Trivial][ILSEQ] +5C9F5C09 9F09 [Trivial][ILSEQ] +5C9F5C0A 9F0A [Trivial][ILSEQ] +5C9F5C0D 9F0D [Trivial][ILSEQ] +5C9F5C1A 9F1A [Trivial][ILSEQ] +5C9F5C22 9F22 [Trivial][ILSEQ] +5C9F5C25 9F5C25 [Regular][ILSEQ] +5C9F5C27 9F27 [Trivial][ILSEQ] +5C9F5C30 9F00 [Regular][ILSEQ] +5C9F5C3F 9F3F [Trivial][ILSEQ] +5C9F5C40 9F40 [Trivial][ILSEQ] +5C9F5C5A 9F1A [Regular][ILSEQ] +5C9F5C5C 9F5C [Regular][ILSEQ] +5C9F5C5F 9F5C5F [Regular][ILSEQ] +5C9F5C61 9F61 [Trivial][ILSEQ] +5C9F5C62 9F08 [Regular][ILSEQ] +5C9F5C6E 9F0A [Regular][ILSEQ] +5C9F5C72 9F0D [Regular][ILSEQ] +5C9F5C74 9F09 [Regular][ILSEQ] +5C9F5C7E 9F7E [Trivial][ILSEQ] +5C9F5C7F 9F7F [Trivial][ILSEQ] +5C9F5C80 9F80 [Trivial][ILSEQ] +5C9F5C81 9F81 [Trivial][ILSEQ] +5C9F5C9F 9F9F [Trivial][ILSEQ] +5C9F5CA0 9FA0 [Trivial][ILSEQ] +5C9F5CA1 9FA1 [Trivial][ILSEQ] +5C9F5CE0 9FE0 [Trivial][ILSEQ] +5C9F5CEF 9FEF [Trivial][ILSEQ] +5C9F5CF9 9FF9 [Trivial][ILSEQ] +5C9F5CFA 9FFA [Trivial][ILSEQ] +5C9F5CFC 9FFC [Trivial][ILSEQ] +5C9F5CFD 9FFD [Trivial][ILSEQ] +5C9F5CFE 9FFE [Trivial][ILSEQ] +5C9F5CFF 9FFF [Trivial][ILSEQ] +5CA05C00 A000 [Trivial][ILSEQ] +5CA05C08 A008 [Trivial][ILSEQ] +5CA05C09 A009 [Trivial][ILSEQ] +5CA05C0A A00A [Trivial][ILSEQ] +5CA05C0D A00D [Trivial][ILSEQ] +5CA05C1A A01A [Trivial][ILSEQ] +5CA05C22 A022 [Trivial][ILSEQ] +5CA05C25 A05C25 [Regular][ILSEQ] +5CA05C27 A027 [Trivial][ILSEQ] +5CA05C30 A000 [Regular][ILSEQ] +5CA05C3F A03F [Trivial][ILSEQ] +5CA05C40 A040 [Trivial][ILSEQ] +5CA05C5A A01A [Regular][ILSEQ] +5CA05C5C A05C [Regular][ILSEQ] +5CA05C5F A05C5F [Regular][ILSEQ] +5CA05C61 A061 [Trivial][ILSEQ] +5CA05C62 A008 [Regular][ILSEQ] +5CA05C6E A00A [Regular][ILSEQ] +5CA05C72 A00D [Regular][ILSEQ] +5CA05C74 A009 [Regular][ILSEQ] +5CA05C7E A07E [Trivial][ILSEQ] +5CA05C7F A07F [Trivial][ILSEQ] +5CA05C80 A080 [Trivial][ILSEQ] +5CA05C81 A081 [Trivial][ILSEQ] +5CA05C9F A09F [Trivial][ILSEQ] +5CA05CA0 A0A0 [Trivial][ILSEQ] +5CA05CA1 A0A1 [Trivial][ILSEQ] +5CA05CE0 A0E0 [Trivial][ILSEQ] +5CA05CEF A0EF [Trivial][ILSEQ] +5CA05CF9 A0F9 [Trivial][ILSEQ] +5CA05CFA A0FA [Trivial][ILSEQ] +5CA05CFC A0FC [Trivial][ILSEQ] +5CA05CFD A0FD [Trivial][ILSEQ] +5CA05CFE A0FE [Trivial][ILSEQ] +5CA05CFF A0FF [Trivial][ILSEQ] +5CA15C00 A100 [Trivial][ILSEQ] +5CA15C08 A108 [Trivial][ILSEQ] +5CA15C09 A109 [Trivial][ILSEQ] +5CA15C0A A10A [Trivial][ILSEQ] +5CA15C0D A10D [Trivial][ILSEQ] +5CA15C1A A11A [Trivial][ILSEQ] +5CA15C22 A122 [Trivial][ILSEQ] +5CA15C25 A15C25 [Regular][ILSEQ] +5CA15C27 A127 [Trivial][ILSEQ] +5CA15C30 A100 [Regular][ILSEQ] +5CA15C3F A13F [Trivial][ILSEQ] +5CA15C40 A140 [Trivial][ILSEQ] +5CA15C5A A11A [Regular][ILSEQ] +5CA15C5C A15C [Regular][ILSEQ] +5CA15C5F A15C5F [Regular][ILSEQ] +5CA15C61 A161 [Trivial][ILSEQ] +5CA15C62 A108 [Regular][ILSEQ] +5CA15C6E A10A [Regular][ILSEQ] +5CA15C72 A10D [Regular][ILSEQ] +5CA15C74 A109 [Regular][ILSEQ] +5CA15C7E A17E [Trivial][ILSEQ] +5CA15C7F A17F [Trivial][ILSEQ] +5CA15C80 A180 [Trivial][ILSEQ] +5CA15C81 A181 [Trivial][ILSEQ] +5CA15C9F A19F [Trivial][ILSEQ] +5CA15CA0 A1A0 [Trivial][ILSEQ] +5CA15CA1 A1A1 [Trivial][ILSEQ] +5CA15CE0 A1E0 [Trivial][ILSEQ] +5CA15CEF A1EF [Trivial][ILSEQ] +5CA15CF9 A1F9 [Trivial][ILSEQ] +5CA15CFA A1FA [Trivial][ILSEQ] +5CA15CFC A1FC [Trivial][ILSEQ] +5CA15CFD A1FD [Trivial][ILSEQ] +5CA15CFE A1FE [Trivial][ILSEQ] +5CA15CFF A1FF [Trivial][ILSEQ] +5CE05C00 E000 [Trivial][ILSEQ] +5CE05C08 E008 [Trivial][ILSEQ] +5CE05C09 E009 [Trivial][ILSEQ] +5CE05C0A E00A [Trivial][ILSEQ] +5CE05C0D E00D [Trivial][ILSEQ] +5CE05C1A E01A [Trivial][ILSEQ] +5CE05C22 E022 [Trivial][ILSEQ] +5CE05C25 E05C25 [Regular][ILSEQ] +5CE05C27 E027 [Trivial][ILSEQ] +5CE05C30 E000 [Regular][ILSEQ] +5CE05C3F E03F [Trivial][ILSEQ] +5CE05C40 E040 [Trivial][ILSEQ] +5CE05C5A E01A [Regular][ILSEQ] +5CE05C5C E05C [Regular][ILSEQ] +5CE05C5F E05C5F [Regular][ILSEQ] +5CE05C61 E061 [Trivial][ILSEQ] +5CE05C62 E008 [Regular][ILSEQ] +5CE05C6E E00A [Regular][ILSEQ] +5CE05C72 E00D [Regular][ILSEQ] +5CE05C74 E009 [Regular][ILSEQ] +5CE05C7E E07E [Trivial][ILSEQ] +5CE05C7F E07F [Trivial][ILSEQ] +5CE05C80 E080 [Trivial][ILSEQ] +5CE05C81 E081 [Trivial][ILSEQ] +5CE05C9F E09F [Trivial][ILSEQ] +5CE05CA0 E0A0 [Trivial][ILSEQ] +5CE05CA1 E0A1 [Trivial][ILSEQ] +5CE05CE0 E0E0 [Trivial][ILSEQ] +5CE05CEF E0EF [Trivial][ILSEQ] +5CE05CF9 E0F9 [Trivial][ILSEQ] +5CE05CFA E0FA [Trivial][ILSEQ] +5CE05CFC E0FC [Trivial][ILSEQ] +5CE05CFD E0FD [Trivial][ILSEQ] +5CE05CFE E0FE [Trivial][ILSEQ] +5CE05CFF E0FF [Trivial][ILSEQ] +5CEF5C00 EF00 [Trivial][ILSEQ] +5CEF5C08 EF08 [Trivial][ILSEQ] +5CEF5C09 EF09 [Trivial][ILSEQ] +5CEF5C0A EF0A [Trivial][ILSEQ] +5CEF5C0D EF0D [Trivial][ILSEQ] +5CEF5C1A EF1A [Trivial][ILSEQ] +5CEF5C22 EF22 [Trivial][ILSEQ] +5CEF5C25 EF5C25 [Regular][ILSEQ] +5CEF5C27 EF27 [Trivial][ILSEQ] +5CEF5C30 EF00 [Regular][ILSEQ] +5CEF5C3F EF3F [Trivial][ILSEQ] +5CEF5C40 EF40 [Trivial][ILSEQ] +5CEF5C5A EF1A [Regular][ILSEQ] +5CEF5C5C EF5C [Regular][ILSEQ] +5CEF5C5F EF5C5F [Regular][ILSEQ] +5CEF5C61 EF61 [Trivial][ILSEQ] +5CEF5C62 EF08 [Regular][ILSEQ] +5CEF5C6E EF0A [Regular][ILSEQ] +5CEF5C72 EF0D [Regular][ILSEQ] +5CEF5C74 EF09 [Regular][ILSEQ] +5CEF5C7E EF7E [Trivial][ILSEQ] +5CEF5C7F EF7F [Trivial][ILSEQ] +5CEF5C80 EF80 [Trivial][ILSEQ] +5CEF5C81 EF81 [Trivial][ILSEQ] +5CEF5C9F EF9F [Trivial][ILSEQ] +5CEF5CA0 EFA0 [Trivial][ILSEQ] +5CEF5CA1 EFA1 [Trivial][ILSEQ] +5CEF5CE0 EFE0 [Trivial][ILSEQ] +5CEF5CEF EFEF [Trivial][ILSEQ] +5CEF5CF9 EFF9 [Trivial][ILSEQ] +5CEF5CFA EFFA [Trivial][ILSEQ] +5CEF5CFC EFFC [Trivial][ILSEQ] +5CEF5CFD EFFD [Trivial][ILSEQ] +5CEF5CFE EFFE [Trivial][ILSEQ] +5CEF5CFF EFFF [Trivial][ILSEQ] +5CF95C00 F900 [Trivial][ILSEQ] +5CF95C08 F908 [Trivial][ILSEQ] +5CF95C09 F909 [Trivial][ILSEQ] +5CF95C0A F90A [Trivial][ILSEQ] +5CF95C0D F90D [Trivial][ILSEQ] +5CF95C1A F91A [Trivial][ILSEQ] +5CF95C22 F922 [Trivial][ILSEQ] +5CF95C25 F95C25 [Regular][ILSEQ] +5CF95C27 F927 [Trivial][ILSEQ] +5CF95C30 F900 [Regular][ILSEQ] +5CF95C3F F93F [Trivial][ILSEQ] +5CF95C40 F940 [Trivial][ILSEQ] +5CF95C5A F91A [Regular][ILSEQ] +5CF95C5C F95C [Regular][ILSEQ] +5CF95C5F F95C5F [Regular][ILSEQ] +5CF95C61 F961 [Trivial][ILSEQ] +5CF95C62 F908 [Regular][ILSEQ] +5CF95C6E F90A [Regular][ILSEQ] +5CF95C72 F90D [Regular][ILSEQ] +5CF95C74 F909 [Regular][ILSEQ] +5CF95C7E F97E [Trivial][ILSEQ] +5CF95C7F F97F [Trivial][ILSEQ] +5CF95C80 F980 [Trivial][ILSEQ] +5CF95C81 F981 [Trivial][ILSEQ] +5CF95C9F F99F [Trivial][ILSEQ] +5CF95CA0 F9A0 [Trivial][ILSEQ] +5CF95CA1 F9A1 [Trivial][ILSEQ] +5CF95CE0 F9E0 [Trivial][ILSEQ] +5CF95CEF F9EF [Trivial][ILSEQ] +5CF95CF9 F9F9 [Trivial][ILSEQ] +5CF95CFA F9FA [Trivial][ILSEQ] +5CF95CFC F9FC [Trivial][ILSEQ] +5CF95CFD F9FD [Trivial][ILSEQ] +5CF95CFE F9FE [Trivial][ILSEQ] +5CF95CFF F9FF [Trivial][ILSEQ] +5CFA5C00 FA00 [Trivial][ILSEQ] +5CFA5C08 FA08 [Trivial][ILSEQ] +5CFA5C09 FA09 [Trivial][ILSEQ] +5CFA5C0A FA0A [Trivial][ILSEQ] +5CFA5C0D FA0D [Trivial][ILSEQ] +5CFA5C1A FA1A [Trivial][ILSEQ] +5CFA5C22 FA22 [Trivial][ILSEQ] +5CFA5C25 FA5C25 [Regular][ILSEQ] +5CFA5C27 FA27 [Trivial][ILSEQ] +5CFA5C30 FA00 [Regular][ILSEQ] +5CFA5C3F FA3F [Trivial][ILSEQ] +5CFA5C40 FA40 [Trivial][ILSEQ] +5CFA5C5A FA1A [Regular][ILSEQ] +5CFA5C5C FA5C [Regular][ILSEQ] +5CFA5C5F FA5C5F [Regular][ILSEQ] +5CFA5C61 FA61 [Trivial][ILSEQ] +5CFA5C62 FA08 [Regular][ILSEQ] +5CFA5C6E FA0A [Regular][ILSEQ] +5CFA5C72 FA0D [Regular][ILSEQ] +5CFA5C74 FA09 [Regular][ILSEQ] +5CFA5C7E FA7E [Trivial][ILSEQ] +5CFA5C7F FA7F [Trivial][ILSEQ] +5CFA5C80 FA80 [Trivial][ILSEQ] +5CFA5C81 FA81 [Trivial][ILSEQ] +5CFA5C9F FA9F [Trivial][ILSEQ] +5CFA5CA0 FAA0 [Trivial][ILSEQ] +5CFA5CA1 FAA1 [Trivial][ILSEQ] +5CFA5CE0 FAE0 [Trivial][ILSEQ] +5CFA5CEF FAEF [Trivial][ILSEQ] +5CFA5CF9 FAF9 [Trivial][ILSEQ] +5CFA5CFA FAFA [Trivial][ILSEQ] +5CFA5CFC FAFC [Trivial][ILSEQ] +5CFA5CFD FAFD [Trivial][ILSEQ] +5CFA5CFE FAFE [Trivial][ILSEQ] +5CFA5CFF FAFF [Trivial][ILSEQ] +5CFC5C00 FC00 [Trivial][ILSEQ] +5CFC5C08 FC08 [Trivial][ILSEQ] +5CFC5C09 FC09 [Trivial][ILSEQ] +5CFC5C0A FC0A [Trivial][ILSEQ] +5CFC5C0D FC0D [Trivial][ILSEQ] +5CFC5C1A FC1A [Trivial][ILSEQ] +5CFC5C22 FC22 [Trivial][ILSEQ] +5CFC5C25 FC5C25 [Regular][ILSEQ] +5CFC5C27 FC27 [Trivial][ILSEQ] +5CFC5C30 FC00 [Regular][ILSEQ] +5CFC5C3F FC3F [Trivial][ILSEQ] +5CFC5C40 FC40 [Trivial][ILSEQ] +5CFC5C5A FC1A [Regular][ILSEQ] +5CFC5C5C FC5C [Regular][ILSEQ] +5CFC5C5F FC5C5F [Regular][ILSEQ] +5CFC5C61 FC61 [Trivial][ILSEQ] +5CFC5C62 FC08 [Regular][ILSEQ] +5CFC5C6E FC0A [Regular][ILSEQ] +5CFC5C72 FC0D [Regular][ILSEQ] +5CFC5C74 FC09 [Regular][ILSEQ] +5CFC5C7E FC7E [Trivial][ILSEQ] +5CFC5C7F FC7F [Trivial][ILSEQ] +5CFC5C80 FC80 [Trivial][ILSEQ] +5CFC5C81 FC81 [Trivial][ILSEQ] +5CFC5C9F FC9F [Trivial][ILSEQ] +5CFC5CA0 FCA0 [Trivial][ILSEQ] +5CFC5CA1 FCA1 [Trivial][ILSEQ] +5CFC5CE0 FCE0 [Trivial][ILSEQ] +5CFC5CEF FCEF [Trivial][ILSEQ] +5CFC5CF9 FCF9 [Trivial][ILSEQ] +5CFC5CFA FCFA [Trivial][ILSEQ] +5CFC5CFC FCFC [Trivial][ILSEQ] +5CFC5CFD FCFD [Trivial][ILSEQ] +5CFC5CFE FCFE [Trivial][ILSEQ] +5CFC5CFF FCFF [Trivial][ILSEQ] +5CFD5C00 FD00 [Trivial][ILSEQ] +5CFD5C08 FD08 [Trivial][ILSEQ] +5CFD5C09 FD09 [Trivial][ILSEQ] +5CFD5C0A FD0A [Trivial][ILSEQ] +5CFD5C0D FD0D [Trivial][ILSEQ] +5CFD5C1A FD1A [Trivial][ILSEQ] +5CFD5C22 FD22 [Trivial][ILSEQ] +5CFD5C25 FD5C25 [Regular][ILSEQ] +5CFD5C27 FD27 [Trivial][ILSEQ] +5CFD5C30 FD00 [Regular][ILSEQ] +5CFD5C3F FD3F [Trivial][ILSEQ] +5CFD5C40 FD40 [Trivial][ILSEQ] +5CFD5C5A FD1A [Regular][ILSEQ] +5CFD5C5C FD5C [Regular][ILSEQ] +5CFD5C5F FD5C5F [Regular][ILSEQ] +5CFD5C61 FD61 [Trivial][ILSEQ] +5CFD5C62 FD08 [Regular][ILSEQ] +5CFD5C6E FD0A [Regular][ILSEQ] +5CFD5C72 FD0D [Regular][ILSEQ] +5CFD5C74 FD09 [Regular][ILSEQ] +5CFD5C7E FD7E [Trivial][ILSEQ] +5CFD5C7F FD7F [Trivial][ILSEQ] +5CFD5C80 FD80 [Trivial][ILSEQ] +5CFD5C81 FD81 [Trivial][ILSEQ] +5CFD5C9F FD9F [Trivial][ILSEQ] +5CFD5CA0 FDA0 [Trivial][ILSEQ] +5CFD5CA1 FDA1 [Trivial][ILSEQ] +5CFD5CE0 FDE0 [Trivial][ILSEQ] +5CFD5CEF FDEF [Trivial][ILSEQ] +5CFD5CF9 FDF9 [Trivial][ILSEQ] +5CFD5CFA FDFA [Trivial][ILSEQ] +5CFD5CFC FDFC [Trivial][ILSEQ] +5CFD5CFD FDFD [Trivial][ILSEQ] +5CFD5CFE FDFE [Trivial][ILSEQ] +5CFD5CFF FDFF [Trivial][ILSEQ] +5CFE5C00 FE00 [Trivial][ILSEQ] +5CFE5C08 FE08 [Trivial][ILSEQ] +5CFE5C09 FE09 [Trivial][ILSEQ] +5CFE5C0A FE0A [Trivial][ILSEQ] +5CFE5C0D FE0D [Trivial][ILSEQ] +5CFE5C1A FE1A [Trivial][ILSEQ] +5CFE5C22 FE22 [Trivial][ILSEQ] +5CFE5C25 FE5C25 [Regular][ILSEQ] +5CFE5C27 FE27 [Trivial][ILSEQ] +5CFE5C30 FE00 [Regular][ILSEQ] +5CFE5C3F FE3F [Trivial][ILSEQ] +5CFE5C40 FE40 [Trivial][ILSEQ] +5CFE5C5A FE1A [Regular][ILSEQ] +5CFE5C5C FE5C [Regular][ILSEQ] +5CFE5C5F FE5C5F [Regular][ILSEQ] +5CFE5C61 FE61 [Trivial][ILSEQ] +5CFE5C62 FE08 [Regular][ILSEQ] +5CFE5C6E FE0A [Regular][ILSEQ] +5CFE5C72 FE0D [Regular][ILSEQ] +5CFE5C74 FE09 [Regular][ILSEQ] +5CFE5C7E FE7E [Trivial][ILSEQ] +5CFE5C7F FE7F [Trivial][ILSEQ] +5CFE5C80 FE80 [Trivial][ILSEQ] +5CFE5C81 FE81 [Trivial][ILSEQ] +5CFE5C9F FE9F [Trivial][ILSEQ] +5CFE5CA0 FEA0 [Trivial][ILSEQ] +5CFE5CA1 FEA1 [Trivial][ILSEQ] +5CFE5CE0 FEE0 [Trivial][ILSEQ] +5CFE5CEF FEEF [Trivial][ILSEQ] +5CFE5CF9 FEF9 [Trivial][ILSEQ] +5CFE5CFA FEFA [Trivial][ILSEQ] +5CFE5CFC FEFC [Trivial][ILSEQ] +5CFE5CFD FEFD [Trivial][ILSEQ] +5CFE5CFE FEFE [Trivial][ILSEQ] +5CFE5CFF FEFF [Trivial][ILSEQ] +5CFF5C00 FF00 [Trivial][ILSEQ] +5CFF5C08 FF08 [Trivial][ILSEQ] +5CFF5C09 FF09 [Trivial][ILSEQ] +5CFF5C0A FF0A [Trivial][ILSEQ] +5CFF5C0D FF0D [Trivial][ILSEQ] +5CFF5C1A FF1A [Trivial][ILSEQ] +5CFF5C22 FF22 [Trivial][ILSEQ] +5CFF5C25 FF5C25 [Regular][ILSEQ] +5CFF5C27 FF27 [Trivial][ILSEQ] +5CFF5C30 FF00 [Regular][ILSEQ] +5CFF5C3F FF3F [Trivial][ILSEQ] +5CFF5C40 FF40 [Trivial][ILSEQ] +5CFF5C5A FF1A [Regular][ILSEQ] +5CFF5C5C FF5C [Regular][ILSEQ] +5CFF5C5F FF5C5F [Regular][ILSEQ] +5CFF5C61 FF61 [Trivial][ILSEQ] +5CFF5C62 FF08 [Regular][ILSEQ] +5CFF5C6E FF0A [Regular][ILSEQ] +5CFF5C72 FF0D [Regular][ILSEQ] +5CFF5C74 FF09 [Regular][ILSEQ] +5CFF5C7E FF7E [Trivial][ILSEQ] +5CFF5C7F FF7F [Trivial][ILSEQ] +5CFF5C80 FF80 [Trivial][ILSEQ] +5CFF5C81 FF81 [Trivial][ILSEQ] +5CFF5C9F FF9F [Trivial][ILSEQ] +5CFF5CA0 FFA0 [Trivial][ILSEQ] +5CFF5CA1 FFA1 [Trivial][ILSEQ] +5CFF5CE0 FFE0 [Trivial][ILSEQ] +5CFF5CEF FFEF [Trivial][ILSEQ] +5CFF5CF9 FFF9 [Trivial][ILSEQ] +5CFF5CFA FFFA [Trivial][ILSEQ] +5CFF5CFC FFFC [Trivial][ILSEQ] +5CFF5CFD FFFD [Trivial][ILSEQ] +5CFF5CFE FFFE [Trivial][ILSEQ] +5CFF5CFF FFFF [Trivial][ILSEQ] +DROP TABLE t1; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP FUNCTION unescape; +DROP FUNCTION unescape_type; +DROP FUNCTION wellformedness; +DROP FUNCTION mysql_real_escape_string_generated; +DROP FUNCTION iswellformed; +DROP TABLE allbytes; +# End of ctype_backslash.inc +# +# MDEV-12681 Wrong VIEW results for CHAR(0xDF USING latin1) +# +SET NAMES utf8; +SELECT CHAR(0xDF USING latin1); +CHAR(0xDF USING latin1) +ß +CREATE OR REPLACE VIEW v1 AS SELECT CHAR(0xDF USING latin1) AS c; +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select char(0xdf using latin1) AS `c` utf8 utf8_general_ci +SELECT * FROM v1; +c +ß +DROP VIEW v1; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/ctype_utf8mb4.result b/mysql-test/r/ctype_utf8mb4.result index 17a1a2f787e..ff9c155e445 100644 --- a/mysql-test/r/ctype_utf8mb4.result +++ b/mysql-test/r/ctype_utf8mb4.result @@ -270,7 +270,7 @@ b select * from t1 where a = 'b' and a != 'b'; a drop table t1; -set collation_connection=utf8mb4_general_ci; +set names utf8mb4; drop table if exists t1; create table t1 as select repeat(' ', 64) as s1, repeat(' ',64) as s2 @@ -314,8 +314,21 @@ NULL NULL NULL drop table t1; -set names utf8mb4; -set names utf8mb4; +SELECT @@character_set_client, @@collation_connection; +@@character_set_client @@collation_connection +utf8mb4 utf8mb4_general_ci +select 'ваÑÑ' rlike '\\bваÑÑ\\b'; +'ваÑÑ' rlike '\\bваÑÑ\\b' +1 +select 'ваÑÑ ' rlike '\\bваÑÑ\\b'; +'ваÑÑ ' rlike '\\bваÑÑ\\b' +1 +select ' ваÑÑ' rlike '\\bваÑÑ\\b'; +' ваÑÑ' rlike '\\bваÑÑ\\b' +1 +select ' ваÑÑ ' rlike '\\bваÑÑ\\b'; +' ваÑÑ ' rlike '\\bваÑÑ\\b' +1 select 'ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'; 'ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]' 1 @@ -328,6 +341,15 @@ select ' ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'; select ' ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]'; ' ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]' 1 +select 'ваÑÑz' rlike '\\bваÑÑ\\b'; +'ваÑÑz' rlike '\\bваÑÑ\\b' +0 +select 'zваÑÑ' rlike '\\bваÑÑ\\b'; +'zваÑÑ' rlike '\\bваÑÑ\\b' +0 +select 'zваÑÑz' rlike '\\bваÑÑ\\b'; +'zваÑÑz' rlike '\\bваÑÑ\\b' +0 select 'ваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]'; 'ваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]' 0 @@ -941,6 +963,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf8mb4_general_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf8mb4_general_ci @@ -959,41 +1032,122 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; c2h ab_def drop table t1; +"BEGIN ctype_german.inc" drop table if exists t1; create table t1 as select repeat(' ', 64) as s1; select collation(s1) from t1; collation(s1) utf8mb4_general_ci delete from t1; +INSERT INTO t1 VALUES ('ud'),('uf'); +INSERT INTO t1 VALUES ('od'),('of'); +INSERT INTO t1 VALUES ('e'); +INSERT INTO t1 VALUES ('ad'),('af'); insert into t1 values ('a'),('ae'),(_latin1 0xE4); insert into t1 values ('o'),('oe'),(_latin1 0xF6); insert into t1 values ('s'),('ss'),(_latin1 0xDF); insert into t1 values ('u'),('ue'),(_latin1 0xFC); +INSERT INTO t1 VALUES (_latin1 0xE6), (_latin1 0xC6); +INSERT INTO t1 VALUES (_latin1 0x9C), (_latin1 0x8C); select s1, hex(s1) from t1 order by s1, binary s1; s1 hex(s1) a 61 ä C3A4 +ad 6164 ae 6165 +af 6166 +e 65 o 6F ö C3B6 +od 6F64 oe 6F65 +of 6F66 s 73 ß C39F ss 7373 u 75 ü C3BC +ud 7564 ue 7565 +uf 7566 +Æ C386 +æ C3A6 +Å’ C592 +Å“ C593 select group_concat(s1 order by binary s1) from t1 group by s1; group_concat(s1 order by binary s1) a,ä +ad ae +af +e o,ö +od oe +of s,ß ss u,ü +ud ue +uf +Æ,æ +Å’,Å“ +SELECT s1, hex(s1), hex(weight_string(s1)) FROM t1 ORDER BY s1, BINARY(s1); +s1 hex(s1) hex(weight_string(s1)) +a 61 0041 +ä C3A4 0041 +ad 6164 00410044 +ae 6165 00410045 +af 6166 00410046 +e 65 0045 +o 6F 004F +ö C3B6 004F +od 6F64 004F0044 +oe 6F65 004F0045 +of 6F66 004F0046 +s 73 0053 +ß C39F 0053 +ss 7373 00530053 +u 75 0055 +ü C3BC 0055 +ud 7564 00550044 +ue 7565 00550045 +uf 7566 00550046 +Æ C386 00C6 +æ C3A6 00C6 +Å’ C592 0152 +Å“ C593 0152 +SELECT s1, hex(s1) FROM t1 WHERE s1='ae' ORDER BY s1, BINARY(s1); +s1 hex(s1) +ae 6165 drop table t1; +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf8mb4 NOT NULL DEFAULT '', + `b` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); +SELECT * FROM t1 ORDER BY a, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY a DESC, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a), b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a) DESC, b; +a b +s 0 +ß 1 +DROP TABLE t1; +"END ctype_german.inc" SET collation_connection='utf8mb4_bin'; create table t1 select repeat('a',4000) a; delete from t1; @@ -1022,6 +1176,57 @@ i 1 DROP TABLE t1; # +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf8mb4_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; +# # Bug#55980 Character sets: supplementary character _bin ordering is wrong # CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a LIMIT 0; @@ -1305,7 +1510,7 @@ DROP TABLE t1; SET NAMES utf8mb4; DROP TABLE IF EXISTS t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; Warnings: Warning 1071 Specified key was too long; max key length is 1000 bytes @@ -2501,7 +2706,6 @@ MODIFY subject varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, MODIFY p varchar(255) CHARACTER SET utf8; Warnings: Warning 1071 Specified key was too long; max key length is 1000 bytes -Warning 1071 Specified key was too long; max key length is 1000 bytes SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -2588,8 +2792,7 @@ t2 CREATE TABLE `t2` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1, t2; # -# Bug#13581962 HIGH MEMORY USAGE ATTEMPT, THEN CRASH WITH -# LONGTEXT, UNION, USER VARIABLE +# Bug#13581962 HIGH MEMORY USAGE ATTEMPT, THEN CRASH WITH LONGTEXT, UNION, USER VARIABLE # Bug#14096619 UNABLE TO RESTORE DATABASE DUMP # CREATE TABLE t1(f1 LONGTEXT CHARACTER SET utf8mb4); @@ -2659,5 +2862,549 @@ len # End of 5.5 tests # # +# WL#3664 WEIGHT_STRING +# +set names utf8mb4; +select @@collation_connection; +@@collation_connection +utf8mb4_general_ci +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf8mb4 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(2) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +0041 +SELECT HEX(ws) FROM t2; +HEX(ws) +0041 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET utf8mb4 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +00410041004100410041 +SELECT HEX(ws) FROM t2; +HEX(ws) +00410041004100410041 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +004100410041 +SELECT HEX(ws) FROM t2; +HEX(ws) +004100410041 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +0041004100410041004100200020002000200020 +SELECT HEX(ws) FROM t2; +HEX(ws) +0041004100410041004100200020002000200020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +0041 +select hex(weight_string('A')); +hex(weight_string('A')) +0041 +select hex(weight_string('abc')); +hex(weight_string('abc')) +004100420043 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +00410042 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +004100420043 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +00410042004300200020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +00 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0041 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +004100 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +00410042002000200020002000200020002000200020002000 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +00 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0041 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +004100 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +00410042004300200020002000200020002000200020002000 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +00 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0041 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +004100 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +00410042 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0041004200 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +00410042004300200020002000200020002000200020002000 +select @@collation_connection; +@@collation_connection +utf8mb4_general_ci +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +20AC20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +20AC20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +20AC20AC20AC00200020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +20AC20AC00 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +20AC20AC002000200020002000200020002000200020002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +20AC20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +20AC20AC20AC00200020002000200020002000200020002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +20 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +20AC20AC +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +20AC20AC20 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +20AC20AC20AC00200020002000200020002000200020002000 +select @@collation_connection; +@@collation_connection +utf8mb4_general_ci +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +0041 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +0041 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +004100420043 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +00410042 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +004100420043 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +00410042004300200020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +20002000430042004100 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +FFBEFFBDFFBCFFDFFFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFFFDFFFBCFFBDFFBEFF +set @@collation_connection=utf8mb4_bin; +select @@collation_connection; +@@collation_connection +utf8mb4_bin +CREATE TABLE t1 AS SELECT 'a' AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +000061 +SELECT HEX(ws) FROM t2; +HEX(ws) +000061 +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(15) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a)) FROM t1; +HEX(WEIGHT_STRING(a)) +000061000061000061000061000061 +SELECT HEX(ws) FROM t2; +HEX(ws) +000061000061000061000061000061 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(3)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(9) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(3))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(3))) +000061000061000061 +SELECT HEX(ws) FROM t2; +HEX(ws) +000061000061000061 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT WEIGHT_STRING(a AS CHAR(10)) AS ws FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ws` varbinary(30) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1; +HEX(WEIGHT_STRING(a AS CHAR(10))) +000061000061000061000061000061000020000020000020000020000020 +SELECT HEX(ws) FROM t2; +HEX(ws) +000061000061000061000061000061000020000020000020000020000020 +DROP TABLE t2; +DROP TABLE t1; +select hex(weight_string('a')); +hex(weight_string('a')) +000061 +select hex(weight_string('A')); +hex(weight_string('A')) +000041 +select hex(weight_string('abc')); +hex(weight_string('abc')) +000061000062000063 +select hex(weight_string('abc' as char(2))); +hex(weight_string('abc' as char(2))) +000061000062 +select hex(weight_string('abc' as char(3))); +hex(weight_string('abc' as char(3))) +000061000062000063 +select hex(weight_string('abc' as char(5))); +hex(weight_string('abc' as char(5))) +000061000062000063000020000020 +select hex(weight_string('abc', 1, 2, 0xC0)); +hex(weight_string('abc', 1, 2, 0xC0)) +00 +select hex(weight_string('abc', 2, 2, 0xC0)); +hex(weight_string('abc', 2, 2, 0xC0)) +0000 +select hex(weight_string('abc', 3, 2, 0xC0)); +hex(weight_string('abc', 3, 2, 0xC0)) +000061 +select hex(weight_string('abc', 4, 2, 0xC0)); +hex(weight_string('abc', 4, 2, 0xC0)) +00006100 +select hex(weight_string('abc', 5, 2, 0xC0)); +hex(weight_string('abc', 5, 2, 0xC0)) +0000610000 +select hex(weight_string('abc',25, 2, 0xC0)); +hex(weight_string('abc',25, 2, 0xC0)) +00006100006200002000002000002000002000002000002000 +select hex(weight_string('abc', 1, 3, 0xC0)); +hex(weight_string('abc', 1, 3, 0xC0)) +00 +select hex(weight_string('abc', 2, 3, 0xC0)); +hex(weight_string('abc', 2, 3, 0xC0)) +0000 +select hex(weight_string('abc', 3, 3, 0xC0)); +hex(weight_string('abc', 3, 3, 0xC0)) +000061 +select hex(weight_string('abc', 4, 3, 0xC0)); +hex(weight_string('abc', 4, 3, 0xC0)) +00006100 +select hex(weight_string('abc', 5, 3, 0xC0)); +hex(weight_string('abc', 5, 3, 0xC0)) +0000610000 +select hex(weight_string('abc',25, 3, 0xC0)); +hex(weight_string('abc',25, 3, 0xC0)) +00006100006200006300002000002000002000002000002000 +select hex(weight_string('abc', 1, 4, 0xC0)); +hex(weight_string('abc', 1, 4, 0xC0)) +00 +select hex(weight_string('abc', 2, 4, 0xC0)); +hex(weight_string('abc', 2, 4, 0xC0)) +0000 +select hex(weight_string('abc', 3, 4, 0xC0)); +hex(weight_string('abc', 3, 4, 0xC0)) +000061 +select hex(weight_string('abc', 4, 4, 0xC0)); +hex(weight_string('abc', 4, 4, 0xC0)) +00006100 +select hex(weight_string('abc', 5, 4, 0xC0)); +hex(weight_string('abc', 5, 4, 0xC0)) +0000610000 +select hex(weight_string('abc',25, 4, 0xC0)); +hex(weight_string('abc',25, 4, 0xC0)) +00006100006200006300002000002000002000002000002000 +select @@collation_connection; +@@collation_connection +utf8mb4_bin +select hex(weight_string(cast(_latin1 0x80 as char))); +hex(weight_string(cast(_latin1 0x80 as char))) +0020AC +select hex(weight_string(cast(_latin1 0x808080 as char))); +hex(weight_string(cast(_latin1 0x808080 as char))) +0020AC0020AC0020AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(2))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(2))) +0020AC0020AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(3))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(3))) +0020AC0020AC0020AC +select hex(weight_string(cast(_latin1 0x808080 as char) as char(5))); +hex(weight_string(cast(_latin1 0x808080 as char) as char(5))) +0020AC0020AC0020AC000020000020 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0)) +00 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0)) +0020 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0)) +0020AC +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0)) +0020AC00 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0)) +0020AC0020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0)) +0020AC0020AC00002000002000002000002000002000002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0)) +00 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0)) +0020 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0)) +0020AC +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0)) +0020AC00 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0)) +0020AC0020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0)) +0020AC0020AC0020AC00002000002000002000002000002000 +select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0)) +00 +select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0)) +0020 +select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0)) +0020AC +select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0)) +0020AC00 +select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0)) +0020AC0020 +select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)); +hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0)) +0020AC0020AC0020AC00002000002000002000002000002000 +select @@collation_connection; +@@collation_connection +utf8mb4_bin +select hex(weight_string('a' LEVEL 1)); +hex(weight_string('a' LEVEL 1)) +000061 +select hex(weight_string('A' LEVEL 1)); +hex(weight_string('A' LEVEL 1)) +000041 +select hex(weight_string('abc' LEVEL 1)); +hex(weight_string('abc' LEVEL 1)) +000061000062000063 +select hex(weight_string('abc' as char(2) LEVEL 1)); +hex(weight_string('abc' as char(2) LEVEL 1)) +000061000062 +select hex(weight_string('abc' as char(3) LEVEL 1)); +hex(weight_string('abc' as char(3) LEVEL 1)) +000061000062000063 +select hex(weight_string('abc' as char(5) LEVEL 1)); +hex(weight_string('abc' as char(5) LEVEL 1)) +000061000062000063000020000020 +select hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 REVERSE)) +200000200000630000620000610000 +select hex(weight_string('abc' as char(5) LEVEL 1 DESC)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC)) +FFFF9EFFFF9DFFFF9CFFFFDFFFFFDF +select hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)); +hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE)) +DFFFFFDFFFFF9CFFFF9DFFFF9EFFFF +# +# End of 5.6 tests +# +# +# Start of 10.0 tests +# +# +# MDEV-11343 LOAD DATA INFILE fails to load data with an escape character followed by a multi-byte character +# +CREATE TABLE t1 (a TEXT CHARACTER SET utf8mb4); +LOAD DATA INFILE '../../std_data/loaddata/mdev-11343.txt' INTO TABLE t1 CHARACTER SET utf8mb4; +SELECT HEX(a) FROM t1; +HEX(a) +C3A4 +C3A478 +78C3A4 +78C3A478 +EA99A0 +EA99A078 +78EA99A0 +78EA99A078 +F09F988E +F09F988E78 +78F09F988E +78F09F988E78 +DROP TABLE t1; +# +# MDEV-8949: COLUMN_CREATE unicode name breakage +# +SET NAMES utf8mb4; +SELECT COLUMN_JSON(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1)); +COLUMN_JSON(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1)) +{"😎":1} +SELECT COLUMN_LIST(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1)); +COLUMN_LIST(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1)) +`😎` +SELECT COLUMN_GET(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1), _utf8mb4 0xF09F988E +as int); +COLUMN_GET(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1), _utf8mb4 0xF09F988E +as int) +1 +CREATE TABLE t1 AS SELECT +COLUMN_LIST(COLUMN_CREATE('a',1)), +COLUMN_JSON(COLUMN_CREATE('b',1)); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `COLUMN_LIST(COLUMN_CREATE('a',1))` longtext CHARACTER SET utf8mb4, + `COLUMN_JSON(COLUMN_CREATE('b',1))` longtext CHARACTER SET utf8mb4 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +SET NAMES default; +# End of 10.0 tests +# # End of tests # diff --git a/mysql-test/r/ctype_utf8mb4_heap.result b/mysql-test/r/ctype_utf8mb4_heap.result index a9a84821f5e..3f543ce73e1 100644 --- a/mysql-test/r/ctype_utf8mb4_heap.result +++ b/mysql-test/r/ctype_utf8mb4_heap.result @@ -260,7 +260,7 @@ b select * from t1 where a = 'b' and a != 'b'; a drop table t1; -set collation_connection=utf8mb4_general_ci; +set names utf8mb4; drop table if exists t1; create table t1 as select repeat(' ', 64) as s1, repeat(' ',64) as s2 @@ -304,8 +304,21 @@ NULL NULL NULL drop table t1; -set names utf8mb4; -set names utf8mb4; +SELECT @@character_set_client, @@collation_connection; +@@character_set_client @@collation_connection +utf8mb4 utf8mb4_general_ci +select 'ваÑÑ' rlike '\\bваÑÑ\\b'; +'ваÑÑ' rlike '\\bваÑÑ\\b' +1 +select 'ваÑÑ ' rlike '\\bваÑÑ\\b'; +'ваÑÑ ' rlike '\\bваÑÑ\\b' +1 +select ' ваÑÑ' rlike '\\bваÑÑ\\b'; +' ваÑÑ' rlike '\\bваÑÑ\\b' +1 +select ' ваÑÑ ' rlike '\\bваÑÑ\\b'; +' ваÑÑ ' rlike '\\bваÑÑ\\b' +1 select 'ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'; 'ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]' 1 @@ -318,6 +331,15 @@ select ' ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'; select ' ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]'; ' ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]' 1 +select 'ваÑÑz' rlike '\\bваÑÑ\\b'; +'ваÑÑz' rlike '\\bваÑÑ\\b' +0 +select 'zваÑÑ' rlike '\\bваÑÑ\\b'; +'zваÑÑ' rlike '\\bваÑÑ\\b' +0 +select 'zваÑÑz' rlike '\\bваÑÑ\\b'; +'zваÑÑz' rlike '\\bваÑÑ\\b' +0 select 'ваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]'; 'ваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]' 0 @@ -880,6 +902,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf8mb4_general_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf8mb4_general_ci @@ -898,41 +971,122 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; c2h ab_def drop table t1; +"BEGIN ctype_german.inc" drop table if exists t1; create table t1 as select repeat(' ', 64) as s1; select collation(s1) from t1; collation(s1) utf8mb4_general_ci delete from t1; +INSERT INTO t1 VALUES ('ud'),('uf'); +INSERT INTO t1 VALUES ('od'),('of'); +INSERT INTO t1 VALUES ('e'); +INSERT INTO t1 VALUES ('ad'),('af'); insert into t1 values ('a'),('ae'),(_latin1 0xE4); insert into t1 values ('o'),('oe'),(_latin1 0xF6); insert into t1 values ('s'),('ss'),(_latin1 0xDF); insert into t1 values ('u'),('ue'),(_latin1 0xFC); +INSERT INTO t1 VALUES (_latin1 0xE6), (_latin1 0xC6); +INSERT INTO t1 VALUES (_latin1 0x9C), (_latin1 0x8C); select s1, hex(s1) from t1 order by s1, binary s1; s1 hex(s1) a 61 ä C3A4 +ad 6164 ae 6165 +af 6166 +e 65 o 6F ö C3B6 +od 6F64 oe 6F65 +of 6F66 s 73 ß C39F ss 7373 u 75 ü C3BC +ud 7564 ue 7565 +uf 7566 +Æ C386 +æ C3A6 +Å’ C592 +Å“ C593 select group_concat(s1 order by binary s1) from t1 group by s1; group_concat(s1 order by binary s1) a,ä +ad ae +af +e o,ö +od oe +of s,ß ss u,ü +ud ue +uf +Æ,æ +Å’,Å“ +SELECT s1, hex(s1), hex(weight_string(s1)) FROM t1 ORDER BY s1, BINARY(s1); +s1 hex(s1) hex(weight_string(s1)) +a 61 0041 +ä C3A4 0041 +ad 6164 00410044 +ae 6165 00410045 +af 6166 00410046 +e 65 0045 +o 6F 004F +ö C3B6 004F +od 6F64 004F0044 +oe 6F65 004F0045 +of 6F66 004F0046 +s 73 0053 +ß C39F 0053 +ss 7373 00530053 +u 75 0055 +ü C3BC 0055 +ud 7564 00550044 +ue 7565 00550045 +uf 7566 00550046 +Æ C386 00C6 +æ C3A6 00C6 +Å’ C592 0152 +Å“ C593 0152 +SELECT s1, hex(s1) FROM t1 WHERE s1='ae' ORDER BY s1, BINARY(s1); +s1 hex(s1) +ae 6165 drop table t1; +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf8mb4 NOT NULL DEFAULT '', + `b` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); +SELECT * FROM t1 ORDER BY a, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY a DESC, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a), b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a) DESC, b; +a b +s 0 +ß 1 +DROP TABLE t1; +"END ctype_german.inc" SET collation_connection='utf8mb4_bin'; create table t1 select repeat('a',4000) a; delete from t1; @@ -960,6 +1114,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf8mb4_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf8mb4_bin @@ -1194,7 +1399,7 @@ DROP TABLE t1; SET NAMES utf8mb4; DROP TABLE IF EXISTS t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=heap DEFAULT CHARSET=utf8mb4; INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); INSERT INTO t1 VALUES('uu'); diff --git a/mysql-test/r/ctype_utf8mb4_innodb.result b/mysql-test/r/ctype_utf8mb4_innodb.result index d8649d3238c..cc0ded6728d 100644 --- a/mysql-test/r/ctype_utf8mb4_innodb.result +++ b/mysql-test/r/ctype_utf8mb4_innodb.result @@ -270,7 +270,7 @@ b select * from t1 where a = 'b' and a != 'b'; a drop table t1; -set collation_connection=utf8mb4_general_ci; +set names utf8mb4; drop table if exists t1; create table t1 as select repeat(' ', 64) as s1, repeat(' ',64) as s2 @@ -314,8 +314,21 @@ NULL NULL NULL drop table t1; -set names utf8mb4; -set names utf8mb4; +SELECT @@character_set_client, @@collation_connection; +@@character_set_client @@collation_connection +utf8mb4 utf8mb4_general_ci +select 'ваÑÑ' rlike '\\bваÑÑ\\b'; +'ваÑÑ' rlike '\\bваÑÑ\\b' +1 +select 'ваÑÑ ' rlike '\\bваÑÑ\\b'; +'ваÑÑ ' rlike '\\bваÑÑ\\b' +1 +select ' ваÑÑ' rlike '\\bваÑÑ\\b'; +' ваÑÑ' rlike '\\bваÑÑ\\b' +1 +select ' ваÑÑ ' rlike '\\bваÑÑ\\b'; +' ваÑÑ ' rlike '\\bваÑÑ\\b' +1 select 'ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'; 'ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]' 1 @@ -328,6 +341,15 @@ select ' ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'; select ' ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]'; ' ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]' 1 +select 'ваÑÑz' rlike '\\bваÑÑ\\b'; +'ваÑÑz' rlike '\\bваÑÑ\\b' +0 +select 'zваÑÑ' rlike '\\bваÑÑ\\b'; +'zваÑÑ' rlike '\\bваÑÑ\\b' +0 +select 'zваÑÑz' rlike '\\bваÑÑ\\b'; +'zваÑÑz' rlike '\\bваÑÑ\\b' +0 select 'ваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]'; 'ваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]' 0 @@ -941,6 +963,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf8mb4_general_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf8mb4_general_ci @@ -959,41 +1032,122 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; c2h ab_def drop table t1; +"BEGIN ctype_german.inc" drop table if exists t1; create table t1 as select repeat(' ', 64) as s1; select collation(s1) from t1; collation(s1) utf8mb4_general_ci delete from t1; +INSERT INTO t1 VALUES ('ud'),('uf'); +INSERT INTO t1 VALUES ('od'),('of'); +INSERT INTO t1 VALUES ('e'); +INSERT INTO t1 VALUES ('ad'),('af'); insert into t1 values ('a'),('ae'),(_latin1 0xE4); insert into t1 values ('o'),('oe'),(_latin1 0xF6); insert into t1 values ('s'),('ss'),(_latin1 0xDF); insert into t1 values ('u'),('ue'),(_latin1 0xFC); +INSERT INTO t1 VALUES (_latin1 0xE6), (_latin1 0xC6); +INSERT INTO t1 VALUES (_latin1 0x9C), (_latin1 0x8C); select s1, hex(s1) from t1 order by s1, binary s1; s1 hex(s1) a 61 ä C3A4 +ad 6164 ae 6165 +af 6166 +e 65 o 6F ö C3B6 +od 6F64 oe 6F65 +of 6F66 s 73 ß C39F ss 7373 u 75 ü C3BC +ud 7564 ue 7565 +uf 7566 +Æ C386 +æ C3A6 +Å’ C592 +Å“ C593 select group_concat(s1 order by binary s1) from t1 group by s1; group_concat(s1 order by binary s1) a,ä +ad ae +af +e o,ö +od oe +of s,ß ss u,ü +ud ue +uf +Æ,æ +Å’,Å“ +SELECT s1, hex(s1), hex(weight_string(s1)) FROM t1 ORDER BY s1, BINARY(s1); +s1 hex(s1) hex(weight_string(s1)) +a 61 0041 +ä C3A4 0041 +ad 6164 00410044 +ae 6165 00410045 +af 6166 00410046 +e 65 0045 +o 6F 004F +ö C3B6 004F +od 6F64 004F0044 +oe 6F65 004F0045 +of 6F66 004F0046 +s 73 0053 +ß C39F 0053 +ss 7373 00530053 +u 75 0055 +ü C3BC 0055 +ud 7564 00550044 +ue 7565 00550045 +uf 7566 00550046 +Æ C386 00C6 +æ C3A6 00C6 +Å’ C592 0152 +Å“ C593 0152 +SELECT s1, hex(s1) FROM t1 WHERE s1='ae' ORDER BY s1, BINARY(s1); +s1 hex(s1) +ae 6165 drop table t1; +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf8mb4 NOT NULL DEFAULT '', + `b` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); +SELECT * FROM t1 ORDER BY a, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY a DESC, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a), b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a) DESC, b; +a b +s 0 +ß 1 +DROP TABLE t1; +"END ctype_german.inc" SET collation_connection='utf8mb4_bin'; create table t1 select repeat('a',4000) a; delete from t1; @@ -1021,6 +1175,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf8mb4_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf8mb4_bin @@ -1265,7 +1470,7 @@ DROP TABLE t1; SET NAMES utf8mb4; DROP TABLE IF EXISTS t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; Warnings: Warning 1071 Specified key was too long; max key length is 767 bytes diff --git a/mysql-test/r/ctype_utf8mb4_myisam.result b/mysql-test/r/ctype_utf8mb4_myisam.result index b0c673fdae5..03e32836cb5 100644 --- a/mysql-test/r/ctype_utf8mb4_myisam.result +++ b/mysql-test/r/ctype_utf8mb4_myisam.result @@ -270,7 +270,7 @@ b select * from t1 where a = 'b' and a != 'b'; a drop table t1; -set collation_connection=utf8mb4_general_ci; +set names utf8mb4; drop table if exists t1; create table t1 as select repeat(' ', 64) as s1, repeat(' ',64) as s2 @@ -314,8 +314,21 @@ NULL NULL NULL drop table t1; -set names utf8mb4; -set names utf8mb4; +SELECT @@character_set_client, @@collation_connection; +@@character_set_client @@collation_connection +utf8mb4 utf8mb4_general_ci +select 'ваÑÑ' rlike '\\bваÑÑ\\b'; +'ваÑÑ' rlike '\\bваÑÑ\\b' +1 +select 'ваÑÑ ' rlike '\\bваÑÑ\\b'; +'ваÑÑ ' rlike '\\bваÑÑ\\b' +1 +select ' ваÑÑ' rlike '\\bваÑÑ\\b'; +' ваÑÑ' rlike '\\bваÑÑ\\b' +1 +select ' ваÑÑ ' rlike '\\bваÑÑ\\b'; +' ваÑÑ ' rlike '\\bваÑÑ\\b' +1 select 'ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'; 'ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]' 1 @@ -328,6 +341,15 @@ select ' ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'; select ' ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]'; ' ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]' 1 +select 'ваÑÑz' rlike '\\bваÑÑ\\b'; +'ваÑÑz' rlike '\\bваÑÑ\\b' +0 +select 'zваÑÑ' rlike '\\bваÑÑ\\b'; +'zваÑÑ' rlike '\\bваÑÑ\\b' +0 +select 'zваÑÑz' rlike '\\bваÑÑ\\b'; +'zваÑÑz' rlike '\\bваÑÑ\\b' +0 select 'ваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]'; 'ваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]' 0 @@ -941,6 +963,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf8mb4_general_ci +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf8mb4_general_ci @@ -959,41 +1032,122 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; c2h ab_def drop table t1; +"BEGIN ctype_german.inc" drop table if exists t1; create table t1 as select repeat(' ', 64) as s1; select collation(s1) from t1; collation(s1) utf8mb4_general_ci delete from t1; +INSERT INTO t1 VALUES ('ud'),('uf'); +INSERT INTO t1 VALUES ('od'),('of'); +INSERT INTO t1 VALUES ('e'); +INSERT INTO t1 VALUES ('ad'),('af'); insert into t1 values ('a'),('ae'),(_latin1 0xE4); insert into t1 values ('o'),('oe'),(_latin1 0xF6); insert into t1 values ('s'),('ss'),(_latin1 0xDF); insert into t1 values ('u'),('ue'),(_latin1 0xFC); +INSERT INTO t1 VALUES (_latin1 0xE6), (_latin1 0xC6); +INSERT INTO t1 VALUES (_latin1 0x9C), (_latin1 0x8C); select s1, hex(s1) from t1 order by s1, binary s1; s1 hex(s1) a 61 ä C3A4 +ad 6164 ae 6165 +af 6166 +e 65 o 6F ö C3B6 +od 6F64 oe 6F65 +of 6F66 s 73 ß C39F ss 7373 u 75 ü C3BC +ud 7564 ue 7565 +uf 7566 +Æ C386 +æ C3A6 +Å’ C592 +Å“ C593 select group_concat(s1 order by binary s1) from t1 group by s1; group_concat(s1 order by binary s1) a,ä +ad ae +af +e o,ö +od oe +of s,ß ss u,ü +ud ue +uf +Æ,æ +Å’,Å“ +SELECT s1, hex(s1), hex(weight_string(s1)) FROM t1 ORDER BY s1, BINARY(s1); +s1 hex(s1) hex(weight_string(s1)) +a 61 0041 +ä C3A4 0041 +ad 6164 00410044 +ae 6165 00410045 +af 6166 00410046 +e 65 0045 +o 6F 004F +ö C3B6 004F +od 6F64 004F0044 +oe 6F65 004F0045 +of 6F66 004F0046 +s 73 0053 +ß C39F 0053 +ss 7373 00530053 +u 75 0055 +ü C3BC 0055 +ud 7564 00550044 +ue 7565 00550045 +uf 7566 00550046 +Æ C386 00C6 +æ C3A6 00C6 +Å’ C592 0152 +Å“ C593 0152 +SELECT s1, hex(s1) FROM t1 WHERE s1='ae' ORDER BY s1, BINARY(s1); +s1 hex(s1) +ae 6165 drop table t1; +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf8mb4 NOT NULL DEFAULT '', + `b` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); +SELECT * FROM t1 ORDER BY a, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY a DESC, b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a), b; +a b +s 0 +ß 1 +SELECT * FROM t1 ORDER BY CONCAT(a) DESC, b; +a b +s 0 +ß 1 +DROP TABLE t1; +"END ctype_german.inc" SET collation_connection='utf8mb4_bin'; create table t1 select repeat('a',4000) a; delete from t1; @@ -1021,6 +1175,57 @@ i 1 1 DROP TABLE t1; +# +# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations +# +SELECT @@collation_connection; +@@collation_connection +utf8mb4_bin +CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0; +INSERT INTO t1 (a) VALUES ("a"); +INSERT INTO t1 (a) VALUES ("b"); +INSERT INTO t1 (a) VALUES ("c"); +INSERT INTO t1 (a) VALUES ("d"); +INSERT INTO t1 (a) VALUES ("e"); +INSERT INTO t1 (a) VALUES ("f"); +INSERT INTO t1 (a) VALUES ("g"); +INSERT INTO t1 (a) VALUES ("h"); +INSERT INTO t1 (a) VALUES ("i"); +INSERT INTO t1 (a) VALUES ("j"); +INSERT INTO t1 (a) VALUES ("k"); +INSERT INTO t1 (a) VALUES ("l"); +INSERT INTO t1 (a) VALUES ("m"); +SELECT * FROM t1 ORDER BY LOWER(a); +a +a +b +c +d +e +f +g +h +i +j +k +l +m +SELECT * FROM t1 ORDER BY LOWER(a) DESC; +a +m +l +k +j +i +h +g +f +e +d +c +b +a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf8mb4_bin @@ -1265,7 +1470,7 @@ DROP TABLE t1; SET NAMES utf8mb4; DROP TABLE IF EXISTS t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; Warnings: Warning 1071 Specified key was too long; max key length is 1000 bytes diff --git a/mysql-test/r/ctype_utf8mb4_uca.result b/mysql-test/r/ctype_utf8mb4_uca.result new file mode 100644 index 00000000000..ef18272ca24 --- /dev/null +++ b/mysql-test/r/ctype_utf8mb4_uca.result @@ -0,0 +1,5317 @@ +DROP TABLE IF EXISTS t1; +# +# Start of 5.5 tests +# +SET NAMES utf8mb4; +CREATE TABLE t1 (c1 CHAR(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin); +insert into t1 values ('A'),('a'); +insert into t1 values ('B'),('b'); +insert into t1 values ('C'),('c'); +insert into t1 values ('D'),('d'); +insert into t1 values ('E'),('e'); +insert into t1 values ('F'),('f'); +insert into t1 values ('G'),('g'); +insert into t1 values ('H'),('h'); +insert into t1 values ('I'),('i'); +insert into t1 values ('J'),('j'); +insert into t1 values ('K'),('k'); +insert into t1 values ('L'),('l'); +insert into t1 values ('M'),('m'); +insert into t1 values ('N'),('n'); +insert into t1 values ('O'),('o'); +insert into t1 values ('P'),('p'); +insert into t1 values ('Q'),('q'); +insert into t1 values ('R'),('r'); +insert into t1 values ('S'),('s'); +insert into t1 values ('T'),('t'); +insert into t1 values ('U'),('u'); +insert into t1 values ('V'),('v'); +insert into t1 values ('W'),('w'); +insert into t1 values ('X'),('x'); +insert into t1 values ('Y'),('y'); +insert into t1 values ('Z'),('z'); +insert into t1 values (_ucs2 0x00e0),(_ucs2 0x00c0); +insert into t1 values (_ucs2 0x00e1),(_ucs2 0x00c1); +insert into t1 values (_ucs2 0x00e2),(_ucs2 0x00c2); +insert into t1 values (_ucs2 0x00e3),(_ucs2 0x00c3); +insert into t1 values (_ucs2 0x00e4),(_ucs2 0x00c4); +insert into t1 values (_ucs2 0x00e5),(_ucs2 0x00c5); +insert into t1 values (_ucs2 0x00e6),(_ucs2 0x00c6); +insert into t1 values (_ucs2 0x00e7),(_ucs2 0x00c7); +insert into t1 values (_ucs2 0x00e8),(_ucs2 0x00c8); +insert into t1 values (_ucs2 0x00e9),(_ucs2 0x00c9); +insert into t1 values (_ucs2 0x00ea),(_ucs2 0x00ca); +insert into t1 values (_ucs2 0x00eb),(_ucs2 0x00cb); +insert into t1 values (_ucs2 0x00ec),(_ucs2 0x00cc); +insert into t1 values (_ucs2 0x00ed),(_ucs2 0x00cd); +insert into t1 values (_ucs2 0x00ee),(_ucs2 0x00ce); +insert into t1 values (_ucs2 0x00ef),(_ucs2 0x00cf); +insert into t1 values (_ucs2 0x00f0),(_ucs2 0x00d0); +insert into t1 values (_ucs2 0x00f1),(_ucs2 0x00d1); +insert into t1 values (_ucs2 0x00f2),(_ucs2 0x00d2); +insert into t1 values (_ucs2 0x00f3),(_ucs2 0x00d3); +insert into t1 values (_ucs2 0x00f4),(_ucs2 0x00d4); +insert into t1 values (_ucs2 0x00f5),(_ucs2 0x00d5); +insert into t1 values (_ucs2 0x00f6),(_ucs2 0x00d6); +insert into t1 values (_ucs2 0x00f7),(_ucs2 0x00d7); +insert into t1 values (_ucs2 0x00f8),(_ucs2 0x00d8); +insert into t1 values (_ucs2 0x00f9),(_ucs2 0x00d9); +insert into t1 values (_ucs2 0x00fa),(_ucs2 0x00da); +insert into t1 values (_ucs2 0x00fb),(_ucs2 0x00db); +insert into t1 values (_ucs2 0x00fc),(_ucs2 0x00dc); +insert into t1 values (_ucs2 0x00fd),(_ucs2 0x00dd); +insert into t1 values (_ucs2 0x00fe),(_ucs2 0x00de); +insert into t1 values (_ucs2 0x00ff),(_ucs2 0x00df); +insert into t1 values (_ucs2 0x0100),(_ucs2 0x0101),(_ucs2 0x0102),(_ucs2 0x0103); +insert into t1 values (_ucs2 0x0104),(_ucs2 0x0105),(_ucs2 0x0106),(_ucs2 0x0107); +insert into t1 values (_ucs2 0x0108),(_ucs2 0x0109),(_ucs2 0x010a),(_ucs2 0x010b); +insert into t1 values (_ucs2 0x010c),(_ucs2 0x010d),(_ucs2 0x010e),(_ucs2 0x010f); +insert into t1 values (_ucs2 0x0110),(_ucs2 0x0111),(_ucs2 0x0112),(_ucs2 0x0113); +insert into t1 values (_ucs2 0x0114),(_ucs2 0x0115),(_ucs2 0x0116),(_ucs2 0x0117); +insert into t1 values (_ucs2 0x0118),(_ucs2 0x0119),(_ucs2 0x011a),(_ucs2 0x011b); +insert into t1 values (_ucs2 0x011c),(_ucs2 0x011d),(_ucs2 0x011e),(_ucs2 0x011f); +insert into t1 values (_ucs2 0x0120),(_ucs2 0x0121),(_ucs2 0x0122),(_ucs2 0x0123); +insert into t1 values (_ucs2 0x0124),(_ucs2 0x0125),(_ucs2 0x0126),(_ucs2 0x0127); +insert into t1 values (_ucs2 0x0128),(_ucs2 0x0129),(_ucs2 0x012a),(_ucs2 0x012b); +insert into t1 values (_ucs2 0x012c),(_ucs2 0x012d),(_ucs2 0x012e),(_ucs2 0x012f); +insert into t1 values (_ucs2 0x0130),(_ucs2 0x0131),(_ucs2 0x0132),(_ucs2 0x0133); +insert into t1 values (_ucs2 0x0134),(_ucs2 0x0135),(_ucs2 0x0136),(_ucs2 0x0137); +insert into t1 values (_ucs2 0x0138),(_ucs2 0x0139),(_ucs2 0x013a),(_ucs2 0x013b); +insert into t1 values (_ucs2 0x013c),(_ucs2 0x013d),(_ucs2 0x013e),(_ucs2 0x013f); +insert into t1 values (_ucs2 0x0140),(_ucs2 0x0141),(_ucs2 0x0142),(_ucs2 0x0143); +insert into t1 values (_ucs2 0x0144),(_ucs2 0x0145),(_ucs2 0x0146),(_ucs2 0x0147); +insert into t1 values (_ucs2 0x0148),(_ucs2 0x0149),(_ucs2 0x014a),(_ucs2 0x014b); +insert into t1 values (_ucs2 0x014c),(_ucs2 0x014d),(_ucs2 0x014e),(_ucs2 0x014f); +insert into t1 values (_ucs2 0x0150),(_ucs2 0x0151),(_ucs2 0x0152),(_ucs2 0x0153); +insert into t1 values (_ucs2 0x0154),(_ucs2 0x0155),(_ucs2 0x0156),(_ucs2 0x0157); +insert into t1 values (_ucs2 0x0158),(_ucs2 0x0159),(_ucs2 0x015a),(_ucs2 0x015b); +insert into t1 values (_ucs2 0x015c),(_ucs2 0x015d),(_ucs2 0x015e),(_ucs2 0x015f); +insert into t1 values (_ucs2 0x0160),(_ucs2 0x0161),(_ucs2 0x0162),(_ucs2 0x0163); +insert into t1 values (_ucs2 0x0164),(_ucs2 0x0165),(_ucs2 0x0166),(_ucs2 0x0167); +insert into t1 values (_ucs2 0x0168),(_ucs2 0x0169),(_ucs2 0x016a),(_ucs2 0x016b); +insert into t1 values (_ucs2 0x016c),(_ucs2 0x016d),(_ucs2 0x016e),(_ucs2 0x016f); +insert into t1 values (_ucs2 0x0170),(_ucs2 0x0171),(_ucs2 0x0172),(_ucs2 0x0173); +insert into t1 values (_ucs2 0x0174),(_ucs2 0x0175),(_ucs2 0x0176),(_ucs2 0x0177); +insert into t1 values (_ucs2 0x0178),(_ucs2 0x0179),(_ucs2 0x017a),(_ucs2 0x017b); +insert into t1 values (_ucs2 0x017c),(_ucs2 0x017d),(_ucs2 0x017e),(_ucs2 0x017f); +insert into t1 values (_ucs2 0x0180),(_ucs2 0x0181),(_ucs2 0x0182),(_ucs2 0x0183); +insert into t1 values (_ucs2 0x0184),(_ucs2 0x0185),(_ucs2 0x0186),(_ucs2 0x0187); +insert into t1 values (_ucs2 0x0188),(_ucs2 0x0189),(_ucs2 0x018a),(_ucs2 0x018b); +insert into t1 values (_ucs2 0x018c),(_ucs2 0x018d),(_ucs2 0x018e),(_ucs2 0x018f); +insert into t1 values (_ucs2 0x0190),(_ucs2 0x0191),(_ucs2 0x0192),(_ucs2 0x0193); +insert into t1 values (_ucs2 0x0194),(_ucs2 0x0195),(_ucs2 0x0196),(_ucs2 0x0197); +insert into t1 values (_ucs2 0x0198),(_ucs2 0x0199),(_ucs2 0x019a),(_ucs2 0x019b); +insert into t1 values (_ucs2 0x019c),(_ucs2 0x019d),(_ucs2 0x019e),(_ucs2 0x019f); +insert into t1 values (_ucs2 0x01a0),(_ucs2 0x01a1),(_ucs2 0x01a2),(_ucs2 0x01a3); +insert into t1 values (_ucs2 0x01a4),(_ucs2 0x01a5),(_ucs2 0x01a6),(_ucs2 0x01a7); +insert into t1 values (_ucs2 0x01a8),(_ucs2 0x01a9),(_ucs2 0x01aa),(_ucs2 0x01ab); +insert into t1 values (_ucs2 0x01ac),(_ucs2 0x01ad),(_ucs2 0x01ae),(_ucs2 0x01af); +insert into t1 values (_ucs2 0x01b0),(_ucs2 0x01b1),(_ucs2 0x01b2),(_ucs2 0x01b3); +insert into t1 values (_ucs2 0x01b4),(_ucs2 0x01b5),(_ucs2 0x01b6),(_ucs2 0x01b7); +insert into t1 values (_ucs2 0x01b8),(_ucs2 0x01b9),(_ucs2 0x01ba),(_ucs2 0x01bb); +insert into t1 values (_ucs2 0x01bc),(_ucs2 0x01bd),(_ucs2 0x01be),(_ucs2 0x01bf); +insert into t1 values (_ucs2 0x01c0),(_ucs2 0x01c1),(_ucs2 0x01c2),(_ucs2 0x01c3); +insert into t1 values (_ucs2 0x01c4),(_ucs2 0x01c5),(_ucs2 0x01c6),(_ucs2 0x01c7); +insert into t1 values (_ucs2 0x01c8),(_ucs2 0x01c9),(_ucs2 0x01ca),(_ucs2 0x01cb); +insert into t1 values (_ucs2 0x01cc),(_ucs2 0x01cd),(_ucs2 0x01ce),(_ucs2 0x01cf); +insert into t1 values (_ucs2 0x01d0),(_ucs2 0x01d1),(_ucs2 0x01d2),(_ucs2 0x01d3); +insert into t1 values (_ucs2 0x01d4),(_ucs2 0x01d5),(_ucs2 0x01d6),(_ucs2 0x01d7); +insert into t1 values (_ucs2 0x01d8),(_ucs2 0x01d9),(_ucs2 0x01da),(_ucs2 0x01db); +insert into t1 values (_ucs2 0x01dc),(_ucs2 0x01dd),(_ucs2 0x01de),(_ucs2 0x01df); +insert into t1 values (_ucs2 0x01e0),(_ucs2 0x01e1),(_ucs2 0x01e2),(_ucs2 0x01e3); +insert into t1 values (_ucs2 0x01e4),(_ucs2 0x01e5),(_ucs2 0x01e6),(_ucs2 0x01e7); +insert into t1 values (_ucs2 0x01e8),(_ucs2 0x01e9),(_ucs2 0x01ea),(_ucs2 0x01eb); +insert into t1 values (_ucs2 0x01ec),(_ucs2 0x01ed),(_ucs2 0x01ee),(_ucs2 0x01ef); +insert into t1 values (_ucs2 0x01f0),(_ucs2 0x01f1),(_ucs2 0x01f2),(_ucs2 0x01f3); +insert into t1 values (_ucs2 0x01f4),(_ucs2 0x01f5),(_ucs2 0x01f6),(_ucs2 0x01f7); +insert into t1 values (_ucs2 0x01f8),(_ucs2 0x01f9),(_ucs2 0x01fa),(_ucs2 0x01fb); +insert into t1 values (_ucs2 0x01fc),(_ucs2 0x01fd),(_ucs2 0x01fe),(_ucs2 0x01ff); +INSERT INTO t1 VALUES (_ucs2 0x1EA0),(_ucs2 0x1EA1),(_ucs2 0x1EA2),(_ucs2 0x1EA3); +INSERT INTO t1 VALUES (_ucs2 0x1EA4),(_ucs2 0x1EA5),(_ucs2 0x1EA6),(_ucs2 0x1EA7); +INSERT INTO t1 VALUES (_ucs2 0x1EA8),(_ucs2 0x1EA9),(_ucs2 0x1EAA),(_ucs2 0x1EAB); +INSERT INTO t1 VALUES (_ucs2 0x1EAC),(_ucs2 0x1EAD),(_ucs2 0x1EAE),(_ucs2 0x1EAF); +INSERT INTO t1 VALUES (_ucs2 0x1EB0),(_ucs2 0x1EB1),(_ucs2 0x1EB2),(_ucs2 0x1EB3); +INSERT INTO t1 VALUES (_ucs2 0x1EB4),(_ucs2 0x1EB5),(_ucs2 0x1EB6),(_ucs2 0x1EB7); +INSERT INTO t1 VALUES (_ucs2 0x1EB8),(_ucs2 0x1EB9),(_ucs2 0x1EBA),(_ucs2 0x1EBB); +INSERT INTO t1 VALUES (_ucs2 0x1EBC),(_ucs2 0x1EBD),(_ucs2 0x1EBE),(_ucs2 0x1EBF); +INSERT INTO t1 VALUES (_ucs2 0x1EC0),(_ucs2 0x1EC1),(_ucs2 0x1EC2),(_ucs2 0x1EC3); +INSERT INTO t1 VALUES (_ucs2 0x1EC4),(_ucs2 0x1EC5),(_ucs2 0x1EC6),(_ucs2 0x1EC7); +INSERT INTO t1 VALUES (_ucs2 0x1EC8),(_ucs2 0x1EC9),(_ucs2 0x1ECA),(_ucs2 0x1ECB); +INSERT INTO t1 VALUES (_ucs2 0x1ECC),(_ucs2 0x1ECD),(_ucs2 0x1ECE),(_ucs2 0x1ECF); +INSERT INTO t1 VALUES (_ucs2 0x1ED0),(_ucs2 0x1ED1),(_ucs2 0x1ED2),(_ucs2 0x1ED3); +INSERT INTO t1 VALUES (_ucs2 0x1ED4),(_ucs2 0x1ED5),(_ucs2 0x1ED6),(_ucs2 0x1ED7); +INSERT INTO t1 VALUES (_ucs2 0x1ED8),(_ucs2 0x1ED9),(_ucs2 0x1EDA),(_ucs2 0x1EDB); +INSERT INTO t1 VALUES (_ucs2 0x1EDC),(_ucs2 0x1EDD),(_ucs2 0x1EDE),(_ucs2 0x1EDF); +INSERT INTO t1 VALUES (_ucs2 0x1EE0),(_ucs2 0x1EE1),(_ucs2 0x1EE2),(_ucs2 0x1EE3); +INSERT INTO t1 VALUES (_ucs2 0x1EE4),(_ucs2 0x1EE5),(_ucs2 0x1EE6),(_ucs2 0x1EE7); +INSERT INTO t1 VALUES (_ucs2 0x1EE8),(_ucs2 0x1EE9),(_ucs2 0x1EEA),(_ucs2 0x1EEB); +INSERT INTO t1 VALUES (_ucs2 0x1EEC),(_ucs2 0x1EED),(_ucs2 0x1EEE),(_ucs2 0x1EEF); +INSERT INTO t1 VALUES (_ucs2 0x1EF0),(_ucs2 0x1EF1); +insert into t1 values ('AA'),('Aa'),('aa'),('aA'); +insert into t1 values ('AE'),('Ae'),('ae'),('aE'); +insert into t1 values ('CH'),('Ch'),('ch'),('cH'); +insert into t1 values ('DZ'),('Dz'),('dz'),('dZ'); +insert into t1 values ('DŽ'),('Dž'),('dž'),('dŽ'); +insert into t1 values ('IJ'),('Ij'),('ij'),('iJ'); +insert into t1 values ('LJ'),('Lj'),('lj'),('lJ'); +insert into t1 values ('LL'),('Ll'),('ll'),('lL'); +insert into t1 values ('NJ'),('Nj'),('nj'),('nJ'); +insert into t1 values ('OE'),('Oe'),('oe'),('oE'); +insert into t1 values ('SS'),('Ss'),('ss'),('sS'); +insert into t1 values ('RR'),('Rr'),('rr'),('rR'); +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_unicode_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_icelandic_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÂÃà âãĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +Ãá +ǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +Ãð +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +EeÈÊËèêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +Éé +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÌÎÃìîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +Ãà +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÔÕòôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +Óó +Ǿǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÛÜùûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Úú +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÿŶŷŸ +Ãý +Ƴƴ +ZzŹźŻżŽž +Æ +Þþ +ÄÆäæ +ÖØöø +Ã…Ã¥ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_latvian_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÇçĆćĈĉĊċ +CHChcHch +ÄŒÄ +Ƈƈ +DdÄŽÄ +DZDzdZdzDŽDždžDZDzdz +DŽDždŽdž +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ç¦Ç§Ç´Çµ +Ģģ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +Yy +ı +Æ— +Æ– +JjĴĵǰ +KkǨǩ +Ķķ +Ƙƙ +LlĹ弾 +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +Ļļ +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŇňǸǹ +NJNjnJnjNJNjnj +Ņņ +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŘř +RRRrrRrr +Å–Å— +Ʀ +SsŚśŜÅŞşſ +SSSssSssß +Å Å¡ +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +ÃýÿŶŷŸ +Ƴƴ +ZzŹźŻż +Æ +Žž +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_romanian_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÃÄÅà áãäåĀÄĄąÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +Ăă +Ââ +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃìÃïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +Îî +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŠšſ +SSSssSssß +Şş +Æ© +ƪ +TtŤť +ƾ +Ţţ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_slovenian_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÇçĆćĈĉĊċ +CHChcHch +ÄŒÄ +Ƈƈ +DdÄŽÄ +DZDzdZdzDŽDždžDZDzdz +DŽDždŽdž +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşſ +SSSssSssß +Å Å¡ +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻż +Æ +Žž +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_polish_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂăÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +Ąą +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ćć +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +Ęę +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŅņŇňǸǹ +NJNjnJnjNJNjnj +Ńń +Æ +Æž +ÅŠÅ‹ +OoÒÔÕÖòôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +Óó +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsÅœÅŞşŠšſ +SSSssSssß +Śś +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŽž +Æ +Źź +Żż +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_estonian_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÅà áâãåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÄŽÄ +DZDzdZdz +DŽDždŽdž +DŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔòóôŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşſ +SSSssSssß +Å Å¡ +Zz +Žž +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Õõ +Ää +Öö +Üü +Xx +YyÃýÿŶŷŸ +Ƴƴ +ŹźŻż +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_spanish_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Ññ +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_swedish_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃà áâãĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕòóôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +Ǿǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÜÃüýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ã…Ã¥ +ÄÆäæ +ÖØöø +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_turkish_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÄ†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Çç +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ğğ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +Iı +IJIj +ƕǶ +Ħħ +iÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +iJijIJij +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕòóôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +Öö +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŠšſ +SSSssSssß +Şş +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Üü +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_czech_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÇçĆćĈĉĊċ +cH +ÄŒÄ +Ƈƈ +DdÄŽÄ +DZDzdZdzDŽDždžDZDzdz +DŽDždŽdž +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +CHChch +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗ +RRRrrRrr +Řř +Ʀ +SsŚśŜÅŞşſ +SSSssSssß +Å Å¡ +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻż +Æ +Žž +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_danish_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃà áâãĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +aA +AEAeaEae +ǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕòóôõŌÅÅŽÅÆ ơǑǒǪǫǬÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +Ǿǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛùúûŨũŪūŬÅŮůŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÜÃüýÿŰűŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +ÄÆäæ +ÖØöøÅÅ‘ +AAAaaaÃ…Ã¥ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_lithuanian_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CCHChcchÇçĆćĈĉĊċ +cH +ÄŒÄ +Ƈƈ +DdÄŽÄ +DZDzdZdzDŽDždžDZDzdz +DŽDždŽdž +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IYiyÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşſ +SSSssSssß +Å Å¡ +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +ÃýÿŶŷŸ +Ƴƴ +ZzŹźŻż +Æ +Žž +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_slovak_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÅà áâãåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +Ää +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÇçĆćĈĉĊċ +cH +ÄŒÄ +Ƈƈ +DdÄŽÄ +DZDzdZdzDŽDždžDZDzdz +DŽDždŽdž +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +CHChch +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÕÖòóõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +Ôô +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşſ +SSSssSssß +Å Å¡ +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻż +Æ +Žž +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_spanish2_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +cH +CHChch +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +lL +LLLlll +ÅÅ‚ +Æš +Æ› +Mm +NnŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Ññ +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_roman_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IJijÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJij +IJij +ı +Æ— +Æ– +Ĵĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJlj +LJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnj +NJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +ÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +UVuv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_esperanto_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄŠÄ‹ÄŒÄ +CHChcHch +Ĉĉ +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +ÄœÄ +Ǥǥ +Æ“ +Æ” +Ƣƣ +Hh +Ĥĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +Jjǰ +Ĵĵ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŞşŠšſ +SSSssSssß +ŜŠ+Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +ŬŠ+Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_hungarian_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕòóôõŌÅÅŽÅÆ ơǑǒǪǫǬÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ÖöÅÅ‘ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛùúûŨũŪūŬÅŮůŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +ÜüŰű +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_croatian_mysql561_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÇçĈĉĊċ +CHChcHch +ÄŒÄ +Ćć +Ƈƈ +DdÄŽÄ +DZDzdZdzDZDzdz +DŽDždŽdžDŽDždž +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LLLllLll +LJLjlJljLJLjlj +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşſ +SSSssSssß +Å Å¡ +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻż +Æ +Žž +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_croatian_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEae +ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÇçĈĉĊċ +CHChcHch +ÄŒÄ +Ćć +Ƈƈ +DdÄŽÄ +DZDzdZdzDZDzdz +dŽ +DŽDždžDŽDždž +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +lJ +LLLllLll +LJLjljLJLjlj +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +nJ +NJNjnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖòóôõöŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşſ +SSSssSssß +Å Å¡ +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻż +Æ +Žž +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_german2_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÅà áâãåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEaeÄÆäæ +ǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕòóôõŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÖöŒœ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛùúûŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Üü +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_unicode_520_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÂÃÄÅà áâãäåĀÄĂ㥹ÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£áº¤áº¥áº¦áº§áº¨áº©áºªáº«áº¬áºáº®áº¯áº°áº±áº²áº³áº´áºµáº¶áº· +AAAaaAaa +AEAeaEaeÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÃðĎÄÄÄ‘ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +Ɖ +ÆŠ +Ƌƌ +EeÈÉÊËèéêëĒēĔĕĖėĘęĚěẸẹẺẻẼẽẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥĦħ +ƕǶ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľĿŀÅÅ‚ +LJLjlJljLJLjlj +LLLllLll +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÔÕÖØòóôõöøŌÅÅŽÅÅÅ‘Æ Æ¡Ç‘Ç’ÇªÇ«Ç¬ÇǾǿỌá»á»Žá»á»á»‘ỒồỔổỖỗỘộỚớỜá»á»žá»Ÿá» ỡỢợ +OEOeoEoeÅ’Å“ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜỤụỦủỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_vietnamese_ci; +GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') +÷ +× +AaÀÃÃÄÅà áãäåĀÄĄąÇÇŽÇžÇŸÇ Ç¡ÇºÇ»áº áº¡áº¢áº£ +AAAaaAaa +AEAeaEae +ĂăẮắẰằẲẳẴẵẶặ +ÂâẤấẦầẨẩẪẫẬẠ+ÆæǢǣǼǽ +Bb +Æ€ +Æ +Ƃƃ +CcÃ‡Ã§Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄ +CHChcHch +Ƈƈ +DdÄŽÄ +DZDzDŽDždZdzdŽdžDŽDždžDZDzdz +ÄÄ‘ +Ɖ +ÆŠ +Ƌƌ +Ãð +EeÈÉËèéëĒēĔĕĖėĘęĚěẸẹẺẻẼẽ +ÊêẾếỀá»á»‚ểỄễỆệ +ÆŽÇ +Æ +Æ +Ff +Ƒƒ +GgÄœÄÄžÄŸÄ Ä¡Ä¢Ä£Ç¦Ç§Ç´Çµ +Ǥǥ +Æ“ +Æ” +Ƣƣ +HhĤĥ +ƕǶ +Ħħ +IiÃŒÃÃŽÃìÃîïĨĩĪīĬÄĮįİÇÇỈỉỊị +IJIjiJijIJij +ı +Æ— +Æ– +JjĴĵǰ +KkĶķǨǩ +Ƙƙ +LlĹĺĻļĽľ +Ŀŀ +LJLjlJljLJLjlj +LLLllLll +ÅÅ‚ +Æš +Æ› +Mm +NnÑñŃńŅņŇňǸǹ +NJNjnJnjNJNjnj +Æ +Æž +ÅŠÅ‹ +OoÒÓÕÖòóõöŌÅÅŽÅÅőǑǒǪǫǬÇỌá»á»Žá» +OEOeoEoeÅ’Å“ +Ôôá»á»‘ỒồỔổỖỗỘộ +Æ Æ¡á»šá»›á»œá»á»žá»Ÿá» ỡỢợ +ØøǾǿ +Ɔ +ÆŸ +Pp +Ƥƥ +Qq +ĸ +RrŔŕŖŗŘř +RRRrrRrr +Ʀ +SsŚśŜÅŞşŠšſ +SSSssSssß +Æ© +ƪ +TtŢţŤť +ƾ +Ŧŧ +Æ« +Æ¬Æ +Æ® +UuÙÚÛÜùúûüŨũŪūŬÅŮůŰűŲųǓǔǕǖǗǘǙǚǛǜỤụỦủ +ƯưỨứỪừỬá»á»®á»¯á»°á»± +Æœ +Ʊ +Vv +Ʋ +WwŴŵ +Xx +YyÃýÿŶŷŸ +Ƴƴ +ZzŹźŻżŽž +Æ +Ƶƶ +ƷǮǯ +Ƹƹ +ƺ +Þþ +ƿǷ +Æ» +Ƨƨ +Ƽƽ +Ƅƅ +ʼn +Ç€ +Ç +Ç‚ +ǃ +DROP TABLE t1; +# +# Start of 5.5 tests +# +SET collation_connection=utf8mb4_czech_ci; +SELECT @@collation_connection; +@@collation_connection +utf8mb4_czech_ci +# +# Bug#57737 Character sets: search fails with like, contraction, index +# +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0; +INSERT INTO t1 VALUES ('c'),('ce'),('cé'),('ch'); +SELECT * FROM t1 WHERE s1 LIKE 'c%'; +s1 +c +ce +cé +ch +ALTER TABLE t1 ADD KEY s1 (s1); +SELECT * FROM t1 WHERE s1 LIKE 'c%'; +s1 +c +ce +cé +ch +ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1)); +SELECT * FROM t1 WHERE s1 LIKE 'ch'; +s1 +ch +DROP TABLE t1; +SELECT @@collation_connection; +@@collation_connection +utf8mb4_czech_ci +# +# Bug#57737 Character sets: search fails with like, contraction, index +# Part#2 - ignorable characters +# +CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0; +INSERT INTO t1 VALUES ('a\0\0\0\0\0\t'),('a'),('b'),('c'),('d'),('e'); +SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%'; +HEX(s1) +61000000000009 +61 +ALTER TABLE t1 ADD KEY s1 (s1); +SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%'; +HEX(s1) +61000000000009 +61 +DROP TABLE t1; +# +# End of 5.5 tests +# +# +# Start of MariaDB-10.0 tests +# + +# +# MDEV-4929 Myanmar collation +# +SET NAMES utf8mb4 COLLATE utf8mb4_myanmar_ci; +# +# Start of ctype_myanmar.inc +# +SELECT @@collation_connection; +@@collation_connection +utf8mb4_myanmar_ci +CREATE TABLE t1 AS SELECT 100000 AS id, REPEAT(' ', 64) AS s1 LIMIT 0; +SELECT COLLATION(s1) FROM t1; +COLLATION(s1) +DELETE FROM t1; +ALTER TABLE t1 MODIFY id INT NOT NULL AUTO_INCREMENT PRIMARY KEY; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `s1` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_myanmar_ci NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 (s1) VALUES +(_ucs2 0x108C), +(_ucs2 0x1037), +(_ucs2 0x1038), +(_ucs2 0x10371038), +('--- Vowels'), +(_ucs2 0x102C), +(_ucs2 0x102B), +(_ucs2 0x1032), +(_ucs2 0x1031102C), +(_ucs2 0x1031102B), +(_ucs2 0x1031102C103A), +(_ucs2 0x1031102B103A), +(_ucs2 0x1034), +(_ucs2 0x1036), +(_ucs2 0x102D102F), +('--- Vowels with finals'), +(_ucs2 0x10001039), +(_ucs2 0x1000103A), +(_ucs2 0x102C10001039), +(_ucs2 0x102C1000103A), +(_ucs2 0x102B10001039), +(_ucs2 0x102B1000103A), +(_ucs2 0x102D10001039), +(_ucs2 0x102D1000103A), +(_ucs2 0x102F10001039), +(_ucs2 0x102F1000103A), +(_ucs2 0x103110001039), +(_ucs2 0x10311000103A), +(_ucs2 0x1031102C10001039), +(_ucs2 0x1031102C1000103A), +(_ucs2 0x1031102B10001039), +(_ucs2 0x1031102B1000103A), +(_ucs2 0x102D102F10001039), +(_ucs2 0x102D102F1000103A), +(_ucs2 0x10011039), +(_ucs2 0x1001103A), +(_ucs2 0x102C10011039), +(_ucs2 0x102C1001103A), +(_ucs2 0x102B10011039), +(_ucs2 0x102B1001103A), +(_ucs2 0x102D10011039), +(_ucs2 0x102D1001103A), +(_ucs2 0x102F10011039), +(_ucs2 0x102F1001103A), +(_ucs2 0x103110011039), +(_ucs2 0x10311001103A), +(_ucs2 0x1031102C10011039), +(_ucs2 0x1031102C1001103A), +(_ucs2 0x1031102B10011039), +(_ucs2 0x1031102B1001103A), +(_ucs2 0x102D102F10011039), +(_ucs2 0x102D102F1001103A), +(_ucs2 0x10021039), +(_ucs2 0x1002103A), +(_ucs2 0x102C10021039), +(_ucs2 0x102C1002103A), +(_ucs2 0x102B10021039), +(_ucs2 0x102B1002103A), +(_ucs2 0x102D10021039), +(_ucs2 0x102D1002103A), +(_ucs2 0x102F10021039), +(_ucs2 0x102F1002103A), +(_ucs2 0x103110021039), +(_ucs2 0x10311002103A), +(_ucs2 0x1031102C10021039), +(_ucs2 0x1031102C1002103A), +(_ucs2 0x1031102B10021039), +(_ucs2 0x1031102B1002103A), +(_ucs2 0x102D102F10021039), +(_ucs2 0x102D102F1002103A), +(_ucs2 0x10031039), +(_ucs2 0x1003103A), +(_ucs2 0x102C10031039), +(_ucs2 0x102C1003103A), +(_ucs2 0x102B10031039), +(_ucs2 0x102B1003103A), +(_ucs2 0x102D10031039), +(_ucs2 0x102D1003103A), +(_ucs2 0x102F10031039), +(_ucs2 0x102F1003103A), +(_ucs2 0x103110031039), +(_ucs2 0x10311003103A), +(_ucs2 0x1031102C10031039), +(_ucs2 0x1031102C1003103A), +(_ucs2 0x1031102B10031039), +(_ucs2 0x1031102B1003103A), +(_ucs2 0x102D102F10031039), +(_ucs2 0x102D102F1003103A), +(_ucs2 0x1004103A1039), +(_ucs2 0x1004103A), +(_ucs2 0x102C1004103A1039), +(_ucs2 0x102C1004103A), +(_ucs2 0x102B1004103A1039), +(_ucs2 0x102B1004103A), +(_ucs2 0x102D1004103A1039), +(_ucs2 0x102D1004103A), +(_ucs2 0x102F1004103A1039), +(_ucs2 0x102F1004103A), +(_ucs2 0x10311004103A1039), +(_ucs2 0x10311004103A), +(_ucs2 0x1031102C1004103A1039), +(_ucs2 0x1031102C1004103A), +(_ucs2 0x1031102B1004103A1039), +(_ucs2 0x1031102B1004103A), +(_ucs2 0x102D102F1004103A1039), +(_ucs2 0x102D102F1004103A), +(_ucs2 0x10051039), +(_ucs2 0x1005103A), +(_ucs2 0x102C10051039), +(_ucs2 0x102C1005103A), +(_ucs2 0x102B10051039), +(_ucs2 0x102B1005103A), +(_ucs2 0x102D10051039), +(_ucs2 0x102D1005103A), +(_ucs2 0x102F10051039), +(_ucs2 0x102F1005103A), +(_ucs2 0x103110051039), +(_ucs2 0x10311005103A), +(_ucs2 0x1031102C10051039), +(_ucs2 0x1031102C1005103A), +(_ucs2 0x1031102B10051039), +(_ucs2 0x1031102B1005103A), +(_ucs2 0x102D102F10051039), +(_ucs2 0x102D102F1005103A), +(_ucs2 0x10061039), +(_ucs2 0x1006103A), +(_ucs2 0x102C10061039), +(_ucs2 0x102C1006103A), +(_ucs2 0x102B10061039), +(_ucs2 0x102B1006103A), +(_ucs2 0x102D10061039), +(_ucs2 0x102D1006103A), +(_ucs2 0x102F10061039), +(_ucs2 0x102F1006103A), +(_ucs2 0x103110061039), +(_ucs2 0x10311006103A), +(_ucs2 0x1031102C10061039), +(_ucs2 0x1031102C1006103A), +(_ucs2 0x1031102B10061039), +(_ucs2 0x1031102B1006103A), +(_ucs2 0x102D102F10061039), +(_ucs2 0x102D102F1006103A), +(_ucs2 0x10071039), +(_ucs2 0x1007103A), +(_ucs2 0x102C10071039), +(_ucs2 0x102C1007103A), +(_ucs2 0x102B10071039), +(_ucs2 0x102B1007103A), +(_ucs2 0x102D10071039), +(_ucs2 0x102D1007103A), +(_ucs2 0x102F10071039), +(_ucs2 0x102F1007103A), +(_ucs2 0x103110071039), +(_ucs2 0x10311007103A), +(_ucs2 0x1031102C10071039), +(_ucs2 0x1031102C1007103A), +(_ucs2 0x1031102B10071039), +(_ucs2 0x1031102B1007103A), +(_ucs2 0x102D102F10071039), +(_ucs2 0x102D102F1007103A), +(_ucs2 0x1008103A), +(_ucs2 0x102C1008103A), +(_ucs2 0x102B1008103A), +(_ucs2 0x102D1008103A), +(_ucs2 0x102F1008103A), +(_ucs2 0x10311008103A), +(_ucs2 0x1031102C1008103A), +(_ucs2 0x1031102B1008103A), +(_ucs2 0x102D102F1008103A), +(_ucs2 0x10091039), +(_ucs2 0x1009103A), +(_ucs2 0x102C10091039), +(_ucs2 0x102C1009103A), +(_ucs2 0x102B10091039), +(_ucs2 0x102B1009103A), +(_ucs2 0x102D10091039), +(_ucs2 0x102D1009103A), +(_ucs2 0x102F10091039), +(_ucs2 0x102F1009103A), +(_ucs2 0x103110091039), +(_ucs2 0x10311009103A), +(_ucs2 0x1031102C10091039), +(_ucs2 0x1031102C1009103A), +(_ucs2 0x1031102B10091039), +(_ucs2 0x1031102B1009103A), +(_ucs2 0x102D102F10091039), +(_ucs2 0x102D102F1009103A), +(_ucs2 0x100A1039), +(_ucs2 0x100A103A), +(_ucs2 0x102C100A1039), +(_ucs2 0x102C100A103A), +(_ucs2 0x102B100A1039), +(_ucs2 0x102B100A103A), +(_ucs2 0x102D100A1039), +(_ucs2 0x102D100A103A), +(_ucs2 0x102F100A1039), +(_ucs2 0x102F100A103A), +(_ucs2 0x1031100A1039), +(_ucs2 0x1031100A103A), +(_ucs2 0x1031102C100A1039), +(_ucs2 0x1031102C100A103A), +(_ucs2 0x1031102B100A1039), +(_ucs2 0x1031102B100A103A), +(_ucs2 0x102D102F100A1039), +(_ucs2 0x102D102F100A103A), +(_ucs2 0x100B1039), +(_ucs2 0x100B103A), +(_ucs2 0x102C100B1039), +(_ucs2 0x102C100B103A), +(_ucs2 0x102B100B1039), +(_ucs2 0x102B100B103A), +(_ucs2 0x102D100B1039), +(_ucs2 0x102D100B103A), +(_ucs2 0x102F100B1039), +(_ucs2 0x102F100B103A), +(_ucs2 0x1031100B1039), +(_ucs2 0x1031100B103A), +(_ucs2 0x1031102C100B1039), +(_ucs2 0x1031102C100B103A), +(_ucs2 0x1031102B100B1039), +(_ucs2 0x1031102B100B103A), +(_ucs2 0x102D102F100B1039), +(_ucs2 0x102D102F100B103A), +(_ucs2 0x100C1039), +(_ucs2 0x100C103A), +(_ucs2 0x102C100C1039), +(_ucs2 0x102C100C103A), +(_ucs2 0x102B100C1039), +(_ucs2 0x102B100C103A), +(_ucs2 0x102D100C1039), +(_ucs2 0x102D100C103A), +(_ucs2 0x102F100C1039), +(_ucs2 0x102F100C103A), +(_ucs2 0x1031100C1039), +(_ucs2 0x1031100C103A), +(_ucs2 0x1031102C100C1039), +(_ucs2 0x1031102C100C103A), +(_ucs2 0x1031102B100C1039), +(_ucs2 0x1031102B100C103A), +(_ucs2 0x102D102F100C1039), +(_ucs2 0x102D102F100C103A), +(_ucs2 0x100D1039), +(_ucs2 0x100D103A), +(_ucs2 0x102C100D1039), +(_ucs2 0x102C100D103A), +(_ucs2 0x102B100D1039), +(_ucs2 0x102B100D103A), +(_ucs2 0x102D100D1039), +(_ucs2 0x102D100D103A), +(_ucs2 0x102F100D1039), +(_ucs2 0x102F100D103A), +(_ucs2 0x1031100D1039), +(_ucs2 0x1031100D103A), +(_ucs2 0x1031102C100D1039), +(_ucs2 0x1031102C100D103A), +(_ucs2 0x1031102B100D1039), +(_ucs2 0x1031102B100D103A), +(_ucs2 0x102D102F100D1039), +(_ucs2 0x102D102F100D103A), +(_ucs2 0x100E1039), +(_ucs2 0x100E103A), +(_ucs2 0x102C100E1039), +(_ucs2 0x102C100E103A), +(_ucs2 0x102B100E1039), +(_ucs2 0x102B100E103A), +(_ucs2 0x102D100E1039), +(_ucs2 0x102D100E103A), +(_ucs2 0x102F100E1039), +(_ucs2 0x102F100E103A), +(_ucs2 0x1031100E1039), +(_ucs2 0x1031100E103A), +(_ucs2 0x1031102C100E1039), +(_ucs2 0x1031102C100E103A), +(_ucs2 0x1031102B100E1039), +(_ucs2 0x1031102B100E103A), +(_ucs2 0x102D102F100E1039), +(_ucs2 0x102D102F100E103A), +(_ucs2 0x100F1039), +(_ucs2 0x100F103A), +(_ucs2 0x102C100F1039), +(_ucs2 0x102C100F103A), +(_ucs2 0x102B100F1039), +(_ucs2 0x102B100F103A), +(_ucs2 0x102D100F1039), +(_ucs2 0x102D100F103A), +(_ucs2 0x102F100F1039), +(_ucs2 0x102F100F103A), +(_ucs2 0x1031100F1039), +(_ucs2 0x1031100F103A), +(_ucs2 0x1031102C100F1039), +(_ucs2 0x1031102C100F103A), +(_ucs2 0x1031102B100F1039), +(_ucs2 0x1031102B100F103A), +(_ucs2 0x102D102F100F1039), +(_ucs2 0x102D102F100F103A), +(_ucs2 0x10101039), +(_ucs2 0x1010103A), +(_ucs2 0x102C10101039), +(_ucs2 0x102C1010103A), +(_ucs2 0x102B10101039), +(_ucs2 0x102B1010103A), +(_ucs2 0x102D10101039), +(_ucs2 0x102D1010103A), +(_ucs2 0x102F10101039), +(_ucs2 0x102F1010103A), +(_ucs2 0x103110101039), +(_ucs2 0x10311010103A), +(_ucs2 0x1031102C10101039), +(_ucs2 0x1031102C1010103A), +(_ucs2 0x1031102B10101039), +(_ucs2 0x1031102B1010103A), +(_ucs2 0x102D102F10101039), +(_ucs2 0x102D102F1010103A), +(_ucs2 0x10111039), +(_ucs2 0x1011103A), +(_ucs2 0x102C10111039), +(_ucs2 0x102C1011103A), +(_ucs2 0x102B10111039), +(_ucs2 0x102B1011103A), +(_ucs2 0x102D10111039), +(_ucs2 0x102D1011103A), +(_ucs2 0x102F10111039), +(_ucs2 0x102F1011103A), +(_ucs2 0x103110111039), +(_ucs2 0x10311011103A), +(_ucs2 0x1031102C10111039), +(_ucs2 0x1031102C1011103A), +(_ucs2 0x1031102B10111039), +(_ucs2 0x1031102B1011103A), +(_ucs2 0x102D102F10111039), +(_ucs2 0x102D102F1011103A), +(_ucs2 0x10121039), +(_ucs2 0x1012103A), +(_ucs2 0x102C10121039), +(_ucs2 0x102C1012103A), +(_ucs2 0x102B10121039), +(_ucs2 0x102B1012103A), +(_ucs2 0x102D10121039), +(_ucs2 0x102D1012103A), +(_ucs2 0x102F10121039), +(_ucs2 0x102F1012103A), +(_ucs2 0x103110121039), +(_ucs2 0x10311012103A), +(_ucs2 0x1031102C10121039), +(_ucs2 0x1031102C1012103A), +(_ucs2 0x1031102B10121039), +(_ucs2 0x1031102B1012103A), +(_ucs2 0x102D102F10121039), +(_ucs2 0x102D102F1012103A), +(_ucs2 0x10131039), +(_ucs2 0x1013103A), +(_ucs2 0x102C10131039), +(_ucs2 0x102C1013103A), +(_ucs2 0x102B10131039), +(_ucs2 0x102B1013103A), +(_ucs2 0x102D10131039), +(_ucs2 0x102D1013103A), +(_ucs2 0x102F10131039), +(_ucs2 0x102F1013103A), +(_ucs2 0x103110131039), +(_ucs2 0x10311013103A), +(_ucs2 0x1031102C10131039), +(_ucs2 0x1031102C1013103A), +(_ucs2 0x1031102B10131039), +(_ucs2 0x1031102B1013103A), +(_ucs2 0x102D102F10131039), +(_ucs2 0x102D102F1013103A), +(_ucs2 0x10141039), +(_ucs2 0x1014103A), +(_ucs2 0x102C10141039), +(_ucs2 0x102C1014103A), +(_ucs2 0x102B10141039), +(_ucs2 0x102B1014103A), +(_ucs2 0x102D10141039), +(_ucs2 0x102D1014103A), +(_ucs2 0x102F10141039), +(_ucs2 0x102F1014103A), +(_ucs2 0x103110141039), +(_ucs2 0x10311014103A), +(_ucs2 0x1031102C10141039), +(_ucs2 0x1031102C1014103A), +(_ucs2 0x1031102B10141039), +(_ucs2 0x1031102B1014103A), +(_ucs2 0x102D102F10141039), +(_ucs2 0x102D102F1014103A), +(_ucs2 0x10151039), +(_ucs2 0x1015103A), +(_ucs2 0x102C10151039), +(_ucs2 0x102C1015103A), +(_ucs2 0x102B10151039), +(_ucs2 0x102B1015103A), +(_ucs2 0x102D10151039), +(_ucs2 0x102D1015103A), +(_ucs2 0x102F10151039), +(_ucs2 0x102F1015103A), +(_ucs2 0x103110151039), +(_ucs2 0x10311015103A), +(_ucs2 0x1031102C10151039), +(_ucs2 0x1031102C1015103A), +(_ucs2 0x1031102B10151039), +(_ucs2 0x1031102B1015103A), +(_ucs2 0x102D102F10151039), +(_ucs2 0x102D102F1015103A), +(_ucs2 0x10161039), +(_ucs2 0x1016103A), +(_ucs2 0x102C10161039), +(_ucs2 0x102C1016103A), +(_ucs2 0x102B10161039), +(_ucs2 0x102B1016103A), +(_ucs2 0x102D10161039), +(_ucs2 0x102D1016103A), +(_ucs2 0x102F10161039), +(_ucs2 0x102F1016103A), +(_ucs2 0x103110161039), +(_ucs2 0x10311016103A), +(_ucs2 0x1031102C10161039), +(_ucs2 0x1031102C1016103A), +(_ucs2 0x1031102B10161039), +(_ucs2 0x1031102B1016103A), +(_ucs2 0x102D102F10161039), +(_ucs2 0x102D102F1016103A), +(_ucs2 0x10171039), +(_ucs2 0x1017103A), +(_ucs2 0x102C10171039), +(_ucs2 0x102C1017103A), +(_ucs2 0x102B10171039), +(_ucs2 0x102B1017103A), +(_ucs2 0x102D10171039), +(_ucs2 0x102D1017103A), +(_ucs2 0x102F10171039), +(_ucs2 0x102F1017103A), +(_ucs2 0x103110171039), +(_ucs2 0x10311017103A), +(_ucs2 0x1031102C10171039), +(_ucs2 0x1031102C1017103A), +(_ucs2 0x1031102B10171039), +(_ucs2 0x1031102B1017103A), +(_ucs2 0x102D102F10171039), +(_ucs2 0x102D102F1017103A), +(_ucs2 0x10181039), +(_ucs2 0x1018103A), +(_ucs2 0x102C10181039), +(_ucs2 0x102C1018103A), +(_ucs2 0x102B10181039), +(_ucs2 0x102B1018103A), +(_ucs2 0x102D10181039), +(_ucs2 0x102D1018103A), +(_ucs2 0x102F10181039), +(_ucs2 0x102F1018103A), +(_ucs2 0x103110181039), +(_ucs2 0x10311018103A), +(_ucs2 0x1031102C10181039), +(_ucs2 0x1031102C1018103A), +(_ucs2 0x1031102B10181039), +(_ucs2 0x1031102B1018103A), +(_ucs2 0x102D102F10181039), +(_ucs2 0x102D102F1018103A), +(_ucs2 0x10191039), +(_ucs2 0x1019103A), +(_ucs2 0x102C10191039), +(_ucs2 0x102C1019103A), +(_ucs2 0x102B10191039), +(_ucs2 0x102B1019103A), +(_ucs2 0x102D10191039), +(_ucs2 0x102D1019103A), +(_ucs2 0x102F10191039), +(_ucs2 0x102F1019103A), +(_ucs2 0x103110191039), +(_ucs2 0x10311019103A), +(_ucs2 0x1031102C10191039), +(_ucs2 0x1031102C1019103A), +(_ucs2 0x1031102B10191039), +(_ucs2 0x1031102B1019103A), +(_ucs2 0x102D102F10191039), +(_ucs2 0x102D102F1019103A), +(_ucs2 0x101A1039), +(_ucs2 0x101A103A), +(_ucs2 0x102C101A1039), +(_ucs2 0x102C101A103A), +(_ucs2 0x102B101A1039), +(_ucs2 0x102B101A103A), +(_ucs2 0x102D101A1039), +(_ucs2 0x102D101A103A), +(_ucs2 0x102F101A1039), +(_ucs2 0x102F101A103A), +(_ucs2 0x1031101A1039), +(_ucs2 0x1031101A103A), +(_ucs2 0x1031102C101A1039), +(_ucs2 0x1031102C101A103A), +(_ucs2 0x1031102B101A1039), +(_ucs2 0x1031102B101A103A), +(_ucs2 0x102D102F101A1039), +(_ucs2 0x102D102F101A103A), +(_ucs2 0x101B1039), +(_ucs2 0x101B103A), +(_ucs2 0x102C101B1039), +(_ucs2 0x102C101B103A), +(_ucs2 0x102B101B1039), +(_ucs2 0x102B101B103A), +(_ucs2 0x102D101B1039), +(_ucs2 0x102D101B103A), +(_ucs2 0x102F101B1039), +(_ucs2 0x102F101B103A), +(_ucs2 0x1031101B1039), +(_ucs2 0x1031101B103A), +(_ucs2 0x1031102C101B1039), +(_ucs2 0x1031102C101B103A), +(_ucs2 0x1031102B101B1039), +(_ucs2 0x1031102B101B103A), +(_ucs2 0x102D102F101B1039), +(_ucs2 0x102D102F101B103A), +(_ucs2 0x101C1039), +(_ucs2 0x101C103A), +(_ucs2 0x102C101C1039), +(_ucs2 0x102C101C103A), +(_ucs2 0x102B101C1039), +(_ucs2 0x102B101C103A), +(_ucs2 0x102D101C1039), +(_ucs2 0x102D101C103A), +(_ucs2 0x102F101C1039), +(_ucs2 0x102F101C103A), +(_ucs2 0x1031101C1039), +(_ucs2 0x1031101C103A), +(_ucs2 0x1031102C101C1039), +(_ucs2 0x1031102C101C103A), +(_ucs2 0x1031102B101C1039), +(_ucs2 0x1031102B101C103A), +(_ucs2 0x102D102F101C1039), +(_ucs2 0x102D102F101C103A), +(_ucs2 0x101D103A), +(_ucs2 0x102C101D103A), +(_ucs2 0x102B101D103A), +(_ucs2 0x102D101D103A), +(_ucs2 0x102F101D103A), +(_ucs2 0x1031101D103A), +(_ucs2 0x1031102C101D103A), +(_ucs2 0x1031102B101D103A), +(_ucs2 0x102D102F101D103A), +(_ucs2 0x101E1039), +(_ucs2 0x101E103A), +(_ucs2 0x102C101E1039), +(_ucs2 0x102C101E103A), +(_ucs2 0x102B101E1039), +(_ucs2 0x102B101E103A), +(_ucs2 0x102D101E1039), +(_ucs2 0x102D101E103A), +(_ucs2 0x102F101E1039), +(_ucs2 0x102F101E103A), +(_ucs2 0x1031101E1039), +(_ucs2 0x1031101E103A), +(_ucs2 0x1031102C101E1039), +(_ucs2 0x1031102C101E103A), +(_ucs2 0x1031102B101E1039), +(_ucs2 0x1031102B101E103A), +(_ucs2 0x102D102F101E1039), +(_ucs2 0x102D102F101E103A), +(_ucs2 0x101F1039), +(_ucs2 0x101F103A), +(_ucs2 0x102C101F1039), +(_ucs2 0x102C101F103A), +(_ucs2 0x102B101F1039), +(_ucs2 0x102B101F103A), +(_ucs2 0x102D101F1039), +(_ucs2 0x102D101F103A), +(_ucs2 0x102F101F1039), +(_ucs2 0x102F101F103A), +(_ucs2 0x1031101F1039), +(_ucs2 0x1031101F103A), +(_ucs2 0x1031102C101F1039), +(_ucs2 0x1031102C101F103A), +(_ucs2 0x1031102B101F1039), +(_ucs2 0x1031102B101F103A), +(_ucs2 0x102D102F101F1039), +(_ucs2 0x102D102F101F103A), +(_ucs2 0x1020103A), +(_ucs2 0x102C1020103A), +(_ucs2 0x102B1020103A), +(_ucs2 0x102D1020103A), +(_ucs2 0x102F1020103A), +(_ucs2 0x10311020103A), +(_ucs2 0x1031102C1020103A), +(_ucs2 0x1031102B1020103A), +(_ucs2 0x102D102F1020103A), +(_ucs2 0x1021103A), +(_ucs2 0x102C1021103A), +(_ucs2 0x102B1021103A), +(_ucs2 0x102D1021103A), +(_ucs2 0x102F1021103A), +(_ucs2 0x10311021103A), +(_ucs2 0x1031102C1021103A), +(_ucs2 0x1031102B1021103A), +(_ucs2 0x102D102F1021103A), +('--- Medials'), +(_ucs2 0x105E), +(_ucs2 0x105F), +(_ucs2 0x103B), +(_ucs2 0x103C), +(_ucs2 0x1060), +(_ucs2 0x103D), +(_ucs2 0x1082), +(_ucs2 0x103E), +(_ucs2 0x103B103D), +(_ucs2 0x103C103D), +(_ucs2 0x103B103E), +(_ucs2 0x103C103E), +(_ucs2 0x103D103E), +(_ucs2 0x103B103D103E), +(_ucs2 0x103C103D103E), +('--- Independent vowels'), +(_ucs2 0x1021102D), +(_ucs2 0x1023), +(_ucs2 0x1021102E), +(_ucs2 0x1024), +(_ucs2 0x1021102F), +(_ucs2 0x1025), +(_ucs2 0x10211030), +(_ucs2 0x1026), +(_ucs2 0x10211031), +(_ucs2 0x1027), +(_ucs2 0x1028), +(_ucs2 0x10211031102C), +(_ucs2 0x1029), +(_ucs2 0x10211031102C103A), +(_ucs2 0x102A), +(_ucs2 0x102D1019103A), +(_ucs2 0x102D1036), +(_ucs2 0x102D1019103A1037), +(_ucs2 0x102D10361037), +(_ucs2 0x102D1019103A1038), +(_ucs2 0x102D10361038), +(_ucs2 0x102F1019103A), +(_ucs2 0x102F1036), +(_ucs2 0x102F1019103A1037), +(_ucs2 0x102F10361037), +(_ucs2 0x102F1019103A1038), +(_ucs2 0x102F10361038), +(_ucs2 0x1021102F1036), +(_ucs2 0x1025102F1036), +('--- Independent vowels with finals'), +(_ucs2 0x1021102D10001039), +(_ucs2 0x102310001039), +(_ucs2 0x1021102D1000103A), +(_ucs2 0x10231000103A), +(_ucs2 0x1021102F10001039), +(_ucs2 0x102510001039), +(_ucs2 0x1021102F1000103A), +(_ucs2 0x10251000103A), +(_ucs2 0x1021103110001039), +(_ucs2 0x102710001039), +(_ucs2 0x102110311000103A), +(_ucs2 0x10271000103A), +(_ucs2 0x10211031102C10001039), +(_ucs2 0x102910001039), +(_ucs2 0x10211031102C1000103A), +(_ucs2 0x10291000103A), +(_ucs2 0x10211031102C10001039), +(_ucs2 0x10291031102C10001039), +(_ucs2 0x10211031102C1000103A), +(_ucs2 0x10291031102C1000103A), +(_ucs2 0x1021102D10011039), +(_ucs2 0x102310011039), +(_ucs2 0x1021102D1001103A), +(_ucs2 0x10231001103A), +(_ucs2 0x1021102F10011039), +(_ucs2 0x102510011039), +(_ucs2 0x1021102F1001103A), +(_ucs2 0x10251001103A), +(_ucs2 0x1021103110011039), +(_ucs2 0x102710011039), +(_ucs2 0x102110311001103A), +(_ucs2 0x10271001103A), +(_ucs2 0x10211031102C10011039), +(_ucs2 0x102910011039), +(_ucs2 0x10211031102C1001103A), +(_ucs2 0x10291001103A), +(_ucs2 0x10211031102C10011039), +(_ucs2 0x10291031102C10011039), +(_ucs2 0x10211031102C1001103A), +(_ucs2 0x10291031102C1001103A), +(_ucs2 0x1021102D10021039), +(_ucs2 0x102310021039), +(_ucs2 0x1021102D1002103A), +(_ucs2 0x10231002103A), +(_ucs2 0x1021102F10021039), +(_ucs2 0x102510021039), +(_ucs2 0x1021102F1002103A), +(_ucs2 0x10251002103A), +(_ucs2 0x1021103110021039), +(_ucs2 0x102710021039), +(_ucs2 0x102110311002103A), +(_ucs2 0x10271002103A), +(_ucs2 0x10211031102C10021039), +(_ucs2 0x102910021039), +(_ucs2 0x10211031102C1002103A), +(_ucs2 0x10291002103A), +(_ucs2 0x10211031102C10021039), +(_ucs2 0x10291031102C10021039), +(_ucs2 0x10211031102C1002103A), +(_ucs2 0x10291031102C1002103A), +(_ucs2 0x1021102D10031039), +(_ucs2 0x102310031039), +(_ucs2 0x1021102D1003103A), +(_ucs2 0x10231003103A), +(_ucs2 0x1021102F10031039), +(_ucs2 0x102510031039), +(_ucs2 0x1021102F1003103A), +(_ucs2 0x10251003103A), +(_ucs2 0x1021103110031039), +(_ucs2 0x102710031039), +(_ucs2 0x102110311003103A), +(_ucs2 0x10271003103A), +(_ucs2 0x10211031102C10031039), +(_ucs2 0x102910031039), +(_ucs2 0x10211031102C1003103A), +(_ucs2 0x10291003103A), +(_ucs2 0x10211031102C10031039), +(_ucs2 0x10291031102C10031039), +(_ucs2 0x10211031102C1003103A), +(_ucs2 0x10291031102C1003103A), +(_ucs2 0x1021102D10041039), +(_ucs2 0x102310041039), +(_ucs2 0x1021102D1004103A), +(_ucs2 0x10231004103A), +(_ucs2 0x1021102F10041039), +(_ucs2 0x102510041039), +(_ucs2 0x1021102F1004103A), +(_ucs2 0x10251004103A), +(_ucs2 0x1021103110041039), +(_ucs2 0x102710041039), +(_ucs2 0x102110311004103A), +(_ucs2 0x10271004103A), +(_ucs2 0x10211031102C10041039), +(_ucs2 0x102910041039), +(_ucs2 0x10211031102C1004103A), +(_ucs2 0x10291004103A), +(_ucs2 0x10211031102C10041039), +(_ucs2 0x10291031102C10041039), +(_ucs2 0x10211031102C1004103A), +(_ucs2 0x10291031102C1004103A), +(_ucs2 0x1021102D10051039), +(_ucs2 0x102310051039), +(_ucs2 0x1021102D1005103A), +(_ucs2 0x10231005103A), +(_ucs2 0x1021102F10051039), +(_ucs2 0x102510051039), +(_ucs2 0x1021102F1005103A), +(_ucs2 0x10251005103A), +(_ucs2 0x1021103110051039), +(_ucs2 0x102710051039), +(_ucs2 0x102110311005103A), +(_ucs2 0x10271005103A), +(_ucs2 0x10211031102C10051039), +(_ucs2 0x102910051039), +(_ucs2 0x10211031102C1005103A), +(_ucs2 0x10291005103A), +(_ucs2 0x10211031102C10051039), +(_ucs2 0x10291031102C10051039), +(_ucs2 0x10211031102C1005103A), +(_ucs2 0x10291031102C1005103A), +(_ucs2 0x1021102D10061039), +(_ucs2 0x102310061039), +(_ucs2 0x1021102D1006103A), +(_ucs2 0x10231006103A), +(_ucs2 0x1021102F10061039), +(_ucs2 0x102510061039), +(_ucs2 0x1021102F1006103A), +(_ucs2 0x10251006103A), +(_ucs2 0x1021103110061039), +(_ucs2 0x102710061039), +(_ucs2 0x102110311006103A), +(_ucs2 0x10271006103A), +(_ucs2 0x10211031102C10061039), +(_ucs2 0x102910061039), +(_ucs2 0x10211031102C1006103A), +(_ucs2 0x10291006103A), +(_ucs2 0x10211031102C10061039), +(_ucs2 0x10291031102C10061039), +(_ucs2 0x10211031102C1006103A), +(_ucs2 0x10291031102C1006103A), +(_ucs2 0x1021102D10071039), +(_ucs2 0x102310071039), +(_ucs2 0x1021102D1007103A), +(_ucs2 0x10231007103A), +(_ucs2 0x1021102F10071039), +(_ucs2 0x102510071039), +(_ucs2 0x1021102F1007103A), +(_ucs2 0x10251007103A), +(_ucs2 0x1021103110071039), +(_ucs2 0x102710071039), +(_ucs2 0x102110311007103A), +(_ucs2 0x10271007103A), +(_ucs2 0x10211031102C10071039), +(_ucs2 0x102910071039), +(_ucs2 0x10211031102C1007103A), +(_ucs2 0x10291007103A), +(_ucs2 0x10211031102C10071039), +(_ucs2 0x10291031102C10071039), +(_ucs2 0x10211031102C1007103A), +(_ucs2 0x10291031102C1007103A), +(_ucs2 0x1021102D10091039), +(_ucs2 0x102310091039), +(_ucs2 0x1021102D1009103A), +(_ucs2 0x10231009103A), +(_ucs2 0x1021102F10091039), +(_ucs2 0x102510091039), +(_ucs2 0x1021102F1009103A), +(_ucs2 0x10251009103A), +(_ucs2 0x1021103110091039), +(_ucs2 0x102710091039), +(_ucs2 0x102110311009103A), +(_ucs2 0x10271009103A), +(_ucs2 0x10211031102C10091039), +(_ucs2 0x102910091039), +(_ucs2 0x10211031102C1009103A), +(_ucs2 0x10291009103A), +(_ucs2 0x10211031102C10091039), +(_ucs2 0x10291031102C10091039), +(_ucs2 0x10211031102C1009103A), +(_ucs2 0x10291031102C1009103A), +(_ucs2 0x1021102D100A1039), +(_ucs2 0x1023100A1039), +(_ucs2 0x1021102D100A103A), +(_ucs2 0x1023100A103A), +(_ucs2 0x1021102F100A1039), +(_ucs2 0x1025100A1039), +(_ucs2 0x1021102F100A103A), +(_ucs2 0x1025100A103A), +(_ucs2 0x10211031100A1039), +(_ucs2 0x1027100A1039), +(_ucs2 0x10211031100A103A), +(_ucs2 0x1027100A103A), +(_ucs2 0x10211031102C100A1039), +(_ucs2 0x1029100A1039), +(_ucs2 0x10211031102C100A103A), +(_ucs2 0x1029100A103A), +(_ucs2 0x10211031102C100A1039), +(_ucs2 0x10291031102C100A1039), +(_ucs2 0x10211031102C100A103A), +(_ucs2 0x10291031102C100A103A), +(_ucs2 0x1021102D100B1039), +(_ucs2 0x1023100B1039), +(_ucs2 0x1021102D100B103A), +(_ucs2 0x1023100B103A), +(_ucs2 0x1021102F100B1039), +(_ucs2 0x1025100B1039), +(_ucs2 0x1021102F100B103A), +(_ucs2 0x1025100B103A), +(_ucs2 0x10211031100B1039), +(_ucs2 0x1027100B1039), +(_ucs2 0x10211031100B103A), +(_ucs2 0x1027100B103A), +(_ucs2 0x10211031102C100B1039), +(_ucs2 0x1029100B1039), +(_ucs2 0x10211031102C100B103A), +(_ucs2 0x1029100B103A), +(_ucs2 0x10211031102C100B1039), +(_ucs2 0x10291031102C100B1039), +(_ucs2 0x10211031102C100B103A), +(_ucs2 0x10291031102C100B103A), +(_ucs2 0x1021102D100C1039), +(_ucs2 0x1023100C1039), +(_ucs2 0x1021102D100C103A), +(_ucs2 0x1023100C103A), +(_ucs2 0x1021102F100C1039), +(_ucs2 0x1025100C1039), +(_ucs2 0x1021102F100C103A), +(_ucs2 0x1025100C103A), +(_ucs2 0x10211031100C1039), +(_ucs2 0x1027100C1039), +(_ucs2 0x10211031100C103A), +(_ucs2 0x1027100C103A), +(_ucs2 0x10211031102C100C1039), +(_ucs2 0x1029100C1039), +(_ucs2 0x10211031102C100C103A), +(_ucs2 0x1029100C103A), +(_ucs2 0x10211031102C100C1039), +(_ucs2 0x10291031102C100C1039), +(_ucs2 0x10211031102C100C103A), +(_ucs2 0x10291031102C100C103A), +(_ucs2 0x1021102D100D1039), +(_ucs2 0x1023100D1039), +(_ucs2 0x1021102D100D103A), +(_ucs2 0x1023100D103A), +(_ucs2 0x1021102F100D1039), +(_ucs2 0x1025100D1039), +(_ucs2 0x1021102F100D103A), +(_ucs2 0x1025100D103A), +(_ucs2 0x10211031100D1039), +(_ucs2 0x1027100D1039), +(_ucs2 0x10211031100D103A), +(_ucs2 0x1027100D103A), +(_ucs2 0x10211031102C100D1039), +(_ucs2 0x1029100D1039), +(_ucs2 0x10211031102C100D103A), +(_ucs2 0x1029100D103A), +(_ucs2 0x10211031102C100D1039), +(_ucs2 0x10291031102C100D1039), +(_ucs2 0x10211031102C100D103A), +(_ucs2 0x10291031102C100D103A), +(_ucs2 0x1021102D100E1039), +(_ucs2 0x1023100E1039), +(_ucs2 0x1021102D100E103A), +(_ucs2 0x1023100E103A), +(_ucs2 0x1021102F100E1039), +(_ucs2 0x1025100E1039), +(_ucs2 0x1021102F100E103A), +(_ucs2 0x1025100E103A), +(_ucs2 0x10211031100E1039), +(_ucs2 0x1027100E1039), +(_ucs2 0x10211031100E103A), +(_ucs2 0x1027100E103A), +(_ucs2 0x10211031102C100E1039), +(_ucs2 0x1029100E1039), +(_ucs2 0x10211031102C100E103A), +(_ucs2 0x1029100E103A), +(_ucs2 0x10211031102C100E1039), +(_ucs2 0x10291031102C100E1039), +(_ucs2 0x10211031102C100E103A), +(_ucs2 0x10291031102C100E103A), +(_ucs2 0x1021102D100F1039), +(_ucs2 0x1023100F1039), +(_ucs2 0x1021102D100F103A), +(_ucs2 0x1023100F103A), +(_ucs2 0x1021102F100F1039), +(_ucs2 0x1025100F1039), +(_ucs2 0x1021102F100F103A), +(_ucs2 0x1025100F103A), +(_ucs2 0x10211031100F1039), +(_ucs2 0x1027100F1039), +(_ucs2 0x10211031100F103A), +(_ucs2 0x1027100F103A), +(_ucs2 0x10211031102C100F1039), +(_ucs2 0x1029100F1039), +(_ucs2 0x10211031102C100F103A), +(_ucs2 0x1029100F103A), +(_ucs2 0x10211031102C100F1039), +(_ucs2 0x10291031102C100F1039), +(_ucs2 0x10211031102C100F103A), +(_ucs2 0x10291031102C100F103A), +(_ucs2 0x1021102D10101039), +(_ucs2 0x102310101039), +(_ucs2 0x1021102D1010103A), +(_ucs2 0x10231010103A), +(_ucs2 0x1021102F10101039), +(_ucs2 0x102510101039), +(_ucs2 0x1021102F1010103A), +(_ucs2 0x10251010103A), +(_ucs2 0x1021103110101039), +(_ucs2 0x102710101039), +(_ucs2 0x102110311010103A), +(_ucs2 0x10271010103A), +(_ucs2 0x10211031102C10101039), +(_ucs2 0x102910101039), +(_ucs2 0x10211031102C1010103A), +(_ucs2 0x10291010103A), +(_ucs2 0x10211031102C10101039), +(_ucs2 0x10291031102C10101039), +(_ucs2 0x10211031102C1010103A), +(_ucs2 0x10291031102C1010103A), +(_ucs2 0x1021102D10111039), +(_ucs2 0x102310111039), +(_ucs2 0x1021102D1011103A), +(_ucs2 0x10231011103A), +(_ucs2 0x1021102F10111039), +(_ucs2 0x102510111039), +(_ucs2 0x1021102F1011103A), +(_ucs2 0x10251011103A), +(_ucs2 0x1021103110111039), +(_ucs2 0x102710111039), +(_ucs2 0x102110311011103A), +(_ucs2 0x10271011103A), +(_ucs2 0x10211031102C10111039), +(_ucs2 0x102910111039), +(_ucs2 0x10211031102C1011103A), +(_ucs2 0x10291011103A), +(_ucs2 0x10211031102C10111039), +(_ucs2 0x10291031102C10111039), +(_ucs2 0x10211031102C1011103A), +(_ucs2 0x10291031102C1011103A), +(_ucs2 0x1021102D10121039), +(_ucs2 0x102310121039), +(_ucs2 0x1021102D1012103A), +(_ucs2 0x10231012103A), +(_ucs2 0x1021102F10121039), +(_ucs2 0x102510121039), +(_ucs2 0x1021102F1012103A), +(_ucs2 0x10251012103A), +(_ucs2 0x1021103110121039), +(_ucs2 0x102710121039), +(_ucs2 0x102110311012103A), +(_ucs2 0x10271012103A), +(_ucs2 0x10211031102C10121039), +(_ucs2 0x102910121039), +(_ucs2 0x10211031102C1012103A), +(_ucs2 0x10291012103A), +(_ucs2 0x10211031102C10121039), +(_ucs2 0x10291031102C10121039), +(_ucs2 0x10211031102C1012103A), +(_ucs2 0x10291031102C1012103A), +(_ucs2 0x1021102D10131039), +(_ucs2 0x102310131039), +(_ucs2 0x1021102D1013103A), +(_ucs2 0x10231013103A), +(_ucs2 0x1021102F10131039), +(_ucs2 0x102510131039), +(_ucs2 0x1021102F1013103A), +(_ucs2 0x10251013103A), +(_ucs2 0x1021103110131039), +(_ucs2 0x102710131039), +(_ucs2 0x102110311013103A), +(_ucs2 0x10271013103A), +(_ucs2 0x10211031102C10131039), +(_ucs2 0x102910131039), +(_ucs2 0x10211031102C1013103A), +(_ucs2 0x10291013103A), +(_ucs2 0x10211031102C10131039), +(_ucs2 0x10291031102C10131039), +(_ucs2 0x10211031102C1013103A), +(_ucs2 0x10291031102C1013103A), +(_ucs2 0x1021102D10141039), +(_ucs2 0x102310141039), +(_ucs2 0x1021102D1014103A), +(_ucs2 0x10231014103A), +(_ucs2 0x1021102F10141039), +(_ucs2 0x102510141039), +(_ucs2 0x1021102F1014103A), +(_ucs2 0x10251014103A), +(_ucs2 0x1021103110141039), +(_ucs2 0x102710141039), +(_ucs2 0x102110311014103A), +(_ucs2 0x10271014103A), +(_ucs2 0x10211031102C10141039), +(_ucs2 0x102910141039), +(_ucs2 0x10211031102C1014103A), +(_ucs2 0x10291014103A), +(_ucs2 0x10211031102C10141039), +(_ucs2 0x10291031102C10141039), +(_ucs2 0x10211031102C1014103A), +(_ucs2 0x10291031102C1014103A), +(_ucs2 0x1021102D10151039), +(_ucs2 0x102310151039), +(_ucs2 0x1021102D1015103A), +(_ucs2 0x10231015103A), +(_ucs2 0x1021102F10151039), +(_ucs2 0x102510151039), +(_ucs2 0x1021102F1015103A), +(_ucs2 0x10251015103A), +(_ucs2 0x1021103110151039), +(_ucs2 0x102710151039), +(_ucs2 0x102110311015103A), +(_ucs2 0x10271015103A), +(_ucs2 0x10211031102C10151039), +(_ucs2 0x102910151039), +(_ucs2 0x10211031102C1015103A), +(_ucs2 0x10291015103A), +(_ucs2 0x10211031102C10151039), +(_ucs2 0x10291031102C10151039), +(_ucs2 0x10211031102C1015103A), +(_ucs2 0x10291031102C1015103A), +(_ucs2 0x1021102D10161039), +(_ucs2 0x102310161039), +(_ucs2 0x1021102D1016103A), +(_ucs2 0x10231016103A), +(_ucs2 0x1021102F10161039), +(_ucs2 0x102510161039), +(_ucs2 0x1021102F1016103A), +(_ucs2 0x10251016103A), +(_ucs2 0x1021103110161039), +(_ucs2 0x102710161039), +(_ucs2 0x102110311016103A), +(_ucs2 0x10271016103A), +(_ucs2 0x10211031102C10161039), +(_ucs2 0x102910161039), +(_ucs2 0x10211031102C1016103A), +(_ucs2 0x10291016103A), +(_ucs2 0x10211031102C10161039), +(_ucs2 0x10291031102C10161039), +(_ucs2 0x10211031102C1016103A), +(_ucs2 0x10291031102C1016103A), +(_ucs2 0x1021102D10171039), +(_ucs2 0x102310171039), +(_ucs2 0x1021102D1017103A), +(_ucs2 0x10231017103A), +(_ucs2 0x1021102F10171039), +(_ucs2 0x102510171039), +(_ucs2 0x1021102F1017103A), +(_ucs2 0x10251017103A), +(_ucs2 0x1021103110171039), +(_ucs2 0x102710171039), +(_ucs2 0x102110311017103A), +(_ucs2 0x10271017103A), +(_ucs2 0x10211031102C10171039), +(_ucs2 0x102910171039), +(_ucs2 0x10211031102C1017103A), +(_ucs2 0x10291017103A), +(_ucs2 0x10211031102C10171039), +(_ucs2 0x10291031102C10171039), +(_ucs2 0x10211031102C1017103A), +(_ucs2 0x10291031102C1017103A), +(_ucs2 0x1021102D10181039), +(_ucs2 0x102310181039), +(_ucs2 0x1021102D1018103A), +(_ucs2 0x10231018103A), +(_ucs2 0x1021102F10181039), +(_ucs2 0x102510181039), +(_ucs2 0x1021102F1018103A), +(_ucs2 0x10251018103A), +(_ucs2 0x1021103110181039), +(_ucs2 0x102710181039), +(_ucs2 0x102110311018103A), +(_ucs2 0x10271018103A), +(_ucs2 0x10211031102C10181039), +(_ucs2 0x102910181039), +(_ucs2 0x10211031102C1018103A), +(_ucs2 0x10291018103A), +(_ucs2 0x10211031102C10181039), +(_ucs2 0x10291031102C10181039), +(_ucs2 0x10211031102C1018103A), +(_ucs2 0x10291031102C1018103A), +(_ucs2 0x1021102D10191039), +(_ucs2 0x102310191039), +(_ucs2 0x1021102D1019103A), +(_ucs2 0x10231019103A), +(_ucs2 0x1021102F10191039), +(_ucs2 0x102510191039), +(_ucs2 0x1021102F1019103A), +(_ucs2 0x10251019103A), +(_ucs2 0x1021103110191039), +(_ucs2 0x102710191039), +(_ucs2 0x102110311019103A), +(_ucs2 0x10271019103A), +(_ucs2 0x10211031102C10191039), +(_ucs2 0x102910191039), +(_ucs2 0x10211031102C1019103A), +(_ucs2 0x10291019103A), +(_ucs2 0x10211031102C10191039), +(_ucs2 0x10291031102C10191039), +(_ucs2 0x10211031102C1019103A), +(_ucs2 0x10291031102C1019103A), +(_ucs2 0x1021102D101A1039), +(_ucs2 0x1023101A1039), +(_ucs2 0x1021102D101A103A), +(_ucs2 0x1023101A103A), +(_ucs2 0x1021102F101A1039), +(_ucs2 0x1025101A1039), +(_ucs2 0x1021102F101A103A), +(_ucs2 0x1025101A103A), +(_ucs2 0x10211031101A1039), +(_ucs2 0x1027101A1039), +(_ucs2 0x10211031101A103A), +(_ucs2 0x1027101A103A), +(_ucs2 0x10211031102C101A1039), +(_ucs2 0x1029101A1039), +(_ucs2 0x10211031102C101A103A), +(_ucs2 0x1029101A103A), +(_ucs2 0x10211031102C101A1039), +(_ucs2 0x10291031102C101A1039), +(_ucs2 0x10211031102C101A103A), +(_ucs2 0x10291031102C101A103A), +(_ucs2 0x1021102D101B1039), +(_ucs2 0x1023101B1039), +(_ucs2 0x1021102D101B103A), +(_ucs2 0x1023101B103A), +(_ucs2 0x1021102F101B1039), +(_ucs2 0x1025101B1039), +(_ucs2 0x1021102F101B103A), +(_ucs2 0x1025101B103A), +(_ucs2 0x10211031101B1039), +(_ucs2 0x1027101B1039), +(_ucs2 0x10211031101B103A), +(_ucs2 0x1027101B103A), +(_ucs2 0x10211031102C101B1039), +(_ucs2 0x1029101B1039), +(_ucs2 0x10211031102C101B103A), +(_ucs2 0x1029101B103A), +(_ucs2 0x10211031102C101B1039), +(_ucs2 0x10291031102C101B1039), +(_ucs2 0x10211031102C101B103A), +(_ucs2 0x10291031102C101B103A), +(_ucs2 0x1021102D101C1039), +(_ucs2 0x1023101C1039), +(_ucs2 0x1021102D101C103A), +(_ucs2 0x1023101C103A), +(_ucs2 0x1021102F101C1039), +(_ucs2 0x1025101C1039), +(_ucs2 0x1021102F101C103A), +(_ucs2 0x1025101C103A), +(_ucs2 0x10211031101C1039), +(_ucs2 0x1027101C1039), +(_ucs2 0x10211031101C103A), +(_ucs2 0x1027101C103A), +(_ucs2 0x10211031102C101C1039), +(_ucs2 0x1029101C1039), +(_ucs2 0x10211031102C101C103A), +(_ucs2 0x1029101C103A), +(_ucs2 0x10211031102C101C1039), +(_ucs2 0x10291031102C101C1039), +(_ucs2 0x10211031102C101C103A), +(_ucs2 0x10291031102C101C103A), +(_ucs2 0x1021102D101E1039), +(_ucs2 0x1023101E1039), +(_ucs2 0x1021102D101E103A), +(_ucs2 0x1023101E103A), +(_ucs2 0x1021102F101E1039), +(_ucs2 0x1025101E1039), +(_ucs2 0x1021102F101E103A), +(_ucs2 0x1025101E103A), +(_ucs2 0x10211031101E1039), +(_ucs2 0x1027101E1039), +(_ucs2 0x10211031101E103A), +(_ucs2 0x1027101E103A), +(_ucs2 0x10211031102C101E1039), +(_ucs2 0x1029101E1039), +(_ucs2 0x10211031102C101E103A), +(_ucs2 0x1029101E103A), +(_ucs2 0x10211031102C101E1039), +(_ucs2 0x10291031102C101E1039), +(_ucs2 0x10211031102C101E103A), +(_ucs2 0x10291031102C101E103A), +(_ucs2 0x1021102D101F1039), +(_ucs2 0x1023101F1039), +(_ucs2 0x1021102D101F103A), +(_ucs2 0x1023101F103A), +(_ucs2 0x1021102F101F1039), +(_ucs2 0x1025101F1039), +(_ucs2 0x1021102F101F103A), +(_ucs2 0x1025101F103A), +(_ucs2 0x10211031101F1039), +(_ucs2 0x1027101F1039), +(_ucs2 0x10211031101F103A), +(_ucs2 0x1027101F103A), +(_ucs2 0x10211031102C101F1039), +(_ucs2 0x1029101F1039), +(_ucs2 0x10211031102C101F103A), +(_ucs2 0x1029101F103A), +(_ucs2 0x10211031102C101F1039), +(_ucs2 0x10291031102C101F1039), +(_ucs2 0x10211031102C101F103A), +(_ucs2 0x10291031102C101F103A), +('--- Contractions'), +(_ucs2 0x1031102C1000103A1000103B), +(_ucs2 0x1031102C1000103A103B /* (suffix of) man */), +(_ucs2 0x1014103A1014102F1015103A), +(_ucs2 0x1014103A102F1015103A /* (suffix of) I */), +('--- Great Sa'), +(_ucs2 0x1031101E1039101E), +(_ucs2 0x1031103F), +(_ucs2 0x102D101E1039101E), +(_ucs2 0x102D103F), +(_ucs2 0x102F101E1039101E), +(_ucs2 0x102F103F), +(_ucs2 0x1021102D101E1039101E), +(_ucs2 0x1023103F), +(_ucs2 0x1021102F101E1039101E), +(_ucs2 0x1025103F), +(_ucs2 0x101E1039101E), +(_ucs2 0x103F), +('--- Symbols - collate as long form'), +(_ucs2 0x1014103E102D102F1000103A), +(_ucs2 0x104C), +(_ucs2 0x101B103D10311037), +(_ucs2 0x104D), +(_ucs2 0x101C100A103A103810001031102C1004103A1038), +(_ucs2 0x104E1004103A1038), +(_ucs2 0x1021102D), +(_ucs2 0x104F), +('--- Short Forms may need to be added here'), +(_ucs2 0x101C1000103A101A102C), +(_ucs2 0x101C1000103A103B102C /* right hand side */), +(_ucs2 0x101E1019102E), +(_ucs2 0x101E10391019102E /* daughter */), +(_ucs2 0x101110191004103A1038), +(_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)))) +1 2259 108C +2 22593ACB 1037 +3 22593ACC 1038 +4 22593ACD 10371038 +5 --- Vowels +6 2232 102C +7 2232 102B +8 2246 1032 +9 22463ACB 1031102C +10 22463ACB 1031102B +11 22463ACC 1031102C103A +12 22463ACC 1031102B103A +13 2248 1034 +14 22483ACB 1036 +15 22483ACC 102D102F +16 --- Vowels with finals +17 22483ACD 10001039 +18 22483ACD 1000103A +19 22483ACE 102C10001039 +20 22483ACE 102C1000103A +21 22483ACE 102B10001039 +22 22483ACE 102B1000103A +23 22483ACF 102D10001039 +24 22483ACF 102D1000103A +25 22483AD0 102F10001039 +26 22483AD0 102F1000103A +27 22483AD1 103110001039 +28 22483AD1 10311000103A +29 22483AD2 1031102C10001039 +30 22483AD2 1031102C1000103A +31 22483AD2 1031102B10001039 +32 22483AD2 1031102B1000103A +33 22483AD3 102D102F10001039 +34 22483AD3 102D102F1000103A +35 22483AD4 10011039 +36 22483AD4 1001103A +37 22483AD5 102C10011039 +38 22483AD5 102C1001103A +39 22483AD5 102B10011039 +40 22483AD5 102B1001103A +41 22483AD6 102D10011039 +42 22483AD6 102D1001103A +43 22483AD7 102F10011039 +44 22483AD7 102F1001103A +45 22483AD8 103110011039 +46 22483AD8 10311001103A +47 22483AD9 1031102C10011039 +48 22483AD9 1031102C1001103A +49 22483AD9 1031102B10011039 +50 22483AD9 1031102B1001103A +51 22483ADA 102D102F10011039 +52 22483ADA 102D102F1001103A +53 22483ADB 10021039 +54 22483ADB 1002103A +55 22483ADC 102C10021039 +56 22483ADC 102C1002103A +57 22483ADC 102B10021039 +58 22483ADC 102B1002103A +59 22483ADD 102D10021039 +60 22483ADD 102D1002103A +61 22483ADE 102F10021039 +62 22483ADE 102F1002103A +63 22483ADF 103110021039 +64 22483ADF 10311002103A +65 22483AE0 1031102C10021039 +66 22483AE0 1031102C1002103A +67 22483AE0 1031102B10021039 +68 22483AE0 1031102B1002103A +69 22483AE1 102D102F10021039 +70 22483AE1 102D102F1002103A +71 22483AE2 10031039 +72 22483AE2 1003103A +73 22483AE3 102C10031039 +74 22483AE3 102C1003103A +75 22483AE3 102B10031039 +76 22483AE3 102B1003103A +77 22483AE4 102D10031039 +78 22483AE4 102D1003103A +79 22483AE5 102F10031039 +80 22483AE5 102F1003103A +81 22483AE6 103110031039 +82 22483AE6 10311003103A +83 22483AE7 1031102C10031039 +84 22483AE7 1031102C1003103A +85 22483AE7 1031102B10031039 +86 22483AE7 1031102B1003103A +87 22483AE8 102D102F10031039 +88 22483AE8 102D102F1003103A +89 22483AE9 1004103A1039 +90 22483AE9 1004103A +91 22483AEA 102C1004103A1039 +92 22483AEA 102C1004103A +93 22483AEA 102B1004103A1039 +94 22483AEA 102B1004103A +95 22483AEB 102D1004103A1039 +96 22483AEB 102D1004103A +97 22483AEC 102F1004103A1039 +98 22483AEC 102F1004103A +99 22483AED 10311004103A1039 +100 22483AED 10311004103A +101 22483AEE 1031102C1004103A1039 +102 22483AEE 1031102C1004103A +103 22483AEE 1031102B1004103A1039 +104 22483AEE 1031102B1004103A +105 22483AEF 102D102F1004103A1039 +106 22483AEF 102D102F1004103A +107 22483AF0 10051039 +108 22483AF0 1005103A +109 22483AF1 102C10051039 +110 22483AF1 102C1005103A +111 22483AF1 102B10051039 +112 22483AF1 102B1005103A +113 22483AF2 102D10051039 +114 22483AF2 102D1005103A +115 22483AF3 102F10051039 +116 22483AF3 102F1005103A +117 22483AF4 103110051039 +118 22483AF4 10311005103A +119 22483AF5 1031102C10051039 +120 22483AF5 1031102C1005103A +121 22483AF5 1031102B10051039 +122 22483AF5 1031102B1005103A +123 22483AF6 102D102F10051039 +124 22483AF6 102D102F1005103A +125 22483AF7 10061039 +126 22483AF7 1006103A +127 22483AF8 102C10061039 +128 22483AF8 102C1006103A +129 22483AF8 102B10061039 +130 22483AF8 102B1006103A +131 22483AF9 102D10061039 +132 22483AF9 102D1006103A +133 22483AFA 102F10061039 +134 22483AFA 102F1006103A +135 22483AFB 103110061039 +136 22483AFB 10311006103A +137 22483AFC 1031102C10061039 +138 22483AFC 1031102C1006103A +139 22483AFC 1031102B10061039 +140 22483AFC 1031102B1006103A +141 22483AFD 102D102F10061039 +142 22483AFD 102D102F1006103A +143 22483AFE 10071039 +144 22483AFE 1007103A +145 22483AFF 102C10071039 +146 22483AFF 102C1007103A +147 22483AFF 102B10071039 +148 22483AFF 102B1007103A +149 22483B00 102D10071039 +150 22483B00 102D1007103A +151 22483B01 102F10071039 +152 22483B01 102F1007103A +153 22483B02 103110071039 +154 22483B02 10311007103A +155 22483B03 1031102C10071039 +156 22483B03 1031102C1007103A +157 22483B03 1031102B10071039 +158 22483B03 1031102B1007103A +159 22483B04 102D102F10071039 +160 22483B04 102D102F1007103A +161 22483B05 1008103A +162 22483B06 102C1008103A +163 22483B06 102B1008103A +164 22483B07 102D1008103A +165 22483B08 102F1008103A +166 22483B09 10311008103A +167 22483B0A 1031102C1008103A +168 22483B0A 1031102B1008103A +169 22483B0B 102D102F1008103A +170 22483B0C 10091039 +171 22483B0C 1009103A +172 22483B0D 102C10091039 +173 22483B0D 102C1009103A +174 22483B0D 102B10091039 +175 22483B0D 102B1009103A +176 22483B0E 102D10091039 +177 22483B0E 102D1009103A +178 22483B0F 102F10091039 +179 22483B0F 102F1009103A +180 22483B10 103110091039 +181 22483B10 10311009103A +182 22483B11 1031102C10091039 +183 22483B11 1031102C1009103A +184 22483B11 1031102B10091039 +185 22483B11 1031102B1009103A +186 22483B12 102D102F10091039 +187 22483B12 102D102F1009103A +188 22483B13 100A1039 +189 22483B13 100A103A +190 22483B14 102C100A1039 +191 22483B14 102C100A103A +192 22483B14 102B100A1039 +193 22483B14 102B100A103A +194 22483B15 102D100A1039 +195 22483B15 102D100A103A +196 22483B16 102F100A1039 +197 22483B16 102F100A103A +198 22483B17 1031100A1039 +199 22483B17 1031100A103A +200 22483B18 1031102C100A1039 +201 22483B18 1031102C100A103A +202 22483B18 1031102B100A1039 +203 22483B18 1031102B100A103A +204 22483B19 102D102F100A1039 +205 22483B19 102D102F100A103A +206 22483B1A 100B1039 +207 22483B1A 100B103A +208 22483B1B 102C100B1039 +209 22483B1B 102C100B103A +210 22483B1B 102B100B1039 +211 22483B1B 102B100B103A +212 22483B1C 102D100B1039 +213 22483B1C 102D100B103A +214 22483B1D 102F100B1039 +215 22483B1D 102F100B103A +216 22483B1E 1031100B1039 +217 22483B1E 1031100B103A +218 22483B1F 1031102C100B1039 +219 22483B1F 1031102C100B103A +220 22483B1F 1031102B100B1039 +221 22483B1F 1031102B100B103A +222 22483B20 102D102F100B1039 +223 22483B20 102D102F100B103A +224 22483B21 100C1039 +225 22483B21 100C103A +226 22483B22 102C100C1039 +227 22483B22 102C100C103A +228 22483B22 102B100C1039 +229 22483B22 102B100C103A +230 22483B23 102D100C1039 +231 22483B23 102D100C103A +232 22483B24 102F100C1039 +233 22483B24 102F100C103A +234 22483B25 1031100C1039 +235 22483B25 1031100C103A +236 22483B26 1031102C100C1039 +237 22483B26 1031102C100C103A +238 22483B26 1031102B100C1039 +239 22483B26 1031102B100C103A +240 22483B27 102D102F100C1039 +241 22483B27 102D102F100C103A +242 22483B28 100D1039 +243 22483B28 100D103A +244 22483B29 102C100D1039 +245 22483B29 102C100D103A +246 22483B29 102B100D1039 +247 22483B29 102B100D103A +248 22483B2A 102D100D1039 +249 22483B2A 102D100D103A +250 22483B2B 102F100D1039 +251 22483B2B 102F100D103A +252 22483B2C 1031100D1039 +253 22483B2C 1031100D103A +254 22483B2D 1031102C100D1039 +255 22483B2D 1031102C100D103A +256 22483B2D 1031102B100D1039 +257 22483B2D 1031102B100D103A +258 22483B2E 102D102F100D1039 +259 22483B2E 102D102F100D103A +260 22483B2F 100E1039 +261 22483B2F 100E103A +262 22483B30 102C100E1039 +263 22483B30 102C100E103A +264 22483B30 102B100E1039 +265 22483B30 102B100E103A +266 22483B31 102D100E1039 +267 22483B31 102D100E103A +268 22483B32 102F100E1039 +269 22483B32 102F100E103A +270 22483B33 1031100E1039 +271 22483B33 1031100E103A +272 22483B34 1031102C100E1039 +273 22483B34 1031102C100E103A +274 22483B34 1031102B100E1039 +275 22483B34 1031102B100E103A +276 22483B35 102D102F100E1039 +277 22483B35 102D102F100E103A +278 22483B36 100F1039 +279 22483B36 100F103A +280 22483B37 102C100F1039 +281 22483B37 102C100F103A +282 22483B37 102B100F1039 +283 22483B37 102B100F103A +284 22483B38 102D100F1039 +285 22483B38 102D100F103A +286 22483B39 102F100F1039 +287 22483B39 102F100F103A +288 22483B3A 1031100F1039 +289 22483B3A 1031100F103A +290 22483B3B 1031102C100F1039 +291 22483B3B 1031102C100F103A +292 22483B3B 1031102B100F1039 +293 22483B3B 1031102B100F103A +294 22483B3C 102D102F100F1039 +295 22483B3C 102D102F100F103A +296 22483B3D 10101039 +297 22483B3D 1010103A +298 22483B3E 102C10101039 +299 22483B3E 102C1010103A +300 22483B3E 102B10101039 +301 22483B3E 102B1010103A +302 22483B3F 102D10101039 +303 22483B3F 102D1010103A +304 22483B40 102F10101039 +305 22483B40 102F1010103A +306 22483B41 103110101039 +307 22483B41 10311010103A +308 22483B42 1031102C10101039 +309 22483B42 1031102C1010103A +310 22483B42 1031102B10101039 +311 22483B42 1031102B1010103A +312 22483B43 102D102F10101039 +313 22483B43 102D102F1010103A +314 22483B44 10111039 +315 22483B44 1011103A +316 22483B45 102C10111039 +317 22483B45 102C1011103A +318 22483B45 102B10111039 +319 22483B45 102B1011103A +320 22483B46 102D10111039 +321 22483B46 102D1011103A +322 22483B47 102F10111039 +323 22483B47 102F1011103A +324 22483B48 103110111039 +325 22483B48 10311011103A +326 22483B49 1031102C10111039 +327 22483B49 1031102C1011103A +328 22483B49 1031102B10111039 +329 22483B49 1031102B1011103A +330 22483B4A 102D102F10111039 +331 22483B4A 102D102F1011103A +332 22483B4B 10121039 +333 22483B4B 1012103A +334 22483B4C 102C10121039 +335 22483B4C 102C1012103A +336 22483B4C 102B10121039 +337 22483B4C 102B1012103A +338 22483B4D 102D10121039 +339 22483B4D 102D1012103A +340 22483B4E 102F10121039 +341 22483B4E 102F1012103A +342 22483B4F 103110121039 +343 22483B4F 10311012103A +344 22483B50 1031102C10121039 +345 22483B50 1031102C1012103A +346 22483B50 1031102B10121039 +347 22483B50 1031102B1012103A +348 22483B51 102D102F10121039 +349 22483B51 102D102F1012103A +350 22483B52 10131039 +351 22483B52 1013103A +352 22483B53 102C10131039 +353 22483B53 102C1013103A +354 22483B53 102B10131039 +355 22483B53 102B1013103A +356 22483B54 102D10131039 +357 22483B54 102D1013103A +358 22483B55 102F10131039 +359 22483B55 102F1013103A +360 22483B56 103110131039 +361 22483B56 10311013103A +362 22483B57 1031102C10131039 +363 22483B57 1031102C1013103A +364 22483B57 1031102B10131039 +365 22483B57 1031102B1013103A +366 22483B58 102D102F10131039 +367 22483B58 102D102F1013103A +368 22483B59 10141039 +369 22483B59 1014103A +370 22483B5A 102C10141039 +371 22483B5A 102C1014103A +372 22483B5A 102B10141039 +373 22483B5A 102B1014103A +374 22483B5B 102D10141039 +375 22483B5B 102D1014103A +376 22483B5C 102F10141039 +377 22483B5C 102F1014103A +378 22483B5D 103110141039 +379 22483B5D 10311014103A +380 22483B5E 1031102C10141039 +381 22483B5E 1031102C1014103A +382 22483B5E 1031102B10141039 +383 22483B5E 1031102B1014103A +384 22483B5F 102D102F10141039 +385 22483B5F 102D102F1014103A +386 22483B60 10151039 +387 22483B60 1015103A +388 22483B61 102C10151039 +389 22483B61 102C1015103A +390 22483B61 102B10151039 +391 22483B61 102B1015103A +392 22483B62 102D10151039 +393 22483B62 102D1015103A +394 22483B63 102F10151039 +395 22483B63 102F1015103A +396 22483B64 103110151039 +397 22483B64 10311015103A +398 22483B65 1031102C10151039 +399 22483B65 1031102C1015103A +400 22483B65 1031102B10151039 +401 22483B65 1031102B1015103A +402 22483B66 102D102F10151039 +403 22483B66 102D102F1015103A +404 22483B67 10161039 +405 22483B67 1016103A +406 22483B68 102C10161039 +407 22483B68 102C1016103A +408 22483B68 102B10161039 +409 22483B68 102B1016103A +410 22483B69 102D10161039 +411 22483B69 102D1016103A +412 22483B6A 102F10161039 +413 22483B6A 102F1016103A +414 22483B6B 103110161039 +415 22483B6B 10311016103A +416 22483B6C 1031102C10161039 +417 22483B6C 1031102C1016103A +418 22483B6C 1031102B10161039 +419 22483B6C 1031102B1016103A +420 22483B6D 102D102F10161039 +421 22483B6D 102D102F1016103A +422 22483B6E 10171039 +423 22483B6E 1017103A +424 22483B6F 102C10171039 +425 22483B6F 102C1017103A +426 22483B6F 102B10171039 +427 22483B6F 102B1017103A +428 22483B70 102D10171039 +429 22483B70 102D1017103A +430 22483B71 102F10171039 +431 22483B71 102F1017103A +432 22483B72 103110171039 +433 22483B72 10311017103A +434 22483B73 1031102C10171039 +435 22483B73 1031102C1017103A +436 22483B73 1031102B10171039 +437 22483B73 1031102B1017103A +438 22483B74 102D102F10171039 +439 22483B74 102D102F1017103A +440 22483B75 10181039 +441 22483B75 1018103A +442 22483B76 102C10181039 +443 22483B76 102C1018103A +444 22483B76 102B10181039 +445 22483B76 102B1018103A +446 22483B77 102D10181039 +447 22483B77 102D1018103A +448 22483B78 102F10181039 +449 22483B78 102F1018103A +450 22483B79 103110181039 +451 22483B79 10311018103A +452 22483B7A 1031102C10181039 +453 22483B7A 1031102C1018103A +454 22483B7A 1031102B10181039 +455 22483B7A 1031102B1018103A +456 22483B7B 102D102F10181039 +457 22483B7B 102D102F1018103A +458 22483B7C 10191039 +459 22483B7C 1019103A +460 22483B7D 102C10191039 +461 22483B7D 102C1019103A +462 22483B7D 102B10191039 +463 22483B7D 102B1019103A +464 22483B7E 102D10191039 +465 22483B7E 102D1019103A +466 22483B7F 102F10191039 +467 22483B7F 102F1019103A +468 22483B80 103110191039 +469 22483B80 10311019103A +470 22483B81 1031102C10191039 +471 22483B81 1031102C1019103A +472 22483B81 1031102B10191039 +473 22483B81 1031102B1019103A +474 22483B82 102D102F10191039 +475 22483B82 102D102F1019103A +476 22483B83 101A1039 +477 22483B83 101A103A +478 22483B84 102C101A1039 +479 22483B84 102C101A103A +480 22483B84 102B101A1039 +481 22483B84 102B101A103A +482 22483B85 102D101A1039 +483 22483B85 102D101A103A +484 22483B86 102F101A1039 +485 22483B86 102F101A103A +486 22483B87 1031101A1039 +487 22483B87 1031101A103A +488 22483B88 1031102C101A1039 +489 22483B88 1031102C101A103A +490 22483B88 1031102B101A1039 +491 22483B88 1031102B101A103A +492 22483B89 102D102F101A1039 +493 22483B89 102D102F101A103A +494 22483B8A 101B1039 +495 22483B8A 101B103A +496 22483B8B 102C101B1039 +497 22483B8B 102C101B103A +498 22483B8B 102B101B1039 +499 22483B8B 102B101B103A +500 22483B8C 102D101B1039 +501 22483B8C 102D101B103A +502 22483B8D 102F101B1039 +503 22483B8D 102F101B103A +504 22483B8E 1031101B1039 +505 22483B8E 1031101B103A +506 22483B8F 1031102C101B1039 +507 22483B8F 1031102C101B103A +508 22483B8F 1031102B101B1039 +509 22483B8F 1031102B101B103A +510 22483B90 102D102F101B1039 +511 22483B90 102D102F101B103A +512 22483B91 101C1039 +513 22483B91 101C103A +514 22483B92 102C101C1039 +515 22483B92 102C101C103A +516 22483B92 102B101C1039 +517 22483B92 102B101C103A +518 22483B93 102D101C1039 +519 22483B93 102D101C103A +520 22483B94 102F101C1039 +521 22483B94 102F101C103A +522 22483B95 1031101C1039 +523 22483B95 1031101C103A +524 22483B96 1031102C101C1039 +525 22483B96 1031102C101C103A +526 22483B96 1031102B101C1039 +527 22483B96 1031102B101C103A +528 22483B97 102D102F101C1039 +529 22483B97 102D102F101C103A +530 22483B98 101D103A +531 22483B99 102C101D103A +532 22483B99 102B101D103A +533 22483B9A 102D101D103A +534 22483B9B 102F101D103A +535 22483B9C 1031101D103A +536 22483B9D 1031102C101D103A +537 22483B9D 1031102B101D103A +538 22483B9E 102D102F101D103A +539 22483B9F 101E1039 +540 22483B9F 101E103A +541 22483BA0 102C101E1039 +542 22483BA0 102C101E103A +543 22483BA0 102B101E1039 +544 22483BA0 102B101E103A +545 22483BA1 102D101E1039 +546 22483BA1 102D101E103A +547 22483BA2 102F101E1039 +548 22483BA2 102F101E103A +549 22483BA3 1031101E1039 +550 22483BA3 1031101E103A +551 22483BA4 1031102C101E1039 +552 22483BA4 1031102C101E103A +553 22483BA4 1031102B101E1039 +554 22483BA4 1031102B101E103A +555 22483BA5 102D102F101E1039 +556 22483BA5 102D102F101E103A +557 22483BA6 101F1039 +558 22483BA6 101F103A +559 22483BA7 102C101F1039 +560 22483BA7 102C101F103A +561 22483BA7 102B101F1039 +562 22483BA7 102B101F103A +563 22483BA8 102D101F1039 +564 22483BA8 102D101F103A +565 22483BA9 102F101F1039 +566 22483BA9 102F101F103A +567 22483BAA 1031101F1039 +568 22483BAA 1031101F103A +569 22483BAB 1031102C101F1039 +570 22483BAB 1031102C101F103A +571 22483BAB 1031102B101F1039 +572 22483BAB 1031102B101F103A +573 22483BAC 102D102F101F1039 +574 22483BAC 102D102F101F103A +575 22483BAD 1020103A +576 22483BAE 102C1020103A +577 22483BAE 102B1020103A +578 22483BAF 102D1020103A +579 22483BB0 102F1020103A +580 22483BB1 10311020103A +581 22483BB2 1031102C1020103A +582 22483BB2 1031102B1020103A +583 22483BB3 102D102F1020103A +584 22483BB4 1021103A +585 22483BB5 102C1021103A +586 22483BB5 102B1021103A +587 22483BB6 102D1021103A +588 22483BB7 102F1021103A +589 22483BB8 10311021103A +590 22483BB9 1031102C1021103A +591 22483BB9 1031102B1021103A +592 22483BBA 102D102F1021103A +593 --- Medials +594 22483BBB 105E +595 22483BBC 105F +596 22483BBD 103B +597 22483BBE 103C +598 22483BBF 1060 +599 22483BC0 103D +600 22483BC1 1082 +601 22483BC2 103E +602 22483BC3 103B103D +603 22483BC4 103C103D +604 22483BC5 103B103E +605 22483BC6 103C103E +606 22483BC7 103D103E +607 22483BC8 103B103D103E +608 22483BC9 103C103D103E +609 --- Independent vowels +610 22242236 1021102D +611 22242236 1023 +612 22242238 1021102E +613 22242238 1024 +614 2224223A 1021102F +615 2224223A 1025 +616 2224223D 10211030 +617 2224223D 1026 +618 22242242 10211031 +619 22242242 1027 +620 22242242 1028 +621 222422463ACB 10211031102C +622 222422463ACB 1029 +623 222422463ACC 10211031102C103A +624 222422463ACC 102A +625 22483B7E 102D1019103A +626 22483B7E3ACB 102D1036 +627 22483B7E3ACC 102D1019103A1037 +628 22483B7E3ACD 102D10361037 +629 22483B7E3ACE 102D1019103A1038 +630 22483B7E3ACF 102D10361038 +631 22483B7F 102F1019103A +632 22483B7F3ACB 102F1036 +633 22483B7F3ACC 102F1019103A1037 +634 22483B7F3ACD 102F10361037 +635 22483B7F3ACE 102F1019103A1038 +636 22483B7F3ACF 102F10361038 +637 222422483B7F3ACB 1021102F1036 +638 222422483B7F3ACB 1025102F1036 +639 --- Independent vowels with finals +640 222422483ACF 1021102D10001039 +641 222422483ACF 102310001039 +642 222422483ACF 1021102D1000103A +643 222422483ACF 10231000103A +644 222422483AD0 1021102F10001039 +645 222422483AD0 102510001039 +646 222422483AD0 1021102F1000103A +647 222422483AD0 10251000103A +648 222422483AD1 1021103110001039 +649 222422483AD1 102710001039 +650 222422483AD1 102110311000103A +651 222422483AD1 10271000103A +652 222422483AD2 10211031102C10001039 +653 222422483AD2 102910001039 +654 222422483AD2 10211031102C1000103A +655 222422483AD2 10291000103A +656 222422483AD2 10211031102C10001039 +657 222422483AD2 10291031102C10001039 +658 222422483AD2 10211031102C1000103A +659 222422483AD2 10291031102C1000103A +660 222422483AD6 1021102D10011039 +661 222422483AD6 102310011039 +662 222422483AD6 1021102D1001103A +663 222422483AD6 10231001103A +664 222422483AD7 1021102F10011039 +665 222422483AD7 102510011039 +666 222422483AD7 1021102F1001103A +667 222422483AD7 10251001103A +668 222422483AD8 1021103110011039 +669 222422483AD8 102710011039 +670 222422483AD8 102110311001103A +671 222422483AD8 10271001103A +672 222422483AD9 10211031102C10011039 +673 222422483AD9 102910011039 +674 222422483AD9 10211031102C1001103A +675 222422483AD9 10291001103A +676 222422483AD9 10211031102C10011039 +677 222422483AD9 10291031102C10011039 +678 222422483AD9 10211031102C1001103A +679 222422483AD9 10291031102C1001103A +680 222422483ADD 1021102D10021039 +681 222422483ADD 102310021039 +682 222422483ADD 1021102D1002103A +683 222422483ADD 10231002103A +684 222422483ADE 1021102F10021039 +685 222422483ADE 102510021039 +686 222422483ADE 1021102F1002103A +687 222422483ADE 10251002103A +688 222422483ADF 1021103110021039 +689 222422483ADF 102710021039 +690 222422483ADF 102110311002103A +691 222422483ADF 10271002103A +692 222422483AE0 10211031102C10021039 +693 222422483AE0 102910021039 +694 222422483AE0 10211031102C1002103A +695 222422483AE0 10291002103A +696 222422483AE0 10211031102C10021039 +697 222422483AE0 10291031102C10021039 +698 222422483AE0 10211031102C1002103A +699 222422483AE0 10291031102C1002103A +700 222422483AE4 1021102D10031039 +701 222422483AE4 102310031039 +702 222422483AE4 1021102D1003103A +703 222422483AE4 10231003103A +704 222422483AE5 1021102F10031039 +705 222422483AE5 102510031039 +706 222422483AE5 1021102F1003103A +707 222422483AE5 10251003103A +708 222422483AE6 1021103110031039 +709 222422483AE6 102710031039 +710 222422483AE6 102110311003103A +711 222422483AE6 10271003103A +712 222422483AE7 10211031102C10031039 +713 222422483AE7 102910031039 +714 222422483AE7 10211031102C1003103A +715 222422483AE7 10291003103A +716 222422483AE7 10211031102C10031039 +717 222422483AE7 10291031102C10031039 +718 222422483AE7 10211031102C1003103A +719 222422483AE7 10291031102C1003103A +720 2224223621D5224D 1021102D10041039 +721 2224223621D5224D 102310041039 +722 222422483AEB 1021102D1004103A +723 222422483AEB 10231004103A +724 2224223A21D5224D 1021102F10041039 +725 2224223A21D5224D 102510041039 +726 222422483AEC 1021102F1004103A +727 222422483AEC 10251004103A +728 2224224221D5224D 1021103110041039 +729 2224224221D5224D 102710041039 +730 222422483AED 102110311004103A +731 222422483AED 10271004103A +732 222422463ACB21D5224D 10211031102C10041039 +733 222422463ACB21D5224D 102910041039 +734 222422483AEE 10211031102C1004103A +735 222422483AEE 10291004103A +736 222422463ACB21D5224D 10211031102C10041039 +737 222422463ACB21D5224D 10291031102C10041039 +738 222422483AEE 10211031102C1004103A +739 222422483AEE 10291031102C1004103A +740 222422483AF2 1021102D10051039 +741 222422483AF2 102310051039 +742 222422483AF2 1021102D1005103A +743 222422483AF2 10231005103A +744 222422483AF3 1021102F10051039 +745 222422483AF3 102510051039 +746 222422483AF3 1021102F1005103A +747 222422483AF3 10251005103A +748 222422483AF4 1021103110051039 +749 222422483AF4 102710051039 +750 222422483AF4 102110311005103A +751 222422483AF4 10271005103A +752 222422483AF5 10211031102C10051039 +753 222422483AF5 102910051039 +754 222422483AF5 10211031102C1005103A +755 222422483AF5 10291005103A +756 222422483AF5 10211031102C10051039 +757 222422483AF5 10291031102C10051039 +758 222422483AF5 10211031102C1005103A +759 222422483AF5 10291031102C1005103A +760 222422483AF9 1021102D10061039 +761 222422483AF9 102310061039 +762 222422483AF9 1021102D1006103A +763 222422483AF9 10231006103A +764 222422483AFA 1021102F10061039 +765 222422483AFA 102510061039 +766 222422483AFA 1021102F1006103A +767 222422483AFA 10251006103A +768 222422483AFB 1021103110061039 +769 222422483AFB 102710061039 +770 222422483AFB 102110311006103A +771 222422483AFB 10271006103A +772 222422483AFC 10211031102C10061039 +773 222422483AFC 102910061039 +774 222422483AFC 10211031102C1006103A +775 222422483AFC 10291006103A +776 222422483AFC 10211031102C10061039 +777 222422483AFC 10291031102C10061039 +778 222422483AFC 10211031102C1006103A +779 222422483AFC 10291031102C1006103A +780 222422483B00 1021102D10071039 +781 222422483B00 102310071039 +782 222422483B00 1021102D1007103A +783 222422483B00 10231007103A +784 222422483B01 1021102F10071039 +785 222422483B01 102510071039 +786 222422483B01 1021102F1007103A +787 222422483B01 10251007103A +788 222422483B02 1021103110071039 +789 222422483B02 102710071039 +790 222422483B02 102110311007103A +791 222422483B02 10271007103A +792 222422483B03 10211031102C10071039 +793 222422483B03 102910071039 +794 222422483B03 10211031102C1007103A +795 222422483B03 10291007103A +796 222422483B03 10211031102C10071039 +797 222422483B03 10291031102C10071039 +798 222422483B03 10211031102C1007103A +799 222422483B03 10291031102C1007103A +800 222422483B0E 1021102D10091039 +801 222422483B0E 102310091039 +802 222422483B0E 1021102D1009103A +803 222422483B0E 10231009103A +804 222422483B0F 1021102F10091039 +805 222422483B0F 102510091039 +806 222422483B0F 1021102F1009103A +807 222422483B0F 10251009103A +808 222422483B10 1021103110091039 +809 222422483B10 102710091039 +810 222422483B10 102110311009103A +811 222422483B10 10271009103A +812 222422483B11 10211031102C10091039 +813 222422483B11 102910091039 +814 222422483B11 10211031102C1009103A +815 222422483B11 10291009103A +816 222422483B11 10211031102C10091039 +817 222422483B11 10291031102C10091039 +818 222422483B11 10211031102C1009103A +819 222422483B11 10291031102C1009103A +820 222422483B15 1021102D100A1039 +821 222422483B15 1023100A1039 +822 222422483B15 1021102D100A103A +823 222422483B15 1023100A103A +824 222422483B16 1021102F100A1039 +825 222422483B16 1025100A1039 +826 222422483B16 1021102F100A103A +827 222422483B16 1025100A103A +828 222422483B17 10211031100A1039 +829 222422483B17 1027100A1039 +830 222422483B17 10211031100A103A +831 222422483B17 1027100A103A +832 222422483B18 10211031102C100A1039 +833 222422483B18 1029100A1039 +834 222422483B18 10211031102C100A103A +835 222422483B18 1029100A103A +836 222422483B18 10211031102C100A1039 +837 222422483B18 10291031102C100A1039 +838 222422483B18 10211031102C100A103A +839 222422483B18 10291031102C100A103A +840 222422483B1C 1021102D100B1039 +841 222422483B1C 1023100B1039 +842 222422483B1C 1021102D100B103A +843 222422483B1C 1023100B103A +844 222422483B1D 1021102F100B1039 +845 222422483B1D 1025100B1039 +846 222422483B1D 1021102F100B103A +847 222422483B1D 1025100B103A +848 222422483B1E 10211031100B1039 +849 222422483B1E 1027100B1039 +850 222422483B1E 10211031100B103A +851 222422483B1E 1027100B103A +852 222422483B1F 10211031102C100B1039 +853 222422483B1F 1029100B1039 +854 222422483B1F 10211031102C100B103A +855 222422483B1F 1029100B103A +856 222422483B1F 10211031102C100B1039 +857 222422483B1F 10291031102C100B1039 +858 222422483B1F 10211031102C100B103A +859 222422483B1F 10291031102C100B103A +860 222422483B23 1021102D100C1039 +861 222422483B23 1023100C1039 +862 222422483B23 1021102D100C103A +863 222422483B23 1023100C103A +864 222422483B24 1021102F100C1039 +865 222422483B24 1025100C1039 +866 222422483B24 1021102F100C103A +867 222422483B24 1025100C103A +868 222422483B25 10211031100C1039 +869 222422483B25 1027100C1039 +870 222422483B25 10211031100C103A +871 222422483B25 1027100C103A +872 222422483B26 10211031102C100C1039 +873 222422483B26 1029100C1039 +874 222422483B26 10211031102C100C103A +875 222422483B26 1029100C103A +876 222422483B26 10211031102C100C1039 +877 222422483B26 10291031102C100C1039 +878 222422483B26 10211031102C100C103A +879 222422483B26 10291031102C100C103A +880 222422483B2A 1021102D100D1039 +881 222422483B2A 1023100D1039 +882 222422483B2A 1021102D100D103A +883 222422483B2A 1023100D103A +884 222422483B2B 1021102F100D1039 +885 222422483B2B 1025100D1039 +886 222422483B2B 1021102F100D103A +887 222422483B2B 1025100D103A +888 222422483B2C 10211031100D1039 +889 222422483B2C 1027100D1039 +890 222422483B2C 10211031100D103A +891 222422483B2C 1027100D103A +892 222422483B2D 10211031102C100D1039 +893 222422483B2D 1029100D1039 +894 222422483B2D 10211031102C100D103A +895 222422483B2D 1029100D103A +896 222422483B2D 10211031102C100D1039 +897 222422483B2D 10291031102C100D1039 +898 222422483B2D 10211031102C100D103A +899 222422483B2D 10291031102C100D103A +900 222422483B31 1021102D100E1039 +901 222422483B31 1023100E1039 +902 222422483B31 1021102D100E103A +903 222422483B31 1023100E103A +904 222422483B32 1021102F100E1039 +905 222422483B32 1025100E1039 +906 222422483B32 1021102F100E103A +907 222422483B32 1025100E103A +908 222422483B33 10211031100E1039 +909 222422483B33 1027100E1039 +910 222422483B33 10211031100E103A +911 222422483B33 1027100E103A +912 222422483B34 10211031102C100E1039 +913 222422483B34 1029100E1039 +914 222422483B34 10211031102C100E103A +915 222422483B34 1029100E103A +916 222422483B34 10211031102C100E1039 +917 222422483B34 10291031102C100E1039 +918 222422483B34 10211031102C100E103A +919 222422483B34 10291031102C100E103A +920 222422483B38 1021102D100F1039 +921 222422483B38 1023100F1039 +922 222422483B38 1021102D100F103A +923 222422483B38 1023100F103A +924 222422483B39 1021102F100F1039 +925 222422483B39 1025100F1039 +926 222422483B39 1021102F100F103A +927 222422483B39 1025100F103A +928 222422483B3A 10211031100F1039 +929 222422483B3A 1027100F1039 +930 222422483B3A 10211031100F103A +931 222422483B3A 1027100F103A +932 222422483B3B 10211031102C100F1039 +933 222422483B3B 1029100F1039 +934 222422483B3B 10211031102C100F103A +935 222422483B3B 1029100F103A +936 222422483B3B 10211031102C100F1039 +937 222422483B3B 10291031102C100F1039 +938 222422483B3B 10211031102C100F103A +939 222422483B3B 10291031102C100F103A +940 222422483B3F 1021102D10101039 +941 222422483B3F 102310101039 +942 222422483B3F 1021102D1010103A +943 222422483B3F 10231010103A +944 222422483B40 1021102F10101039 +945 222422483B40 102510101039 +946 222422483B40 1021102F1010103A +947 222422483B40 10251010103A +948 222422483B41 1021103110101039 +949 222422483B41 102710101039 +950 222422483B41 102110311010103A +951 222422483B41 10271010103A +952 222422483B42 10211031102C10101039 +953 222422483B42 102910101039 +954 222422483B42 10211031102C1010103A +955 222422483B42 10291010103A +956 222422483B42 10211031102C10101039 +957 222422483B42 10291031102C10101039 +958 222422483B42 10211031102C1010103A +959 222422483B42 10291031102C1010103A +960 222422483B46 1021102D10111039 +961 222422483B46 102310111039 +962 222422483B46 1021102D1011103A +963 222422483B46 10231011103A +964 222422483B47 1021102F10111039 +965 222422483B47 102510111039 +966 222422483B47 1021102F1011103A +967 222422483B47 10251011103A +968 222422483B48 1021103110111039 +969 222422483B48 102710111039 +970 222422483B48 102110311011103A +971 222422483B48 10271011103A +972 222422483B49 10211031102C10111039 +973 222422483B49 102910111039 +974 222422483B49 10211031102C1011103A +975 222422483B49 10291011103A +976 222422483B49 10211031102C10111039 +977 222422483B49 10291031102C10111039 +978 222422483B49 10211031102C1011103A +979 222422483B49 10291031102C1011103A +980 222422483B4D 1021102D10121039 +981 222422483B4D 102310121039 +982 222422483B4D 1021102D1012103A +983 222422483B4D 10231012103A +984 222422483B4E 1021102F10121039 +985 222422483B4E 102510121039 +986 222422483B4E 1021102F1012103A +987 222422483B4E 10251012103A +988 222422483B4F 1021103110121039 +989 222422483B4F 102710121039 +990 222422483B4F 102110311012103A +991 222422483B4F 10271012103A +992 222422483B50 10211031102C10121039 +993 222422483B50 102910121039 +994 222422483B50 10211031102C1012103A +995 222422483B50 10291012103A +996 222422483B50 10211031102C10121039 +997 222422483B50 10291031102C10121039 +998 222422483B50 10211031102C1012103A +999 222422483B50 10291031102C1012103A +1000 222422483B54 1021102D10131039 +1001 222422483B54 102310131039 +1002 222422483B54 1021102D1013103A +1003 222422483B54 10231013103A +1004 222422483B55 1021102F10131039 +1005 222422483B55 102510131039 +1006 222422483B55 1021102F1013103A +1007 222422483B55 10251013103A +1008 222422483B56 1021103110131039 +1009 222422483B56 102710131039 +1010 222422483B56 102110311013103A +1011 222422483B56 10271013103A +1012 222422483B57 10211031102C10131039 +1013 222422483B57 102910131039 +1014 222422483B57 10211031102C1013103A +1015 222422483B57 10291013103A +1016 222422483B57 10211031102C10131039 +1017 222422483B57 10291031102C10131039 +1018 222422483B57 10211031102C1013103A +1019 222422483B57 10291031102C1013103A +1020 222422483B5B 1021102D10141039 +1021 222422483B5B 102310141039 +1022 222422483B5B 1021102D1014103A +1023 222422483B5B 10231014103A +1024 222422483B5C 1021102F10141039 +1025 222422483B5C 102510141039 +1026 222422483B5C 1021102F1014103A +1027 222422483B5C 10251014103A +1028 222422483B5D 1021103110141039 +1029 222422483B5D 102710141039 +1030 222422483B5D 102110311014103A +1031 222422483B5D 10271014103A +1032 222422483B5E 10211031102C10141039 +1033 222422483B5E 102910141039 +1034 222422483B5E 10211031102C1014103A +1035 222422483B5E 10291014103A +1036 222422483B5E 10211031102C10141039 +1037 222422483B5E 10291031102C10141039 +1038 222422483B5E 10211031102C1014103A +1039 222422483B5E 10291031102C1014103A +1040 222422483B62 1021102D10151039 +1041 222422483B62 102310151039 +1042 222422483B62 1021102D1015103A +1043 222422483B62 10231015103A +1044 222422483B63 1021102F10151039 +1045 222422483B63 102510151039 +1046 222422483B63 1021102F1015103A +1047 222422483B63 10251015103A +1048 222422483B64 1021103110151039 +1049 222422483B64 102710151039 +1050 222422483B64 102110311015103A +1051 222422483B64 10271015103A +1052 222422483B65 10211031102C10151039 +1053 222422483B65 102910151039 +1054 222422483B65 10211031102C1015103A +1055 222422483B65 10291015103A +1056 222422483B65 10211031102C10151039 +1057 222422483B65 10291031102C10151039 +1058 222422483B65 10211031102C1015103A +1059 222422483B65 10291031102C1015103A +1060 222422483B69 1021102D10161039 +1061 222422483B69 102310161039 +1062 222422483B69 1021102D1016103A +1063 222422483B69 10231016103A +1064 222422483B6A 1021102F10161039 +1065 222422483B6A 102510161039 +1066 222422483B6A 1021102F1016103A +1067 222422483B6A 10251016103A +1068 222422483B6B 1021103110161039 +1069 222422483B6B 102710161039 +1070 222422483B6B 102110311016103A +1071 222422483B6B 10271016103A +1072 222422483B6C 10211031102C10161039 +1073 222422483B6C 102910161039 +1074 222422483B6C 10211031102C1016103A +1075 222422483B6C 10291016103A +1076 222422483B6C 10211031102C10161039 +1077 222422483B6C 10291031102C10161039 +1078 222422483B6C 10211031102C1016103A +1079 222422483B6C 10291031102C1016103A +1080 222422483B70 1021102D10171039 +1081 222422483B70 102310171039 +1082 222422483B70 1021102D1017103A +1083 222422483B70 10231017103A +1084 222422483B71 1021102F10171039 +1085 222422483B71 102510171039 +1086 222422483B71 1021102F1017103A +1087 222422483B71 10251017103A +1088 222422483B72 1021103110171039 +1089 222422483B72 102710171039 +1090 222422483B72 102110311017103A +1091 222422483B72 10271017103A +1092 222422483B73 10211031102C10171039 +1093 222422483B73 102910171039 +1094 222422483B73 10211031102C1017103A +1095 222422483B73 10291017103A +1096 222422483B73 10211031102C10171039 +1097 222422483B73 10291031102C10171039 +1098 222422483B73 10211031102C1017103A +1099 222422483B73 10291031102C1017103A +1100 222422483B77 1021102D10181039 +1101 222422483B77 102310181039 +1102 222422483B77 1021102D1018103A +1103 222422483B77 10231018103A +1104 222422483B78 1021102F10181039 +1105 222422483B78 102510181039 +1106 222422483B78 1021102F1018103A +1107 222422483B78 10251018103A +1108 222422483B79 1021103110181039 +1109 222422483B79 102710181039 +1110 222422483B79 102110311018103A +1111 222422483B79 10271018103A +1112 222422483B7A 10211031102C10181039 +1113 222422483B7A 102910181039 +1114 222422483B7A 10211031102C1018103A +1115 222422483B7A 10291018103A +1116 222422483B7A 10211031102C10181039 +1117 222422483B7A 10291031102C10181039 +1118 222422483B7A 10211031102C1018103A +1119 222422483B7A 10291031102C1018103A +1120 222422483B7E 1021102D10191039 +1121 222422483B7E 102310191039 +1122 222422483B7E 1021102D1019103A +1123 222422483B7E 10231019103A +1124 222422483B7F 1021102F10191039 +1125 222422483B7F 102510191039 +1126 222422483B7F 1021102F1019103A +1127 222422483B7F 10251019103A +1128 222422483B80 1021103110191039 +1129 222422483B80 102710191039 +1130 222422483B80 102110311019103A +1131 222422483B80 10271019103A +1132 222422483B81 10211031102C10191039 +1133 222422483B81 102910191039 +1134 222422483B81 10211031102C1019103A +1135 222422483B81 10291019103A +1136 222422483B81 10211031102C10191039 +1137 222422483B81 10291031102C10191039 +1138 222422483B81 10211031102C1019103A +1139 222422483B81 10291031102C1019103A +1140 222422483B85 1021102D101A1039 +1141 222422483B85 1023101A1039 +1142 222422483B85 1021102D101A103A +1143 222422483B85 1023101A103A +1144 222422483B86 1021102F101A1039 +1145 222422483B86 1025101A1039 +1146 222422483B86 1021102F101A103A +1147 222422483B86 1025101A103A +1148 222422483B87 10211031101A1039 +1149 222422483B87 1027101A1039 +1150 222422483B87 10211031101A103A +1151 222422483B87 1027101A103A +1152 222422483B88 10211031102C101A1039 +1153 222422483B88 1029101A1039 +1154 222422483B88 10211031102C101A103A +1155 222422483B88 1029101A103A +1156 222422483B88 10211031102C101A1039 +1157 222422483B88 10291031102C101A1039 +1158 222422483B88 10211031102C101A103A +1159 222422483B88 10291031102C101A103A +1160 222422483B8C 1021102D101B1039 +1161 222422483B8C 1023101B1039 +1162 222422483B8C 1021102D101B103A +1163 222422483B8C 1023101B103A +1164 222422483B8D 1021102F101B1039 +1165 222422483B8D 1025101B1039 +1166 222422483B8D 1021102F101B103A +1167 222422483B8D 1025101B103A +1168 222422483B8E 10211031101B1039 +1169 222422483B8E 1027101B1039 +1170 222422483B8E 10211031101B103A +1171 222422483B8E 1027101B103A +1172 222422483B8F 10211031102C101B1039 +1173 222422483B8F 1029101B1039 +1174 222422483B8F 10211031102C101B103A +1175 222422483B8F 1029101B103A +1176 222422483B8F 10211031102C101B1039 +1177 222422483B8F 10291031102C101B1039 +1178 222422483B8F 10211031102C101B103A +1179 222422483B8F 10291031102C101B103A +1180 222422483B93 1021102D101C1039 +1181 222422483B93 1023101C1039 +1182 222422483B93 1021102D101C103A +1183 222422483B93 1023101C103A +1184 222422483B94 1021102F101C1039 +1185 222422483B94 1025101C1039 +1186 222422483B94 1021102F101C103A +1187 222422483B94 1025101C103A +1188 222422483B95 10211031101C1039 +1189 222422483B95 1027101C1039 +1190 222422483B95 10211031101C103A +1191 222422483B95 1027101C103A +1192 222422483B96 10211031102C101C1039 +1193 222422483B96 1029101C1039 +1194 222422483B96 10211031102C101C103A +1195 222422483B96 1029101C103A +1196 222422483B96 10211031102C101C1039 +1197 222422483B96 10291031102C101C1039 +1198 222422483B96 10211031102C101C103A +1199 222422483B96 10291031102C101C103A +1200 222422483BA1 1021102D101E1039 +1201 222422483BA1 1023101E1039 +1202 222422483BA1 1021102D101E103A +1203 222422483BA1 1023101E103A +1204 222422483BA2 1021102F101E1039 +1205 222422483BA2 1025101E1039 +1206 222422483BA2 1021102F101E103A +1207 222422483BA2 1025101E103A +1208 222422483BA3 10211031101E1039 +1209 222422483BA3 1027101E1039 +1210 222422483BA3 10211031101E103A +1211 222422483BA3 1027101E103A +1212 222422483BA4 10211031102C101E1039 +1213 222422483BA4 1029101E1039 +1214 222422483BA4 10211031102C101E103A +1215 222422483BA4 1029101E103A +1216 222422483BA4 10211031102C101E1039 +1217 222422483BA4 10291031102C101E1039 +1218 222422483BA4 10211031102C101E103A +1219 222422483BA4 10291031102C101E103A +1220 222422483BA8 1021102D101F1039 +1221 222422483BA8 1023101F1039 +1222 222422483BA8 1021102D101F103A +1223 222422483BA8 1023101F103A +1224 222422483BA9 1021102F101F1039 +1225 222422483BA9 1025101F1039 +1226 222422483BA9 1021102F101F103A +1227 222422483BA9 1025101F103A +1228 222422483BAA 10211031101F1039 +1229 222422483BAA 1027101F1039 +1230 222422483BAA 10211031101F103A +1231 222422483BAA 1027101F103A +1232 222422483BAB 10211031102C101F1039 +1233 222422483BAB 1029101F1039 +1234 222422483BAB 10211031102C101F103A +1235 222422483BAB 1029101F103A +1236 222422483BAB 10211031102C101F1039 +1237 222422483BAB 10291031102C101F1039 +1238 222422483BAB 10211031102C101F103A +1239 222422483BAB 10291031102C101F103A +1240 --- Contractions +1241 22483AD221CD22483BBD 1031102C1000103A1000103B +1242 22483AD221CD22483BBD 1031102C1000103A103B +1243 22483B5921F822483B63 1014103A1014102F1015103A +1244 22483B5921F822483B63 1014103A102F1015103A +1245 --- Great Sa +1246 22483BA32216 1031101E1039101E +1247 22483BA32216 1031103F +1248 22483BA12216 102D101E1039101E +1249 22483BA12216 102D103F +1250 22483BA22216 102F101E1039101E +1251 22483BA22216 102F103F +1252 222422483BA12216 1021102D101E1039101E +1253 222422483BA12216 1023103F +1254 222422483BA22216 1021102F101E1039101E +1255 222422483BA22216 1025103F +1256 22483B9F2216 101E1039101E +1257 22483B9F2216 103F +1258 --- Symbols - collate as long form +1259 21F822483BC222483AD3 1014103E102D102F1000103A +1260 21F822483BC222483AD3 104C +1261 220922483BC0224222593ACB 101B103D10311037 +1262 220922483BC0224222593ACB 104D +1263 220D22483B1322593ACC21CD22483AEE22593ACC 101C100A103A103810001031102C1004103A1038 +1264 220D22483B1322593ACC21CD22483AEE22593ACC 104E1004103A1038 +1265 22242236 1021102D +1266 22242236 104F +1267 --- Short Forms may need to be added here +1268 220D22483ACD22072232 101C1000103A101A102C +1269 220D22483ACD22072232 101C1000103A103B102C +1270 221622052238 101E1019102E +1271 221622052238 101E10391019102E +1272 21F3220522483AE922593ACC 101110191004103A1038 +1273 21F3220522483AE922593ACC 1011103910191004103A1038 +1274 220D22483ACD220422483ACD 101C1000103A10181000103A +1275 220D22483ACD220422483ACD 101C103910181000103A +DROP TABLE t1; +# +# END of ctype_myanmar.inc +# +# +# End of MariaDB-10.0 tests +# diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result index ff3f4038447..8439c40fbf9 100644 --- a/mysql-test/r/date_formats.result +++ b/mysql-test/r/date_formats.result @@ -60,70 +60,70 @@ insert into t1 values ('15-2001-1', '%d-%Y-%c'); select date,format,str_to_date(date, format) as str_to_date from t1; date format str_to_date -2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 2003-01-02 10:11:12 -03-01-02 8:11:2.123456 %y-%m-%d %H:%i:%S.%# 2003-01-02 08:11:02 -0003-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 0003-01-02 08:11:02 -03-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 2003-01-02 08:11:02 -2003-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 2003-01-02 22:11:12 +2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 2003-01-02 10:11:12.000000 +03-01-02 8:11:2.123456 %y-%m-%d %H:%i:%S.%# 2003-01-02 08:11:02.000000 +0003-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 0003-01-02 08:11:02.000000 +03-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 2003-01-02 08:11:02.000000 +2003-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 2003-01-02 22:11:12.000000 2003-01-02 01:11:12.12345AM %Y-%m-%d %h:%i:%S.%f%p 2003-01-02 01:11:12.123450 2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 2003-01-02 02:11:12.123450 2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 2003-01-02 00:11:12.123450 -2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12 -10:20:10 %H:%i:%s 0000-00-00 10:20:10 -10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10 -10:20:10 %T 0000-00-00 10:20:10 -10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10 -10:20:10AM %r 0000-00-00 10:20:10 +2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12.000000 +10:20:10 %H:%i:%s 0000-00-00 10:20:10.000000 +10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10.000000 +10:20:10 %T 0000-00-00 10:20:10.000000 +10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10.000000 +10:20:10AM %r 0000-00-00 10:20:10.000000 10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.440000 -15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58 -15 September 2001 %d %M %Y 2001-09-15 00:00:00 -15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00 -15 MAY 2001 %d %b %Y 2001-05-15 00:00:00 -15th May 2001 %D %b %Y 2001-05-15 00:00:00 -Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00 -Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00 -Tuesday 00 2002 %W %U %Y 2002-01-01 00:00:00 -Thursday 53 1998 %W %u %Y 1998-12-31 00:00:00 -Sunday 01 2001 %W %v %x 2001-01-07 00:00:00 -Tuesday 52 2001 %W %V %X 2002-01-01 00:00:00 -060 2004 %j %Y 2004-02-29 00:00:00 -4 53 1998 %w %u %Y 1998-12-31 00:00:00 -15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00 -15-01-20 %d-%m-%y 2020-01-15 00:00:00 -15-2001-1 %d-%Y-%c 2001-01-15 00:00:00 +15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58.000000 +15 September 2001 %d %M %Y 2001-09-15 00:00:00.000000 +15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00.000000 +15 MAY 2001 %d %b %Y 2001-05-15 00:00:00.000000 +15th May 2001 %D %b %Y 2001-05-15 00:00:00.000000 +Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00.000000 +Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00.000000 +Tuesday 00 2002 %W %U %Y 2002-01-01 00:00:00.000000 +Thursday 53 1998 %W %u %Y 1998-12-31 00:00:00.000000 +Sunday 01 2001 %W %v %x 2001-01-07 00:00:00.000000 +Tuesday 52 2001 %W %V %X 2002-01-01 00:00:00.000000 +060 2004 %j %Y 2004-02-29 00:00:00.000000 +4 53 1998 %w %u %Y 1998-12-31 00:00:00.000000 +15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00.000000 +15-01-20 %d-%m-%y 2020-01-15 00:00:00.000000 +15-2001-1 %d-%Y-%c 2001-01-15 00:00:00.000000 select date,format,concat('',str_to_date(date, format)) as con from t1; date format con -2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 2003-01-02 10:11:12 -03-01-02 8:11:2.123456 %y-%m-%d %H:%i:%S.%# 2003-01-02 08:11:02 -0003-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 0003-01-02 08:11:02 -03-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 2003-01-02 08:11:02 -2003-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 2003-01-02 22:11:12 +2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 2003-01-02 10:11:12.000000 +03-01-02 8:11:2.123456 %y-%m-%d %H:%i:%S.%# 2003-01-02 08:11:02.000000 +0003-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 0003-01-02 08:11:02.000000 +03-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 2003-01-02 08:11:02.000000 +2003-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 2003-01-02 22:11:12.000000 2003-01-02 01:11:12.12345AM %Y-%m-%d %h:%i:%S.%f%p 2003-01-02 01:11:12.123450 2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 2003-01-02 02:11:12.123450 2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 2003-01-02 00:11:12.123450 -2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12 -10:20:10 %H:%i:%s 0000-00-00 10:20:10 -10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10 -10:20:10 %T 0000-00-00 10:20:10 -10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10 -10:20:10AM %r 0000-00-00 10:20:10 +2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12.000000 +10:20:10 %H:%i:%s 0000-00-00 10:20:10.000000 +10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10.000000 +10:20:10 %T 0000-00-00 10:20:10.000000 +10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10.000000 +10:20:10AM %r 0000-00-00 10:20:10.000000 10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.440000 -15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58 -15 September 2001 %d %M %Y 2001-09-15 00:00:00 -15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00 -15 MAY 2001 %d %b %Y 2001-05-15 00:00:00 -15th May 2001 %D %b %Y 2001-05-15 00:00:00 -Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00 -Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00 -Tuesday 00 2002 %W %U %Y 2002-01-01 00:00:00 -Thursday 53 1998 %W %u %Y 1998-12-31 00:00:00 -Sunday 01 2001 %W %v %x 2001-01-07 00:00:00 -Tuesday 52 2001 %W %V %X 2002-01-01 00:00:00 -060 2004 %j %Y 2004-02-29 00:00:00 -4 53 1998 %w %u %Y 1998-12-31 00:00:00 -15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00 -15-01-20 %d-%m-%y 2020-01-15 00:00:00 -15-2001-1 %d-%Y-%c 2001-01-15 00:00:00 +15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58.000000 +15 September 2001 %d %M %Y 2001-09-15 00:00:00.000000 +15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00.000000 +15 MAY 2001 %d %b %Y 2001-05-15 00:00:00.000000 +15th May 2001 %D %b %Y 2001-05-15 00:00:00.000000 +Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00.000000 +Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00.000000 +Tuesday 00 2002 %W %U %Y 2002-01-01 00:00:00.000000 +Thursday 53 1998 %W %u %Y 1998-12-31 00:00:00.000000 +Sunday 01 2001 %W %v %x 2001-01-07 00:00:00.000000 +Tuesday 52 2001 %W %V %X 2002-01-01 00:00:00.000000 +060 2004 %j %Y 2004-02-29 00:00:00.000000 +4 53 1998 %w %u %Y 1998-12-31 00:00:00.000000 +15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00.000000 +15-01-20 %d-%m-%y 2020-01-15 00:00:00.000000 +15-2001-1 %d-%Y-%c 2001-01-15 00:00:00.000000 select date,format,cast(str_to_date(date, format) as datetime) as datetime from t1; date format datetime 2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 2003-01-02 10:11:12 @@ -352,16 +352,16 @@ insert into t1 values ('03-01-02 10:11:12 PM', '%Y-%m-%d %h:%i:%S %p'); select date,format,str_to_date(date, format) as str_to_date from t1; date format str_to_date -10:20:10AM %h:%i:%s 0000-00-00 10:20:10 -2003-01-02 10:11:12 %Y-%m-%d %h:%i:%S 2003-01-02 10:11:12 -03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 2003-01-02 22:11:12 +10:20:10AM %h:%i:%s 0000-00-00 10:20:10.000000 +2003-01-02 10:11:12 %Y-%m-%d %h:%i:%S 2003-01-02 10:11:12.000000 +03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 2003-01-02 22:11:12.000000 Warnings: Warning 1292 Truncated incorrect datetime value: '10:20:10AM' select date,format,concat(str_to_date(date, format),'') as con from t1; date format con -10:20:10AM %h:%i:%s 0000-00-00 10:20:10 -2003-01-02 10:11:12 %Y-%m-%d %h:%i:%S 2003-01-02 10:11:12 -03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 2003-01-02 22:11:12 +10:20:10AM %h:%i:%s 0000-00-00 10:20:10.000000 +2003-01-02 10:11:12 %Y-%m-%d %h:%i:%S 2003-01-02 10:11:12.000000 +03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 2003-01-02 22:11:12.000000 Warnings: Warning 1292 Truncated incorrect datetime value: '10:20:10AM' drop table t1; @@ -418,7 +418,7 @@ drop table t1; create table t1 select "02 10" as a, "%d %H" as b; select str_to_date(a,b) from t1; str_to_date(a,b) -0000-00-02 10:00:00 +0000-00-02 10:00:00.000000 create table t2 select str_to_date(a,b) from t1; describe t2; Field Type Null Key Default Extra diff --git a/mysql-test/r/default.result b/mysql-test/r/default.result index 9afffe4c3bc..ad3569e7b3d 100644 --- a/mysql-test/r/default.result +++ b/mysql-test/r/default.result @@ -220,3 +220,44 @@ NULL 10 drop table t1, t2; End of 5.0 tests. +# +# Start of 10.0 tests +# +# +# MDEV-11265 Access defied when CREATE VIIEW v1 AS SELECT DEFAULT(column) FROM t1 +# +CREATE TABLE t1 (a INT DEFAULT 10); +INSERT INTO t1 VALUES (11); +CREATE VIEW v1 AS SELECT a AS a FROM t1; +CREATE VIEW v2 AS SELECT DEFAULT(a) AS a FROM t1; +CREATE VIEW v3 AS SELECT VALUES(a) AS a FROM t1; +SELECT * FROM v1; +a +11 +SELECT * FROM v2; +a +10 +SELECT * FROM v3; +a +NULL +UPDATE v2 SET a=123; +ERROR HY000: Column 'a' is not updatable +UPDATE v3 SET a=123; +ERROR HY000: Column 'a' is not updatable +DROP VIEW v3; +DROP VIEW v2; +DROP VIEW v1; +DROP TABLE t1; +# +# MDEV-10780 Server crashes in in create_tmp_table +# +CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=MyISAM; +INSERT INTO t1 VALUES (); +INSERT INTO t1 VALUES (); +SELECT DISTINCT DEFAULT (pk) FROM t1 GROUP BY RAND() WITH ROLLUP; +DEFAULT (pk) +0 +DROP TABLE t1; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/delayed.result b/mysql-test/r/delayed.result index 0eb0661b0e2..98c8b599e88 100644 --- a/mysql-test/r/delayed.result +++ b/mysql-test/r/delayed.result @@ -379,7 +379,7 @@ SELECT * FROM t1 WHERE a=0; a # Connection con1 # Sending: -ALTER TABLE t1 COMMENT 'test'; +ALTER TABLE t1 MODIFY a INT UNSIGNED;; # Connection default # Wait until ALTER TABLE is blocked on table 't1'. INSERT DELAYED INTO t1 VALUES (3); diff --git a/mysql-test/r/delete_returning.result b/mysql-test/r/delete_returning.result new file mode 100644 index 00000000000..3a95de0cdca --- /dev/null +++ b/mysql-test/r/delete_returning.result @@ -0,0 +1,213 @@ +drop table if exists t1,t2; +drop view if exists v1; +drop procedure if exists p1; +CREATE TABLE t1 (a int, b varchar(32)); +INSERT INTO t1 VALUES +(7,'ggggggg'), (1,'a'), (3,'ccc'), +(4,'dddd'), (1,'A'), (2,'BB'), (4,'DDDD'), +(5,'EEEEE'), (7,'GGGGGGG'), (2,'bb'); +CREATE TABLE t1c SELECT * FROM t1; +CREATE TABLE t2 (c int); +INSERT INTO t2 VALUES +(4), (5), (7), (1); +CREATE TABLE t2c SELECT * FROM t2; +CREATE VIEW v1 AS SELECT a, UPPER(b) FROM t1; +DELETE FROM t1 WHERE a=2 RETURNING * ; +a b +2 BB +2 bb +SELECT * FROM t1; +a b +7 ggggggg +1 a +3 ccc +4 dddd +1 A +4 DDDD +5 EEEEE +7 GGGGGGG +INSERT INTO t1 VALUES (2,'BB'), (2,'bb'); +DELETE FROM t1 WHERE a=2 RETURNING b; +b +bb +BB +SELECT * FROM t1; +a b +7 ggggggg +1 a +3 ccc +4 dddd +1 A +4 DDDD +5 EEEEE +7 GGGGGGG +DELETE FROM t1 WHERE a=2 RETURNING c; +ERROR 42S22: Unknown column 'c' in 'field list' +INSERT INTO t1 VALUES (2,'BB'), (2,'bb'); +DELETE FROM t1 WHERE a=2 RETURNING a, UPPER(b); +a UPPER(b) +2 BB +2 BB +SELECT * FROM t1; +a b +7 ggggggg +1 a +3 ccc +4 dddd +1 A +4 DDDD +5 EEEEE +7 GGGGGGG +INSERT INTO t1 VALUES (2,'BB'), (2,'bb'); +DELETE FROM t1 WHERE a=6 RETURNING b; +b +SELECT * FROM t1; +a b +7 ggggggg +1 a +3 ccc +4 dddd +1 A +2 bb +4 DDDD +5 EEEEE +7 GGGGGGG +2 BB +DELETE FROM t1 WHERE a=2 RETURNING MAX(b); +ERROR HY000: Invalid use of group function +DELETE FROM t1 WHERE a < 5 RETURNING a, (SELECT MIN(c) FROM t2 WHERE c=a+1); +a (SELECT MIN(c) FROM t2 WHERE c=a+1) +1 NULL +3 4 +4 5 +1 NULL +2 NULL +4 5 +2 NULL +SELECT * FROM t1; +a b +7 ggggggg +5 EEEEE +7 GGGGGGG +DELETE FROM t1; +INSERT INTO t1 SELECT * FROM t1c; +DELETE FROM t2 WHERE c < 5 +RETURNING (SELECT GROUP_CONCAT(b) FROM t1 GROUP BY a HAVING a=c); +(SELECT GROUP_CONCAT(b) FROM t1 GROUP BY a HAVING a=c) +dddd,DDDD +a,A +SELECT * FROM t2; +c +5 +7 +DELETE FROM t2; +INSERT INTO t2 SELECT * FROM t2c; +CREATE FUNCTION f(arg INT) RETURNS TEXT +BEGIN +RETURN (SELECT GROUP_CONCAT(b) FROM t1 WHERE a=arg); +END| +DELETE FROM t2 WHERE c < 5 RETURNING f(c); +f(c) +dddd,DDDD +a,A +SELECT * FROM t2; +c +5 +7 +DELETE FROM t2; +INSERT INTO t2 SELECT * FROM t2c; +DROP FUNCTION f; +DELETE FROM v1 WHERE a < 5 RETURNING * ; +a UPPER(b) +1 A +3 CCC +4 DDDD +1 A +2 BB +4 DDDD +2 BB +SELECT * FROM t1; +a b +7 ggggggg +5 EEEEE +7 GGGGGGG +DELETE FROM t1; +INSERT INTO t1 SELECT * FROM t1c; +CREATE VIEW v11(a,c) AS SELECT a, COUNT(b) FROM t1 GROUP BY a; +DELETE FROM v11 WHERE a < 5 RETURNING * ; +ERROR HY000: The target table v11 of the DELETE is not updatable +DROP VIEW v11; +PREPARE stmt FROM +"DELETE FROM t1 WHERE a=2 ORDER BY b LIMIT 1 RETURNING a, UPPER(b)"; +EXECUTE stmt; +a UPPER(b) +2 BB +SELECT * FROM t1; +a b +7 ggggggg +1 a +3 ccc +4 dddd +1 A +4 DDDD +5 EEEEE +7 GGGGGGG +2 bb +EXECUTE stmt; +a UPPER(b) +2 BB +SELECT * FROM t1; +a b +7 ggggggg +1 a +3 ccc +4 dddd +1 A +4 DDDD +5 EEEEE +7 GGGGGGG +DEALLOCATE PREPARE stmt; +DROP VIEW v1; +DROP TABLE t1,t2; +DROP TABLE t1c,t2c; +# +# Bug mdev-4918: DELETE ... RETURNING subquery with more than 1 row +# +CREATE TABLE t1 (i1 int); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (i2 int); +INSERT INTO t2 VALUES (1),(2); +DELETE FROM t1 ORDER BY i1 RETURNING ( SELECT i2 FROM t2 ); +ERROR 21000: Subquery returns more than 1 row +DROP TABLE t1,t2; +# +# MDEV-4919: Packets out of order on a SELECT after calling a procedure with DELETE .. RETURNING +# +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (1),(2); +CREATE PROCEDURE p1 (a INT) +BEGIN +DELETE FROM t1 WHERE i = a RETURNING *; +INSERT INTO t1 VALUES (a); +END | +CALL p1(1); +i +1 +SELECT * FROM t1; +i +1 +2 +DROP PROCEDURE p1; +DROP TABLE t1; +# +# MDEV-13776: DELETE ... RETURNING with sql_mode='ONLY_FULL_GROUP_BY' +# +set @sql_mode_save= @@sql_mode; +set sql_mode='ONLY_FULL_GROUP_BY'; +CREATE TABLE t1 (id INT); +INSERT INTO t1 VALUE(1),(2),(3); +DELETE FROM t1 WHERE id > 2 RETURNING *; +id +3 +set sql_mode=@sql_mode_save; +DROP TABLE t1; diff --git a/mysql-test/r/delete_returning_grant.result b/mysql-test/r/delete_returning_grant.result new file mode 100644 index 00000000000..c15d3627a39 --- /dev/null +++ b/mysql-test/r/delete_returning_grant.result @@ -0,0 +1,69 @@ +CREATE TABLE t1 (a int(11), b varchar(32)); +INSERT INTO t1 VALUES (7,'ggggggg'),(1,'a'),(3,'ccc'),(4,'dddd'),(1,'A'), +(2,'BB'),(4,'DDDD'),(5,'EEEEE'),(7,'GGGGGGG'),(2,'bb'); +CREATE VIEW v1 AS SELECT a, UPPER(b) FROM t1; +CREATE DATABASE mysqltest; +CREATE TABLE mysqltest.t1 SELECT * FROM t1; +GRANT DELETE ON mysqltest.* TO mysqltest_1@localhost; +GRANT SELECT(b) ON mysqltest.t1 TO mysqltest_1@localhost; +DELETE FROM mysqltest.t1 WHERE a=2 RETURNING b; +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'a' in table 't1' +DELETE FROM mysqltest.t1 RETURNING b; +b +ggggggg +a +ccc +dddd +A +BB +DDDD +EEEEE +GGGGGGG +bb +SELECT * FROM mysqltest.t1; +a b +INSERT INTO mysqltest.t1 SELECT * FROM t1; +GRANT SELECT(a) ON mysqltest.t1 TO mysqltest_1@localhost; +DELETE FROM mysqltest.t1 WHERE a=2 RETURNING b; +b +bb +BB +SELECT * FROM mysqltest.t1; +a b +7 GGGGGGG +5 EEEEE +4 DDDD +1 A +4 dddd +3 ccc +1 a +7 ggggggg +INSERT INTO mysqltest.t1 SELECT * FROM t1; +CREATE VIEW mysqltest.v1(a) AS SELECT a FROM mysqltest.t1; +GRANT SELECT, INSERT ON mysqltest.t1 TO mysqltest_1@localhost; +DELETE FROM mysqltest.v1; +SELECT * FROM mysqltest.t1; +a b +INSERT INTO mysqltest.t1 SELECT * FROM t1; +DELETE FROM mysqltest.v1 RETURNING a; +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'a' in table 'v1' +GRANT SELECT ON mysqltest.* TO mysqltest_1@localhost; +DELETE FROM mysqltest.v1 RETURNING a; +a +7 +1 +3 +4 +1 +2 +4 +5 +7 +2 +SELECT * FROM mysqltest.t1; +a b +INSERT INTO mysqltest.t1 SELECT * FROM t1; +DROP DATABASE mysqltest; +DROP USER mysqltest_1@localhost; +DROP VIEW v1; +DROP TABLE t1; diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 33af7c61613..ce94fe49f5c 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -567,7 +567,31 @@ insert into t1 (accountId,balance) values update t1 set balance=(select sum(balance) from (SELECT balance FROM t1 where accountId like 'dealer%') AS copied) where accountId = 'OPERATOR'; set optimizer_switch=@save_derived_optimizer_switch_bug; drop table t1; -set optimizer_switch=@save_derived_optimizer_switch; +# +# MDEV-6219:Server crashes in Bitmap<64u>::merge +# (this=0x180, map2=...) on 2nd execution of PS with INSERT .. SELECT, +# derived_merge +# +CREATE TABLE t1 (a VARCHAR(8)) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('foo'),('bar'); +create procedure p1() +INSERT INTO t1 SELECT * FROM ( +SELECT * FROM t1 +) AS sq +WHERE sq.a IN ( SELECT 'baz' FROM DUAL ); +call p1(); +call p1(); +drop procedure p1; +PREPARE stmt FROM " + INSERT INTO t1 SELECT * FROM ( + SELECT * FROM t1 + ) AS sq + WHERE sq.a IN ( SELECT 'baz' FROM DUAL ) +"; +EXECUTE stmt; +EXECUTE stmt; +deallocate prepare stmt; +drop table t1; # # MDEV-6892: WHERE does not apply # @@ -597,12 +621,13 @@ SELECT f3 FROM t2 HAVING f3 >= 8 ) ); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 1 100.00 -1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 4 test.t1.f2 1 100.00 +1 PRIMARY <derived2> system NULL NULL NULL NULL 1 100.00 +1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 4 sq.f2 1 100.00 1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where; FirstMatch(<subquery4>); Using join buffer (flat, BNL join) 4 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 100.00 +2 DERIVED t1 system NULL NULL NULL NULL 1 100.00 Warnings: -Note 1276 Field or reference 'f2' of SELECT #3 was resolved in SELECT #1 +Note 1276 Field or reference 'sq.f2' of SELECT #3 was resolved in SELECT #1 Note 1003 select 6 AS `f1` from <materialize> (select `test`.`t2`.`f3` from `test`.`t2` having (`test`.`t2`.`f3` >= 8)) semi join (`test`.`t2`) where ((`test`.`t2`.`f3` = 6) and (9 = `<subquery4>`.`f3`)) DROP TABLE t2,t1; # @@ -924,6 +949,7 @@ id select_type table type possible_keys key key_len ref rows Extra 3 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table DROP TABLES t1,t2; +set optimizer_switch=@save_derived_optimizer_switch; # # MDEV-10663: Use of Inline table columns in HAVING clause # throws 1463 Error diff --git a/mysql-test/r/derived_opt.result b/mysql-test/r/derived_opt.result index dc9b5910af1..04a76c2cbc8 100644 --- a/mysql-test/r/derived_opt.result +++ b/mysql-test/r/derived_opt.result @@ -110,8 +110,8 @@ count(*) 2 explain select count(*) from t1 INNER JOIN (SELECT A.E1, A.E2, A.E3 FROM t1 AS A WHERE A.E3 = (SELECT MAX(B.E3) FROM t1 AS B WHERE A.E2 = B.E2)) AS THEMAX ON t1.E1 = THEMAX.E2 AND t1.E1 = t1.E2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE A ALL NULL NULL NULL NULL 2 Using where -1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.A.E2 1 Using where +1 PRIMARY A ALL NULL NULL NULL NULL 2 Using where +1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.A.E2 1 Using where 3 DEPENDENT SUBQUERY B ALL NULL NULL NULL NULL 2 Using where drop table t1; create table t1 (a int); diff --git a/mysql-test/r/derived_view.result b/mysql-test/r/derived_view.result index f7062473a3f..8346f7afb40 100644 --- a/mysql-test/r/derived_view.result +++ b/mysql-test/r/derived_view.result @@ -79,6 +79,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -93,6 +94,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 12 @@ -166,6 +168,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -180,6 +183,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 12 @@ -232,6 +236,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -248,6 +253,7 @@ Handler_read_key 11 Handler_read_last 0 Handler_read_next 3 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 11 Handler_read_rnd_deleted 0 Handler_read_rnd_next 36 @@ -323,6 +329,7 @@ Handler_read_key 22 Handler_read_last 0 Handler_read_next 22 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 60 @@ -340,6 +347,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -356,6 +364,7 @@ Handler_read_key 11 Handler_read_last 0 Handler_read_next 3 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 11 Handler_read_rnd_deleted 0 Handler_read_rnd_next 36 @@ -386,7 +395,7 @@ materialized derived in merged derived explain extended select * from (select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) zz; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE <derived3> ALL NULL NULL NULL NULL 11 100.00 Using where +1 PRIMARY <derived3> ALL NULL NULL NULL NULL 11 100.00 Using where 3 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort Warnings: Note 1003 select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where (`test`.`t1`.`f1` < 7) group by `test`.`t1`.`f1`) `tt` where (`tt`.`f1` > 2) @@ -429,8 +438,8 @@ join (select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) z on x.f1 = z.f1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE <derived3> ALL NULL NULL NULL NULL 11 100.00 Using where -1 SIMPLE <derived5> ref key0 key0 5 tt.f1 2 100.00 +1 PRIMARY <derived3> ALL NULL NULL NULL NULL 11 100.00 Using where +1 PRIMARY <derived5> ref key0 key0 5 tt.f1 2 100.00 5 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort 3 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort Warnings: @@ -451,6 +460,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 2 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 8 Handler_read_rnd_deleted 0 Handler_read_rnd_next 39 @@ -522,7 +532,7 @@ materialized view in merged derived explain extended select * from ( select * from v1 where f1 < 7) tt; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE <derived3> ALL NULL NULL NULL NULL 11 100.00 Using where +1 PRIMARY <derived3> ALL NULL NULL NULL NULL 11 100.00 Using where 3 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using temporary; Using filesort Warnings: Note 1003 select `v1`.`f1` AS `f1`,`v1`.`f11` AS `f11` from `test`.`v1` where (`v1`.`f1` < 7) @@ -568,8 +578,8 @@ f1 f11 join of above two explain extended select * from v6 join v7 on f2=f1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 11 100.00 Using where -1 SIMPLE <derived5> ref key0 key0 5 test.t2.f2 2 100.00 +1 PRIMARY t2 ALL NULL NULL NULL NULL 11 100.00 Using where +1 PRIMARY <derived5> ref key0 key0 5 test.t2.f2 2 100.00 5 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using temporary; Using filesort Warnings: Note 1003 select `test`.`t2`.`f2` AS `f2`,`test`.`t2`.`f22` AS `f22`,`v1`.`f1` AS `f1`,`v1`.`f11` AS `f11` from `test`.`t2` join `test`.`v1` where ((`v1`.`f1` = `test`.`t2`.`f2`) and (`test`.`t2`.`f2` < 7) and (`test`.`t2`.`f2` in (2,3))) @@ -1220,7 +1230,7 @@ Note 1003 select `test`.`t1`.`b` AS `b` from `test`.`t1` where 0 EXPLAIN EXTENDED SELECT * FROM (SELECT b FROM v2 WHERE b = 0) t WHERE b; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 3 DERIVED t1 ALL NULL NULL NULL NULL 5 100.00 Using temporary; Using filesort Warnings: Note 1003 select `v2`.`b` AS `b` from `test`.`v2` where 0 @@ -1288,7 +1298,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: Note 1276 Field or reference 't.a' of SELECT #3 was resolved in SELECT #1 -Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where <expr_cache><`test`.`t1`.`a`>(exists(select 28 from `test`.`t3` where ('j' < `test`.`t1`.`a`))) +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where <in_optimizer>(1,<expr_cache><`test`.`t1`.`a`>(exists(select 28 from `test`.`t3` where ('j' < `test`.`t1`.`a`)))) SELECT * FROM (SELECT * FROM t1) AS t WHERE EXISTS (SELECT t2.a FROM t3 RIGHT JOIN t2 ON (t3.a = t2.a) WHERE t2.b < t.a); @@ -1468,14 +1478,14 @@ WHERE (t2.a ,t1.b) NOT IN (SELECT DISTINCT c,a FROM t3 t); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) -2 DEPENDENT SUBQUERY t eq_ref PRIMARY,c PRIMARY 4 func 1 Using where +2 DEPENDENT SUBQUERY t unique_subquery PRIMARY,c PRIMARY 4 func 1 Using where EXPLAIN SELECT * FROM t1 , t2 WHERE (t2.a ,t1.b) NOT IN (SELECT DISTINCT c,a FROM (SELECT * FROM t3) t); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) -2 DEPENDENT SUBQUERY t3 eq_ref PRIMARY,c PRIMARY 4 func 1 Using where +2 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,c PRIMARY 4 func 1 Using where SELECT * FROM t1 , t2 WHERE (t2.a ,t1.b) NOT IN (SELECT DISTINCT c,a FROM (SELECT * FROM t3) t); b a @@ -2360,8 +2370,8 @@ ON p.id = g.p_random ORDER BY gallery_name ASC ; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE <derived2> ALL NULL NULL NULL NULL 2 Using filesort -1 SIMPLE p eq_ref PRIMARY PRIMARY 4 g.p_random 1 Using where +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using filesort +1 PRIMARY p eq_ref PRIMARY PRIMARY 4 g.p_random 1 Using where 2 DERIVED gal ALL NULL NULL NULL NULL 10 3 DEPENDENT SUBQUERY pi ref gallery_id gallery_id 4 test.gal.id 4 Using temporary; Using filesort drop table galleries, pictures; @@ -2555,6 +2565,7 @@ Handler_read_key 21 Handler_read_last 0 Handler_read_next 6 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 6 Handler_read_rnd_deleted 0 Handler_read_rnd_next 27 @@ -2574,6 +2585,7 @@ Handler_read_key 21 Handler_read_last 0 Handler_read_next 6 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 6 Handler_read_rnd_deleted 0 Handler_read_rnd_next 27 @@ -2608,13 +2620,13 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ref idx idx 5 test.t1.a 140 Using index; FirstMatch(t1) explain select * from (select a from t1 where a in (select b from t2)) t; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where -1 SIMPLE t2 ref idx idx 5 test.t1.a 140 Using index; FirstMatch(t1) +1 PRIMARY t1 ALL NULL NULL NULL NULL 7 Using where +1 PRIMARY t2 ref idx idx 5 test.t1.a 140 Using index; FirstMatch(t1) create view v1 as select a from t1 where a in (select b from t2); explain select * from v1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where -1 SIMPLE t2 ref idx idx 5 test.t1.a 140 Using index; FirstMatch(t1) +1 PRIMARY t1 ALL NULL NULL NULL NULL 7 Using where +1 PRIMARY t2 ref idx idx 5 test.t1.a 140 Using index; FirstMatch(t1) drop view v1; drop table t1,t2; # @@ -2633,7 +2645,7 @@ foo EXPLAIN EXTENDED SELECT STRAIGHT_JOIN * FROM ( SELECT * FROM t1 WHERE c1 IN ( SELECT c2 FROM t2 ) ) AS sq; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where 3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00 Using where Warnings: Note 1003 select straight_join `test`.`t1`.`c1` AS `c1` from `test`.`t1` where <in_optimizer>(`test`.`t1`.`c1`,<exists>(select `test`.`t2`.`c2` from `test`.`t2` where (<cache>(`test`.`t1`.`c1`) = `test`.`t2`.`c2`))) diff --git a/mysql-test/r/disabled_partition.require b/mysql-test/r/disabled_partition.require deleted file mode 100644 index a21c259447a..00000000000 --- a/mysql-test/r/disabled_partition.require +++ /dev/null @@ -1,2 +0,0 @@ -Variable_name Value -have_partitioning DISABLED diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index a91e960471b..bd7deee43e9 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -756,7 +756,7 @@ INSERT INTO t1(a, b, c) VALUES (1, 1, 1), (1, 2, 3); EXPLAIN SELECT DISTINCT a, b, d, c FROM t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range NULL PRIMARY 16 NULL 7 Using index for group-by; Using temporary +1 SIMPLE t1 index NULL a 16 NULL 6 Using index SELECT DISTINCT a, b, d, c FROM t1; a b d c 1 1 0 1 diff --git a/mysql-test/r/drop.result b/mysql-test/r/drop.result index db3aa770499..c25ae9e3055 100644 --- a/mysql-test/r/drop.result +++ b/mysql-test/r/drop.result @@ -1,8 +1,9 @@ +call mtr.add_suppression("table or database name 'abc`def'"); drop table if exists t1; drop database if exists mysqltest; drop database if exists client_test_db; drop table t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' create table t1(n int); insert into t1 values(1); create temporary table t1( n int); @@ -30,13 +31,13 @@ table7, table8, table9, table10, table11, table12, table13, table14, table15, table16, table17, table18, table19, table20, table21, table22, table23, table24, table25, table26, table27, table28; -ERROR 42S02: Unknown table 'table1,table2,table3,table4,table5,table6,table7,table8,table9,table10,table11,table12,table13,table' +ERROR 42S02: Unknown table 'mysqltest.table1,mysqltest.table2,mysqltest.table3,mysqltest.table4,mysqltest.table5,mysqltest.table' drop table table1, table2, table3, table4, table5, table6, table7, table8, table9, table10, table11, table12, table13, table14, table15, table16, table17, table18, table19, table20, table21, table22, table23, table24, table25, table26, table27, table28, table29, table30; -ERROR 42S02: Unknown table 'table1,table2,table3,table4,table5,table6,table7,table8,table9,table10,table11,table12,table13,table' +ERROR 42S02: Unknown table 'mysqltest.table1,mysqltest.table2,mysqltest.table3,mysqltest.table4,mysqltest.table5,mysqltest.table' use test; drop database mysqltest; flush tables with read lock; @@ -142,9 +143,9 @@ create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ERROR 42000: Incorrect table name '#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa12345' show tables; Tables_in_mysqltestbug26703 +#mysql50#abc`def aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1234 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -#mysql50#abc`def use test; drop database mysqltestbug26703; End of 5.1 tests @@ -154,10 +155,10 @@ End of 5.1 tests # -- DROP TABLE IF EXISTS t1; DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW WARNINGS; Level Code Message -Error 1051 Unknown table 't1' +Error 1051 Unknown table 'test.t1' # -- # -- End of Bug#37431. @@ -172,3 +173,45 @@ DROP TABLE t1, t1; ERROR 42000: Not unique table/alias: 't1' UNLOCK TABLES; DROP TABLE t1; +# +# BUG#34750: Print database name in Unknown Table error message +# + +# Test error message when droping table/view +DROP TABLE table1; +ERROR 42S02: Unknown table 'test.table1' +DROP TABLE table1,table2; +ERROR 42S02: Unknown table 'test.table1,test.table2' +DROP VIEW view1,view2,view3,view4; +ERROR 42S02: Unknown table 'test.view1,test.view2,test.view3,test.view4' + +DROP TABLE IF EXISTS table1; +Warnings: +Note 1051 Unknown table 'test.table1' +DROP TABLE IF EXISTS table1,table2; +Warnings: +Note 1051 Unknown table 'test.table1' +Note 1051 Unknown table 'test.table2' +DROP VIEW IF EXISTS view1,view2,view3,view4; +Warnings: +Note 1051 Unknown table 'test.view1' +Note 1051 Unknown table 'test.view2' +Note 1051 Unknown table 'test.view3' +Note 1051 Unknown table 'test.view4' + +# Test error message when trigger does not find table +CREATE TABLE table1(a int); +CREATE TABLE table2(b int); +CREATE TRIGGER trg1 AFTER INSERT ON table1 +FOR EACH ROW +INSERT INTO table2 SELECT t.notable.*; +INSERT INTO table1 VALUES (1); +ERROR 42S02: Unknown table 't.notable' +DROP TABLE table1,table2; +# End BUG#34750 +# +# MDEV-11105 Table named 'db' has weird side effect. +# +CREATE DATABASE mysqltest; +CREATE TABLE mysqltest.db(id INT); +DROP DATABASE mysqltest; diff --git a/mysql-test/r/dyncol.result b/mysql-test/r/dyncol.result index ca6908f449c..b0d28a81043 100644 --- a/mysql-test/r/dyncol.result +++ b/mysql-test/r/dyncol.result @@ -6,16 +6,16 @@ hex(COLUMN_CREATE(1, NULL AS char character set utf8)) 000000 select hex(COLUMN_CREATE(1, "afaf" AS char character set utf8)); hex(COLUMN_CREATE(1, "afaf" AS char character set utf8)) -0001000100030861666166 +0001000100032161666166 select hex(COLUMN_CREATE(1, 1212 AS char character set utf8)); hex(COLUMN_CREATE(1, 1212 AS char character set utf8)) -0001000100030831323132 +0001000100032131323132 select hex(COLUMN_CREATE(1, 12.12 AS char character set utf8)); hex(COLUMN_CREATE(1, 12.12 AS char character set utf8)) -0001000100030831322E3132 +0001000100032131322E3132 select hex(COLUMN_CREATE(1, 99999999999999999999999999999 AS char character set utf8)); hex(COLUMN_CREATE(1, 99999999999999999999999999999 AS char character set utf8)) -000100010003083939393939393939393939393939393939393939393939393939393939 +000100010003213939393939393939393939393939393939393939393939393939393939 select hex(COLUMN_CREATE(1, NULL AS unsigned int)); hex(COLUMN_CREATE(1, NULL AS unsigned int)) 000000 @@ -144,7 +144,7 @@ hex(COLUMN_CREATE(1, "afaf" AS char character set utf8, 6, "2011-04-05" AS date, 7, "- 0:45:49.000001" AS time, 8, "2011-04-05 0:45:49.000001" AS datetime)) -01080001000300020029000300380004004A0005008C000600AE000700C7000800F5000861666166BC0478093D0AD7A3703D284002028C0C85B60F010010B7000485B60F010010B70000 +01080001000300020029000300380004004A0005008C000600AE000700C7000800F5002161666166BC0478093D0AD7A3703D284002028C0C85B60F010010B7000485B60F010010B70000 explain extended select hex(COLUMN_CREATE(1, "afaf" AS char character set utf8, 2, 1212 AS unsigned int, @@ -562,7 +562,7 @@ select column_get(column_create(1, "2011-04-05 8:46:06.12345678" AS datetime(6)) column_get(column_create(1, "2011-04-05 8:46:06.12345678" AS datetime(6)), 1 as decimal(32,8)) 20110405084606.12345600 Warnings: -Warning 1292 Truncated incorrect datetime value: '2011-04-05 8:46:06.12345678' +Note 1292 Truncated incorrect datetime value: '2011-04-05 8:46:06.12345678' select column_get(column_create(1, NULL as decimal), 1 as decimal(32,10)); column_get(column_create(1, NULL as decimal), 1 as decimal(32,10)) NULL @@ -697,14 +697,14 @@ column_get(column_create(1, 0), 1 as datetime) select column_get(column_create(1, "2001021"), 1 as datetime); column_get(column_create(1, "2001021"), 1 as datetime) 2020-01-02 01:00:00 +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); select column_get(column_create(1, "8:46:06.23434" AS time), 1 as datetime); column_get(column_create(1, "8:46:06.23434" AS time), 1 as datetime) -0000-00-00 08:46:06 +2001-02-03 08:46:06 select column_get(column_create(1, "-808:46:06.23434" AS time), 1 as datetime); column_get(column_create(1, "-808:46:06.23434" AS time), 1 as datetime) -NULL -Warnings: -Warning 1292 Truncated incorrect datetime value: '-808:46:06' +2000-12-31 07:13:53 +SET timestamp=DEFAULT; set @@sql_mode="allow_invalid_dates"; select column_get(column_create(1, "2011-02-30 18:46:06.23434" AS CHAR), 1 as datetime); column_get(column_create(1, "2011-02-30 18:46:06.23434" AS CHAR), 1 as datetime) @@ -1036,9 +1036,7 @@ Warnings: Warning 1292 Truncated incorrect time value: '2011-13-01 8:46:06.23434' select column_get(column_create(1, "2011-02-30 8:46:06.23434" AS CHAR), 1 as time); column_get(column_create(1, "2011-02-30 8:46:06.23434" AS CHAR), 1 as time) -NULL -Warnings: -Warning 1292 Truncated incorrect time value: '2011-02-30 8:46:06.23434' +08:46:06 select column_get(column_create(1, "2001-02-03"), 1 as time); column_get(column_create(1, "2001-02-03"), 1 as time) 00:20:01 @@ -1088,7 +1086,7 @@ column_list(column_add(column_create(1, 1), 1, null)) select column_list(column_add(column_create(1, 1), 1, "")); column_list(column_add(column_create(1, 1), 1, "")) -1 +`1` select hex(column_add("", 1, 1)); hex(column_add("", 1, 1)) 00010001000002 @@ -1133,10 +1131,10 @@ column_exists(column_create(1, 1212 as integer, 2, 1212 as integer), 4) # column list select column_list(column_create(1, 1212 as integer, 2, 1212 as integer)); column_list(column_create(1, 1212 as integer, 2, 1212 as integer)) -1,2 +`1`,`2` select column_list(column_create(1, 1212 as integer)); column_list(column_create(1, 1212 as integer)) -1 +`1` select column_list(column_create(1, NULL as integer)); column_list(column_create(1, NULL as integer)) @@ -1218,35 +1216,35 @@ sum(column_get(str, 1 as int)) 11 select id, column_list(str) from t1 where id= 5; id column_list(str) -5 1,2,3,10 +5 `1`,`2`,`3`,`10` update t1 set str=column_delete(str, 3, 4, 2) where id= 5; select id, length(str), column_list(str), column_get(str, 1 as int), column_get(str, 2 as char), column_get(str, 3 as int) from t1; id length(str) column_list(str) column_get(str, 1 as int) column_get(str, 2 as char) column_get(str, 3 as int) -1 12 1,2 1 a NULL -2 12 1,2 2 a NULL -3 12 2,3 NULL c 100 -4 16 1,2,3 5 c 100 -5 15 1,10 6 NULL NULL -6 21 2,3,10 NULL c 100 +1 12 `1`,`2` 1 a NULL +2 12 `1`,`2` 2 a NULL +3 12 `2`,`3` NULL c 100 +4 16 `1`,`2`,`3` 5 c 100 +5 15 `1`,`10` 6 NULL NULL +6 21 `2`,`3`,`10` NULL c 100 update t1 set str=column_add(str, 4, 45 as char, 2, 'c') where id= 5; select id, length(str), column_list(str), column_get(str, 1 as int), column_get(str, 2 as char), column_get(str, 3 as int) from t1 where id = 5; id length(str) column_list(str) column_get(str, 1 as int) column_get(str, 2 as char) column_get(str, 3 as int) -5 26 1,2,4,10 6 c NULL +5 26 `1`,`2`,`4`,`10` 6 c NULL select id, length(str), column_list(str), column_exists(str, 4) from t1; id length(str) column_list(str) column_exists(str, 4) -1 12 1,2 0 -2 12 1,2 0 -3 12 2,3 0 -4 16 1,2,3 0 -5 26 1,2,4,10 1 -6 21 2,3,10 0 +1 12 `1`,`2` 0 +2 12 `1`,`2` 0 +3 12 `2`,`3` 0 +4 16 `1`,`2`,`3` 0 +5 26 `1`,`2`,`4`,`10` 1 +6 21 `2`,`3`,`10` 0 select sum(column_get(str, 1 as int)), column_list(str) from t1 group by 2; sum(column_get(str, 1 as int)) column_list(str) -3 1,2 -5 1,2,3 -6 1,2,4,10 -NULL 2,3 -NULL 2,3,10 +3 `1`,`2` +5 `1`,`2`,`3` +6 `1`,`2`,`4`,`10` +NULL `2`,`3` +NULL `2`,`3`,`10` select id, hex(str) from t1; id hex(str) 1 00020001000002000B020861 @@ -1282,11 +1280,11 @@ id 5 select id, column_list(str), length(str) from t1 where id=5; id column_list(str) length(str) -5 1,2,4,5,10 100048 +5 `1`,`2`,`4`,`5`,`10` 100048 update t1 set str=column_delete(str, 5) where id=5; select id, column_list(str), length(str) from t1 where id=5; id column_list(str) length(str) -5 1,2,4,10 34 +5 `1`,`2`,`4`,`10` 34 drop table t1; # # LP#778905: Assertion `value->year <= 9999' failed in @@ -1306,7 +1304,7 @@ INSERT INTO t1 SET f1 = COLUMN_CREATE( 2 , 'cde' ); SELECT HEX(COLUMN_ADD(f1, 1, 'abc')), COLUMN_LIST(f1) FROM t1; HEX(COLUMN_ADD(f1, 1, 'abc')) COLUMN_LIST(f1) NULL NULL -0002000100030200230861626308636465 2 +0002000100030200230861626308636465 `2` SELECT COLUMN_ADD(f1, 1, 'abc'), COLUMN_LIST(f1) FROM t1; DROP TABLE t1; # @@ -1413,6 +1411,13 @@ Warnings: Warning 1265 Data truncated for column 'dyn' at row 1 SELECT COLUMN_ADD( dyn, 6, REPEAT('x',80), 4, REPEAT('y',215) AS INTEGER ) FROM t1; ERROR HY000: Encountered illegal format of dynamic column string +delete from t1; +#above test with 10.0 format +INSERT INTO t1 SET dyn = COLUMN_CREATE( 'a', REPEAT('a', 250), 'b', REPEAT('b', 322) ); +Warnings: +Warning 1265 Data truncated for column 'dyn' at row 1 +SELECT COLUMN_ADD( dyn, 'c', REPEAT('x',80), 'b', REPEAT('y',215) AS INTEGER ) FROM t1; +ERROR HY000: Encountered illegal format of dynamic column string DROP table t1; # # MDEV-4812: Valgrind warnings (Invalid write) in @@ -1423,6 +1428,11 @@ INSERT INTO t1 SET dyncol = COLUMN_CREATE( 7, REPEAT('k',487), 209, REPEAT('x',4 Warnings: Warning 1265 Data truncated for column 'dyncol' at row 1 SELECT COLUMN_ADD( dyncol, 7, '22:22:22', 8, REPEAT('x',270) AS CHAR ) FROM t1; +delete from t1; +INSERT INTO t1 SET dyncol = COLUMN_CREATE( 'a', REPEAT('k',487), 'b', REPEAT('x',464) ); +Warnings: +Warning 1265 Data truncated for column 'dyncol' at row 1 +SELECT COLUMN_ADD( dyncol, 'a', '22:22:22', 'c', REPEAT('x',270) AS CHAR ) FROM t1; DROP table t1; # # MDEV-4858 Wrong results for a huge unsigned value inserted into a TIME column @@ -1450,3 +1460,418 @@ Note 1105 Cast to signed converted positive out-of-range integer to it's negativ # SELECT COLUMN_GET(`x`, 'y' AS DECIMAL(5,34)); ERROR 42000: Too big scale 34 specified for ''y''. Maximum is 30. +# +# test of symbolic names +# +# creation test (names) +set names utf8; +select hex(column_create("адын", 1212)); +hex(column_create("адын", 1212)) +040100080000000000D0B0D0B4D18BD0BD7809 +select hex(column_create("1212", 1212)); +hex(column_create("1212", 1212)) +040100040000000000313231327809 +select hex(column_create(1212, 2, "www", 3)); +hex(column_create(1212, 2, "www", 3)) +04020007000000000003001000777777313231320604 +select hex(column_create("1212", 2, "www", 3)); +hex(column_create("1212", 2, "www", 3)) +04020007000000000003001000777777313231320604 +select hex(column_create("1212", 2, 3, 3)); +hex(column_create("1212", 2, 3, 3)) +0402000500000000000100100033313231320604 +select hex(column_create("1212", 2, "адын", 1, 3, 3)); +hex(column_create("1212", 2, "адын", 1, 3, 3)) +0403000D000000000001001000050020003331323132D0B0D0B4D18BD0BD060402 +set names default; +# fetching column test (names) +set names utf8; +select column_get(column_create("адын", 1212), "адын" as int); +column_get(column_create("адын", 1212), "адын" as int) +1212 +select column_get(column_create("1212", 2, "адын", 1, 3, 3), "адын" as int); +column_get(column_create("1212", 2, "адын", 1, 3, 3), "адын" as int) +1 +select column_get(column_create("1212", 2, "адын", 1, 3, 3), 1212 as int); +column_get(column_create("1212", 2, "адын", 1, 3, 3), 1212 as int) +2 +select column_get(column_create("1212", 2, "адын", 1, 3, 3), "3" as int); +column_get(column_create("1212", 2, "адын", 1, 3, 3), "3" as int) +3 +select column_get(column_create("1212", 2, "адын", 1, 3, 3), 3 as int); +column_get(column_create("1212", 2, "адын", 1, 3, 3), 3 as int) +3 +select column_get(column_create("1212", 2, "адын", 1, 3, 3), 4 as int); +column_get(column_create("1212", 2, "адын", 1, 3, 3), 4 as int) +NULL +select column_get(column_create("1212", 2, "адын", 1, 3, 3), "4" as int); +column_get(column_create("1212", 2, "адын", 1, 3, 3), "4" as int) +NULL +set names default; +# column existance test (names) +set names utf8; +select column_exists(column_create("адын", 1212), "адын"); +column_exists(column_create("адын", 1212), "адын") +1 +select column_exists(column_create("адын", 1212), "aады"); +column_exists(column_create("адын", 1212), "aады") +0 +select column_exists(column_create("1212", 2, "адын", 1, 3, 3), "адын"); +column_exists(column_create("1212", 2, "адын", 1, 3, 3), "адын") +1 +select column_exists(column_create("1212", 2, "адын", 1, 3, 3), 1212); +column_exists(column_create("1212", 2, "адын", 1, 3, 3), 1212) +1 +select column_exists(column_create("1212", 2, "адын", 1, 3, 3), "3"); +column_exists(column_create("1212", 2, "адын", 1, 3, 3), "3") +1 +select column_exists(column_create("1212", 2, "адын", 1, 3, 3), 3); +column_exists(column_create("1212", 2, "адын", 1, 3, 3), 3) +1 +select column_exists(column_create("1212", 2, "адын", 1, 3, 3), 4); +column_exists(column_create("1212", 2, "адын", 1, 3, 3), 4) +0 +select column_exists(column_create("1212", 2, "адын", 1, 3, 3), "4"); +column_exists(column_create("1212", 2, "адын", 1, 3, 3), "4") +0 +set names default; +# column changing test (names) +select hex(column_add(column_create(1, "AAA"), "b", "BBB")); +hex(column_add(column_create(1, "AAA"), "b", "BBB")) +0402000200000003000100430031620841414108424242 +select hex(column_add(column_create("1", "AAA"), "b", "BBB")); +hex(column_add(column_create("1", "AAA"), "b", "BBB")) +0402000200000003000100430031620841414108424242 +select column_get(column_add(column_create(1, "AAA"), "b", "BBB"), 1 as char); +column_get(column_add(column_create(1, "AAA"), "b", "BBB"), 1 as char) +AAA +select column_get(column_add(column_create(1, "AAA"), "b", "BBB"), "b" as char); +column_get(column_add(column_create(1, "AAA"), "b", "BBB"), "b" as char) +BBB +select hex(column_add(column_create("a", "AAA"), 1, "BBB")); +hex(column_add(column_create("a", "AAA"), 1, "BBB")) +0402000200000003000100430031610842424208414141 +select hex(column_add(column_create("a", "AAA"), "1", "BBB")); +hex(column_add(column_create("a", "AAA"), "1", "BBB")) +0402000200000003000100430031610842424208414141 +select hex(column_add(column_create("a", 1212 as integer), "b", "1212" as integer)); +hex(column_add(column_create("a", 1212 as integer), "b", "1212" as integer)) +04020002000000000001002000616278097809 +select hex(column_add(column_create("a", 1212 as integer), "a", "1212" as integer)); +hex(column_add(column_create("a", 1212 as integer), "a", "1212" as integer)) +040100010000000000617809 +select hex(column_add(column_create("a", 1212 as integer), "a", NULL as integer)); +hex(column_add(column_create("a", 1212 as integer), "a", NULL as integer)) +0400000000 +select hex(column_add(column_create("a", 1212 as integer), "b", NULL as integer)); +hex(column_add(column_create("a", 1212 as integer), "b", NULL as integer)) +040100010000000000617809 +select hex(column_add(column_create("a", 1212 as integer), "b", 1212 as integer, "a", 11 as integer)); +hex(column_add(column_create("a", 1212 as integer), "b", 1212 as integer, "a", 11 as integer)) +040200020000000000010010006162167809 +select column_get(column_add(column_create("a", 1212 as integer), "b", 1212 as integer, "a", 11 as integer), "a" as integer); +column_get(column_add(column_create("a", 1212 as integer), "b", 1212 as integer, "a", 11 as integer), "a" as integer) +11 +select column_get(column_add(column_create("a", 1212 as integer), "b", 1212 as integer, "a", 11 as integer), "b" as integer); +column_get(column_add(column_create("a", 1212 as integer), "b", 1212 as integer, "a", 11 as integer), "b" as integer) +1212 +select hex(column_add(column_create("a", 1212 as integer), "a", 1212 as integer, "b", 11 as integer)); +hex(column_add(column_create("a", 1212 as integer), "a", 1212 as integer, "b", 11 as integer)) +040200020000000000010020006162780916 +select hex(column_add(column_create("a", NULL as integer), "a", 1212 as integer, "b", 11 as integer)); +hex(column_add(column_create("a", NULL as integer), "a", 1212 as integer, "b", 11 as integer)) +040200020000000000010020006162780916 +select hex(column_add(column_create("a", 1212 as integer, "b", 1212 as integer), "a", 11 as integer)); +hex(column_add(column_create("a", 1212 as integer, "b", 1212 as integer), "a", 11 as integer)) +040200020000000000010010006162167809 +select hex(column_add(column_create("a", 1), "a", null)); +hex(column_add(column_create("a", 1), "a", null)) +0400000000 +select column_list(column_add(column_create("a", 1), "a", null)); +column_list(column_add(column_create("a", 1), "a", null)) + +select column_list(column_add(column_create("a", 1), "a", "")); +column_list(column_add(column_create("a", 1), "a", "")) +`a` +select hex(column_add("", "a", 1)); +hex(column_add("", "a", 1)) +0401000100000000006102 +# column delete (names) +select hex(column_delete(column_create("a", 1212 as integer, "b", 1212 as integer), "a")); +hex(column_delete(column_create("a", 1212 as integer, "b", 1212 as integer), "a")) +040100010000000000627809 +select hex(column_delete(column_create("a", 1 as integer, "b", 2 as integer, "c", 3 as integer), "b")); +hex(column_delete(column_create("a", 1 as integer, "b", 2 as integer, "c", 3 as integer), "b")) +0402000200000000000100100061630206 +select hex(column_create("a", 1 as integer, "b", 2 as integer, "c", 3 as integer)); +hex(column_create("a", 1 as integer, "b", 2 as integer, "c", 3 as integer)) +0403000300000000000100100002002000616263020406 +select hex(column_delete(column_create("a", 1 as integer, "b", 2 as integer, "c", 3 as integer), "c")); +hex(column_delete(column_create("a", 1 as integer, "b", 2 as integer, "c", 3 as integer), "c")) +0402000200000000000100100061620204 +select hex(column_delete(column_create("a", 1 as integer, "b", 2 as integer, "c", 3 as integer), "d")); +hex(column_delete(column_create("a", 1 as integer, "b", 2 as integer, "c", 3 as integer), "d")) +0403000300000000000100100002002000616263020406 +select hex(column_delete(column_create("a", 1 as integer, "b", 2 as integer, "c", 3 as integer), "b", "a")); +hex(column_delete(column_create("a", 1 as integer, "b", 2 as integer, "c", 3 as integer), "b", "a")) +0401000100000000006306 +select hex(column_delete(column_create("a", 1 as integer, "b", 2 as integer, "c", 3 as integer), "b", "c")); +hex(column_delete(column_create("a", 1 as integer, "b", 2 as integer, "c", 3 as integer), "b", "c")) +0401000100000000006102 +select hex(column_delete(column_create("a", 1 as integer, "b", 2 as integer, "c", 3 as integer), "a", "b", "c")); +hex(column_delete(column_create("a", 1 as integer, "b", 2 as integer, "c", 3 as integer), "a", "b", "c")) +0400000000 +select hex(column_delete(column_create("a", 1 as integer, "b", 2 as integer, "c", 3 as integer), "a", "b", "c", "e")); +hex(column_delete(column_create("a", 1 as integer, "b", 2 as integer, "c", 3 as integer), "a", "b", "c", "e")) +0400000000 +select hex(column_delete(column_create("a", 1), "a")); +hex(column_delete(column_create("a", 1), "a")) +0400000000 +select hex(column_delete("", "a")); +hex(column_delete("", "a")) + +# +# MDEV-458 DNAMES: Server crashes on using an unquoted string +# as a dynamic column name +# +select COLUMN_CREATE(color, "black"); +ERROR 42S22: Unknown column 'color' in 'field list' +# +# MDEV-489 Assertion `offset < 0x1f' failed in +# type_and_offset_store on COLUMN_ADD +# +CREATE TABLE t1 (f1 tinyblob); +INSERT INTO t1 VALUES (COLUMN_CREATE('col1', REPEAT('a',30))); +select column_check(f1) from t1; +column_check(f1) +1 +UPDATE t1 SET f1 = COLUMN_ADD( f1, REPEAT('b',211), 'val2' ); +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 +select column_check(f1) from t1; +column_check(f1) +0 +UPDATE t1 SET f1 = COLUMN_ADD( f1, REPEAT('c',211), 'val3' ); +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 +select column_check(f1) from t1; +column_check(f1) +0 +drop table t1; +# +# MDEV-490/MDEV-491 null as arguments +# +SELECT COLUMN_GET( COLUMN_CREATE( 'col', 'val' ), NULL AS CHAR ); +COLUMN_GET( COLUMN_CREATE( 'col', 'val' ), NULL AS CHAR ) +NULL +SELECT COLUMN_GET( NULL, 'col' as char ); +COLUMN_GET( NULL, 'col' as char ) +NULL +SELECT COLUMN_EXISTS( COLUMN_CREATE( 'col', 'val' ), NULL); +COLUMN_EXISTS( COLUMN_CREATE( 'col', 'val' ), NULL) +NULL +SELECT COLUMN_EXISTS( NULL, 'col'); +COLUMN_EXISTS( NULL, 'col') +NULL +SELECT COLUMN_CREATE( NULL, 'val' ); +COLUMN_CREATE( NULL, 'val' ) +NULL +SELECT COLUMN_ADD( NULL, 'val', 'col'); +COLUMN_ADD( NULL, 'val', 'col') +NULL +# +# MDEV-488: Assertion `column_name->length < 255' failed on a +# column name with length 255 (precisely) +# +SELECT hex(COLUMN_CREATE(REPEAT('a',255),1)); +hex(COLUMN_CREATE(REPEAT('a',255),1)) +040100FF000000000061616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616102 +SELECT hex(COLUMN_CREATE(REPEAT('a',65536),1)); +ERROR 22007: Illegal value used as argument of dynamic column function +# +# JSON conversion +# +select column_json(column_create("int", -1212 as int, "uint", 12334 as unsigned int, "decimal", "23.344" as decimal, "double", 1.23444e50 as double, "string", 'gdgd\\dhdjh"dhdhd' as char, "time", "0:45:49.000001" AS time, "datetime", "2011-04-05 0:45:49.000001" AS datetime, "date", "2011-04-05" AS date)); +column_json(column_create("int", -1212 as int, "uint", 12334 as unsigned int, "decimal", "23.344" as decimal, "double", 1.23444e50 as double, "string", 'gdgd\\dhdjh"dhdhd' as char, "time", "0:45:49.000001" AS time, "datetime", "2011-04-05 0:45:49.000001" +{"int":-1212,"date":"2011-04-05","time":"00:45:49.000001","uint":12334,"double":1.23444e50,"string":"gdgd\\dhdjh\"dhdhd","decimal":23.344,"datetime":"2011-04-05 00:45:49.000001"} +select column_json(column_create(1, -1212 as int, 2, 12334 as unsigned int, 3, "23.344" as decimal, 4, 1.23444e50 as double, 5, 'gdgd\\dhdjh"dhdhd' as char, 6, "0:45:49.000001" AS time, 7, "2011-04-05 0:45:49.000001" AS datetime, 8, "2011-04-05" AS date)); +column_json(column_create(1, -1212 as int, 2, 12334 as unsigned int, 3, "23.344" as decimal, 4, 1.23444e50 as double, 5, 'gdgd\\dhdjh"dhdhd' as char, 6, "0:45:49.000001" AS time, 7, "2011-04-05 0:45:49.000001" AS datetime, 8, "2011-04-05" AS date)) +{"1":-1212,"2":12334,"3":23.344,"4":1.23444e50,"5":"gdgd\\dhdjh\"dhdhd","6":"00:45:49.000001","7":"2011-04-05 00:45:49.000001","8":"2011-04-05"} +# +# CHECK test +# +SELECT COLUMN_CHECK(COLUMN_CREATE(1,'a')); +COLUMN_CHECK(COLUMN_CREATE(1,'a')) +1 +SELECT COLUMN_CHECK('abracadabra'); +COLUMN_CHECK('abracadabra') +0 +SELECT COLUMN_CHECK(''); +COLUMN_CHECK('') +1 +SELECT COLUMN_CHECK(NULL); +COLUMN_CHECK(NULL) +NULL +# +# escaping check +# +select column_json(column_create("string", "'\"/\\`.,whatever")),hex(column_create("string", "'\"/\\`.,whatever")); +column_json(column_create("string", "'\"/\\`.,whatever")) hex(column_create("string", "'\"/\\`.,whatever")) +{"string":"'\"/\\`.,whatever"} 040100060000000300737472696E670827222F5C602E2C7768617465766572 +# +# embedding test +# +select column_json(column_create("val", "val", "emb", column_create("val2", "val2"))); +column_json(column_create("val", "val", "emb", column_create("val2", "val2"))) +{"emb":{"val2":"val2"},"val":"val"} +select column_json(column_create(1, "val", 2, column_create(3, "val2"))); +column_json(column_create(1, "val", 2, column_create(3, "val2"))) +{"1":"val","2":{"3":"val2"}} +# +# Time encoding +# +select hex(column_create("t", "800:46:06.23434" AS time)) as hex, +column_json(column_create("t", "800:46:06.23434" AS time)) as json; +hex json +04010001000000070074649363B82003 {"t":"800:46:06.234340"} +select hex(column_create(1, "800:46:06.23434" AS time)) as hex, +column_json(column_create(1, "800:46:06.23434" AS time)) as json; +hex json +000100010007649363B82003 {"1":"800:46:06.234340"} +select hex(column_create("t", "800:46:06" AS time)) as hex, +column_json(column_create("t", "800:46:06" AS time)) as json; +hex json +04010001000000070074860B32 {"t":"800:46:06"} +select hex(column_create(1, "800:46:06" AS time)) as hex, +column_json(column_create(1, "800:46:06" AS time)) as json; +hex json +000100010007000060B82003 {"1":"800:46:06"} +select hex(column_create("t", "2012-12-21 10:46:06.23434" AS datetime)) as hex, +column_json(column_create("t", "2012-12-21 10:46:06.23434" AS datetime)) as json; +hex json +0401000100000005007495B90F649363B80A00 {"t":"2012-12-21 10:46:06.234340"} +select hex(column_create(1, "2012-12-21 10:46:06.23434" AS datetime)) as hex, +column_json(column_create(1, "2012-12-21 10:46:06.23434" AS datetime)) as json; +hex json +00010001000595B90F649363B80A00 {"1":"2012-12-21 10:46:06.234340"} +select hex(column_create("t", "2012-12-21 10:46:06" AS datetime)) as hex, +column_json(column_create("t", "2012-12-21 10:46:06" AS datetime)) as json; +hex json +0401000100000005007495B90F86AB00 {"t":"2012-12-21 10:46:06"} +select hex(column_create(1, "2012-12-21 10:46:06" AS datetime)) as hex, +column_json(column_create(1, "2012-12-21 10:46:06" AS datetime)) as json; +hex json +00010001000595B90F000060B80A00 {"1":"2012-12-21 10:46:06"} +# +# MDEV-4849: Out of memory error and valgrind warnings on COLUMN_ADD +# +CREATE TABLE t1 (dyncol tinyblob) ENGINE=MyISAM; +INSERT INTO t1 SET dyncol = COLUMN_CREATE( 3, REPEAT('a',330), 4, 'x' ); +Warnings: +Warning 1265 Data truncated for column 'dyncol' at row 1 +SELECT COLUMN_ADD( COLUMN_ADD( dyncol, 1, REPEAT('b',130) ), 3, 'y' ) FROM t1; +ERROR HY000: Encountered illegal format of dynamic column string +DROP TABLE t1; +# +#MDEV-5840: group_concat( column_json(dynamic_column )) return empty +#result +# +create table t1 (dyn blob); +insert into t1 values (column_create('name1','value1','name2','value2')); +select group_concat(cast(column_json(dyn) as char)) from t1; +group_concat(cast(column_json(dyn) as char)) +{"name1":"value1","name2":"value2"} +drop table t1; +# +# MDEV-7116: Dynamic column hangs/segfaults +# +create table t1 ( +impressions mediumblob +); +insert into t1 values (""); +update t1 +set impressions = column_add(impressions, +'total', 12, +'2014-10-28 16:00:00', 3, +'2014-10-30 15:00:00', 3, +'2014-11-04 09:00:00', 6 +); +update t1 +set impressions = column_add(impressions, +'total', "a12", +'2014-10-28 16:00:00', "a3", +'2014-10-30 15:00:00', "a3", +'2014-11-04 09:00:00', "a6" + ); +drop table t1; +# +# MDEV-8565: COLUMN_CHECK fails on valid data +# +SELECT COLUMN_CHECK(COLUMN_CREATE('a',0,'b','1')); +COLUMN_CHECK(COLUMN_CREATE('a',0,'b','1')) +1 +SELECT COLUMN_CHECK(COLUMN_CREATE('a',1,'b','1')); +COLUMN_CHECK(COLUMN_CREATE('a',1,'b','1')) +1 +SELECT COLUMN_JSON(COLUMN_CREATE('a',0,'b','1')); +COLUMN_JSON(COLUMN_CREATE('a',0,'b','1')) +{"a":0,"b":"1"} +SELECT COLUMN_JSON(COLUMN_CREATE('a',1,'b','1')); +COLUMN_JSON(COLUMN_CREATE('a',1,'b','1')) +{"a":1,"b":"1"} +# +# MDEV-8401: COLUMN_CREATE(name, value as DOUBLE) results in string +# +SELECT COLUMN_JSON( +COLUMN_CREATE( +'one', 123.456, +'two', 123.456 as DOUBLE +) +); +COLUMN_JSON( +COLUMN_CREATE( +'one', 123.456, +'two', 123.456 as DOUBLE +) +) +{"one":123.456,"two":123.456} +# +# MDEV-8521: Drastic loss of precision in COLUMN_JSON() on DOUBLEs +# +select column_get(column_create('float', 1.23456789012345E+100 as double), 'float' as double); +column_get(column_create('float', 1.23456789012345E+100 as double), 'float' as double) +1.23456789012345e100 +select column_json(column_create('float', 1.23456789012345E+100 as double)); +column_json(column_create('float', 1.23456789012345E+100 as double)) +{"float":1.23456789012345e100} +select column_json(column_create('float', 1.23456789012345E+10 as double)); +column_json(column_create('float', 1.23456789012345E+10 as double)) +{"float":12345678901.2345} +# +# MDEV-9147: Character set is ignored in Dynamic Column for saved string +# +SET NAMES utf8; +SELECT COLUMN_GET(COLUMN_CREATE(1, 0xC2A2 AS CHAR CHARACTER SET latin1), 1 AS CHAR CHARACTER SET utf8) AS a; +a +¢ +SELECT COLUMN_GET(COLUMN_CREATE(1, 0xC2A2 AS CHAR CHARACTER SET utf8), 1 AS CHAR CHARACTER SET utf8) AS a; +a +¢ +# +# MDEV-9167: COLUMN_CHECK fails on valid decimal data +# +SELECT COLUMN_CHECK(COLUMN_CREATE('a',0 AS DECIMAL,'b',1 AS DECIMAL)); +COLUMN_CHECK(COLUMN_CREATE('a',0 AS DECIMAL,'b',1 AS DECIMAL)) +1 +SELECT COLUMN_CHECK(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL)); +COLUMN_CHECK(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL)) +1 +SELECT COLUMN_JSON(COLUMN_CREATE('a',0 AS DECIMAL,'b',1 AS DECIMAL)); +COLUMN_JSON(COLUMN_CREATE('a',0 AS DECIMAL,'b',1 AS DECIMAL)) +{"a":0,"b":1} +SELECT COLUMN_JSON(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL)); +COLUMN_JSON(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL)) +{"a":1,"b":1} +# +# end of 10.0 tests +# diff --git a/mysql-test/r/empty_server_name-8224.result b/mysql-test/r/empty_server_name-8224.result index 6423114470d..4bf592c8932 100644 --- a/mysql-test/r/empty_server_name-8224.result +++ b/mysql-test/r/empty_server_name-8224.result @@ -1 +1,2 @@ create server '' foreign data wrapper w2 options (host '127.0.0.1'); +drop server ''; diff --git a/mysql-test/r/engine_error_in_alter-8453.result b/mysql-test/r/engine_error_in_alter-8453.result new file mode 100644 index 00000000000..c5a3375f33c --- /dev/null +++ b/mysql-test/r/engine_error_in_alter-8453.result @@ -0,0 +1,6 @@ +create table t1 (a int, b int); +set debug_dbug='+d,external_lock_failure'; +alter table t1 add column c int; +ERROR HY000: Got error 168 'KABOOM!' from MyISAM +set debug_dbug=''; +drop table t1; diff --git a/mysql-test/r/error_simulation.result b/mysql-test/r/error_simulation.result index 9a783197389..edb97d4ab2e 100644 --- a/mysql-test/r/error_simulation.result +++ b/mysql-test/r/error_simulation.result @@ -1,6 +1,6 @@ DROP TABLE IF EXISTS t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE t1 ( a varchar(32) character set utf8 collate utf8_bin NOT NULL, b varchar(32) character set utf8 collate utf8_bin NOT NULL ) diff --git a/mysql-test/r/events_1.result b/mysql-test/r/events_1.result index e03ccf51d8b..4e7ff526eca 100644 --- a/mysql-test/r/events_1.result +++ b/mysql-test/r/events_1.result @@ -469,6 +469,26 @@ DROP EVENT ev1; SHOW EVENTS; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation +# +# MDEV-9524 Cannot load from mysql.event when sql_mode is set to PAD_CHAR_TO_FULL_LENGTH +# +CREATE TABLE t1 (a INT); +CREATE EVENT ev1 ON SCHEDULE EVERY 5 SECOND DO DELETE FROM t1; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation +events_test ev1 root@localhost SYSTEM RECURRING NULL 5 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci +SET sql_mode=PAD_CHAR_TO_FULL_LENGTH; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation +events_test ev1 root@localhost SYSTEM RECURRING NULL 5 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci +DROP EVENT ev1; +CREATE EVENT ev1 ON SCHEDULE EVERY 5 SECOND DO DELETE FROM t1; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation +events_test ev1 root@localhost SYSTEM RECURRING NULL 5 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci +DROP EVENT ev1; +DROP TABLE t1; +SET sql_mode=DEFAULT; # # End of tests diff --git a/mysql-test/r/events_2.result b/mysql-test/r/events_2.result index 31a501d48a6..65a2de3bae5 100644 --- a/mysql-test/r/events_2.result +++ b/mysql-test/r/events_2.result @@ -378,7 +378,7 @@ do select 1; alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00' ends '1999-01-02 00:00:00'; -ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation. +ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future. drop event event_35981; create event event_35981 on schedule every 1 hour starts current_timestamp on completion not preserve @@ -399,7 +399,7 @@ Warnings: Note 1544 Event execution time is in the past. Event has been disabled alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00' ends '1999-01-02 00:00:00' on completion not preserve; -ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation. +ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future. alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00' ends '1999-01-02 00:00:00' on completion preserve; Warnings: diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result index 30bc4f89d8c..3e12b43e72c 100644 --- a/mysql-test/r/events_bugs.result +++ b/mysql-test/r/events_bugs.result @@ -90,7 +90,7 @@ create table events_smode_test(ev_name char(10), a date); "This should never insert something" create event ee_16407_2 on schedule every 60 second do begin -select get_lock('ee_16407_2', 60) /*ee_16407_2*/; +select get_lock('ee_16407_2', 60); /*ee_16407_2*/ select release_lock('ee_16407_2'); insert into events_test.events_smode_test values('ee_16407_2','1980-19-02'); end| @@ -99,7 +99,7 @@ ERROR 22007: Incorrect date value: '1980-19-02' for column 'a' at row 1 "This is ok" create event ee_16407_3 on schedule every 60 second do begin -select get_lock('ee_16407_2', 60) /*ee_16407_3*/; +select get_lock('ee_16407_2', 60); /*ee_16407_3*/ select release_lock('ee_16407_2'); insert into events_test.events_smode_test values ('ee_16407_3','1980-02-19'); insert into events_test.events_smode_test values ('ee_16407_3','1980-02-29'); @@ -108,7 +108,7 @@ set sql_mode=""| "This will insert rows but they will be truncated" create event ee_16407_4 on schedule every 60 second do begin -select get_lock('ee_16407_2', 60) /*ee_16407_4*/; +select get_lock('ee_16407_2', 60); /*ee_16407_4*/ select release_lock('ee_16407_2'); insert into events_test.events_smode_test values ('ee_16407_4','10-11-1956'); end| @@ -156,13 +156,13 @@ create procedure ee_16407_5_pendant() begin insert into events_test.events_smode create procedure ee_16407_6_pendant() begin insert into events_test.events_smode_test values('ee_16407_6','2004-02-29'); end| create event ee_16407_5 on schedule every 60 second do begin -select get_lock('ee_16407_5', 60) /*ee_16407_5*/; +select get_lock('ee_16407_5', 60); /*ee_16407_5*/ select release_lock('ee_16407_5'); call events_test.ee_16407_5_pendant(); end| create event ee_16407_6 on schedule every 60 second do begin -select get_lock('ee_16407_5', 60) /*ee_16407_6*/; +select get_lock('ee_16407_5', 60); /*ee_16407_6*/ select release_lock('ee_16407_5'); call events_test.ee_16407_6_pendant(); end| @@ -454,10 +454,10 @@ e3 +00:00 CREATE DEFINER=`root`@`localhost` EVENT `e3` ON SCHEDULE EVERY 1 DAY The following should fail, and nothing should be altered. ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' ENDS '1999-01-02 00:00:00'; -ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation. +ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future. ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' ENDS '1999-01-02 00:00:00' DISABLE; -ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation. +ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future. The following should give warnings, and nothing should be created. CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' ENDS '1999-01-02 00:00:00' @@ -569,7 +569,7 @@ USE test; SHOW GRANTS FOR CURRENT_USER; Grants for root@localhost GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION +GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION SET GLOBAL event_scheduler = ON; CREATE TABLE events_test.event_log (id int KEY AUTO_INCREMENT, ev_nm char(40), ev_cnt int, ev_tm timestamp) @@ -602,7 +602,7 @@ INSERT INTO events_test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp( ROLLBACK; END IF; END;| -Sleep till the first INSERT into events_test.event_log occured +Sleep till the first INSERT into events_test.event_log occurred SELECT COUNT(*) > 0 AS "Expect 1" FROM events_test.event_log; Expect 1 1 diff --git a/mysql-test/r/events_logs_tests.result b/mysql-test/r/events_logs_tests.result index b7faf56f466..9cc6e44511c 100644 --- a/mysql-test/r/events_logs_tests.result +++ b/mysql-test/r/events_logs_tests.result @@ -38,9 +38,9 @@ USER_HOST select 'events_logs_test' as inside_event Check slow query log Ensure that slow logging is on -show variables like 'log_slow_queries'; +show variables like 'slow_query_log'; Variable_name Value -log_slow_queries ON +slow_query_log ON Demonstrate that session value has no effect diff --git a/mysql-test/r/events_restart.result b/mysql-test/r/events_restart.result index 6a751fa29f8..0caac907f64 100644 --- a/mysql-test/r/events_restart.result +++ b/mysql-test/r/events_restart.result @@ -18,7 +18,7 @@ change column body body longtext character set utf8 collate utf8_bin; use events_test; select @@event_scheduler; @@event_scheduler -DISABLED +OFF show events; ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start select event_name from information_schema.events; @@ -40,12 +40,12 @@ ERROR HY000: Cannot proceed because system tables used by Event Scheduler were f drop event intact_check; ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start set global event_scheduler=on; -ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +ERROR HY000: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler. set global event_scheduler=off; -ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +ERROR HY000: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler. show variables like 'event_scheduler'; Variable_name Value -event_scheduler DISABLED +event_scheduler OFF Make sure that we still can create and drop databases, and no warnings are produced. drop database if exists mysqltest_database_not_exists; @@ -58,6 +58,22 @@ Error 1545 Failed to open mysql.event Restore the original mysql.event table drop table mysql.event; rename table event_like to mysql.event; +check that we can now enable events without restart +set global event_scheduler=original; +Warnings: +Note 1408 Event Scheduler: Loaded 3 events +select @@global.event_scheduler; +@@global.event_scheduler +ON +set global event_scheduler=on; +select @@global.event_scheduler; +@@global.event_scheduler +ON +show events; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation +events_test abc1 root@localhost SYSTEM RECURRING # 1 SECOND # # ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci +events_test abc2 root@localhost SYSTEM RECURRING # 1 SECOND # # ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci +events_test abc3 root@localhost SYSTEM RECURRING # 1 SECOND # # ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci Now let's restart the server again use events_test; select @@event_scheduler; @@ -65,3 +81,26 @@ select @@event_scheduler; ON drop table execution_log; drop database events_test; +# +# Test for bug#11748899 -- EVENT SET TO DISABLED AND ON COMPLETION +# NOT PRESERVE IS DELETED AT SERVER +# +SELECT @@event_scheduler; +@@event_scheduler +ON +USE test; +DROP EVENT IF EXISTS e1; +CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND DISABLE DO SELECT 1; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation +test e1 root@localhost SYSTEM RECURRING # 1 SECOND # # DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci +"Now we restart the server" +USE test; +SELECT @@event_scheduler; +@@event_scheduler +ON +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation +test e1 root@localhost SYSTEM RECURRING # 1 SECOND # # DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci +DROP EVENT e1; +# end test for bug#11748899 diff --git a/mysql-test/r/events_slowlog.result b/mysql-test/r/events_slowlog.result index c97fe8a2ab9..7de5925bc0f 100644 --- a/mysql-test/r/events_slowlog.result +++ b/mysql-test/r/events_slowlog.result @@ -6,6 +6,7 @@ set global long_query_time=0.2; create table t1 (i int); insert into t1 values (0); create event ev on schedule at CURRENT_TIMESTAMP + INTERVAL 1 second do update t1 set i=1+sleep(0.5); +FOUND /update t1 set i=1/ in mysqld-slow.log drop table t1; set global event_scheduler= @event_scheduler_save; set global slow_query_log= @slow_query_log_save; diff --git a/mysql-test/r/explain.result b/mysql-test/r/explain.result index 919e29f185e..b3c33e3559a 100644 --- a/mysql-test/r/explain.result +++ b/mysql-test/r/explain.result @@ -98,6 +98,46 @@ KEY(b),KEY(b),KEY(b),KEY(b),KEY(b), KEY(b),KEY(b),KEY(b),KEY(b),KEY(b), KEY(b),KEY(b),KEY(b),KEY(b),KEY(b), KEY(b),KEY(b),KEY(b),KEY(b),KEY(b)); +Warnings: +Note 1831 Duplicate index `b_2`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_3`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_4`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_5`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_6`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_7`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_8`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_9`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_10`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_11`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_12`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_13`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_14`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_15`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_16`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_17`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_18`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_19`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_20`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_21`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_22`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_23`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_24`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_25`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_26`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_27`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_28`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_29`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_30`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_31`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_32`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_33`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_34`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_35`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_36`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_37`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_38`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_39`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `b_40`. This is deprecated and will be disallowed in a future release. INSERT INTO t2 VALUES (),(),(); EXPLAIN SELECT 1 FROM (SELECT 1 FROM t2,t1 WHERE b < c GROUP BY 1 LIMIT 1) AS d2; @@ -353,3 +393,17 @@ Warnings: Note 1003 select NULL AS `a` from (select NULL AS `a` from `test`.`t1` where 0) `t` set optimizer_switch=@tmp_optimizer_switch; DROP TABLE t1,t2; +# +# MDEV-7215: EXPLAIN REPLACE produces an error: +# Column count doesn't match value count +# +create table t1 (a int); +insert into t1 values (1); +create table t2 (b int, c int); +replace into t2 select 100, (select a from t1); +explain replace into t2 select 100, (select a from t1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used +2 SUBQUERY t1 system NULL NULL NULL NULL 1 +drop table t1, t2; +# End of 10.1 tests diff --git a/mysql-test/r/explain_non_select.result b/mysql-test/r/explain_non_select.result new file mode 100644 index 00000000000..5a6b9f841c2 --- /dev/null +++ b/mysql-test/r/explain_non_select.result @@ -0,0 +1,275 @@ +drop table if exists t0, t1; +create table t0 (a int) engine=myisam; +insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8); +# +# Tests for single-table DELETE +# +explain select * from t0 where a=3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 8 Using where +explain delete from t0 where a=3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 8 Using where +# DELETE without WHERE is a special case: +explain delete from t0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL 8 Deleting all rows +create table t1 (a int, b int, filler char(100), key(a), key(b)); +insert into t1 +select A.a+10*B.a + 10*C.a, A.a+10*B.a + 10*C.a, 'filler' +from t0 A, t0 B, t0 C; +# This should use an index, possible_keys=NULL because there is no WHERE +explain delete from t1 order by a limit 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 5 NULL 2 +# This should use range, possible_keys={a,b} +explain delete from t1 where a<20 and b < 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a,b a 5 NULL 1 Using where +# This should use ALL + filesort +explain delete from t1 order by a+1 limit 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 512 Using filesort +# This should use range + using filesort +explain delete from t1 where a<20 order by b limit 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 5 NULL 1 Using where; Using filesort +# Try some subqueries: +explain delete from t1 where a < (select max(a) from t0); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 range a a 5 NULL 1 Using where +2 SUBQUERY t0 ALL NULL NULL NULL NULL 8 +explain delete from t1 where a < (select max(a) from t0 where a < t1.b); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 512 Using where +2 DEPENDENT SUBQUERY t0 ALL NULL NULL NULL NULL 8 Using where +# +# Tests for multi-table DELETE +# +explain delete t1 from t0, t1 where t0.a = t1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 8 Using where +1 SIMPLE t1 ref a a 5 test.t0.a 4 +drop table t0, t1; +# ################################################################### +# ## EXPLAIN UPDATE tests +# ################################################################### +create table t0 (a int) engine=myisam; +insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8); +explain update t0 set a=3 where a=4; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 8 Using where +create table t1 (a int, b int, filler char(100), key(a), key(b)); +insert into t1 +select A.a+10*B.a + 10*C.a, A.a+10*B.a + 10*C.a, 'filler' +from t0 A, t0 B, t0 C; +explain update t1 set a=a+1 where 3>4; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +explain update t1 set a=a+1 where a=3 and a=4; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +# This should use an index, possible_keys=NULL because there is no WHERE +explain update t1 set a=a+1 order by a limit 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 512 Using filesort +# This should use range, possible_keys={a,b} +explain update t1 set filler='fooo' where a<20 and b < 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a,b a 5 NULL 1 Using where +# This should use ALL + filesort +explain update t1 set filler='fooo' order by a+1 limit 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 512 Using filesort +# This should use range + using filesort +explain update t1 set filler='fooo' where a<20 order by b limit 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 5 NULL 1 Using where; Using filesort +# Try some subqueries: +explain update t1 set filler='fooo' where a < (select max(a) from t0); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 range a a 5 NULL 1 Using where +2 SUBQUERY t0 ALL NULL NULL NULL NULL 8 +explain update t1 set filler='fooo' where a < (select max(a) from t0 where a < t1.b); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 512 Using where +2 DEPENDENT SUBQUERY t0 ALL NULL NULL NULL NULL 8 Using where +# +# Tests for multi-table UPDATE +# +explain update t0, t1 set t1.a=t1.a+1 where t0.a = t1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 8 Using where +1 SIMPLE t1 ref a a 5 test.t0.a 4 +drop table t0, t1; +# +# Try DELETE ... RETURNING ... +# +create table t0 (a int); +insert into t0 values (1),(2),(3),(4); +explain delete from t0 where a=1 returning a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 4 Using where +explain delete from t0 returning a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 4 +drop table t0; +# +# MDEV-5070 - EXPLAIN INSERT ... SELECT crashes on 10.0-base-explain-slowquerylog +# +create table t0 (a int); +insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8); +create table t1 (a int); +explain insert into t1 select * from t0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 8 +explain replace into t1 select * from t0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 8 +drop table t0, t1; +# +# MDEV-5067: Valgrind warnings (Invalid read) in QPF_table_access::print_explain +# +CREATE TABLE t1 (i INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (7),(0),(9); +SELECT * FROM t1 INNER JOIN ( SELECT DISTINCT * FROM t1 ) AS sq ON (sq.i = t1.i); +i i +7 7 +0 0 +9 9 +DROP TABLE t1; +# +# MDEV-5093, MDEV-5094: EXPLAIN PARTITIONS and EXPLAIN EXTENDED do not +# work for EXPLAIN UPDATE. +# +create table t1 (i int); +explain partitions update t1 set i = 3; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 0 +create table t2 (a int, b int) partition by hash(a) partitions 5; +insert into t2 values (0,0),(1,1),(2,2),(3,3),(4,4); +explain partitions update t2 set b=3 where a in (3,4); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 p3,p4 ALL NULL NULL NULL NULL 2 Using where +explain partitions delete from t2 where a in (3,4); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 p3,p4 ALL NULL NULL NULL NULL 2 Using where +explain extended update t2 set b=3 where a in (3,4); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where +explain extended delete from t2 where a in (3,4); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where +drop table t1,t2; +# +# Check the special case where partition pruning removed all partitions +# +create table t1 (a int, b int) +partition by range (a) ( +partition p0 values less than (10), +partition p1 values less than (20), +partition p2 values less than (30) +); +insert into t1 values (9,9), (19,19), (29,29); +explain partitions select * from t1 where a in (32,33); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +explain partitions delete from t1 where a in (32,33); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No matching rows after partition pruning +explain partitions update t1 set b=12345 where a in (32,33); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No matching rows after partition pruning +drop table t1; +# +# Tests for EXPLAIN INSERT ... VALUES +# +create table t1 (a int, key(a)); +explain insert into t1 values (1),(2),(3); +id select_type table type possible_keys key key_len ref rows Extra +1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL +insert into t1 values (1),(2),(3); +create table t2 (a int, b int); +explain insert into t2 values +(10, 1+(select max(a) from t1)), +(11, 1+(select max(a+1) from t1)); +id select_type table type possible_keys key key_len ref rows Extra +1 INSERT t2 ALL NULL NULL NULL NULL NULL NULL +3 SUBQUERY t1 index NULL a 5 NULL 3 Using index +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +drop table t1,t2; +# +# MDEV-5122: "Commands out of sync", "Malformed packet" or client hang up on unique key violation +# +drop table if exists t1; +Warnings: +Note 1051 Unknown table 'test.t1' +drop function if exists f1; +create table t1 (a int, unique(a)); +create function f1(x int) +returns int +begin +insert into t1 values(x),(x); +return 10; +end| +select f1(100); +ERROR 23000: Duplicate entry '100' for key 'a' +select 'OK'; +OK +OK +drop function f1; +drop table t1; +# +# MDEV-7038: Assertion `status_var.memory_used == 0' failed in THD::~THD() +# on disconnect after executing EXPLAIN for multi-table UPDATE +# +CREATE TABLE t1 (a INT); +CREATE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES (1),(2); +EXPLAIN UPDATE v1, mysql.user SET v1.a = v1.a + 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 +1 SIMPLE user index NULL PRIMARY 420 NULL 4 Using index +DROP TABLE t1; +DROP VIEW v1; +# +# MDEV-8299: MyISAM or Aria table gets corrupted after EXPLAIN INSERT and INSERT +# +CREATE TABLE t1 (pk INT NOT NULL AUTO_INCREMENT PRIMARY KEY, i INT, KEY(i)) ENGINE=MyISAM; +INSERT INTO t1 (i) VALUES (100),(200); +CREATE TABLE t2 (j INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (10),(20); +EXPLAIN INSERT INTO t1 (i) SELECT j FROM t2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 +INSERT INTO t1 (i) VALUES (300); +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1, t2; +# +# MDEV-8321: Assertion `! is_set()' failed in Diagnostics_area::set_eof_status on EXPLAIN INSERT ... UNION +# +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (b INT); +CREATE TABLE t3 (c INT); +INSERT INTO t1 VALUES (1),(2); +INSERT INTO t2 VALUES (3),(4); +INSERT INTO t3 VALUES (5),(6); +EXPLAIN INSERT INTO t1 SELECT * FROM t2 UNION SELECT * FROM t3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 +2 UNION t3 ALL NULL NULL NULL NULL 2 +NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL +drop table t1,t2,t3; +# +# MDEV-6223: Assertion `! is_set()' fails in Diagnostics_area::set_eof_status on EXPLAIN INSERT executed as a PS +# +CREATE TABLE t1 (a INT) ENGINE = MyISAM; +CREATE TABLE t2 (b INT) ENGINE = MyISAM; +INSERT INTO t2 VALUES (1),(2); +PREPARE stmt FROM 'EXPLAIN INSERT INTO t1 SELECT * FROM t2'; +EXECUTE stmt; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 +drop table t1,t2; diff --git a/mysql-test/r/explain_slowquerylog.result b/mysql-test/r/explain_slowquerylog.result new file mode 100644 index 00000000000..8acbdc69a4c --- /dev/null +++ b/mysql-test/r/explain_slowquerylog.result @@ -0,0 +1,53 @@ +drop table if exists t0,t1; +create table t0 (a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +explain select * from t0 where a < 3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using where +# +# MDEV-5045: Server crashes in QPF_query::print_explain with log_slow_verbosity='query_plan,explain' +# +set autocommit=1; +drop table t0; +# +# MDEV-5047 virtual THD::~THD(): Assertion `status_var.memory_used == 0' fails on disconnect +# +ALTER TABLE nonexisting ENABLE KEYS; +ERROR 42S02: Table 'test.nonexisting' doesn't exist +SHOW WARNINGS; +Level Code Message +Error 1146 Table 'test.nonexisting' doesn't exist +SELECT 1; +1 +1 +# +# MDEV-5060 Server crashes on EXPLAIN EXTENDED or EXPLAIN PARTITIONS with explain in slow_log +# +EXPLAIN PARTITIONS SELECT 1 ; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +# +# MDEV-5106: Server crashes in Explain_union::print_explain on ER_TOO_BIG_SELECT with explain in slow log +# +CREATE TABLE t1 (i INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES +(1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +SET max_join_size = 10; +( SELECT ta.* FROM t1 ta, t1 tb ) UNION ( SELECT * FROM t1 ); +ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay +SELECT 'Server still alive?' as 'Yes'; +Yes +Server still alive? +DROP TABLE t1; +# +# MDEV-5308 Crash when running with slow_query_log=1 +# +SET @save1= @@log_slow_rate_limit; +SET @save2= @@long_query_time; +SET log_slow_rate_limit=1000; +SET long_query_time=0.000001; +SELECT 1; +1 +1 +SET log_slow_rate_limit=@save1; +SET long_query_time=@save2; diff --git a/mysql-test/r/ext_key_noPK_6794.result b/mysql-test/r/ext_key_noPK_6794.result new file mode 100644 index 00000000000..59344522887 --- /dev/null +++ b/mysql-test/r/ext_key_noPK_6794.result @@ -0,0 +1,20 @@ +create table t1 (c1 int not null, c2 int, unique index(c1), index (c2)) engine=innodb; +insert into t1 (c1, c2) select 1, round(rand()*100); +insert into t1 (c1, c2) select (select max(c1) from t1) + c1, c1*93563%100 from t1; +insert into t1 (c1, c2) select (select max(c1) from t1) + c1, c1*93563%100 from t1; +insert into t1 (c1, c2) select (select max(c1) from t1) + c1, c1*93563%100 from t1; +select count(*) from t1; +count(*) +8 +explain select * from t1 where c2 = 1 order by c1; +id 1 +select_type SIMPLE +table t1 +type ref +possible_keys c2 +key c2 +key_len 5 +ref const +rows 1 +Extra Using where; Using index +drop table t1; diff --git a/mysql-test/r/features.result b/mysql-test/r/features.result index 7b6a352ab0c..04e0df98ec7 100644 --- a/mysql-test/r/features.result +++ b/mysql-test/r/features.result @@ -1,6 +1,8 @@ drop table if exists t1; +flush status; show status like "feature%"; Variable_name Value +Feature_delay_key_write 0 Feature_dynamic_columns 0 Feature_fulltext 0 Feature_gis 0 @@ -118,6 +120,9 @@ drop trigger trg; drop table t1; show status like "%trigger%"; Variable_name Value +Binlog_group_commit_trigger_count 0 +Binlog_group_commit_trigger_lock_wait 0 +Binlog_group_commit_trigger_timeout 0 Com_create_trigger 1 Com_drop_trigger 1 Com_show_create_trigger 0 @@ -138,3 +143,17 @@ upd1 show status like "feature_xml"; Variable_name Value Feature_xml 2 +# +# Feature delayed_keys +# +create table t1 (a int, key(a)) engine=myisam delay_key_write=1; +insert into t1 values(1); +insert into t1 values(2); +drop table t1; +create table t1 (a int, key(a)) engine=aria delay_key_write=1; +insert into t1 values(1); +insert into t1 values(2); +drop table t1; +show status like "feature_delay_key_write"; +Variable_name Value +Feature_delay_key_write 2 diff --git a/mysql-test/r/filesort_debug.result b/mysql-test/r/filesort_debug.result index 6d6eb817259..13912ac8756 100644 --- a/mysql-test/r/filesort_debug.result +++ b/mysql-test/r/filesort_debug.result @@ -4,7 +4,7 @@ SET @old_debug= @@session.debug; # CREATE TABLE t1(f0 int auto_increment primary key, f1 int); INSERT INTO t1(f1) VALUES (0),(1),(2),(3),(4),(5); -SET session debug_dbug= '+d,make_sort_keys_alloc_fail'; +SET session debug_dbug= '+d,alloc_sort_buffer_fail'; CALL mtr.add_suppression("Out of sort memory"); SELECT * FROM t1 ORDER BY f1 ASC, f0; ERROR HY001: Out of sort memory, consider increasing server sort buffer size diff --git a/mysql-test/r/flush-innodb-notembedded.result b/mysql-test/r/flush-innodb-notembedded.result new file mode 100644 index 00000000000..817d57d9d79 --- /dev/null +++ b/mysql-test/r/flush-innodb-notembedded.result @@ -0,0 +1,34 @@ +# Test 7: Check privileges required. +# +CREATE DATABASE db1; +CREATE TABLE db1.t1 (a INT) engine= InnoDB; +GRANT RELOAD, SELECT, LOCK TABLES ON *.* TO user1@localhost; +GRANT CREATE, DROP ON *.* TO user2@localhost; +GRANT RELOAD, SELECT ON *.* TO user3@localhost; +GRANT SELECT, LOCK TABLES ON *.* TO user4@localhost; +GRANT RELOAD, LOCK TABLES ON *.* TO user5@localhost; +# Connection con1 as user1 +FLUSH TABLE db1.t1 FOR EXPORT; +UNLOCK TABLES; +# Connection default +# Connection con1 as user2 +FLUSH TABLE db1.t1 FOR EXPORT; +ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation +# Connection default +# Connection con1 as user3 +FLUSH TABLE db1.t1 FOR EXPORT; +ERROR 42000: Access denied for user 'user3'@'localhost' to database 'db1' +# Connection default +# Connection con1 as user4 +FLUSH TABLE db1.t1 FOR EXPORT; +ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation +# Connection default +# Connection con1 as user5 +FLUSH TABLE db1.t1 FOR EXPORT; +ERROR 42000: SELECT command denied to user 'user5'@'localhost' for table 't1' +# Connection default +DROP USER user1@localhost, user2@localhost, user3@localhost, +user4@localhost, user5@localhost; +DROP TABLE db1.t1; +DROP DATABASE db1; +# End of 5.6 tests diff --git a/mysql-test/r/flush-innodb.result b/mysql-test/r/flush-innodb.result index cea4f81e2a2..d596ffbbd51 100644 --- a/mysql-test/r/flush-innodb.result +++ b/mysql-test/r/flush-innodb.result @@ -1,5 +1,299 @@ FLUSH TABLES WITH READ LOCK AND DISABLE CHECKPOINT; UNLOCK TABLES; CREATE TABLE t1 ( m MEDIUMTEXT ) ENGINE=InnoDB; -INSERT INTO t1 VALUES ( REPEAT('i',1048576) ); +INSERT INTO t1 VALUES ( REPEAT('i',65535) ); DROP TABLE t1; + +# +# WL#6168: FLUSH TABLES ... FOR EXPORT -- parser +# + +# Requires innodb_file_per_table +SET @old_innodb_file_per_table= @@GLOBAL.innodb_file_per_table; +SET GLOBAL innodb_file_per_table= 1; +# new "EXPORT" keyword is a valid user variable name: +SET @export = 10; +# new "EXPORT" keyword is a valid SP parameter name: +CREATE PROCEDURE p1(export INT) BEGIN END; +DROP PROCEDURE p1; +# new "EXPORT" keyword is a valid local variable name: +CREATE PROCEDURE p1() +BEGIN +DECLARE export INT; +END| +DROP PROCEDURE p1; +# new "EXPORT" keyword is a valid SP name: +CREATE PROCEDURE export() BEGIN END; +DROP PROCEDURE export; +# new FLUSH TABLES ... FOR EXPORT syntax: +FLUSH TABLES FOR EXPORT; +ERROR 42000: No tables used near 'FOR EXPORT' at line 1 +FLUSH TABLES WITH EXPORT; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'EXPORT' at line 1 +CREATE TABLE t1 (i INT) engine=InnoDB; +CREATE TABLE t2 LIKE t1; +FLUSH TABLES t1,t2 WITH EXPORT; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'EXPORT' at line 1 +FLUSH TABLES t1, t2 FOR EXPORT; +UNLOCK TABLES; +# case check +FLUSH TABLES t1, t2 for ExPoRt; +UNLOCK TABLES; +# With LOCAL keyword +FLUSH LOCAL TABLES t1, t2 FOR EXPORT; +UNLOCK TABLES; +# Tables with fully qualified names +FLUSH LOCAL TABLES test.t1, test.t2 for ExPoRt; +UNLOCK TABLES; +DROP TABLES t1, t2; +# new "EXPORT" keyword is a valid table name: +CREATE TABLE export (i INT) engine=InnoDB; +# it's ok to lock the "export" table for export: +FLUSH TABLE export FOR EXPORT; +UNLOCK TABLES; +DROP TABLE export; +# +# WL#6169 FLUSH TABLES ... FOR EXPORT -- runtime +# +# Test 1: Views, temporary tables, non-existent tables +# +CREATE VIEW v1 AS SELECT 1; +CREATE TEMPORARY TABLE t1 (a INT); +FLUSH TABLES v1 FOR EXPORT; +ERROR HY000: 'test.v1' is not BASE TABLE +FLUSH TABLES t1 FOR EXPORT; +ERROR 42S02: Table 'test.t1' doesn't exist +FLUSH TABLES non_existent FOR EXPORT; +ERROR 42S02: Table 'test.non_existent' doesn't exist +DROP TEMPORARY TABLE t1; +DROP VIEW v1; +# Test 2: Blocked by update transactions, blocks updates. +# +CREATE TABLE t1 (a INT PRIMARY KEY, b INT) engine= InnoDB; +CREATE TABLE t2 (a INT) engine= InnoDB; +# Connection con1 +START TRANSACTION; +INSERT INTO t1 VALUES (1, 1); +# Connection default +# Should be blocked +# Sending: +FLUSH TABLES t1 FOR EXPORT; +# Connection con1 +COMMIT; +# Connection default +# Reaping: FLUSH TABLES t1 FOR EXPORT +# Connection con1 +# Should not be blocked +INSERT INTO t2 VALUES (1); +# Should be blocked +# Sending: +INSERT INTO t1 VALUES (2, 2); +# Connection default +UNLOCK TABLES; +# Connection con1 +# Reaping: INSERT INTO t1 VALUES (2, 2); +# Test 3: Read operations should not be affected. +# +START TRANSACTION; +SELECT * FROM t1; +a b +1 1 +2 2 +# Connection default +# Should not be blocked +FLUSH TABLES t1 FOR EXPORT; +# Connection con1 +COMMIT; +# Should not be blocked +SELECT * FROM t1; +a b +1 1 +2 2 +# Connection default +UNLOCK TABLES; +# Test 4: Blocked by DDL, blocks DDL. +# +START TRANSACTION; +SELECT * FROM t1; +a b +1 1 +2 2 +# Connection con2 +# Sending: +ALTER TABLE t1 ADD INDEX i1(b); +# Connection con1 +# Should be blocked +FLUSH TABLE t1 FOR EXPORT; +# Connection default +COMMIT; +# Connection con2 +# Reaping ALTER TABLE ... +# Connection con1 +# Reaping FLUSH TABLE t1 FOR EXPORT +UNLOCK TABLES; +# Connection default +FLUSH TABLE t1 FOR EXPORT; +# Connection con2 +# Should be blocked +DROP TABLE t1; +# Connection default +UNLOCK TABLES; +# Connection con2 +# Reaping DROP TABLE t1 +# Connection default +DROP TABLE t2; +# Test 5: Compatibilty with FLUSH TABLES WITH READ LOCK +# +CREATE TABLE t1(a INT) engine= InnoDB; +FLUSH TABLES WITH READ LOCK; +# Connection con1 +# This should not block +FLUSH TABLE t1 FOR EXPORT; +UNLOCK TABLES; +# Connection default +UNLOCK TABLES; +DROP TABLE t1; +# Test 6: Unsupported storage engines. +# +CREATE TABLE t1(a INT) engine= MEMORY; +FLUSH TABLE t1 FOR EXPORT; +ERROR HY000: Storage engine MEMORY of the table `test`.`t1` doesn't have this option +DROP TABLE t1; +# Connection con1 +# Connection defalt +# Test 7: Check privileges required. +# in flush-innodb-notembedded.test +# Test 8: FLUSH TABLE <table_list> FOR EXPORT is incompatible +# with itself (to avoid race conditions in metadata +# file handling). +# +CREATE TABLE t1 (a INT) engine= InnoDB; +CREATE TABLE t2 (a INT) engine= InnoDB; +# Connection con1 +FLUSH TABLE t1 FOR EXPORT; +# Connection default +# This should not block +FLUSH TABLE t2 FOR EXPORT; +UNLOCK TABLES; +# This should block +# Sending: +FLUSH TABLE t1 FOR EXPORT; +# Connection con1 +UNLOCK TABLES; +# Connection default +# Reaping: FLUSH TABLE t1 FOR EXPORT +UNLOCK TABLES; +# Test 9: LOCK TABLES ... READ is not affected +# +LOCK TABLE t1 READ; +# Connection con1 +# Should not block +FLUSH TABLE t1 FOR EXPORT; +UNLOCK TABLES; +# Connection default +UNLOCK TABLES; +FLUSH TABLE t1 FOR EXPORT; +# Connection con1 +# Should not block +LOCK TABLE t1 READ; +UNLOCK TABLES; +# Connection default +UNLOCK TABLES; +# Connection con1 +# Connection default +DROP TABLE t1, t2; +# Test 10: Lock is released if transaction is started after doing +# 'flush table..' in same session +CREATE TABLE t1 ( i INT ) ENGINE = Innodb; +FLUSH TABLE t1 FOR EXPORT; +# error as active locks already exist +FLUSH TABLE t1 FOR EXPORT; +ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction +# active locks will be released due to start transaction +START TRANSACTION; +# passes as start transaction released ealier locks +FLUSH TABLE t1 FOR EXPORT; +UNLOCK TABLES; +DROP TABLE t1; +# Test 11: Test 'flush table with fully qualified table names +# and with syntax local/NO_WRITE_TO_BINLOG +# Connection con1 +# Connection default +CREATE TABLE t1 ( i INT ) ENGINE = Innodb; +INSERT INTO t1 VALUES (100),(200); +FLUSH LOCAL TABLES test.t1 FOR EXPORT; +# Connection con1 +# Should be blocked +# Sending: +FLUSH LOCAL TABLES t1 FOR EXPORT; +# Connection default +UNLOCK TABLE; +# Connection con1 +# Reaping: FLUSH LOCAL TABLES t1 FOR EXPORT +SELECT * FROM t1 ORDER BY i; +i +100 +200 +# Connection default +# Should be blocked +# Sending: +FLUSH NO_WRITE_TO_BINLOG TABLES test.t1 FOR EXPORT; +# Connection con1 +UNLOCK TABLES; +# Connection default +# Reaping: FLUSH NO_WRITE_TO_BINLOG TABLES test.t1 FOR EXPORT +SELECT * FROM t1 ORDER BY i; +i +100 +200 +UNLOCK TABLE; +DROP TABLE t1; +# Test 12: Active transaction get committed if user execute +# "FLUSH TABLE ... FOR EXPORT" or "LOCK TABLE.." +# Connection default +CREATE TABLE t1 ( i INT ) ENGINE = Innodb; +INSERT INTO t1 VALUES (100),(200); +START TRANSACTION; +INSERT INTO t1 VALUES (300); +# 'flush table..' commit active transaction from same session +FLUSH LOCAL TABLES test.t1 FOR EXPORT; +ROLLBACK; +SELECT * FROM t1 ORDER BY i; +i +100 +200 +300 +START TRANSACTION; +INSERT INTO t1 VALUES (400); +# 'lock table ..' commit active transaction from same session +LOCK TABLES test.t1 READ; +ROLLBACK; +SELECT * FROM t1 ORDER BY i; +i +100 +200 +300 +400 +UNLOCK TABLES; +DROP TABLE t1; +# Test 13: Verify "FLUSH TABLE ... FOR EXPORT" and "LOCK TABLE.." +# in same session +# Connection default +CREATE TABLE t1 ( i INT ) ENGINE = Innodb; +# Lock table +LOCK TABLES test.t1 WRITE; +# 'lock table ..' completes even if table lock is acquired +# in same session using 'lock table'. Previous locks are released. +LOCK TABLES test.t1 READ; +# 'flush table ..' gives error if table lock is acquired +# in same session using 'lock table ..' +FLUSH TABLES test.t1 FOR EXPORT; +ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction +# 'lock table ..' completes even if table lock is acquired +# in same session using 'flush table'. Previous locks are released. +LOCK TABLES test.t1 WRITE; +UNLOCK TABLES; +DROP TABLE t1; +# Reset innodb_file_per_table +SET GLOBAL innodb_file_per_table= @old_innodb_file_per_table; +# End of 5.6 tests diff --git a/mysql-test/r/flush.result b/mysql-test/r/flush.result index d3b3cd16210..b64351045bf 100644 --- a/mysql-test/r/flush.result +++ b/mysql-test/r/flush.result @@ -489,3 +489,10 @@ UNLOCK TABLES; # Switching to connection 'default'. COMMIT; DROP TABLE t1; +# +# Test flushing slave or relay logs twice +# +flush relay logs,relay logs; +ERROR HY000: Incorrect usage of FLUSH and RELAY LOGS +flush slave,slave; +ERROR HY000: Incorrect usage of FLUSH and SLAVE diff --git a/mysql-test/r/flush_block_commit_notembedded.result b/mysql-test/r/flush_block_commit_notembedded.result index 08643527b75..130146bf252 100644 --- a/mysql-test/r/flush_block_commit_notembedded.result +++ b/mysql-test/r/flush_block_commit_notembedded.result @@ -10,13 +10,11 @@ SELECT 1; 1 # Switch to connection con2 FLUSH TABLES WITH READ LOCK; -show binlog events from <binlog_start>; -Log_name Pos Event_type Server_id End_log_pos Info +include/show_binlog_events.inc # Switch to connection con1 INSERT INTO t1 VALUES (1); # Switch to connection con2 -show binlog events from <binlog_start>; -Log_name Pos Event_type Server_id End_log_pos Info +include/show_binlog_events.inc UNLOCK TABLES; # Switch to connection con1 DROP TABLE t1; diff --git a/mysql-test/r/flush_read_lock.result b/mysql-test/r/flush_read_lock.result index cd7083405bf..c2e8531d01f 100644 --- a/mysql-test/r/flush_read_lock.result +++ b/mysql-test/r/flush_read_lock.result @@ -431,7 +431,7 @@ Success: Was able to run 'execute stmt1' under FTWRL. Success: Was able to run 'execute stmt1' with FTWRL active in another connection. Success: Was able to run FTWRL while 'execute stmt1' was active in another connection. deallocate prepare stmt1; -call mtr.add_suppression("Slave SQL.*Can.t execute the query because you have a conflicting read lock., Error_code: 1223"); +call mtr.add_suppression("Slave SQL.*Can.t execute the query because you have a conflicting read lock., error.* 1223"); # # 9.2.b) EXECUTE for statement which is incompatible with FTWRL # should be also incompatible. @@ -544,11 +544,10 @@ Success: Was not able to run 'drop table t2_base' under FTWRL. Success: 'drop table t2_base' is blocked by FTWRL active in another connection. Success: FTWRL is blocked when 'drop table t2_base' is active in another connection. # 13.1.b) DROP TABLES which affects only temporary tables -# in theory can be compatible with FTWRL. -# In practice it is not yet. -Success: Was not able to run 'drop table t2_temp' under FTWRL. -Success: 'drop table t2_temp' is blocked by FTWRL active in another connection. -Success: FTWRL is blocked when 'drop table t2_temp' is active in another connection. +# is compatible with FTWRL. +Success: Was able to run 'drop table t2_temp' under FTWRL. +Success: Was able to run 'drop table t2_temp' with FTWRL active in another connection. +Success: Was able to run FTWRL while 'drop table t2_temp' was active in another connection. # # 13.1.c) DROP TEMPORARY TABLES should be compatible with FTWRL. Success: Was able to run 'drop temporary table t2_temp' under FTWRL. @@ -1461,24 +1460,10 @@ Success: Was able to run 'analyze table t3_temp_trans' under FTWRL. Success: Was able to run 'analyze table t3_temp_trans' with FTWRL active in another connection. Success: Was able to run FTWRL while 'analyze table t3_temp_trans' was active in another connection. # -# 39.2.c) Some statements do implicit commit and not -# considered read-only. As result they are -# not compatible with FTWRL. -# -flush tables with read lock; -# Implicit commits are allowed under FTWRL. -alter table t3_temp_trans add column c1 int; -unlock tables; -# -# Switching to connection 'con1'. -flush tables with read lock; -# Switching to connection 'default'. -alter table t3_temp_trans drop column c1; -# Switching to connection 'con1'. -# Check that ALTER TABLE is blocked. -unlock tables; -# Switching to connection 'default'. -# Reap ALTER TABLE +# And ALTER TABLE: +Success: Was able to run 'alter table t3_temp_trans add column c1 int' under FTWRL. +Success: Was able to run 'alter table t3_temp_trans add column c1 int' with FTWRL active in another connection. +Success: Was able to run FTWRL while 'alter table t3_temp_trans add column c1 int' was active in another connection. # # 40) Test effect of implicit commit for DDL which is otherwise # compatible with FTWRL. Implicit commit at the start of DDL diff --git a/mysql-test/r/frm_bad_row_type-7333.result b/mysql-test/r/frm_bad_row_type-7333.result index 198b494d3f8..4df3b70fc9f 100644 --- a/mysql-test/r/frm_bad_row_type-7333.result +++ b/mysql-test/r/frm_bad_row_type-7333.result @@ -7,8 +7,8 @@ bad_row_type CREATE TABLE `bad_row_type` ( `category_id` int(11) NOT NULL AUTO_INCREMENT, `category_name` varchar(255) DEFAULT NULL, PRIMARY KEY (`category_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 +) ENGINE=MyISAM DEFAULT CHARSET=utf8 /* `compression`='tokudb_zlib' */ show table status like 'bad_row_type'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -bad_row_type MyISAM 10 Dynamic 0 0 0 281474976710655 1024 0 1 x x NULL utf8_general_ci NULL +bad_row_type MyISAM 10 Dynamic 0 0 0 281474976710655 1024 0 1 x x NULL utf8_general_ci NULL `compression`='tokudb_zlib' drop table bad_row_type; diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index ad93bfcd462..8bf948e0d72 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -602,8 +602,8 @@ WHERE t3.a=t1.a AND MATCH(b2) AGAINST('scargill' IN BOOLEAN MODE) ); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where -2 DEPENDENT SUBQUERY t2 fulltext b2 b2 0 1 Using where -2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 Using where +2 MATERIALIZED t2 fulltext b2 b2 0 1 Using where +2 MATERIALIZED t3 ALL NULL NULL NULL NULL 2 Using where # should return 0 SELECT count(*) FROM t1 WHERE not exists( @@ -744,3 +744,14 @@ DROP TABLE t1; # # End of 5.5 tests # +CREATE TABLE t1 ( +id int(11) auto_increment, +title varchar(100) default '', +PRIMARY KEY (id), +KEY ind5 (title) +) ENGINE=MyISAM; +CREATE FULLTEXT INDEX IF NOT EXISTS ft1 ON t1(title); +CREATE FULLTEXT INDEX IF NOT EXISTS ft1 ON t1(title); +Warnings: +Note 1061 Duplicate key name 'ft1' +DROP TABLE t1; diff --git a/mysql-test/r/func_analyse.result b/mysql-test/r/func_analyse.result index f82439090f6..2c300559a32 100644 --- a/mysql-test/r/func_analyse.result +++ b/mysql-test/r/func_analyse.result @@ -128,7 +128,7 @@ End of 5.0 tests # DROP TABLE IF EXISTS t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE t1 (a VARCHAR(2) CHARSET UTF8 NOT NULL); INSERT INTO t1 VALUES ('e'),('e'),('e-'); SELECT * FROM t1 PROCEDURE ANALYSE(); diff --git a/mysql-test/r/func_concat.result b/mysql-test/r/func_concat.result index 925158ab129..b87ee7bfc52 100644 --- a/mysql-test/r/func_concat.result +++ b/mysql-test/r/func_concat.result @@ -149,3 +149,116 @@ CALL p1(); ########################################40100.000 DROP PROCEDURE p1; # End of 5.1 tests +# +# Start of 10.0 tests +# +# +# MDEV-10306 Wrong results with combination of CONCAT, SUBSTR and CONVERT in subquery +# +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch='derived_merge=on'; +CREATE TABLE t1 (t VARCHAR(10) CHARSET latin1); +INSERT INTO t1 VALUES('1234567'); +SELECT CONCAT(SUBSTR(t2, 1, 3), SUBSTR(t2, 5)) c1, +CONCAT(SUBSTR(t2,1,3),'---',SUBSTR(t2,5)) c2 +FROM (SELECT CONVERT(t USING latin1) t2 FROM t1) sub; +c1 c2 +123567 123---567 +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT CONVERT(t USING latin1) t2 FROM t1) sub; +c2 +1234567-1234567 +DROP TABLE t1; +CREATE TABLE t1 (t VARCHAR(10) CHARSET latin1); +INSERT INTO t1 VALUES('1234567'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT CONVERT(t USING latin1) t2 FROM t1) sub; +c2 +1234567-1234567 +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT REVERSE(t) t2 FROM t1) sub; +c2 +7654321-7654321 +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT SOUNDEX(t) t2 FROM t1) sub; +c2 +- +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT TO_BASE64(t) t2 FROM t1) sub; +c2 +MTIzNDU2Nw==-MTIzNDU2Nw== +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT WEIGHT_STRING(t) t2 FROM t1) sub; +c2 +1234567-1234567 +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT HEX(t) t2 FROM t1) sub; +c2 +31323334353637-31323334353637 +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT QUOTE(t) t2 FROM t1) sub; +c2 +'1234567'-'1234567' +DROP TABLE t1; +CREATE TABLE t1 (t VARCHAR(32) CHARSET latin1); +INSERT INTO t1 VALUES(TO_BASE64('abcdefghi')); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT FROM_BASE64(t) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +DROP TABLE t1; +CREATE TABLE t1 (t VARCHAR(32) CHARSET latin1); +INSERT INTO t1 VALUES(HEX('abcdefghi')); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT UNHEX(t) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +DROP TABLE t1; +CREATE TABLE t1 (t VARCHAR(30) CHARSET latin1); +INSERT INTO t1 VALUES('test'); +SELECT LENGTH(CONCAT(t2)) c2 FROM (SELECT AES_ENCRYPT(t,'x') t2 FROM t1) sub; +c2 +16 +SELECT LENGTH(CONCAT(t2,'-',t2)) c2 FROM (SELECT AES_ENCRYPT(t,'x') t2 FROM t1) sub; +c2 +33 +SELECT LENGTH(CONCAT(t2,'--',t2)) c2 FROM (SELECT AES_ENCRYPT(t,'x') t2 FROM t1) sub; +c2 +34 +SELECT LENGTH(CONCAT(t2)) c2 FROM (SELECT AES_DECRYPT(AES_ENCRYPT(t,'x'),'x') t2 FROM t1) sub; +c2 +4 +SELECT LENGTH(CONCAT(t2,'-',t2)) c2 FROM (SELECT AES_DECRYPT(AES_ENCRYPT(t,'x'),'x') t2 FROM t1) sub; +c2 +9 +SELECT LENGTH(CONCAT(t2,'--',t2)) c2 FROM (SELECT AES_DECRYPT(AES_ENCRYPT(t,'x'),'x') t2 FROM t1) sub; +c2 +10 +DROP TABLE t1; +CREATE TABLE t1 (t VARCHAR(64) CHARSET latin1); +INSERT INTO t1 VALUES('123456789'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT MD5(t) t2 FROM t1) sub; +c2 +25f9e794323b453885f5181f1b624d0b-25f9e794323b453885f5181f1b624d0b +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT FORMAT(t,2) t2 FROM t1) sub; +c2 +123,456,789.00-123,456,789.00 +DROP TABLE t1; +CREATE TABLE t1 (t VARCHAR(32) CHARSET latin1); +INSERT INTO t1 VALUES('abcdefghi'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT INSERT(t,3,4,'xxx') t2 FROM t1) sub; +c2 +abxxxghi-abxxxghi +DROP TABLE t1; +CREATE TABLE t1 (t VARCHAR(10) CHARSET latin1); +INSERT INTO t1 VALUES('abcdefghi'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT LEFT(t,10) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT RIGHT(t,10) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT SUBSTR(t,1,10) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT LTRIM(t) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT RTRIM(t) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT TRIM(t) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; diff --git a/mysql-test/r/func_crypt.result b/mysql-test/r/func_crypt.result index c2f369b3941..707e767ddf5 100644 --- a/mysql-test/r/func_crypt.result +++ b/mysql-test/r/func_crypt.result @@ -43,7 +43,7 @@ old_password(NULL) NULL select password(NULL); password(NULL) -NULL + set global old_passwords=on; select password(''); password('') @@ -106,3 +106,21 @@ OLD_PASSWORD(c1) PASSWORD(c1) 77023ffe214c04ff *82E58A2C08AAFE72C8EB523069CD8ADB33F78F58 DROP TABLE t1; End of 5.0 tests +# +# Start of 10.0 tests +# +# +# MDEV-10306 Wrong results with combination of CONCAT, SUBSTR and CONVERT in subquery +# +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch='derived_merge=on'; +CREATE TABLE t1 (t VARCHAR(32) CHARSET latin1); +INSERT INTO t1 VALUES('abcdefghi'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT ENCRYPT(t,'aa') t2 FROM t1) sub; +c2 +aaHHlPHAM4sjs-aaHHlPHAM4sjs +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/func_encrypt_ucs2.result b/mysql-test/r/func_encrypt_ucs2.result index 2ca40434cae..5ab3b08fb5d 100644 --- a/mysql-test/r/func_encrypt_ucs2.result +++ b/mysql-test/r/func_encrypt_ucs2.result @@ -8,7 +8,7 @@ SELECT CONVERT(DES_ENCRYPT(0, CHAR('1' USING ucs2)),UNSIGNED); CONVERT(DES_ENCRYPT(0, CHAR('1' USING ucs2)),UNSIGNED) 0 Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' +Warning 1292 Truncated incorrect INTEGER value: '\xFFT\xDCiK\x92j\xE6\xFC' SELECT CHAR_LENGTH(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' USING ucs2))); CHAR_LENGTH(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' USING ucs2))) 4 diff --git a/mysql-test/r/func_group_innodb.result b/mysql-test/r/func_group_innodb.result index 9489960d28c..52d5922df95 100644 --- a/mysql-test/r/func_group_innodb.result +++ b/mysql-test/r/func_group_innodb.result @@ -236,12 +236,14 @@ SET storage_engine=@old_engine; # CREATE TABLE t1(a BLOB, b VARCHAR(255) CHARSET LATIN1, c INT, KEY(b, c, a(765))) ENGINE=INNODB; -INSERT INTO t1(a, b, c) VALUES ('', 'a', 0), ('', 'a', null), ('', 'a', 0); +INSERT INTO t1(a, b, c) VALUES +('', 'a', 0), ('', 'a', null), ('', 'a', 0), ('', 'a', null), ('', 'a', 0); +ANALYZE TABLE t1; SELECT MIN(c) FROM t1 GROUP BY b; MIN(c) 0 EXPLAIN SELECT MIN(c) FROM t1 GROUP BY b; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range NULL b 263 NULL 4 Using index for group-by +1 SIMPLE t1 range NULL b 263 NULL 3 Using index for group-by DROP TABLE t1; End of 5.5 tests diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result index 03ddbf5402b..c574244c2b4 100644 --- a/mysql-test/r/func_in.result +++ b/mysql-test/r/func_in.result @@ -818,3 +818,22 @@ select * from t1 where 1 in (a, name_const('a', null)); a 1 drop table t1; +# +# Start of 10.0 tests +# +# +# MDEV-10020 InnoDB NOT IN Query Crash When One Item Is NULL +# +CREATE TABLE t1 +( +a INT(11), +b VARCHAR(10), +KEY (b) +); +INSERT INTO t1 VALUES (1,'x'),(2,'y'),(3,'z'); +SELECT * FROM t1 WHERE b NOT IN (NULL, '', 'A'); +a b +DROP TABLE t1; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/func_like.result b/mysql-test/r/func_like.result index 39590eb1c99..8d72b818cf8 100644 --- a/mysql-test/r/func_like.result +++ b/mysql-test/r/func_like.result @@ -188,3 +188,15 @@ DROP TABLE t1, t2; SELECT '' LIKE '1' ESCAPE COUNT(1); ERROR HY000: Incorrect arguments to ESCAPE End of 5.1 tests +# +# Start of 10.0 tests +# +# +# MDEV-5445 Server crashes in Item_func_like::fix_fields on LIKE ExtractValue(..) +# +SELECT 'a' LIKE REPEAT('',0); +'a' LIKE REPEAT('',0) +0 +SELECT 'a' LIKE EXTRACTVALUE('bar','qux'); +'a' LIKE EXTRACTVALUE('bar','qux') +0 diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 66bbb25b309..32352dddd86 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -733,6 +733,21 @@ select (1.175494351E-37 div 1.7976931348623157E+308); Warnings: Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated. # +# Bug#12744991 - DECIMAL_ROUND(X,D) GIVES WRONG RESULTS WHEN D == N*(-9) +# +select round(999999999, -9); +round(999999999, -9) +1000000000 +select round(999999999.0, -9); +round(999999999.0, -9) +1000000000 +select round(999999999999999999, -18); +round(999999999999999999, -18) +1000000000000000000 +select round(999999999999999999.0, -18); +round(999999999999999999.0, -18) +1000000000000000000 +# # Bug#12537160 ASSERTION FAILED: # STOP0 <= &TO->BUF[TO->LEN] WITH LARGE NUMBER. # @@ -773,3 +788,12 @@ DROP TABLE t1; # # End of 5.5 tests # +# +# MDEV-5781 Item_sum_std::val_real(): Assertion `nr >= 0.0' fails on query with STDDEV_POP, ROUND and variable +# +SELECT STDDEV_POP(ROUND(0,@A:=2009)) FROM (SELECT 1 UNION SELECT 2) fake_table; +STDDEV_POP(ROUND(0,@A:=2009)) +0.0000 +# +# End of 10.0 tests +# diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index 1c106acf333..d54a70cab45 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -571,9 +571,6 @@ AND 57813X540X1723 = 'Test'; N AVG 0 NULL drop table t1; -# -# End of 5.5 tests -# SELECT NAME_CONST('a', -(1 OR 2)) OR 1; ERROR HY000: Incorrect arguments to NAME_CONST SELECT NAME_CONST('a', -(1 AND 2)) OR 1; @@ -581,3 +578,846 @@ ERROR HY000: Incorrect arguments to NAME_CONST SELECT NAME_CONST('a', -(1)) OR 1; NAME_CONST('a', -(1)) OR 1 1 +# +# End of 5.5 tests +# +# +# GET_LOCK, RELEASE_LOCK, IS_USED_LOCK functions test +# +# IS_USED_LOCK, IS_FREE_LOCK: the lock is not acquired +# Note: IS_USED_LOCK returns NULL if the lock is unused +select is_used_lock('test'); +is_used_lock('test') +NULL +select is_free_lock('test'); +is_free_lock('test') +1 +# GET_LOCK returns 1 if it manages to acquire a lock +select get_lock('test', 0); +get_lock('test', 0) +1 +# IS_USED_LOCK, IS_FREE_LOCK: the lock is acquired +select is_free_lock('test'); +is_free_lock('test') +0 +select is_used_lock('test') = connection_id(); +is_used_lock('test') = connection_id() +1 +# -> Switching to connection 'con1' +# IS_USED_LOCK, IS_FREE_LOCK: the lock is acquired in another +# connection +select is_used_lock('test') = connection_id(); +is_used_lock('test') = connection_id() +0 +select is_free_lock('test'); +is_free_lock('test') +0 +# GET_LOCK returns 0 if it can't acquire a lock (wait timeout) +select get_lock('test', 0); +get_lock('test', 0) +0 +# RELEASE_LOCK returns 0 if the lock belongs to another connection +select release_lock('test'); +release_lock('test') +0 +# -> Switching to connection 'default' +# RELEASE_LOCK returns 1 if it successfully releases a lock +select release_lock('test'); +release_lock('test') +1 +# RELEASE_LOCK returns NULL if it doesn't release a lock and there is no such lock +select release_lock('test'); +release_lock('test') +NULL +# Test that get_lock() returns NULL if error. +select get_lock('test', 0); +get_lock('test', 0) +1 +# -> Switching to connection 'con1' +create table t1 select connection_id() as id; +select get_lock('test', 7200); +# -> Switching to connection 'default' +select (@id := id) - id from t1; +(@id := id) - id +0 +kill query @id; +# -> Switching to connection 'con1' +get_lock('test', 7200) +NULL +# -> Switching to connection 'default' +# GET_LOCK() works recursively +select get_lock('test', 0); +get_lock('test', 0) +1 +select get_lock('test', 0); +get_lock('test', 0) +1 +select get_lock('test', 0); +get_lock('test', 0) +1 +# RELEASE_LOCK() needs to be called recursively then, too +select release_lock('test'); +release_lock('test') +1 +select release_lock('test'); +release_lock('test') +1 +select release_lock('test'); +release_lock('test') +1 +# Once the last instance of the lock is released, +# the next call returns NULL +select release_lock('test'); +release_lock('test') +1 +# Multiple locks in the same session are OK +select get_lock('test1', 0); +get_lock('test1', 0) +1 +select get_lock('test2', 0); +get_lock('test2', 0) +1 +select get_lock('test3', 0); +get_lock('test3', 0) +1 +select release_lock('test1'); +release_lock('test1') +1 +select release_lock('test2'); +release_lock('test2') +1 +select release_lock('test3'); +release_lock('test3') +1 +# Deadlocks are detected e.g. in case of a mutual wait +select get_lock('test1', 0); +get_lock('test1', 0) +1 +# -> Switching to connection 'con1' +select get_lock('test2', 0); +get_lock('test2', 0) +1 +select get_lock('test1', 7200); +# -> Switching to connection 'default' +select get_lock('test2', 7200); +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +select release_lock('test1'); +release_lock('test1') +1 +# -> Switching to connection 'con1' +get_lock('test1', 7200) +1 +select release_lock('test2'); +release_lock('test2') +1 +select release_lock('test1'); +release_lock('test1') +1 +# -> Switching to connection 'default' +# LOCK/UNLOCK TABLES works fine with a user lock. +lock table t1 write; +select get_lock('test', 0); +get_lock('test', 0) +1 +unlock tables; +commit; +select release_lock('test'); +release_lock('test') +1 +# GLOBAL READ LOCK works with fine with user locks +select get_lock('test1', 0); +get_lock('test1', 0) +1 +flush tables with read lock; +select get_lock('test2', 0); +get_lock('test2', 0) +1 +unlock tables; +commit; +select release_lock('test1'); +release_lock('test1') +1 +select release_lock('test2'); +release_lock('test2') +1 +# BEGIN/COMMIT/ROLLBACK don't unlock user locks. +begin; +select get_lock('test1', 0); +get_lock('test1', 0) +1 +select get_lock('test2', 0); +get_lock('test2', 0) +1 +select count(*) from t1; +count(*) +1 +rollback; +select release_lock('test1'); +release_lock('test1') +1 +select release_lock('test2'); +release_lock('test2') +1 +# Deadlocks between user locks and LOCK TABLES locks +# are detected OK. +select get_lock('test', 0); +get_lock('test', 0) +1 +# -> Switching to connection 'con1' +lock table t1 write; +select get_lock('test', 7200); +# -> Switching to connection 'default' +lock table t1 read; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +select release_lock('test'); +release_lock('test') +1 +# -> Switching to connection 'con1' +get_lock('test', 7200) +1 +select release_lock('test'); +release_lock('test') +1 +unlock tables; +# cleanup +drop table t1; +# check too long identifier names +select get_lock(repeat('a', 192), 0); +get_lock(repeat('a', 192), 0) +1 +select is_used_lock(repeat('a', 192)) = connection_id(); +is_used_lock(repeat('a', 192)) = connection_id() +1 +select is_free_lock(repeat('a', 192)); +is_free_lock(repeat('a', 192)) +0 +select release_lock(repeat('a', 192)); +release_lock(repeat('a', 192)) +1 +select get_lock(repeat('a', 193), 0); +ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long +select is_used_lock(repeat('a', 193)); +ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long +select is_free_lock(repeat('a', 193)); +ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long +select release_lock(repeat('a', 193)); +ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long + +# -- +# -- WL#5787: IPv6-capable INET_ATON and INET_NTOA functions. +# -- + +# -- INET6_ATON: checking NULL, invalid types, out-of range values... + +SELECT INET6_ATON(NULL) IS NULL; +INET6_ATON(NULL) IS NULL +1 +SELECT INET6_ATON(123) IS NULL; +INET6_ATON(123) IS NULL +1 +SELECT INET6_ATON(123.45) IS NULL; +INET6_ATON(123.45) IS NULL +1 +SELECT INET6_ATON(NOW()) IS NULL; +INET6_ATON(NOW()) IS NULL +1 +SELECT INET6_ATON('1.2.3') IS NULL; +INET6_ATON('1.2.3') IS NULL +1 +SELECT INET6_ATON('1.2.3.') IS NULL; +INET6_ATON('1.2.3.') IS NULL +1 +SELECT INET6_ATON('1..3.4') IS NULL; +INET6_ATON('1..3.4') IS NULL +1 +SELECT INET6_ATON('-1.2.3.4') IS NULL; +INET6_ATON('-1.2.3.4') IS NULL +1 +SELECT INET6_ATON('1.2.3.256') IS NULL; +INET6_ATON('1.2.3.256') IS NULL +1 +SELECT INET6_ATON('1.2.3.4.5') IS NULL; +INET6_ATON('1.2.3.4.5') IS NULL +1 +SELECT INET6_ATON('0001.2.3.4') IS NULL; +INET6_ATON('0001.2.3.4') IS NULL +1 +SELECT INET6_ATON('0x1.2.3.4') IS NULL; +INET6_ATON('0x1.2.3.4') IS NULL +1 +SELECT INET6_ATON('a.2.3.4') IS NULL; +INET6_ATON('a.2.3.4') IS NULL +1 +SELECT INET6_ATON('1.2.3.4:80') IS NULL; +INET6_ATON('1.2.3.4:80') IS NULL +1 +SELECT INET6_ATON('1.2.3.4/32') IS NULL; +INET6_ATON('1.2.3.4/32') IS NULL +1 +SELECT INET6_ATON('mysql.com') IS NULL; +INET6_ATON('mysql.com') IS NULL +1 +SELECT INET6_ATON(':::') IS NULL; +INET6_ATON(':::') IS NULL +1 +SELECT INET6_ATON(':1:2:3') IS NULL; +INET6_ATON(':1:2:3') IS NULL +1 +SELECT INET6_ATON('1:2:3:') IS NULL; +INET6_ATON('1:2:3:') IS NULL +1 +SELECT INET6_ATON(':1::2:3') IS NULL; +INET6_ATON(':1::2:3') IS NULL +1 +SELECT INET6_ATON('1::2:3:') IS NULL; +INET6_ATON('1::2:3:') IS NULL +1 +SELECT INET6_ATON('::00001') IS NULL; +INET6_ATON('::00001') IS NULL +1 +SELECT INET6_ATON('::00001:2') IS NULL; +INET6_ATON('::00001:2') IS NULL +1 +SELECT INET6_ATON('::12345') IS NULL; +INET6_ATON('::12345') IS NULL +1 +SELECT INET6_ATON('1020::3040::5060') IS NULL; +INET6_ATON('1020::3040::5060') IS NULL +1 +SELECT INET6_ATON('::ABCZ') IS NULL; +INET6_ATON('::ABCZ') IS NULL +1 +SELECT INET6_ATON('::0x1.2.3.4') IS NULL; +INET6_ATON('::0x1.2.3.4') IS NULL +1 +SELECT INET6_ATON('::1.0x2.3.4') IS NULL; +INET6_ATON('::1.0x2.3.4') IS NULL +1 +SELECT INET6_ATON('::a.b.c.d') IS NULL; +INET6_ATON('::a.b.c.d') IS NULL +1 +SELECT INET6_ATON('::FFFF:0x1.2.3.4') IS NULL; +INET6_ATON('::FFFF:0x1.2.3.4') IS NULL +1 +SELECT INET6_ATON('::FFFF:1.0x2.3.4') IS NULL; +INET6_ATON('::FFFF:1.0x2.3.4') IS NULL +1 +SELECT INET6_ATON('::FFFF:a.b.c.d') IS NULL; +INET6_ATON('::FFFF:a.b.c.d') IS NULL +1 +SELECT INET6_ATON('::1.2.3.4:ABCD') IS NULL; +INET6_ATON('::1.2.3.4:ABCD') IS NULL +1 +# NOTE: such addresses are supported because getaddrinfo() supports them. +# This is just to record the current behaviour. +SELECT HEX(INET6_ATON('::ABCD:1.2.3.4')); +HEX(INET6_ATON('::ABCD:1.2.3.4')) +00000000000000000000ABCD01020304 + +# -- INET6_ATON: checking binary representation... + +SELECT HEX(INET6_ATON('0.0.0.0')); +HEX(INET6_ATON('0.0.0.0')) +00000000 +SELECT HEX(INET6_ATON('00.00.00.00')); +HEX(INET6_ATON('00.00.00.00')) +00000000 +SELECT HEX(INET6_ATON('000.000.000.000')); +HEX(INET6_ATON('000.000.000.000')) +00000000 +SELECT HEX(INET6_ATON('1.2.3.4')); +HEX(INET6_ATON('1.2.3.4')) +01020304 +SELECT HEX(INET6_ATON('01.02.03.04')); +HEX(INET6_ATON('01.02.03.04')) +01020304 +SELECT HEX(INET6_ATON('001.002.003.004')); +HEX(INET6_ATON('001.002.003.004')) +01020304 +SELECT HEX(INET6_ATON('255.255.255.255')); +HEX(INET6_ATON('255.255.255.255')) +FFFFFFFF +SELECT HEX(INET6_ATON('::')); +HEX(INET6_ATON('::')) +00000000000000000000000000000000 +SELECT HEX(INET6_ATON('0::0')); +HEX(INET6_ATON('0::0')) +00000000000000000000000000000000 +SELECT HEX(INET6_ATON('1::2')); +HEX(INET6_ATON('1::2')) +00010000000000000000000000000002 +SELECT HEX(INET6_ATON('0::')); +HEX(INET6_ATON('0::')) +00000000000000000000000000000000 +SELECT HEX(INET6_ATON('1::')); +HEX(INET6_ATON('1::')) +00010000000000000000000000000000 +SELECT HEX(INET6_ATON('::0')); +HEX(INET6_ATON('::0')) +00000000000000000000000000000000 +SELECT HEX(INET6_ATON('::1')); +HEX(INET6_ATON('::1')) +00000000000000000000000000000001 +SELECT HEX(INET6_ATON('1:2:3:4:5:6:7:8')); +HEX(INET6_ATON('1:2:3:4:5:6:7:8')) +00010002000300040005000600070008 +SELECT HEX(INET6_ATON('::2:3:4:5:6:7:8')); +HEX(INET6_ATON('::2:3:4:5:6:7:8')) +00000002000300040005000600070008 +SELECT HEX(INET6_ATON('1::3:4:5:6:7:8')); +HEX(INET6_ATON('1::3:4:5:6:7:8')) +00010000000300040005000600070008 +SELECT HEX(INET6_ATON('1:2::4:5:6:7:8')); +HEX(INET6_ATON('1:2::4:5:6:7:8')) +00010002000000040005000600070008 +SELECT HEX(INET6_ATON('1:2:3::5:6:7:8')); +HEX(INET6_ATON('1:2:3::5:6:7:8')) +00010002000300000005000600070008 +SELECT HEX(INET6_ATON('1:2:3:4::6:7:8')); +HEX(INET6_ATON('1:2:3:4::6:7:8')) +00010002000300040000000600070008 +SELECT HEX(INET6_ATON('1:2:3:4:5::7:8')); +HEX(INET6_ATON('1:2:3:4:5::7:8')) +00010002000300040005000000070008 +SELECT HEX(INET6_ATON('1:2:3:4:5:6::8')); +HEX(INET6_ATON('1:2:3:4:5:6::8')) +00010002000300040005000600000008 +SELECT HEX(INET6_ATON('1:2:3:4:5:6:7::')); +HEX(INET6_ATON('1:2:3:4:5:6:7::')) +00010002000300040005000600070000 +SELECT HEX(INET6_ATON('0000:0000::0000:0001')); +HEX(INET6_ATON('0000:0000::0000:0001')) +00000000000000000000000000000001 +SELECT HEX(INET6_ATON('1234:5678:9abc:def0:4321:8765:cba9:0fed')); +HEX(INET6_ATON('1234:5678:9abc:def0:4321:8765:cba9:0fed')) +123456789ABCDEF043218765CBA90FED +SELECT HEX(INET6_ATON('0000:0000:0000:0000:0000:0000:0000:0001')); +HEX(INET6_ATON('0000:0000:0000:0000:0000:0000:0000:0001')) +00000000000000000000000000000001 +SELECT HEX(INET6_ATON('::C0A8:0102')); +HEX(INET6_ATON('::C0A8:0102')) +000000000000000000000000C0A80102 +SELECT HEX(INET6_ATON('::c0a8:0102')); +HEX(INET6_ATON('::c0a8:0102')) +000000000000000000000000C0A80102 +SELECT HEX(INET6_ATON('::192.168.1.2')); +HEX(INET6_ATON('::192.168.1.2')) +000000000000000000000000C0A80102 +SELECT HEX(INET6_ATON('::FfFf:C0a8:0102')); +HEX(INET6_ATON('::FfFf:C0a8:0102')) +00000000000000000000FFFFC0A80102 +SELECT HEX(INET6_ATON('::ffff:c0a8:0102')); +HEX(INET6_ATON('::ffff:c0a8:0102')) +00000000000000000000FFFFC0A80102 +SELECT HEX(INET6_ATON('::ffff:192.168.1.2')); +HEX(INET6_ATON('::ffff:192.168.1.2')) +00000000000000000000FFFFC0A80102 +SELECT HEX(INET6_ATON('::01.2.3.4')); +HEX(INET6_ATON('::01.2.3.4')) +00000000000000000000000001020304 +SELECT HEX(INET6_ATON('::1.02.3.4')); +HEX(INET6_ATON('::1.02.3.4')) +00000000000000000000000001020304 +SELECT HEX(INET6_ATON('::1.2.03.4')); +HEX(INET6_ATON('::1.2.03.4')) +00000000000000000000000001020304 +SELECT HEX(INET6_ATON('::1.2.3.04')); +HEX(INET6_ATON('::1.2.3.04')) +00000000000000000000000001020304 +SELECT HEX(INET6_ATON('::1.2.3.00')); +HEX(INET6_ATON('::1.2.3.00')) +00000000000000000000000001020300 +SELECT HEX(INET6_ATON('::FFFF:01.2.3.4')); +HEX(INET6_ATON('::FFFF:01.2.3.4')) +00000000000000000000FFFF01020304 +SELECT HEX(INET6_ATON('::FFFF:1.02.3.4')); +HEX(INET6_ATON('::FFFF:1.02.3.4')) +00000000000000000000FFFF01020304 +SELECT HEX(INET6_ATON('::FFFF:1.2.03.4')); +HEX(INET6_ATON('::FFFF:1.2.03.4')) +00000000000000000000FFFF01020304 +SELECT HEX(INET6_ATON('::FFFF:1.2.3.04')); +HEX(INET6_ATON('::FFFF:1.2.3.04')) +00000000000000000000FFFF01020304 +SELECT HEX(INET6_ATON('::FFFF:1.2.3.00')); +HEX(INET6_ATON('::FFFF:1.2.3.00')) +00000000000000000000FFFF01020300 + +# -- INET6_ATON: checking the length is either 4 or 16... + +SELECT LENGTH(INET6_ATON('0.0.0.0')); +LENGTH(INET6_ATON('0.0.0.0')) +4 +SELECT LENGTH(INET6_ATON('255.255.255.255')); +LENGTH(INET6_ATON('255.255.255.255')) +4 +SELECT LENGTH(INET6_ATON('::')); +LENGTH(INET6_ATON('::')) +16 +SELECT LENGTH(INET6_ATON('1020:3040:5060:7080:90A0:B0C0:D0E0:F010')); +LENGTH(INET6_ATON('1020:3040:5060:7080:90A0:B0C0:D0E0:F010')) +16 + +# -- INET6_NTOA: checking NULL, invalid types, out-of range values... + +SELECT INET6_NTOA(NULL); +INET6_NTOA(NULL) +NULL +SELECT INET6_NTOA(123); +INET6_NTOA(123) +NULL +SELECT INET6_NTOA(123.456); +INET6_NTOA(123.456) +NULL +SELECT INET6_NTOA(NOW()); +INET6_NTOA(NOW()) +NULL +SELECT INET6_NTOA(UNHEX('C0A801')); +INET6_NTOA(UNHEX('C0A801')) +NULL +SELECT INET6_NTOA(UNHEX('C0A80102')); +INET6_NTOA(UNHEX('C0A80102')) +192.168.1.2 +SELECT INET6_NTOA(UNHEX('C0A8010203')); +INET6_NTOA(UNHEX('C0A8010203')) +NULL +SELECT INET6_NTOA(UNHEX('0102030405060708090A0B0C0D0E0F')); +INET6_NTOA(UNHEX('0102030405060708090A0B0C0D0E0F')) +NULL +SELECT INET6_NTOA(UNHEX('0102030405060708090A0B0C0D0E0F10')); +INET6_NTOA(UNHEX('0102030405060708090A0B0C0D0E0F10')) +102:304:506:708:90a:b0c:d0e:f10 +SELECT INET6_NTOA(UNHEX('0102030405060708090A0B0C0D0E0F1011')); +INET6_NTOA(UNHEX('0102030405060708090A0B0C0D0E0F1011')) +NULL +SELECT INET6_NTOA('1234'), INET6_NTOA(BINARY('1234')); +INET6_NTOA('1234') INET6_NTOA(BINARY('1234')) +NULL 49.50.51.52 +SELECT INET6_NTOA('0123456789abcdef'), INET6_NTOA(BINARY('0123456789abcdef')); +INET6_NTOA('0123456789abcdef') INET6_NTOA(BINARY('0123456789abcdef')) +NULL 3031:3233:3435:3637:3839:6162:6364:6566 + +# -- Checking double-conversion... + +SELECT INET6_NTOA(INET6_ATON('::')); +INET6_NTOA(INET6_ATON('::')) +:: +SELECT INET6_NTOA(INET6_ATON('0::0')); +INET6_NTOA(INET6_ATON('0::0')) +:: +SELECT INET6_NTOA(INET6_ATON('1::2')); +INET6_NTOA(INET6_ATON('1::2')) +1::2 +SELECT INET6_NTOA(INET6_ATON('0::')); +INET6_NTOA(INET6_ATON('0::')) +:: +SELECT INET6_NTOA(INET6_ATON('1::')); +INET6_NTOA(INET6_ATON('1::')) +1:: +SELECT INET6_NTOA(INET6_ATON('::0')); +INET6_NTOA(INET6_ATON('::0')) +:: +SELECT INET6_NTOA(INET6_ATON('::1')); +INET6_NTOA(INET6_ATON('::1')) +::1 +SELECT INET6_NTOA(INET6_ATON('1:2:3:4:5:6:7:8')); +INET6_NTOA(INET6_ATON('1:2:3:4:5:6:7:8')) +1:2:3:4:5:6:7:8 +SELECT INET6_NTOA(INET6_ATON('::2:3:4:5:6:7:8')); +INET6_NTOA(INET6_ATON('::2:3:4:5:6:7:8')) +::2:3:4:5:6:7:8 +SELECT INET6_NTOA(INET6_ATON('1::3:4:5:6:7:8')); +INET6_NTOA(INET6_ATON('1::3:4:5:6:7:8')) +1::3:4:5:6:7:8 +SELECT INET6_NTOA(INET6_ATON('1:2::4:5:6:7:8')); +INET6_NTOA(INET6_ATON('1:2::4:5:6:7:8')) +1:2::4:5:6:7:8 +SELECT INET6_NTOA(INET6_ATON('1:2:3::5:6:7:8')); +INET6_NTOA(INET6_ATON('1:2:3::5:6:7:8')) +1:2:3::5:6:7:8 +SELECT INET6_NTOA(INET6_ATON('1:2:3:4::6:7:8')); +INET6_NTOA(INET6_ATON('1:2:3:4::6:7:8')) +1:2:3:4::6:7:8 +SELECT INET6_NTOA(INET6_ATON('1:2:3:4:5::7:8')); +INET6_NTOA(INET6_ATON('1:2:3:4:5::7:8')) +1:2:3:4:5::7:8 +SELECT INET6_NTOA(INET6_ATON('1:2:3:4:5:6::8')); +INET6_NTOA(INET6_ATON('1:2:3:4:5:6::8')) +1:2:3:4:5:6::8 +SELECT INET6_NTOA(INET6_ATON('1:2:3:4:5:6:7::')); +INET6_NTOA(INET6_ATON('1:2:3:4:5:6:7::')) +1:2:3:4:5:6:7:: +SELECT INET6_NTOA(INET6_ATON('0000:0000::0000:0001')); +INET6_NTOA(INET6_ATON('0000:0000::0000:0001')) +::1 +SELECT INET6_NTOA(INET6_ATON('1234:5678:9abc:def0:4321:8765:cba9:0fed')); +INET6_NTOA(INET6_ATON('1234:5678:9abc:def0:4321:8765:cba9:0fed')) +1234:5678:9abc:def0:4321:8765:cba9:fed +SELECT INET6_NTOA(INET6_ATON('0000:0000:0000:0000:0000:0000:0000:0001')); +INET6_NTOA(INET6_ATON('0000:0000:0000:0000:0000:0000:0000:0001')) +::1 +SELECT INET6_NTOA(INET6_ATON('::C0A8:0102')); +INET6_NTOA(INET6_ATON('::C0A8:0102')) +::192.168.1.2 +SELECT INET6_NTOA(INET6_ATON('::c0a8:0102')); +INET6_NTOA(INET6_ATON('::c0a8:0102')) +::192.168.1.2 +SELECT INET6_NTOA(INET6_ATON('::192.168.1.2')); +INET6_NTOA(INET6_ATON('::192.168.1.2')) +::192.168.1.2 +SELECT INET6_NTOA(INET6_ATON('::FfFf:C0a8:0102')); +INET6_NTOA(INET6_ATON('::FfFf:C0a8:0102')) +::ffff:192.168.1.2 +SELECT INET6_NTOA(INET6_ATON('::ffff:c0a8:0102')); +INET6_NTOA(INET6_ATON('::ffff:c0a8:0102')) +::ffff:192.168.1.2 +SELECT INET6_NTOA(INET6_ATON('::ffff:192.168.1.2')); +INET6_NTOA(INET6_ATON('::ffff:192.168.1.2')) +::ffff:192.168.1.2 +SELECT INET6_NTOA(INET6_ATON('::01.2.3.4')); +INET6_NTOA(INET6_ATON('::01.2.3.4')) +::1.2.3.4 +SELECT INET6_NTOA(INET6_ATON('::1.02.3.4')); +INET6_NTOA(INET6_ATON('::1.02.3.4')) +::1.2.3.4 +SELECT INET6_NTOA(INET6_ATON('::1.2.03.4')); +INET6_NTOA(INET6_ATON('::1.2.03.4')) +::1.2.3.4 +SELECT INET6_NTOA(INET6_ATON('::1.2.3.04')); +INET6_NTOA(INET6_ATON('::1.2.3.04')) +::1.2.3.4 +SELECT INET6_NTOA(INET6_ATON('::1.2.3.00')); +INET6_NTOA(INET6_ATON('::1.2.3.00')) +::1.2.3.0 +SELECT INET6_NTOA(INET6_ATON('::FFFF:01.2.3.4')); +INET6_NTOA(INET6_ATON('::FFFF:01.2.3.4')) +::ffff:1.2.3.4 +SELECT INET6_NTOA(INET6_ATON('::FFFF:1.02.3.4')); +INET6_NTOA(INET6_ATON('::FFFF:1.02.3.4')) +::ffff:1.2.3.4 +SELECT INET6_NTOA(INET6_ATON('::FFFF:1.2.03.4')); +INET6_NTOA(INET6_ATON('::FFFF:1.2.03.4')) +::ffff:1.2.3.4 +SELECT INET6_NTOA(INET6_ATON('::FFFF:1.2.3.04')); +INET6_NTOA(INET6_ATON('::FFFF:1.2.3.04')) +::ffff:1.2.3.4 +SELECT INET6_NTOA(INET6_ATON('::FFFF:1.2.3.00')); +INET6_NTOA(INET6_ATON('::FFFF:1.2.3.00')) +::ffff:1.2.3.0 + +# -- Comparing INET_ATON() and INET6_ATON()... + +SELECT HEX(INET_ATON('192.168.1.2')); +HEX(INET_ATON('192.168.1.2')) +C0A80102 +SELECT HEX(INET6_ATON('192.168.1.2')); +HEX(INET6_ATON('192.168.1.2')) +C0A80102 +SELECT HEX(INET_ATON('255.255.255.255')); +HEX(INET_ATON('255.255.255.255')) +FFFFFFFF +SELECT HEX(INET6_ATON('255.255.255.255')); +HEX(INET6_ATON('255.255.255.255')) +FFFFFFFF +SELECT HEX(INET_ATON('192.168.08.2')); +HEX(INET_ATON('192.168.08.2')) +C0A80802 +SELECT HEX(INET6_ATON('192.168.08.2')); +HEX(INET6_ATON('192.168.08.2')) +C0A80802 +SELECT HEX(INET_ATON('192.168.0x8.2')); +HEX(INET_ATON('192.168.0x8.2')) +NULL +SELECT HEX(INET6_ATON('192.168.0x8.2')); +HEX(INET6_ATON('192.168.0x8.2')) +NULL +SELECT HEX(INET_ATON('1.2.255')); +HEX(INET_ATON('1.2.255')) +10200FF +SELECT HEX(INET6_ATON('1.2.255')); +HEX(INET6_ATON('1.2.255')) +NULL +SELECT HEX(INET_ATON('1.2.256')); +HEX(INET_ATON('1.2.256')) +NULL +SELECT HEX(INET6_ATON('1.2.256')); +HEX(INET6_ATON('1.2.256')) +NULL +SELECT HEX(INET_ATON('1.0002.3.4')); +HEX(INET_ATON('1.0002.3.4')) +1020304 +SELECT HEX(INET6_ATON('1.0002.3.4')); +HEX(INET6_ATON('1.0002.3.4')) +NULL +SELECT HEX(INET_ATON('1.2.3.4.5')); +HEX(INET_ATON('1.2.3.4.5')) +102030405 +SELECT HEX(INET6_ATON('1.2.3.4.5')); +HEX(INET6_ATON('1.2.3.4.5')) +NULL + +# -- Checking mix of INET- and INET6- functions... + +SELECT HEX(INET6_ATON(INET_NTOA(INET_ATON('1.2.3.4')))) AS x; +x +01020304 + +# -- Checking IS_IPV4() / IS_IPV6()... + +SELECT IS_IPV4(NULL); +IS_IPV4(NULL) +0 +SELECT IS_IPV4(1); +IS_IPV4(1) +0 +SELECT IS_IPV4(1.0); +IS_IPV4(1.0) +0 +SELECT IS_IPV4('1.2.3.4'); +IS_IPV4('1.2.3.4') +1 +SELECT IS_IPV4('001.02.000.255'); +IS_IPV4('001.02.000.255') +1 +SELECT IS_IPV4('::1.2.0.255'); +IS_IPV4('::1.2.0.255') +0 +SELECT IS_IPV4('::1'); +IS_IPV4('::1') +0 +SELECT IS_IPV4(BINARY('1.2.3.4')); +IS_IPV4(BINARY('1.2.3.4')) +1 +SELECT IS_IPV6(NULL); +IS_IPV6(NULL) +0 +SELECT IS_IPV6(1); +IS_IPV6(1) +0 +SELECT IS_IPV6(1.0); +IS_IPV6(1.0) +0 +SELECT IS_IPV6('1.2.3.4'); +IS_IPV6('1.2.3.4') +0 +SELECT IS_IPV6('001.02.000.255'); +IS_IPV6('001.02.000.255') +0 +SELECT IS_IPV6('::001.02.000.255'); +IS_IPV6('::001.02.000.255') +1 +SELECT IS_IPV6('::1.2.0.255'); +IS_IPV6('::1.2.0.255') +1 +SELECT IS_IPV6('::1'); +IS_IPV6('::1') +1 +SELECT IS_IPV6('0000:0000:0000:0000:0000:0000:0000:0001'); +IS_IPV6('0000:0000:0000:0000:0000:0000:0000:0001') +1 +SELECT IS_IPV6(BINARY('0000:0000:0000:0000:0000:0000:0000:0001')); +IS_IPV6(BINARY('0000:0000:0000:0000:0000:0000:0000:0001')) +1 + +# -- Checking IS_IPV4_MAPPED() and IS_IPV4_COMPAT()... + +SELECT IS_IPV4_MAPPED(INET6_ATON('1.2.3.4')), +IS_IPV4_COMPAT(INET6_ATON('1.2.3.4')); +IS_IPV4_MAPPED(INET6_ATON('1.2.3.4')) IS_IPV4_COMPAT(INET6_ATON('1.2.3.4')) +0 0 +SELECT IS_IPV4_MAPPED(INET6_ATON('::1.2.3.4')), +IS_IPV4_COMPAT(INET6_ATON('::1.2.3.4')); +IS_IPV4_MAPPED(INET6_ATON('::1.2.3.4')) IS_IPV4_COMPAT(INET6_ATON('::1.2.3.4')) +0 1 +SELECT IS_IPV4_MAPPED(INET6_ATON('::FFFF:1.2.3.4')), +IS_IPV4_COMPAT(INET6_ATON('::FFFF:1.2.3.4')); +IS_IPV4_MAPPED(INET6_ATON('::FFFF:1.2.3.4')) IS_IPV4_COMPAT(INET6_ATON('::FFFF:1.2.3.4')) +1 0 +SELECT IS_IPV4_MAPPED(INET6_ATON('::ABCD:1.2.3.4')), +IS_IPV4_COMPAT(INET6_ATON('::ABCD:1.2.3.4')); +IS_IPV4_MAPPED(INET6_ATON('::ABCD:1.2.3.4')) IS_IPV4_COMPAT(INET6_ATON('::ABCD:1.2.3.4')) +0 0 +SELECT IS_IPV4_MAPPED(INET6_ATON('::1')), +IS_IPV4_COMPAT(INET6_ATON('::1')); +IS_IPV4_MAPPED(INET6_ATON('::1')) IS_IPV4_COMPAT(INET6_ATON('::1')) +0 0 +SELECT IS_IPV4_MAPPED(INET6_ATON('::')), +IS_IPV4_COMPAT(INET6_ATON('::')); +IS_IPV4_MAPPED(INET6_ATON('::')) IS_IPV4_COMPAT(INET6_ATON('::')) +0 0 + +# -- Checking IS_IPV4_COMPAT()... + + +# -- Working with a table... + +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +CREATE TABLE t1(ip INT UNSIGNED); +CREATE TABLE t2(ip VARBINARY(16)); + +INSERT INTO t1 VALUES +(INET_ATON('1.2.3.4')), (INET_ATON('255.255.255.255')); +SELECT INET_NTOA(ip) FROM t1; +INET_NTOA(ip) +1.2.3.4 +255.255.255.255 + +INSERT INTO t2 SELECT INET6_ATON(INET_NTOA(ip)) FROM t1; +SELECT INET6_NTOA(ip), HEX(ip), LENGTH(ip) FROM t2; +INET6_NTOA(ip) HEX(ip) LENGTH(ip) +1.2.3.4 01020304 4 +255.255.255.255 FFFFFFFF 4 +DELETE FROM t2; + +INSERT INTO t2 VALUES +(INET6_ATON('1.2.3.4')), (INET6_ATON('255.255.255.255')), +(INET6_ATON('::1.2.3.4')), (INET6_ATON('::ffff:255.255.255.255')), +(INET6_ATON('::')), (INET6_ATON('::1')), +(INET6_ATON('1020:3040:5060:7080:90A0:B0C0:D0E0:F010')); +SELECT INET6_NTOA(ip), HEX(ip), LENGTH(ip) FROM t2; +INET6_NTOA(ip) HEX(ip) LENGTH(ip) +1.2.3.4 01020304 4 +255.255.255.255 FFFFFFFF 4 +::1.2.3.4 00000000000000000000000001020304 16 +::ffff:255.255.255.255 00000000000000000000FFFFFFFFFFFF 16 +:: 00000000000000000000000000000000 16 +::1 00000000000000000000000000000001 16 +1020:3040:5060:7080:90a0:b0c0:d0e0:f010 102030405060708090A0B0C0D0E0F010 16 + +DROP TABLE t1; +DROP TABLE t2; + +# -- Done. + +# +# MDEV-13685 Can not replay binary log due to Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat' +# +SET NAMES utf8; +SELECT COERCIBILITY(NAME_CONST('name','test')); +COERCIBILITY(NAME_CONST('name','test')) +2 +SELECT COERCIBILITY(NAME_CONST('name',TIME'00:00:00')); +COERCIBILITY(NAME_CONST('name',TIME'00:00:00')) +5 +SELECT COERCIBILITY(NAME_CONST('name',15)); +COERCIBILITY(NAME_CONST('name',15)) +5 +SELECT CONCAT(NAME_CONST('name',15),'오'); +CONCAT(NAME_CONST('name',15),'오') +15오 +SET NAMES latin1; +# +# MDEV-14116 INET6_NTOA output is set as null to varchar(39) variable +# +CREATE PROCEDURE p1() +BEGIN +DECLARE ip_full_addr varchar(39) DEFAULT ""; +SELECT INET6_NTOA(UNHEX('20000000000000000000000000000000')) into ip_full_addr; +SELECT ip_full_addr; +END; +$$ +CALL p1(); +ip_full_addr +2000:: +DROP PROCEDURE p1; diff --git a/mysql-test/r/func_regexp.result b/mysql-test/r/func_regexp.result index f405a2297cb..53c58d5dddb 100644 --- a/mysql-test/r/func_regexp.result +++ b/mysql-test/r/func_regexp.result @@ -145,3 +145,15 @@ a DEALLOCATE PREPARE stmt1; DROP TABLE t1; End of 5.1 tests +SELECT ' ' REGEXP '[[:blank:]]'; +' ' REGEXP '[[:blank:]]' +1 +SELECT '\t' REGEXP '[[:blank:]]'; +'\t' REGEXP '[[:blank:]]' +1 +SELECT ' ' REGEXP '[[:space:]]'; +' ' REGEXP '[[:space:]]' +1 +SELECT '\t' REGEXP '[[:space:]]'; +'\t' REGEXP '[[:space:]]' +1 diff --git a/mysql-test/r/func_regexp_pcre.result b/mysql-test/r/func_regexp_pcre.result new file mode 100644 index 00000000000..d7d57356fe2 --- /dev/null +++ b/mysql-test/r/func_regexp_pcre.result @@ -0,0 +1,913 @@ +SET NAMES utf8; +# +# MDEV-4425 REGEXP enhancements +# +# +# Checking RLIKE +# +SELECT 'à ' RLIKE '^.$'; +'à ' RLIKE '^.$' +1 +SELECT 'à ' RLIKE '\\x{00E0}'; +'à ' RLIKE '\\x{00E0}' +1 +SELECT 'À' RLIKE '\\x{00E0}'; +'À' RLIKE '\\x{00E0}' +1 +SELECT 'à ' RLIKE '\\x{00C0}'; +'à ' RLIKE '\\x{00C0}' +1 +SELECT 'À' RLIKE '\\x{00C0}'; +'À' RLIKE '\\x{00C0}' +1 +SELECT 'à ' RLIKE '\\x{00E0}' COLLATE utf8_bin; +'à ' RLIKE '\\x{00E0}' COLLATE utf8_bin +1 +SELECT 'À' RLIKE '\\x{00E0}' COLLATE utf8_bin; +'À' RLIKE '\\x{00E0}' COLLATE utf8_bin +0 +SELECT 'à ' RLIKE '\\x{00C0}' COLLATE utf8_bin; +'à ' RLIKE '\\x{00C0}' COLLATE utf8_bin +0 +SELECT 'À' RLIKE '\\x{00C0}' COLLATE utf8_bin; +'À' RLIKE '\\x{00C0}' COLLATE utf8_bin +1 +CREATE TABLE t1 (s VARCHAR(10) CHARACTER SET utf8); +INSERT INTO t1 VALUES ('a'),('A'); +CREATE TABLE t2 (p VARCHAR(10) CHARACTER SET utf8); +INSERT INTO t2 VALUES ('a'),('(?i)a'),('(?-i)a'),('A'),('(?i)A'),('(?-i)A'); +SELECT s,p,s RLIKE p, s COLLATE utf8_bin RLIKE p FROM t1,t2 ORDER BY BINARY s, BINARY p; +s p s RLIKE p s COLLATE utf8_bin RLIKE p +A (?-i)A 1 1 +A (?-i)a 0 0 +A (?i)A 1 1 +A (?i)a 1 1 +A A 1 1 +A a 1 0 +a (?-i)A 0 0 +a (?-i)a 1 1 +a (?i)A 1 1 +a (?i)a 1 1 +a A 1 0 +a a 1 1 +DROP TABLE t1,t2; +CREATE TABLE t1 (ch VARCHAR(22)) CHARACTER SET utf8; +CREATE TABLE t2 (class VARCHAR(32)) CHARACTER SET utf8; +INSERT INTO t1 VALUES ('Я'),('Σ'),('A'),('À'); +INSERT INTO t1 VALUES ('Ñ'),('σ'),('a'),('à '); +INSERT INTO t1 VALUES ('ã—'),('ê°·'),('à¶´'); +INSERT INTO t1 VALUES ('1'),('௨'); +INSERT INTO t2 VALUES ('\\p{Cyrillic}'),('\\p{Greek}'),('\\p{Latin}'); +INSERT INTO t2 VALUES ('\\p{Han}'),('\\p{Hangul}'); +INSERT INTO t2 VALUES ('\\p{Sinhala}'), ('\\p{Tamil}'); +INSERT INTO t2 VALUES ('\\p{L}'),('\\p{Ll}'),('\\p{Lu}'),('\\p{L&}'); +INSERT INTO t2 VALUES ('[[:alpha:]]'),('[[:digit:]]'); +SELECT class, ch, ch RLIKE class FROM t1, t2 ORDER BY class, BINARY ch; +class ch ch RLIKE class +[[:alpha:]] 1 0 +[[:alpha:]] A 1 +[[:alpha:]] a 1 +[[:alpha:]] À 1 +[[:alpha:]] à 1 +[[:alpha:]] Σ 1 +[[:alpha:]] σ 1 +[[:alpha:]] Я 1 +[[:alpha:]] Ñ 1 +[[:alpha:]] ௨ 0 +[[:alpha:]] à¶´ 1 +[[:alpha:]] ã— 1 +[[:alpha:]] ê°· 1 +[[:digit:]] 1 1 +[[:digit:]] A 0 +[[:digit:]] a 0 +[[:digit:]] À 0 +[[:digit:]] à 0 +[[:digit:]] Σ 0 +[[:digit:]] σ 0 +[[:digit:]] Я 0 +[[:digit:]] Ñ 0 +[[:digit:]] ௨ 1 +[[:digit:]] à¶´ 0 +[[:digit:]] ã— 0 +[[:digit:]] ê°· 0 +\p{Cyrillic} 1 0 +\p{Cyrillic} A 0 +\p{Cyrillic} a 0 +\p{Cyrillic} À 0 +\p{Cyrillic} à 0 +\p{Cyrillic} Σ 0 +\p{Cyrillic} σ 0 +\p{Cyrillic} Я 1 +\p{Cyrillic} Ñ 1 +\p{Cyrillic} ௨ 0 +\p{Cyrillic} à¶´ 0 +\p{Cyrillic} ã— 0 +\p{Cyrillic} ê°· 0 +\p{Greek} 1 0 +\p{Greek} A 0 +\p{Greek} a 0 +\p{Greek} À 0 +\p{Greek} à 0 +\p{Greek} Σ 1 +\p{Greek} σ 1 +\p{Greek} Я 0 +\p{Greek} Ñ 0 +\p{Greek} ௨ 0 +\p{Greek} à¶´ 0 +\p{Greek} ã— 0 +\p{Greek} ê°· 0 +\p{Hangul} 1 0 +\p{Hangul} A 0 +\p{Hangul} a 0 +\p{Hangul} À 0 +\p{Hangul} à 0 +\p{Hangul} Σ 0 +\p{Hangul} σ 0 +\p{Hangul} Я 0 +\p{Hangul} Ñ 0 +\p{Hangul} ௨ 0 +\p{Hangul} à¶´ 0 +\p{Hangul} ã— 0 +\p{Hangul} ê°· 1 +\p{Han} 1 0 +\p{Han} A 0 +\p{Han} a 0 +\p{Han} À 0 +\p{Han} à 0 +\p{Han} Σ 0 +\p{Han} σ 0 +\p{Han} Я 0 +\p{Han} Ñ 0 +\p{Han} ௨ 0 +\p{Han} à¶´ 0 +\p{Han} ã— 1 +\p{Han} ê°· 0 +\p{L&} 1 0 +\p{L&} A 1 +\p{L&} a 1 +\p{L&} À 1 +\p{L&} à 1 +\p{L&} Σ 1 +\p{L&} σ 1 +\p{L&} Я 1 +\p{L&} Ñ 1 +\p{L&} ௨ 0 +\p{L&} à¶´ 0 +\p{L&} ã— 0 +\p{L&} ê°· 0 +\p{Latin} 1 0 +\p{Latin} A 1 +\p{Latin} a 1 +\p{Latin} À 1 +\p{Latin} à 1 +\p{Latin} Σ 0 +\p{Latin} σ 0 +\p{Latin} Я 0 +\p{Latin} Ñ 0 +\p{Latin} ௨ 0 +\p{Latin} à¶´ 0 +\p{Latin} ã— 0 +\p{Latin} ê°· 0 +\p{Ll} 1 0 +\p{Ll} A 0 +\p{Ll} a 1 +\p{Ll} À 0 +\p{Ll} à 1 +\p{Ll} Σ 0 +\p{Ll} σ 1 +\p{Ll} Я 0 +\p{Ll} Ñ 1 +\p{Ll} ௨ 0 +\p{Ll} à¶´ 0 +\p{Ll} ã— 0 +\p{Ll} ê°· 0 +\p{Lu} 1 0 +\p{Lu} A 1 +\p{Lu} a 0 +\p{Lu} À 1 +\p{Lu} à 0 +\p{Lu} Σ 1 +\p{Lu} σ 0 +\p{Lu} Я 1 +\p{Lu} Ñ 0 +\p{Lu} ௨ 0 +\p{Lu} à¶´ 0 +\p{Lu} ã— 0 +\p{Lu} ê°· 0 +\p{L} 1 0 +\p{L} A 1 +\p{L} a 1 +\p{L} À 1 +\p{L} à 1 +\p{L} Σ 1 +\p{L} σ 1 +\p{L} Я 1 +\p{L} Ñ 1 +\p{L} ௨ 0 +\p{L} à¶´ 1 +\p{L} ã— 1 +\p{L} ê°· 1 +\p{Sinhala} 1 0 +\p{Sinhala} A 0 +\p{Sinhala} a 0 +\p{Sinhala} À 0 +\p{Sinhala} à 0 +\p{Sinhala} Σ 0 +\p{Sinhala} σ 0 +\p{Sinhala} Я 0 +\p{Sinhala} Ñ 0 +\p{Sinhala} ௨ 0 +\p{Sinhala} à¶´ 1 +\p{Sinhala} ã— 0 +\p{Sinhala} ê°· 0 +\p{Tamil} 1 0 +\p{Tamil} A 0 +\p{Tamil} a 0 +\p{Tamil} À 0 +\p{Tamil} à 0 +\p{Tamil} Σ 0 +\p{Tamil} σ 0 +\p{Tamil} Я 0 +\p{Tamil} Ñ 0 +\p{Tamil} ௨ 1 +\p{Tamil} à¶´ 0 +\p{Tamil} ã— 0 +\p{Tamil} ê°· 0 +DROP TABLE t1, t2; +SELECT 0xFF RLIKE '\\w'; +0xFF RLIKE '\\w' +0 +SELECT 0xFF RLIKE '(*UCP)\\w'; +0xFF RLIKE '(*UCP)\\w' +1 +SELECT '\n' RLIKE '(*CR)'; +'\n' RLIKE '(*CR)' +1 +SELECT '\n' RLIKE '(*LF)'; +'\n' RLIKE '(*LF)' +1 +SELECT '\n' RLIKE '(*CRLF)'; +'\n' RLIKE '(*CRLF)' +1 +SELECT '\n' RLIKE '(*ANYCRLF)'; +'\n' RLIKE '(*ANYCRLF)' +1 +SELECT '\n' RLIKE '(*ANY)'; +'\n' RLIKE '(*ANY)' +1 +SELECT 'a\nb' RLIKE '(*LF)(?m)^a$'; +'a\nb' RLIKE '(*LF)(?m)^a$' +1 +SELECT 'a\nb' RLIKE '(*CR)(?m)^a$'; +'a\nb' RLIKE '(*CR)(?m)^a$' +0 +SELECT 'a\nb' RLIKE '(*CRLF)(?m)^a$'; +'a\nb' RLIKE '(*CRLF)(?m)^a$' +0 +SELECT 'a\nb' RLIKE '(*ANYCRLF)(?m)^a$'; +'a\nb' RLIKE '(*ANYCRLF)(?m)^a$' +1 +SELECT 'a\rb' RLIKE '(*LF)(?m)^a$'; +'a\rb' RLIKE '(*LF)(?m)^a$' +0 +SELECT 'a\rb' RLIKE '(*CR)(?m)^a$'; +'a\rb' RLIKE '(*CR)(?m)^a$' +1 +SELECT 'a\rb' RLIKE '(*CRLF)(?m)^a$'; +'a\rb' RLIKE '(*CRLF)(?m)^a$' +0 +SELECT 'a\rb' RLIKE '(*ANYCRLF)(?m)^a$'; +'a\rb' RLIKE '(*ANYCRLF)(?m)^a$' +1 +SELECT 'a\r\nb' RLIKE '(*LF)(?m)^a$'; +'a\r\nb' RLIKE '(*LF)(?m)^a$' +0 +SELECT 'a\r\nb' RLIKE '(*CR)(?m)^a$'; +'a\r\nb' RLIKE '(*CR)(?m)^a$' +1 +SELECT 'a\r\nb' RLIKE '(*CRLF)(?m)^a$'; +'a\r\nb' RLIKE '(*CRLF)(?m)^a$' +1 +SELECT 'a\r\nb' RLIKE '(*ANYCRLF)(?m)^a$'; +'a\r\nb' RLIKE '(*ANYCRLF)(?m)^a$' +1 +SELECT 'aa' RLIKE '(a)\\g1'; +'aa' RLIKE '(a)\\g1' +1 +SELECT 'aa bb' RLIKE '(a)\\g1 (b)\\g2'; +'aa bb' RLIKE '(a)\\g1 (b)\\g2' +1 +SELECT 'aaaaa' RLIKE 'a{0,5}'; +'aaaaa' RLIKE 'a{0,5}' +1 +SELECT 'aaaaa' RLIKE 'a{1,3}'; +'aaaaa' RLIKE 'a{1,3}' +1 +SELECT 'aaaaa' RLIKE 'a{0,}'; +'aaaaa' RLIKE 'a{0,}' +1 +SELECT 'aaaaa' RLIKE 'a{10,20}'; +'aaaaa' RLIKE 'a{10,20}' +0 +SELECT 'aabb' RLIKE 'a(?R)?b'; +'aabb' RLIKE 'a(?R)?b' +1 +SELECT 'aabb' RLIKE 'aa(?R)?bb'; +'aabb' RLIKE 'aa(?R)?bb' +1 +SELECT 'abcc' RLIKE 'a(?>bc|b)c'; +'abcc' RLIKE 'a(?>bc|b)c' +1 +SELECT 'abc' RLIKE 'a(?>bc|b)c'; +'abc' RLIKE 'a(?>bc|b)c' +0 +SELECT 'ab' RLIKE 'a(?!b)'; +'ab' RLIKE 'a(?!b)' +0 +SELECT 'ac' RLIKE 'a(?!b)'; +'ac' RLIKE 'a(?!b)' +1 +SELECT 'ab' RLIKE 'a(?=b)'; +'ab' RLIKE 'a(?=b)' +1 +SELECT 'ac' RLIKE 'a(?=b)'; +'ac' RLIKE 'a(?=b)' +0 +SELECT 'ab' RLIKE '(?<!a)b'; +'ab' RLIKE '(?<!a)b' +0 +SELECT 'cb' RLIKE '(?<!a)b'; +'cb' RLIKE '(?<!a)b' +1 +SELECT 'ab' RLIKE '(?<=a)b'; +'ab' RLIKE '(?<=a)b' +1 +SELECT 'cb' RLIKE '(?<=a)b'; +'cb' RLIKE '(?<=a)b' +0 +SELECT 'aa' RLIKE '(?P<pattern>a)(?P=pattern)'; +'aa' RLIKE '(?P<pattern>a)(?P=pattern)' +1 +SELECT 'aba' RLIKE '(?P<pattern>a)b(?P=pattern)'; +'aba' RLIKE '(?P<pattern>a)b(?P=pattern)' +1 +SELECT 'a' RLIKE 'a(?#comment)'; +'a' RLIKE 'a(?#comment)' +1 +SELECT 'aa' RLIKE 'a(?#comment)a'; +'aa' RLIKE 'a(?#comment)a' +1 +SELECT 'aba' RLIKE 'a(?#b)a'; +'aba' RLIKE 'a(?#b)a' +0 +SELECT 'aaa' RLIKE '\\W\\W\\W'; +'aaa' RLIKE '\\W\\W\\W' +0 +SELECT '%' RLIKE '\\W'; +'%' RLIKE '\\W' +1 +SELECT '%a$' RLIKE '\\W.\\W'; +'%a$' RLIKE '\\W.\\W' +1 +SELECT '123' RLIKE '\\d\\d\\d'; +'123' RLIKE '\\d\\d\\d' +1 +SELECT 'aaa' RLIKE '\\d\\d\\d'; +'aaa' RLIKE '\\d\\d\\d' +0 +SELECT '1a3' RLIKE '\\d.\\d'; +'1a3' RLIKE '\\d.\\d' +1 +SELECT 'a1b' RLIKE '\\d.\\d'; +'a1b' RLIKE '\\d.\\d' +0 +SELECT '8' RLIKE '\\D'; +'8' RLIKE '\\D' +0 +SELECT 'a' RLIKE '\\D'; +'a' RLIKE '\\D' +1 +SELECT '%' RLIKE '\\D'; +'%' RLIKE '\\D' +1 +SELECT 'a1' RLIKE '\\D\\d'; +'a1' RLIKE '\\D\\d' +1 +SELECT 'a1' RLIKE '\\d\\D'; +'a1' RLIKE '\\d\\D' +0 +SELECT '\t' RLIKE '\\s'; +'\t' RLIKE '\\s' +1 +SELECT '\r' RLIKE '\\s'; +'\r' RLIKE '\\s' +1 +SELECT '\n' RLIKE '\\s'; +'\n' RLIKE '\\s' +1 +SELECT '\v' RLIKE '\\s'; +'\v' RLIKE '\\s' +0 +SELECT 'a' RLIKE '\\S'; +'a' RLIKE '\\S' +1 +SELECT '1' RLIKE '\\S'; +'1' RLIKE '\\S' +1 +SELECT '!' RLIKE '\\S'; +'!' RLIKE '\\S' +1 +SELECT '.' RLIKE '\\S'; +'.' RLIKE '\\S' +1 +SELECT 'abc\0def' REGEXP 'def'; +'abc\0def' REGEXP 'def' +1 +SELECT 'abc\0def' REGEXP 'abc\\x{00}def'; +'abc\0def' REGEXP 'abc\\x{00}def' +1 +SELECT HEX(REGEXP_SUBSTR('abc\0def','abc\\x{00}def')); +HEX(REGEXP_SUBSTR('abc\0def','abc\\x{00}def')) +61626300646566 +# +# Checking REGEXP_REPLACE +# +CREATE TABLE t1 AS SELECT REGEXP_REPLACE('abc','b','x'); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `REGEXP_REPLACE('abc','b','x')` longtext CHARACTER SET utf8 NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +EXPLAIN EXTENDED SELECT REGEXP_REPLACE('abc','b','x'); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select regexp_replace('abc','b','x') AS `REGEXP_REPLACE('abc','b','x')` +CREATE TABLE t1 AS SELECT REGEXP_REPLACE('abc','b','x')+0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `REGEXP_REPLACE('abc','b','x')+0` double NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +SELECT REGEXP_REPLACE(NULL,'b','c'); +REGEXP_REPLACE(NULL,'b','c') +NULL +SELECT REGEXP_REPLACE('a',NULL,'c'); +REGEXP_REPLACE('a',NULL,'c') +NULL +SELECT REGEXP_REPLACE('a','b',NULL); +REGEXP_REPLACE('a','b',NULL) +NULL +SELECT REGEXP_REPLACE('a','x','b'); +REGEXP_REPLACE('a','x','b') +a +SELECT REGEXP_REPLACE('a','','b'); +REGEXP_REPLACE('a','','b') +a +SELECT REGEXP_REPLACE('a5b ab a5b','(?<=a)5*(?=b)','x'); +REGEXP_REPLACE('a5b ab a5b','(?<=a)5*(?=b)','x') +axb ab a5b +SELECT REGEXP_REPLACE('a5b a5b a5b','(?<=a)5*(?=b)','x'); +REGEXP_REPLACE('a5b a5b a5b','(?<=a)5*(?=b)','x') +axb axb axb +SELECT REGEXP_REPLACE('A','a','b'); +REGEXP_REPLACE('A','a','b') +b +SELECT REGEXP_REPLACE('a','A','b'); +REGEXP_REPLACE('a','A','b') +b +SELECT REGEXP_REPLACE('A' COLLATE utf8_bin,'a','b'); +REGEXP_REPLACE('A' COLLATE utf8_bin,'a','b') +A +SELECT REGEXP_REPLACE('a' COLLATE utf8_bin,'A','b'); +REGEXP_REPLACE('a' COLLATE utf8_bin,'A','b') +a +SELECT REGEXP_REPLACE('James Bond', '(.*) (.*)', '\\2, \\1 \\2'); +REGEXP_REPLACE('James Bond', '(.*) (.*)', '\\2, \\1 \\2') +Bond, James Bond +SELECT REGEXP_REPLACE('абвгд','в','ц'); +REGEXP_REPLACE('абвгд','в','ц') +абцгд +SELECT REGEXP_REPLACE('г',0xB3,0xB4); +REGEXP_REPLACE('г',0xB3,0xB4) +д +SELECT REGEXP_REPLACE('aaaa','a','b'); +REGEXP_REPLACE('aaaa','a','b') +bbbb +SELECT REGEXP_REPLACE('aaaa','(?<=.)a','b'); +REGEXP_REPLACE('aaaa','(?<=.)a','b') +abbb +SELECT REGEXP_REPLACE('aaaa','a(?=.)','b'); +REGEXP_REPLACE('aaaa','a(?=.)','b') +bbba +SELECT REGEXP_REPLACE('aaaa','(?<=.)a(?=.)','b'); +REGEXP_REPLACE('aaaa','(?<=.)a(?=.)','b') +abba +SELECT REGEXP_REPLACE('a\nb','(*LF)(?m)^a$','c'); +REGEXP_REPLACE('a\nb','(*LF)(?m)^a$','c') +c +b +SELECT REGEXP_REPLACE('a\nb','(*CR)(?m)^a$','c'); +REGEXP_REPLACE('a\nb','(*CR)(?m)^a$','c') +a +b +SELECT REGEXP_REPLACE('a\nb','(*CRLF)(?m)^a$','c'); +REGEXP_REPLACE('a\nb','(*CRLF)(?m)^a$','c') +a +b +SELECT REGEXP_REPLACE('a\nb','(*ANYCRLF)(?m)^a$','c'); +REGEXP_REPLACE('a\nb','(*ANYCRLF)(?m)^a$','c') +c +b +SELECT REGEXP_REPLACE('a\rb','(*LF)(?m)^a$','c'); +REGEXP_REPLACE('a\rb','(*LF)(?m)^a$','c') +a
b +SELECT REGEXP_REPLACE('a\rb','(*CR)(?m)^a$','c'); +REGEXP_REPLACE('a\rb','(*CR)(?m)^a$','c') +c
b +SELECT REGEXP_REPLACE('a\rb','(*CRLF)(?m)^a$','c'); +REGEXP_REPLACE('a\rb','(*CRLF)(?m)^a$','c') +a
b +SELECT REGEXP_REPLACE('a\rb','(*ANYCRLF)(?m)^a$','c'); +REGEXP_REPLACE('a\rb','(*ANYCRLF)(?m)^a$','c') +c
b +SELECT REGEXP_REPLACE('a\r\nb','(*LF)(?m)^a$','c'); +REGEXP_REPLACE('a\r\nb','(*LF)(?m)^a$','c') +a
+b +SELECT REGEXP_REPLACE('a\r\nb','(*CR)(?m)^a$','c'); +REGEXP_REPLACE('a\r\nb','(*CR)(?m)^a$','c') +c
+b +SELECT REGEXP_REPLACE('a\r\nb','(*CRLF)(?m)^a$','c'); +REGEXP_REPLACE('a\r\nb','(*CRLF)(?m)^a$','c') +c
+b +SELECT REGEXP_REPLACE('a\r\nb','(*ANYCRLF)(?m)^a$','c'); +REGEXP_REPLACE('a\r\nb','(*ANYCRLF)(?m)^a$','c') +c
+b +SELECT REGEXP_REPLACE('aa','(a)\\g1','b'); +REGEXP_REPLACE('aa','(a)\\g1','b') +b +SELECT REGEXP_REPLACE('aa bb','(a)\\g1 (b)\\g2','c'); +REGEXP_REPLACE('aa bb','(a)\\g1 (b)\\g2','c') +c +SELECT REGEXP_REPLACE('aaaaa','a{1,3}','b'); +REGEXP_REPLACE('aaaaa','a{1,3}','b') +bb +SELECT REGEXP_REPLACE('aaaaa','a{10,20}','b'); +REGEXP_REPLACE('aaaaa','a{10,20}','b') +aaaaa +SELECT REGEXP_REPLACE('daabbd','a(?R)?b','c'); +REGEXP_REPLACE('daabbd','a(?R)?b','c') +dcd +SELECT REGEXP_REPLACE('daabbd','aa(?R)?bb','c'); +REGEXP_REPLACE('daabbd','aa(?R)?bb','c') +dcd +SELECT REGEXP_REPLACE('dabccd','a(?>bc|b)c','e'); +REGEXP_REPLACE('dabccd','a(?>bc|b)c','e') +ded +SELECT REGEXP_REPLACE('dabcd','a(?>bc|b)c','e'); +REGEXP_REPLACE('dabcd','a(?>bc|b)c','e') +dabcd +SELECT REGEXP_REPLACE('ab','a(?!b)','e'); +REGEXP_REPLACE('ab','a(?!b)','e') +ab +SELECT REGEXP_REPLACE('ac','a(?!b)','e'); +REGEXP_REPLACE('ac','a(?!b)','e') +ec +SELECT REGEXP_REPLACE('ab','a(?=b)','e'); +REGEXP_REPLACE('ab','a(?=b)','e') +eb +SELECT REGEXP_REPLACE('ac','a(?=b)','e'); +REGEXP_REPLACE('ac','a(?=b)','e') +ac +SELECT REGEXP_REPLACE('ab','(?<!a)b','e'); +REGEXP_REPLACE('ab','(?<!a)b','e') +ab +SELECT REGEXP_REPLACE('cb','(?<!a)b','e'); +REGEXP_REPLACE('cb','(?<!a)b','e') +ce +SELECT REGEXP_REPLACE('ab','(?<=a)b','e'); +REGEXP_REPLACE('ab','(?<=a)b','e') +ae +SELECT REGEXP_REPLACE('cb','(?<=a)b','e'); +REGEXP_REPLACE('cb','(?<=a)b','e') +cb +SELECT REGEXP_REPLACE('aa','(?P<pattern>a)(?P=pattern)','b'); +REGEXP_REPLACE('aa','(?P<pattern>a)(?P=pattern)','b') +b +SELECT REGEXP_REPLACE('aba','(?P<pattern>a)b(?P=pattern)','c'); +REGEXP_REPLACE('aba','(?P<pattern>a)b(?P=pattern)','c') +c +SELECT REGEXP_REPLACE('a','a(?#comment)','e'); +REGEXP_REPLACE('a','a(?#comment)','e') +e +SELECT REGEXP_REPLACE('aa','a(?#comment)a','e'); +REGEXP_REPLACE('aa','a(?#comment)a','e') +e +SELECT REGEXP_REPLACE('aba','a(?#b)a','e'); +REGEXP_REPLACE('aba','a(?#b)a','e') +aba +SELECT REGEXP_REPLACE('ddd<ab>cc</ab>eee','<.+?>','*'); +REGEXP_REPLACE('ddd<ab>cc</ab>eee','<.+?>','*') +ddd*cc*eee +SELECT REGEXP_REPLACE('aaa','\\W\\W\\W','e'); +REGEXP_REPLACE('aaa','\\W\\W\\W','e') +aaa +SELECT REGEXP_REPLACE('aaa','\\w\\w\\w','e'); +REGEXP_REPLACE('aaa','\\w\\w\\w','e') +e +SELECT REGEXP_REPLACE('%','\\W','e'); +REGEXP_REPLACE('%','\\W','e') +e +SELECT REGEXP_REPLACE('%a$','\\W.\\W','e'); +REGEXP_REPLACE('%a$','\\W.\\W','e') +e +SELECT REGEXP_REPLACE('%a$','\\W\\w\\W','e'); +REGEXP_REPLACE('%a$','\\W\\w\\W','e') +e +SELECT REGEXP_REPLACE('123','\\d\\d\\d\\d\\d\\d','e'); +REGEXP_REPLACE('123','\\d\\d\\d\\d\\d\\d','e') +123 +SELECT REGEXP_REPLACE('123','\\d\\d\\d','e'); +REGEXP_REPLACE('123','\\d\\d\\d','e') +e +SELECT REGEXP_REPLACE('aaa','\\d\\d\\d','e'); +REGEXP_REPLACE('aaa','\\d\\d\\d','e') +aaa +SELECT REGEXP_REPLACE('1a3','\\d.\\d\\d.\\d','e'); +REGEXP_REPLACE('1a3','\\d.\\d\\d.\\d','e') +1a3 +SELECT REGEXP_REPLACE('1a3','\\d.\\d','e'); +REGEXP_REPLACE('1a3','\\d.\\d','e') +e +SELECT REGEXP_REPLACE('a1b','\\d.\\d','e'); +REGEXP_REPLACE('a1b','\\d.\\d','e') +a1b +SELECT REGEXP_REPLACE('8','\\D','e'); +REGEXP_REPLACE('8','\\D','e') +8 +SELECT REGEXP_REPLACE('a','\\D','e'); +REGEXP_REPLACE('a','\\D','e') +e +SELECT REGEXP_REPLACE('%','\\D','e'); +REGEXP_REPLACE('%','\\D','e') +e +SELECT REGEXP_REPLACE('a1','\\D\\d','e'); +REGEXP_REPLACE('a1','\\D\\d','e') +e +SELECT REGEXP_REPLACE('a1','\\d\\D','e'); +REGEXP_REPLACE('a1','\\d\\D','e') +a1 +SELECT REGEXP_REPLACE('\t','\\s','e'); +REGEXP_REPLACE('\t','\\s','e') +e +SELECT REGEXP_REPLACE('\r','\\s','e'); +REGEXP_REPLACE('\r','\\s','e') +e +SELECT REGEXP_REPLACE('\n','\\s','e'); +REGEXP_REPLACE('\n','\\s','e') +e +SELECT REGEXP_REPLACE('a','\\S','e'); +REGEXP_REPLACE('a','\\S','e') +e +SELECT REGEXP_REPLACE('1','\\S','e'); +REGEXP_REPLACE('1','\\S','e') +e +SELECT REGEXP_REPLACE('!','\\S','e'); +REGEXP_REPLACE('!','\\S','e') +e +SELECT REGEXP_REPLACE('.','\\S','e'); +REGEXP_REPLACE('.','\\S','e') +e +# +# Checking REGEXP_INSTR +# +SELECT REGEXP_INSTR('abcd','X'); +REGEXP_INSTR('abcd','X') +0 +SELECT REGEXP_INSTR('abcd','a'); +REGEXP_INSTR('abcd','a') +1 +SELECT REGEXP_INSTR('abcd','b'); +REGEXP_INSTR('abcd','b') +2 +SELECT REGEXP_INSTR('abcd','c'); +REGEXP_INSTR('abcd','c') +3 +SELECT REGEXP_INSTR('abcd','d'); +REGEXP_INSTR('abcd','d') +4 +SELECT REGEXP_INSTR('aaaa','(?<=a)a'); +REGEXP_INSTR('aaaa','(?<=a)a') +2 +SELECT REGEXP_INSTR('ваÑÑ','в'); +REGEXP_INSTR('ваÑÑ','в') +1 +SELECT REGEXP_INSTR('ваÑÑ','а'); +REGEXP_INSTR('ваÑÑ','а') +2 +SELECT REGEXP_INSTR('ваÑÑ','Ñ'); +REGEXP_INSTR('ваÑÑ','Ñ') +3 +SELECT REGEXP_INSTR('ваÑÑ','Ñ'); +REGEXP_INSTR('ваÑÑ','Ñ') +4 +SELECT REGEXP_INSTR(CONVERT('ваÑÑ' USING koi8r), CONVERT('в' USING koi8r)); +REGEXP_INSTR(CONVERT('ваÑÑ' USING koi8r), CONVERT('в' USING koi8r)) +1 +SELECT REGEXP_INSTR(CONVERT('ваÑÑ' USING koi8r), CONVERT('а' USING koi8r)); +REGEXP_INSTR(CONVERT('ваÑÑ' USING koi8r), CONVERT('а' USING koi8r)) +2 +SELECT REGEXP_INSTR(CONVERT('ваÑÑ' USING koi8r), CONVERT('Ñ' USING koi8r)); +REGEXP_INSTR(CONVERT('ваÑÑ' USING koi8r), CONVERT('Ñ' USING koi8r)) +3 +SELECT REGEXP_INSTR(CONVERT('ваÑÑ' USING koi8r), CONVERT('Ñ' USING koi8r)); +REGEXP_INSTR(CONVERT('ваÑÑ' USING koi8r), CONVERT('Ñ' USING koi8r)) +4 +# +# Checking REGEXP_SUBSTR +# +CREATE TABLE t1 AS SELECT REGEXP_SUBSTR('abc','b'); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `REGEXP_SUBSTR('abc','b')` varchar(3) CHARACTER SET utf8 NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +EXPLAIN EXTENDED SELECT REGEXP_SUBSTR('abc','b'); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select regexp_substr('abc','b') AS `REGEXP_SUBSTR('abc','b')` +CREATE TABLE t1 AS SELECT REGEXP_SUBSTR('abc','b')+0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `REGEXP_SUBSTR('abc','b')+0` double NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +SELECT REGEXP_SUBSTR('See https://mariadb.org/en/foundation/ for details', 'https?://[^/]*'); +REGEXP_SUBSTR('See https://mariadb.org/en/foundation/ for details', 'https?://[^/]*') +https://mariadb.org +# +# MDEV-6027 RLIKE: "." no longer matching new line +# +SELECT 'cat and\ndog' RLIKE 'cat.*dog'; +'cat and\ndog' RLIKE 'cat.*dog' +0 +SELECT 'cat and\r\ndog' RLIKE 'cat.*dog'; +'cat and\r\ndog' RLIKE 'cat.*dog' +0 +SELECT 'a\nb' RLIKE 'a.b'; +'a\nb' RLIKE 'a.b' +0 +SELECT 'a\nb' RLIKE '(?-s)a.b'; +'a\nb' RLIKE '(?-s)a.b' +0 +SET default_regex_flags='DOTALL'; +SELECT @@default_regex_flags; +@@default_regex_flags +DOTALL +SELECT 'cat and\ndog' RLIKE 'cat.*dog'; +'cat and\ndog' RLIKE 'cat.*dog' +1 +SELECT 'cat and\r\ndog' RLIKE 'cat.*dog'; +'cat and\r\ndog' RLIKE 'cat.*dog' +1 +SELECT 'a\nb' RLIKE 'a.b'; +'a\nb' RLIKE 'a.b' +1 +SELECT 'a\nb' RLIKE '(?-s)a.b'; +'a\nb' RLIKE '(?-s)a.b' +0 +SET default_regex_flags=DEFAULT; +SELECT REGEXP_SUBSTR('Monday Mon','^((?<DN>Mon|Fri|Sun)day|(?<DN>Tue)sday).*(?P=DN)$'); +ERROR 42000: Got error 'two named subpatterns have the same name at offset 29' from regexp +SET default_regex_flags='DUPNAMES'; +SELECT REGEXP_SUBSTR('Monday Mon','^((?<DN>Mon|Fri|Sun)day|(?<DN>Tue)sday).*(?P=DN)$'); +REGEXP_SUBSTR('Monday Mon','^((?<DN>Mon|Fri|Sun)day|(?<DN>Tue)sday).*(?P=DN)$') +Monday Mon +SELECT REGEXP_SUBSTR('Tuesday Tue','^((?<DN>Mon|Fri|Sun)day|(?<DN>Tue)sday).*(?P=DN)$'); +REGEXP_SUBSTR('Tuesday Tue','^((?<DN>Mon|Fri|Sun)day|(?<DN>Tue)sday).*(?P=DN)$') +Tuesday Tue +SET default_regex_flags=DEFAULT; +SELECT 'AB' RLIKE 'A B'; +'AB' RLIKE 'A B' +0 +SELECT 'AB' RLIKE 'A# this is a comment\nB'; +'AB' RLIKE 'A# this is a comment\nB' +0 +SET default_regex_flags='EXTENDED'; +SELECT 'AB' RLIKE 'A B'; +'AB' RLIKE 'A B' +1 +SELECT 'AB' RLIKE 'A# this is a comment\nB'; +'AB' RLIKE 'A# this is a comment\nB' +1 +SET default_regex_flags=DEFAULT; +SELECT 'Aq' RLIKE 'A\\q'; +'Aq' RLIKE 'A\\q' +1 +SET default_regex_flags='EXTRA'; +SELECT 'Aq' RLIKE 'A\\q'; +ERROR 42000: Got error 'unrecognized character follows \ at offset 2' from regexp +SET default_regex_flags=DEFAULT; +SELECT 'a\nb\nc' RLIKE '^b$'; +'a\nb\nc' RLIKE '^b$' +0 +SET default_regex_flags='MULTILINE'; +SELECT 'a\nb\nc' RLIKE '^b$'; +'a\nb\nc' RLIKE '^b$' +1 +SET default_regex_flags=DEFAULT; +SELECT REGEXP_SUBSTR('abc','.+'); +REGEXP_SUBSTR('abc','.+') +abc +SELECT REGEXP_REPLACE('abc','^(.*)(.*)$','\\1/\\2'); +REGEXP_REPLACE('abc','^(.*)(.*)$','\\1/\\2') +abc/ +SET default_regex_flags='UNGREEDY'; +SELECT REGEXP_SUBSTR('abc','.+'); +REGEXP_SUBSTR('abc','.+') +a +SELECT REGEXP_REPLACE('abc','^(.*)(.*)$','\\1/\\2'); +REGEXP_REPLACE('abc','^(.*)(.*)$','\\1/\\2') +/abc +SET default_regex_flags=DEFAULT; +# +# MDEV-6965 non-captured group \2 in regexp_replace +# +SELECT REGEXP_REPLACE('1 foo and bar', '(\\d+) foo and (\\d+ )?bar', '\\1 this and \\2that'); +REGEXP_REPLACE('1 foo and bar', '(\\d+) foo and (\\d+ )?bar', '\\1 this and \\2that') +1 this and that +# +# MDEV-8102 REGEXP function fails to match hex values when expression is stored as a variable +# +# Testing a warning +SET NAMES latin1; +SET @regCheck= '\\xE0\\x01'; +SELECT 0xE001 REGEXP @regCheck; +0xE001 REGEXP @regCheck +0 +Warnings: +Warning 1139 Got error 'pcre_exec: Invalid utf8 byte sequence in the subject string' from regexp +# Testing workaround N1: This makes the pattern to be a binary string: +SET NAMES latin1; +SET @regCheck= X'E001'; +SELECT 0xE001 REGEXP @regCheck; +0xE001 REGEXP @regCheck +1 +# Testing workaround N2: This also makes the pattern to be a binary string, using a different syntax: +SET NAMES latin1; +SET @regCheck= _binary '\\xE0\\x01'; +SELECT 0xE001 REGEXP @regCheck; +0xE001 REGEXP @regCheck +1 +# Testing workarond N3: This makes derivation of the subject string stronger (IMLICIT instead of COERCIBLE) +SET NAMES latin1; +SET @regCheck= '\\xE0\\x01'; +SELECT CAST(0xE001 AS BINARY) REGEXP @regCheck; +CAST(0xE001 AS BINARY) REGEXP @regCheck +1 +# MDEV-12420: Testing recursion overflow +SELECT 1 FROM dual WHERE ('Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,StrataCentral,Golf,Hotel,India,Juliet,Kilo,Lima,Mike,StrataL3,November,Oscar,StrataL2,Sand,P3,P4SwitchTest,Arsys,Poppa,ExtensionMgr,Arp,Quebec,Romeo,StrataApiV2,PtReyes,Sierra,SandAcl,Arrow,Artools,BridgeTest,Tango,SandT,PAlaska,Namespace,Agent,Qos,PatchPanel,ProjectReport,Ark,Gimp,Agent,SliceAgent,Arnet,Bgp,Ale,Tommy,Central,AsicPktTestLib,Hsc,SandL3,Abuild,Pca9555,Standby,ControllerDut,CalSys,SandLib,Sb820,PointV2,BfnLib,Evpn,BfnSdk,Sflow,ManagementActive,AutoTest,GatedTest,Bgp,Sand,xinetd,BfnAgentLib,bf-utils,Hello,BfnState,Eos,Artest,Qos,Scd,ThermoMgr,Uniform,EosUtils,Eb,FanController,Central,BfnL3,BfnL2,tcp_wrappers,Victor,Environment,Route,Failover,Whiskey,Xray,Gimp,BfnFixed,Strata,SoCal,XApi,Msrp,XpProfile,tcpdump,PatchPanel,ArosTest,FhTest,Arbus,XpAcl,MacConc,XpApi,telnet,QosTest,Alpha2,BfnVlan,Stp,VxlanControllerTest,MplsAgent,Bravo2,Lanz,BfnMbb,Intf,XCtrl,Unicast,SandTunnel,L3Unicast,Ipsec,MplsTest,Rsvp,EthIntf,StageMgr,Sol,MplsUtils,Nat,Ira,P4NamespaceDut,Counters,Charlie2,Aqlc,Mlag,Power,OpenFlow,Lag,RestApi,BfdTest,strongs,Sfa,CEosUtils,Adt746,MaintenanceMode,MlagDut,EosImage,IpEth,MultiProtocol,Launcher,Max3179,Snmp,Acl,IpEthTest,PhyEee,bf-syslibs,tacc,XpL2,p4-ar-switch,p4-bf-switch,LdpTest,BfnPhy,Mirroring,Phy6,Ptp' REGEXP '^((?!\b(Strata|StrataApi|StrataApiV2)\b).)*$'); +1 +Warnings: +Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp +SELECT CONCAT(REPEAT('100,',190),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; +CONCAT(REPEAT('100,',190),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' +1 +SELECT CONCAT(REPEAT('100,',600),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; +CONCAT(REPEAT('100,',600),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' +0 +Warnings: +Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp +SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',190),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); +REGEXP_INSTR(CONCAT(REPEAT('100,',190),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') +1 +SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',600),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); +REGEXP_INSTR(CONCAT(REPEAT('100,',600),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') +0 +Warnings: +Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp +SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',190/3),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); +LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',190/3),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) +255 +SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',600/3),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); +LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',600/3),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) +0 +Warnings: +Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp +SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',190/3),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); +LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',190/3),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) +0 +SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',600/3),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); +LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',600/3),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) +803 +Warnings: +Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp diff --git a/mysql-test/r/func_regexp_pcre_debug.result b/mysql-test/r/func_regexp_pcre_debug.result new file mode 100644 index 00000000000..e44492fca72 --- /dev/null +++ b/mysql-test/r/func_regexp_pcre_debug.result @@ -0,0 +1,10 @@ +SET debug_dbug='+d,pcre_exec_error_123'; +SELECT 'a' RLIKE 'a'; +'a' RLIKE 'a' +0 +Warnings: +Warning 1139 Got error 'pcre_exec: Internal error (-123)' from regexp +SET debug_dbug=''; +SELECT 'a' RLIKE 'a'; +'a' RLIKE 'a' +1 diff --git a/mysql-test/r/func_rollback.result b/mysql-test/r/func_rollback.result index 57968910051..91151302a06 100644 --- a/mysql-test/r/func_rollback.result +++ b/mysql-test/r/func_rollback.result @@ -190,8 +190,6 @@ END; SELECT f1_insert_select(2); f1_insert_select(2) 1 -Warnings: -Warning 1048 Column 'f2' cannot be null SELECT * FROM t1_not_null ORDER BY f1,f2; f1 f2 2 0 @@ -267,8 +265,6 @@ END; SELECT f1_insert_with_two_rows(); f1_insert_with_two_rows() 1 -Warnings: -Warning 1048 Column 'f2' cannot be null SELECT * FROM t1_not_null ORDER BY f1,f2; f1 f2 10 0 diff --git a/mysql-test/r/func_sapdb.result b/mysql-test/r/func_sapdb.result index 66a8b99f7fd..5b9743fb33f 100644 --- a/mysql-test/r/func_sapdb.result +++ b/mysql-test/r/func_sapdb.result @@ -62,7 +62,9 @@ datediff("1997-11-30 23:59:59.000001","1997-12-31") SET @@SQL_MODE="ALLOW_INVALID_DATES"; select datediff("1997-11-31 23:59:59.000001","1997-12-31"); datediff("1997-11-31 23:59:59.000001","1997-12-31") --30 +NULL +Warnings: +Warning 1292 Incorrect datetime value: '1997-11-31 23:59:59.000001' SET @@SQL_MODE=""; select datediff("1997-11-31 23:59:59.000001","1997-12-31"); datediff("1997-11-31 23:59:59.000001","1997-12-31") @@ -156,7 +158,7 @@ timestamp("2001-12-01", "25:01:01") 2001-12-02 01:01:01 select timestamp("2001-12-01 01:01:01.000100"); timestamp("2001-12-01 01:01:01.000100") -2001-12-01 01:01:01.0001 +2001-12-01 01:01:01.000100 select timestamp("2001-12-01"); timestamp("2001-12-01") 2001-12-01 00:00:00 diff --git a/mysql-test/r/func_set.result b/mysql-test/r/func_set.result index ca1ccd71c90..2c531ac4d78 100644 --- a/mysql-test/r/func_set.result +++ b/mysql-test/r/func_set.result @@ -5,7 +5,7 @@ explain extended select INTERVAL(55,10,20,30,40,50,60,70,80,90,100),interval(3,1 id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 select interval((55,10,20,30,40,50,60,70,80,90,100)) AS `INTERVAL(55,10,20,30,40,50,60,70,80,90,100)`,interval((3,1,(1 + 1),(((1 + 1) + 1) + 1))) AS `interval(3,1,1+1,1+1+1+1)`,field('IBM','NCA','ICL','SUN','IBM','DIGITAL') AS `field("IBM","NCA","ICL","SUN","IBM","DIGITAL")`,field('A','B','C') AS `field("A","B","C")`,elt(2,'ONE','TWO','THREE') AS `elt(2,"ONE","TWO","THREE")`,interval((0,1,2,3,4)) AS `interval(0,1,2,3,4)`,(elt(1,1,2,3) | 0) AS `elt(1,1,2,3)|0`,(elt(1,1.1,1.2,1.3) + 0) AS `elt(1,1.1,1.2,1.3)+0` +Note 1003 select interval(55,10,20,30,40,50,60,70,80,90,100) AS `INTERVAL(55,10,20,30,40,50,60,70,80,90,100)`,interval(3,1,(1 + 1),(((1 + 1) + 1) + 1)) AS `interval(3,1,1+1,1+1+1+1)`,field('IBM','NCA','ICL','SUN','IBM','DIGITAL') AS `field("IBM","NCA","ICL","SUN","IBM","DIGITAL")`,field('A','B','C') AS `field("A","B","C")`,elt(2,'ONE','TWO','THREE') AS `elt(2,"ONE","TWO","THREE")`,interval(0,1,2,3,4) AS `interval(0,1,2,3,4)`,(elt(1,1,2,3) | 0) AS `elt(1,1,2,3)|0`,(elt(1,1.1,1.2,1.3) + 0) AS `elt(1,1.1,1.2,1.3)+0` SELECT INTERVAL(13, 7, 14, 21, 28, 35, 42, 49, 56); INTERVAL(13, 7, 14, 21, 28, 35, 42, 49, 56) 1 diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 5a7a13bacb6..9a9b9f0d73d 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -845,7 +845,7 @@ explain extended select concat('*',space(5),'*'); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 select concat('*',repeat(' ',5),'*') AS `concat('*',space(5),'*')` +Note 1003 select concat('*',space(5),'*') AS `concat('*',space(5),'*')` explain extended select reverse('abc'); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used @@ -2083,7 +2083,7 @@ select space(4294967295); space(4294967295) NULL Warnings: -Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated +Warning 1301 Result of space() was larger than max_allowed_packet (1048576) - truncated select space(-4294967296); space(-4294967296) @@ -2091,7 +2091,7 @@ select space(4294967296); space(4294967296) NULL Warnings: -Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated +Warning 1301 Result of space() was larger than max_allowed_packet (1048576) - truncated select space(-4294967297); space(-4294967297) @@ -2099,7 +2099,7 @@ select space(4294967297); space(4294967297) NULL Warnings: -Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated +Warning 1301 Result of space() was larger than max_allowed_packet (1048576) - truncated select space(-18446744073709551615); space(-18446744073709551615) @@ -2110,7 +2110,7 @@ select space(18446744073709551615); space(18446744073709551615) NULL Warnings: -Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated +Warning 1301 Result of space() was larger than max_allowed_packet (1048576) - truncated select space(-18446744073709551616); space(-18446744073709551616) @@ -2123,7 +2123,7 @@ NULL Warnings: Warning 1916 Got overflow when converting '18446744073709551616' to INT. Value truncated. Warning 1916 Got overflow when converting '18446744073709551616' to INT. Value truncated. -Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated +Warning 1301 Result of space() was larger than max_allowed_packet (1048576) - truncated select space(-18446744073709551617); space(-18446744073709551617) @@ -2136,7 +2136,7 @@ NULL Warnings: Warning 1916 Got overflow when converting '18446744073709551617' to INT. Value truncated. Warning 1916 Got overflow when converting '18446744073709551617' to INT. Value truncated. -Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated +Warning 1301 Result of space() was larger than max_allowed_packet (1048576) - truncated select rpad('hello', -1, '1'); rpad('hello', -1, '1') NULL @@ -2658,6 +2658,17 @@ group_concat( i ) field NULL NULL 8 drop table t1; +# +# Bug#11766684 59851: UNINITIALISED VALUE IN ITEM_FUNC_LIKE::SELECT_OPTIMIZE WITH SUBQUERY AND +# +CREATE TABLE t2(a INT, KEY(a)); +INSERT INTO t2 VALUES (1),(2); +CREATE TABLE t1(b INT, PRIMARY KEY(b)); +INSERT INTO t1 VALUES (0),(254); +SELECT 1 FROM t2 WHERE a LIKE +(SELECT EXPORT_SET(1, b, b, b, b) FROM t1 LIMIT 1); +1 +DROP TABLE t1, t2; End of 5.1 tests # # Start of 5.3 tests @@ -2956,3 +2967,1587 @@ md5(_filename "a") sha(_filename "a") # # End of 5.5 tests # +# +# Start of 5.6 tests +# +# +# WL#5510 Functions to_base64 and from_base64 +# +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',63)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(85) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh +YWFhYWFh 85 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(66) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 63 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',62)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(85) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh +YWFhYWE= 85 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(66) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 62 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',61)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(85) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh +YWFhYQ== 85 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(66) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 61 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',60)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(81) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh +YWFh 81 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(63) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 60 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',59)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(81) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh +YWE= 81 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(63) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 59 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',58)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(81) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh +YQ== 81 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(63) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 58 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',57)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(76) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh 76 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(57) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 57 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',56)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(76) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE= 76 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(57) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 56 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',55)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(76) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ== 76 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(57) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 55 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',54)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(72) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh 72 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(54) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 54 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',53)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(72) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE= 72 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(54) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 53 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',52)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(72) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ== 72 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(54) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 52 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',51)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(68) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh 68 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(51) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 51 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',50)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(68) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE= 68 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(51) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 50 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',49)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(68) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ== 68 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(51) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 49 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',48)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(64) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh 64 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(48) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 48 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',47)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(64) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE= 64 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(48) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 47 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',46)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(64) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ== 64 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(48) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 46 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',45)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(60) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh 60 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(45) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 45 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',44)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(60) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE= 60 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(45) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 44 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',43)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(60) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ== 60 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(45) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 43 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',42)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(56) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh 56 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(42) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 42 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',41)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(56) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE= 56 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(42) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 41 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',40)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(56) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ== 56 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(42) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 40 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',39)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(52) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh 52 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(39) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 39 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',38)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(52) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE= 52 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(39) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 38 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',37)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(52) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ== 52 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(39) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 37 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',36)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(48) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh 48 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(36) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 36 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',35)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(48) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE= 48 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(36) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 35 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',34)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(48) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ== 48 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(36) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 34 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',33)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(44) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh 44 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(33) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 33 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',32)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(44) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE= 44 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(33) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 32 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',31)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(44) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ== 44 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(33) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 31 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',30)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(40) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh 40 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(30) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 30 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',29)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(40) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE= 40 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(30) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaaa 29 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',28)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(40) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ== 40 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(30) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaaa 28 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',27)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(36) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh 36 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(27) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaaa 27 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',26)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(36) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE= 36 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(27) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaaa 26 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',25)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(36) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ== 36 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(27) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaaa 25 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',24)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(32) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh 32 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(24) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaaa 24 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',23)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(32) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE= 32 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(24) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaaa 23 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',22)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(32) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ== 32 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(24) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaaa 22 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',21)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(28) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWFh 28 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(21) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaaa 21 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',20)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(28) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYWE= 28 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(21) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaaa 20 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',19)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(28) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFhYQ== 28 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(21) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaaa 19 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',18)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(24) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWFh 24 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(18) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaaa 18 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',17)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(24) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYWE= 24 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(18) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaaa 17 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',16)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(24) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFhYQ== 24 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(18) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaaa 16 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',15)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(20) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWFh 20 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(15) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaaa 15 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',14)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(20) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYWE= 20 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(15) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaaa 14 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',13)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(20) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFhYQ== 20 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(15) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaaa 13 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',12)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(16) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWFh 16 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(12) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaaa 12 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',11)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(16) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYWE= 16 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(12) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaaa 11 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',10)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(16) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFhYQ== 16 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(12) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaaa 10 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',9)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(12) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWFh 12 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(9) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaaa 9 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',8)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(12) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYWE= 12 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(9) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaaa 8 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',7)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(12) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFhYQ== 12 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(9) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaaa 7 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',6)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(8) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWFh 8 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaaa 6 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',5)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(8) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYWE= 8 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaaa 5 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',4)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(8) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFhYQ== 8 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaaa 4 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',3)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(4) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWFh 4 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aaa 3 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',2)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(4) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YWE= 4 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +aa 2 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',1)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` varchar(4) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) +YQ== 4 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` varbinary(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) +a 1 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',0)) AS to_base64; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `to_base64` char(0) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT to_base64, LENGTH(to_base64) FROM t1; +to_base64 LENGTH(to_base64) + 0 +CREATE TABLE t2 AS SELECT from_base64(to_base64) AS from_base64 FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `from_base64` binary(0) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT from_base64, LENGTH(from_base64) FROM t2; +from_base64 LENGTH(from_base64) + 0 +DROP TABLE t2; +DROP TABLE t1; + +CREATE TABLE t1 (a VARBINARY(64)); +INSERT INTO t1 VALUES (0x00), (0x0000), (0x000000), (0x00000000); +INSERT INTO t1 VALUES (0x00010203040506070809); +SELECT TO_BASE64(a), hex(a) FROM t1 ORDER BY a; +TO_BASE64(a) hex(a) +AA== 00 +AAA= 0000 +AAAA 000000 +AAAAAA== 00000000 +AAECAwQFBgcICQ== 00010203040506070809 +DROP TABLE t1; +# +# Test NULL output for NULL input +# +SELECT TO_BASE64(NULL); +TO_BASE64(NULL) +NULL +SELECT FROM_BASE64(NULL); +FROM_BASE64(NULL) +NULL +# +# RFC4648 test vectors +# +SELECT @b:= TO_BASE64(''), FROM_BASE64(@b); +@b:= TO_BASE64('') FROM_BASE64(@b) + +SELECT @b:= TO_BASE64('f'), FROM_BASE64(@b); +@b:= TO_BASE64('f') FROM_BASE64(@b) +Zg== f +SELECT @b:= TO_BASE64('fo'), FROM_BASE64(@b); +@b:= TO_BASE64('fo') FROM_BASE64(@b) +Zm8= fo +SELECT @b:= TO_BASE64('foo'), FROM_BASE64(@b); +@b:= TO_BASE64('foo') FROM_BASE64(@b) +Zm9v foo +SELECT @b:= TO_BASE64('foob'), FROM_BASE64(@b); +@b:= TO_BASE64('foob') FROM_BASE64(@b) +Zm9vYg== foob +SELECT @b:= TO_BASE64('fooba'), FROM_BASE64(@b); +@b:= TO_BASE64('fooba') FROM_BASE64(@b) +Zm9vYmE= fooba +SELECT @b:= TO_BASE64('foobar'), FROM_BASE64(@b); +@b:= TO_BASE64('foobar') FROM_BASE64(@b) +Zm9vYmFy foobar +# +# Invalid characters - return NULL +# +SELECT hex(FROM_BASE64('#')); +hex(FROM_BASE64('#')) +NULL +Warnings: +Warning 1958 Bad base64 data as position 0 +SELECT hex(FROM_BASE64('A#')); +hex(FROM_BASE64('A#')) +NULL +Warnings: +Warning 1958 Bad base64 data as position 1 +SELECT hex(FROM_BASE64('AB#')); +hex(FROM_BASE64('AB#')) +NULL +Warnings: +Warning 1958 Bad base64 data as position 2 +SELECT hex(FROM_BASE64('ABC#')); +hex(FROM_BASE64('ABC#')) +NULL +Warnings: +Warning 1958 Bad base64 data as position 3 +SELECT hex(FROM_BASE64('ABCD#')); +hex(FROM_BASE64('ABCD#')) +NULL +Warnings: +Warning 1958 Bad base64 data as position 4 +# +# "=" is not valid on the first and second positions of a quadruple +# +SELECT hex(FROM_BASE64('=')); +hex(FROM_BASE64('=')) +NULL +Warnings: +Warning 1958 Bad base64 data as position 0 +SELECT hex(FROM_BASE64('A=')); +hex(FROM_BASE64('A=')) +NULL +Warnings: +Warning 1958 Bad base64 data as position 1 +SELECT hex(FROM_BASE64('ABCD=')); +hex(FROM_BASE64('ABCD=')) +NULL +Warnings: +Warning 1958 Bad base64 data as position 4 +SELECT hex(FROM_BASE64('ABCDE=')); +hex(FROM_BASE64('ABCDE=')) +NULL +Warnings: +Warning 1958 Bad base64 data as position 5 +# +# Incomplete sequences - return NULL +# +SELECT hex(FROM_BASE64('A')); +hex(FROM_BASE64('A')) +NULL +Warnings: +Warning 1958 Bad base64 data as position 1 +SELECT hex(FROM_BASE64('AB')); +hex(FROM_BASE64('AB')) +NULL +Warnings: +Warning 1958 Bad base64 data as position 2 +SELECT hex(FROM_BASE64('ABC')); +hex(FROM_BASE64('ABC')) +NULL +Warnings: +Warning 1958 Bad base64 data as position 3 +# +# Unexpected input after pad characters - return NULL +# +SELECT hex(FROM_BASE64('AAA=x')); +hex(FROM_BASE64('AAA=x')) +NULL +Warnings: +Warning 1958 Bad base64 data as position 4 +SELECT hex(FROM_BASE64('AA==x')); +hex(FROM_BASE64('AA==x')) +NULL +Warnings: +Warning 1958 Bad base64 data as position 4 +# +# Delimiters are allowed at any position +# +SELECT hex(FROM_BASE64(' A B C D ')); +hex(FROM_BASE64(' A B C D ')) +001083 +SELECT hex(FROM_BASE64(' A A = = ')); +hex(FROM_BASE64(' A A = = ')) +00 +SELECT hex(FROM_BASE64(' A A A = ')); +hex(FROM_BASE64(' A A A = ')) +0000 +SELECT hex(FROM_BASE64(' A \n B \r C \t D ')); +hex(FROM_BASE64(' A \n B \r C \t D ')) +001083 +# +# Testing that to_base64 respects max_allowed_packet +# +SELECT LENGTH(TO_BASE64(REPEAT('a', @@max_allowed_packet-10))); +LENGTH(TO_BASE64(REPEAT('a', @@max_allowed_packet-10))) +NULL +Warnings: +Warning 1301 Result of to_base64() was larger than max_allowed_packet (1048576) - truncated +# +# Testing base64 with various data types +# +CREATE TABLE t1 ( +i1 INT, +f1 FLOAT, +dc1 DECIMAL(10,5), +e1 ENUM('enum11','enum12','enum13'), +s1 SET('set1','set2','set3'), +t1 TIME, +d1 DATE, +dt1 DATETIME +); +INSERT INTO t1 VALUES +(-12345, -456.789, 123.45, 'enum13', 'set1,set3', +'01:02:03', '2010-01-01', '2011-01-01 02:03:04'); +SELECT FROM_BASE64(TO_BASE64(i1)) FROM t1; +FROM_BASE64(TO_BASE64(i1)) +-12345 +SELECT FROM_BASE64(TO_BASE64(f1)) FROM t1; +FROM_BASE64(TO_BASE64(f1)) +-456.789 +SELECT FROM_BASE64(TO_BASE64(dc1)) FROM t1; +FROM_BASE64(TO_BASE64(dc1)) +123.45000 +SELECT FROM_BASE64(TO_BASE64(e1)) FROM t1; +FROM_BASE64(TO_BASE64(e1)) +enum13 +SELECT FROM_BASE64(TO_BASE64(s1)) FROM t1; +FROM_BASE64(TO_BASE64(s1)) +set1,set3 +SELECT FROM_BASE64(TO_BASE64(t1)) FROM t1; +FROM_BASE64(TO_BASE64(t1)) +01:02:03 +SELECT FROM_BASE64(TO_BASE64(d1)) FROM t1; +FROM_BASE64(TO_BASE64(d1)) +2010-01-01 +SELECT FROM_BASE64(TO_BASE64(dt1)) FROM t1; +FROM_BASE64(TO_BASE64(dt1)) +2011-01-01 02:03:04 +DROP TABLE t1; +SELECT SPACE(@@global.max_allowed_packet*2); +SPACE(@@global.max_allowed_packet*2) +NULL +Warnings: +Warning 1301 Result of space() was larger than max_allowed_packet (1048576) - truncated +SET NAMES latin1; +PREPARE stmt FROM "SELECT COLLATION(space(2))"; +EXECUTE stmt; +COLLATION(space(2)) +latin1_swedish_ci +SET NAMES latin2; +EXECUTE stmt; +COLLATION(space(2)) +latin2_general_ci +# +# End of 5.6 tests +# +# +# Start of 10.0 tests +# +# +# MDEV-12681 Wrong VIEW results for CHAR(0xDF USING latin1) +# +EXPLAIN EXTENDED SELECT CHAR(0xDF USING latin1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select char(0xdf using latin1) AS `CHAR(0xDF USING latin1)` +EXPLAIN EXTENDED SELECT CHAR(0xDF USING `binary`); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select char(0xdf) AS `CHAR(0xDF USING ``binary``)` +EXPLAIN EXTENDED SELECT CHAR(0xDF); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select char(0xdf) AS `CHAR(0xDF)` diff --git a/mysql-test/r/func_system.result b/mysql-test/r/func_system.result index fa05021eb47..1452cf7e533 100644 --- a/mysql-test/r/func_system.result +++ b/mysql-test/r/func_system.result @@ -25,14 +25,14 @@ user() like _latin1"%@%" select charset(user()); charset(user()) utf8 -select version()>="3.23.29"; -version()>="3.23.29" +select version()>="03.23.29"; +version()>="03.23.29" 1 -select version()>=_utf8"3.23.29"; -version()>=_utf8"3.23.29" +select version()>=_utf8"03.23.29"; +version()>=_utf8"03.23.29" 1 -select version()>=_latin1"3.23.29"; -version()>=_latin1"3.23.29" +select version()>=_latin1"03.23.29"; +version()>=_latin1"03.23.29" 1 select charset(version()); charset(version()) @@ -47,7 +47,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `database()` varchar(34) CHARACTER SET utf8 DEFAULT NULL, - `user()` varchar(77) CHARACTER SET utf8 NOT NULL DEFAULT '', + `user()` varchar(141) CHARACTER SET utf8 NOT NULL DEFAULT '', `version` char(60) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index 2c1c416472f..97ef61047a5 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -320,3 +320,20 @@ id select_type table type possible_keys key key_len ref rows filtered Extra Warnings: Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (not((`test`.`t1`.`a` + 0))) drop table t1; +# +# Start of 10.0 tests +# +# +# MDEV-7001 Bad result for NOT NOT STRCMP('a','b') and NOT NOT NULLIF(2,3) +# +SELECT NOT NOT strcmp('a','b'); +NOT NOT strcmp('a','b') +1 +EXPLAIN EXTENDED SELECT NOT NOT strcmp('a','b'); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select (strcmp('a','b') <> 0) AS `NOT NOT strcmp('a','b')` +# +# End of 10.0 tests +# diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index cffed8eae5b..ab0576c69a7 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -971,7 +971,7 @@ Warnings: Warning 1292 Truncated incorrect time value: '15461882265600' SELECT TIME_TO_SEC('916:40:00'); TIME_TO_SEC('916:40:00') -3020399.999999 +3020399 Warnings: Warning 1292 Truncated incorrect time value: '916:40:00' SELECT ADDTIME('500:00:00', '416:40:00'); @@ -1023,11 +1023,11 @@ MAKETIME(CAST(-1 AS UNSIGNED), 0, 0) Warnings: Note 1105 Cast to unsigned converted negative integer to it's positive complement Warning 1292 Truncated incorrect time value: '18446744073709551615:00:00' -SELECT EXTRACT(HOUR FROM '100000:02:03'); -EXTRACT(HOUR FROM '100000:02:03') +SELECT EXTRACT(HOUR FROM '10000:02:03'); +EXTRACT(HOUR FROM '10000:02:03') 22 Warnings: -Warning 1292 Truncated incorrect time value: '100000:02:03' +Warning 1292 Truncated incorrect time value: '10000:02:03' CREATE TABLE t1(f1 TIME); INSERT INTO t1 VALUES('916:00:00 a'); Warnings: @@ -1719,6 +1719,8 @@ create table t1(a time); insert into t1 values ('00:00:00'),('00:01:00'); select 1 from t1 where 1 < some (select cast(a as datetime) from t1); 1 +1 +1 drop table t1; # # Bug #21564557: INCONSISTENT OUTPUT FROM 5.5 AND 5.6 @@ -1754,6 +1756,8 @@ Warning 1292 Incorrect datetime value: '2015-06-00' SELECT UNIX_TIMESTAMP(STR_TO_DATE('0000-00-00 10:30:30', '%Y-%m-%d %h:%i:%s')); UNIX_TIMESTAMP(STR_TO_DATE('0000-00-00 10:30:30', '%Y-%m-%d %h:%i:%s')) NULL +Warnings: +Warning 1411 Incorrect datetime value: '0000-00-00 10:30:30' for function str_to_date set sql_mode= default; select time('10:10:10') > 10; time('10:10:10') > 10 @@ -1888,9 +1892,11 @@ Warnings: Warning 1292 Incorrect datetime value: '0' Warning 1292 Incorrect datetime value: '0' drop table t1; +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); select convert_tz(timediff('0000-00-00 00:00:00', cast('2008-03-26 07:09:06' as datetime)), 'UTC', 'Europe/Moscow'); convert_tz(timediff('0000-00-00 00:00:00', cast('2008-03-26 07:09:06' as datetime)), 'UTC', 'Europe/Moscow') NULL +SET timestamp=DEFAULT; create table t1 (f1 integer, f2 date); insert into t1 values (1,'2011-05-05'),(2,'2011-05-05'),(3,'2011-05-05'),(4,'2011-05-05'),(5,'2011-05-05'),(6, '2011-05-06'); select * from t1 where 1 and concat(f2)=MAKEDATE(2011, 125); @@ -1909,9 +1915,15 @@ least(1, f1) Warnings: Warning 1292 Incorrect datetime value: '1' drop table t1; +SET timestamp=UNIX_TIMESTAMP('2014-04-14 10:10:10'); +select now() > coalesce(time('21:43:24'), date('2010-05-03')); +now() > coalesce(time('21:43:24'), date('2010-05-03')) +0 +SET timestamp=UNIX_TIMESTAMP('2014-04-14 22:22:22'); select now() > coalesce(time('21:43:24'), date('2010-05-03')); now() > coalesce(time('21:43:24'), date('2010-05-03')) 1 +SET timestamp=DEFAULT; create table t1 (f1 timestamp); select * from t1 where f1 > f1 and f1 <=> timestampadd(hour, 9 , '2010-01-01 16:55:35'); f1 @@ -1949,15 +1961,20 @@ select cast(f1 AS time) from t1; cast(f1 AS time) 00:00:00 drop table t1; +SET timestamp=UNIX_TIMESTAMP('2014-06-01 10:20:30'); select greatest(cast("0-0-0" as date), cast("10:20:05" as time)); greatest(cast("0-0-0" as date), cast("10:20:05" as time)) -0000-00-00 +2014-06-01 select greatest(cast("0-0-0" as date), cast("10:20:05" as time)) = '0000-00-00'; greatest(cast("0-0-0" as date), cast("10:20:05" as time)) = '0000-00-00' +0 +select greatest(cast("0-0-0" as date), cast("10:20:05" as time)) = '2014-06-01'; +greatest(cast("0-0-0" as date), cast("10:20:05" as time)) = '2014-06-01' 1 select cast(greatest(cast("0-0-0" as date), cast("10:20:05" as time)) as datetime(6)); cast(greatest(cast("0-0-0" as date), cast("10:20:05" as time)) as datetime(6)) -0000-00-00 00:00:00.000000 +2014-06-01 00:00:00.000000 +SET timestamp=DEFAULT; select microsecond('12:00:00.123456'), microsecond('2009-12-31 23:59:59.000010'); microsecond('12:00:00.123456') microsecond('2009-12-31 23:59:59.000010') 123456 10 @@ -2227,15 +2244,16 @@ DROP TABLE t1; # # MDEV-4870 Wrong values of CASE, COALESCE, IFNULL on a combination of different temporal types # +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30'); CREATE TABLE t1 (dt2 DATETIME(2), t3 TIME(3), d DATE); INSERT INTO t1 VALUES ('2001-01-01 00:00:00.12', '00:00:00.567', '2002-01-01'); SELECT CASE WHEN 0 THEN dt2 ELSE t3 END FROM t1; CASE WHEN 0 THEN dt2 ELSE t3 END -0000-00-00 00:00:00.567 +2001-01-01 00:00:00.567 CREATE TABLE t2 AS SELECT CASE WHEN 0 THEN dt2 ELSE t3 END FROM t1; SELECT * FROM t2; CASE WHEN 0 THEN dt2 ELSE t3 END -0000-00-00 00:00:00.567 +2001-01-01 00:00:00.567 SHOW COLUMNS FROM t2; Field Type Null Key Default Extra CASE WHEN 0 THEN dt2 ELSE t3 END datetime(3) YES NULL @@ -2254,7 +2272,7 @@ CONCAT(CASE WHEN 1 THEN d ELSE t3 END) 2002-01-01 00:00:00.000 SELECT CASE WHEN 1 THEN t3 ELSE d END FROM t1; CASE WHEN 1 THEN t3 ELSE d END -0000-00-00 00:00:00.567 +2001-01-01 00:00:00.567 SELECT COALESCE(d, t3) FROM t1; COALESCE(d, t3) 2002-01-01 00:00:00.000 @@ -2274,6 +2292,7 @@ SELECT IFNULL(d, t3), CONCAT(IFNULL(d, t3)) FROM t1; IFNULL(d, t3) CONCAT(IFNULL(d, t3)) 2002-01-01 00:00:00.000 2002-01-01 00:00:00.000 DROP TABLE t1; +SET timestamp=DEFAULT; # # MDEV-4724 Some temporal functions do not preserve microseconds # @@ -2455,7 +2474,7 @@ TIMESTAMP('2001-01-01','10:10:10.12345'), TIMESTAMP('2001-01-01','10:10:10.123456'), TIMESTAMP('2001-01-01','10:10:10.1234567'); Warnings: -Warning 1292 Truncated incorrect time value: '10:10:10.1234567' +Note 1292 Truncated incorrect time value: '10:10:10.1234567' SHOW COLUMNS FROM t1; Field Type Null Key Default Extra TIMESTAMP('2001-01-01','10:10:10') datetime YES NULL @@ -2480,7 +2499,7 @@ TIMESTAMP('2001-01-01 00:00:00.12345','10:10:10'), TIMESTAMP('2001-01-01 00:00:00.123456','10:10:10'), TIMESTAMP('2001-01-01 00:00:00.1234567','10:10:10'); Warnings: -Warning 1292 Truncated incorrect datetime value: '2001-01-01 00:00:00.1234567' +Note 1292 Truncated incorrect datetime value: '2001-01-01 00:00:00.1234567' SHOW COLUMNS FROM t1; Field Type Null Key Default Extra TIMESTAMP('2001-01-01 00:00:00','10:10:10') datetime YES NULL @@ -2495,6 +2514,7 @@ SELECT * FROM t1; TIMESTAMP('2001-01-01 00:00:00','10:10:10') TIMESTAMP('2001-01-01 00:00:00.1','10:10:10') TIMESTAMP('2001-01-01 00:00:00.12','10:10:10') TIMESTAMP('2001-01-01 00:00:00.123','10:10:10') TIMESTAMP('2001-01-01 00:00:00.1234','10:10:10') TIMESTAMP('2001-01-01 00:00:00.12345','10:10:10') TIMESTAMP('2001-01-01 00:00:00.123456','10:10:10') TIMESTAMP('2001-01-01 00:00:00.1234567','10:10:10') 2001-01-01 10:10:10 2001-01-01 10:10:10.1 2001-01-01 10:10:10.12 2001-01-01 10:10:10.123 2001-01-01 10:10:10.1234 2001-01-01 10:10:10.12345 2001-01-01 10:10:10.123456 2001-01-01 10:10:10.123456 DROP TABLE t1; +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); CREATE TABLE t1 AS SELECT TIMESTAMP('00:00:00','10:10:10'), TIMESTAMP(TIME('00:00:00'),'10:10:10'); @@ -2504,8 +2524,9 @@ TIMESTAMP('00:00:00','10:10:10') datetime YES NULL TIMESTAMP(TIME('00:00:00'),'10:10:10') datetime YES NULL SELECT * FROM t1; TIMESTAMP('00:00:00','10:10:10') TIMESTAMP(TIME('00:00:00'),'10:10:10') -NULL NULL +NULL 2001-02-03 10:10:10 DROP TABLE t1; +SET timestamp=DEFAULT; # # MDEV-4869 Wrong result of MAKETIME(0, 0, -0.1) # @@ -2515,6 +2536,7 @@ NULL # # MDEV-4857 Wrong result of HOUR('1 00:00:00') # +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); SELECT HOUR('1 02:00:00'), HOUR('26:00:00'); HOUR('1 02:00:00') HOUR('26:00:00') 26 26 @@ -2526,7 +2548,7 @@ HOUR(TIME('1 02:00:00')) HOUR(TIME('26:00:00')) 26 26 SELECT DAY(TIME('1 02:00:00')), DAY(TIME('26:00:00')); DAY(TIME('1 02:00:00')) DAY(TIME('26:00:00')) -0 0 +4 4 SELECT EXTRACT(HOUR FROM '1 02:00:00'), EXTRACT(HOUR FROM '26:00:00'); EXTRACT(HOUR FROM '1 02:00:00') EXTRACT(HOUR FROM '26:00:00') 2 2 @@ -2539,6 +2561,7 @@ EXTRACT(HOUR FROM TIME('1 02:00:00')) EXTRACT(HOUR FROM TIME('26:00:00')) SELECT EXTRACT(DAY FROM TIME('1 02:00:00')), EXTRACT(DAY FROM TIME('26:00:00')); EXTRACT(DAY FROM TIME('1 02:00:00')) EXTRACT(DAY FROM TIME('26:00:00')) 1 1 +SET timestamp=DEFAULT; # # MDEV-5458 RQG hits 'sql/tztime.cc:799: my_time_t sec_since_epoch(int, int, int, int, int, int): Assertion `mon > 0 && mon < 13' failed.' # @@ -2547,13 +2570,11 @@ CREATE TABLE t1 (t TIME); INSERT INTO t1 VALUES ('03:22:30'),('18:30:05'); SELECT CONVERT_TZ(GREATEST(t, CURRENT_DATE()), '+02:00', '+10:00') FROM t1; CONVERT_TZ(GREATEST(t, CURRENT_DATE()), '+02:00', '+10:00') -NULL -NULL +2014-02-26 06:59:59 +2014-02-26 06:59:59 Warnings: Warning 1292 Truncated incorrect time value: '1296:00:00' -Warning 1292 Incorrect datetime value: '838:59:59' Warning 1292 Truncated incorrect time value: '1296:00:00' -Warning 1292 Incorrect datetime value: '838:59:59' SELECT GREATEST(t, CURRENT_DATE()) FROM t1; GREATEST(t, CURRENT_DATE()) 838:59:59 @@ -2582,6 +2603,103 @@ c1 c2 Warnings: Warning 1292 Truncated incorrect DECIMAL value: '2000000000000000000.0' # +# MDEV-4838 Wrong metadata for DATE_ADD('string', INVERVAL) +# +SELECT DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE); +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE) 254 19 19 Y 0 0 8 +DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE) +2011-01-02 12:14:14 +# +# MDEV-5450 Assertion `cached_field_ type == MYSQL_TYPE_STRING || ltime.time_type == MYSQL_TIMESTAMP_NONE || mysql_type_to_time_type(cached_field_type) == ltime.time_type' fails with IF, ISNULL, ADDDATE +# +CREATE TABLE t1 (a DATETIME, b DATE); +INSERT INTO t1 VALUES (NULL, '2012-12-21'); +SELECT IF(1,ADDDATE(IFNULL(a,b),0),1) FROM t1; +IF(1,ADDDATE(IFNULL(a,b),0),1) +2012-12-21 00:00:00 +SELECT CAST(ADDDATE(IFNULL(a,b),0) AS CHAR) FROM t1; +CAST(ADDDATE(IFNULL(a,b),0) AS CHAR) +2012-12-21 00:00:00 +SELECT CAST(ADDDATE(COALESCE(a,b),0) AS CHAR) FROM t1; +CAST(ADDDATE(COALESCE(a,b),0) AS CHAR) +2012-12-21 00:00:00 +SELECT CAST(ADDDATE(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) FROM t1; +CAST(ADDDATE(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) +2012-12-21 00:00:00 +SELECT IF(1,ADDTIME(IFNULL(a,b),0),1) FROM t1; +IF(1,ADDTIME(IFNULL(a,b),0),1) +2012-12-21 00:00:00 +SELECT CAST(ADDTIME(IFNULL(a,b),0) AS CHAR) FROM t1; +CAST(ADDTIME(IFNULL(a,b),0) AS CHAR) +2012-12-21 00:00:00 +SELECT CAST(ADDTIME(COALESCE(a,b),0) AS CHAR) FROM t1; +CAST(ADDTIME(COALESCE(a,b),0) AS CHAR) +2012-12-21 00:00:00 +SELECT CAST(ADDTIME(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) FROM t1; +CAST(ADDTIME(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) +2012-12-21 00:00:00 +DROP TABLE t1; +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); +CREATE TABLE t1 (a DATETIME, b TIME); +INSERT INTO t1 VALUES (NULL, '00:20:12'); +SELECT IF(1,ADDDATE(IFNULL(a,b),0),1) FROM t1; +IF(1,ADDDATE(IFNULL(a,b),0),1) +2001-02-03 00:20:12 +SELECT CAST(ADDDATE(IFNULL(a,b),0) AS CHAR) FROM t1; +CAST(ADDDATE(IFNULL(a,b),0) AS CHAR) +2001-02-03 00:20:12 +SELECT CAST(ADDDATE(COALESCE(a,b),0) AS CHAR) FROM t1; +CAST(ADDDATE(COALESCE(a,b),0) AS CHAR) +2001-02-03 00:20:12 +SELECT CAST(ADDDATE(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) FROM t1; +CAST(ADDDATE(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) +2001-02-03 00:20:12 +SELECT IF(1,ADDTIME(IFNULL(a,b),0),1) FROM t1; +IF(1,ADDTIME(IFNULL(a,b),0),1) +2001-02-03 00:20:12 +SELECT CAST(ADDTIME(IFNULL(a,b),0) AS CHAR) FROM t1; +CAST(ADDTIME(IFNULL(a,b),0) AS CHAR) +2001-02-03 00:20:12 +SELECT CAST(ADDTIME(COALESCE(a,b),0) AS CHAR) FROM t1; +CAST(ADDTIME(COALESCE(a,b),0) AS CHAR) +2001-02-03 00:20:12 +SELECT CAST(ADDTIME(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) FROM t1; +CAST(ADDTIME(CASE WHEN 0 THEN a ELSE b END,0) AS CHAR) +2001-02-03 00:20:12 +DROP TABLE t1; +SET timestamp=DEFAULT; +# +# MDEV-5870 Assertion `ltime->neg == 0' fails with COALESCE, ADDDATE, MAKEDATE +# +CREATE TABLE t1 (dt DATETIME); +INSERT INTO t1 VALUES ('2003-05-13 19:36:05'), ('2012-12-12 09:20:06'); +SELECT COALESCE(ADDDATE(MAKEDATE(2011,121), dt), '2006-09-12' ) FROM t1; +COALESCE(ADDDATE(MAKEDATE(2011,121), dt), '2006-09-12' ) +2006-09-12 +2006-09-12 +Warnings: +Warning 1441 Datetime function: datetime field overflow +Warning 1441 Datetime function: datetime field overflow +DROP TABLE t1; +# +# MDEV-6101 Hybrid functions do not add CURRENT_DATE when converting TIME to DATETIME +# +SET timestamp=UNIX_TIMESTAMP('2014-04-15 01:02:03'); +SELECT IF(1,TIME'10:20:30',DATE'2001-01-01'); +IF(1,TIME'10:20:30',DATE'2001-01-01') +2014-04-15 10:20:30 +SELECT IFNULL(TIME'10:20:30',DATE'2001-01-01'); +IFNULL(TIME'10:20:30',DATE'2001-01-01') +2014-04-15 10:20:30 +SELECT CASE WHEN 1 THEN TIME'10:20:30' ELSE DATE'2001-01-01' END; +CASE WHEN 1 THEN TIME'10:20:30' ELSE DATE'2001-01-01' END +2014-04-15 10:20:30 +SELECT COALESCE(TIME'10:20:30',DATE'2001-01-01'); +COALESCE(TIME'10:20:30',DATE'2001-01-01') +2014-04-15 10:20:30 +SET timestamp=DEFAULT; +# # MDEV-5750 Assertion `ltime->year == 0' fails on a query with EXTRACT DAY_MINUTE and TIME column # CREATE TABLE t1 ( d DATE, t TIME ); @@ -2647,11 +2765,6 @@ Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect time value: '20000101' -SELECT TO_DAYS(SEC_TO_TIME(MAKEDATE(0,RAND(~0)))); -TO_DAYS(SEC_TO_TIME(MAKEDATE(0,RAND(~0)))) -0 -Warnings: -Warning 1292 Truncated incorrect time value: '20000101' SELECT SEC_TO_TIME(MAKEDATE(0,RAND(~0))); SEC_TO_TIME(MAKEDATE(0,RAND(~0))) 838:59:59 @@ -2660,3 +2773,110 @@ Warning 1292 Truncated incorrect time value: '20000101' # # End of 5.5 tests # +# +# MDEV-8205 timediff returns null when comparing decimal time to time string value +# +SELECT +TIMEDIFF('2014-01-01 00:00:00' , '2014-01-01 01:00:00' ) AS str_str, +TIMEDIFF('2014-01-01 00:00:00' , 20140101010000.000 ) AS str_dec, +TIMEDIFF(20140101000000.000 , 20140101010000.000 ) AS dec_dec, +TIMEDIFF(20140101000000.000 , '2014-01-01 01:00:00' ) AS dec_str; +str_str str_dec dec_dec dec_str +-01:00:00 -01:00:00.000 -01:00:00.000 -01:00:00.000 +SELECT +TIMEDIFF('2014-01-01 00:00:00' , '2014-01-02 01:00:00' ) AS str_str, +TIMEDIFF('2014-01-01 00:00:00' , 20140102010000.000 ) AS str_dec, +TIMEDIFF(20140101000000.000 , 20140102010000.000 ) AS dec_dec, +TIMEDIFF(20140101000000.000 , '2014-01-02 01:00:00' ) AS dec_str; +str_str str_dec dec_dec dec_str +-25:00:00 -25:00:00.000 -25:00:00.000 -25:00:00.000 +SELECT +TIMEDIFF('2014-01-01 00:00:00' , '2014-02-02 01:00:00' ) AS str_str, +TIMEDIFF('2014-01-01 00:00:00' , 20140202010000.000 ) AS str_dec, +TIMEDIFF(20140101000000.000 , 20140202010000.000 ) AS dec_dec, +TIMEDIFF(20140101000000.000 , '2014-02-02 01:00:00' ) AS dec_str; +str_str str_dec dec_dec dec_str +-769:00:00 -769:00:00.000 -769:00:00.000 -769:00:00.000 +SELECT +TIMEDIFF('2014-01-01 00:00:00' , '2014-03-02 01:00:00' ) AS str_str, +TIMEDIFF('2014-01-01 00:00:00' , 20140302010000.000 ) AS str_dec, +TIMEDIFF(20140101000000.000 , 20140302010000.000 ) AS dec_dec, +TIMEDIFF(20140101000000.000 , '2014-03-02 01:00:00' ) AS dec_str; +str_str str_dec dec_dec dec_str +-838:59:59 -838:59:59.999 -838:59:59.999 -838:59:59.999 +Warnings: +Warning 1292 Truncated incorrect time value: '-1441:00:00' +Warning 1292 Truncated incorrect time value: '-1441:00:00' +Warning 1292 Truncated incorrect time value: '-1441:00:00' +Warning 1292 Truncated incorrect time value: '-1441:00:00' +# +# MDEV-10787 Assertion `ltime->neg == 0' failed in void date_to_datetime(MYSQL_TIME*) +# +CREATE TABLE t1 (d DATE); +INSERT INTO t1 VALUES ('2005-07-20'),('2012-12-21'); +SELECT REPLACE( ADDDATE( d, INTERVAL 0.6732771076944444 HOUR_SECOND ), '2', 'x' ) FROM t1; +REPLACE( ADDDATE( d, INTERVAL 0.6732771076944444 HOUR_SECOND ), '2', 'x' ) +NULL +NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow +Warning 1441 Datetime function: datetime field overflow +SELECT REPLACE( ADDDATE( d, INTERVAL '0.6732771076944444' HOUR_SECOND ), '2', 'x' ) FROM t1; +REPLACE( ADDDATE( d, INTERVAL '0.6732771076944444' HOUR_SECOND ), '2', 'x' ) +NULL +NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow +Warning 1441 Datetime function: datetime field overflow +SELECT CAST(ADDDATE( d, INTERVAL 6732771076944444 SECOND) AS CHAR) FROM t1; +CAST(ADDDATE( d, INTERVAL 6732771076944444 SECOND) AS CHAR) +NULL +NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow +Warning 1441 Datetime function: datetime field overflow +SELECT CAST(ADDDATE( d, INTERVAL '67327710769444:44' HOUR_SECOND) AS CHAR) FROM t1; +CAST(ADDDATE( d, INTERVAL '67327710769444:44' HOUR_SECOND) AS CHAR) +NULL +NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow +Warning 1441 Datetime function: datetime field overflow +SELECT CAST(ADDDATE( d, INTERVAL '673277107694:44:44' HOUR_SECOND) AS CHAR) FROM t1; +CAST(ADDDATE( d, INTERVAL '673277107694:44:44' HOUR_SECOND) AS CHAR) +NULL +NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow +Warning 1441 Datetime function: datetime field overflow +DROP TABLE t1; +SELECT ADDDATE(DATE'0000-01-01', INTERVAL '3652423:23:59:59' DAY_SECOND); +ADDDATE(DATE'0000-01-01', INTERVAL '3652423:23:59:59' DAY_SECOND) +9999-12-31 23:59:59 +SELECT ADDDATE(DATE'0000-01-01', INTERVAL '0:87658175:59:59' DAY_SECOND); +ADDDATE(DATE'0000-01-01', INTERVAL '0:87658175:59:59' DAY_SECOND) +9999-12-31 23:59:59 +SELECT ADDDATE(DATE'0000-01-01', INTERVAL '0:0:5259490559:59' DAY_SECOND); +ADDDATE(DATE'0000-01-01', INTERVAL '0:0:5259490559:59' DAY_SECOND) +9999-12-31 23:59:59 +SELECT ADDDATE(DATE'0000-01-01', INTERVAL '0:0:0:315569433599' DAY_SECOND); +ADDDATE(DATE'0000-01-01', INTERVAL '0:0:0:315569433599' DAY_SECOND) +9999-12-31 23:59:59 +SELECT ADDDATE(DATE'0000-01-01', INTERVAL '3652423:0:0:315569433559' DAY_SECOND); +ADDDATE(DATE'0000-01-01', INTERVAL '3652423:0:0:315569433559' DAY_SECOND) +NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow +SELECT ADDDATE(DATE'0000-01-01', INTERVAL '0:87658175:0:315569433559' DAY_SECOND); +ADDDATE(DATE'0000-01-01', INTERVAL '0:87658175:0:315569433559' DAY_SECOND) +NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow +SELECT ADDDATE(DATE'0000-01-01', INTERVAL '0:0:5259490559:315569433599' DAY_SECOND); +ADDDATE(DATE'0000-01-01', INTERVAL '0:0:5259490559:315569433599' DAY_SECOND) +NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow +# +# End of 10.0 tests +# diff --git a/mysql-test/r/func_time_hires.result b/mysql-test/r/func_time_hires.result index 1a736c89573..62004687c22 100644 --- a/mysql-test/r/func_time_hires.result +++ b/mysql-test/r/func_time_hires.result @@ -19,7 +19,7 @@ time_to_sec('12:34:56') 45296 time_to_sec('12:34:56.789') 45296.789 select sec_to_time(time_to_sec('1:2:3')), sec_to_time(time_to_sec('2:3:4.567890')); sec_to_time(time_to_sec('1:2:3')) 01:02:03 -sec_to_time(time_to_sec('2:3:4.567890')) 02:03:04.56789 +sec_to_time(time_to_sec('2:3:4.567890')) 02:03:04.567890 select time_to_sec(sec_to_time(11111)), time_to_sec(sec_to_time(11111.22222)); time_to_sec(sec_to_time(11111)) 11111 time_to_sec(sec_to_time(11111.22222)) 11111.22222 diff --git a/mysql-test/r/func_weight_string.result b/mysql-test/r/func_weight_string.result new file mode 100644 index 00000000000..91ca9f68076 --- /dev/null +++ b/mysql-test/r/func_weight_string.result @@ -0,0 +1,92 @@ +drop table if exists t1; +set names latin1; +select hex(weight_string(0x010203)); +hex(weight_string(0x010203)) +010203 +select hex(weight_string('aa' as char(3))); +hex(weight_string('aa' as char(3))) +414120 +select hex(weight_string('a' as char(-1))); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-1)))' at line 1 +select hex(weight_string('a' as char(0))); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '0)))' at line 1 +select hex(weight_string('a' as char(1))); +hex(weight_string('a' as char(1))) +41 +select hex(weight_string('ab' as char(1))); +hex(weight_string('ab' as char(1))) +41 +select hex(weight_string('ab')); +hex(weight_string('ab')) +4142 +select hex(weight_string('aa' as binary(3))); +hex(weight_string('aa' as binary(3))) +616100 +select hex(weight_string(cast('aa' as binary(3)))); +hex(weight_string(cast('aa' as binary(3)))) +616100 +select hex(weight_string('ab' level 1-1 ASC)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ASC))' at line 1 +select hex(weight_string('ab' level 1-1 DESC)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DESC))' at line 1 +select hex(weight_string('ab' level 1-1 REVERSE)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'REVERSE))' at line 1 +select hex(weight_string('ab' level 1 ASC)); +hex(weight_string('ab' level 1 ASC)) +4142 +select hex(weight_string('ab' level 1 DESC)); +hex(weight_string('ab' level 1 DESC)) +BEBD +select hex(weight_string('ab' level 1 REVERSE)); +hex(weight_string('ab' level 1 REVERSE)) +4241 +select hex(weight_string('ab' level 1 DESC REVERSE)); +hex(weight_string('ab' level 1 DESC REVERSE)) +BDBE +create table t1 select weight_string('test') as w; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `w` varbinary(4) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 select weight_string(repeat('t',66000)) as w; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `w` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +select weight_string(NULL); +weight_string(NULL) +NULL +select 1 as weight_string, 2 as reverse; +weight_string reverse +1 2 +select coercibility(weight_string('test')); +coercibility(weight_string('test')) +4 +select coercibility(weight_string('test' collate latin1_swedish_ci)); +coercibility(weight_string('test' collate latin1_swedish_ci)) +0 +create table t1 (s1 varchar(5)); +insert into t1 values ('a'),(null); +select hex(weight_string(s1)) from t1 order by s1; +hex(weight_string(s1)) +NULL +41 +drop table t1; +# +# BUG#11898467 - SERVER CRASHES ON SELECT HEX(WEIGHT_STRING(STR AS [CHAR|BINARY](N))) IF N IS BIG +# +SELECT HEX(WEIGHT_STRING('ab' AS CHAR(1000000000000000000))); +HEX(WEIGHT_STRING('ab' AS CHAR(1000000000000000000))) +NULL +Warnings: +Warning 1301 Result of weight_string() was larger than max_allowed_packet (1048576) - truncated +SELECT HEX(WEIGHT_STRING('ab' AS BINARY(1000000000000000000))); +HEX(WEIGHT_STRING('ab' AS BINARY(1000000000000000000))) +NULL +Warnings: +Warning 1301 Result of cast_as_binary() was larger than max_allowed_packet (1048576) - truncated +Warning 1301 Result of weight_string() was larger than max_allowed_packet (1048576) - truncated diff --git a/mysql-test/r/function_defaults.result b/mysql-test/r/function_defaults.result new file mode 100644 index 00000000000..b8f42b86c1f --- /dev/null +++ b/mysql-test/r/function_defaults.result @@ -0,0 +1,3115 @@ +# +# Test of function defaults for any server, including embedded. +# +# +# Function defaults run 1. No microsecond precision. +# +SET TIME_ZONE = "+00:00"; +# +# Test of errors for column data types that dont support function +# defaults. +# +CREATE TABLE t1( a BIT DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a TINYINT DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a SMALLINT DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a MEDIUMINT DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a INT DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a BIGINT DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a FLOAT DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a DECIMAL DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a DATE DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a TIME DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a YEAR DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a BIT ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a TINYINT ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a SMALLINT ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a MEDIUMINT ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a INT ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a BIGINT ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a FLOAT ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a DECIMAL ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a DATE ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a TIME ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a YEAR ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +# +# Test that the default clause behaves like NOW() regarding time zones. +# +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +d TIMESTAMP NULL, +e DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +f DATETIME DEFAULT CURRENT_TIMESTAMP, +g DATETIME ON UPDATE CURRENT_TIMESTAMP, +h DATETIME +); +# 2011-09-27 14:11:08 UTC +SET TIMESTAMP = 1317132668.654321; +SET @old_time_zone = @@TIME_ZONE; +SET TIME_ZONE = "+05:00"; +INSERT INTO t1( d, h ) VALUES ( NOW(), NOW() ); +SELECT * FROM t1; +a b c d e f g h +2011-09-27 19:11:08 2011-09-27 19:11:08 0000-00-00 00:00:00 2011-09-27 19:11:08 2011-09-27 19:11:08 2011-09-27 19:11:08 NULL 2011-09-27 19:11:08 +# 1989-05-13 01:02:03 +SET TIMESTAMP = 611017323.543212; +UPDATE t1 SET d = NOW(), h = NOW(); +SELECT * FROM t1; +a b c d e f g h +1989-05-13 04:02:03 2011-09-27 19:11:08 1989-05-13 04:02:03 1989-05-13 04:02:03 1989-05-13 04:02:03 2011-09-27 19:11:08 1989-05-13 04:02:03 1989-05-13 04:02:03 +SET TIME_ZONE = @old_time_zone; +DROP TABLE t1; +# +# Test of several TIMESTAMP columns with different function defaults. +# +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +e TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +f INT +); +# 2011-04-19 07:22:02 UTC +SET TIMESTAMP = 1303197722.534231; +INSERT INTO t1 ( f ) VALUES (1); +SELECT * FROM t1; +a b c d e f +2011-04-19 07:22:02 2011-04-19 07:22:02 2011-04-19 07:22:02 0000-00-00 00:00:00 0000-00-00 00:00:00 1 +# 2011-04-19 07:23:18 UTC +SET TIMESTAMP = 1303197798.132435; +UPDATE t1 SET f = 2; +SELECT * FROM t1; +a b c d e f +2011-04-19 07:23:18 2011-04-19 07:23:18 2011-04-19 07:22:02 2011-04-19 07:23:18 2011-04-19 07:23:18 2 +DROP TABLE t1; +# +# Test of inserted values out of order. +# +CREATE TABLE t1 ( +a INT, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +e TIMESTAMP NULL, +f DATETIME, +g DATETIME DEFAULT CURRENT_TIMESTAMP, +h DATETIME ON UPDATE CURRENT_TIMESTAMP, +i DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +j INT +); +# 2011-04-19 07:22:02 UTC +SET TIMESTAMP = 1303197722.534231; +INSERT INTO t1 ( j, a ) VALUES ( 1, 1 ); +SELECT * FROM t1; +a b c d e f g h i j +1 2011-04-19 07:22:02 2011-04-19 07:22:02 0000-00-00 00:00:00 NULL NULL 2011-04-19 07:22:02 NULL 2011-04-19 07:22:02 1 +DROP TABLE t1; +# +# Test of ON DUPLICATE KEY UPDATE +# +CREATE TABLE t1 ( +a INT PRIMARY KEY, +b INT, +c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +e TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +f TIMESTAMP NOT NULL DEFAULT '1986-09-27 03:00:00.098765', +g TIMESTAMP NULL, +h DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +i DATETIME DEFAULT CURRENT_TIMESTAMP, +j DATETIME ON UPDATE CURRENT_TIMESTAMP, +k DATETIME NULL, +l DATETIME DEFAULT '1986-09-27 03:00:00.098765' +); +# 1977-12-21 23:00:00 UTC +SET TIMESTAMP = 251593200.192837; +INSERT INTO t1(a) VALUES (1) ON DUPLICATE KEY UPDATE b = 2; +SELECT * FROM t1; +a b c d e f g h i j k l +1 NULL 1977-12-21 23:00:00 1977-12-21 23:00:00 0000-00-00 00:00:00 1986-09-27 03:00:00 NULL 1977-12-21 23:00:00 1977-12-21 23:00:00 NULL NULL 1986-09-27 03:00:00 +# 1975-05-21 23:00:00 UTC +SET TIMESTAMP = 169945200.918273; +INSERT INTO t1(a) VALUES (1) ON DUPLICATE KEY UPDATE b = 2; +SELECT * FROM t1; +a b c d e f g h i j k l +1 2 1975-05-21 23:00:00 1977-12-21 23:00:00 1975-05-21 23:00:00 1986-09-27 03:00:00 NULL 1975-05-21 23:00:00 1977-12-21 23:00:00 1975-05-21 23:00:00 NULL 1986-09-27 03:00:00 +# 1973-08-14 09:11:22 UTC +SET TIMESTAMP = 114167482.534231; +INSERT INTO t1(a) VALUES (2) ON DUPLICATE KEY UPDATE b = 2; +SELECT * FROM t1; +a b c d e f g h i j k l +1 2 1975-05-21 23:00:00 1977-12-21 23:00:00 1975-05-21 23:00:00 1986-09-27 03:00:00 NULL 1975-05-21 23:00:00 1977-12-21 23:00:00 1975-05-21 23:00:00 NULL 1986-09-27 03:00:00 +2 NULL 1973-08-14 09:11:22 1973-08-14 09:11:22 0000-00-00 00:00:00 1986-09-27 03:00:00 NULL 1973-08-14 09:11:22 1973-08-14 09:11:22 NULL NULL 1986-09-27 03:00:00 +DROP TABLE t1; +CREATE TABLE t1 ( a INT PRIMARY KEY, b INT, c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ); +# 2011-04-19 07:23:18 UTC +SET TIMESTAMP = 1303197798.945156; +INSERT INTO t1 VALUES +(1, 0, '2001-01-01 01:01:01.111111'), +(2, 0, '2002-02-02 02:02:02.222222'), +(3, 0, '2003-03-03 03:03:03.333333'); +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01 +2 0 2002-02-02 02:02:02 +3 0 2003-03-03 03:03:03 +UPDATE t1 SET b = 2, c = c WHERE a = 2; +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01 +2 2 2002-02-02 02:02:02 +3 0 2003-03-03 03:03:03 +INSERT INTO t1 (a) VALUES (4); +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01 +2 2 2002-02-02 02:02:02 +3 0 2003-03-03 03:03:03 +4 NULL 2011-04-19 07:23:18 +UPDATE t1 SET c = '2004-04-04 04:04:04.444444' WHERE a = 4; +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01 +2 2 2002-02-02 02:02:02 +3 0 2003-03-03 03:03:03 +4 NULL 2004-04-04 04:04:04 +INSERT INTO t1 ( a ) VALUES ( 3 ), ( 5 ) ON DUPLICATE KEY UPDATE b = 3, c = c; +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01 +2 2 2002-02-02 02:02:02 +3 3 2003-03-03 03:03:03 +4 NULL 2004-04-04 04:04:04 +5 NULL 2011-04-19 07:23:18 +INSERT INTO t1 (a, c) VALUES +(4, '2004-04-04 00:00:00.444444'), +(6, '2006-06-06 06:06:06.666666') +ON DUPLICATE KEY UPDATE b = 4; +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01 +2 2 2002-02-02 02:02:02 +3 3 2003-03-03 03:03:03 +4 4 2011-04-19 07:23:18 +5 NULL 2011-04-19 07:23:18 +6 NULL 2006-06-06 06:06:06 +DROP TABLE t1; +# +# Test of REPLACE INTO executed as UPDATE. +# +CREATE TABLE t1 ( +a INT PRIMARY KEY, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +c DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +e DATETIME DEFAULT CURRENT_TIMESTAMP, +f TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +g DATETIME ON UPDATE CURRENT_TIMESTAMP, +h TIMESTAMP NULL, +i DATETIME +); +# 1970-09-21 09:11:12 UTC +SET TIMESTAMP = 22756272.163584; +REPLACE INTO t1 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b c d e f g h i +1 1970-09-21 09:11:12 1970-09-21 09:11:12 1970-09-21 09:11:12 1970-09-21 09:11:12 0000-00-00 00:00:00 NULL NULL NULL +# 1970-11-10 14:16:17 UTC +SET TIMESTAMP = 27094577.852954; +REPLACE INTO t1 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b c d e f g h i +1 1970-11-10 14:16:17 1970-11-10 14:16:17 1970-11-10 14:16:17 1970-11-10 14:16:17 0000-00-00 00:00:00 NULL NULL NULL +DROP TABLE t1; +# +# Test of insertion of NULL, DEFAULT and an empty row for DEFAULT +# CURRENT_TIMESTAMP. +# +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b DATETIME DEFAULT CURRENT_TIMESTAMP, +c INT +); +# 2011-04-20 09:53:41 UTC +SET TIMESTAMP = 1303293221.163578; +INSERT INTO t1 VALUES (NULL, NULL, 1), (DEFAULT, DEFAULT, 2); +INSERT INTO t1 ( a, b, c ) VALUES (NULL, NULL, 3), (DEFAULT, DEFAULT, 4); +SELECT * FROM t1; +a b c +2011-04-20 09:53:41 NULL 1 +2011-04-20 09:53:41 2011-04-20 09:53:41 2 +2011-04-20 09:53:41 NULL 3 +2011-04-20 09:53:41 2011-04-20 09:53:41 4 +SET TIME_ZONE = "+03:00"; +SELECT * FROM t1; +a b c +2011-04-20 12:53:41 NULL 1 +2011-04-20 12:53:41 2011-04-20 09:53:41 2 +2011-04-20 12:53:41 NULL 3 +2011-04-20 12:53:41 2011-04-20 09:53:41 4 +SET TIME_ZONE = "+00:00"; +DROP TABLE t1; +# 2011-04-20 07:05:39 UTC +SET TIMESTAMP = 1303283139.195624; +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT '2010-10-11 12:34:56' ON UPDATE CURRENT_TIMESTAMP, +b DATETIME DEFAULT '2010-10-11 12:34:56' +); +INSERT INTO t1 VALUES (NULL, NULL), (DEFAULT, DEFAULT); +INSERT INTO t1 ( a, b ) VALUES (NULL, NULL), (DEFAULT, DEFAULT); +SELECT * FROM t1; +a b +2011-04-20 07:05:39 NULL +2010-10-11 12:34:56 2010-10-11 12:34:56 +2011-04-20 07:05:39 NULL +2010-10-11 12:34:56 2010-10-11 12:34:56 +DROP TABLE t1; +# 2011-04-20 09:53:41 UTC +SET TIMESTAMP = 1303293221.136952; +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT '1986-09-27 03:00:00.098765', +e TIMESTAMP NULL, +f DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +g DATETIME DEFAULT CURRENT_TIMESTAMP, +h DATETIME ON UPDATE CURRENT_TIMESTAMP, +i DATETIME NULL, +j DATETIME DEFAULT '1986-09-27 03:00:00.098765' +); +INSERT INTO t1 VALUES (); +INSERT INTO t1 SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL; +SELECT * FROM t1; +a b c d e f g h i j +2011-04-20 09:53:41 2011-04-20 09:53:41 0000-00-00 00:00:00 1986-09-27 03:00:00 NULL 2011-04-20 09:53:41 2011-04-20 09:53:41 NULL NULL 1986-09-27 03:00:00 +2011-04-20 09:53:41 2011-04-20 09:53:41 2011-04-20 09:53:41 2011-04-20 09:53:41 NULL NULL NULL NULL NULL NULL +DROP TABLE t1; +# +# Test of multiple-table UPDATE for DEFAULT CURRENT_TIMESTAMP +# +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b DATETIME DEFAULT CURRENT_TIMESTAMP, +c INT +); +INSERT INTO t1 ( c ) VALUES (1); +SELECT * FROM t1; +a b c +2011-04-20 09:53:41 2011-04-20 09:53:41 1 +# 2011-04-20 17:06:13 UTC +SET TIMESTAMP = 1303311973.163587; +UPDATE t1 t11, t1 t12 SET t11.c = 1; +SELECT * FROM t1; +a b c +2011-04-20 09:53:41 2011-04-20 09:53:41 1 +UPDATE t1 t11, t1 t12 SET t11.c = 2; +SELECT * FROM t1; +a b c +2011-04-20 15:06:13 2011-04-20 09:53:41 2 +DROP TABLE t1; +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +b TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +c DATETIME DEFAULT CURRENT_TIMESTAMP, +d DATETIME ON UPDATE CURRENT_TIMESTAMP, +e INT +); +CREATE TABLE t2 ( +f INT, +g DATETIME ON UPDATE CURRENT_TIMESTAMP, +h DATETIME DEFAULT CURRENT_TIMESTAMP, +i TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +j TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +); +# 1995-03-11 00:02:03 UTC +SET TIMESTAMP = 794880123.195676; +INSERT INTO t1 ( e ) VALUES ( 1 ), ( 2 ); +INSERT INTO t2 ( f ) VALUES ( 1 ), ( 2 ); +SELECT * FROM t1; +a b c d e +1995-03-11 00:02:03 0000-00-00 00:00:00 1995-03-11 00:02:03 NULL 1 +1995-03-11 00:02:03 0000-00-00 00:00:00 1995-03-11 00:02:03 NULL 2 +SELECT * FROM t2; +f g h i j +1 NULL 1995-03-11 00:02:03 0000-00-00 00:00:00 1995-03-11 00:02:03 +2 NULL 1995-03-11 00:02:03 0000-00-00 00:00:00 1995-03-11 00:02:03 +# 1980-12-13 02:02:01 UTC +SET TIMESTAMP = 345520921.196755; +UPDATE t1, t2 SET t1.e = 3, t2.f = 4; +SELECT * FROM t1; +a b c d e +1995-03-11 00:02:03 1980-12-13 02:02:01 1995-03-11 00:02:03 1980-12-13 02:02:01 3 +1995-03-11 00:02:03 1980-12-13 02:02:01 1995-03-11 00:02:03 1980-12-13 02:02:01 3 +SELECT * FROM t2; +f g h i j +4 1980-12-13 02:02:01 1995-03-11 00:02:03 1980-12-13 02:02:01 1995-03-11 00:02:03 +4 1980-12-13 02:02:01 1995-03-11 00:02:03 1980-12-13 02:02:01 1995-03-11 00:02:03 +DROP TABLE t1, t2; +# +# Test of multiple table update with temporary table and on the fly. +# +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +b DATETIME ON UPDATE CURRENT_TIMESTAMP, +c INT, +d INT +); +CREATE TABLE t2 ( +a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +b DATETIME ON UPDATE CURRENT_TIMESTAMP, +c INT KEY, +d INT +); +INSERT INTO t1 ( c ) VALUES (1), (2); +INSERT INTO t2 ( c ) VALUES (1), (2); +# Test of multiple table update done on the fly +# 2011-04-20 15:06:13 UTC +SET TIMESTAMP = 1303311973.194685; +UPDATE t1 JOIN t2 USING ( c ) SET t2.d = 1; +SELECT * FROM t1; +a b c d +0000-00-00 00:00:00 NULL 1 NULL +0000-00-00 00:00:00 NULL 2 NULL +SELECT * FROM t2; +a b c d +2011-04-20 15:06:13 2011-04-20 15:06:13 1 1 +2011-04-20 15:06:13 2011-04-20 15:06:13 2 1 +# Test of multiple table update done with temporary table. +# 1979-01-15 03:02:01 +SET TIMESTAMP = 285213721.134679; +UPDATE t1 JOIN t2 USING ( c ) SET t1.d = 1; +SELECT * FROM t1; +a b c d +1979-01-15 02:02:01 1979-01-15 02:02:01 1 1 +1979-01-15 02:02:01 1979-01-15 02:02:01 2 1 +SELECT * FROM t2; +a b c d +2011-04-20 15:06:13 2011-04-20 15:06:13 1 1 +2011-04-20 15:06:13 2011-04-20 15:06:13 2 1 +DROP TABLE t1, t2; +# +# Test of ON UPDATE CURRENT_TIMESTAMP. +# +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +b DATETIME ON UPDATE CURRENT_TIMESTAMP, +c INT +); +# 2011-04-20 09:53:41 UTC +SET TIMESTAMP = 1303293221.794613; +INSERT INTO t1 ( c ) VALUES ( 1 ); +SELECT * FROM t1; +a b c +0000-00-00 00:00:00 NULL 1 +UPDATE t1 SET c = 1; +SELECT * FROM t1; +a b c +0000-00-00 00:00:00 NULL 1 +UPDATE t1 SET c = 2; +SELECT * FROM t1; +a b c +2011-04-20 09:53:41 2011-04-20 09:53:41 2 +# +# Test that ON UPDATE CURRENT_TIMESTAMP works after non-changing UPDATE. +# +# 2011-04-20 09:54:13 UTC +SET TIMESTAMP = 1303293253.794613; +UPDATE t1 SET c = 2, b = '2011-04-20 09:53:41.794613'; +SELECT * FROM t1; +a b c +2011-04-20 09:53:41 2011-04-20 09:53:41 2 +UPDATE t1 SET c = 3; +SELECT * FROM t1; +a b c +2011-04-20 09:54:13 2011-04-20 09:54:13 3 +# +# Test of multiple-table UPDATE for ON UPDATE CURRENT_TIMESTAMP +# +# 2011-04-20 15:06:13 UTC +SET TIMESTAMP = 1303311973.534231; +UPDATE t1 t11, t1 t12 SET t11.c = 3; +SELECT * FROM t1; +a b c +2011-04-20 09:54:13 2011-04-20 09:54:13 3 +UPDATE t1 t11, t1 t12 SET t11.c = 2; +SELECT * FROM t1; +a b c +2011-04-20 15:06:13 2011-04-20 15:06:13 2 +DROP TABLE t1; +# +# Test of a multiple-table update where only one table is updated and +# the updated table has a primary key. +# +CREATE TABLE t1 ( a INT, b INT, PRIMARY KEY (a) ); +INSERT INTO t1 VALUES (1, 1),(2, 2),(3, 3),(4, 4); +CREATE TABLE t2 ( a INT, b INT ); +INSERT INTO t2 VALUES (1, 1),(2, 2),(3, 3),(4, 4),(5, 5); +UPDATE t1, t2 SET t1.b = 100 WHERE t1.a = t2.a; +SELECT * FROM t1; +a b +1 100 +2 100 +3 100 +4 100 +SELECT * FROM t2; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +DROP TABLE t1, t2; +# +# Test of ALTER TABLE, reordering columns. +# +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, b INT ); +ALTER TABLE t1 MODIFY a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` int(11) DEFAULT NULL, + `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a INT, b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, c TIMESTAMP NULL ); +ALTER TABLE t1 MODIFY b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `a` int(11) DEFAULT NULL, + `c` timestamp NULL DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a INT, b TIMESTAMP NULL ); +ALTER TABLE t1 MODIFY b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, b TIMESTAMP NULL ); +ALTER TABLE t1 MODIFY a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` timestamp NULL DEFAULT NULL, + `a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, b TIMESTAMP NULL ); +ALTER TABLE t1 MODIFY a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` timestamp NULL DEFAULT NULL, + `a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE NOW(), b INT, c TIMESTAMP NULL ); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `b` int(11) DEFAULT NULL, + `c` timestamp NULL DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +ALTER TABLE t1 MODIFY a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` int(11) DEFAULT NULL, + `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `c` timestamp NULL DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE NOW(), b INT, c TIMESTAMP NULL ); +ALTER TABLE t1 MODIFY c TIMESTAMP NULL FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` timestamp NULL DEFAULT NULL, + `a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE CURRENT_TIMESTAMP, b INT, c TIMESTAMP NULL ); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `b` int(11) DEFAULT NULL, + `c` timestamp NULL DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +ALTER TABLE t1 MODIFY a TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE CURRENT_TIMESTAMP AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` int(11) DEFAULT NULL, + `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `c` timestamp NULL DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE CURRENT_TIMESTAMP, b INT, c TIMESTAMP NULL ); +ALTER TABLE t1 MODIFY c TIMESTAMP NULL FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` timestamp NULL DEFAULT NULL, + `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +# +# Test of ALTER TABLE, adding columns. +# +CREATE TABLE t1 ( a INT ); +ALTER TABLE t1 ADD COLUMN b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +# +# Test of INSERT SELECT. +# +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +c DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +d DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +); +CREATE TABLE t2 ( +placeholder1 INT, +placeholder2 INT, +placeholder3 INT, +placeholder4 INT, +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', +c DATETIME, +d DATETIME +); +# 1977-08-16 15:30:01 UTC +SET TIMESTAMP = 240589801.654312; +INSERT INTO t2 (a, b, c, d) VALUES ( +'1977-08-16 15:30:01.123456', +'1977-08-16 15:30:01.234567', +'1977-08-16 15:30:01.345678', +'1977-08-16 15:30:01.456789' +); +# 1986-09-27 01:00:00 UTC +SET TIMESTAMP = 528166800.132435; +INSERT INTO t1 ( a, c ) SELECT a, c FROM t2; +SELECT * FROM t1; +a b c d +1977-08-16 15:30:01 1986-09-27 01:00:00 1977-08-16 15:30:01 1986-09-27 01:00:00 +DROP TABLE t1, t2; +# +# Test of CREATE TABLE SELECT. +# +# We test that the columns of the source table are not used to determine +# function defaults for the receiving table. +# +# 1970-04-11 20:13:57 UTC +SET TIMESTAMP = 8712837.657898; +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT '1986-09-27 03:00:00.098765', +e TIMESTAMP NULL, +f DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +g DATETIME DEFAULT CURRENT_TIMESTAMP, +h DATETIME ON UPDATE CURRENT_TIMESTAMP, +i DATETIME NULL, +j DATETIME DEFAULT '1986-09-27 03:00:00.098765' +); +INSERT INTO t1 VALUES (); +# 1971-01-31 21:13:57 UTC +SET TIMESTAMP = 34200837.164937; +CREATE TABLE t2 SELECT a FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t2; +a +1970-04-11 20:13:57 +CREATE TABLE t3 SELECT b FROM t1; +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t3; +b +1970-04-11 20:13:57 +CREATE TABLE t4 SELECT c FROM t1; +SHOW CREATE TABLE t4; +Table Create Table +t4 CREATE TABLE `t4` ( + `c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t4; +c +0000-00-00 00:00:00 +CREATE TABLE t5 SELECT d FROM t1; +SHOW CREATE TABLE t5; +Table Create Table +t5 CREATE TABLE `t5` ( + `d` timestamp NOT NULL DEFAULT '1986-09-27 03:00:00' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t5; +d +1986-09-27 03:00:00 +CREATE TABLE t6 SELECT e FROM t1; +SHOW CREATE TABLE t6; +Table Create Table +t6 CREATE TABLE `t6` ( + `e` timestamp NULL DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t6; +e +NULL +CREATE TABLE t7 SELECT f FROM t1; +SHOW CREATE TABLE t7; +Table Create Table +t7 CREATE TABLE `t7` ( + `f` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t7; +f +1970-04-11 20:13:57 +CREATE TABLE t8 SELECT g FROM t1; +SHOW CREATE TABLE t8; +Table Create Table +t8 CREATE TABLE `t8` ( + `g` datetime DEFAULT CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t8; +g +1970-04-11 20:13:57 +CREATE TABLE t9 SELECT h FROM t1; +SHOW CREATE TABLE t9; +Table Create Table +t9 CREATE TABLE `t9` ( + `h` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t9; +h +NULL +CREATE TABLE t10 SELECT i FROM t1; +SHOW CREATE TABLE t10; +Table Create Table +t10 CREATE TABLE `t10` ( + `i` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t10; +i +NULL +CREATE TABLE t11 SELECT j FROM t1; +SHOW CREATE TABLE t11; +Table Create Table +t11 CREATE TABLE `t11` ( + `j` datetime DEFAULT '1986-09-27 03:00:00' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t11; +j +1986-09-27 03:00:00 +CREATE TABLE t12 ( +k TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +l TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +m TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +n TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +o TIMESTAMP NOT NULL DEFAULT '1986-09-27 03:00:00.098765', +p TIMESTAMP NULL, +q DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +r DATETIME DEFAULT CURRENT_TIMESTAMP, +s DATETIME ON UPDATE CURRENT_TIMESTAMP, +t DATETIME NULL, +u DATETIME DEFAULT '1986-09-27 03:00:00.098765' +) +SELECT * FROM t1; +SHOW CREATE TABLE t12; +Table Create Table +t12 CREATE TABLE `t12` ( + `k` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `l` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `m` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `n` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `o` timestamp NOT NULL DEFAULT '1986-09-27 03:00:00', + `p` timestamp NULL DEFAULT NULL, + `q` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `r` datetime DEFAULT CURRENT_TIMESTAMP, + `s` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, + `t` datetime DEFAULT NULL, + `u` datetime DEFAULT '1986-09-27 03:00:00', + `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `d` timestamp NOT NULL DEFAULT '1986-09-27 03:00:00', + `e` timestamp NULL DEFAULT NULL, + `f` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `g` datetime DEFAULT CURRENT_TIMESTAMP, + `h` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, + `i` datetime DEFAULT NULL, + `j` datetime DEFAULT '1986-09-27 03:00:00' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12; +# 1970-04-11 20:13:57 UTC +SET TIMESTAMP = 8712837.164953; +CREATE TABLE t1 ( +a DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b DATETIME DEFAULT CURRENT_TIMESTAMP, +c DATETIME ON UPDATE CURRENT_TIMESTAMP, +d DATETIME NULL, +e DATETIME DEFAULT '1986-09-27 03:00:00.098765' +); +INSERT INTO t1 VALUES (); +# 1971-01-31 20:13:57 UTC +SET TIMESTAMP = 34200837.915736; +CREATE TABLE t2 SELECT a FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t2; +a +1970-04-11 20:13:57 +CREATE TABLE t3 SELECT b FROM t1; +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `b` datetime DEFAULT CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t3; +b +1970-04-11 20:13:57 +CREATE TABLE t4 SELECT c FROM t1; +SHOW CREATE TABLE t4; +Table Create Table +t4 CREATE TABLE `t4` ( + `c` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t4; +c +NULL +CREATE TABLE t5 SELECT d FROM t1; +SHOW CREATE TABLE t5; +Table Create Table +t5 CREATE TABLE `t5` ( + `d` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t5; +d +NULL +CREATE TABLE t6 SELECT e FROM t1; +SHOW CREATE TABLE t6; +Table Create Table +t6 CREATE TABLE `t6` ( + `e` datetime DEFAULT '1986-09-27 03:00:00' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t6; +e +1986-09-27 03:00:00 +DROP TABLE t1, t2, t3, t4, t5, t6; +# +# Test of a CREATE TABLE SELECT that also declared columns. In this case +# the function default should be de-activated during the execution of the +# CREATE TABLE statement. +# +# 1970-01-01 03:16:40 +SET TIMESTAMP = 1000.987654; +CREATE TABLE t1 ( a INT ); +INSERT INTO t1 VALUES ( 1 ), ( 2 ); +CREATE TABLE t2 ( b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP) SELECT a FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SET TIMESTAMP = 2000.876543; +INSERT INTO t2( a ) VALUES ( 3 ); +SELECT * FROM t2; +b a +0000-00-00 00:00:00 1 +0000-00-00 00:00:00 2 +1970-01-01 00:33:20 3 +DROP TABLE t1, t2; +# +# Test of updating a view. +# +CREATE TABLE t1 ( a INT, b DATETIME DEFAULT CURRENT_TIMESTAMP ); +CREATE TABLE t2 ( a INT, b DATETIME ON UPDATE CURRENT_TIMESTAMP ); +CREATE VIEW v1 AS SELECT * FROM t1; +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` latin1 latin1_swedish_ci +CREATE VIEW v2 AS SELECT * FROM t2; +SHOW CREATE VIEW v2; +View Create View character_set_client collation_connection +v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `t2`.`a` AS `a`,`t2`.`b` AS `b` from `t2` latin1 latin1_swedish_ci +# 1971-01-31 21:13:57 UTC +SET TIMESTAMP = 34200837.348564; +INSERT INTO v1 ( a ) VALUES ( 1 ); +INSERT INTO v2 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b +1 1971-01-31 20:13:57 +SELECT * FROM v1; +a b +1 1971-01-31 20:13:57 +SELECT * FROM t2; +a b +1 NULL +SELECT * FROM v2; +a b +1 NULL +# 1970-04-11 20:13:57 UTC +SET TIMESTAMP = 8712837.567332; +UPDATE v1 SET a = 2; +UPDATE v2 SET a = 2; +SELECT * FROM t1; +a b +2 1971-01-31 20:13:57 +SELECT * FROM v1; +a b +2 1971-01-31 20:13:57 +SELECT * FROM t2; +a b +2 1970-04-11 20:13:57 +SELECT * FROM v2; +a b +2 1970-04-11 20:13:57 +DROP VIEW v1, v2; +DROP TABLE t1, t2; +# +# Test with stored procedures. +# +CREATE TABLE t1 ( +a INT, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +e TIMESTAMP NULL, +f DATETIME DEFAULT CURRENT_TIMESTAMP, +g DATETIME ON UPDATE CURRENT_TIMESTAMP +); +CREATE PROCEDURE p1() INSERT INTO test.t1( a ) VALUES ( 1 ); +CREATE PROCEDURE p2() UPDATE t1 SET a = 2 WHERE a = 1; +# 1971-01-31 20:13:57 UTC +SET TIMESTAMP = 34200837.876544; +CALL p1(); +SELECT * FROM t1; +a b c d e f g +1 1971-01-31 20:13:57 1971-01-31 20:13:57 0000-00-00 00:00:00 NULL 1971-01-31 20:13:57 NULL +# 1970-04-11 21:13:57 UTC +SET TIMESTAMP = 8712837.143546; +CALL p2(); +SELECT * FROM t1; +a b c d e f g +2 1970-04-11 20:13:57 1971-01-31 20:13:57 1970-04-11 20:13:57 NULL 1971-01-31 20:13:57 1970-04-11 20:13:57 +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP TABLE t1; +# +# Test with triggers. +# +CREATE TABLE t1 ( +a INT, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +e TIMESTAMP NULL, +f DATETIME, +g DATETIME DEFAULT CURRENT_TIMESTAMP, +h DATETIME ON UPDATE CURRENT_TIMESTAMP, +i DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +); +CREATE TABLE t2 ( a INT ); +CREATE TRIGGER t2_trg BEFORE INSERT ON t2 FOR EACH ROW +BEGIN +INSERT INTO t1 ( a ) VALUES ( 1 ); +END| +# 1971-01-31 21:13:57 UTC +SET TIMESTAMP = 34200837.978675; +INSERT INTO t2 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b c d e f g h i +1 1971-01-31 20:13:57 1971-01-31 20:13:57 0000-00-00 00:00:00 NULL NULL 1971-01-31 20:13:57 NULL 1971-01-31 20:13:57 +DROP TRIGGER t2_trg; +CREATE TRIGGER t2_trg BEFORE INSERT ON t2 FOR EACH ROW +BEGIN +UPDATE t1 SET a = 2; +END| +# 1970-04-11 21:13:57 UTC +SET TIMESTAMP = 8712837.456789; +INSERT INTO t2 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b c d e f g h i +2 1970-04-11 20:13:57 1971-01-31 20:13:57 1970-04-11 20:13:57 NULL NULL 1971-01-31 20:13:57 1970-04-11 20:13:57 1970-04-11 20:13:57 +DROP TABLE t1, t2; +# +# Test where the assignment target is not a column. +# +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ); +CREATE TABLE t2 ( a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ); +CREATE TABLE t3 ( a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP ); +CREATE TABLE t4 ( a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP ); +CREATE VIEW v1 AS SELECT a COLLATE latin1_german1_ci AS b FROM t1; +CREATE VIEW v2 ( b ) AS SELECT a COLLATE latin1_german1_ci FROM t2; +CREATE VIEW v3 AS SELECT a COLLATE latin1_german1_ci AS b FROM t3; +CREATE VIEW v4 ( b ) AS SELECT a COLLATE latin1_german1_ci FROM t4; +INSERT INTO v1 ( b ) VALUES ( '2007-10-24 00:03:34.010203' ); +SELECT a FROM t1; +a +2007-10-24 00:03:34 +INSERT INTO v2 ( b ) VALUES ( '2007-10-24 00:03:34.010203' ); +SELECT a FROM t2; +a +2007-10-24 00:03:34 +INSERT INTO t3 VALUES (); +UPDATE v3 SET b = '2007-10-24 00:03:34.010203'; +SELECT a FROM t3; +a +2007-10-24 00:03:34 +INSERT INTO t4 VALUES (); +UPDATE v4 SET b = '2007-10-24 00:03:34.010203'; +SELECT a FROM t4; +a +2007-10-24 00:03:34 +DROP VIEW v1, v2, v3, v4; +DROP TABLE t1, t2, t3, t4; +# +# Test of LOAD DATA/XML INFILE +# This tests behavior of function defaults for TIMESTAMP and DATETIME +# columns. during LOAD ... INFILE. +# As can be seen here, a TIMESTAMP column with only ON UPDATE +# CURRENT_TIMESTAMP will still have CURRENT_TIMESTAMP inserted on LOAD +# ... INFILE if the value is missing. For DATETIME columns a NULL value +# is inserted instead. +# +CREATE TABLE t1 ( +a INT, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +e TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +f DATETIME, +g DATETIME DEFAULT CURRENT_TIMESTAMP, +h DATETIME ON UPDATE CURRENT_TIMESTAMP, +i DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +); +CREATE TABLE t2 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +e DATETIME NOT NULL, +f DATETIME NOT NULL DEFAULT '1977-01-02 12:13:14', +g DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, +h DATETIME ON UPDATE CURRENT_TIMESTAMP NOT NULL, +i DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL +); +SELECT 1 INTO OUTFILE 't3.dat' FROM dual; +SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL +INTO OUTFILE 't4.dat' +FROM dual; +SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual; +# Mon Aug 1 15:11:19 2011 UTC +SET TIMESTAMP = 1312211479.918273; +LOAD DATA INFILE 't3.dat' INTO TABLE t1; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +SELECT * FROM t1; +a 1 +b 2011-08-01 15:11:19 +c 2011-08-01 15:11:19 +d 2011-08-01 15:11:19 +e 2011-08-01 15:11:19 +f NULL +g NULL +h NULL +i NULL +LOAD DATA INFILE 't4.dat' INTO TABLE t2; +Warnings: +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'e' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'f' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'g' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'h' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'i' at row 1 +SELECT a FROM t2; +a +2011-08-01 15:11:19 +SELECT b FROM t2; +b +2011-08-01 15:11:19 +SELECT c FROM t2; +c +2011-08-01 15:11:19 +SELECT d FROM t2; +d +2011-08-01 15:11:19 +# As shown here, supplying a NULL value to a non-nullable +# column with no default value results in the zero date. +SELECT e FROM t2; +e +0000-00-00 00:00:00 +# As shown here, supplying a NULL value to a non-nullable column with a +# default value results in the zero date. +SELECT f FROM t2; +f +0000-00-00 00:00:00 +# As shown here, supplying a NULL value to a non-nullable column with a +# default function results in the zero date. +SELECT g FROM t2; +g +0000-00-00 00:00:00 +# As shown here, supplying a NULL value to a non-nullable DATETIME ON +# UPDATE CURRENT_TIMESTAMP column with no default value results in the +# zero date. +SELECT h FROM t2; +h +0000-00-00 00:00:00 +SELECT i FROM t2; +i +0000-00-00 00:00:00 +DELETE FROM t1; +DELETE FROM t2; +# Read t3 file into t1 +# The syntax will cause a different code path to be taken +# (read_fixed_length()) than under the LOAD ... INTO TABLE t1 command +# above. The code in this path is copy-pasted code from the path taken +# under the syntax used in the previous LOAD command. +LOAD DATA INFILE 't3.dat' INTO TABLE t1 +FIELDS TERMINATED BY '' ENCLOSED BY ''; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +SELECT b FROM t1; +b +2011-08-01 15:11:19 +SELECT c FROM t1; +c +2011-08-01 15:11:19 +SELECT d FROM t1; +d +2011-08-01 15:11:19 +SELECT e FROM t1; +e +2011-08-01 15:11:19 +# Yes, a missing field cannot be NULL using this syntax, so it will +# zero date instead. Says a comment in read_fixed_length() : "No fields +# specified in fields_vars list can be NULL in this format." +# It appears to be by design. This is inconsistent with LOAD DATA INFILE +# syntax in previous test. +SELECT f FROM t1; +f +0000-00-00 00:00:00 +SELECT g FROM t1; +g +0000-00-00 00:00:00 +# See comment above "SELECT f FROM f1". +SELECT h FROM t1; +h +0000-00-00 00:00:00 +SELECT i FROM t1; +i +0000-00-00 00:00:00 +DELETE FROM t1; +LOAD DATA INFILE 't5.dat' INTO TABLE t1 ( a, @dummy ); +SELECT * FROM t1; +a b c d e f g h i +1 2011-08-01 15:11:19 2011-08-01 15:11:19 0000-00-00 00:00:00 2011-08-01 15:11:19 NULL 2011-08-01 15:11:19 NULL 2011-08-01 15:11:19 +SELECT @dummy; +@dummy +2 +DELETE FROM t1; +LOAD DATA INFILE 't3.dat' INTO TABLE t1 ( a ) SET c = '2005-06-06 08:09:10'; +SELECT * FROM t1; +a b c d e f g h i +1 2011-08-01 15:11:19 2005-06-06 08:09:10 0000-00-00 00:00:00 2011-08-01 15:11:19 NULL 2011-08-01 15:11:19 NULL 2011-08-01 15:11:19 +DELETE FROM t1; +LOAD DATA INFILE 't3.dat' INTO TABLE t1 ( a ) SET g = '2005-06-06 08:09:10'; +SELECT * FROM t1; +a b c d e f g h i +1 2011-08-01 15:11:19 2011-08-01 15:11:19 0000-00-00 00:00:00 2011-08-01 15:11:19 NULL 2005-06-06 08:09:10 NULL 2011-08-01 15:11:19 +DELETE FROM t1; +# Load a static XML file +LOAD XML INFILE '../../std_data/onerow.xml' INTO TABLE t1 +ROWS IDENTIFIED BY '<row>'; +Missing tags are treated as NULL +SELECT * FROM t1; +a 1 +b 2011-08-01 15:11:19 +c 2011-08-01 15:11:19 +d 2011-08-01 15:11:19 +e 2011-08-01 15:11:19 +f NULL +g NULL +h NULL +i NULL +DROP TABLE t1, t2; +# +# Similar LOAD DATA tests in another form +# +# All of this test portion has been run on a pre-WL5874 trunk +# (except that like_b and like_c didn't exist) and all result +# differences are a bug. +# Regarding like_b its definition is the same as b's except +# that the constant default is replaced with a function +# default. Our expectation is that like_b would behave +# like b: if b is set to NULL, or set to 0000-00-00, or set to +# its default, then the same should apply to like_b. Same for +# like_c vs c. +# Mon Aug 1 15:11:19 2011 UTC +SET TIMESTAMP = 1312211479.089786; +SELECT 1 INTO OUTFILE "file1.dat" FROM dual; +SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL +INTO OUTFILE "file2.dat" FROM dual; +# Too short row +CREATE TABLE t1 ( +dummy INT, +a DATETIME NULL DEFAULT NULL, +b DATETIME NULL DEFAULT "2011-11-18", +like_b DATETIME NULL DEFAULT CURRENT_TIMESTAMP, +c DATETIME NOT NULL DEFAULT "2011-11-18", +like_c DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, +d TIMESTAMP NULL DEFAULT "2011-05-03" ON UPDATE CURRENT_TIMESTAMP, +e TIMESTAMP NOT NULL DEFAULT "2011-05-03", +f TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +g TIMESTAMP NULL DEFAULT NULL, +h INT NULL, +i INT NOT NULL DEFAULT 42 +); +# There is no promotion +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `dummy` int(11) DEFAULT NULL, + `a` datetime DEFAULT NULL, + `b` datetime DEFAULT '2011-11-18 00:00:00', + `like_b` datetime DEFAULT CURRENT_TIMESTAMP, + `c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00', + `like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00', + `f` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `g` timestamp NULL DEFAULT NULL, + `h` int(11) DEFAULT NULL, + `i` int(11) NOT NULL DEFAULT '42' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +LOAD DATA INFILE "file1.dat" INTO table t1; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +# It is strange that "like_b" gets NULL when "b" gets 0. But +# this is consistent with how "a" gets NULL when "b" gets 0, +# with how "g" gets NULL when "d" gets 0, and with how "h" gets +# NULL when "i" gets 0. Looks like "DEFAULT +# <non-NULL-constant>" is changed to 0, whereas DEFAULT NULL +# and DEFAULT NOW are changed to NULL. +SELECT * FROM t1; +dummy 1 +a NULL +b 0000-00-00 00:00:00 +like_b NULL +c 0000-00-00 00:00:00 +like_c 0000-00-00 00:00:00 +d 0000-00-00 00:00:00 +e 2011-08-01 15:11:19 +f 2011-08-01 15:11:19 +g NULL +h NULL +i 0 +delete from t1; +alter table t1 +modify f TIMESTAMP NULL default CURRENT_TIMESTAMP; +# There is no promotion +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `dummy` int(11) DEFAULT NULL, + `a` datetime DEFAULT NULL, + `b` datetime DEFAULT '2011-11-18 00:00:00', + `like_b` datetime DEFAULT CURRENT_TIMESTAMP, + `c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00', + `like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00', + `f` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + `g` timestamp NULL DEFAULT NULL, + `h` int(11) DEFAULT NULL, + `i` int(11) NOT NULL DEFAULT '42' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +LOAD DATA INFILE "file1.dat" INTO table t1; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +SELECT * FROM t1; +dummy 1 +a NULL +b 0000-00-00 00:00:00 +like_b NULL +c 0000-00-00 00:00:00 +like_c 0000-00-00 00:00:00 +d 0000-00-00 00:00:00 +e 2011-08-01 15:11:19 +f NULL +g NULL +h NULL +i 0 +delete from t1; +drop table t1; +# Conclusion derived from trunk's results: +# DATETIME DEFAULT <non-NULL-constant> (b,c) gets 0000-00-00, +# DATETIME DEFAULT NULL (a) gets NULL, +# TIMESTAMP NULL DEFAULT <non-NULL-constant> (d) gets 0000-00-00, +# TIMESTAMP NULL DEFAULT NULL (g) gets NULL, +# TIMESTAMP NULL DEFAULT NOW (f after ALTER) gets NULL, +# TIMESTAMP NOT NULL (f before ALTER, e) gets NOW. +### Loading NULL ### +CREATE TABLE t1 ( +dummy INT, +a DATETIME NULL DEFAULT NULL, +b DATETIME NULL DEFAULT "2011-11-18", +like_b DATETIME NULL DEFAULT CURRENT_TIMESTAMP, +c DATETIME NOT NULL DEFAULT "2011-11-18", +like_c DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, +d TIMESTAMP NULL DEFAULT "2011-05-03" ON UPDATE CURRENT_TIMESTAMP, +e TIMESTAMP NOT NULL DEFAULT "2011-05-03", +f TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +g TIMESTAMP NULL DEFAULT NULL, +h INT NULL, +i INT NOT NULL DEFAULT 42 +); +# There is no promotion +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `dummy` int(11) DEFAULT NULL, + `a` datetime DEFAULT NULL, + `b` datetime DEFAULT '2011-11-18 00:00:00', + `like_b` datetime DEFAULT CURRENT_TIMESTAMP, + `c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00', + `like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00', + `f` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `g` timestamp NULL DEFAULT NULL, + `h` int(11) DEFAULT NULL, + `i` int(11) NOT NULL DEFAULT '42' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +LOAD DATA INFILE "file2.dat" INTO table t1; +Warnings: +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'like_c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'i' at row 1 +SELECT * FROM t1; +dummy NULL +a NULL +b NULL +like_b NULL +c 0000-00-00 00:00:00 +like_c 0000-00-00 00:00:00 +d NULL +e 2011-08-01 15:11:19 +f 2011-08-01 15:11:19 +g NULL +h NULL +i 0 +delete from t1; +alter table t1 +modify f TIMESTAMP NULL default CURRENT_TIMESTAMP; +# There is no promotion +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `dummy` int(11) DEFAULT NULL, + `a` datetime DEFAULT NULL, + `b` datetime DEFAULT '2011-11-18 00:00:00', + `like_b` datetime DEFAULT CURRENT_TIMESTAMP, + `c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00', + `like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00', + `f` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + `g` timestamp NULL DEFAULT NULL, + `h` int(11) DEFAULT NULL, + `i` int(11) NOT NULL DEFAULT '42' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +LOAD DATA INFILE "file2.dat" INTO table t1; +Warnings: +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'like_c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'i' at row 1 +SELECT * FROM t1; +dummy NULL +a NULL +b NULL +like_b NULL +c 0000-00-00 00:00:00 +like_c 0000-00-00 00:00:00 +d NULL +e 2011-08-01 15:11:19 +f NULL +g NULL +h NULL +i 0 +delete from t1; +# Conclusion derived from trunk's results: +# DATETIME NULL (a,b) gets NULL, +# DATETIME NOT NULL (c) gets 0000-00-00, +# TIMESTAMP NULL (d,f,g) gets NULL, +# TIMESTAMP NOT NULL (e) gets NOW. +drop table t1; +# +# Test of updatable views with check options. The option can be violated +# using ON UPDATE updates which is very strange as this offers a loophole +# in this integrity check. +# +SET TIME_ZONE = "+03:00"; +# 1970-01-01 03:16:40 +SET TIMESTAMP = 1000.123456; +CREATE TABLE t1 ( a INT, b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b +1 1970-01-01 03:16:40 +CREATE VIEW v1 AS SELECT * FROM t1 WHERE b <= '1970-01-01 03:16:40.123456' +WITH CHECK OPTION; +SELECT * FROM v1; +a b +1 1970-01-01 03:16:40 +# 1970-01-01 03:33:20 +SET TIMESTAMP = 2000.000234; +UPDATE v1 SET a = 2; +ERROR HY000: CHECK OPTION failed 'test.v1' +SELECT * FROM t1; +a b +1 1970-01-01 03:16:40 +DROP VIEW v1; +DROP TABLE t1; +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT '1973-08-14 09:11:22.089786' ON UPDATE CURRENT_TIMESTAMP, +c INT KEY +); +# 1973-08-14 09:11:22 UTC +SET TIMESTAMP = 114167482.534231; +INSERT INTO t1 ( c ) VALUES ( 1 ); +CREATE VIEW v1 AS +SELECT * +FROM t1 +WHERE a >= '1973-08-14 09:11:22' +WITH LOCAL CHECK OPTION; +SELECT * FROM v1; +a c +1973-08-14 09:11:22 1 +SET TIMESTAMP = 1.126789; +INSERT INTO v1 ( c ) VALUES ( 1 ) ON DUPLICATE KEY UPDATE c = 2; +ERROR HY000: CHECK OPTION failed 'test.v1' +SELECT * FROM v1; +a c +1973-08-14 09:11:22 1 +DROP VIEW v1; +DROP TABLE t1; +# +# Bug 13095459 - MULTI-TABLE UPDATE MODIFIES A ROW TWICE +# +CREATE TABLE t1 ( +a INT, +b INT, +ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +PRIMARY KEY ( a, ts ) +); +INSERT INTO t1( a, b, ts ) VALUES ( 1, 0, '2000-09-28 17:44:34' ); +CREATE TABLE t2 ( a INT ); +INSERT INTO t2 VALUES ( 1 ); +UPDATE t1 STRAIGHT_JOIN t2 +SET t1.b = t1.b + 1 +WHERE t1.a = 1 AND t1.ts >= '2000-09-28 00:00:00'; +SELECT b FROM t1; +b +1 +DROP TABLE t1, t2; +# +# Bug#11745578: 17392: ALTER TABLE ADD COLUMN TIMESTAMP DEFAULT +# CURRENT_TIMESTAMP INSERTS ZERO +# +SET timestamp = 1000; +CREATE TABLE t1 ( b INT ); +INSERT INTO t1 VALUES (1); +ALTER TABLE t1 ADD COLUMN a6 DATETIME DEFAULT NOW() ON UPDATE NOW() FIRST; +ALTER TABLE t1 ADD COLUMN a5 DATETIME DEFAULT NOW() FIRST; +ALTER TABLE t1 ADD COLUMN a4 DATETIME ON UPDATE NOW() FIRST; +ALTER TABLE t1 ADD COLUMN a3 TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() FIRST; +ALTER TABLE t1 ADD COLUMN a2 TIMESTAMP NOT NULL DEFAULT NOW() FIRST; +ALTER TABLE t1 ADD COLUMN a1 TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE NOW() FIRST; +ALTER TABLE t1 ADD COLUMN c1 TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE NOW() AFTER b; +ALTER TABLE t1 ADD COLUMN c2 TIMESTAMP NOT NULL DEFAULT NOW() AFTER c1; +ALTER TABLE t1 ADD COLUMN c3 TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() AFTER c2; +ALTER TABLE t1 ADD COLUMN c4 DATETIME ON UPDATE NOW() AFTER c3; +ALTER TABLE t1 ADD COLUMN c5 DATETIME DEFAULT NOW() AFTER c4; +ALTER TABLE t1 ADD COLUMN c6 DATETIME DEFAULT NOW() ON UPDATE NOW() AFTER c5; +SELECT * FROM t1; +a1 0000-00-00 00:00:00 +a2 1970-01-01 03:16:40 +a3 1970-01-01 03:16:40 +a4 NULL +a5 1970-01-01 03:16:40 +a6 1970-01-01 03:16:40 +b 1 +c1 0000-00-00 00:00:00 +c2 1970-01-01 03:16:40 +c3 1970-01-01 03:16:40 +c4 NULL +c5 1970-01-01 03:16:40 +c6 1970-01-01 03:16:40 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE CURRENT_TIMESTAMP, b DATETIME DEFAULT NOW() ); +INSERT INTO t1 VALUES (); +SET timestamp = 1000000000; +ALTER TABLE t1 MODIFY COLUMN a TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP(3); +ALTER TABLE t1 MODIFY COLUMN b DATETIME(3) DEFAULT CURRENT_TIMESTAMP(3); +SELECT * FROM t1; +a b +1970-01-01 03:16:40.000 1970-01-01 03:16:40.000 +DROP TABLE t1; +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT '1999-12-01 11:22:33' ON UPDATE CURRENT_TIMESTAMP, +b DATETIME DEFAULT '1999-12-01 11:22:33' +); +INSERT INTO t1 VALUES (); +ALTER TABLE t1 MODIFY COLUMN a TIMESTAMP DEFAULT NOW(); +ALTER TABLE t1 MODIFY COLUMN b DATETIME DEFAULT NOW(); +INSERT INTO t1 VALUES (); +SELECT * FROM t1; +a b +1999-12-01 11:22:33 1999-12-01 11:22:33 +2001-09-09 04:46:40 2001-09-09 04:46:40 +DROP TABLE t1; +# +# Function defaults run 2. Six digits scale on seconds precision. +# +SET TIME_ZONE = "+00:00"; +# +# Test of errors for column data types that dont support function +# defaults. +# +CREATE TABLE t1( a BIT DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a TINYINT DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a SMALLINT DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a MEDIUMINT DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a INT DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a BIGINT DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a FLOAT DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a DECIMAL DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a DATE DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a TIME DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a YEAR DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a BIT ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a TINYINT ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a SMALLINT ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a MEDIUMINT ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a INT ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a BIGINT ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a FLOAT ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a DECIMAL ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a DATE ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a TIME ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a YEAR ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +# +# Test that the default clause behaves like NOW() regarding time zones. +# +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NULL, +e DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +f DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +g DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +h DATETIME(6) +); +# 2011-09-27 14:11:08 UTC +SET TIMESTAMP = 1317132668.654321; +SET @old_time_zone = @@TIME_ZONE; +SET TIME_ZONE = "+05:00"; +INSERT INTO t1( d, h ) VALUES ( NOW(6), NOW(6) ); +SELECT * FROM t1; +a b c d e f g h +2011-09-27 19:11:08.654321 2011-09-27 19:11:08.654321 0000-00-00 00:00:00.000000 2011-09-27 19:11:08.654321 2011-09-27 19:11:08.654321 2011-09-27 19:11:08.654321 NULL 2011-09-27 19:11:08.654321 +# 1989-05-13 01:02:03 +SET TIMESTAMP = 611017323.543212; +UPDATE t1 SET d = NOW(6), h = NOW(6); +SELECT * FROM t1; +a b c d e f g h +1989-05-13 04:02:03.543212 2011-09-27 19:11:08.654321 1989-05-13 04:02:03.543212 1989-05-13 04:02:03.543212 1989-05-13 04:02:03.543212 2011-09-27 19:11:08.654321 1989-05-13 04:02:03.543212 1989-05-13 04:02:03.543212 +SET TIME_ZONE = @old_time_zone; +DROP TABLE t1; +# +# Test of several TIMESTAMP columns with different function defaults. +# +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +e TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +f INT +); +# 2011-04-19 07:22:02 UTC +SET TIMESTAMP = 1303197722.534231; +INSERT INTO t1 ( f ) VALUES (1); +SELECT * FROM t1; +a b c d e f +2011-04-19 07:22:02.534231 2011-04-19 07:22:02.534231 2011-04-19 07:22:02.534231 0000-00-00 00:00:00.000000 0000-00-00 00:00:00.000000 1 +# 2011-04-19 07:23:18 UTC +SET TIMESTAMP = 1303197798.132435; +UPDATE t1 SET f = 2; +SELECT * FROM t1; +a b c d e f +2011-04-19 07:23:18.132435 2011-04-19 07:23:18.132435 2011-04-19 07:22:02.534231 2011-04-19 07:23:18.132435 2011-04-19 07:23:18.132435 2 +DROP TABLE t1; +# +# Test of inserted values out of order. +# +CREATE TABLE t1 ( +a INT, +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +e TIMESTAMP(6) NULL, +f DATETIME(6), +g DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +h DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +i DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +j INT +); +# 2011-04-19 07:22:02 UTC +SET TIMESTAMP = 1303197722.534231; +INSERT INTO t1 ( j, a ) VALUES ( 1, 1 ); +SELECT * FROM t1; +a b c d e f g h i j +1 2011-04-19 07:22:02.534231 2011-04-19 07:22:02.534231 0000-00-00 00:00:00.000000 NULL NULL 2011-04-19 07:22:02.534231 NULL 2011-04-19 07:22:02.534231 1 +DROP TABLE t1; +# +# Test of ON DUPLICATE KEY UPDATE +# +CREATE TABLE t1 ( +a INT PRIMARY KEY, +b INT, +c TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +e TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +f TIMESTAMP(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765', +g TIMESTAMP(6) NULL, +h DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +i DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +j DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +k DATETIME(6) NULL, +l DATETIME(6) DEFAULT '1986-09-27 03:00:00.098765' +); +# 1977-12-21 23:00:00 UTC +SET TIMESTAMP = 251593200.192837; +INSERT INTO t1(a) VALUES (1) ON DUPLICATE KEY UPDATE b = 2; +SELECT * FROM t1; +a b c d e f g h i j k l +1 NULL 1977-12-21 23:00:00.192837 1977-12-21 23:00:00.192837 0000-00-00 00:00:00.000000 1986-09-27 03:00:00.098765 NULL 1977-12-21 23:00:00.192837 1977-12-21 23:00:00.192837 NULL NULL 1986-09-27 03:00:00.098765 +# 1975-05-21 23:00:00 UTC +SET TIMESTAMP = 169945200.918273; +INSERT INTO t1(a) VALUES (1) ON DUPLICATE KEY UPDATE b = 2; +SELECT * FROM t1; +a b c d e f g h i j k l +1 2 1975-05-21 23:00:00.918273 1977-12-21 23:00:00.192837 1975-05-21 23:00:00.918273 1986-09-27 03:00:00.098765 NULL 1975-05-21 23:00:00.918273 1977-12-21 23:00:00.192837 1975-05-21 23:00:00.918273 NULL 1986-09-27 03:00:00.098765 +# 1973-08-14 09:11:22 UTC +SET TIMESTAMP = 114167482.534231; +INSERT INTO t1(a) VALUES (2) ON DUPLICATE KEY UPDATE b = 2; +SELECT * FROM t1; +a b c d e f g h i j k l +1 2 1975-05-21 23:00:00.918273 1977-12-21 23:00:00.192837 1975-05-21 23:00:00.918273 1986-09-27 03:00:00.098765 NULL 1975-05-21 23:00:00.918273 1977-12-21 23:00:00.192837 1975-05-21 23:00:00.918273 NULL 1986-09-27 03:00:00.098765 +2 NULL 1973-08-14 09:11:22.534231 1973-08-14 09:11:22.534231 0000-00-00 00:00:00.000000 1986-09-27 03:00:00.098765 NULL 1973-08-14 09:11:22.534231 1973-08-14 09:11:22.534231 NULL NULL 1986-09-27 03:00:00.098765 +DROP TABLE t1; +CREATE TABLE t1 ( a INT PRIMARY KEY, b INT, c TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) ); +# 2011-04-19 07:23:18 UTC +SET TIMESTAMP = 1303197798.945156; +INSERT INTO t1 VALUES +(1, 0, '2001-01-01 01:01:01.111111'), +(2, 0, '2002-02-02 02:02:02.222222'), +(3, 0, '2003-03-03 03:03:03.333333'); +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01.111111 +2 0 2002-02-02 02:02:02.222222 +3 0 2003-03-03 03:03:03.333333 +UPDATE t1 SET b = 2, c = c WHERE a = 2; +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01.111111 +2 2 2002-02-02 02:02:02.222222 +3 0 2003-03-03 03:03:03.333333 +INSERT INTO t1 (a) VALUES (4); +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01.111111 +2 2 2002-02-02 02:02:02.222222 +3 0 2003-03-03 03:03:03.333333 +4 NULL 2011-04-19 07:23:18.945156 +UPDATE t1 SET c = '2004-04-04 04:04:04.444444' WHERE a = 4; +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01.111111 +2 2 2002-02-02 02:02:02.222222 +3 0 2003-03-03 03:03:03.333333 +4 NULL 2004-04-04 04:04:04.444444 +INSERT INTO t1 ( a ) VALUES ( 3 ), ( 5 ) ON DUPLICATE KEY UPDATE b = 3, c = c; +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01.111111 +2 2 2002-02-02 02:02:02.222222 +3 3 2003-03-03 03:03:03.333333 +4 NULL 2004-04-04 04:04:04.444444 +5 NULL 2011-04-19 07:23:18.945156 +INSERT INTO t1 (a, c) VALUES +(4, '2004-04-04 00:00:00.444444'), +(6, '2006-06-06 06:06:06.666666') +ON DUPLICATE KEY UPDATE b = 4; +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01.111111 +2 2 2002-02-02 02:02:02.222222 +3 3 2003-03-03 03:03:03.333333 +4 4 2011-04-19 07:23:18.945156 +5 NULL 2011-04-19 07:23:18.945156 +6 NULL 2006-06-06 06:06:06.666666 +DROP TABLE t1; +# +# Test of REPLACE INTO executed as UPDATE. +# +CREATE TABLE t1 ( +a INT PRIMARY KEY, +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +c DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +e DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +f TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +g DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +h TIMESTAMP(6) NULL, +i DATETIME(6) +); +# 1970-09-21 09:11:12 UTC +SET TIMESTAMP = 22756272.163584; +REPLACE INTO t1 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b c d e f g h i +1 1970-09-21 09:11:12.163584 1970-09-21 09:11:12.163584 1970-09-21 09:11:12.163584 1970-09-21 09:11:12.163584 0000-00-00 00:00:00.000000 NULL NULL NULL +# 1970-11-10 14:16:17 UTC +SET TIMESTAMP = 27094577.852954; +REPLACE INTO t1 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b c d e f g h i +1 1970-11-10 14:16:17.852954 1970-11-10 14:16:17.852954 1970-11-10 14:16:17.852954 1970-11-10 14:16:17.852954 0000-00-00 00:00:00.000000 NULL NULL NULL +DROP TABLE t1; +# +# Test of insertion of NULL, DEFAULT and an empty row for DEFAULT +# CURRENT_TIMESTAMP. +# +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +c INT +); +# 2011-04-20 09:53:41 UTC +SET TIMESTAMP = 1303293221.163578; +INSERT INTO t1 VALUES (NULL, NULL, 1), (DEFAULT, DEFAULT, 2); +INSERT INTO t1 ( a, b, c ) VALUES (NULL, NULL, 3), (DEFAULT, DEFAULT, 4); +SELECT * FROM t1; +a b c +2011-04-20 09:53:41.163578 NULL 1 +2011-04-20 09:53:41.163578 2011-04-20 09:53:41.163578 2 +2011-04-20 09:53:41.163578 NULL 3 +2011-04-20 09:53:41.163578 2011-04-20 09:53:41.163578 4 +SET TIME_ZONE = "+03:00"; +SELECT * FROM t1; +a b c +2011-04-20 12:53:41.163578 NULL 1 +2011-04-20 12:53:41.163578 2011-04-20 09:53:41.163578 2 +2011-04-20 12:53:41.163578 NULL 3 +2011-04-20 12:53:41.163578 2011-04-20 09:53:41.163578 4 +SET TIME_ZONE = "+00:00"; +DROP TABLE t1; +# 2011-04-20 07:05:39 UTC +SET TIMESTAMP = 1303283139.195624; +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT '2010-10-11 12:34:56' ON UPDATE CURRENT_TIMESTAMP(6), +b DATETIME(6) DEFAULT '2010-10-11 12:34:56' +); +INSERT INTO t1 VALUES (NULL, NULL), (DEFAULT, DEFAULT); +INSERT INTO t1 ( a, b ) VALUES (NULL, NULL), (DEFAULT, DEFAULT); +SELECT * FROM t1; +a b +2011-04-20 07:05:39.195624 NULL +2010-10-11 12:34:56.000000 2010-10-11 12:34:56.000000 +2011-04-20 07:05:39.195624 NULL +2010-10-11 12:34:56.000000 2010-10-11 12:34:56.000000 +DROP TABLE t1; +# 2011-04-20 09:53:41 UTC +SET TIMESTAMP = 1303293221.136952; +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765', +e TIMESTAMP(6) NULL, +f DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +g DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +h DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +i DATETIME(6) NULL, +j DATETIME(6) DEFAULT '1986-09-27 03:00:00.098765' +); +INSERT INTO t1 VALUES (); +INSERT INTO t1 SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL; +SELECT * FROM t1; +a b c d e f g h i j +2011-04-20 09:53:41.136952 2011-04-20 09:53:41.136952 0000-00-00 00:00:00.000000 1986-09-27 03:00:00.098765 NULL 2011-04-20 09:53:41.136952 2011-04-20 09:53:41.136952 NULL NULL 1986-09-27 03:00:00.098765 +2011-04-20 09:53:41.136952 2011-04-20 09:53:41.136952 2011-04-20 09:53:41.136952 2011-04-20 09:53:41.136952 NULL NULL NULL NULL NULL NULL +DROP TABLE t1; +# +# Test of multiple-table UPDATE for DEFAULT CURRENT_TIMESTAMP +# +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +c INT +); +INSERT INTO t1 ( c ) VALUES (1); +SELECT * FROM t1; +a b c +2011-04-20 09:53:41.136952 2011-04-20 09:53:41.136952 1 +# 2011-04-20 17:06:13 UTC +SET TIMESTAMP = 1303311973.163587; +UPDATE t1 t11, t1 t12 SET t11.c = 1; +SELECT * FROM t1; +a b c +2011-04-20 09:53:41.136952 2011-04-20 09:53:41.136952 1 +UPDATE t1 t11, t1 t12 SET t11.c = 2; +SELECT * FROM t1; +a b c +2011-04-20 15:06:13.163587 2011-04-20 09:53:41.136952 2 +DROP TABLE t1; +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +b TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +c DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +d DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +e INT +); +CREATE TABLE t2 ( +f INT, +g DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +h DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +i TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +j TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) +); +# 1995-03-11 00:02:03 UTC +SET TIMESTAMP = 794880123.195676; +INSERT INTO t1 ( e ) VALUES ( 1 ), ( 2 ); +INSERT INTO t2 ( f ) VALUES ( 1 ), ( 2 ); +SELECT * FROM t1; +a b c d e +1995-03-11 00:02:03.195676 0000-00-00 00:00:00.000000 1995-03-11 00:02:03.195676 NULL 1 +1995-03-11 00:02:03.195676 0000-00-00 00:00:00.000000 1995-03-11 00:02:03.195676 NULL 2 +SELECT * FROM t2; +f g h i j +1 NULL 1995-03-11 00:02:03.195676 0000-00-00 00:00:00.000000 1995-03-11 00:02:03.195676 +2 NULL 1995-03-11 00:02:03.195676 0000-00-00 00:00:00.000000 1995-03-11 00:02:03.195676 +# 1980-12-13 02:02:01 UTC +SET TIMESTAMP = 345520921.196755; +UPDATE t1, t2 SET t1.e = 3, t2.f = 4; +SELECT * FROM t1; +a b c d e +1995-03-11 00:02:03.195676 1980-12-13 02:02:01.196755 1995-03-11 00:02:03.195676 1980-12-13 02:02:01.196755 3 +1995-03-11 00:02:03.195676 1980-12-13 02:02:01.196755 1995-03-11 00:02:03.195676 1980-12-13 02:02:01.196755 3 +SELECT * FROM t2; +f g h i j +4 1980-12-13 02:02:01.196755 1995-03-11 00:02:03.195676 1980-12-13 02:02:01.196755 1995-03-11 00:02:03.195676 +4 1980-12-13 02:02:01.196755 1995-03-11 00:02:03.195676 1980-12-13 02:02:01.196755 1995-03-11 00:02:03.195676 +DROP TABLE t1, t2; +# +# Test of multiple table update with temporary table and on the fly. +# +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +b DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +c INT, +d INT +); +CREATE TABLE t2 ( +a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +b DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +c INT KEY, +d INT +); +INSERT INTO t1 ( c ) VALUES (1), (2); +INSERT INTO t2 ( c ) VALUES (1), (2); +# Test of multiple table update done on the fly +# 2011-04-20 15:06:13 UTC +SET TIMESTAMP = 1303311973.194685; +UPDATE t1 JOIN t2 USING ( c ) SET t2.d = 1; +SELECT * FROM t1; +a b c d +0000-00-00 00:00:00.000000 NULL 1 NULL +0000-00-00 00:00:00.000000 NULL 2 NULL +SELECT * FROM t2; +a b c d +2011-04-20 15:06:13.194685 2011-04-20 15:06:13.194685 1 1 +2011-04-20 15:06:13.194685 2011-04-20 15:06:13.194685 2 1 +# Test of multiple table update done with temporary table. +# 1979-01-15 03:02:01 +SET TIMESTAMP = 285213721.134679; +UPDATE t1 JOIN t2 USING ( c ) SET t1.d = 1; +SELECT * FROM t1; +a b c d +1979-01-15 02:02:01.134679 1979-01-15 02:02:01.134679 1 1 +1979-01-15 02:02:01.134679 1979-01-15 02:02:01.134679 2 1 +SELECT * FROM t2; +a b c d +2011-04-20 15:06:13.194685 2011-04-20 15:06:13.194685 1 1 +2011-04-20 15:06:13.194685 2011-04-20 15:06:13.194685 2 1 +DROP TABLE t1, t2; +# +# Test of ON UPDATE CURRENT_TIMESTAMP. +# +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +b DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +c INT +); +# 2011-04-20 09:53:41 UTC +SET TIMESTAMP = 1303293221.794613; +INSERT INTO t1 ( c ) VALUES ( 1 ); +SELECT * FROM t1; +a b c +0000-00-00 00:00:00.000000 NULL 1 +UPDATE t1 SET c = 1; +SELECT * FROM t1; +a b c +0000-00-00 00:00:00.000000 NULL 1 +UPDATE t1 SET c = 2; +SELECT * FROM t1; +a b c +2011-04-20 09:53:41.794613 2011-04-20 09:53:41.794613 2 +# +# Test that ON UPDATE CURRENT_TIMESTAMP works after non-changing UPDATE. +# +# 2011-04-20 09:54:13 UTC +SET TIMESTAMP = 1303293253.794613; +UPDATE t1 SET c = 2, b = '2011-04-20 09:53:41.794613'; +SELECT * FROM t1; +a b c +2011-04-20 09:53:41.794613 2011-04-20 09:53:41.794613 2 +UPDATE t1 SET c = 3; +SELECT * FROM t1; +a b c +2011-04-20 09:54:13.794613 2011-04-20 09:54:13.794613 3 +# +# Test of multiple-table UPDATE for ON UPDATE CURRENT_TIMESTAMP +# +# 2011-04-20 15:06:13 UTC +SET TIMESTAMP = 1303311973.534231; +UPDATE t1 t11, t1 t12 SET t11.c = 3; +SELECT * FROM t1; +a b c +2011-04-20 09:54:13.794613 2011-04-20 09:54:13.794613 3 +UPDATE t1 t11, t1 t12 SET t11.c = 2; +SELECT * FROM t1; +a b c +2011-04-20 15:06:13.534231 2011-04-20 15:06:13.534231 2 +DROP TABLE t1; +# +# Test of a multiple-table update where only one table is updated and +# the updated table has a primary key. +# +CREATE TABLE t1 ( a INT, b INT, PRIMARY KEY (a) ); +INSERT INTO t1 VALUES (1, 1),(2, 2),(3, 3),(4, 4); +CREATE TABLE t2 ( a INT, b INT ); +INSERT INTO t2 VALUES (1, 1),(2, 2),(3, 3),(4, 4),(5, 5); +UPDATE t1, t2 SET t1.b = 100 WHERE t1.a = t2.a; +SELECT * FROM t1; +a b +1 100 +2 100 +3 100 +4 100 +SELECT * FROM t2; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +DROP TABLE t1, t2; +# +# Test of ALTER TABLE, reordering columns. +# +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), b INT ); +ALTER TABLE t1 MODIFY a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` int(11) DEFAULT NULL, + `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), c TIMESTAMP(6) NULL ); +ALTER TABLE t1 MODIFY b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `a` int(11) DEFAULT NULL, + `c` timestamp(6) NULL DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NULL ); +ALTER TABLE t1 MODIFY b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), b TIMESTAMP(6) NULL ); +ALTER TABLE t1 MODIFY a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` timestamp(6) NULL DEFAULT NULL, + `a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), b TIMESTAMP(6) NULL ); +ALTER TABLE t1 MODIFY a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` timestamp(6) NULL DEFAULT NULL, + `a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE NOW(6), b INT, c TIMESTAMP(6) NULL ); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6), + `b` int(11) DEFAULT NULL, + `c` timestamp(6) NULL DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +ALTER TABLE t1 MODIFY a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` int(11) DEFAULT NULL, + `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `c` timestamp(6) NULL DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE NOW(6), b INT, c TIMESTAMP(6) NULL ); +ALTER TABLE t1 MODIFY c TIMESTAMP(6) NULL FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` timestamp(6) NULL DEFAULT NULL, + `a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6), + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT NOW(6) ON UPDATE CURRENT_TIMESTAMP(6), b INT, c TIMESTAMP(6) NULL ); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `b` int(11) DEFAULT NULL, + `c` timestamp(6) NULL DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +ALTER TABLE t1 MODIFY a TIMESTAMP(6) NOT NULL DEFAULT NOW(6) ON UPDATE CURRENT_TIMESTAMP(6) AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` int(11) DEFAULT NULL, + `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `c` timestamp(6) NULL DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT NOW(6) ON UPDATE CURRENT_TIMESTAMP(6), b INT, c TIMESTAMP(6) NULL ); +ALTER TABLE t1 MODIFY c TIMESTAMP(6) NULL FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` timestamp(6) NULL DEFAULT NULL, + `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +# +# Test of ALTER TABLE, adding columns. +# +CREATE TABLE t1 ( a INT ); +ALTER TABLE t1 ADD COLUMN b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +# +# Test of INSERT SELECT. +# +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +c DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +d DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +); +CREATE TABLE t2 ( +placeholder1 INT, +placeholder2 INT, +placeholder3 INT, +placeholder4 INT, +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00', +c DATETIME(6), +d DATETIME(6) +); +# 1977-08-16 15:30:01 UTC +SET TIMESTAMP = 240589801.654312; +INSERT INTO t2 (a, b, c, d) VALUES ( +'1977-08-16 15:30:01.123456', +'1977-08-16 15:30:01.234567', +'1977-08-16 15:30:01.345678', +'1977-08-16 15:30:01.456789' +); +# 1986-09-27 01:00:00 UTC +SET TIMESTAMP = 528166800.132435; +INSERT INTO t1 ( a, c ) SELECT a, c FROM t2; +SELECT * FROM t1; +a b c d +1977-08-16 15:30:01.123456 1986-09-27 01:00:00.132435 1977-08-16 15:30:01.345678 1986-09-27 01:00:00.132435 +DROP TABLE t1, t2; +# +# Test of CREATE TABLE SELECT. +# +# We test that the columns of the source table are not used to determine +# function defaults for the receiving table. +# +# 1970-04-11 20:13:57 UTC +SET TIMESTAMP = 8712837.657898; +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765', +e TIMESTAMP(6) NULL, +f DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +g DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +h DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +i DATETIME(6) NULL, +j DATETIME(6) DEFAULT '1986-09-27 03:00:00.098765' +); +INSERT INTO t1 VALUES (); +# 1971-01-31 21:13:57 UTC +SET TIMESTAMP = 34200837.164937; +CREATE TABLE t2 SELECT a FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t2; +a +1970-04-11 20:13:57.657897 +CREATE TABLE t3 SELECT b FROM t1; +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t3; +b +1970-04-11 20:13:57.657897 +CREATE TABLE t4 SELECT c FROM t1; +SHOW CREATE TABLE t4; +Table Create Table +t4 CREATE TABLE `t4` ( + `c` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t4; +c +0000-00-00 00:00:00.000000 +CREATE TABLE t5 SELECT d FROM t1; +SHOW CREATE TABLE t5; +Table Create Table +t5 CREATE TABLE `t5` ( + `d` timestamp(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t5; +d +1986-09-27 03:00:00.098765 +CREATE TABLE t6 SELECT e FROM t1; +SHOW CREATE TABLE t6; +Table Create Table +t6 CREATE TABLE `t6` ( + `e` timestamp(6) NULL DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t6; +e +NULL +CREATE TABLE t7 SELECT f FROM t1; +SHOW CREATE TABLE t7; +Table Create Table +t7 CREATE TABLE `t7` ( + `f` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t7; +f +1970-04-11 20:13:57.657897 +CREATE TABLE t8 SELECT g FROM t1; +SHOW CREATE TABLE t8; +Table Create Table +t8 CREATE TABLE `t8` ( + `g` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t8; +g +1970-04-11 20:13:57.657897 +CREATE TABLE t9 SELECT h FROM t1; +SHOW CREATE TABLE t9; +Table Create Table +t9 CREATE TABLE `t9` ( + `h` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t9; +h +NULL +CREATE TABLE t10 SELECT i FROM t1; +SHOW CREATE TABLE t10; +Table Create Table +t10 CREATE TABLE `t10` ( + `i` datetime(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t10; +i +NULL +CREATE TABLE t11 SELECT j FROM t1; +SHOW CREATE TABLE t11; +Table Create Table +t11 CREATE TABLE `t11` ( + `j` datetime(6) DEFAULT '1986-09-27 03:00:00.098765' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t11; +j +1986-09-27 03:00:00.098765 +CREATE TABLE t12 ( +k TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +l TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +m TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +n TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +o TIMESTAMP(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765', +p TIMESTAMP(6) NULL, +q DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +r DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +s DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +t DATETIME(6) NULL, +u DATETIME(6) DEFAULT '1986-09-27 03:00:00.098765' +) +SELECT * FROM t1; +SHOW CREATE TABLE t12; +Table Create Table +t12 CREATE TABLE `t12` ( + `k` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `l` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `m` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `n` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6), + `o` timestamp(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765', + `p` timestamp(6) NULL DEFAULT NULL, + `q` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `r` datetime(6) DEFAULT CURRENT_TIMESTAMP(6), + `s` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6), + `t` datetime(6) DEFAULT NULL, + `u` datetime(6) DEFAULT '1986-09-27 03:00:00.098765', + `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `c` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6), + `d` timestamp(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765', + `e` timestamp(6) NULL DEFAULT NULL, + `f` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `g` datetime(6) DEFAULT CURRENT_TIMESTAMP(6), + `h` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6), + `i` datetime(6) DEFAULT NULL, + `j` datetime(6) DEFAULT '1986-09-27 03:00:00.098765' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12; +# 1970-04-11 20:13:57 UTC +SET TIMESTAMP = 8712837.164953; +CREATE TABLE t1 ( +a DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +c DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +d DATETIME(6) NULL, +e DATETIME(6) DEFAULT '1986-09-27 03:00:00.098765' +); +INSERT INTO t1 VALUES (); +# 1971-01-31 20:13:57 UTC +SET TIMESTAMP = 34200837.915736; +CREATE TABLE t2 SELECT a FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t2; +a +1970-04-11 20:13:57.164953 +CREATE TABLE t3 SELECT b FROM t1; +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t3; +b +1970-04-11 20:13:57.164953 +CREATE TABLE t4 SELECT c FROM t1; +SHOW CREATE TABLE t4; +Table Create Table +t4 CREATE TABLE `t4` ( + `c` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t4; +c +NULL +CREATE TABLE t5 SELECT d FROM t1; +SHOW CREATE TABLE t5; +Table Create Table +t5 CREATE TABLE `t5` ( + `d` datetime(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t5; +d +NULL +CREATE TABLE t6 SELECT e FROM t1; +SHOW CREATE TABLE t6; +Table Create Table +t6 CREATE TABLE `t6` ( + `e` datetime(6) DEFAULT '1986-09-27 03:00:00.098765' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t6; +e +1986-09-27 03:00:00.098765 +DROP TABLE t1, t2, t3, t4, t5, t6; +# +# Test of a CREATE TABLE SELECT that also declared columns. In this case +# the function default should be de-activated during the execution of the +# CREATE TABLE statement. +# +# 1970-01-01 03:16:40 +SET TIMESTAMP = 1000.987654; +CREATE TABLE t1 ( a INT ); +INSERT INTO t1 VALUES ( 1 ), ( 2 ); +CREATE TABLE t2 ( b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)) SELECT a FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SET TIMESTAMP = 2000.876543; +INSERT INTO t2( a ) VALUES ( 3 ); +SELECT * FROM t2; +b a +0000-00-00 00:00:00.000000 1 +0000-00-00 00:00:00.000000 2 +1970-01-01 00:33:20.876543 3 +DROP TABLE t1, t2; +# +# Test of updating a view. +# +CREATE TABLE t1 ( a INT, b DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE TABLE t2 ( a INT, b DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE VIEW v1 AS SELECT * FROM t1; +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` latin1 latin1_swedish_ci +CREATE VIEW v2 AS SELECT * FROM t2; +SHOW CREATE VIEW v2; +View Create View character_set_client collation_connection +v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `t2`.`a` AS `a`,`t2`.`b` AS `b` from `t2` latin1 latin1_swedish_ci +# 1971-01-31 21:13:57 UTC +SET TIMESTAMP = 34200837.348564; +INSERT INTO v1 ( a ) VALUES ( 1 ); +INSERT INTO v2 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b +1 1971-01-31 20:13:57.348564 +SELECT * FROM v1; +a b +1 1971-01-31 20:13:57.348564 +SELECT * FROM t2; +a b +1 NULL +SELECT * FROM v2; +a b +1 NULL +# 1970-04-11 20:13:57 UTC +SET TIMESTAMP = 8712837.567332; +UPDATE v1 SET a = 2; +UPDATE v2 SET a = 2; +SELECT * FROM t1; +a b +2 1971-01-31 20:13:57.348564 +SELECT * FROM v1; +a b +2 1971-01-31 20:13:57.348564 +SELECT * FROM t2; +a b +2 1970-04-11 20:13:57.567332 +SELECT * FROM v2; +a b +2 1970-04-11 20:13:57.567332 +DROP VIEW v1, v2; +DROP TABLE t1, t2; +# +# Test with stored procedures. +# +CREATE TABLE t1 ( +a INT, +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +e TIMESTAMP(6) NULL, +f DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +g DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6) +); +CREATE PROCEDURE p1() INSERT INTO test.t1( a ) VALUES ( 1 ); +CREATE PROCEDURE p2() UPDATE t1 SET a = 2 WHERE a = 1; +# 1971-01-31 20:13:57 UTC +SET TIMESTAMP = 34200837.876544; +CALL p1(); +SELECT * FROM t1; +a b c d e f g +1 1971-01-31 20:13:57.876544 1971-01-31 20:13:57.876544 0000-00-00 00:00:00.000000 NULL 1971-01-31 20:13:57.876544 NULL +# 1970-04-11 21:13:57 UTC +SET TIMESTAMP = 8712837.143546; +CALL p2(); +SELECT * FROM t1; +a b c d e f g +2 1970-04-11 20:13:57.143546 1971-01-31 20:13:57.876544 1970-04-11 20:13:57.143546 NULL 1971-01-31 20:13:57.876544 1970-04-11 20:13:57.143546 +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP TABLE t1; +# +# Test with triggers. +# +CREATE TABLE t1 ( +a INT, +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +e TIMESTAMP(6) NULL, +f DATETIME(6), +g DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +h DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +i DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +); +CREATE TABLE t2 ( a INT ); +CREATE TRIGGER t2_trg BEFORE INSERT ON t2 FOR EACH ROW +BEGIN +INSERT INTO t1 ( a ) VALUES ( 1 ); +END| +# 1971-01-31 21:13:57 UTC +SET TIMESTAMP = 34200837.978675; +INSERT INTO t2 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b c d e f g h i +1 1971-01-31 20:13:57.978675 1971-01-31 20:13:57.978675 0000-00-00 00:00:00.000000 NULL NULL 1971-01-31 20:13:57.978675 NULL 1971-01-31 20:13:57.978675 +DROP TRIGGER t2_trg; +CREATE TRIGGER t2_trg BEFORE INSERT ON t2 FOR EACH ROW +BEGIN +UPDATE t1 SET a = 2; +END| +# 1970-04-11 21:13:57 UTC +SET TIMESTAMP = 8712837.456789; +INSERT INTO t2 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b c d e f g h i +2 1970-04-11 20:13:57.456789 1971-01-31 20:13:57.978675 1970-04-11 20:13:57.456789 NULL NULL 1971-01-31 20:13:57.978675 1970-04-11 20:13:57.456789 1970-04-11 20:13:57.456789 +DROP TABLE t1, t2; +# +# Test where the assignment target is not a column. +# +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE TABLE t2 ( a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE TABLE t3 ( a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE TABLE t4 ( a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE VIEW v1 AS SELECT a COLLATE latin1_german1_ci AS b FROM t1; +CREATE VIEW v2 ( b ) AS SELECT a COLLATE latin1_german1_ci FROM t2; +CREATE VIEW v3 AS SELECT a COLLATE latin1_german1_ci AS b FROM t3; +CREATE VIEW v4 ( b ) AS SELECT a COLLATE latin1_german1_ci FROM t4; +INSERT INTO v1 ( b ) VALUES ( '2007-10-24 00:03:34.010203' ); +SELECT a FROM t1; +a +2007-10-24 00:03:34.010203 +INSERT INTO v2 ( b ) VALUES ( '2007-10-24 00:03:34.010203' ); +SELECT a FROM t2; +a +2007-10-24 00:03:34.010203 +INSERT INTO t3 VALUES (); +UPDATE v3 SET b = '2007-10-24 00:03:34.010203'; +SELECT a FROM t3; +a +2007-10-24 00:03:34.010203 +INSERT INTO t4 VALUES (); +UPDATE v4 SET b = '2007-10-24 00:03:34.010203'; +SELECT a FROM t4; +a +2007-10-24 00:03:34.010203 +DROP VIEW v1, v2, v3, v4; +DROP TABLE t1, t2, t3, t4; +# +# Test of LOAD DATA/XML INFILE +# This tests behavior of function defaults for TIMESTAMP and DATETIME +# columns. during LOAD ... INFILE. +# As can be seen here, a TIMESTAMP column with only ON UPDATE +# CURRENT_TIMESTAMP will still have CURRENT_TIMESTAMP inserted on LOAD +# ... INFILE if the value is missing. For DATETIME columns a NULL value +# is inserted instead. +# +CREATE TABLE t1 ( +a INT, +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +e TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +f DATETIME(6), +g DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +h DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +i DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +); +CREATE TABLE t2 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +e DATETIME(6) NOT NULL, +f DATETIME(6) NOT NULL DEFAULT '1977-01-02 12:13:14', +g DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) NOT NULL, +h DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6) NOT NULL, +i DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) NOT NULL +); +SELECT 1 INTO OUTFILE 't3.dat' FROM dual; +SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL +INTO OUTFILE 't4.dat' +FROM dual; +SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual; +# Mon Aug 1 15:11:19 2011 UTC +SET TIMESTAMP = 1312211479.918273; +LOAD DATA INFILE 't3.dat' INTO TABLE t1; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +SELECT * FROM t1; +a 1 +b 2011-08-01 15:11:19.918273 +c 2011-08-01 15:11:19.918273 +d 2011-08-01 15:11:19.918273 +e 2011-08-01 15:11:19.918273 +f NULL +g NULL +h NULL +i NULL +LOAD DATA INFILE 't4.dat' INTO TABLE t2; +Warnings: +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'e' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'f' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'g' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'h' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'i' at row 1 +SELECT a FROM t2; +a +2011-08-01 15:11:19.918273 +SELECT b FROM t2; +b +2011-08-01 15:11:19.918273 +SELECT c FROM t2; +c +2011-08-01 15:11:19.918273 +SELECT d FROM t2; +d +2011-08-01 15:11:19.918273 +# As shown here, supplying a NULL value to a non-nullable +# column with no default value results in the zero date. +SELECT e FROM t2; +e +0000-00-00 00:00:00.000000 +# As shown here, supplying a NULL value to a non-nullable column with a +# default value results in the zero date. +SELECT f FROM t2; +f +0000-00-00 00:00:00.000000 +# As shown here, supplying a NULL value to a non-nullable column with a +# default function results in the zero date. +SELECT g FROM t2; +g +0000-00-00 00:00:00.000000 +# As shown here, supplying a NULL value to a non-nullable DATETIME ON +# UPDATE CURRENT_TIMESTAMP column with no default value results in the +# zero date. +SELECT h FROM t2; +h +0000-00-00 00:00:00.000000 +SELECT i FROM t2; +i +0000-00-00 00:00:00.000000 +DELETE FROM t1; +DELETE FROM t2; +# Read t3 file into t1 +# The syntax will cause a different code path to be taken +# (read_fixed_length()) than under the LOAD ... INTO TABLE t1 command +# above. The code in this path is copy-pasted code from the path taken +# under the syntax used in the previous LOAD command. +LOAD DATA INFILE 't3.dat' INTO TABLE t1 +FIELDS TERMINATED BY '' ENCLOSED BY ''; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +SELECT b FROM t1; +b +2011-08-01 15:11:19.918273 +SELECT c FROM t1; +c +2011-08-01 15:11:19.918273 +SELECT d FROM t1; +d +2011-08-01 15:11:19.918273 +SELECT e FROM t1; +e +2011-08-01 15:11:19.918273 +# Yes, a missing field cannot be NULL using this syntax, so it will +# zero date instead. Says a comment in read_fixed_length() : "No fields +# specified in fields_vars list can be NULL in this format." +# It appears to be by design. This is inconsistent with LOAD DATA INFILE +# syntax in previous test. +SELECT f FROM t1; +f +0000-00-00 00:00:00.000000 +SELECT g FROM t1; +g +0000-00-00 00:00:00.000000 +# See comment above "SELECT f FROM f1". +SELECT h FROM t1; +h +0000-00-00 00:00:00.000000 +SELECT i FROM t1; +i +0000-00-00 00:00:00.000000 +DELETE FROM t1; +LOAD DATA INFILE 't5.dat' INTO TABLE t1 ( a, @dummy ); +SELECT * FROM t1; +a b c d e f g h i +1 2011-08-01 15:11:19.918273 2011-08-01 15:11:19.918273 0000-00-00 00:00:00.000000 2011-08-01 15:11:19.918273 NULL 2011-08-01 15:11:19.918273 NULL 2011-08-01 15:11:19.918273 +SELECT @dummy; +@dummy +2 +DELETE FROM t1; +LOAD DATA INFILE 't3.dat' INTO TABLE t1 ( a ) SET c = '2005-06-06 08:09:10'; +SELECT * FROM t1; +a b c d e f g h i +1 2011-08-01 15:11:19.918273 2005-06-06 08:09:10.000000 0000-00-00 00:00:00.000000 2011-08-01 15:11:19.918273 NULL 2011-08-01 15:11:19.918273 NULL 2011-08-01 15:11:19.918273 +DELETE FROM t1; +LOAD DATA INFILE 't3.dat' INTO TABLE t1 ( a ) SET g = '2005-06-06 08:09:10'; +SELECT * FROM t1; +a b c d e f g h i +1 2011-08-01 15:11:19.918273 2011-08-01 15:11:19.918273 0000-00-00 00:00:00.000000 2011-08-01 15:11:19.918273 NULL 2005-06-06 08:09:10.000000 NULL 2011-08-01 15:11:19.918273 +DELETE FROM t1; +# Load a static XML file +LOAD XML INFILE '../../std_data/onerow.xml' INTO TABLE t1 +ROWS IDENTIFIED BY '<row>'; +Missing tags are treated as NULL +SELECT * FROM t1; +a 1 +b 2011-08-01 15:11:19.918273 +c 2011-08-01 15:11:19.918273 +d 2011-08-01 15:11:19.918273 +e 2011-08-01 15:11:19.918273 +f NULL +g NULL +h NULL +i NULL +DROP TABLE t1, t2; +# +# Similar LOAD DATA tests in another form +# +# All of this test portion has been run on a pre-WL5874 trunk +# (except that like_b and like_c didn't exist) and all result +# differences are a bug. +# Regarding like_b its definition is the same as b's except +# that the constant default is replaced with a function +# default. Our expectation is that like_b would behave +# like b: if b is set to NULL, or set to 0000-00-00, or set to +# its default, then the same should apply to like_b. Same for +# like_c vs c. +# Mon Aug 1 15:11:19 2011 UTC +SET TIMESTAMP = 1312211479.089786; +SELECT 1 INTO OUTFILE "file1.dat" FROM dual; +SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL +INTO OUTFILE "file2.dat" FROM dual; +# Too short row +CREATE TABLE t1 ( +dummy INT, +a DATETIME(6) NULL DEFAULT NULL, +b DATETIME(6) NULL DEFAULT "2011-11-18", +like_b DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6), +c DATETIME(6) NOT NULL DEFAULT "2011-11-18", +like_c DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NULL DEFAULT "2011-05-03" ON UPDATE CURRENT_TIMESTAMP(6), +e TIMESTAMP(6) NOT NULL DEFAULT "2011-05-03", +f TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +g TIMESTAMP(6) NULL DEFAULT NULL, +h INT NULL, +i INT NOT NULL DEFAULT 42 +); +# There is no promotion +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `dummy` int(11) DEFAULT NULL, + `a` datetime(6) DEFAULT NULL, + `b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000', + `like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6), + `c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000', + `like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6), + `e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000', + `f` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `g` timestamp(6) NULL DEFAULT NULL, + `h` int(11) DEFAULT NULL, + `i` int(11) NOT NULL DEFAULT '42' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +LOAD DATA INFILE "file1.dat" INTO table t1; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +# It is strange that "like_b" gets NULL when "b" gets 0. But +# this is consistent with how "a" gets NULL when "b" gets 0, +# with how "g" gets NULL when "d" gets 0, and with how "h" gets +# NULL when "i" gets 0. Looks like "DEFAULT +# <non-NULL-constant>" is changed to 0, whereas DEFAULT NULL +# and DEFAULT NOW are changed to NULL. +SELECT * FROM t1; +dummy 1 +a NULL +b 0000-00-00 00:00:00.000000 +like_b NULL +c 0000-00-00 00:00:00.000000 +like_c 0000-00-00 00:00:00.000000 +d 0000-00-00 00:00:00.000000 +e 2011-08-01 15:11:19.089786 +f 2011-08-01 15:11:19.089786 +g NULL +h NULL +i 0 +delete from t1; +alter table t1 +modify f TIMESTAMP NULL default CURRENT_TIMESTAMP; +# There is no promotion +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `dummy` int(11) DEFAULT NULL, + `a` datetime(6) DEFAULT NULL, + `b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000', + `like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6), + `c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000', + `like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6), + `e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000', + `f` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + `g` timestamp(6) NULL DEFAULT NULL, + `h` int(11) DEFAULT NULL, + `i` int(11) NOT NULL DEFAULT '42' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +LOAD DATA INFILE "file1.dat" INTO table t1; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +SELECT * FROM t1; +dummy 1 +a NULL +b 0000-00-00 00:00:00.000000 +like_b NULL +c 0000-00-00 00:00:00.000000 +like_c 0000-00-00 00:00:00.000000 +d 0000-00-00 00:00:00.000000 +e 2011-08-01 15:11:19.089786 +f NULL +g NULL +h NULL +i 0 +delete from t1; +drop table t1; +# Conclusion derived from trunk's results: +# DATETIME DEFAULT <non-NULL-constant> (b,c) gets 0000-00-00, +# DATETIME DEFAULT NULL (a) gets NULL, +# TIMESTAMP NULL DEFAULT <non-NULL-constant> (d) gets 0000-00-00, +# TIMESTAMP NULL DEFAULT NULL (g) gets NULL, +# TIMESTAMP NULL DEFAULT NOW (f after ALTER) gets NULL, +# TIMESTAMP NOT NULL (f before ALTER, e) gets NOW. +### Loading NULL ### +CREATE TABLE t1 ( +dummy INT, +a DATETIME(6) NULL DEFAULT NULL, +b DATETIME(6) NULL DEFAULT "2011-11-18", +like_b DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6), +c DATETIME(6) NOT NULL DEFAULT "2011-11-18", +like_c DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NULL DEFAULT "2011-05-03" ON UPDATE CURRENT_TIMESTAMP(6), +e TIMESTAMP(6) NOT NULL DEFAULT "2011-05-03", +f TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +g TIMESTAMP(6) NULL DEFAULT NULL, +h INT NULL, +i INT NOT NULL DEFAULT 42 +); +# There is no promotion +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `dummy` int(11) DEFAULT NULL, + `a` datetime(6) DEFAULT NULL, + `b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000', + `like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6), + `c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000', + `like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6), + `e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000', + `f` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `g` timestamp(6) NULL DEFAULT NULL, + `h` int(11) DEFAULT NULL, + `i` int(11) NOT NULL DEFAULT '42' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +LOAD DATA INFILE "file2.dat" INTO table t1; +Warnings: +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'like_c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'i' at row 1 +SELECT * FROM t1; +dummy NULL +a NULL +b NULL +like_b NULL +c 0000-00-00 00:00:00.000000 +like_c 0000-00-00 00:00:00.000000 +d NULL +e 2011-08-01 15:11:19.089786 +f 2011-08-01 15:11:19.089786 +g NULL +h NULL +i 0 +delete from t1; +alter table t1 +modify f TIMESTAMP NULL default CURRENT_TIMESTAMP; +# There is no promotion +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `dummy` int(11) DEFAULT NULL, + `a` datetime(6) DEFAULT NULL, + `b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000', + `like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6), + `c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000', + `like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6), + `e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000', + `f` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + `g` timestamp(6) NULL DEFAULT NULL, + `h` int(11) DEFAULT NULL, + `i` int(11) NOT NULL DEFAULT '42' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +LOAD DATA INFILE "file2.dat" INTO table t1; +Warnings: +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'like_c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'i' at row 1 +SELECT * FROM t1; +dummy NULL +a NULL +b NULL +like_b NULL +c 0000-00-00 00:00:00.000000 +like_c 0000-00-00 00:00:00.000000 +d NULL +e 2011-08-01 15:11:19.089786 +f NULL +g NULL +h NULL +i 0 +delete from t1; +# Conclusion derived from trunk's results: +# DATETIME NULL (a,b) gets NULL, +# DATETIME NOT NULL (c) gets 0000-00-00, +# TIMESTAMP NULL (d,f,g) gets NULL, +# TIMESTAMP NOT NULL (e) gets NOW. +drop table t1; +# +# Test of updatable views with check options. The option can be violated +# using ON UPDATE updates which is very strange as this offers a loophole +# in this integrity check. +# +SET TIME_ZONE = "+03:00"; +# 1970-01-01 03:16:40 +SET TIMESTAMP = 1000.123456; +CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b +1 1970-01-01 03:16:40.123456 +CREATE VIEW v1 AS SELECT * FROM t1 WHERE b <= '1970-01-01 03:16:40.123456' +WITH CHECK OPTION; +SELECT * FROM v1; +a b +1 1970-01-01 03:16:40.123456 +# 1970-01-01 03:33:20 +SET TIMESTAMP = 2000.000234; +UPDATE v1 SET a = 2; +ERROR HY000: CHECK OPTION failed 'test.v1' +SELECT * FROM t1; +a b +1 1970-01-01 03:16:40.123456 +DROP VIEW v1; +DROP TABLE t1; +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT '1973-08-14 09:11:22.089786' ON UPDATE CURRENT_TIMESTAMP(6), +c INT KEY +); +# 1973-08-14 09:11:22 UTC +SET TIMESTAMP = 114167482.534231; +INSERT INTO t1 ( c ) VALUES ( 1 ); +CREATE VIEW v1 AS +SELECT * +FROM t1 +WHERE a >= '1973-08-14 09:11:22' +WITH LOCAL CHECK OPTION; +SELECT * FROM v1; +a c +1973-08-14 09:11:22.089786 1 +SET TIMESTAMP = 1.126789; +INSERT INTO v1 ( c ) VALUES ( 1 ) ON DUPLICATE KEY UPDATE c = 2; +ERROR HY000: CHECK OPTION failed 'test.v1' +SELECT * FROM v1; +a c +1973-08-14 09:11:22.089786 1 +DROP VIEW v1; +DROP TABLE t1; +# +# Bug 13095459 - MULTI-TABLE UPDATE MODIFIES A ROW TWICE +# +CREATE TABLE t1 ( +a INT, +b INT, +ts TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +PRIMARY KEY ( a, ts ) +); +INSERT INTO t1( a, b, ts ) VALUES ( 1, 0, '2000-09-28 17:44:34' ); +CREATE TABLE t2 ( a INT ); +INSERT INTO t2 VALUES ( 1 ); +UPDATE t1 STRAIGHT_JOIN t2 +SET t1.b = t1.b + 1 +WHERE t1.a = 1 AND t1.ts >= '2000-09-28 00:00:00'; +SELECT b FROM t1; +b +1 +DROP TABLE t1, t2; +# +# Bug#11745578: 17392: ALTER TABLE ADD COLUMN TIMESTAMP DEFAULT +# CURRENT_TIMESTAMP INSERTS ZERO +# +SET timestamp = 1000; +CREATE TABLE t1 ( b INT ); +INSERT INTO t1 VALUES (1); +ALTER TABLE t1 ADD COLUMN a6 DATETIME(6) DEFAULT NOW(6) ON UPDATE NOW(6) FIRST; +ALTER TABLE t1 ADD COLUMN a5 DATETIME(6) DEFAULT NOW(6) FIRST; +ALTER TABLE t1 ADD COLUMN a4 DATETIME(6) ON UPDATE NOW(6) FIRST; +ALTER TABLE t1 ADD COLUMN a3 TIMESTAMP(6) NOT NULL DEFAULT NOW(6) ON UPDATE NOW(6) FIRST; +ALTER TABLE t1 ADD COLUMN a2 TIMESTAMP(6) NOT NULL DEFAULT NOW(6) FIRST; +ALTER TABLE t1 ADD COLUMN a1 TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE NOW(6) FIRST; +ALTER TABLE t1 ADD COLUMN c1 TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE NOW(6) AFTER b; +ALTER TABLE t1 ADD COLUMN c2 TIMESTAMP(6) NOT NULL DEFAULT NOW(6) AFTER c1; +ALTER TABLE t1 ADD COLUMN c3 TIMESTAMP(6) NOT NULL DEFAULT NOW(6) ON UPDATE NOW(6) AFTER c2; +ALTER TABLE t1 ADD COLUMN c4 DATETIME(6) ON UPDATE NOW(6) AFTER c3; +ALTER TABLE t1 ADD COLUMN c5 DATETIME(6) DEFAULT NOW(6) AFTER c4; +ALTER TABLE t1 ADD COLUMN c6 DATETIME(6) DEFAULT NOW(6) ON UPDATE NOW(6) AFTER c5; +SELECT * FROM t1; +a1 0000-00-00 00:00:00.000000 +a2 1970-01-01 03:16:40.000000 +a3 1970-01-01 03:16:40.000000 +a4 NULL +a5 1970-01-01 03:16:40.000000 +a6 1970-01-01 03:16:40.000000 +b 1 +c1 0000-00-00 00:00:00.000000 +c2 1970-01-01 03:16:40.000000 +c3 1970-01-01 03:16:40.000000 +c4 NULL +c5 1970-01-01 03:16:40.000000 +c6 1970-01-01 03:16:40.000000 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT NOW(6) ON UPDATE CURRENT_TIMESTAMP(6), b DATETIME(6) DEFAULT NOW(6) ); +INSERT INTO t1 VALUES (); +SET timestamp = 1000000000; +ALTER TABLE t1 MODIFY COLUMN a TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP(3); +ALTER TABLE t1 MODIFY COLUMN b DATETIME(3) DEFAULT CURRENT_TIMESTAMP(3); +SELECT * FROM t1; +a b +1970-01-01 03:16:40.000 1970-01-01 03:16:40.000 +DROP TABLE t1; +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT '1999-12-01 11:22:33' ON UPDATE CURRENT_TIMESTAMP(6), +b DATETIME(6) DEFAULT '1999-12-01 11:22:33' +); +INSERT INTO t1 VALUES (); +ALTER TABLE t1 MODIFY COLUMN a TIMESTAMP(6) DEFAULT NOW(6); +ALTER TABLE t1 MODIFY COLUMN b DATETIME(6) DEFAULT NOW(6); +INSERT INTO t1 VALUES (); +SELECT * FROM t1; +a b +1999-12-01 11:22:33.000000 1999-12-01 11:22:33.000000 +2001-09-09 04:46:40.000000 2001-09-09 04:46:40.000000 +DROP TABLE t1; diff --git a/mysql-test/r/function_defaults_innodb.result b/mysql-test/r/function_defaults_innodb.result new file mode 100644 index 00000000000..2525d4e948a --- /dev/null +++ b/mysql-test/r/function_defaults_innodb.result @@ -0,0 +1,3116 @@ +# +# Test of function defaults for any server, including embedded. +# +set default_storage_engine=innodb; +# +# Function defaults run 1. No microsecond precision. +# +SET TIME_ZONE = "+00:00"; +# +# Test of errors for column data types that dont support function +# defaults. +# +CREATE TABLE t1( a BIT DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a TINYINT DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a SMALLINT DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a MEDIUMINT DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a INT DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a BIGINT DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a FLOAT DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a DECIMAL DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a DATE DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a TIME DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a YEAR DEFAULT CURRENT_TIMESTAMP ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a BIT ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a TINYINT ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a SMALLINT ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a MEDIUMINT ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a INT ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a BIGINT ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a FLOAT ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a DECIMAL ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a DATE ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a TIME ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a YEAR ON UPDATE CURRENT_TIMESTAMP ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +# +# Test that the default clause behaves like NOW() regarding time zones. +# +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +d TIMESTAMP NULL, +e DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +f DATETIME DEFAULT CURRENT_TIMESTAMP, +g DATETIME ON UPDATE CURRENT_TIMESTAMP, +h DATETIME +); +# 2011-09-27 14:11:08 UTC +SET TIMESTAMP = 1317132668.654321; +SET @old_time_zone = @@TIME_ZONE; +SET TIME_ZONE = "+05:00"; +INSERT INTO t1( d, h ) VALUES ( NOW(), NOW() ); +SELECT * FROM t1; +a b c d e f g h +2011-09-27 19:11:08 2011-09-27 19:11:08 0000-00-00 00:00:00 2011-09-27 19:11:08 2011-09-27 19:11:08 2011-09-27 19:11:08 NULL 2011-09-27 19:11:08 +# 1989-05-13 01:02:03 +SET TIMESTAMP = 611017323.543212; +UPDATE t1 SET d = NOW(), h = NOW(); +SELECT * FROM t1; +a b c d e f g h +1989-05-13 04:02:03 2011-09-27 19:11:08 1989-05-13 04:02:03 1989-05-13 04:02:03 1989-05-13 04:02:03 2011-09-27 19:11:08 1989-05-13 04:02:03 1989-05-13 04:02:03 +SET TIME_ZONE = @old_time_zone; +DROP TABLE t1; +# +# Test of several TIMESTAMP columns with different function defaults. +# +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +e TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +f INT +); +# 2011-04-19 07:22:02 UTC +SET TIMESTAMP = 1303197722.534231; +INSERT INTO t1 ( f ) VALUES (1); +SELECT * FROM t1; +a b c d e f +2011-04-19 07:22:02 2011-04-19 07:22:02 2011-04-19 07:22:02 0000-00-00 00:00:00 0000-00-00 00:00:00 1 +# 2011-04-19 07:23:18 UTC +SET TIMESTAMP = 1303197798.132435; +UPDATE t1 SET f = 2; +SELECT * FROM t1; +a b c d e f +2011-04-19 07:23:18 2011-04-19 07:23:18 2011-04-19 07:22:02 2011-04-19 07:23:18 2011-04-19 07:23:18 2 +DROP TABLE t1; +# +# Test of inserted values out of order. +# +CREATE TABLE t1 ( +a INT, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +e TIMESTAMP NULL, +f DATETIME, +g DATETIME DEFAULT CURRENT_TIMESTAMP, +h DATETIME ON UPDATE CURRENT_TIMESTAMP, +i DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +j INT +); +# 2011-04-19 07:22:02 UTC +SET TIMESTAMP = 1303197722.534231; +INSERT INTO t1 ( j, a ) VALUES ( 1, 1 ); +SELECT * FROM t1; +a b c d e f g h i j +1 2011-04-19 07:22:02 2011-04-19 07:22:02 0000-00-00 00:00:00 NULL NULL 2011-04-19 07:22:02 NULL 2011-04-19 07:22:02 1 +DROP TABLE t1; +# +# Test of ON DUPLICATE KEY UPDATE +# +CREATE TABLE t1 ( +a INT PRIMARY KEY, +b INT, +c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +e TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +f TIMESTAMP NOT NULL DEFAULT '1986-09-27 03:00:00.098765', +g TIMESTAMP NULL, +h DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +i DATETIME DEFAULT CURRENT_TIMESTAMP, +j DATETIME ON UPDATE CURRENT_TIMESTAMP, +k DATETIME NULL, +l DATETIME DEFAULT '1986-09-27 03:00:00.098765' +); +# 1977-12-21 23:00:00 UTC +SET TIMESTAMP = 251593200.192837; +INSERT INTO t1(a) VALUES (1) ON DUPLICATE KEY UPDATE b = 2; +SELECT * FROM t1; +a b c d e f g h i j k l +1 NULL 1977-12-21 23:00:00 1977-12-21 23:00:00 0000-00-00 00:00:00 1986-09-27 03:00:00 NULL 1977-12-21 23:00:00 1977-12-21 23:00:00 NULL NULL 1986-09-27 03:00:00 +# 1975-05-21 23:00:00 UTC +SET TIMESTAMP = 169945200.918273; +INSERT INTO t1(a) VALUES (1) ON DUPLICATE KEY UPDATE b = 2; +SELECT * FROM t1; +a b c d e f g h i j k l +1 2 1975-05-21 23:00:00 1977-12-21 23:00:00 1975-05-21 23:00:00 1986-09-27 03:00:00 NULL 1975-05-21 23:00:00 1977-12-21 23:00:00 1975-05-21 23:00:00 NULL 1986-09-27 03:00:00 +# 1973-08-14 09:11:22 UTC +SET TIMESTAMP = 114167482.534231; +INSERT INTO t1(a) VALUES (2) ON DUPLICATE KEY UPDATE b = 2; +SELECT * FROM t1; +a b c d e f g h i j k l +1 2 1975-05-21 23:00:00 1977-12-21 23:00:00 1975-05-21 23:00:00 1986-09-27 03:00:00 NULL 1975-05-21 23:00:00 1977-12-21 23:00:00 1975-05-21 23:00:00 NULL 1986-09-27 03:00:00 +2 NULL 1973-08-14 09:11:22 1973-08-14 09:11:22 0000-00-00 00:00:00 1986-09-27 03:00:00 NULL 1973-08-14 09:11:22 1973-08-14 09:11:22 NULL NULL 1986-09-27 03:00:00 +DROP TABLE t1; +CREATE TABLE t1 ( a INT PRIMARY KEY, b INT, c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ); +# 2011-04-19 07:23:18 UTC +SET TIMESTAMP = 1303197798.945156; +INSERT INTO t1 VALUES +(1, 0, '2001-01-01 01:01:01.111111'), +(2, 0, '2002-02-02 02:02:02.222222'), +(3, 0, '2003-03-03 03:03:03.333333'); +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01 +2 0 2002-02-02 02:02:02 +3 0 2003-03-03 03:03:03 +UPDATE t1 SET b = 2, c = c WHERE a = 2; +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01 +2 2 2002-02-02 02:02:02 +3 0 2003-03-03 03:03:03 +INSERT INTO t1 (a) VALUES (4); +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01 +2 2 2002-02-02 02:02:02 +3 0 2003-03-03 03:03:03 +4 NULL 2011-04-19 07:23:18 +UPDATE t1 SET c = '2004-04-04 04:04:04.444444' WHERE a = 4; +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01 +2 2 2002-02-02 02:02:02 +3 0 2003-03-03 03:03:03 +4 NULL 2004-04-04 04:04:04 +INSERT INTO t1 ( a ) VALUES ( 3 ), ( 5 ) ON DUPLICATE KEY UPDATE b = 3, c = c; +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01 +2 2 2002-02-02 02:02:02 +3 3 2003-03-03 03:03:03 +4 NULL 2004-04-04 04:04:04 +5 NULL 2011-04-19 07:23:18 +INSERT INTO t1 (a, c) VALUES +(4, '2004-04-04 00:00:00.444444'), +(6, '2006-06-06 06:06:06.666666') +ON DUPLICATE KEY UPDATE b = 4; +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01 +2 2 2002-02-02 02:02:02 +3 3 2003-03-03 03:03:03 +4 4 2011-04-19 07:23:18 +5 NULL 2011-04-19 07:23:18 +6 NULL 2006-06-06 06:06:06 +DROP TABLE t1; +# +# Test of REPLACE INTO executed as UPDATE. +# +CREATE TABLE t1 ( +a INT PRIMARY KEY, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +c DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +e DATETIME DEFAULT CURRENT_TIMESTAMP, +f TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +g DATETIME ON UPDATE CURRENT_TIMESTAMP, +h TIMESTAMP NULL, +i DATETIME +); +# 1970-09-21 09:11:12 UTC +SET TIMESTAMP = 22756272.163584; +REPLACE INTO t1 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b c d e f g h i +1 1970-09-21 09:11:12 1970-09-21 09:11:12 1970-09-21 09:11:12 1970-09-21 09:11:12 0000-00-00 00:00:00 NULL NULL NULL +# 1970-11-10 14:16:17 UTC +SET TIMESTAMP = 27094577.852954; +REPLACE INTO t1 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b c d e f g h i +1 1970-11-10 14:16:17 1970-11-10 14:16:17 1970-11-10 14:16:17 1970-11-10 14:16:17 0000-00-00 00:00:00 NULL NULL NULL +DROP TABLE t1; +# +# Test of insertion of NULL, DEFAULT and an empty row for DEFAULT +# CURRENT_TIMESTAMP. +# +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b DATETIME DEFAULT CURRENT_TIMESTAMP, +c INT +); +# 2011-04-20 09:53:41 UTC +SET TIMESTAMP = 1303293221.163578; +INSERT INTO t1 VALUES (NULL, NULL, 1), (DEFAULT, DEFAULT, 2); +INSERT INTO t1 ( a, b, c ) VALUES (NULL, NULL, 3), (DEFAULT, DEFAULT, 4); +SELECT * FROM t1; +a b c +2011-04-20 09:53:41 NULL 1 +2011-04-20 09:53:41 2011-04-20 09:53:41 2 +2011-04-20 09:53:41 NULL 3 +2011-04-20 09:53:41 2011-04-20 09:53:41 4 +SET TIME_ZONE = "+03:00"; +SELECT * FROM t1; +a b c +2011-04-20 12:53:41 NULL 1 +2011-04-20 12:53:41 2011-04-20 09:53:41 2 +2011-04-20 12:53:41 NULL 3 +2011-04-20 12:53:41 2011-04-20 09:53:41 4 +SET TIME_ZONE = "+00:00"; +DROP TABLE t1; +# 2011-04-20 07:05:39 UTC +SET TIMESTAMP = 1303283139.195624; +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT '2010-10-11 12:34:56' ON UPDATE CURRENT_TIMESTAMP, +b DATETIME DEFAULT '2010-10-11 12:34:56' +); +INSERT INTO t1 VALUES (NULL, NULL), (DEFAULT, DEFAULT); +INSERT INTO t1 ( a, b ) VALUES (NULL, NULL), (DEFAULT, DEFAULT); +SELECT * FROM t1; +a b +2011-04-20 07:05:39 NULL +2010-10-11 12:34:56 2010-10-11 12:34:56 +2011-04-20 07:05:39 NULL +2010-10-11 12:34:56 2010-10-11 12:34:56 +DROP TABLE t1; +# 2011-04-20 09:53:41 UTC +SET TIMESTAMP = 1303293221.136952; +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT '1986-09-27 03:00:00.098765', +e TIMESTAMP NULL, +f DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +g DATETIME DEFAULT CURRENT_TIMESTAMP, +h DATETIME ON UPDATE CURRENT_TIMESTAMP, +i DATETIME NULL, +j DATETIME DEFAULT '1986-09-27 03:00:00.098765' +); +INSERT INTO t1 VALUES (); +INSERT INTO t1 SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL; +SELECT * FROM t1; +a b c d e f g h i j +2011-04-20 09:53:41 2011-04-20 09:53:41 0000-00-00 00:00:00 1986-09-27 03:00:00 NULL 2011-04-20 09:53:41 2011-04-20 09:53:41 NULL NULL 1986-09-27 03:00:00 +2011-04-20 09:53:41 2011-04-20 09:53:41 2011-04-20 09:53:41 2011-04-20 09:53:41 NULL NULL NULL NULL NULL NULL +DROP TABLE t1; +# +# Test of multiple-table UPDATE for DEFAULT CURRENT_TIMESTAMP +# +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b DATETIME DEFAULT CURRENT_TIMESTAMP, +c INT +); +INSERT INTO t1 ( c ) VALUES (1); +SELECT * FROM t1; +a b c +2011-04-20 09:53:41 2011-04-20 09:53:41 1 +# 2011-04-20 17:06:13 UTC +SET TIMESTAMP = 1303311973.163587; +UPDATE t1 t11, t1 t12 SET t11.c = 1; +SELECT * FROM t1; +a b c +2011-04-20 09:53:41 2011-04-20 09:53:41 1 +UPDATE t1 t11, t1 t12 SET t11.c = 2; +SELECT * FROM t1; +a b c +2011-04-20 15:06:13 2011-04-20 09:53:41 2 +DROP TABLE t1; +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +b TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +c DATETIME DEFAULT CURRENT_TIMESTAMP, +d DATETIME ON UPDATE CURRENT_TIMESTAMP, +e INT +); +CREATE TABLE t2 ( +f INT, +g DATETIME ON UPDATE CURRENT_TIMESTAMP, +h DATETIME DEFAULT CURRENT_TIMESTAMP, +i TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +j TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +); +# 1995-03-11 00:02:03 UTC +SET TIMESTAMP = 794880123.195676; +INSERT INTO t1 ( e ) VALUES ( 1 ), ( 2 ); +INSERT INTO t2 ( f ) VALUES ( 1 ), ( 2 ); +SELECT * FROM t1; +a b c d e +1995-03-11 00:02:03 0000-00-00 00:00:00 1995-03-11 00:02:03 NULL 1 +1995-03-11 00:02:03 0000-00-00 00:00:00 1995-03-11 00:02:03 NULL 2 +SELECT * FROM t2; +f g h i j +1 NULL 1995-03-11 00:02:03 0000-00-00 00:00:00 1995-03-11 00:02:03 +2 NULL 1995-03-11 00:02:03 0000-00-00 00:00:00 1995-03-11 00:02:03 +# 1980-12-13 02:02:01 UTC +SET TIMESTAMP = 345520921.196755; +UPDATE t1, t2 SET t1.e = 3, t2.f = 4; +SELECT * FROM t1; +a b c d e +1995-03-11 00:02:03 1980-12-13 02:02:01 1995-03-11 00:02:03 1980-12-13 02:02:01 3 +1995-03-11 00:02:03 1980-12-13 02:02:01 1995-03-11 00:02:03 1980-12-13 02:02:01 3 +SELECT * FROM t2; +f g h i j +4 1980-12-13 02:02:01 1995-03-11 00:02:03 1980-12-13 02:02:01 1995-03-11 00:02:03 +4 1980-12-13 02:02:01 1995-03-11 00:02:03 1980-12-13 02:02:01 1995-03-11 00:02:03 +DROP TABLE t1, t2; +# +# Test of multiple table update with temporary table and on the fly. +# +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +b DATETIME ON UPDATE CURRENT_TIMESTAMP, +c INT, +d INT +); +CREATE TABLE t2 ( +a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +b DATETIME ON UPDATE CURRENT_TIMESTAMP, +c INT KEY, +d INT +); +INSERT INTO t1 ( c ) VALUES (1), (2); +INSERT INTO t2 ( c ) VALUES (1), (2); +# Test of multiple table update done on the fly +# 2011-04-20 15:06:13 UTC +SET TIMESTAMP = 1303311973.194685; +UPDATE t1 JOIN t2 USING ( c ) SET t2.d = 1; +SELECT * FROM t1; +a b c d +0000-00-00 00:00:00 NULL 1 NULL +0000-00-00 00:00:00 NULL 2 NULL +SELECT * FROM t2; +a b c d +2011-04-20 15:06:13 2011-04-20 15:06:13 1 1 +2011-04-20 15:06:13 2011-04-20 15:06:13 2 1 +# Test of multiple table update done with temporary table. +# 1979-01-15 03:02:01 +SET TIMESTAMP = 285213721.134679; +UPDATE t1 JOIN t2 USING ( c ) SET t1.d = 1; +SELECT * FROM t1; +a b c d +1979-01-15 02:02:01 1979-01-15 02:02:01 1 1 +1979-01-15 02:02:01 1979-01-15 02:02:01 2 1 +SELECT * FROM t2; +a b c d +2011-04-20 15:06:13 2011-04-20 15:06:13 1 1 +2011-04-20 15:06:13 2011-04-20 15:06:13 2 1 +DROP TABLE t1, t2; +# +# Test of ON UPDATE CURRENT_TIMESTAMP. +# +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +b DATETIME ON UPDATE CURRENT_TIMESTAMP, +c INT +); +# 2011-04-20 09:53:41 UTC +SET TIMESTAMP = 1303293221.794613; +INSERT INTO t1 ( c ) VALUES ( 1 ); +SELECT * FROM t1; +a b c +0000-00-00 00:00:00 NULL 1 +UPDATE t1 SET c = 1; +SELECT * FROM t1; +a b c +0000-00-00 00:00:00 NULL 1 +UPDATE t1 SET c = 2; +SELECT * FROM t1; +a b c +2011-04-20 09:53:41 2011-04-20 09:53:41 2 +# +# Test that ON UPDATE CURRENT_TIMESTAMP works after non-changing UPDATE. +# +# 2011-04-20 09:54:13 UTC +SET TIMESTAMP = 1303293253.794613; +UPDATE t1 SET c = 2, b = '2011-04-20 09:53:41.794613'; +SELECT * FROM t1; +a b c +2011-04-20 09:53:41 2011-04-20 09:53:41 2 +UPDATE t1 SET c = 3; +SELECT * FROM t1; +a b c +2011-04-20 09:54:13 2011-04-20 09:54:13 3 +# +# Test of multiple-table UPDATE for ON UPDATE CURRENT_TIMESTAMP +# +# 2011-04-20 15:06:13 UTC +SET TIMESTAMP = 1303311973.534231; +UPDATE t1 t11, t1 t12 SET t11.c = 3; +SELECT * FROM t1; +a b c +2011-04-20 09:54:13 2011-04-20 09:54:13 3 +UPDATE t1 t11, t1 t12 SET t11.c = 2; +SELECT * FROM t1; +a b c +2011-04-20 15:06:13 2011-04-20 15:06:13 2 +DROP TABLE t1; +# +# Test of a multiple-table update where only one table is updated and +# the updated table has a primary key. +# +CREATE TABLE t1 ( a INT, b INT, PRIMARY KEY (a) ); +INSERT INTO t1 VALUES (1, 1),(2, 2),(3, 3),(4, 4); +CREATE TABLE t2 ( a INT, b INT ); +INSERT INTO t2 VALUES (1, 1),(2, 2),(3, 3),(4, 4),(5, 5); +UPDATE t1, t2 SET t1.b = 100 WHERE t1.a = t2.a; +SELECT * FROM t1; +a b +1 100 +2 100 +3 100 +4 100 +SELECT * FROM t2; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +DROP TABLE t1, t2; +# +# Test of ALTER TABLE, reordering columns. +# +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, b INT ); +ALTER TABLE t1 MODIFY a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` int(11) DEFAULT NULL, + `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a INT, b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, c TIMESTAMP NULL ); +ALTER TABLE t1 MODIFY b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `a` int(11) DEFAULT NULL, + `c` timestamp NULL DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a INT, b TIMESTAMP NULL ); +ALTER TABLE t1 MODIFY b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, b TIMESTAMP NULL ); +ALTER TABLE t1 MODIFY a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` timestamp NULL DEFAULT NULL, + `a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, b TIMESTAMP NULL ); +ALTER TABLE t1 MODIFY a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` timestamp NULL DEFAULT NULL, + `a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE NOW(), b INT, c TIMESTAMP NULL ); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `b` int(11) DEFAULT NULL, + `c` timestamp NULL DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +ALTER TABLE t1 MODIFY a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` int(11) DEFAULT NULL, + `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `c` timestamp NULL DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE NOW(), b INT, c TIMESTAMP NULL ); +ALTER TABLE t1 MODIFY c TIMESTAMP NULL FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` timestamp NULL DEFAULT NULL, + `a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `b` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE CURRENT_TIMESTAMP, b INT, c TIMESTAMP NULL ); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `b` int(11) DEFAULT NULL, + `c` timestamp NULL DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +ALTER TABLE t1 MODIFY a TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE CURRENT_TIMESTAMP AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` int(11) DEFAULT NULL, + `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `c` timestamp NULL DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE CURRENT_TIMESTAMP, b INT, c TIMESTAMP NULL ); +ALTER TABLE t1 MODIFY c TIMESTAMP NULL FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` timestamp NULL DEFAULT NULL, + `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `b` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +# +# Test of ALTER TABLE, adding columns. +# +CREATE TABLE t1 ( a INT ); +ALTER TABLE t1 ADD COLUMN b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +# +# Test of INSERT SELECT. +# +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +c DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +d DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +); +CREATE TABLE t2 ( +placeholder1 INT, +placeholder2 INT, +placeholder3 INT, +placeholder4 INT, +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', +c DATETIME, +d DATETIME +); +# 1977-08-16 15:30:01 UTC +SET TIMESTAMP = 240589801.654312; +INSERT INTO t2 (a, b, c, d) VALUES ( +'1977-08-16 15:30:01.123456', +'1977-08-16 15:30:01.234567', +'1977-08-16 15:30:01.345678', +'1977-08-16 15:30:01.456789' +); +# 1986-09-27 01:00:00 UTC +SET TIMESTAMP = 528166800.132435; +INSERT INTO t1 ( a, c ) SELECT a, c FROM t2; +SELECT * FROM t1; +a b c d +1977-08-16 15:30:01 1986-09-27 01:00:00 1977-08-16 15:30:01 1986-09-27 01:00:00 +DROP TABLE t1, t2; +# +# Test of CREATE TABLE SELECT. +# +# We test that the columns of the source table are not used to determine +# function defaults for the receiving table. +# +# 1970-04-11 20:13:57 UTC +SET TIMESTAMP = 8712837.657898; +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT '1986-09-27 03:00:00.098765', +e TIMESTAMP NULL, +f DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +g DATETIME DEFAULT CURRENT_TIMESTAMP, +h DATETIME ON UPDATE CURRENT_TIMESTAMP, +i DATETIME NULL, +j DATETIME DEFAULT '1986-09-27 03:00:00.098765' +); +INSERT INTO t1 VALUES (); +# 1971-01-31 21:13:57 UTC +SET TIMESTAMP = 34200837.164937; +CREATE TABLE t2 SELECT a FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t2; +a +1970-04-11 20:13:57 +CREATE TABLE t3 SELECT b FROM t1; +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t3; +b +1970-04-11 20:13:57 +CREATE TABLE t4 SELECT c FROM t1; +SHOW CREATE TABLE t4; +Table Create Table +t4 CREATE TABLE `t4` ( + `c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t4; +c +0000-00-00 00:00:00 +CREATE TABLE t5 SELECT d FROM t1; +SHOW CREATE TABLE t5; +Table Create Table +t5 CREATE TABLE `t5` ( + `d` timestamp NOT NULL DEFAULT '1986-09-27 03:00:00' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t5; +d +1986-09-27 03:00:00 +CREATE TABLE t6 SELECT e FROM t1; +SHOW CREATE TABLE t6; +Table Create Table +t6 CREATE TABLE `t6` ( + `e` timestamp NULL DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t6; +e +NULL +CREATE TABLE t7 SELECT f FROM t1; +SHOW CREATE TABLE t7; +Table Create Table +t7 CREATE TABLE `t7` ( + `f` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t7; +f +1970-04-11 20:13:57 +CREATE TABLE t8 SELECT g FROM t1; +SHOW CREATE TABLE t8; +Table Create Table +t8 CREATE TABLE `t8` ( + `g` datetime DEFAULT CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t8; +g +1970-04-11 20:13:57 +CREATE TABLE t9 SELECT h FROM t1; +SHOW CREATE TABLE t9; +Table Create Table +t9 CREATE TABLE `t9` ( + `h` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t9; +h +NULL +CREATE TABLE t10 SELECT i FROM t1; +SHOW CREATE TABLE t10; +Table Create Table +t10 CREATE TABLE `t10` ( + `i` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t10; +i +NULL +CREATE TABLE t11 SELECT j FROM t1; +SHOW CREATE TABLE t11; +Table Create Table +t11 CREATE TABLE `t11` ( + `j` datetime DEFAULT '1986-09-27 03:00:00' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t11; +j +1986-09-27 03:00:00 +CREATE TABLE t12 ( +k TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +l TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +m TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +n TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +o TIMESTAMP NOT NULL DEFAULT '1986-09-27 03:00:00.098765', +p TIMESTAMP NULL, +q DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +r DATETIME DEFAULT CURRENT_TIMESTAMP, +s DATETIME ON UPDATE CURRENT_TIMESTAMP, +t DATETIME NULL, +u DATETIME DEFAULT '1986-09-27 03:00:00.098765' +) +SELECT * FROM t1; +SHOW CREATE TABLE t12; +Table Create Table +t12 CREATE TABLE `t12` ( + `k` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `l` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `m` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `n` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `o` timestamp NOT NULL DEFAULT '1986-09-27 03:00:00', + `p` timestamp NULL DEFAULT NULL, + `q` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `r` datetime DEFAULT CURRENT_TIMESTAMP, + `s` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, + `t` datetime DEFAULT NULL, + `u` datetime DEFAULT '1986-09-27 03:00:00', + `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `d` timestamp NOT NULL DEFAULT '1986-09-27 03:00:00', + `e` timestamp NULL DEFAULT NULL, + `f` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `g` datetime DEFAULT CURRENT_TIMESTAMP, + `h` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, + `i` datetime DEFAULT NULL, + `j` datetime DEFAULT '1986-09-27 03:00:00' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12; +# 1970-04-11 20:13:57 UTC +SET TIMESTAMP = 8712837.164953; +CREATE TABLE t1 ( +a DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b DATETIME DEFAULT CURRENT_TIMESTAMP, +c DATETIME ON UPDATE CURRENT_TIMESTAMP, +d DATETIME NULL, +e DATETIME DEFAULT '1986-09-27 03:00:00.098765' +); +INSERT INTO t1 VALUES (); +# 1971-01-31 20:13:57 UTC +SET TIMESTAMP = 34200837.915736; +CREATE TABLE t2 SELECT a FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t2; +a +1970-04-11 20:13:57 +CREATE TABLE t3 SELECT b FROM t1; +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `b` datetime DEFAULT CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t3; +b +1970-04-11 20:13:57 +CREATE TABLE t4 SELECT c FROM t1; +SHOW CREATE TABLE t4; +Table Create Table +t4 CREATE TABLE `t4` ( + `c` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t4; +c +NULL +CREATE TABLE t5 SELECT d FROM t1; +SHOW CREATE TABLE t5; +Table Create Table +t5 CREATE TABLE `t5` ( + `d` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t5; +d +NULL +CREATE TABLE t6 SELECT e FROM t1; +SHOW CREATE TABLE t6; +Table Create Table +t6 CREATE TABLE `t6` ( + `e` datetime DEFAULT '1986-09-27 03:00:00' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t6; +e +1986-09-27 03:00:00 +DROP TABLE t1, t2, t3, t4, t5, t6; +# +# Test of a CREATE TABLE SELECT that also declared columns. In this case +# the function default should be de-activated during the execution of the +# CREATE TABLE statement. +# +# 1970-01-01 03:16:40 +SET TIMESTAMP = 1000.987654; +CREATE TABLE t1 ( a INT ); +INSERT INTO t1 VALUES ( 1 ), ( 2 ); +CREATE TABLE t2 ( b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP) SELECT a FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SET TIMESTAMP = 2000.876543; +INSERT INTO t2( a ) VALUES ( 3 ); +SELECT * FROM t2; +b a +0000-00-00 00:00:00 1 +0000-00-00 00:00:00 2 +1970-01-01 00:33:20 3 +DROP TABLE t1, t2; +# +# Test of updating a view. +# +CREATE TABLE t1 ( a INT, b DATETIME DEFAULT CURRENT_TIMESTAMP ); +CREATE TABLE t2 ( a INT, b DATETIME ON UPDATE CURRENT_TIMESTAMP ); +CREATE VIEW v1 AS SELECT * FROM t1; +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` latin1 latin1_swedish_ci +CREATE VIEW v2 AS SELECT * FROM t2; +SHOW CREATE VIEW v2; +View Create View character_set_client collation_connection +v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `t2`.`a` AS `a`,`t2`.`b` AS `b` from `t2` latin1 latin1_swedish_ci +# 1971-01-31 21:13:57 UTC +SET TIMESTAMP = 34200837.348564; +INSERT INTO v1 ( a ) VALUES ( 1 ); +INSERT INTO v2 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b +1 1971-01-31 20:13:57 +SELECT * FROM v1; +a b +1 1971-01-31 20:13:57 +SELECT * FROM t2; +a b +1 NULL +SELECT * FROM v2; +a b +1 NULL +# 1970-04-11 20:13:57 UTC +SET TIMESTAMP = 8712837.567332; +UPDATE v1 SET a = 2; +UPDATE v2 SET a = 2; +SELECT * FROM t1; +a b +2 1971-01-31 20:13:57 +SELECT * FROM v1; +a b +2 1971-01-31 20:13:57 +SELECT * FROM t2; +a b +2 1970-04-11 20:13:57 +SELECT * FROM v2; +a b +2 1970-04-11 20:13:57 +DROP VIEW v1, v2; +DROP TABLE t1, t2; +# +# Test with stored procedures. +# +CREATE TABLE t1 ( +a INT, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +e TIMESTAMP NULL, +f DATETIME DEFAULT CURRENT_TIMESTAMP, +g DATETIME ON UPDATE CURRENT_TIMESTAMP +); +CREATE PROCEDURE p1() INSERT INTO test.t1( a ) VALUES ( 1 ); +CREATE PROCEDURE p2() UPDATE t1 SET a = 2 WHERE a = 1; +# 1971-01-31 20:13:57 UTC +SET TIMESTAMP = 34200837.876544; +CALL p1(); +SELECT * FROM t1; +a b c d e f g +1 1971-01-31 20:13:57 1971-01-31 20:13:57 0000-00-00 00:00:00 NULL 1971-01-31 20:13:57 NULL +# 1970-04-11 21:13:57 UTC +SET TIMESTAMP = 8712837.143546; +CALL p2(); +SELECT * FROM t1; +a b c d e f g +2 1970-04-11 20:13:57 1971-01-31 20:13:57 1970-04-11 20:13:57 NULL 1971-01-31 20:13:57 1970-04-11 20:13:57 +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP TABLE t1; +# +# Test with triggers. +# +CREATE TABLE t1 ( +a INT, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +e TIMESTAMP NULL, +f DATETIME, +g DATETIME DEFAULT CURRENT_TIMESTAMP, +h DATETIME ON UPDATE CURRENT_TIMESTAMP, +i DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +); +CREATE TABLE t2 ( a INT ); +CREATE TRIGGER t2_trg BEFORE INSERT ON t2 FOR EACH ROW +BEGIN +INSERT INTO t1 ( a ) VALUES ( 1 ); +END| +# 1971-01-31 21:13:57 UTC +SET TIMESTAMP = 34200837.978675; +INSERT INTO t2 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b c d e f g h i +1 1971-01-31 20:13:57 1971-01-31 20:13:57 0000-00-00 00:00:00 NULL NULL 1971-01-31 20:13:57 NULL 1971-01-31 20:13:57 +DROP TRIGGER t2_trg; +CREATE TRIGGER t2_trg BEFORE INSERT ON t2 FOR EACH ROW +BEGIN +UPDATE t1 SET a = 2; +END| +# 1970-04-11 21:13:57 UTC +SET TIMESTAMP = 8712837.456789; +INSERT INTO t2 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b c d e f g h i +2 1970-04-11 20:13:57 1971-01-31 20:13:57 1970-04-11 20:13:57 NULL NULL 1971-01-31 20:13:57 1970-04-11 20:13:57 1970-04-11 20:13:57 +DROP TABLE t1, t2; +# +# Test where the assignment target is not a column. +# +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ); +CREATE TABLE t2 ( a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ); +CREATE TABLE t3 ( a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP ); +CREATE TABLE t4 ( a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP ); +CREATE VIEW v1 AS SELECT a COLLATE latin1_german1_ci AS b FROM t1; +CREATE VIEW v2 ( b ) AS SELECT a COLLATE latin1_german1_ci FROM t2; +CREATE VIEW v3 AS SELECT a COLLATE latin1_german1_ci AS b FROM t3; +CREATE VIEW v4 ( b ) AS SELECT a COLLATE latin1_german1_ci FROM t4; +INSERT INTO v1 ( b ) VALUES ( '2007-10-24 00:03:34.010203' ); +SELECT a FROM t1; +a +2007-10-24 00:03:34 +INSERT INTO v2 ( b ) VALUES ( '2007-10-24 00:03:34.010203' ); +SELECT a FROM t2; +a +2007-10-24 00:03:34 +INSERT INTO t3 VALUES (); +UPDATE v3 SET b = '2007-10-24 00:03:34.010203'; +SELECT a FROM t3; +a +2007-10-24 00:03:34 +INSERT INTO t4 VALUES (); +UPDATE v4 SET b = '2007-10-24 00:03:34.010203'; +SELECT a FROM t4; +a +2007-10-24 00:03:34 +DROP VIEW v1, v2, v3, v4; +DROP TABLE t1, t2, t3, t4; +# +# Test of LOAD DATA/XML INFILE +# This tests behavior of function defaults for TIMESTAMP and DATETIME +# columns. during LOAD ... INFILE. +# As can be seen here, a TIMESTAMP column with only ON UPDATE +# CURRENT_TIMESTAMP will still have CURRENT_TIMESTAMP inserted on LOAD +# ... INFILE if the value is missing. For DATETIME columns a NULL value +# is inserted instead. +# +CREATE TABLE t1 ( +a INT, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +e TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +f DATETIME, +g DATETIME DEFAULT CURRENT_TIMESTAMP, +h DATETIME ON UPDATE CURRENT_TIMESTAMP, +i DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +); +CREATE TABLE t2 ( +a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +c TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, +d TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +e DATETIME NOT NULL, +f DATETIME NOT NULL DEFAULT '1977-01-02 12:13:14', +g DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, +h DATETIME ON UPDATE CURRENT_TIMESTAMP NOT NULL, +i DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL +); +SELECT 1 INTO OUTFILE 't3.dat' FROM dual; +SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL +INTO OUTFILE 't4.dat' +FROM dual; +SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual; +# Mon Aug 1 15:11:19 2011 UTC +SET TIMESTAMP = 1312211479.918273; +LOAD DATA INFILE 't3.dat' INTO TABLE t1; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +SELECT * FROM t1; +a 1 +b 2011-08-01 15:11:19 +c 2011-08-01 15:11:19 +d 2011-08-01 15:11:19 +e 2011-08-01 15:11:19 +f NULL +g NULL +h NULL +i NULL +LOAD DATA INFILE 't4.dat' INTO TABLE t2; +Warnings: +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'e' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'f' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'g' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'h' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'i' at row 1 +SELECT a FROM t2; +a +2011-08-01 15:11:19 +SELECT b FROM t2; +b +2011-08-01 15:11:19 +SELECT c FROM t2; +c +2011-08-01 15:11:19 +SELECT d FROM t2; +d +2011-08-01 15:11:19 +# As shown here, supplying a NULL value to a non-nullable +# column with no default value results in the zero date. +SELECT e FROM t2; +e +0000-00-00 00:00:00 +# As shown here, supplying a NULL value to a non-nullable column with a +# default value results in the zero date. +SELECT f FROM t2; +f +0000-00-00 00:00:00 +# As shown here, supplying a NULL value to a non-nullable column with a +# default function results in the zero date. +SELECT g FROM t2; +g +0000-00-00 00:00:00 +# As shown here, supplying a NULL value to a non-nullable DATETIME ON +# UPDATE CURRENT_TIMESTAMP column with no default value results in the +# zero date. +SELECT h FROM t2; +h +0000-00-00 00:00:00 +SELECT i FROM t2; +i +0000-00-00 00:00:00 +DELETE FROM t1; +DELETE FROM t2; +# Read t3 file into t1 +# The syntax will cause a different code path to be taken +# (read_fixed_length()) than under the LOAD ... INTO TABLE t1 command +# above. The code in this path is copy-pasted code from the path taken +# under the syntax used in the previous LOAD command. +LOAD DATA INFILE 't3.dat' INTO TABLE t1 +FIELDS TERMINATED BY '' ENCLOSED BY ''; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +SELECT b FROM t1; +b +2011-08-01 15:11:19 +SELECT c FROM t1; +c +2011-08-01 15:11:19 +SELECT d FROM t1; +d +2011-08-01 15:11:19 +SELECT e FROM t1; +e +2011-08-01 15:11:19 +# Yes, a missing field cannot be NULL using this syntax, so it will +# zero date instead. Says a comment in read_fixed_length() : "No fields +# specified in fields_vars list can be NULL in this format." +# It appears to be by design. This is inconsistent with LOAD DATA INFILE +# syntax in previous test. +SELECT f FROM t1; +f +0000-00-00 00:00:00 +SELECT g FROM t1; +g +0000-00-00 00:00:00 +# See comment above "SELECT f FROM f1". +SELECT h FROM t1; +h +0000-00-00 00:00:00 +SELECT i FROM t1; +i +0000-00-00 00:00:00 +DELETE FROM t1; +LOAD DATA INFILE 't5.dat' INTO TABLE t1 ( a, @dummy ); +SELECT * FROM t1; +a b c d e f g h i +1 2011-08-01 15:11:19 2011-08-01 15:11:19 0000-00-00 00:00:00 2011-08-01 15:11:19 NULL 2011-08-01 15:11:19 NULL 2011-08-01 15:11:19 +SELECT @dummy; +@dummy +2 +DELETE FROM t1; +LOAD DATA INFILE 't3.dat' INTO TABLE t1 ( a ) SET c = '2005-06-06 08:09:10'; +SELECT * FROM t1; +a b c d e f g h i +1 2011-08-01 15:11:19 2005-06-06 08:09:10 0000-00-00 00:00:00 2011-08-01 15:11:19 NULL 2011-08-01 15:11:19 NULL 2011-08-01 15:11:19 +DELETE FROM t1; +LOAD DATA INFILE 't3.dat' INTO TABLE t1 ( a ) SET g = '2005-06-06 08:09:10'; +SELECT * FROM t1; +a b c d e f g h i +1 2011-08-01 15:11:19 2011-08-01 15:11:19 0000-00-00 00:00:00 2011-08-01 15:11:19 NULL 2005-06-06 08:09:10 NULL 2011-08-01 15:11:19 +DELETE FROM t1; +# Load a static XML file +LOAD XML INFILE '../../std_data/onerow.xml' INTO TABLE t1 +ROWS IDENTIFIED BY '<row>'; +Missing tags are treated as NULL +SELECT * FROM t1; +a 1 +b 2011-08-01 15:11:19 +c 2011-08-01 15:11:19 +d 2011-08-01 15:11:19 +e 2011-08-01 15:11:19 +f NULL +g NULL +h NULL +i NULL +DROP TABLE t1, t2; +# +# Similar LOAD DATA tests in another form +# +# All of this test portion has been run on a pre-WL5874 trunk +# (except that like_b and like_c didn't exist) and all result +# differences are a bug. +# Regarding like_b its definition is the same as b's except +# that the constant default is replaced with a function +# default. Our expectation is that like_b would behave +# like b: if b is set to NULL, or set to 0000-00-00, or set to +# its default, then the same should apply to like_b. Same for +# like_c vs c. +# Mon Aug 1 15:11:19 2011 UTC +SET TIMESTAMP = 1312211479.089786; +SELECT 1 INTO OUTFILE "file1.dat" FROM dual; +SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL +INTO OUTFILE "file2.dat" FROM dual; +# Too short row +CREATE TABLE t1 ( +dummy INT, +a DATETIME NULL DEFAULT NULL, +b DATETIME NULL DEFAULT "2011-11-18", +like_b DATETIME NULL DEFAULT CURRENT_TIMESTAMP, +c DATETIME NOT NULL DEFAULT "2011-11-18", +like_c DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, +d TIMESTAMP NULL DEFAULT "2011-05-03" ON UPDATE CURRENT_TIMESTAMP, +e TIMESTAMP NOT NULL DEFAULT "2011-05-03", +f TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +g TIMESTAMP NULL DEFAULT NULL, +h INT NULL, +i INT NOT NULL DEFAULT 42 +); +# There is no promotion +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `dummy` int(11) DEFAULT NULL, + `a` datetime DEFAULT NULL, + `b` datetime DEFAULT '2011-11-18 00:00:00', + `like_b` datetime DEFAULT CURRENT_TIMESTAMP, + `c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00', + `like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00', + `f` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `g` timestamp NULL DEFAULT NULL, + `h` int(11) DEFAULT NULL, + `i` int(11) NOT NULL DEFAULT '42' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +LOAD DATA INFILE "file1.dat" INTO table t1; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +# It is strange that "like_b" gets NULL when "b" gets 0. But +# this is consistent with how "a" gets NULL when "b" gets 0, +# with how "g" gets NULL when "d" gets 0, and with how "h" gets +# NULL when "i" gets 0. Looks like "DEFAULT +# <non-NULL-constant>" is changed to 0, whereas DEFAULT NULL +# and DEFAULT NOW are changed to NULL. +SELECT * FROM t1; +dummy 1 +a NULL +b 0000-00-00 00:00:00 +like_b NULL +c 0000-00-00 00:00:00 +like_c 0000-00-00 00:00:00 +d 0000-00-00 00:00:00 +e 2011-08-01 15:11:19 +f 2011-08-01 15:11:19 +g NULL +h NULL +i 0 +delete from t1; +alter table t1 +modify f TIMESTAMP NULL default CURRENT_TIMESTAMP; +# There is no promotion +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `dummy` int(11) DEFAULT NULL, + `a` datetime DEFAULT NULL, + `b` datetime DEFAULT '2011-11-18 00:00:00', + `like_b` datetime DEFAULT CURRENT_TIMESTAMP, + `c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00', + `like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00', + `f` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + `g` timestamp NULL DEFAULT NULL, + `h` int(11) DEFAULT NULL, + `i` int(11) NOT NULL DEFAULT '42' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +LOAD DATA INFILE "file1.dat" INTO table t1; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +SELECT * FROM t1; +dummy 1 +a NULL +b 0000-00-00 00:00:00 +like_b NULL +c 0000-00-00 00:00:00 +like_c 0000-00-00 00:00:00 +d 0000-00-00 00:00:00 +e 2011-08-01 15:11:19 +f NULL +g NULL +h NULL +i 0 +delete from t1; +drop table t1; +# Conclusion derived from trunk's results: +# DATETIME DEFAULT <non-NULL-constant> (b,c) gets 0000-00-00, +# DATETIME DEFAULT NULL (a) gets NULL, +# TIMESTAMP NULL DEFAULT <non-NULL-constant> (d) gets 0000-00-00, +# TIMESTAMP NULL DEFAULT NULL (g) gets NULL, +# TIMESTAMP NULL DEFAULT NOW (f after ALTER) gets NULL, +# TIMESTAMP NOT NULL (f before ALTER, e) gets NOW. +### Loading NULL ### +CREATE TABLE t1 ( +dummy INT, +a DATETIME NULL DEFAULT NULL, +b DATETIME NULL DEFAULT "2011-11-18", +like_b DATETIME NULL DEFAULT CURRENT_TIMESTAMP, +c DATETIME NOT NULL DEFAULT "2011-11-18", +like_c DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, +d TIMESTAMP NULL DEFAULT "2011-05-03" ON UPDATE CURRENT_TIMESTAMP, +e TIMESTAMP NOT NULL DEFAULT "2011-05-03", +f TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +g TIMESTAMP NULL DEFAULT NULL, +h INT NULL, +i INT NOT NULL DEFAULT 42 +); +# There is no promotion +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `dummy` int(11) DEFAULT NULL, + `a` datetime DEFAULT NULL, + `b` datetime DEFAULT '2011-11-18 00:00:00', + `like_b` datetime DEFAULT CURRENT_TIMESTAMP, + `c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00', + `like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00', + `f` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `g` timestamp NULL DEFAULT NULL, + `h` int(11) DEFAULT NULL, + `i` int(11) NOT NULL DEFAULT '42' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +LOAD DATA INFILE "file2.dat" INTO table t1; +Warnings: +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'like_c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'i' at row 1 +SELECT * FROM t1; +dummy NULL +a NULL +b NULL +like_b NULL +c 0000-00-00 00:00:00 +like_c 0000-00-00 00:00:00 +d NULL +e 2011-08-01 15:11:19 +f 2011-08-01 15:11:19 +g NULL +h NULL +i 0 +delete from t1; +alter table t1 +modify f TIMESTAMP NULL default CURRENT_TIMESTAMP; +# There is no promotion +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `dummy` int(11) DEFAULT NULL, + `a` datetime DEFAULT NULL, + `b` datetime DEFAULT '2011-11-18 00:00:00', + `like_b` datetime DEFAULT CURRENT_TIMESTAMP, + `c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00', + `like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00', + `f` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + `g` timestamp NULL DEFAULT NULL, + `h` int(11) DEFAULT NULL, + `i` int(11) NOT NULL DEFAULT '42' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +LOAD DATA INFILE "file2.dat" INTO table t1; +Warnings: +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'like_c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'i' at row 1 +SELECT * FROM t1; +dummy NULL +a NULL +b NULL +like_b NULL +c 0000-00-00 00:00:00 +like_c 0000-00-00 00:00:00 +d NULL +e 2011-08-01 15:11:19 +f NULL +g NULL +h NULL +i 0 +delete from t1; +# Conclusion derived from trunk's results: +# DATETIME NULL (a,b) gets NULL, +# DATETIME NOT NULL (c) gets 0000-00-00, +# TIMESTAMP NULL (d,f,g) gets NULL, +# TIMESTAMP NOT NULL (e) gets NOW. +drop table t1; +# +# Test of updatable views with check options. The option can be violated +# using ON UPDATE updates which is very strange as this offers a loophole +# in this integrity check. +# +SET TIME_ZONE = "+03:00"; +# 1970-01-01 03:16:40 +SET TIMESTAMP = 1000.123456; +CREATE TABLE t1 ( a INT, b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +INSERT INTO t1 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b +1 1970-01-01 03:16:40 +CREATE VIEW v1 AS SELECT * FROM t1 WHERE b <= '1970-01-01 03:16:40.123456' +WITH CHECK OPTION; +SELECT * FROM v1; +a b +1 1970-01-01 03:16:40 +# 1970-01-01 03:33:20 +SET TIMESTAMP = 2000.000234; +UPDATE v1 SET a = 2; +ERROR HY000: CHECK OPTION failed 'test.v1' +SELECT * FROM t1; +a b +1 1970-01-01 03:16:40 +DROP VIEW v1; +DROP TABLE t1; +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT '1973-08-14 09:11:22.089786' ON UPDATE CURRENT_TIMESTAMP, +c INT KEY +); +# 1973-08-14 09:11:22 UTC +SET TIMESTAMP = 114167482.534231; +INSERT INTO t1 ( c ) VALUES ( 1 ); +CREATE VIEW v1 AS +SELECT * +FROM t1 +WHERE a >= '1973-08-14 09:11:22' +WITH LOCAL CHECK OPTION; +SELECT * FROM v1; +a c +1973-08-14 09:11:22 1 +SET TIMESTAMP = 1.126789; +INSERT INTO v1 ( c ) VALUES ( 1 ) ON DUPLICATE KEY UPDATE c = 2; +ERROR HY000: CHECK OPTION failed 'test.v1' +SELECT * FROM v1; +a c +1973-08-14 09:11:22 1 +DROP VIEW v1; +DROP TABLE t1; +# +# Bug 13095459 - MULTI-TABLE UPDATE MODIFIES A ROW TWICE +# +CREATE TABLE t1 ( +a INT, +b INT, +ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +PRIMARY KEY ( a, ts ) +); +INSERT INTO t1( a, b, ts ) VALUES ( 1, 0, '2000-09-28 17:44:34' ); +CREATE TABLE t2 ( a INT ); +INSERT INTO t2 VALUES ( 1 ); +UPDATE t1 STRAIGHT_JOIN t2 +SET t1.b = t1.b + 1 +WHERE t1.a = 1 AND t1.ts >= '2000-09-28 00:00:00'; +SELECT b FROM t1; +b +1 +DROP TABLE t1, t2; +# +# Bug#11745578: 17392: ALTER TABLE ADD COLUMN TIMESTAMP DEFAULT +# CURRENT_TIMESTAMP INSERTS ZERO +# +SET timestamp = 1000; +CREATE TABLE t1 ( b INT ); +INSERT INTO t1 VALUES (1); +ALTER TABLE t1 ADD COLUMN a6 DATETIME DEFAULT NOW() ON UPDATE NOW() FIRST; +ALTER TABLE t1 ADD COLUMN a5 DATETIME DEFAULT NOW() FIRST; +ALTER TABLE t1 ADD COLUMN a4 DATETIME ON UPDATE NOW() FIRST; +ALTER TABLE t1 ADD COLUMN a3 TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() FIRST; +ALTER TABLE t1 ADD COLUMN a2 TIMESTAMP NOT NULL DEFAULT NOW() FIRST; +ALTER TABLE t1 ADD COLUMN a1 TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE NOW() FIRST; +ALTER TABLE t1 ADD COLUMN c1 TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE NOW() AFTER b; +ALTER TABLE t1 ADD COLUMN c2 TIMESTAMP NOT NULL DEFAULT NOW() AFTER c1; +ALTER TABLE t1 ADD COLUMN c3 TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() AFTER c2; +ALTER TABLE t1 ADD COLUMN c4 DATETIME ON UPDATE NOW() AFTER c3; +ALTER TABLE t1 ADD COLUMN c5 DATETIME DEFAULT NOW() AFTER c4; +ALTER TABLE t1 ADD COLUMN c6 DATETIME DEFAULT NOW() ON UPDATE NOW() AFTER c5; +SELECT * FROM t1; +a1 0000-00-00 00:00:00 +a2 1970-01-01 03:16:40 +a3 1970-01-01 03:16:40 +a4 NULL +a5 1970-01-01 03:16:40 +a6 1970-01-01 03:16:40 +b 1 +c1 0000-00-00 00:00:00 +c2 1970-01-01 03:16:40 +c3 1970-01-01 03:16:40 +c4 NULL +c5 1970-01-01 03:16:40 +c6 1970-01-01 03:16:40 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE CURRENT_TIMESTAMP, b DATETIME DEFAULT NOW() ); +INSERT INTO t1 VALUES (); +SET timestamp = 1000000000; +ALTER TABLE t1 MODIFY COLUMN a TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP(3); +ALTER TABLE t1 MODIFY COLUMN b DATETIME(3) DEFAULT CURRENT_TIMESTAMP(3); +SELECT * FROM t1; +a b +1970-01-01 03:16:40.000 1970-01-01 03:16:40.000 +DROP TABLE t1; +CREATE TABLE t1 ( +a TIMESTAMP NOT NULL DEFAULT '1999-12-01 11:22:33' ON UPDATE CURRENT_TIMESTAMP, +b DATETIME DEFAULT '1999-12-01 11:22:33' +); +INSERT INTO t1 VALUES (); +ALTER TABLE t1 MODIFY COLUMN a TIMESTAMP DEFAULT NOW(); +ALTER TABLE t1 MODIFY COLUMN b DATETIME DEFAULT NOW(); +INSERT INTO t1 VALUES (); +SELECT * FROM t1; +a b +1999-12-01 11:22:33 1999-12-01 11:22:33 +2001-09-09 04:46:40 2001-09-09 04:46:40 +DROP TABLE t1; +# +# Function defaults run 2. Six digits scale on seconds precision. +# +SET TIME_ZONE = "+00:00"; +# +# Test of errors for column data types that dont support function +# defaults. +# +CREATE TABLE t1( a BIT DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a TINYINT DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a SMALLINT DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a MEDIUMINT DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a INT DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a BIGINT DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a FLOAT DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a DECIMAL DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a DATE DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a TIME DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a YEAR DEFAULT CURRENT_TIMESTAMP(6) ); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1( a BIT ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a TINYINT ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a SMALLINT ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a MEDIUMINT ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a INT ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a BIGINT ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a FLOAT ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a DECIMAL ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a DATE ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a TIME ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +CREATE TABLE t1( a YEAR ON UPDATE CURRENT_TIMESTAMP(6) ); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +# +# Test that the default clause behaves like NOW() regarding time zones. +# +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NULL, +e DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +f DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +g DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +h DATETIME(6) +); +# 2011-09-27 14:11:08 UTC +SET TIMESTAMP = 1317132668.654321; +SET @old_time_zone = @@TIME_ZONE; +SET TIME_ZONE = "+05:00"; +INSERT INTO t1( d, h ) VALUES ( NOW(6), NOW(6) ); +SELECT * FROM t1; +a b c d e f g h +2011-09-27 19:11:08.654321 2011-09-27 19:11:08.654321 0000-00-00 00:00:00.000000 2011-09-27 19:11:08.654321 2011-09-27 19:11:08.654321 2011-09-27 19:11:08.654321 NULL 2011-09-27 19:11:08.654321 +# 1989-05-13 01:02:03 +SET TIMESTAMP = 611017323.543212; +UPDATE t1 SET d = NOW(6), h = NOW(6); +SELECT * FROM t1; +a b c d e f g h +1989-05-13 04:02:03.543212 2011-09-27 19:11:08.654321 1989-05-13 04:02:03.543212 1989-05-13 04:02:03.543212 1989-05-13 04:02:03.543212 2011-09-27 19:11:08.654321 1989-05-13 04:02:03.543212 1989-05-13 04:02:03.543212 +SET TIME_ZONE = @old_time_zone; +DROP TABLE t1; +# +# Test of several TIMESTAMP columns with different function defaults. +# +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +e TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +f INT +); +# 2011-04-19 07:22:02 UTC +SET TIMESTAMP = 1303197722.534231; +INSERT INTO t1 ( f ) VALUES (1); +SELECT * FROM t1; +a b c d e f +2011-04-19 07:22:02.534231 2011-04-19 07:22:02.534231 2011-04-19 07:22:02.534231 0000-00-00 00:00:00.000000 0000-00-00 00:00:00.000000 1 +# 2011-04-19 07:23:18 UTC +SET TIMESTAMP = 1303197798.132435; +UPDATE t1 SET f = 2; +SELECT * FROM t1; +a b c d e f +2011-04-19 07:23:18.132435 2011-04-19 07:23:18.132435 2011-04-19 07:22:02.534231 2011-04-19 07:23:18.132435 2011-04-19 07:23:18.132435 2 +DROP TABLE t1; +# +# Test of inserted values out of order. +# +CREATE TABLE t1 ( +a INT, +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +e TIMESTAMP(6) NULL, +f DATETIME(6), +g DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +h DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +i DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +j INT +); +# 2011-04-19 07:22:02 UTC +SET TIMESTAMP = 1303197722.534231; +INSERT INTO t1 ( j, a ) VALUES ( 1, 1 ); +SELECT * FROM t1; +a b c d e f g h i j +1 2011-04-19 07:22:02.534231 2011-04-19 07:22:02.534231 0000-00-00 00:00:00.000000 NULL NULL 2011-04-19 07:22:02.534231 NULL 2011-04-19 07:22:02.534231 1 +DROP TABLE t1; +# +# Test of ON DUPLICATE KEY UPDATE +# +CREATE TABLE t1 ( +a INT PRIMARY KEY, +b INT, +c TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +e TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +f TIMESTAMP(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765', +g TIMESTAMP(6) NULL, +h DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +i DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +j DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +k DATETIME(6) NULL, +l DATETIME(6) DEFAULT '1986-09-27 03:00:00.098765' +); +# 1977-12-21 23:00:00 UTC +SET TIMESTAMP = 251593200.192837; +INSERT INTO t1(a) VALUES (1) ON DUPLICATE KEY UPDATE b = 2; +SELECT * FROM t1; +a b c d e f g h i j k l +1 NULL 1977-12-21 23:00:00.192837 1977-12-21 23:00:00.192837 0000-00-00 00:00:00.000000 1986-09-27 03:00:00.098765 NULL 1977-12-21 23:00:00.192837 1977-12-21 23:00:00.192837 NULL NULL 1986-09-27 03:00:00.098765 +# 1975-05-21 23:00:00 UTC +SET TIMESTAMP = 169945200.918273; +INSERT INTO t1(a) VALUES (1) ON DUPLICATE KEY UPDATE b = 2; +SELECT * FROM t1; +a b c d e f g h i j k l +1 2 1975-05-21 23:00:00.918273 1977-12-21 23:00:00.192837 1975-05-21 23:00:00.918273 1986-09-27 03:00:00.098765 NULL 1975-05-21 23:00:00.918273 1977-12-21 23:00:00.192837 1975-05-21 23:00:00.918273 NULL 1986-09-27 03:00:00.098765 +# 1973-08-14 09:11:22 UTC +SET TIMESTAMP = 114167482.534231; +INSERT INTO t1(a) VALUES (2) ON DUPLICATE KEY UPDATE b = 2; +SELECT * FROM t1; +a b c d e f g h i j k l +1 2 1975-05-21 23:00:00.918273 1977-12-21 23:00:00.192837 1975-05-21 23:00:00.918273 1986-09-27 03:00:00.098765 NULL 1975-05-21 23:00:00.918273 1977-12-21 23:00:00.192837 1975-05-21 23:00:00.918273 NULL 1986-09-27 03:00:00.098765 +2 NULL 1973-08-14 09:11:22.534231 1973-08-14 09:11:22.534231 0000-00-00 00:00:00.000000 1986-09-27 03:00:00.098765 NULL 1973-08-14 09:11:22.534231 1973-08-14 09:11:22.534231 NULL NULL 1986-09-27 03:00:00.098765 +DROP TABLE t1; +CREATE TABLE t1 ( a INT PRIMARY KEY, b INT, c TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) ); +# 2011-04-19 07:23:18 UTC +SET TIMESTAMP = 1303197798.945156; +INSERT INTO t1 VALUES +(1, 0, '2001-01-01 01:01:01.111111'), +(2, 0, '2002-02-02 02:02:02.222222'), +(3, 0, '2003-03-03 03:03:03.333333'); +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01.111111 +2 0 2002-02-02 02:02:02.222222 +3 0 2003-03-03 03:03:03.333333 +UPDATE t1 SET b = 2, c = c WHERE a = 2; +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01.111111 +2 2 2002-02-02 02:02:02.222222 +3 0 2003-03-03 03:03:03.333333 +INSERT INTO t1 (a) VALUES (4); +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01.111111 +2 2 2002-02-02 02:02:02.222222 +3 0 2003-03-03 03:03:03.333333 +4 NULL 2011-04-19 07:23:18.945156 +UPDATE t1 SET c = '2004-04-04 04:04:04.444444' WHERE a = 4; +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01.111111 +2 2 2002-02-02 02:02:02.222222 +3 0 2003-03-03 03:03:03.333333 +4 NULL 2004-04-04 04:04:04.444444 +INSERT INTO t1 ( a ) VALUES ( 3 ), ( 5 ) ON DUPLICATE KEY UPDATE b = 3, c = c; +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01.111111 +2 2 2002-02-02 02:02:02.222222 +3 3 2003-03-03 03:03:03.333333 +4 NULL 2004-04-04 04:04:04.444444 +5 NULL 2011-04-19 07:23:18.945156 +INSERT INTO t1 (a, c) VALUES +(4, '2004-04-04 00:00:00.444444'), +(6, '2006-06-06 06:06:06.666666') +ON DUPLICATE KEY UPDATE b = 4; +SELECT * FROM t1; +a b c +1 0 2001-01-01 01:01:01.111111 +2 2 2002-02-02 02:02:02.222222 +3 3 2003-03-03 03:03:03.333333 +4 4 2011-04-19 07:23:18.945156 +5 NULL 2011-04-19 07:23:18.945156 +6 NULL 2006-06-06 06:06:06.666666 +DROP TABLE t1; +# +# Test of REPLACE INTO executed as UPDATE. +# +CREATE TABLE t1 ( +a INT PRIMARY KEY, +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +c DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +e DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +f TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +g DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +h TIMESTAMP(6) NULL, +i DATETIME(6) +); +# 1970-09-21 09:11:12 UTC +SET TIMESTAMP = 22756272.163584; +REPLACE INTO t1 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b c d e f g h i +1 1970-09-21 09:11:12.163584 1970-09-21 09:11:12.163584 1970-09-21 09:11:12.163584 1970-09-21 09:11:12.163584 0000-00-00 00:00:00.000000 NULL NULL NULL +# 1970-11-10 14:16:17 UTC +SET TIMESTAMP = 27094577.852954; +REPLACE INTO t1 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b c d e f g h i +1 1970-11-10 14:16:17.852954 1970-11-10 14:16:17.852954 1970-11-10 14:16:17.852954 1970-11-10 14:16:17.852954 0000-00-00 00:00:00.000000 NULL NULL NULL +DROP TABLE t1; +# +# Test of insertion of NULL, DEFAULT and an empty row for DEFAULT +# CURRENT_TIMESTAMP. +# +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +c INT +); +# 2011-04-20 09:53:41 UTC +SET TIMESTAMP = 1303293221.163578; +INSERT INTO t1 VALUES (NULL, NULL, 1), (DEFAULT, DEFAULT, 2); +INSERT INTO t1 ( a, b, c ) VALUES (NULL, NULL, 3), (DEFAULT, DEFAULT, 4); +SELECT * FROM t1; +a b c +2011-04-20 09:53:41.163578 NULL 1 +2011-04-20 09:53:41.163578 2011-04-20 09:53:41.163578 2 +2011-04-20 09:53:41.163578 NULL 3 +2011-04-20 09:53:41.163578 2011-04-20 09:53:41.163578 4 +SET TIME_ZONE = "+03:00"; +SELECT * FROM t1; +a b c +2011-04-20 12:53:41.163578 NULL 1 +2011-04-20 12:53:41.163578 2011-04-20 09:53:41.163578 2 +2011-04-20 12:53:41.163578 NULL 3 +2011-04-20 12:53:41.163578 2011-04-20 09:53:41.163578 4 +SET TIME_ZONE = "+00:00"; +DROP TABLE t1; +# 2011-04-20 07:05:39 UTC +SET TIMESTAMP = 1303283139.195624; +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT '2010-10-11 12:34:56' ON UPDATE CURRENT_TIMESTAMP(6), +b DATETIME(6) DEFAULT '2010-10-11 12:34:56' +); +INSERT INTO t1 VALUES (NULL, NULL), (DEFAULT, DEFAULT); +INSERT INTO t1 ( a, b ) VALUES (NULL, NULL), (DEFAULT, DEFAULT); +SELECT * FROM t1; +a b +2011-04-20 07:05:39.195624 NULL +2010-10-11 12:34:56.000000 2010-10-11 12:34:56.000000 +2011-04-20 07:05:39.195624 NULL +2010-10-11 12:34:56.000000 2010-10-11 12:34:56.000000 +DROP TABLE t1; +# 2011-04-20 09:53:41 UTC +SET TIMESTAMP = 1303293221.136952; +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765', +e TIMESTAMP(6) NULL, +f DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +g DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +h DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +i DATETIME(6) NULL, +j DATETIME(6) DEFAULT '1986-09-27 03:00:00.098765' +); +INSERT INTO t1 VALUES (); +INSERT INTO t1 SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL; +SELECT * FROM t1; +a b c d e f g h i j +2011-04-20 09:53:41.136952 2011-04-20 09:53:41.136952 0000-00-00 00:00:00.000000 1986-09-27 03:00:00.098765 NULL 2011-04-20 09:53:41.136952 2011-04-20 09:53:41.136952 NULL NULL 1986-09-27 03:00:00.098765 +2011-04-20 09:53:41.136952 2011-04-20 09:53:41.136952 2011-04-20 09:53:41.136952 2011-04-20 09:53:41.136952 NULL NULL NULL NULL NULL NULL +DROP TABLE t1; +# +# Test of multiple-table UPDATE for DEFAULT CURRENT_TIMESTAMP +# +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +c INT +); +INSERT INTO t1 ( c ) VALUES (1); +SELECT * FROM t1; +a b c +2011-04-20 09:53:41.136952 2011-04-20 09:53:41.136952 1 +# 2011-04-20 17:06:13 UTC +SET TIMESTAMP = 1303311973.163587; +UPDATE t1 t11, t1 t12 SET t11.c = 1; +SELECT * FROM t1; +a b c +2011-04-20 09:53:41.136952 2011-04-20 09:53:41.136952 1 +UPDATE t1 t11, t1 t12 SET t11.c = 2; +SELECT * FROM t1; +a b c +2011-04-20 15:06:13.163587 2011-04-20 09:53:41.136952 2 +DROP TABLE t1; +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +b TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +c DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +d DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +e INT +); +CREATE TABLE t2 ( +f INT, +g DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +h DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +i TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +j TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) +); +# 1995-03-11 00:02:03 UTC +SET TIMESTAMP = 794880123.195676; +INSERT INTO t1 ( e ) VALUES ( 1 ), ( 2 ); +INSERT INTO t2 ( f ) VALUES ( 1 ), ( 2 ); +SELECT * FROM t1; +a b c d e +1995-03-11 00:02:03.195676 0000-00-00 00:00:00.000000 1995-03-11 00:02:03.195676 NULL 1 +1995-03-11 00:02:03.195676 0000-00-00 00:00:00.000000 1995-03-11 00:02:03.195676 NULL 2 +SELECT * FROM t2; +f g h i j +1 NULL 1995-03-11 00:02:03.195676 0000-00-00 00:00:00.000000 1995-03-11 00:02:03.195676 +2 NULL 1995-03-11 00:02:03.195676 0000-00-00 00:00:00.000000 1995-03-11 00:02:03.195676 +# 1980-12-13 02:02:01 UTC +SET TIMESTAMP = 345520921.196755; +UPDATE t1, t2 SET t1.e = 3, t2.f = 4; +SELECT * FROM t1; +a b c d e +1995-03-11 00:02:03.195676 1980-12-13 02:02:01.196755 1995-03-11 00:02:03.195676 1980-12-13 02:02:01.196755 3 +1995-03-11 00:02:03.195676 1980-12-13 02:02:01.196755 1995-03-11 00:02:03.195676 1980-12-13 02:02:01.196755 3 +SELECT * FROM t2; +f g h i j +4 1980-12-13 02:02:01.196755 1995-03-11 00:02:03.195676 1980-12-13 02:02:01.196755 1995-03-11 00:02:03.195676 +4 1980-12-13 02:02:01.196755 1995-03-11 00:02:03.195676 1980-12-13 02:02:01.196755 1995-03-11 00:02:03.195676 +DROP TABLE t1, t2; +# +# Test of multiple table update with temporary table and on the fly. +# +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +b DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +c INT, +d INT +); +CREATE TABLE t2 ( +a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +b DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +c INT KEY, +d INT +); +INSERT INTO t1 ( c ) VALUES (1), (2); +INSERT INTO t2 ( c ) VALUES (1), (2); +# Test of multiple table update done on the fly +# 2011-04-20 15:06:13 UTC +SET TIMESTAMP = 1303311973.194685; +UPDATE t1 JOIN t2 USING ( c ) SET t2.d = 1; +SELECT * FROM t1; +a b c d +0000-00-00 00:00:00.000000 NULL 1 NULL +0000-00-00 00:00:00.000000 NULL 2 NULL +SELECT * FROM t2; +a b c d +2011-04-20 15:06:13.194685 2011-04-20 15:06:13.194685 1 1 +2011-04-20 15:06:13.194685 2011-04-20 15:06:13.194685 2 1 +# Test of multiple table update done with temporary table. +# 1979-01-15 03:02:01 +SET TIMESTAMP = 285213721.134679; +UPDATE t1 JOIN t2 USING ( c ) SET t1.d = 1; +SELECT * FROM t1; +a b c d +1979-01-15 02:02:01.134679 1979-01-15 02:02:01.134679 1 1 +1979-01-15 02:02:01.134679 1979-01-15 02:02:01.134679 2 1 +SELECT * FROM t2; +a b c d +2011-04-20 15:06:13.194685 2011-04-20 15:06:13.194685 1 1 +2011-04-20 15:06:13.194685 2011-04-20 15:06:13.194685 2 1 +DROP TABLE t1, t2; +# +# Test of ON UPDATE CURRENT_TIMESTAMP. +# +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +b DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +c INT +); +# 2011-04-20 09:53:41 UTC +SET TIMESTAMP = 1303293221.794613; +INSERT INTO t1 ( c ) VALUES ( 1 ); +SELECT * FROM t1; +a b c +0000-00-00 00:00:00.000000 NULL 1 +UPDATE t1 SET c = 1; +SELECT * FROM t1; +a b c +0000-00-00 00:00:00.000000 NULL 1 +UPDATE t1 SET c = 2; +SELECT * FROM t1; +a b c +2011-04-20 09:53:41.794613 2011-04-20 09:53:41.794613 2 +# +# Test that ON UPDATE CURRENT_TIMESTAMP works after non-changing UPDATE. +# +# 2011-04-20 09:54:13 UTC +SET TIMESTAMP = 1303293253.794613; +UPDATE t1 SET c = 2, b = '2011-04-20 09:53:41.794613'; +SELECT * FROM t1; +a b c +2011-04-20 09:53:41.794613 2011-04-20 09:53:41.794613 2 +UPDATE t1 SET c = 3; +SELECT * FROM t1; +a b c +2011-04-20 09:54:13.794613 2011-04-20 09:54:13.794613 3 +# +# Test of multiple-table UPDATE for ON UPDATE CURRENT_TIMESTAMP +# +# 2011-04-20 15:06:13 UTC +SET TIMESTAMP = 1303311973.534231; +UPDATE t1 t11, t1 t12 SET t11.c = 3; +SELECT * FROM t1; +a b c +2011-04-20 09:54:13.794613 2011-04-20 09:54:13.794613 3 +UPDATE t1 t11, t1 t12 SET t11.c = 2; +SELECT * FROM t1; +a b c +2011-04-20 15:06:13.534231 2011-04-20 15:06:13.534231 2 +DROP TABLE t1; +# +# Test of a multiple-table update where only one table is updated and +# the updated table has a primary key. +# +CREATE TABLE t1 ( a INT, b INT, PRIMARY KEY (a) ); +INSERT INTO t1 VALUES (1, 1),(2, 2),(3, 3),(4, 4); +CREATE TABLE t2 ( a INT, b INT ); +INSERT INTO t2 VALUES (1, 1),(2, 2),(3, 3),(4, 4),(5, 5); +UPDATE t1, t2 SET t1.b = 100 WHERE t1.a = t2.a; +SELECT * FROM t1; +a b +1 100 +2 100 +3 100 +4 100 +SELECT * FROM t2; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +DROP TABLE t1, t2; +# +# Test of ALTER TABLE, reordering columns. +# +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), b INT ); +ALTER TABLE t1 MODIFY a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` int(11) DEFAULT NULL, + `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), c TIMESTAMP(6) NULL ); +ALTER TABLE t1 MODIFY b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `a` int(11) DEFAULT NULL, + `c` timestamp(6) NULL DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NULL ); +ALTER TABLE t1 MODIFY b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), b TIMESTAMP(6) NULL ); +ALTER TABLE t1 MODIFY a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` timestamp(6) NULL DEFAULT NULL, + `a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), b TIMESTAMP(6) NULL ); +ALTER TABLE t1 MODIFY a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` timestamp(6) NULL DEFAULT NULL, + `a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE NOW(6), b INT, c TIMESTAMP(6) NULL ); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6), + `b` int(11) DEFAULT NULL, + `c` timestamp(6) NULL DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +ALTER TABLE t1 MODIFY a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` int(11) DEFAULT NULL, + `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `c` timestamp(6) NULL DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE NOW(6), b INT, c TIMESTAMP(6) NULL ); +ALTER TABLE t1 MODIFY c TIMESTAMP(6) NULL FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` timestamp(6) NULL DEFAULT NULL, + `a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6), + `b` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT NOW(6) ON UPDATE CURRENT_TIMESTAMP(6), b INT, c TIMESTAMP(6) NULL ); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `b` int(11) DEFAULT NULL, + `c` timestamp(6) NULL DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +ALTER TABLE t1 MODIFY a TIMESTAMP(6) NOT NULL DEFAULT NOW(6) ON UPDATE CURRENT_TIMESTAMP(6) AFTER b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` int(11) DEFAULT NULL, + `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `c` timestamp(6) NULL DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT NOW(6) ON UPDATE CURRENT_TIMESTAMP(6), b INT, c TIMESTAMP(6) NULL ); +ALTER TABLE t1 MODIFY c TIMESTAMP(6) NULL FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` timestamp(6) NULL DEFAULT NULL, + `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `b` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +# +# Test of ALTER TABLE, adding columns. +# +CREATE TABLE t1 ( a INT ); +ALTER TABLE t1 ADD COLUMN b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +# +# Test of INSERT SELECT. +# +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +c DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +d DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +); +CREATE TABLE t2 ( +placeholder1 INT, +placeholder2 INT, +placeholder3 INT, +placeholder4 INT, +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00', +c DATETIME(6), +d DATETIME(6) +); +# 1977-08-16 15:30:01 UTC +SET TIMESTAMP = 240589801.654312; +INSERT INTO t2 (a, b, c, d) VALUES ( +'1977-08-16 15:30:01.123456', +'1977-08-16 15:30:01.234567', +'1977-08-16 15:30:01.345678', +'1977-08-16 15:30:01.456789' +); +# 1986-09-27 01:00:00 UTC +SET TIMESTAMP = 528166800.132435; +INSERT INTO t1 ( a, c ) SELECT a, c FROM t2; +SELECT * FROM t1; +a b c d +1977-08-16 15:30:01.123456 1986-09-27 01:00:00.132435 1977-08-16 15:30:01.345678 1986-09-27 01:00:00.132435 +DROP TABLE t1, t2; +# +# Test of CREATE TABLE SELECT. +# +# We test that the columns of the source table are not used to determine +# function defaults for the receiving table. +# +# 1970-04-11 20:13:57 UTC +SET TIMESTAMP = 8712837.657898; +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765', +e TIMESTAMP(6) NULL, +f DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +g DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +h DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +i DATETIME(6) NULL, +j DATETIME(6) DEFAULT '1986-09-27 03:00:00.098765' +); +INSERT INTO t1 VALUES (); +# 1971-01-31 21:13:57 UTC +SET TIMESTAMP = 34200837.164937; +CREATE TABLE t2 SELECT a FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t2; +a +1970-04-11 20:13:57.657897 +CREATE TABLE t3 SELECT b FROM t1; +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t3; +b +1970-04-11 20:13:57.657897 +CREATE TABLE t4 SELECT c FROM t1; +SHOW CREATE TABLE t4; +Table Create Table +t4 CREATE TABLE `t4` ( + `c` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t4; +c +0000-00-00 00:00:00.000000 +CREATE TABLE t5 SELECT d FROM t1; +SHOW CREATE TABLE t5; +Table Create Table +t5 CREATE TABLE `t5` ( + `d` timestamp(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t5; +d +1986-09-27 03:00:00.098765 +CREATE TABLE t6 SELECT e FROM t1; +SHOW CREATE TABLE t6; +Table Create Table +t6 CREATE TABLE `t6` ( + `e` timestamp(6) NULL DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t6; +e +NULL +CREATE TABLE t7 SELECT f FROM t1; +SHOW CREATE TABLE t7; +Table Create Table +t7 CREATE TABLE `t7` ( + `f` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t7; +f +1970-04-11 20:13:57.657897 +CREATE TABLE t8 SELECT g FROM t1; +SHOW CREATE TABLE t8; +Table Create Table +t8 CREATE TABLE `t8` ( + `g` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t8; +g +1970-04-11 20:13:57.657897 +CREATE TABLE t9 SELECT h FROM t1; +SHOW CREATE TABLE t9; +Table Create Table +t9 CREATE TABLE `t9` ( + `h` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t9; +h +NULL +CREATE TABLE t10 SELECT i FROM t1; +SHOW CREATE TABLE t10; +Table Create Table +t10 CREATE TABLE `t10` ( + `i` datetime(6) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t10; +i +NULL +CREATE TABLE t11 SELECT j FROM t1; +SHOW CREATE TABLE t11; +Table Create Table +t11 CREATE TABLE `t11` ( + `j` datetime(6) DEFAULT '1986-09-27 03:00:00.098765' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t11; +j +1986-09-27 03:00:00.098765 +CREATE TABLE t12 ( +k TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +l TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +m TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +n TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +o TIMESTAMP(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765', +p TIMESTAMP(6) NULL, +q DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +r DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +s DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +t DATETIME(6) NULL, +u DATETIME(6) DEFAULT '1986-09-27 03:00:00.098765' +) +SELECT * FROM t1; +SHOW CREATE TABLE t12; +Table Create Table +t12 CREATE TABLE `t12` ( + `k` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `l` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `m` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `n` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6), + `o` timestamp(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765', + `p` timestamp(6) NULL DEFAULT NULL, + `q` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `r` datetime(6) DEFAULT CURRENT_TIMESTAMP(6), + `s` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6), + `t` datetime(6) DEFAULT NULL, + `u` datetime(6) DEFAULT '1986-09-27 03:00:00.098765', + `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `c` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6), + `d` timestamp(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765', + `e` timestamp(6) NULL DEFAULT NULL, + `f` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `g` datetime(6) DEFAULT CURRENT_TIMESTAMP(6), + `h` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6), + `i` datetime(6) DEFAULT NULL, + `j` datetime(6) DEFAULT '1986-09-27 03:00:00.098765' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12; +# 1970-04-11 20:13:57 UTC +SET TIMESTAMP = 8712837.164953; +CREATE TABLE t1 ( +a DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +c DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +d DATETIME(6) NULL, +e DATETIME(6) DEFAULT '1986-09-27 03:00:00.098765' +); +INSERT INTO t1 VALUES (); +# 1971-01-31 20:13:57 UTC +SET TIMESTAMP = 34200837.915736; +CREATE TABLE t2 SELECT a FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t2; +a +1970-04-11 20:13:57.164953 +CREATE TABLE t3 SELECT b FROM t1; +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t3; +b +1970-04-11 20:13:57.164953 +CREATE TABLE t4 SELECT c FROM t1; +SHOW CREATE TABLE t4; +Table Create Table +t4 CREATE TABLE `t4` ( + `c` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t4; +c +NULL +CREATE TABLE t5 SELECT d FROM t1; +SHOW CREATE TABLE t5; +Table Create Table +t5 CREATE TABLE `t5` ( + `d` datetime(6) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t5; +d +NULL +CREATE TABLE t6 SELECT e FROM t1; +SHOW CREATE TABLE t6; +Table Create Table +t6 CREATE TABLE `t6` ( + `e` datetime(6) DEFAULT '1986-09-27 03:00:00.098765' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t6; +e +1986-09-27 03:00:00.098765 +DROP TABLE t1, t2, t3, t4, t5, t6; +# +# Test of a CREATE TABLE SELECT that also declared columns. In this case +# the function default should be de-activated during the execution of the +# CREATE TABLE statement. +# +# 1970-01-01 03:16:40 +SET TIMESTAMP = 1000.987654; +CREATE TABLE t1 ( a INT ); +INSERT INTO t1 VALUES ( 1 ), ( 2 ); +CREATE TABLE t2 ( b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)) SELECT a FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SET TIMESTAMP = 2000.876543; +INSERT INTO t2( a ) VALUES ( 3 ); +SELECT * FROM t2; +b a +0000-00-00 00:00:00.000000 1 +0000-00-00 00:00:00.000000 2 +1970-01-01 00:33:20.876543 3 +DROP TABLE t1, t2; +# +# Test of updating a view. +# +CREATE TABLE t1 ( a INT, b DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE TABLE t2 ( a INT, b DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE VIEW v1 AS SELECT * FROM t1; +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` latin1 latin1_swedish_ci +CREATE VIEW v2 AS SELECT * FROM t2; +SHOW CREATE VIEW v2; +View Create View character_set_client collation_connection +v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `t2`.`a` AS `a`,`t2`.`b` AS `b` from `t2` latin1 latin1_swedish_ci +# 1971-01-31 21:13:57 UTC +SET TIMESTAMP = 34200837.348564; +INSERT INTO v1 ( a ) VALUES ( 1 ); +INSERT INTO v2 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b +1 1971-01-31 20:13:57.348564 +SELECT * FROM v1; +a b +1 1971-01-31 20:13:57.348564 +SELECT * FROM t2; +a b +1 NULL +SELECT * FROM v2; +a b +1 NULL +# 1970-04-11 20:13:57 UTC +SET TIMESTAMP = 8712837.567332; +UPDATE v1 SET a = 2; +UPDATE v2 SET a = 2; +SELECT * FROM t1; +a b +2 1971-01-31 20:13:57.348564 +SELECT * FROM v1; +a b +2 1971-01-31 20:13:57.348564 +SELECT * FROM t2; +a b +2 1970-04-11 20:13:57.567332 +SELECT * FROM v2; +a b +2 1970-04-11 20:13:57.567332 +DROP VIEW v1, v2; +DROP TABLE t1, t2; +# +# Test with stored procedures. +# +CREATE TABLE t1 ( +a INT, +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +e TIMESTAMP(6) NULL, +f DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +g DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6) +); +CREATE PROCEDURE p1() INSERT INTO test.t1( a ) VALUES ( 1 ); +CREATE PROCEDURE p2() UPDATE t1 SET a = 2 WHERE a = 1; +# 1971-01-31 20:13:57 UTC +SET TIMESTAMP = 34200837.876544; +CALL p1(); +SELECT * FROM t1; +a b c d e f g +1 1971-01-31 20:13:57.876544 1971-01-31 20:13:57.876544 0000-00-00 00:00:00.000000 NULL 1971-01-31 20:13:57.876544 NULL +# 1970-04-11 21:13:57 UTC +SET TIMESTAMP = 8712837.143546; +CALL p2(); +SELECT * FROM t1; +a b c d e f g +2 1970-04-11 20:13:57.143546 1971-01-31 20:13:57.876544 1970-04-11 20:13:57.143546 NULL 1971-01-31 20:13:57.876544 1970-04-11 20:13:57.143546 +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP TABLE t1; +# +# Test with triggers. +# +CREATE TABLE t1 ( +a INT, +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +e TIMESTAMP(6) NULL, +f DATETIME(6), +g DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +h DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +i DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +); +CREATE TABLE t2 ( a INT ); +CREATE TRIGGER t2_trg BEFORE INSERT ON t2 FOR EACH ROW +BEGIN +INSERT INTO t1 ( a ) VALUES ( 1 ); +END| +# 1971-01-31 21:13:57 UTC +SET TIMESTAMP = 34200837.978675; +INSERT INTO t2 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b c d e f g h i +1 1971-01-31 20:13:57.978675 1971-01-31 20:13:57.978675 0000-00-00 00:00:00.000000 NULL NULL 1971-01-31 20:13:57.978675 NULL 1971-01-31 20:13:57.978675 +DROP TRIGGER t2_trg; +CREATE TRIGGER t2_trg BEFORE INSERT ON t2 FOR EACH ROW +BEGIN +UPDATE t1 SET a = 2; +END| +# 1970-04-11 21:13:57 UTC +SET TIMESTAMP = 8712837.456789; +INSERT INTO t2 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b c d e f g h i +2 1970-04-11 20:13:57.456789 1971-01-31 20:13:57.978675 1970-04-11 20:13:57.456789 NULL NULL 1971-01-31 20:13:57.978675 1970-04-11 20:13:57.456789 1970-04-11 20:13:57.456789 +DROP TABLE t1, t2; +# +# Test where the assignment target is not a column. +# +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE TABLE t2 ( a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE TABLE t3 ( a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE TABLE t4 ( a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE VIEW v1 AS SELECT a COLLATE latin1_german1_ci AS b FROM t1; +CREATE VIEW v2 ( b ) AS SELECT a COLLATE latin1_german1_ci FROM t2; +CREATE VIEW v3 AS SELECT a COLLATE latin1_german1_ci AS b FROM t3; +CREATE VIEW v4 ( b ) AS SELECT a COLLATE latin1_german1_ci FROM t4; +INSERT INTO v1 ( b ) VALUES ( '2007-10-24 00:03:34.010203' ); +SELECT a FROM t1; +a +2007-10-24 00:03:34.010203 +INSERT INTO v2 ( b ) VALUES ( '2007-10-24 00:03:34.010203' ); +SELECT a FROM t2; +a +2007-10-24 00:03:34.010203 +INSERT INTO t3 VALUES (); +UPDATE v3 SET b = '2007-10-24 00:03:34.010203'; +SELECT a FROM t3; +a +2007-10-24 00:03:34.010203 +INSERT INTO t4 VALUES (); +UPDATE v4 SET b = '2007-10-24 00:03:34.010203'; +SELECT a FROM t4; +a +2007-10-24 00:03:34.010203 +DROP VIEW v1, v2, v3, v4; +DROP TABLE t1, t2, t3, t4; +# +# Test of LOAD DATA/XML INFILE +# This tests behavior of function defaults for TIMESTAMP and DATETIME +# columns. during LOAD ... INFILE. +# As can be seen here, a TIMESTAMP column with only ON UPDATE +# CURRENT_TIMESTAMP will still have CURRENT_TIMESTAMP inserted on LOAD +# ... INFILE if the value is missing. For DATETIME columns a NULL value +# is inserted instead. +# +CREATE TABLE t1 ( +a INT, +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +e TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +f DATETIME(6), +g DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6), +h DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6), +i DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +); +CREATE TABLE t2 ( +a TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +c TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +e DATETIME(6) NOT NULL, +f DATETIME(6) NOT NULL DEFAULT '1977-01-02 12:13:14', +g DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) NOT NULL, +h DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6) NOT NULL, +i DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) NOT NULL +); +SELECT 1 INTO OUTFILE 't3.dat' FROM dual; +SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL +INTO OUTFILE 't4.dat' +FROM dual; +SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual; +# Mon Aug 1 15:11:19 2011 UTC +SET TIMESTAMP = 1312211479.918273; +LOAD DATA INFILE 't3.dat' INTO TABLE t1; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +SELECT * FROM t1; +a 1 +b 2011-08-01 15:11:19.918273 +c 2011-08-01 15:11:19.918273 +d 2011-08-01 15:11:19.918273 +e 2011-08-01 15:11:19.918273 +f NULL +g NULL +h NULL +i NULL +LOAD DATA INFILE 't4.dat' INTO TABLE t2; +Warnings: +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'e' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'f' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'g' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'h' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'i' at row 1 +SELECT a FROM t2; +a +2011-08-01 15:11:19.918273 +SELECT b FROM t2; +b +2011-08-01 15:11:19.918273 +SELECT c FROM t2; +c +2011-08-01 15:11:19.918273 +SELECT d FROM t2; +d +2011-08-01 15:11:19.918273 +# As shown here, supplying a NULL value to a non-nullable +# column with no default value results in the zero date. +SELECT e FROM t2; +e +0000-00-00 00:00:00.000000 +# As shown here, supplying a NULL value to a non-nullable column with a +# default value results in the zero date. +SELECT f FROM t2; +f +0000-00-00 00:00:00.000000 +# As shown here, supplying a NULL value to a non-nullable column with a +# default function results in the zero date. +SELECT g FROM t2; +g +0000-00-00 00:00:00.000000 +# As shown here, supplying a NULL value to a non-nullable DATETIME ON +# UPDATE CURRENT_TIMESTAMP column with no default value results in the +# zero date. +SELECT h FROM t2; +h +0000-00-00 00:00:00.000000 +SELECT i FROM t2; +i +0000-00-00 00:00:00.000000 +DELETE FROM t1; +DELETE FROM t2; +# Read t3 file into t1 +# The syntax will cause a different code path to be taken +# (read_fixed_length()) than under the LOAD ... INTO TABLE t1 command +# above. The code in this path is copy-pasted code from the path taken +# under the syntax used in the previous LOAD command. +LOAD DATA INFILE 't3.dat' INTO TABLE t1 +FIELDS TERMINATED BY '' ENCLOSED BY ''; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +SELECT b FROM t1; +b +2011-08-01 15:11:19.918273 +SELECT c FROM t1; +c +2011-08-01 15:11:19.918273 +SELECT d FROM t1; +d +2011-08-01 15:11:19.918273 +SELECT e FROM t1; +e +2011-08-01 15:11:19.918273 +# Yes, a missing field cannot be NULL using this syntax, so it will +# zero date instead. Says a comment in read_fixed_length() : "No fields +# specified in fields_vars list can be NULL in this format." +# It appears to be by design. This is inconsistent with LOAD DATA INFILE +# syntax in previous test. +SELECT f FROM t1; +f +0000-00-00 00:00:00.000000 +SELECT g FROM t1; +g +0000-00-00 00:00:00.000000 +# See comment above "SELECT f FROM f1". +SELECT h FROM t1; +h +0000-00-00 00:00:00.000000 +SELECT i FROM t1; +i +0000-00-00 00:00:00.000000 +DELETE FROM t1; +LOAD DATA INFILE 't5.dat' INTO TABLE t1 ( a, @dummy ); +SELECT * FROM t1; +a b c d e f g h i +1 2011-08-01 15:11:19.918273 2011-08-01 15:11:19.918273 0000-00-00 00:00:00.000000 2011-08-01 15:11:19.918273 NULL 2011-08-01 15:11:19.918273 NULL 2011-08-01 15:11:19.918273 +SELECT @dummy; +@dummy +2 +DELETE FROM t1; +LOAD DATA INFILE 't3.dat' INTO TABLE t1 ( a ) SET c = '2005-06-06 08:09:10'; +SELECT * FROM t1; +a b c d e f g h i +1 2011-08-01 15:11:19.918273 2005-06-06 08:09:10.000000 0000-00-00 00:00:00.000000 2011-08-01 15:11:19.918273 NULL 2011-08-01 15:11:19.918273 NULL 2011-08-01 15:11:19.918273 +DELETE FROM t1; +LOAD DATA INFILE 't3.dat' INTO TABLE t1 ( a ) SET g = '2005-06-06 08:09:10'; +SELECT * FROM t1; +a b c d e f g h i +1 2011-08-01 15:11:19.918273 2011-08-01 15:11:19.918273 0000-00-00 00:00:00.000000 2011-08-01 15:11:19.918273 NULL 2005-06-06 08:09:10.000000 NULL 2011-08-01 15:11:19.918273 +DELETE FROM t1; +# Load a static XML file +LOAD XML INFILE '../../std_data/onerow.xml' INTO TABLE t1 +ROWS IDENTIFIED BY '<row>'; +Missing tags are treated as NULL +SELECT * FROM t1; +a 1 +b 2011-08-01 15:11:19.918273 +c 2011-08-01 15:11:19.918273 +d 2011-08-01 15:11:19.918273 +e 2011-08-01 15:11:19.918273 +f NULL +g NULL +h NULL +i NULL +DROP TABLE t1, t2; +# +# Similar LOAD DATA tests in another form +# +# All of this test portion has been run on a pre-WL5874 trunk +# (except that like_b and like_c didn't exist) and all result +# differences are a bug. +# Regarding like_b its definition is the same as b's except +# that the constant default is replaced with a function +# default. Our expectation is that like_b would behave +# like b: if b is set to NULL, or set to 0000-00-00, or set to +# its default, then the same should apply to like_b. Same for +# like_c vs c. +# Mon Aug 1 15:11:19 2011 UTC +SET TIMESTAMP = 1312211479.089786; +SELECT 1 INTO OUTFILE "file1.dat" FROM dual; +SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL +INTO OUTFILE "file2.dat" FROM dual; +# Too short row +CREATE TABLE t1 ( +dummy INT, +a DATETIME(6) NULL DEFAULT NULL, +b DATETIME(6) NULL DEFAULT "2011-11-18", +like_b DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6), +c DATETIME(6) NOT NULL DEFAULT "2011-11-18", +like_c DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NULL DEFAULT "2011-05-03" ON UPDATE CURRENT_TIMESTAMP(6), +e TIMESTAMP(6) NOT NULL DEFAULT "2011-05-03", +f TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +g TIMESTAMP(6) NULL DEFAULT NULL, +h INT NULL, +i INT NOT NULL DEFAULT 42 +); +# There is no promotion +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `dummy` int(11) DEFAULT NULL, + `a` datetime(6) DEFAULT NULL, + `b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000', + `like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6), + `c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000', + `like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6), + `e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000', + `f` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `g` timestamp(6) NULL DEFAULT NULL, + `h` int(11) DEFAULT NULL, + `i` int(11) NOT NULL DEFAULT '42' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +LOAD DATA INFILE "file1.dat" INTO table t1; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +# It is strange that "like_b" gets NULL when "b" gets 0. But +# this is consistent with how "a" gets NULL when "b" gets 0, +# with how "g" gets NULL when "d" gets 0, and with how "h" gets +# NULL when "i" gets 0. Looks like "DEFAULT +# <non-NULL-constant>" is changed to 0, whereas DEFAULT NULL +# and DEFAULT NOW are changed to NULL. +SELECT * FROM t1; +dummy 1 +a NULL +b 0000-00-00 00:00:00.000000 +like_b NULL +c 0000-00-00 00:00:00.000000 +like_c 0000-00-00 00:00:00.000000 +d 0000-00-00 00:00:00.000000 +e 2011-08-01 15:11:19.089786 +f 2011-08-01 15:11:19.089786 +g NULL +h NULL +i 0 +delete from t1; +alter table t1 +modify f TIMESTAMP NULL default CURRENT_TIMESTAMP; +# There is no promotion +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `dummy` int(11) DEFAULT NULL, + `a` datetime(6) DEFAULT NULL, + `b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000', + `like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6), + `c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000', + `like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6), + `e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000', + `f` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + `g` timestamp(6) NULL DEFAULT NULL, + `h` int(11) DEFAULT NULL, + `i` int(11) NOT NULL DEFAULT '42' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +LOAD DATA INFILE "file1.dat" INTO table t1; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 1 doesn't contain data for all columns +SELECT * FROM t1; +dummy 1 +a NULL +b 0000-00-00 00:00:00.000000 +like_b NULL +c 0000-00-00 00:00:00.000000 +like_c 0000-00-00 00:00:00.000000 +d 0000-00-00 00:00:00.000000 +e 2011-08-01 15:11:19.089786 +f NULL +g NULL +h NULL +i 0 +delete from t1; +drop table t1; +# Conclusion derived from trunk's results: +# DATETIME DEFAULT <non-NULL-constant> (b,c) gets 0000-00-00, +# DATETIME DEFAULT NULL (a) gets NULL, +# TIMESTAMP NULL DEFAULT <non-NULL-constant> (d) gets 0000-00-00, +# TIMESTAMP NULL DEFAULT NULL (g) gets NULL, +# TIMESTAMP NULL DEFAULT NOW (f after ALTER) gets NULL, +# TIMESTAMP NOT NULL (f before ALTER, e) gets NOW. +### Loading NULL ### +CREATE TABLE t1 ( +dummy INT, +a DATETIME(6) NULL DEFAULT NULL, +b DATETIME(6) NULL DEFAULT "2011-11-18", +like_b DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6), +c DATETIME(6) NOT NULL DEFAULT "2011-11-18", +like_c DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +d TIMESTAMP(6) NULL DEFAULT "2011-05-03" ON UPDATE CURRENT_TIMESTAMP(6), +e TIMESTAMP(6) NOT NULL DEFAULT "2011-05-03", +f TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), +g TIMESTAMP(6) NULL DEFAULT NULL, +h INT NULL, +i INT NOT NULL DEFAULT 42 +); +# There is no promotion +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `dummy` int(11) DEFAULT NULL, + `a` datetime(6) DEFAULT NULL, + `b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000', + `like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6), + `c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000', + `like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6), + `e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000', + `f` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `g` timestamp(6) NULL DEFAULT NULL, + `h` int(11) DEFAULT NULL, + `i` int(11) NOT NULL DEFAULT '42' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +LOAD DATA INFILE "file2.dat" INTO table t1; +Warnings: +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'like_c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'i' at row 1 +SELECT * FROM t1; +dummy NULL +a NULL +b NULL +like_b NULL +c 0000-00-00 00:00:00.000000 +like_c 0000-00-00 00:00:00.000000 +d NULL +e 2011-08-01 15:11:19.089786 +f 2011-08-01 15:11:19.089786 +g NULL +h NULL +i 0 +delete from t1; +alter table t1 +modify f TIMESTAMP NULL default CURRENT_TIMESTAMP; +# There is no promotion +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `dummy` int(11) DEFAULT NULL, + `a` datetime(6) DEFAULT NULL, + `b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000', + `like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6), + `c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000', + `like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6), + `e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000', + `f` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + `g` timestamp(6) NULL DEFAULT NULL, + `h` int(11) DEFAULT NULL, + `i` int(11) NOT NULL DEFAULT '42' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +LOAD DATA INFILE "file2.dat" INTO table t1; +Warnings: +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'like_c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'i' at row 1 +SELECT * FROM t1; +dummy NULL +a NULL +b NULL +like_b NULL +c 0000-00-00 00:00:00.000000 +like_c 0000-00-00 00:00:00.000000 +d NULL +e 2011-08-01 15:11:19.089786 +f NULL +g NULL +h NULL +i 0 +delete from t1; +# Conclusion derived from trunk's results: +# DATETIME NULL (a,b) gets NULL, +# DATETIME NOT NULL (c) gets 0000-00-00, +# TIMESTAMP NULL (d,f,g) gets NULL, +# TIMESTAMP NOT NULL (e) gets NOW. +drop table t1; +# +# Test of updatable views with check options. The option can be violated +# using ON UPDATE updates which is very strange as this offers a loophole +# in this integrity check. +# +SET TIME_ZONE = "+03:00"; +# 1970-01-01 03:16:40 +SET TIMESTAMP = 1000.123456; +CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +INSERT INTO t1 ( a ) VALUES ( 1 ); +SELECT * FROM t1; +a b +1 1970-01-01 03:16:40.123456 +CREATE VIEW v1 AS SELECT * FROM t1 WHERE b <= '1970-01-01 03:16:40.123456' +WITH CHECK OPTION; +SELECT * FROM v1; +a b +1 1970-01-01 03:16:40.123456 +# 1970-01-01 03:33:20 +SET TIMESTAMP = 2000.000234; +UPDATE v1 SET a = 2; +ERROR HY000: CHECK OPTION failed 'test.v1' +SELECT * FROM t1; +a b +1 1970-01-01 03:16:40.123456 +DROP VIEW v1; +DROP TABLE t1; +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT '1973-08-14 09:11:22.089786' ON UPDATE CURRENT_TIMESTAMP(6), +c INT KEY +); +# 1973-08-14 09:11:22 UTC +SET TIMESTAMP = 114167482.534231; +INSERT INTO t1 ( c ) VALUES ( 1 ); +CREATE VIEW v1 AS +SELECT * +FROM t1 +WHERE a >= '1973-08-14 09:11:22' +WITH LOCAL CHECK OPTION; +SELECT * FROM v1; +a c +1973-08-14 09:11:22.089786 1 +SET TIMESTAMP = 1.126789; +INSERT INTO v1 ( c ) VALUES ( 1 ) ON DUPLICATE KEY UPDATE c = 2; +ERROR HY000: CHECK OPTION failed 'test.v1' +SELECT * FROM v1; +a c +1973-08-14 09:11:22.089786 1 +DROP VIEW v1; +DROP TABLE t1; +# +# Bug 13095459 - MULTI-TABLE UPDATE MODIFIES A ROW TWICE +# +CREATE TABLE t1 ( +a INT, +b INT, +ts TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), +PRIMARY KEY ( a, ts ) +); +INSERT INTO t1( a, b, ts ) VALUES ( 1, 0, '2000-09-28 17:44:34' ); +CREATE TABLE t2 ( a INT ); +INSERT INTO t2 VALUES ( 1 ); +UPDATE t1 STRAIGHT_JOIN t2 +SET t1.b = t1.b + 1 +WHERE t1.a = 1 AND t1.ts >= '2000-09-28 00:00:00'; +SELECT b FROM t1; +b +1 +DROP TABLE t1, t2; +# +# Bug#11745578: 17392: ALTER TABLE ADD COLUMN TIMESTAMP DEFAULT +# CURRENT_TIMESTAMP INSERTS ZERO +# +SET timestamp = 1000; +CREATE TABLE t1 ( b INT ); +INSERT INTO t1 VALUES (1); +ALTER TABLE t1 ADD COLUMN a6 DATETIME(6) DEFAULT NOW(6) ON UPDATE NOW(6) FIRST; +ALTER TABLE t1 ADD COLUMN a5 DATETIME(6) DEFAULT NOW(6) FIRST; +ALTER TABLE t1 ADD COLUMN a4 DATETIME(6) ON UPDATE NOW(6) FIRST; +ALTER TABLE t1 ADD COLUMN a3 TIMESTAMP(6) NOT NULL DEFAULT NOW(6) ON UPDATE NOW(6) FIRST; +ALTER TABLE t1 ADD COLUMN a2 TIMESTAMP(6) NOT NULL DEFAULT NOW(6) FIRST; +ALTER TABLE t1 ADD COLUMN a1 TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE NOW(6) FIRST; +ALTER TABLE t1 ADD COLUMN c1 TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE NOW(6) AFTER b; +ALTER TABLE t1 ADD COLUMN c2 TIMESTAMP(6) NOT NULL DEFAULT NOW(6) AFTER c1; +ALTER TABLE t1 ADD COLUMN c3 TIMESTAMP(6) NOT NULL DEFAULT NOW(6) ON UPDATE NOW(6) AFTER c2; +ALTER TABLE t1 ADD COLUMN c4 DATETIME(6) ON UPDATE NOW(6) AFTER c3; +ALTER TABLE t1 ADD COLUMN c5 DATETIME(6) DEFAULT NOW(6) AFTER c4; +ALTER TABLE t1 ADD COLUMN c6 DATETIME(6) DEFAULT NOW(6) ON UPDATE NOW(6) AFTER c5; +SELECT * FROM t1; +a1 0000-00-00 00:00:00.000000 +a2 1970-01-01 03:16:40.000000 +a3 1970-01-01 03:16:40.000000 +a4 NULL +a5 1970-01-01 03:16:40.000000 +a6 1970-01-01 03:16:40.000000 +b 1 +c1 0000-00-00 00:00:00.000000 +c2 1970-01-01 03:16:40.000000 +c3 1970-01-01 03:16:40.000000 +c4 NULL +c5 1970-01-01 03:16:40.000000 +c6 1970-01-01 03:16:40.000000 +DROP TABLE t1; +CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT NOW(6) ON UPDATE CURRENT_TIMESTAMP(6), b DATETIME(6) DEFAULT NOW(6) ); +INSERT INTO t1 VALUES (); +SET timestamp = 1000000000; +ALTER TABLE t1 MODIFY COLUMN a TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP(3); +ALTER TABLE t1 MODIFY COLUMN b DATETIME(3) DEFAULT CURRENT_TIMESTAMP(3); +SELECT * FROM t1; +a b +1970-01-01 03:16:40.000 1970-01-01 03:16:40.000 +DROP TABLE t1; +CREATE TABLE t1 ( +a TIMESTAMP(6) NOT NULL DEFAULT '1999-12-01 11:22:33' ON UPDATE CURRENT_TIMESTAMP(6), +b DATETIME(6) DEFAULT '1999-12-01 11:22:33' +); +INSERT INTO t1 VALUES (); +ALTER TABLE t1 MODIFY COLUMN a TIMESTAMP(6) DEFAULT NOW(6); +ALTER TABLE t1 MODIFY COLUMN b DATETIME(6) DEFAULT NOW(6); +INSERT INTO t1 VALUES (); +SELECT * FROM t1; +a b +1999-12-01 11:22:33.000000 1999-12-01 11:22:33.000000 +2001-09-09 04:46:40.000000 2001-09-09 04:46:40.000000 +DROP TABLE t1; diff --git a/mysql-test/r/function_defaults_notembedded.result b/mysql-test/r/function_defaults_notembedded.result new file mode 100644 index 00000000000..9bd03ab9f05 --- /dev/null +++ b/mysql-test/r/function_defaults_notembedded.result @@ -0,0 +1,173 @@ +# +# Test of function defaults for non-embedded server. +# +# +# Function defaults run 1. No microsecond precision. +# +SET TIME_ZONE = "+00:00"; +# +# Test of INSERT DELAYED ... SET ... +# +# 2011-04-19 08:02:40 UTC +SET TIMESTAMP = 1303200160.123456; +CREATE TABLE t1 ( a INT, b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP); +INSERT DELAYED INTO t1 SET a = 1; +FLUSH TABLE t1; +SELECT * FROM t1; +a b +1 2011-04-19 08:02:40 +SELECT * FROM t1 WHERE b = 0; +a b +INSERT DELAYED INTO t1 SET a = 2, b = '1980-01-02 10:20:30.405060'; +FLUSH TABLE t1; +SELECT * FROM t1; +a b +1 2011-04-19 08:02:40 +2 1980-01-02 10:20:30 +DROP TABLE t1; +# +# Test of INSERT DELAYED ... VALUES ... +# +# 2011-04-19 08:04:01 UTC +SET TIMESTAMP = 1303200241.234567; +CREATE TABLE t1 ( a INT, b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP); +INSERT DELAYED INTO t1 ( a ) VALUES (1); +FLUSH TABLE t1; +SELECT * FROM t1; +a b +1 2011-04-19 08:04:01 +INSERT DELAYED INTO t1 VALUES (2, '1977-12-19 12:34:56.789123'); +FLUSH TABLE t1; +SELECT * FROM t1; +a b +1 2011-04-19 08:04:01 +2 1977-12-19 12:34:56 +DROP TABLE t1; +# +# Test of a delayed insert handler servicing two insert operations +# with different sets of active defaults. +# +CREATE TABLE t1 ( a INT, b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP); +# 2011-04-19 08:04:01 UTC +SET TIMESTAMP = 1303200241.345678; +SET debug_sync = 'before_write_delayed SIGNAL parked WAIT_FOR go'; +INSERT DELAYED INTO t1 ( a ) VALUES (1), (2), (3); +SET debug_sync = 'now WAIT_FOR parked'; +# 2011-04-19 08:04:01 UTC +SET TIME_ZONE="+03:00"; +SET TIMESTAMP = 1303200241.456789; +INSERT DELAYED INTO t1 ( a, b ) VALUES (4, '1977-12-19 12:34:56.789123'), (5, '1977-12-19 12:34:57.891234'), (6, '1977-12-19 12:34:58.912345'); +SET debug_sync = 'now SIGNAL go'; +SELECT * FROM t1; +a b +1 2011-04-19 08:04:01 +2 2011-04-19 08:04:01 +3 2011-04-19 08:04:01 +4 1977-12-19 09:34:56 +5 1977-12-19 09:34:57 +6 1977-12-19 09:34:58 +DROP TABLE t1; +# +# Test of early activation of function defaults. +# +CREATE TABLE t1 ( a INT, b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP); +SET TIMESTAMP = 1317235172.987654; +INSERT DELAYED INTO t1 ( a ) VALUES (1), (2), (3); +SET TIMESTAMP = 385503754.876543; +INSERT DELAYED INTO t1 ( a ) VALUES (4), (5), (6); +FLUSH TABLE t1; +SELECT * FROM t1; +a b +1 2011-09-28 18:39:32 +2 2011-09-28 18:39:32 +3 2011-09-28 18:39:32 +4 1982-03-20 20:22:34 +5 1982-03-20 20:22:34 +6 1982-03-20 20:22:34 +DROP TABLE t1; +SET debug_sync = 'RESET'; +# +# Function defaults run 2. Six digits scale on seconds precision. +# +SET TIME_ZONE = "+00:00"; +# +# Test of INSERT DELAYED ... SET ... +# +# 2011-04-19 08:02:40 UTC +SET TIMESTAMP = 1303200160.123456; +CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)); +INSERT DELAYED INTO t1 SET a = 1; +FLUSH TABLE t1; +SELECT * FROM t1; +a b +1 2011-04-19 08:02:40.123456 +SELECT * FROM t1 WHERE b = 0; +a b +INSERT DELAYED INTO t1 SET a = 2, b = '1980-01-02 10:20:30.405060'; +FLUSH TABLE t1; +SELECT * FROM t1; +a b +1 2011-04-19 08:02:40.123456 +2 1980-01-02 10:20:30.405060 +DROP TABLE t1; +# +# Test of INSERT DELAYED ... VALUES ... +# +# 2011-04-19 08:04:01 UTC +SET TIMESTAMP = 1303200241.234567; +CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)); +INSERT DELAYED INTO t1 ( a ) VALUES (1); +FLUSH TABLE t1; +SELECT * FROM t1; +a b +1 2011-04-19 08:04:01.234567 +INSERT DELAYED INTO t1 VALUES (2, '1977-12-19 12:34:56.789123'); +FLUSH TABLE t1; +SELECT * FROM t1; +a b +1 2011-04-19 08:04:01.234567 +2 1977-12-19 12:34:56.789123 +DROP TABLE t1; +# +# Test of a delayed insert handler servicing two insert operations +# with different sets of active defaults. +# +CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)); +# 2011-04-19 08:04:01 UTC +SET TIMESTAMP = 1303200241.345678; +SET debug_sync = 'before_write_delayed SIGNAL parked WAIT_FOR go'; +INSERT DELAYED INTO t1 ( a ) VALUES (1), (2), (3); +SET debug_sync = 'now WAIT_FOR parked'; +# 2011-04-19 08:04:01 UTC +SET TIME_ZONE="+03:00"; +SET TIMESTAMP = 1303200241.456789; +INSERT DELAYED INTO t1 ( a, b ) VALUES (4, '1977-12-19 12:34:56.789123'), (5, '1977-12-19 12:34:57.891234'), (6, '1977-12-19 12:34:58.912345'); +SET debug_sync = 'now SIGNAL go'; +SELECT * FROM t1; +a b +1 2011-04-19 08:04:01.345678 +2 2011-04-19 08:04:01.345678 +3 2011-04-19 08:04:01.345678 +4 1977-12-19 09:34:56.789123 +5 1977-12-19 09:34:57.891234 +6 1977-12-19 09:34:58.912345 +DROP TABLE t1; +# +# Test of early activation of function defaults. +# +CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)); +SET TIMESTAMP = 1317235172.987654; +INSERT DELAYED INTO t1 ( a ) VALUES (1), (2), (3); +SET TIMESTAMP = 385503754.876543; +INSERT DELAYED INTO t1 ( a ) VALUES (4), (5), (6); +FLUSH TABLE t1; +SELECT * FROM t1; +a b +1 2011-09-28 18:39:32.987654 +2 2011-09-28 18:39:32.987654 +3 2011-09-28 18:39:32.987654 +4 1982-03-20 20:22:34.876543 +5 1982-03-20 20:22:34.876543 +6 1982-03-20 20:22:34.876543 +DROP TABLE t1; +SET debug_sync = 'RESET'; diff --git a/mysql-test/r/get_diagnostics.result b/mysql-test/r/get_diagnostics.result new file mode 100644 index 00000000000..623d48c33d5 --- /dev/null +++ b/mysql-test/r/get_diagnostics.result @@ -0,0 +1,790 @@ +# +# WL#2111: GET DIAGNOSTICS tests +# +# +# In MariaDB GET is not reserved +# +CREATE TABLE t1 (get INT); +DROP TABLE t1; +CREATE PROCEDURE p1() +BEGIN +DECLARE get INT DEFAULT 1; +END| +DROP PROCEDURE p1; +CREATE PROCEDURE p1() +get: +BEGIN +SELECT 1; +END get| +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ': +BEGIN +SELECT 1; +END get' at line 2 +# +# Test non-reserved keywords: CURRENT, DIAGNOSTICS, NUMBER, RETURNED_SQLSTATE +# +CREATE TABLE t1 (current INT, diagnostics INT, number INT, returned_sqlstate INT); +INSERT INTO t1 (current, diagnostics, number, returned_sqlstate) values (1,2,3,4); +SELECT current, diagnostics, number, returned_sqlstate FROM t1 WHERE number = 3; +current diagnostics number returned_sqlstate +1 2 3 4 +SELECT `current`, `number` FROM t1 WHERE `current` = 1 AND `number` = 3; +current number +1 3 +DROP TABLE t1; +CREATE PROCEDURE p1() +BEGIN +DECLARE current INT DEFAULT 1; +DECLARE diagnostics INT DEFAULT 2; +DECLARE number INT DEFAULT 3; +DECLARE returned_sqlstate INT DEFAULT 4; +SELECT current, diagnostics, number, returned_sqlstate; +END| +CALL p1(); +current diagnostics number returned_sqlstate +1 2 3 4 +DROP PROCEDURE p1; +# +# Test GET DIAGNOSTICS syntax +# +DROP PROCEDURE IF EXISTS p1; +GET; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 +GET CURRENT; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 +GET DIAGNOSTICS; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 +GET CURRENT DIAGNOSTICS; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 + +# Statement information syntax + +GET DIAGNOSTICS @var; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 +GET DIAGNOSTICS var; +ERROR 42000: Undeclared variable: var +CREATE PROCEDURE p1() +BEGIN +GET DIAGNOSTICS var; +END| +ERROR 42000: Undeclared variable: var +CREATE PROCEDURE p1() +BEGIN +DECLARE var INT; +GET DIAGNOSTICS var; +END| +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '; +END' at line 4 +GET DIAGNOSTICS @var =; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 +GET DIAGNOSTICS @var = INVALID; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INVALID' at line 1 +GET DIAGNOSTICS @var = MORE; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'MORE' at line 1 +GET DIAGNOSTICS @var = CLASS_ORIGIN; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CLASS_ORIGIN' at line 1 +GET DIAGNOSTICS @var = INVALID,; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INVALID,' at line 1 +GET DIAGNOSTICS @var1 = NUMBER, @var2; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 +GET DIAGNOSTICS @var1 = NUMBER, @var2 = INVALID; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INVALID' at line 1 +GET DIAGNOSTICS @@var1 = NUMBER; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@var1 = NUMBER' at line 1 +GET DIAGNOSTICS @var1 = NUMBER, @@var2 = NUMBER; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@var2 = NUMBER' at line 1 +CREATE PROCEDURE p1() +BEGIN +DECLARE var INT; +GET DIAGNOSTICS var = INVALID; +END| +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INVALID; +END' at line 4 +CREATE PROCEDURE p1() +BEGIN +DECLARE var CONDITION FOR SQLSTATE '12345'; +GET DIAGNOSTICS var = NUMBER; +END| +ERROR 42000: Undeclared variable: var +CREATE PROCEDURE p1() +BEGIN +DECLARE var INT; +GET DIAGNOSTICS var = NUMBER, var1 = ROW_COUNT; +END| +ERROR 42000: Undeclared variable: var1 +GET DIAGNOSTICS @var = NUMBER; +GET DIAGNOSTICS @var = ROW_COUNT; +GET DIAGNOSTICS @var1 = NUMBER, @var2 = ROW_COUNT; +GET DIAGNOSTICS @var1 = ROW_COUNT, @var2 = NUMBER; +CREATE PROCEDURE p1() +BEGIN +DECLARE var INT; +DECLARE var1 INT; +DECLARE var2 INT; +GET DIAGNOSTICS var = NUMBER; +GET DIAGNOSTICS var = ROW_COUNT; +GET DIAGNOSTICS var1 = NUMBER, var2 = ROW_COUNT; +GET DIAGNOSTICS var1 = ROW_COUNT, var2 = NUMBER; +END| +DROP PROCEDURE p1; + +# Condition information syntax + +GET DIAGNOSTICS CONDITION; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 +GET DIAGNOSTICS CONDITION a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 +GET DIAGNOSTICS CONDITION 1; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 +GET DIAGNOSTICS CONDITION 1 @var; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 +GET DIAGNOSTICS CONDITION 1 var; +ERROR 42000: Undeclared variable: var +CREATE PROCEDURE p1() +BEGIN +GET DIAGNOSTICS CONDITION 1 var; +END| +ERROR 42000: Undeclared variable: var +CREATE PROCEDURE p1() +BEGIN +DECLARE var INT; +GET DIAGNOSTICS CONDITION 1 var; +END| +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '; +END' at line 4 +GET DIAGNOSTICS CONDITION 1 @var =; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 +GET DIAGNOSTICS CONDITION 1 @var = INVALID; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INVALID' at line 1 +GET DIAGNOSTICS CONDITION 1 @var = NUMBER; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NUMBER' at line 1 +GET DIAGNOSTICS CONDITION 1 @var = INVALID,; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INVALID,' at line 1 +GET DIAGNOSTICS CONDITION 1 @var1 = CLASS_ORIGIN, @var2; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 +GET DIAGNOSTICS CONDITION 1 @var1 = CLASS_ORIGIN, @var2 = INVALID; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INVALID' at line 1 +GET DIAGNOSTICS CONDITION 1 @@var1 = CLASS_ORIGIN; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@var1 = CLASS_ORIGIN' at line 1 +GET DIAGNOSTICS CONDITION 1 @var1 = CLASS_ORIGIN, @@var2 = CLASS_ORIGIN; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@var2 = CLASS_ORIGIN' at line 1 +CREATE PROCEDURE p1() +BEGIN +DECLARE var INT; +GET DIAGNOSTICS CONDITION 1 var = INVALID; +END| +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INVALID; +END' at line 4 +CREATE PROCEDURE p1() +BEGIN +DECLARE var CONDITION FOR SQLSTATE '12345'; +GET DIAGNOSTICS CONDITION 1 var = NUMBER; +END| +ERROR 42000: Undeclared variable: var +CREATE PROCEDURE p1() +BEGIN +DECLARE var INT; +GET DIAGNOSTICS CONDITION 1 var = CLASS_ORIGIN, var1 = SUBCLASS_ORIGIN; +END| +ERROR 42000: Undeclared variable: var1 +GET DIAGNOSTICS CONDITION 1 @var = CLASS_ORIGIN; +GET DIAGNOSTICS CONDITION 1 @var = SUBCLASS_ORIGIN; +GET DIAGNOSTICS CONDITION 1 @var1 = CLASS_ORIGIN, @var2 = SUBCLASS_ORIGIN; +GET DIAGNOSTICS CONDITION 1 @var1 = SUBCLASS_ORIGIN, @var2 = CLASS_ORIGIN; +CREATE PROCEDURE p1() +BEGIN +DECLARE var INT; +DECLARE var1 INT; +DECLARE var2 INT; +GET DIAGNOSTICS CONDITION 1 var = CLASS_ORIGIN; +GET DIAGNOSTICS CONDITION 1 var = SUBCLASS_ORIGIN; +GET DIAGNOSTICS CONDITION 1 var1 = CLASS_ORIGIN, var2 = SUBCLASS_ORIGIN; +GET DIAGNOSTICS CONDITION 1 var1 = SUBCLASS_ORIGIN, var2 = CLASS_ORIGIN; +END| +DROP PROCEDURE p1; +# Condition number expression +GET DIAGNOSTICS CONDITION -1 @var = CLASS_ORIGIN; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-1 @var = CLASS_ORIGIN' at line 1 +GET DIAGNOSTICS CONDITION 1+1 @var = CLASS_ORIGIN; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '+1 @var = CLASS_ORIGIN' at line 1 +GET DIAGNOSTICS CONDITION ? @var = CLASS_ORIGIN; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '? @var = CLASS_ORIGIN' at line 1 +GET DIAGNOSTICS CONDITION (1) @var = CLASS_ORIGIN; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(1) @var = CLASS_ORIGIN' at line 1 +GET DIAGNOSTICS CONDITION p1() @var = CLASS_ORIGIN; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '() @var = CLASS_ORIGIN' at line 1 +GET DIAGNOSTICS CONDITION ABS(2) @var = CLASS_ORIGIN; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(2) @var = CLASS_ORIGIN' at line 1 +GET DIAGNOSTICS CONDITION 1.1 @var = CLASS_ORIGIN; +GET DIAGNOSTICS CONDITION "1" @var = CLASS_ORIGIN; +SELECT COUNT(max_questions) INTO @var FROM mysql.user; +GET DIAGNOSTICS CONDITION 9999 @var = CLASS_ORIGIN; +Warnings: +Error 1758 Invalid condition number +GET DIAGNOSTICS CONDITION NULL @var = CLASS_ORIGIN; +Warnings: +Error 1758 Invalid condition number +Error 1758 Invalid condition number +GET DIAGNOSTICS CONDITION a @var = CLASS_ORIGIN; +Warnings: +Error 1758 Invalid condition number +Error 1758 Invalid condition number +Error 1054 Unknown column 'a' in 'field list' +SELECT COUNT(max_questions) INTO @var FROM mysql.user; +SET @cond = 1; +GET DIAGNOSTICS CONDITION @cond @var1 = CLASS_ORIGIN; +Warnings: +Error 1758 Invalid condition number +SET @cond = "invalid"; +GET DIAGNOSTICS CONDITION @cond @var1 = CLASS_ORIGIN; +Warnings: +Error 1758 Invalid condition number +Error 1758 Invalid condition number +SELECT COUNT(max_questions) INTO @var FROM mysql.user; +CREATE PROCEDURE p1() +BEGIN +DECLARE cond INT DEFAULT 1; +DECLARE var INT; +GET DIAGNOSTICS CONDITION cond var = CLASS_ORIGIN; +END| +DROP PROCEDURE p1; +CREATE PROCEDURE p1() +BEGIN +DECLARE cond TEXT; +DECLARE var INT; +GET DIAGNOSTICS CONDITION cond var = CLASS_ORIGIN; +END| +CALL p1(); +DROP PROCEDURE p1; +# +# Test GET DIAGNOSTICS runtime +# + +# GET DIAGNOSTICS cannot be the object of a PREPARE statement. + +PREPARE stmt FROM "GET DIAGNOSTICS CONDITION 1 @var = CLASS_ORIGIN"; +ERROR HY000: This command is not supported in the prepared statement protocol yet +PREPARE stmt FROM "GET DIAGNOSTICS @var = NUMBER"; +ERROR HY000: This command is not supported in the prepared statement protocol yet + +# GET DIAGNOSTICS does not clear the diagnostics area. + +SELECT CAST(-19999999999999999999 AS SIGNED); +CAST(-19999999999999999999 AS SIGNED) +-9223372036854775808 +Warnings: +Warning 1916 Got overflow when converting '-19999999999999999999' to INT. Value truncated. +GET DIAGNOSTICS @var = NUMBER; +SHOW WARNINGS; +Level Code Message +Warning 1916 Got overflow when converting '-19999999999999999999' to INT. Value truncated. +# +# If GET DIAGNOSTICS itself causes an error, an error message is appended. +# +SELECT CAST(-19999999999999999999 AS SIGNED); +CAST(-19999999999999999999 AS SIGNED) +-9223372036854775808 +Warnings: +Warning 1916 Got overflow when converting '-19999999999999999999' to INT. Value truncated. +GET DIAGNOSTICS CONDITION 99999 @var = CLASS_ORIGIN; +Warnings: +Warning 1916 Got overflow when converting '-19999999999999999999' to INT. Value truncated. +Error 1758 Invalid condition number +SHOW WARNINGS; +Level Code Message +Warning 1916 Got overflow when converting '-19999999999999999999' to INT. Value truncated. +Error 1758 Invalid condition number + +# Statement information runtime + +SELECT CAST(-19999999999999999999 AS SIGNED), +CAST(-19999999999999999999 AS SIGNED); +CAST(-19999999999999999999 AS SIGNED) CAST(-19999999999999999999 AS SIGNED) +-9223372036854775808 -9223372036854775808 +Warnings: +Warning 1916 Got overflow when converting '-19999999999999999999' to INT. Value truncated. +Warning 1916 Got overflow when converting '-19999999999999999999' to INT. Value truncated. +GET DIAGNOSTICS @var = NUMBER; +SELECT @var; +@var +2 +SELECT COUNT(max_questions) INTO @var FROM mysql.user; +GET DIAGNOSTICS @var = NUMBER; +SELECT @var; +@var +0 +SELECT 1; +1 +1 +GET DIAGNOSTICS @var = ROW_COUNT; +SELECT @var; +@var +-1 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +GET DIAGNOSTICS @var = ROW_COUNT; +SELECT @var; +@var +3 +DROP TABLE t1; +CREATE PROCEDURE p1() +BEGIN +DECLARE number INT; +DECLARE row_count INT; +SELECT CAST(-19999999999999999999 AS SIGNED), +CAST(-19999999999999999999 AS SIGNED); +GET DIAGNOSTICS number = NUMBER; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +GET DIAGNOSTICS row_count = ROW_COUNT; +DROP TABLE t1; +SELECT number, row_count; +END| +CALL p1(); +CAST(-19999999999999999999 AS SIGNED) CAST(-19999999999999999999 AS SIGNED) +-9223372036854775808 -9223372036854775808 +number row_count +2 3 +DROP PROCEDURE p1; + +# Condition information runtime + +SELECT CAST(-19999999999999999999 AS SIGNED); +CAST(-19999999999999999999 AS SIGNED) +-9223372036854775808 +Warnings: +Warning 1916 Got overflow when converting '-19999999999999999999' to INT. Value truncated. +GET DIAGNOSTICS CONDITION 1 +@class_origin = CLASS_ORIGIN, +@subclass_origin = SUBCLASS_ORIGIN, +@constraint_catalog = CONSTRAINT_CATALOG, +@constraint_schema = CONSTRAINT_SCHEMA, +@constraint_name = CONSTRAINT_NAME, +@catalog_name = CATALOG_NAME, +@schema_name = SCHEMA_NAME, +@table_name = TABLE_NAME, +@column_name = COLUMN_NAME, +@cursor_name = CURSOR_NAME, +@message_text = MESSAGE_TEXT, +@mysql_errno = MYSQL_ERRNO, +@returned_sqlstate = RETURNED_SQLSTATE; +SELECT +@class_origin, +@subclass_origin, +@constraint_catalog, +@constraint_schema, +@constraint_name, +@catalog_name, +@schema_name, +@table_name, +@column_name, +@cursor_name, +@message_text, +@mysql_errno, +@returned_sqlstate; +@class_origin +@subclass_origin +@constraint_catalog +@constraint_schema +@constraint_name +@catalog_name +@schema_name +@table_name +@column_name +@cursor_name +@message_text Got overflow when converting '-19999999999999999999' to INT. Value truncated. +@mysql_errno 1916 +@returned_sqlstate 22003 +CREATE PROCEDURE p1() +BEGIN +DECLARE class_origin TEXT DEFAULT "a"; +DECLARE subclass_origin TEXT DEFAULT "a"; +DECLARE constraint_catalog TEXT DEFAULT "a"; +DECLARE constraint_schema TEXT DEFAULT "a"; +DECLARE constraint_name TEXT DEFAULT "a"; +DECLARE catalog_name TEXT DEFAULT "a"; +DECLARE schema_name TEXT DEFAULT "a"; +DECLARE table_name TEXT DEFAULT "a"; +DECLARE column_name TEXT DEFAULT "a"; +DECLARE cursor_name TEXT DEFAULT "a"; +DECLARE message_text TEXT DEFAULT "a"; +DECLARE mysql_errno INT DEFAULT 1; +DECLARE returned_sqlstate TEXT DEFAULT "a"; +SELECT CAST(-19999999999999999999 AS SIGNED); +GET DIAGNOSTICS CONDITION 1 +class_origin = CLASS_ORIGIN, +subclass_origin = SUBCLASS_ORIGIN, +constraint_catalog = CONSTRAINT_CATALOG, +constraint_schema = CONSTRAINT_SCHEMA, +constraint_name = CONSTRAINT_NAME, +catalog_name = CATALOG_NAME, +schema_name = SCHEMA_NAME, +table_name = TABLE_NAME, +column_name = COLUMN_NAME, +cursor_name = CURSOR_NAME, +message_text = MESSAGE_TEXT, +mysql_errno = MYSQL_ERRNO, +returned_sqlstate = RETURNED_SQLSTATE; +SELECT +class_origin, +subclass_origin, +constraint_catalog, +constraint_schema, +constraint_name, +catalog_name, +schema_name, +table_name, +column_name, +cursor_name, +message_text, +mysql_errno, +returned_sqlstate; +END| +CALL p1(); +CAST(-19999999999999999999 AS SIGNED) -9223372036854775808 +class_origin +subclass_origin +constraint_catalog +constraint_schema +constraint_name +catalog_name +schema_name +table_name +column_name +cursor_name +message_text Got overflow when converting '-19999999999999999999' to INT. Value truncated. +mysql_errno 1916 +returned_sqlstate 22003 +Warnings: +Level Warning +Code 1916 +Message Got overflow when converting '-19999999999999999999' to INT. Value truncated. +DROP PROCEDURE p1; +CREATE PROCEDURE p1() +BEGIN +DECLARE errno1 INT; +DECLARE errno2 INT; +DECLARE msg1 TEXT; +DECLARE msg2 TEXT; +SELECT CAST(-19999999999999999999 AS SIGNED); +GET DIAGNOSTICS CONDITION 99999 msg1 = MESSAGE_TEXT; +GET DIAGNOSTICS CONDITION 1 errno1 = MYSQL_ERRNO, msg1 = MESSAGE_TEXT; +GET DIAGNOSTICS CONDITION 2 errno2 = MYSQL_ERRNO, msg2 = MESSAGE_TEXT; +SELECT errno1, msg1, errno2, msg2; +END| +CALL p1(); +CAST(-19999999999999999999 AS SIGNED) -9223372036854775808 +errno1 1916 +msg1 Got overflow when converting '-19999999999999999999' to INT. Value truncated. +errno2 1758 +msg2 Invalid condition number +Warnings: +Level Warning +Code 1916 +Message Got overflow when converting '-19999999999999999999' to INT. Value truncated. +Level Error +Code 1758 +Message Invalid condition number +DROP PROCEDURE p1; + +# Interaction with SIGNAL + +CREATE PROCEDURE p1() +BEGIN +DECLARE errno INT DEFAULT 0; +DECLARE msg TEXT DEFAULT "foo"; +DECLARE cond CONDITION FOR SQLSTATE "01234"; +DECLARE CONTINUE HANDLER for 1012 +BEGIN +GET DIAGNOSTICS CONDITION 1 errno = MYSQL_ERRNO, msg = MESSAGE_TEXT; +END; +SIGNAL cond SET MESSAGE_TEXT = "Signal message", MYSQL_ERRNO = 1012; +SELECT errno, msg; +END| +CALL p1(); +errno 1012 +msg Signal message +DROP PROCEDURE p1; +CREATE PROCEDURE p1() +BEGIN +SIGNAL SQLSTATE '77777' SET MYSQL_ERRNO = 1000, MESSAGE_TEXT='ÃÂÃÅÄ'; +END| +CALL p1(); +ERROR 77777: ÃÂÃÅÄ +GET DIAGNOSTICS CONDITION 1 +@mysql_errno = MYSQL_ERRNO, @message_text = MESSAGE_TEXT, +@returned_sqlstate = RETURNED_SQLSTATE, @class_origin = CLASS_ORIGIN; +SELECT @mysql_errno, @message_text, @returned_sqlstate, @class_origin; +@mysql_errno 1000 +@message_text ÃÂÃÅÄ +@returned_sqlstate 77777 +@class_origin +DROP PROCEDURE p1; +CREATE PROCEDURE p1() +BEGIN +DECLARE cond CONDITION FOR SQLSTATE '12345'; +SIGNAL cond SET +CLASS_ORIGIN = 'CLASS_ORIGIN text', +SUBCLASS_ORIGIN = 'SUBCLASS_ORIGIN text', +CONSTRAINT_CATALOG = 'CONSTRAINT_CATALOG text', +CONSTRAINT_SCHEMA = 'CONSTRAINT_SCHEMA text', +CONSTRAINT_NAME = 'CONSTRAINT_NAME text', +CATALOG_NAME = 'CATALOG_NAME text', +SCHEMA_NAME = 'SCHEMA_NAME text', +TABLE_NAME = 'TABLE_NAME text', +COLUMN_NAME = 'COLUMN_NAME text', +CURSOR_NAME = 'CURSOR_NAME text', +MESSAGE_TEXT = 'MESSAGE_TEXT text', +MYSQL_ERRNO = 54321; +END| +CALL p1(); +ERROR 12345: MESSAGE_TEXT text +GET DIAGNOSTICS CONDITION 1 +@class_origin = CLASS_ORIGIN, +@subclass_origin = SUBCLASS_ORIGIN, +@constraint_catalog = CONSTRAINT_CATALOG, +@constraint_schema = CONSTRAINT_SCHEMA, +@constraint_name = CONSTRAINT_NAME, +@catalog_name = CATALOG_NAME, +@schema_name = SCHEMA_NAME, +@table_name = TABLE_NAME, +@column_name = COLUMN_NAME, +@cursor_name = CURSOR_NAME, +@message_text = MESSAGE_TEXT, +@mysql_errno = MYSQL_ERRNO, +@returned_sqlstate = RETURNED_SQLSTATE; +SELECT +@class_origin, +@subclass_origin, +@constraint_catalog, +@constraint_schema, +@constraint_name, +@catalog_name, +@schema_name, +@table_name, +@column_name, +@cursor_name, +@message_text, +@mysql_errno, +@returned_sqlstate; +@class_origin CLASS_ORIGIN text +@subclass_origin SUBCLASS_ORIGIN text +@constraint_catalog CONSTRAINT_CATALOG text +@constraint_schema CONSTRAINT_SCHEMA text +@constraint_name CONSTRAINT_NAME text +@catalog_name CATALOG_NAME text +@schema_name SCHEMA_NAME text +@table_name TABLE_NAME text +@column_name COLUMN_NAME text +@cursor_name CURSOR_NAME text +@message_text MESSAGE_TEXT text +@mysql_errno 54321 +@returned_sqlstate 12345 +DROP PROCEDURE p1; +# +# Demonstration +# + +# The same statement information item can be used multiple times. + +CREATE PROCEDURE p1() +BEGIN +DECLARE var INT; +GET DIAGNOSTICS var = NUMBER, @var = NUMBER; +SELECT var, @var; +END| +CALL p1(); +var @var +1 1 +DROP PROCEDURE p1; + +# Setting TABLE_NAME is currently not implemented. + +CREATE PROCEDURE p1() +BEGIN +DECLARE v VARCHAR(64); +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +GET DIAGNOSTICS CONDITION 1 v = TABLE_NAME; +DROP TABLE no_such_table; +SELECT v; +END| +CALL p1(); +v + +DROP PROCEDURE p1; + +# Message is truncated to fit into target. No truncation warning. + +CREATE PROCEDURE p1() +BEGIN +DECLARE v CHAR(1); +CREATE TABLE IF NOT EXISTS t1 (a INT); +GET DIAGNOSTICS CONDITION 1 v = MESSAGE_TEXT; +SELECT v; +END| +CREATE TABLE t1 (a INT); +CALL p1(); +v +T +Warnings: +Note 1050 Table 't1' already exists +DROP TABLE t1; +DROP PROCEDURE p1; + +# Returns number of rows updated by the UPDATE statements. + +CREATE PROCEDURE p1(IN param INT) +LANGUAGE SQL +BEGIN +DECLARE v INT DEFAULT 0; +DECLARE rcount_each INT; +DECLARE rcount_total INT DEFAULT 0; +WHILE v < 5 DO +UPDATE t1 SET a = a * 1.1 WHERE b = param; +GET DIAGNOSTICS rcount_each = ROW_COUNT; +SET rcount_total = rcount_total + rcount_each; +SET v = v + 1; +END WHILE; +SELECT rcount_total; +END| +CREATE TABLE t1 (a REAL, b INT); +INSERT INTO t1 VALUES (1.1, 1); +CALL p1(1); +rcount_total +5 +DROP TABLE t1; +DROP PROCEDURE p1; + +# GET DIAGNOSTICS doesn't clear the diagnostics area. + +CREATE PROCEDURE p1() +BEGIN +DECLARE CONTINUE HANDLER FOR SQLWARNING +BEGIN +GET CURRENT DIAGNOSTICS CONDITION 1 @x = RETURNED_SQLSTATE; +SIGNAL SQLSTATE '01002'; +GET CURRENT DIAGNOSTICS CONDITION 1 @y = RETURNED_SQLSTATE; +END; +SIGNAL SQLSTATE '01001'; +SELECT @x, @y; +END| +CALL p1(); +@x @y +01001 01002 +Warnings: +Warning 1642 Unhandled user-defined warning condition +DROP PROCEDURE p1; + +# Using OUT and INOUT parameters as the target variables. + +CREATE PROCEDURE p1(OUT number INT, INOUT message TEXT) +BEGIN +DECLARE warn CONDITION FOR SQLSTATE "01234"; +DECLARE CONTINUE HANDLER FOR SQLWARNING +BEGIN +GET DIAGNOSTICS number = NUMBER; +GET DIAGNOSTICS CONDITION 1 message = MESSAGE_TEXT; +END; +SELECT message; +SIGNAL warn SET MESSAGE_TEXT = "inout parameter"; +END| +SET @var1 = 0; +SET @var2 = "message text"; +CALL p1(@var1, @var2); +message +message text +SELECT @var1, @var2; +@var1 @var2 +1 inout parameter +DROP PROCEDURE p1; + +# Using an IN parameter as the target variable. + +CREATE PROCEDURE p1(IN number INT) +BEGIN +SELECT number; +GET DIAGNOSTICS number = NUMBER; +SELECT number; +END| +SET @var1 = 9999; +CALL p1(@var1); +number +9999 +number +0 +SELECT @var1; +@var1 +9999 +DROP PROCEDURE p1; + +# Using GET DIAGNOSTICS in a stored function. + +CREATE FUNCTION f1() RETURNS TEXT +BEGIN +DECLARE message TEXT; +DECLARE warn CONDITION FOR SQLSTATE "01234"; +DECLARE CONTINUE HANDLER FOR SQLWARNING +BEGIN +GET DIAGNOSTICS CONDITION 1 message = MESSAGE_TEXT; +END; +SIGNAL warn SET MESSAGE_TEXT = "message text"; +return message; +END| +SELECT f1(); +f1() +message text +DROP FUNCTION f1; + +# Using GET DIAGNOSTICS in a trigger. + +CREATE TABLE t1 (a INT); +CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW +BEGIN +DECLARE var INT DEFAULT row_count(); +GET DIAGNOSTICS @var1 = ROW_COUNT; +SET @var2 = var; +END| +SET @var1 = 9999, @var2 = 9999; +INSERT INTO t1 VALUES (1), (2); +SELECT @var1, @var2; +@var1 @var2 +0 0 +DROP TRIGGER trg1; +DROP TABLE t1; + +# GET DIAGNOSTICS does not reset ROW_COUNT + +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1); +GET DIAGNOSTICS @var1 = ROW_COUNT; +GET DIAGNOSTICS @var2 = ROW_COUNT; +SELECT @var1, @var2; +@var1 @var2 +1 1 +DROP TABLE t1; + +# Items are UTF8 (utf8_general_ci default collation) + +SELECT CAST(-19999999999999999999 AS SIGNED); +CAST(-19999999999999999999 AS SIGNED) +-9223372036854775808 +Warnings: +Warning 1916 Got overflow when converting '-19999999999999999999' to INT. Value truncated. +GET DIAGNOSTICS CONDITION 1 @var1 = MESSAGE_TEXT, @var2 = CLASS_ORIGIN; +SELECT CHARSET(@var1), COLLATION(@var1), COERCIBILITY(@var1); +CHARSET(@var1) COLLATION(@var1) COERCIBILITY(@var1) +utf8 utf8_general_ci 2 +SELECT CHARSET(@var2), COLLATION(@var2), COERCIBILITY(@var2); +CHARSET(@var2) COLLATION(@var2) COERCIBILITY(@var2) +utf8 utf8_general_ci 2 +# +# Command statistics +# +FLUSH STATUS; +SHOW STATUS LIKE 'Com%get_diagnostics'; +Variable_name Value +Com_get_diagnostics 0 +GET DIAGNOSTICS @var1 = NUMBER; +SHOW STATUS LIKE 'Com%get_diagnostics'; +Variable_name Value +Com_get_diagnostics 1 diff --git a/mysql-test/r/gis-alter_table_online.result b/mysql-test/r/gis-alter_table_online.result new file mode 100644 index 00000000000..ea7ab3b66bd --- /dev/null +++ b/mysql-test/r/gis-alter_table_online.result @@ -0,0 +1,51 @@ +# +# Start of 10.1 tests +# +# +# MDEV-8948 ALTER ... INPLACE does work for BINARY, BLOB +# +CREATE TABLE t1 (a TINYBLOB); +ALTER TABLE t1 MODIFY a GEOMETRY, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a MEDIUMBLOB); +ALTER TABLE t1 MODIFY a GEOMETRY, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a BLOB); +ALTER TABLE t1 MODIFY a GEOMETRY, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a LONGBLOB); +ALTER TABLE t1 MODIFY a GEOMETRY, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a GEOMETRY); +ALTER TABLE t1 MODIFY a TINYBLOB, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a GEOMETRY); +ALTER TABLE t1 MODIFY a MEDIUMBLOB, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a GEOMETRY); +ALTER TABLE t1 MODIFY a BLOB, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a GEOMETRY); +ALTER TABLE t1 MODIFY a LONGBLOB, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a GEOMETRY); +ALTER TABLE t1 MODIFY a POLYGON, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. +DROP TABLE t1; +CREATE TABLE t1 (a POLYGON); +ALTER TABLE t1 MODIFY a GEOMETRY, ALGORITHM=INPLACE; +DROP TABLE t1; +CREATE TABLE t1 (a POLYGON); +ALTER TABLE t1 MODIFY a POLYGON, ALGORITHM=INPLACE; +DROP TABLE t1; +# +# End of 10.1 tests +# diff --git a/mysql-test/r/gis-debug.result b/mysql-test/r/gis-debug.result new file mode 100644 index 00000000000..8593f434c2b --- /dev/null +++ b/mysql-test/r/gis-debug.result @@ -0,0 +1,294 @@ +SET @tmp=ST_GIS_DEBUG(1); +DROP TABLE IF EXISTS p1; +CREATE PROCEDURE p1(dist DOUBLE, geom TEXT) +BEGIN +DECLARE g GEOMETRY; +SET g=GeomFromText(geom); +SELECT geom AS `-----`; +SELECT dist, GeometryType(@buf:=ST_Buffer(g, dist)) AS `buffer`, ROUND(ST_AREA(@buf),2) AS buf_area; +END| +# +# Testing ST_BUFFER with positive distance +# +----- +POINT(0 0)) +dist buffer buf_area +1 POLYGON 3.14 +----- +LineString(0 1, 1 1)) +dist buffer buf_area +1 POLYGON 5.14 +----- +LineString(9 9,8 1,1 5,0 0) +dist buffer buf_area +1 POLYGON 44.63 +----- +Polygon((2 2,2 8,8 8,8 2,2 2)) +dist buffer buf_area +1 POLYGON 63.14 +----- +Polygon((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2)) +dist buffer buf_area +1 POLYGON 95.14 +----- +Polygon((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0)) +dist buffer buf_area +1 POLYGON 174.93 +----- +MultiPoint(9 9,8 1,1 5) +dist buffer buf_area +1 MULTIPOLYGON 9.42 +----- +MultiLineString((0 0,2 2)) +dist buffer buf_area +1 POLYGON 8.80 +----- +MultiLineString((0 0,2 2,0 4)) +dist buffer buf_area +1 POLYGON 14.24 +----- +MultiLineString((0 0,2 2),(0 2,2 0)) +dist buffer buf_area +1 POLYGON 13.59 +----- +MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14)) +dist buffer buf_area +1 MULTIPOLYGON 70.06 +----- +MultiPolygon(((2 2,2 8,8 8,8 2,2 2)), ((9 9,8 1,1 5,9 9))) +dist buffer buf_area +1 POLYGON 73.18 +----- +MultiPolygon(((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))) +dist buffer buf_area +1 POLYGON 73.18 +----- +GeometryCollection(Point(0 0)) +dist buffer buf_area +1 POLYGON 3.14 +----- +GeometryCollection(LineString(0 0, 2 2))) +dist buffer buf_area +1 POLYGON 8.80 +----- +GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2)))) +dist buffer buf_area +1 POLYGON 63.14 +----- +GeometryCollection(MultiPoint(9 9,8 1,1 5)) +dist buffer buf_area +1 MULTIPOLYGON 9.42 +----- +GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1))) +dist buffer buf_area +1 MULTIPOLYGON 10.28 +----- +GeometryCollection(MultiPolygon(((0 0, 3 0, 3 3, 0 3, 0 0)),((6 6,6 9,9 9,9 6,6 6)))) +dist buffer buf_area +1 MULTIPOLYGON 48.28 +----- +GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2))) +dist buffer buf_area +1 POLYGON 75.92 +# +# Testing ST_BUFFER with zero distance +# +----- +POINT(0 0)) +dist buffer buf_area +0 POINT 0.00 +----- +LineString(0 1, 1 1)) +dist buffer buf_area +0 LINESTRING 0.00 +----- +LineString(9 9,8 1,1 5,0 0) +dist buffer buf_area +0 LINESTRING 0.00 +----- +Polygon((2 2,2 8,8 8,8 2,2 2)) +dist buffer buf_area +0 POLYGON 36.00 +----- +Polygon((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2)) +dist buffer buf_area +0 POLYGON 48.00 +----- +Polygon((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0)) +dist buffer buf_area +0 POLYGON 116.00 +----- +MultiPoint(9 9,8 1,1 5) +dist buffer buf_area +0 MULTIPOINT NULL +----- +MultiLineString((0 0,2 2)) +dist buffer buf_area +0 MULTILINESTRING NULL +----- +MultiLineString((0 0,2 2,0 4)) +dist buffer buf_area +0 MULTILINESTRING NULL +----- +MultiLineString((0 0,2 2),(0 2,2 0)) +dist buffer buf_area +0 MULTILINESTRING NULL +----- +MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14)) +dist buffer buf_area +0 MULTILINESTRING NULL +----- +MultiPolygon(((2 2,2 8,8 8,8 2,2 2)), ((9 9,8 1,1 5,9 9))) +dist buffer buf_area +0 MULTIPOLYGON 66.00 +----- +MultiPolygon(((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))) +dist buffer buf_area +0 MULTIPOLYGON 62.00 +----- +GeometryCollection(Point(0 0)) +dist buffer buf_area +0 GEOMETRYCOLLECTION 0.00 +----- +GeometryCollection(LineString(0 0, 2 2))) +dist buffer buf_area +0 GEOMETRYCOLLECTION 0.00 +----- +GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2)))) +dist buffer buf_area +0 GEOMETRYCOLLECTION 36.00 +----- +GeometryCollection(MultiPoint(9 9,8 1,1 5)) +dist buffer buf_area +0 GEOMETRYCOLLECTION NULL +----- +GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1))) +dist buffer buf_area +0 GEOMETRYCOLLECTION NULL +----- +GeometryCollection(MultiPolygon(((0 0, 3 0, 3 3, 0 3, 0 0)),((6 6,6 9,9 9,9 6,6 6)))) +dist buffer buf_area +0 GEOMETRYCOLLECTION 18.00 +----- +GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2))) +dist buffer buf_area +0 GEOMETRYCOLLECTION 36.00 +# +# Testing ST_BUFFER with negative distance +# +----- +POINT(0 0)) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +LineString(0 1, 1 1)) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +LineString(9 9,8 1,1 5,0 0) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +Polygon((2 2,2 8,8 8,8 2,2 2)) +dist buffer buf_area +-1 POLYGON 16.00 +----- +MultiPoint(9 9,8 1,1 5) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +MultiLineString((0 0,2 2)) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +MultiLineString((0 0,2 2,0 4)) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +MultiLineString((0 0,2 2),(0 2,2 0)) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14)) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +GeometryCollection(Point(0 0)) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +GeometryCollection(LineString(0 0, 2 2))) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2)))) +dist buffer buf_area +-1 POLYGON 16.00 +----- +GeometryCollection(MultiPoint(9 9,8 1,1 5)) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1))) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2))) +dist buffer buf_area +-1 POLYGON 16.00 +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)')); +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)')) +0 +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)'))); +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)'))) +GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)),POLYGON((6 6,6 11,11 11,11 6,6 6)),POINT(5 10)) +DROP PROCEDURE p1; +# +# Bug #13833019 ASSERTION `T1->RESULT_RANGE' FAILED IN GCALC_OPERATION_REDUCER::END_COUPLE +# +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)); +GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((0 0,9 4,3 3,0 0)),((2 2,2 2,8 8,2 3,2 2)))'), 3)) +POLYGON +# +# Bug #13832749 HANDLE_FATAL_SIGNAL IN GCALC_FUNCTION::COUNT_INTERNAL +# +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)); +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)) +POLYGON +# +# Bug#13358363 - ASSERTION: N > 0 && N < SINUSES_CALCULATED*2+1 | GET_N_SINCOS/ADD_EDGE_BUFFER +# +DO ST_BUFFER(ST_GEOMCOLLFROMTEXT('linestring(1 1,2 2)'),''); +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_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))) ') +0 +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_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))')))) +2 +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)) '))))); +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)) '))))) +0 +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) ')))); +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) ')))) +POLYGON((9 9,5 2,4 5,9 9)) diff --git a/mysql-test/r/gis-precise.result b/mysql-test/r/gis-precise.result index 094fb3add3d..c0b8b85d216 100644 --- a/mysql-test/r/gis-precise.result +++ b/mysql-test/r/gis-precise.result @@ -200,6 +200,31 @@ result SELECT ST_Equals(PointFromText('POINT (12 13)'),PointFromText('POINT (12 13)')) as result; result 1 +# +# BUG#11755628/47429: INTERSECTION FUNCTION CRASHED MYSQLD +# BUG#11759650/51979: UNION/INTERSECTION OF POLYGONS CRASHES MYSQL +# +SELECT ASTEXT(ST_UNION(GEOMFROMTEXT('POLYGON((525000 183300,525400 +183300,525400 18370, 525000 183700,525000 183300))'), +geomfromtext('POLYGON((525298.67 183511.53,525296.57 +183510.39,525296.42 183510.31,525289.11 183506.62,525283.17 +183503.47,525280.98 183502.26,525278.63 183500.97,525278.39 +183500.84,525276.79 183500,525260.7 183491.55,525263.95 +183484.75,525265.58 183481.95,525278.97 183488.73,525276.5 +183493.45,525275.5 183495.7,525280.35 183498.2,525282.3 +183499.1,525282.2 183499.3,525283.55 183500,525301.75 +183509.35,525304.45 183504.25,525307.85 183504.95,525304.5 +183510.83,525302.81 183513.8,525298.67 183511.53),(525275.06 +183489.89,525272.06 183488.37,525268.94 183494.51,525271.94 +183496.03,525275.06 183489.89),(525263.26 183491.55,525266.15 +183493.04,525269.88 183485.82,525266.99 183484.33,525263.26 +183491.55))'))) st_u; +st_u +MULTIPOLYGON(((525400 18370,525000.9677614468 183300,525400 183300,525400 18370)),((525000 183300,525000 183700,525000.9677614468 183300,525000 183300)),((525265.58 183481.95,525263.95 183484.75,525260.7 183491.55,525276.79 183500,525278.39 183500.84,525278.63 183500.97,525280.98 183502.26,525283.17 183503.47,525289.11 183506.62,525296.42 183510.31,525296.57 183510.39,525298.67 183511.53,525302.81 183513.8,525304.5 183510.83,525307.85 183504.95,525304.45 183504.25,525301.75 183509.35,525283.55 183500,525282.2 183499.3,525282.3 183499.1,525280.35 183498.2,525275.5 183495.7,525276.5 183493.45,525278.97 183488.73,525265.58 183481.95),(525266.99 183484.33,525263.26 183491.55,525266.15 183493.04,525269.88 183485.82,525266.99 183484.33),(525272.06 183488.37,525268.94 183494.51,525271.94 183496.03,525275.06 183489.89,525272.06 183488.37))) +SET @a=0x0000000001030000000200000005000000000000000000000000000000000000000000000000002440000000000000000000000000000024400000000000002440000000000000000000000000000024400000000000000000000000000000000000000000000000000000F03F000000000000F03F0000000000000040000000000000F03F00000000000000400000000000000040000000000000F03F0000000000000040000000000000F03F000000000000F03F; +SELECT ASTEXT(TOUCHES(@a, GEOMFROMTEXT('point(0 0)'))) t; +t +NULL SELECT astext(ST_UNION ( PolyFromText('POLYGON(( 2 2 ,3 2,2 7,2 2),( 0 0,8 2,1 9,0 0))'), ExteriorRing( Envelope( MultiLineStringFromText('MULTILINESTRING((3 4,5 3),(3 0,0 5))'))))); @@ -452,3 +477,296 @@ ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER( POLYGONFROMTEXT( 'POLYGON( ( 0.0 -3.0, select astext(buffer(st_linestringfromwkb(linestring(point(-1,1), point(-1,-2))),-1)); astext(buffer(st_linestringfromwkb(linestring(point(-1,1), point(-1,-2))),-1)) GEOMETRYCOLLECTION EMPTY +DROP TABLE IF EXISTS p1; +CREATE PROCEDURE p1(dist DOUBLE, geom TEXT) +BEGIN +DECLARE g GEOMETRY; +SET g=GeomFromText(geom); +SELECT geom AS `-----`; +SELECT dist, GeometryType(@buf:=ST_Buffer(g, dist)) AS `buffer`, ROUND(ST_AREA(@buf),2) AS buf_area; +END| +# +# Testing ST_BUFFER with positive distance +# +----- +POINT(0 0)) +dist buffer buf_area +1 POLYGON 3.14 +----- +LineString(0 1, 1 1)) +dist buffer buf_area +1 POLYGON 5.14 +----- +LineString(9 9,8 1,1 5,0 0) +dist buffer buf_area +1 POLYGON 44.63 +----- +Polygon((2 2,2 8,8 8,8 2,2 2)) +dist buffer buf_area +1 POLYGON 63.14 +----- +Polygon((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2)) +dist buffer buf_area +1 POLYGON 95.14 +----- +Polygon((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0)) +dist buffer buf_area +1 POLYGON 174.93 +----- +MultiPoint(9 9,8 1,1 5) +dist buffer buf_area +1 MULTIPOLYGON 9.42 +----- +MultiLineString((0 0,2 2)) +dist buffer buf_area +1 POLYGON 8.80 +----- +MultiLineString((0 0,2 2,0 4)) +dist buffer buf_area +1 POLYGON 14.24 +----- +MultiLineString((0 0,2 2),(0 2,2 0)) +dist buffer buf_area +1 POLYGON 13.59 +----- +MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14)) +dist buffer buf_area +1 MULTIPOLYGON 70.06 +----- +MultiPolygon(((2 2,2 8,8 8,8 2,2 2)), ((9 9,8 1,1 5,9 9))) +dist buffer buf_area +1 POLYGON 73.18 +----- +MultiPolygon(((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))) +dist buffer buf_area +1 POLYGON 73.18 +----- +GeometryCollection(Point(0 0)) +dist buffer buf_area +1 POLYGON 3.14 +----- +GeometryCollection(LineString(0 0, 2 2))) +dist buffer buf_area +1 POLYGON 8.80 +----- +GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2)))) +dist buffer buf_area +1 POLYGON 63.14 +----- +GeometryCollection(MultiPoint(9 9,8 1,1 5)) +dist buffer buf_area +1 MULTIPOLYGON 9.42 +----- +GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1))) +dist buffer buf_area +1 MULTIPOLYGON 10.28 +----- +GeometryCollection(MultiPolygon(((0 0, 3 0, 3 3, 0 3, 0 0)),((6 6,6 9,9 9,9 6,6 6)))) +dist buffer buf_area +1 MULTIPOLYGON 48.28 +----- +GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2))) +dist buffer buf_area +1 POLYGON 75.92 +# +# Testing ST_BUFFER with zero distance +# +----- +POINT(0 0)) +dist buffer buf_area +0 POINT 0.00 +----- +LineString(0 1, 1 1)) +dist buffer buf_area +0 LINESTRING 0.00 +----- +LineString(9 9,8 1,1 5,0 0) +dist buffer buf_area +0 LINESTRING 0.00 +----- +Polygon((2 2,2 8,8 8,8 2,2 2)) +dist buffer buf_area +0 POLYGON 36.00 +----- +Polygon((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2)) +dist buffer buf_area +0 POLYGON 48.00 +----- +Polygon((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0)) +dist buffer buf_area +0 POLYGON 116.00 +----- +MultiPoint(9 9,8 1,1 5) +dist buffer buf_area +0 MULTIPOINT NULL +----- +MultiLineString((0 0,2 2)) +dist buffer buf_area +0 MULTILINESTRING NULL +----- +MultiLineString((0 0,2 2,0 4)) +dist buffer buf_area +0 MULTILINESTRING NULL +----- +MultiLineString((0 0,2 2),(0 2,2 0)) +dist buffer buf_area +0 MULTILINESTRING NULL +----- +MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14)) +dist buffer buf_area +0 MULTILINESTRING NULL +----- +MultiPolygon(((2 2,2 8,8 8,8 2,2 2)), ((9 9,8 1,1 5,9 9))) +dist buffer buf_area +0 MULTIPOLYGON 66.00 +----- +MultiPolygon(((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))) +dist buffer buf_area +0 MULTIPOLYGON 62.00 +----- +GeometryCollection(Point(0 0)) +dist buffer buf_area +0 GEOMETRYCOLLECTION 0.00 +----- +GeometryCollection(LineString(0 0, 2 2))) +dist buffer buf_area +0 GEOMETRYCOLLECTION 0.00 +----- +GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2)))) +dist buffer buf_area +0 GEOMETRYCOLLECTION 36.00 +----- +GeometryCollection(MultiPoint(9 9,8 1,1 5)) +dist buffer buf_area +0 GEOMETRYCOLLECTION NULL +----- +GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1))) +dist buffer buf_area +0 GEOMETRYCOLLECTION NULL +----- +GeometryCollection(MultiPolygon(((0 0, 3 0, 3 3, 0 3, 0 0)),((6 6,6 9,9 9,9 6,6 6)))) +dist buffer buf_area +0 GEOMETRYCOLLECTION 18.00 +----- +GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2))) +dist buffer buf_area +0 GEOMETRYCOLLECTION 36.00 +# +# Testing ST_BUFFER with negative distance +# +----- +POINT(0 0)) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +LineString(0 1, 1 1)) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +LineString(9 9,8 1,1 5,0 0) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +Polygon((2 2,2 8,8 8,8 2,2 2)) +dist buffer buf_area +-1 POLYGON 16.00 +----- +MultiPoint(9 9,8 1,1 5) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +MultiLineString((0 0,2 2)) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +MultiLineString((0 0,2 2,0 4)) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +MultiLineString((0 0,2 2),(0 2,2 0)) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14)) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +GeometryCollection(Point(0 0)) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +GeometryCollection(LineString(0 0, 2 2))) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2)))) +dist buffer buf_area +-1 POLYGON 16.00 +----- +GeometryCollection(MultiPoint(9 9,8 1,1 5)) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1))) +dist buffer buf_area +-1 GEOMETRYCOLLECTION 0.00 +----- +GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2))) +dist buffer buf_area +-1 POLYGON 16.00 +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)')); +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)')) +0 +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)'))); +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)'))) +GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)),POLYGON((6 6,6 11,11 11,11 6,6 6)),POINT(5 10)) +DROP PROCEDURE p1; +# +# Bug #13833019 ASSERTION `T1->RESULT_RANGE' FAILED IN GCALC_OPERATION_REDUCER::END_COUPLE +# +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)); +GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((0 0,9 4,3 3,0 0)),((2 2,2 2,8 8,2 3,2 2)))'), 3)) +POLYGON +# +# Bug #13832749 HANDLE_FATAL_SIGNAL IN GCALC_FUNCTION::COUNT_INTERNAL +# +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)); +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)) +POLYGON +# +# Bug#13358363 - ASSERTION: N > 0 && N < SINUSES_CALCULATED*2+1 | GET_N_SINCOS/ADD_EDGE_BUFFER +# +DO ST_BUFFER(ST_GEOMCOLLFROMTEXT('linestring(1 1,2 2)'),''); +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_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))) ') +0 +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_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))')))) +2 +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)) '))))); +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)) '))))) +0 +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) ')))); +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) ')))) +POLYGON((9 9,5 2,4 5,9 9)) diff --git a/mysql-test/r/gis-rt-precise.result b/mysql-test/r/gis-rt-precise.result index 3f4f014fb78..65583a0ce0d 100644 --- a/mysql-test/r/gis-rt-precise.result +++ b/mysql-test/r/gis-rt-precise.result @@ -60,3 +60,25 @@ fid AsText(g) 45 LINESTRING(51 51,60 60) DROP TABLE t1; End of 5.5 tests. +CREATE TABLE t1 ( +coordinate point NOT NULL, +SPATIAL KEY coordinate (coordinate) +) ENGINE=Aria DEFAULT CHARSET=ascii PAGE_CHECKSUM=1; +SHOW COLUMNS FROM t1; +Field Type Null Key Default Extra +coordinate point NO MUL NULL +INSERT INTO t1 (coordinate) VALUES(ST_PointFromText("POINT(0 0)")); +INSERT INTO t1 (coordinate) VALUES(ST_PointFromText("POINT(10 0)")); +INSERT INTO t1 (coordinate) VALUES(ST_PointFromText("POINT(10 10)")); +INSERT INTO t1 (coordinate) VALUES(ST_PointFromText("POINT(0 10)")); +INSERT INTO t1 (coordinate) VALUES(ST_PointFromText("POINT(5 5)")); +SELECT astext(coordinate) FROM t1 WHERE ST_Intersects(ST_LineFromText("LINESTRING(0 0, 10 0, 10 10, 0 10)"), coordinate); +astext(coordinate) +POINT(0 0) +POINT(10 0) +POINT(10 10) +POINT(0 10) +SHOW COLUMNS FROM t1; +Field Type Null Key Default Extra +coordinate point NO MUL NULL +DROP TABLE t1; diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result index 22c30479125..c400ebb39ef 100644 --- a/mysql-test/r/gis-rtree.result +++ b/mysql-test/r/gis-rtree.result @@ -712,7 +712,7 @@ count(*) DROP TABLE t2; drop table if exists t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE t1 (a geometry NOT NULL, SPATIAL (a)); INSERT INTO t1 VALUES (GeomFromText("LINESTRING(100 100, 200 200, 300 300)")); INSERT INTO t1 VALUES (GeomFromText("LINESTRING(100 100, 200 200, 300 300)")); diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index 02e121b8513..f77cd4d14bf 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -333,8 +333,8 @@ fid IsClosed(g) 116 0 SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon; fid AsText(Centroid(g)) -117 POINT(55.58852775304245 17.426536064113982) -118 POINT(55.58852775304245 17.426536064113982) +117 POINT(57.98031067576927 17.854754130800433) +118 POINT(57.98031067576927 17.854754130800433) 119 POINT(2 2) SELECT fid, Area(g) FROM gis_multi_polygon; fid Area(g) @@ -684,11 +684,11 @@ insert into t1 values ('85984',GeomFromText('MULTIPOLYGON(((-115.006363 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from t1 where object_id=85998; object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo)) -85998 MULTIPOLYGON 1 POINT(115.31877315203187 -36.23747282102153) +85998 MULTIPOLYGON 1 POINT(115.2970604672862 -36.23335610879993) select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from t1 where object_id=85984; object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo)) -85984 MULTIPOLYGON 1 POINT(-114.87787186923313 36.33101763469059) +85984 MULTIPOLYGON 1 POINT(-114.86854472054372 36.34725218253213) drop table t1; create table t1 (fl geometry not null); insert into t1 values (1); @@ -835,6 +835,17 @@ create table t1 (g geometry not null); insert into t1 values(default); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1; +CREATE TABLE t1 (a GEOMETRY); +CREATE VIEW v1 AS SELECT GeomFromwkb(ASBINARY(a)) FROM t1; +CREATE VIEW v2 AS SELECT a FROM t1; +DESCRIBE v1; +Field Type Null Key Default Extra +GeomFromwkb(ASBINARY(a)) geometry YES NULL +DESCRIBE v2; +Field Type Null Key Default Extra +a geometry YES NULL +DROP VIEW v1,v2; +DROP TABLE t1; create table t1 (name VARCHAR(100), square GEOMETRY); INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); @@ -919,25 +930,25 @@ SELECT Overlaps(@horiz1, @point2) FROM DUAL; Overlaps(@horiz1, @point2) 0 DROP TABLE t1; -create table t1(f1 geometry, f2 point, f3 linestring); +create table t1(f1 geometry, f2 linestring, f3 linestring); select f1 from t1 union select f1 from t1; f1 -insert into t1 (f2,f3) values (GeomFromText('POINT(1 1)'), +insert into t1 (f2,f3) values (GeomFromText('LINESTRING(1 1, 2 2)'), GeomFromText('LINESTRING(0 0,1 1,2 2)')); select AsText(f2),AsText(f3) from t1; AsText(f2) AsText(f3) -POINT(1 1) LINESTRING(0 0,1 1,2 2) +LINESTRING(1 1,2 2) LINESTRING(0 0,1 1,2 2) select AsText(a) from (select f2 as a from t1 union select f3 from t1) t; AsText(a) -POINT(1 1) +LINESTRING(1 1,2 2) LINESTRING(0 0,1 1,2 2) create table t2 as select f2 as a from t1 union select f3 from t1; desc t2; Field Type Null Key Default Extra -a geometry YES NULL +a linestring YES NULL select AsText(a) from t2; AsText(a) -POINT(1 1) +LINESTRING(1 1,2 2) LINESTRING(0 0,1 1,2 2) drop table t1, t2; SELECT 1; @@ -1619,3 +1630,34 @@ SELECT ASTEXT(p) FROM v1; ASTEXT(p) POINT(1 1) DROP VIEW v1; +# +# Start of 10.0 tests +# +# +# MDEV-12495 Conditional jump depends on uninitialised value for: SELECT NULL UNION geom_expression +# +SELECT AsText(g) FROM (SELECT NULL AS g UNION SELECT Point(1,1)) AS t1; +AsText(g) +NULL +POINT(1 1) +# +# MDEV-10306 Wrong results with combination of CONCAT, SUBSTR and CONVERT in subquery +# +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch='derived_merge=on'; +CREATE TABLE t1 (x INT, y INT); +INSERT INTO t1 VALUES(0,0); +SELECT LENGTH(t2) c2 FROM (SELECT ST_BUFFER(POINT(x,y), 0) t2 FROM t1) sub; +c2 +25 +SELECT LENGTH(CONCAT(t2,'-',t2)) c2 FROM (SELECT ST_BUFFER(POINT(x,y), 0) t2 FROM t1) sub; +c2 +51 +SELECT LENGTH(CONCAT(t2,'--',t2)) c2 FROM (SELECT ST_BUFFER(POINT(x,y), 0) t2 FROM t1) sub; +c2 +52 +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; +# +# End 10.0 tests +# diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 94087393489..0b17e82e5a9 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -55,6 +55,8 @@ max_connections 0 max_user_connections 0 plugin authentication_string +password_expired N +is_role N show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' @@ -126,6 +128,8 @@ max_connections 0 max_user_connections 0 plugin authentication_string +password_expired N +is_role N show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 @@ -173,6 +177,8 @@ max_connections 30 max_user_connections 0 plugin authentication_string +password_expired N +is_role N show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30 @@ -612,7 +618,7 @@ create database mysqltest; create table mysqltest.t1 (a int,b int,c int); grant all on mysqltest.t1 to mysqltest_1@localhost; alter table t1 rename t2; -ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' +ERROR 42000: INSERT, CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; delete from mysql.user where user=_binary'mysqltest_1'; drop database mysqltest; @@ -650,9 +656,9 @@ SHOW FIELDS FROM mysql.tables_priv; Field Type Null Key Default Extra Host char(60) NO PRI Db char(64) NO PRI -User char(16) NO PRI +User char(80) NO PRI Table_name char(64) NO PRI -Grantor char(77) NO MUL +Grantor char(141) NO MUL Timestamp timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') NO Column_priv set('Select','Insert','Update','References') NO @@ -747,28 +753,28 @@ show grants for root@localhost; Grants for root@localhost GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION GRANT SELECT ON `ÂÄ`.* TO 'root'@'localhost' -GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION +GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION flush privileges; show grants for root@localhost; Grants for root@localhost GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION GRANT SELECT ON `ÂÄ`.* TO 'root'@'localhost' -GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION +GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION drop database ÂÄ; revoke all privileges on ÂÄ.* from root@localhost; show grants for root@localhost; Grants for root@localhost GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION +GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION set names latin1; create user mysqltest_7@; set password for mysqltest_7@ = password('systpass'); show grants for mysqltest_7@; -Grants for mysqltest_7@ -GRANT USAGE ON *.* TO 'mysqltest_7'@'' IDENTIFIED BY PASSWORD '*2FB071A056F9BB745219D9C876814231DAF46517' +Grants for mysqltest_7@% +GRANT USAGE ON *.* TO 'mysqltest_7'@'%' IDENTIFIED BY PASSWORD '*2FB071A056F9BB745219D9C876814231DAF46517' drop user mysqltest_7@; show grants for mysqltest_7@; -ERROR 42000: There is no such grant defined for user 'mysqltest_7' on host '' +ERROR 42000: There is no such grant defined for user 'mysqltest_7' on host '%' create database mysqltest; use mysqltest; create table t1(f1 int); @@ -804,30 +810,28 @@ create table t2 as select * from mysql.user where user=''; delete from mysql.user where user=''; flush privileges; create user mysqltest_8@''; -create user mysqltest_8; create user mysqltest_8@host8; create user mysqltest_8@''; -ERROR HY000: Operation CREATE USER failed for 'mysqltest_8'@'' +ERROR HY000: Operation CREATE USER failed for 'mysqltest_8'@'%' create user mysqltest_8; ERROR HY000: Operation CREATE USER failed for 'mysqltest_8'@'%' create user mysqltest_8@host8; ERROR HY000: Operation CREATE USER failed for 'mysqltest_8'@'host8' select user, QUOTE(host) from mysql.user where user="mysqltest_8"; user QUOTE(host) -mysqltest_8 '' mysqltest_8 '%' mysqltest_8 'host8' Schema privileges grant select on mysqltest.* to mysqltest_8@''; show grants for mysqltest_8@''; -Grants for mysqltest_8@ -GRANT USAGE ON *.* TO 'mysqltest_8'@'' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_8'@'' +Grants for mysqltest_8@% +GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT SELECT ON `mysqltest`.* TO 'mysqltest_8'@'%' grant select on mysqltest.* to mysqltest_8@; show grants for mysqltest_8@; -Grants for mysqltest_8@ -GRANT USAGE ON *.* TO 'mysqltest_8'@'' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_8'@'' +Grants for mysqltest_8@% +GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT SELECT ON `mysqltest`.* TO 'mysqltest_8'@'%' grant select on mysqltest.* to mysqltest_8; show grants for mysqltest_8; Grants for mysqltest_8@% @@ -837,14 +841,12 @@ select * from information_schema.schema_privileges where grantee like "'mysqltest_8'%"; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE 'mysqltest_8'@'%' def mysqltest SELECT NO -'mysqltest_8'@'' def mysqltest SELECT NO select * from t1; a revoke select on mysqltest.* from mysqltest_8@''; -revoke select on mysqltest.* from mysqltest_8; show grants for mysqltest_8@''; -Grants for mysqltest_8@ -GRANT USAGE ON *.* TO 'mysqltest_8'@'' +Grants for mysqltest_8@% +GRANT USAGE ON *.* TO 'mysqltest_8'@'%' show grants for mysqltest_8; Grants for mysqltest_8@% GRANT USAGE ON *.* TO 'mysqltest_8'@'%' @@ -853,35 +855,35 @@ where grantee like "'mysqltest_8'%"; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE flush privileges; show grants for mysqltest_8@''; -Grants for mysqltest_8@ -GRANT USAGE ON *.* TO 'mysqltest_8'@'' +Grants for mysqltest_8@% +GRANT USAGE ON *.* TO 'mysqltest_8'@'%' show grants for mysqltest_8@; -Grants for mysqltest_8@ -GRANT USAGE ON *.* TO 'mysqltest_8'@'' +Grants for mysqltest_8@% +GRANT USAGE ON *.* TO 'mysqltest_8'@'%' grant select on mysqltest.* to mysqltest_8@''; flush privileges; show grants for mysqltest_8@; -Grants for mysqltest_8@ -GRANT USAGE ON *.* TO 'mysqltest_8'@'' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_8'@'' +Grants for mysqltest_8@% +GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT SELECT ON `mysqltest`.* TO 'mysqltest_8'@'%' revoke select on mysqltest.* from mysqltest_8@''; flush privileges; Column privileges grant update (a) on t1 to mysqltest_8@''; grant update (a) on t1 to mysqltest_8; show grants for mysqltest_8@''; -Grants for mysqltest_8@ -GRANT USAGE ON *.* TO 'mysqltest_8'@'' -GRANT UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'' +Grants for mysqltest_8@% +GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'%' show grants for mysqltest_8; Grants for mysqltest_8@% GRANT USAGE ON *.* TO 'mysqltest_8'@'%' GRANT UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'%' flush privileges; show grants for mysqltest_8@''; -Grants for mysqltest_8@ -GRANT USAGE ON *.* TO 'mysqltest_8'@'' -GRANT UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'' +Grants for mysqltest_8@% +GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'%' show grants for mysqltest_8; Grants for mysqltest_8@% GRANT USAGE ON *.* TO 'mysqltest_8'@'%' @@ -889,14 +891,12 @@ GRANT UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'%' select * from information_schema.column_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE 'mysqltest_8'@'%' def test t1 a UPDATE NO -'mysqltest_8'@'' def test t1 a UPDATE NO select * from t1; a revoke update (a) on t1 from mysqltest_8@''; -revoke update (a) on t1 from mysqltest_8; show grants for mysqltest_8@''; -Grants for mysqltest_8@ -GRANT USAGE ON *.* TO 'mysqltest_8'@'' +Grants for mysqltest_8@% +GRANT USAGE ON *.* TO 'mysqltest_8'@'%' show grants for mysqltest_8; Grants for mysqltest_8@% GRANT USAGE ON *.* TO 'mysqltest_8'@'%' @@ -904,8 +904,8 @@ select * from information_schema.column_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE flush privileges; show grants for mysqltest_8@''; -Grants for mysqltest_8@ -GRANT USAGE ON *.* TO 'mysqltest_8'@'' +Grants for mysqltest_8@% +GRANT USAGE ON *.* TO 'mysqltest_8'@'%' show grants for mysqltest_8; Grants for mysqltest_8@% GRANT USAGE ON *.* TO 'mysqltest_8'@'%' @@ -913,18 +913,18 @@ Table privileges grant update on t1 to mysqltest_8@''; grant update on t1 to mysqltest_8; show grants for mysqltest_8@''; -Grants for mysqltest_8@ -GRANT USAGE ON *.* TO 'mysqltest_8'@'' -GRANT UPDATE ON `test`.`t1` TO 'mysqltest_8'@'' +Grants for mysqltest_8@% +GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT UPDATE ON `test`.`t1` TO 'mysqltest_8'@'%' show grants for mysqltest_8; Grants for mysqltest_8@% GRANT USAGE ON *.* TO 'mysqltest_8'@'%' GRANT UPDATE ON `test`.`t1` TO 'mysqltest_8'@'%' flush privileges; show grants for mysqltest_8@''; -Grants for mysqltest_8@ -GRANT USAGE ON *.* TO 'mysqltest_8'@'' -GRANT UPDATE ON `test`.`t1` TO 'mysqltest_8'@'' +Grants for mysqltest_8@% +GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT UPDATE ON `test`.`t1` TO 'mysqltest_8'@'%' show grants for mysqltest_8; Grants for mysqltest_8@% GRANT USAGE ON *.* TO 'mysqltest_8'@'%' @@ -932,14 +932,12 @@ GRANT UPDATE ON `test`.`t1` TO 'mysqltest_8'@'%' select * from information_schema.table_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'mysqltest_8'@'%' def test t1 UPDATE NO -'mysqltest_8'@'' def test t1 UPDATE NO select * from t1; a revoke update on t1 from mysqltest_8@''; -revoke update on t1 from mysqltest_8; show grants for mysqltest_8@''; -Grants for mysqltest_8@ -GRANT USAGE ON *.* TO 'mysqltest_8'@'' +Grants for mysqltest_8@% +GRANT USAGE ON *.* TO 'mysqltest_8'@'%' show grants for mysqltest_8; Grants for mysqltest_8@% GRANT USAGE ON *.* TO 'mysqltest_8'@'%' @@ -947,8 +945,8 @@ select * from information_schema.table_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE flush privileges; show grants for mysqltest_8@''; -Grants for mysqltest_8@ -GRANT USAGE ON *.* TO 'mysqltest_8'@'' +Grants for mysqltest_8@% +GRANT USAGE ON *.* TO 'mysqltest_8'@'%' show grants for mysqltest_8; Grants for mysqltest_8@% GRANT USAGE ON *.* TO 'mysqltest_8'@'%' @@ -959,45 +957,36 @@ grant update on t1 to mysqltest_8@''; grant update (a) on t1 to mysqltest_8@''; grant all privileges on mysqltest.* to mysqltest_8; show grants for mysqltest_8@''; -Grants for mysqltest_8@ -GRANT USAGE ON *.* TO 'mysqltest_8'@'' -GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_8'@'' -GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'' +Grants for mysqltest_8@% +GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_8'@'%' +GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'%' show grants for mysqltest_8; Grants for mysqltest_8@% GRANT USAGE ON *.* TO 'mysqltest_8'@'%' GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_8'@'%' +GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'%' select * from information_schema.user_privileges where grantee like "'mysqltest_8'%"; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE 'mysqltest_8'@'host8' def USAGE NO 'mysqltest_8'@'%' def USAGE NO -'mysqltest_8'@'' def USAGE NO select * from t1; a flush privileges; show grants for mysqltest_8@''; -Grants for mysqltest_8@ -GRANT USAGE ON *.* TO 'mysqltest_8'@'' -GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_8'@'' -GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'' -show grants for mysqltest_8; Grants for mysqltest_8@% GRANT USAGE ON *.* TO 'mysqltest_8'@'%' GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_8'@'%' -drop user mysqltest_8@''; -show grants for mysqltest_8@''; -ERROR 42000: There is no such grant defined for user 'mysqltest_8' on host '' +GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'%' show grants for mysqltest_8; Grants for mysqltest_8@% GRANT USAGE ON *.* TO 'mysqltest_8'@'%' GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_8'@'%' -select * from information_schema.user_privileges -where grantee like "'mysqltest_8'%"; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'mysqltest_8'@'host8' def USAGE NO -'mysqltest_8'@'%' def USAGE NO -drop user mysqltest_8; +GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'%' +drop user mysqltest_8@''; +show grants for mysqltest_8@''; +ERROR 42000: There is no such grant defined for user 'mysqltest_8' on host '%' connect(localhost,mysqltest_8,,test,MASTER_PORT,MASTER_SOCKET); ERROR 28000: Access denied for user 'mysqltest_8'@'localhost' (using password: NO) show grants for mysqltest_8; @@ -1085,8 +1074,8 @@ DROP DATABASE mysqltest3; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'mysqltest_1'@'localhost'; DROP USER 'mysqltest_1'@'localhost'; USE test; -create user mysqltest1_thisisreallytoolong; -ERROR HY000: String 'mysqltest1_thisisreallytoolong' is too long for user name (should be no longer than 16) +create user longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789; +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) CREATE DATABASE mysqltest1; CREATE TABLE mysqltest1.t1 ( int_field INTEGER UNSIGNED NOT NULL, @@ -1106,9 +1095,9 @@ Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT SELECT ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' RENAME TABLE t1 TO t2; -ERROR 42000: DROP,ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: DROP, ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' ALTER TABLE t1 RENAME TO t2; -ERROR 42000: DROP,ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: DROP, ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' GRANT DROP ON mysqltest1.t1 TO mysqltest_1@localhost; RENAME TABLE t1 TO t2; ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' @@ -1120,9 +1109,9 @@ Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT SELECT, DROP, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' RENAME TABLE t1 TO t2; -ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' +ERROR 42000: INSERT, CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' ALTER TABLE t1 RENAME TO t2; -ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' +ERROR 42000: INSERT, CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' GRANT INSERT, CREATE ON mysqltest1.t1 TO mysqltest_1@localhost; SHOW GRANTS; Grants for mysqltest_1@localhost @@ -1153,28 +1142,28 @@ ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1 DROP USER mysqltest_1@localhost; DROP DATABASE mysqltest1; USE test; -GRANT CREATE ON mysqltest.* TO 1234567890abcdefGHIKL@localhost; -ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16) +GRANT CREATE ON mysqltest.* TO longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) GRANT CREATE ON mysqltest.* TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) -REVOKE CREATE ON mysqltest.* FROM 1234567890abcdefGHIKL@localhost; -ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16) +REVOKE CREATE ON mysqltest.* FROM longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) REVOKE CREATE ON mysqltest.* FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) -GRANT CREATE ON t1 TO 1234567890abcdefGHIKL@localhost; -ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16) +GRANT CREATE ON t1 TO longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) GRANT CREATE ON t1 TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) -REVOKE CREATE ON t1 FROM 1234567890abcdefGHIKL@localhost; -ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16) +REVOKE CREATE ON t1 FROM longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) REVOKE CREATE ON t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) -GRANT EXECUTE ON PROCEDURE p1 TO 1234567890abcdefGHIKL@localhost; -ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16) +GRANT EXECUTE ON PROCEDURE p1 TO longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) GRANT EXECUTE ON PROCEDURE p1 TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) -REVOKE EXECUTE ON PROCEDURE p1 FROM 1234567890abcdefGHIKL@localhost; -ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16) +REVOKE EXECUTE ON PROCEDURE p1 FROM longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) REVOKE EXECUTE ON PROCEDURE t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) CREATE USER bug23556@localhost; @@ -1353,7 +1342,7 @@ FLUSH PRIVILEGES; DROP TABLE mysql.user; drop table if exists test; Warnings: -Note 1051 Unknown table 'test' +Note 1051 Unknown table 'test.test' drop function if exists test_function; Warnings: Note 1305 FUNCTION test.test_function does not exist @@ -1652,8 +1641,8 @@ user() юзер_юзер@localhost revoke all on test.* from юзер_юзер@localhost; drop user юзер_юзер@localhost; -grant select on test.* to очень_длинный_юзер@localhost; -ERROR HY000: String 'очень_длинный_юзер' is too long for user name (should be no longer than 16) +grant select on test.* to очень_длинный_юзер890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890@localhost; +ERROR HY000: String 'очень_длинный_юзер890123456789012345678901234567890123' is too long for user name (should be no longer than 80) set names default; create database mysqltest; use mysqltest; @@ -1696,7 +1685,6 @@ use test; FLUSH PRIVILEGES without procs_priv table. RENAME TABLE mysql.procs_priv TO mysql.procs_gone; FLUSH PRIVILEGES; -ERROR 42S02: Table 'mysql.procs_priv' doesn't exist Assigning privileges without procs_priv table. CREATE DATABASE mysqltest1; CREATE PROCEDURE mysqltest1.test() SQL SECURITY DEFINER @@ -2586,3 +2574,29 @@ foo@localhost foo@127.0.0.1 # Clean-up DROP USER foo@'127.0.0.1'; # End of Bug#12766319 +# +# Bug#11756966 - 48958: STORED PROCEDURES CAN BE LEVERAGED TO BYPASS +# DATABASE SECURITY +# +DROP DATABASE IF EXISTS secret; +DROP DATABASE IF EXISTS no_such_db; +CREATE DATABASE secret; +GRANT USAGE ON *.* TO untrusted@localhost; +# Connection con1 +SHOW GRANTS; +Grants for untrusted@localhost +GRANT USAGE ON *.* TO 'untrusted'@'localhost' +SHOW DATABASES; +Database +information_schema +test +# Both statements below should fail with the same error. +# They used to give different errors, thereby +# hinting that the secret database exists. +CREATE PROCEDURE no_such_db.foo() BEGIN END; +ERROR 42000: Access denied for user 'untrusted'@'localhost' to database 'no_such_db' +CREATE PROCEDURE secret.peek_at_secret() BEGIN END; +ERROR 42000: Access denied for user 'untrusted'@'localhost' to database 'secret' +# Connection default +DROP USER untrusted@localhost; +DROP DATABASE secret; diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result index 196f6601d48..9e9b3ffc4e5 100644 --- a/mysql-test/r/grant2.result +++ b/mysql-test/r/grant2.result @@ -36,7 +36,7 @@ select @@sql_mode; @@sql_mode NO_AUTO_CREATE_USER grant select on `my\_1`.* to mysqltest_4@localhost with grant option; -ERROR 42000: Can't find any matching row in the user table +ERROR 28000: Can't find any matching row in the user table grant select on `my\_1`.* to mysqltest_4@localhost identified by 'mypass' with grant option; show grants for mysqltest_1@localhost; @@ -335,7 +335,7 @@ delete from mysql.user where user like 'mysqltest\_1'; flush privileges; drop database mysqltest_1; set password = password("changed"); -ERROR 42000: Can't find any matching row in the user table +ERROR 42000: You are using MariaDB as an anonymous user and anonymous users are not allowed to change passwords lock table mysql.user write; flush privileges; grant all on *.* to 'mysqltest_1'@'localhost'; @@ -472,3 +472,376 @@ root localhost Y FLUSH PRIVILEGES; USE test; End of 5.1 tests + +# -- +# -- Bug#11746602: 27480 - Extend CREATE TEMPORARY TABLES privilege to +# -- allow temp table operations +# -- +# -- Bug#12771903: User with create temporary tables priv only has full +# -- access to a regular table +# -- + +############################################################################ +# Setup environment. +########################################################################### +DROP DATABASE IF EXISTS mysqltest_db1; +DROP DATABASE IF EXISTS mysqltest_db2; +CREATE DATABASE mysqltest_db1; +CREATE DATABASE mysqltest_db2; +# mysqltest_u1@localhost has CREATE_TMP_ACL, FILE_ACL and EXECUTE_ACL only +# (EXECUTE_ACL is needed to call p0, and FILE_ACL is needed for SELECT +# OUTFILE/LOAD DATA INFILE). +GRANT FILE ON *.* TO mysqltest_u1@localhost; +GRANT CREATE TEMPORARY TABLES, EXECUTE ON mysqltest_db1.* TO mysqltest_u1@localhost; +# mysqltest_u2@localhost has all privileges but CREATE_TMP_ACL. +GRANT ALL PRIVILEGES ON mysqltest_db1.* TO mysqltest_u2@localhost; +REVOKE CREATE TEMPORARY TABLES ON mysqltest_db1.* FROM mysqltest_u2@localhost; +# mysqltest_u3@localhost has CREATE_TMP_ACL & EXECUTE_ACL. +# This user is required to check SUID-stored-routines. +GRANT CREATE TEMPORARY TABLES ON mysqltest_db1.* TO mysqltest_u3@localhost; +GRANT EXECUTE ON mysqltest_db1.* TO mysqltest_u3@localhost; +# mysqltest_u4@localhost has only EXECUTE_ACL. +# We need this user to check that once created temporary tables +# are accessible by anyone. +GRANT EXECUTE ON mysqltest_db1.* TO mysqltest_u4@localhost; +# mysqltest_u5@localhost has CREATE_TMP_ACL and SELECT_ACL, UPDATE_ACL, +# DELETE_ACL on mysqltest_db1; and only CREATE_TMP_ACL on mysqltest_db2. +# By means of this user we check privileges required for merge tables. +GRANT CREATE TEMPORARY TABLES ON mysqltest_db1.* TO mysqltest_u5@localhost; +GRANT CREATE TEMPORARY TABLES ON mysqltest_db2.* TO mysqltest_u5@localhost; +GRANT SELECT, UPDATE, DELETE ON mysqltest_db1.* TO mysqltest_u5@localhost; +# Create stored routine to test how privilege checking is done for its +# arguments. +CREATE PROCEDURE mysqltest_db1.p0(i INT) SELECT i; +# Create SUID-stored-routines. +CREATE DEFINER = mysqltest_u3@localhost PROCEDURE mysqltest_db1.p1() +CREATE TEMPORARY TABLE t4(x INT); +CREATE DEFINER = mysqltest_u3@localhost PROCEDURE mysqltest_db1.p2() +INSERT INTO t4 VALUES (1), (2), (3); +CREATE DEFINER = mysqltest_u3@localhost PROCEDURE mysqltest_db1.p3() +SELECT * FROM t4 ORDER BY x; +# We need separate key cache to test CACHE INDEX and LOAD INDEX. +SET GLOBAL keycache1.key_buffer_size = 128 * 1024; +CREATE TABLE mysqltest_db2.t2_1(a INT); +########################################################################### +# Check that CREATE_TMP_ACL is enough to issue almost any supported +# SQL-statement against temporary tables (loosely follow order in +# sql_command enum). +########################################################################### + +# -- connect con1, mysqltest_u1@localhost, mysqltest_db1 +# +# Variants of CREATE TABLE. +# +CREATE TEMPORARY TABLE t1(a INT); +CREATE TEMPORARY TABLE t2 LIKE t1; +CREATE TEMPORARY TABLE t3(a INT, b INT, PRIMARY KEY (a)); +CREATE TEMPORARY TABLE t4 SELECT * FROM t1; +# Check that we do *not* allow creation of MERGE table with underlying +# temporary table without additional privileges. +CREATE TEMPORARY TABLE t5(a INT) ENGINE = MyISAM; +CREATE TEMPORARY TABLE t6(a INT) ENGINE = MERGE UNION = (t5); +ERROR 42000: SELECT, UPDATE, DELETE command denied to user 'mysqltest_u1'@'localhost' for table 't5' +# Check that we allow creation of MERGE table with no underlying table +# without additional privileges. +CREATE TEMPORARY TABLE t6(a INT) ENGINE = MERGE UNION = (); +# +# SELECT. +# +INSERT INTO t1 VALUES (1), (2), (3); +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +# +# CREATE/DROP INDEX. +# +CREATE INDEX idx1 ON t3(b); +DROP INDEX idx1 ON t3; +# +# ALTER TABLE. +# +ALTER TABLE t4 ADD COLUMN b INT; +# Check that we allow altering of MERGE table with no underlying +# without additional privileges. +ALTER TABLE t6 UNION = (); +# Check that we do *not* allow altering of MERGE table with underlying +# temporary table without additional privileges. +ALTER TABLE t6 UNION = (t5); +ERROR 42000: SELECT, UPDATE, DELETE command denied to user 'mysqltest_u1'@'localhost' for table 't5' +# +# Simple INSERT and INSERT ... SELECT. +# +INSERT INTO t1 VALUES (4); +INSERT INTO t2 SELECT a FROM t1; +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +SELECT * FROM t2 ORDER BY a; +a +1 +2 +3 +4 +# +# UPDATE and multi-UPDATE. +# +UPDATE t1 SET a = a * 10; +UPDATE t1 SET a = 100 WHERE a = 10; +UPDATE t1, t2 SET t1.a = 200 WHERE t1.a = t2.a * 10 AND t1.a = 20; +SELECT * FROM t1 ORDER BY a; +a +30 +40 +100 +200 +# +# DELETE and multi-DELETE. +# +DELETE FROM t1 WHERE a = 100; +DELETE t1 FROM t1, t2 WHERE t1.a = t2.a * 100 AND t1.a = 200; +SELECT * FROM t1 ORDER BY a; +a +30 +40 +# +# TRUNCATE TABLE. +# +TRUNCATE TABLE t1; +SELECT * FROM t1 ORDER BY a; +a +# +# SHOW COLUMNS/DESCRIBE and SHOW KEYS. +# +SHOW COLUMNS FROM t1; +Field Type Null Key Default Extra +SHOW KEYS FROM t3; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t3 0 PRIMARY 1 a A 0 NULL NULL BTREE +# +# SHOW CREATE TABLE. +# +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +# +# LOAD DATA INFILE (also SELECT INTO OUTFILE). +# +INSERT INTO t1 VALUES (1), (2), (3); +SELECT a INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug27480.txt' FROM t1 ; +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug27480.txt' INTO TABLE t1; +SELECT * FROM t1 ORDER BY a; +a +1 +1 +2 +2 +3 +3 +# +# SET. +# +SET @a := (SELECT COUNT(*) FROM t1); +SELECT @a; +@a +6 +# +# LOCK TABLES. +# +LOCK TABLES t1 READ; +UNLOCK TABLES; +# +# CHECK/REPAIR/ANALYZE/OPTIMIZE and CHECKSUM. +# +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +mysqltest_db1.t1 analyze status OK +CHECK TABLE t1; +Table Op Msg_type Msg_text +mysqltest_db1.t1 check status OK +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +mysqltest_db1.t1 optimize status Table is already up to date +REPAIR TABLE t1; +Table Op Msg_type Msg_text +mysqltest_db1.t1 repair status OK +# +# REPLACE and REPLACE ... SELECT. +# +INSERT INTO t3 VALUES (1, 111), (2, 222), (3, 333); +REPLACE INTO t3 VALUES (1, 1111), (4, 444), (0, 001); +REPLACE INTO t2 SELECT b FROM t3; +SELECT * FROM t2 ORDER BY a; +a +1 +1 +2 +3 +4 +222 +333 +444 +1111 +SELECT * FROM t3 ORDER BY a; +a b +0 1 +1 1111 +2 222 +3 333 +4 444 +# +# CACHE and LOAD INDEX. +# +CACHE INDEX t3 IN keycache1; +Table Op Msg_type Msg_text +mysqltest_db1.t3 assign_to_keycache status OK +LOAD INDEX INTO CACHE t3; +Table Op Msg_type Msg_text +mysqltest_db1.t3 preload_keys status OK +# +# RENAME (doesn't work for temporary tables, thus should fail). +# +RENAME TABLE t3 TO t3_1; +ERROR 42000: INSERT, CREATE command denied to user 'mysqltest_u1'@'localhost' for table 't3_1' +# +# HANDLER OPEN/READ/CLOSE. +# +HANDLER t1 OPEN; +HANDLER t1 READ NEXT; +a +1 +HANDLER t1 CLOSE; +# +# DO. +# +DO (SELECT COUNT(*) FROM t1); +# +# CHECKSUM TABLE. +# +DELETE FROM t1; +CHECKSUM TABLE t1; +Table Checksum +mysqltest_db1.t1 0 +# +# CALL. +# +CALL p0((SELECT COUNT(*) FROM t1)); +i +0 +# +# PREPARE, EXECUTE and DEALLOCATE. +# +PREPARE stmt1 FROM 'SELECT * FROM t1 ORDER BY a'; +PREPARE stmt2 FROM 'SELECT * FROM t2 ORDER BY a'; +EXECUTE stmt1; +a +EXECUTE stmt2; +a +1 +1 +2 +3 +4 +222 +333 +444 +1111 +DEALLOCATE PREPARE stmt1; +DEALLOCATE PREPARE stmt2; +# +# DROP TABLE and DROP TEMPORARY TABLE. +# +DROP TABLE t1; +CREATE TEMPORARY TABLE t1(a INT); +DROP TEMPORARY TABLE t1; +########################################################################### +# - Check that even having all privileges but CREATE_TMP_ACL is not enough +# to create temporary tables. +# - Check that creation/working with temporary tables is possible via +# SUID-stored-routines. +# - Check that even outside of SUID context we can access temporary +# table once it is created. +########################################################################### + +# -- connect con2, mysqltest_u2@localhost, mysqltest_db1 +CREATE TEMPORARY TABLE t2(a INT); +ERROR 42000: Access denied for user 'mysqltest_u2'@'localhost' to database 'mysqltest_db1' +CALL p1(); +CALL p2(); +CALL p3(); +x +1 +2 +3 +# Check that once table is created it can be accessed even +# outside of such a SUID context. +INSERT INTO t4 VALUES (4); +UPDATE t4 SET x = 10 WHERE x = 1; +DELETE FROM t4 WHERE x < 3; +SELECT * FROM t4 ORDER BY x; +x +3 +4 +10 +DROP TEMPORARY TABLE t4; +########################################################################### +# - Check that once table is created it can be accessed from within any +# context, even by user without any privileges on tables. +########################################################################### + +# -- connect con3, mysqltest_u4@localhost, mysqltest_db1 +CALL p1(); +INSERT INTO t4 VALUES (4); +UPDATE t4 SET x = 10 WHERE x = 1; +DELETE FROM t4 WHERE x < 3; +SELECT * FROM t4 ORDER BY x; +x +4 +DROP TEMPORARY TABLE t4; +########################################################################### +# Check special case for MERGE-tables: +# - CREATE_TMP_ACL is required to create a temporary merge table; +# - SELECT_ACL, UPDATE_ACL and DELETE_ACL are required to include +# a temporary table into the underlying-table-list. +########################################################################### + +# -- connect con4, mysqltest_u5@localhost, mysqltest_db1 +CREATE TEMPORARY TABLE t7(a INT); +CREATE TEMPORARY TABLE t8(a INT); +CREATE TEMPORARY TABLE t9(a INT); +CREATE TEMPORARY TABLE t10(a INT) ENGINE = MERGE UNION = (t7, t8); +ALTER TABLE t10 UNION = (t9); +ALTER TABLE t10 UNION = (mysqltest_db2.t2_1); +ERROR 42000: SELECT, UPDATE, DELETE command denied to user 'mysqltest_u5'@'localhost' for table 't2_1' +CREATE TEMPORARY TABLE mysqltest_db2.t2_2(a INT) ENGINE = MERGE UNION = (t7, t8); +ALTER TABLE mysqltest_db2.t2_2 UNION = (t9); +ALTER TABLE mysqltest_db2.t2_2 UNION = (); +DROP TEMPORARY TABLE mysqltest_db2.t2_2; +DROP TEMPORARY TABLE t10; +DROP TEMPORARY TABLE t7; +DROP TEMPORARY TABLE t8; +DROP TEMPORARY TABLE t9; +########################################################################### +# That's all. Cleanup. +########################################################################### + +# -- connection: default +# -- disconnect con1 +# All remaining temporary tables are automatically dropped. +# -- disconnect con2 +# -- disconnect con3 +# -- disconnect con4 +SET GLOBAL keycache1.key_buffer_size = 0; +DROP DATABASE mysqltest_db1; +DROP DATABASE mysqltest_db2; +DROP USER mysqltest_u1@localhost; +DROP USER mysqltest_u2@localhost; +DROP USER mysqltest_u3@localhost; +DROP USER mysqltest_u4@localhost; +DROP USER mysqltest_u5@localhost; diff --git a/mysql-test/r/grant4.result b/mysql-test/r/grant4.result index d0b6627cd0b..60617acbd1f 100644 --- a/mysql-test/r/grant4.result +++ b/mysql-test/r/grant4.result @@ -86,9 +86,9 @@ GRANT SHOW VIEW, SELECT ON v3 to mysqltest_u1@localhost; use mysqltest_db1; ** Connect as restricted user mysqltest_u1. ** SELECT FROM INFORMATION_SCHEMA.STATISTICS will succeed because any privileges will do (authentication is enough). +** but will return no rows SELECT * FROM INFORMATION_SCHEMA.STATISTICS WHERE table_name='t5'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT -def mysqltest_db1 t5 1 mysqltest_db1 i 1 s1 A NULL NULL NULL YES BTREE ** SHOW INDEX FROM t5 will fail because we don't have any privileges on any column combination. SHOW INDEX FROM t5; ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't5' @@ -121,3 +121,60 @@ View Create View character_set_client collation_connection v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `t_select_priv`.`a` AS `a`,`t_select_priv`.`b` AS `b` from `t_select_priv` latin1 latin1_swedish_ci drop database mysqltest_db1; drop user mysqltest_u1@localhost; +# +# Additional coverage for refactoring which is made as part +# of fix for bug #27480 "Extend CREATE TEMPORARY TABLES privilege +# to allow temp table operations". +# +# Check that for statements like CHECK/REPAIR and OPTIMIZE TABLE +# privileges for all tables involved are checked before processing +# any tables. Doing otherwise, i.e. checking privileges for table +# right before processing it might result in lost results for tables +# which were processed by the time when table for which privileges +# are insufficient are discovered. +# +call mtr.add_suppression("Got an error from thread_id=.*ha_myisam.cc:"); +call mtr.add_suppression("MySQL thread id .*, query id .* localhost.*mysqltest_u1 Checking table"); +drop database if exists mysqltest_db1; +create database mysqltest_db1; +# Create tables which we are going to CHECK/REPAIR. +create table mysqltest_db1.t1 (a int, key(a)) engine=myisam; +create table mysqltest_db1.t2 (b int); +insert into mysqltest_db1.t1 values (1), (2); +insert into mysqltest_db1.t2 values (1); +# Create user which will try to do this. +create user mysqltest_u1@localhost; +grant insert, select on mysqltest_db1.t1 to mysqltest_u1@localhost; +# Corrupt t1 by replacing t1.MYI with a corrupt + unclosed one created +# by doing: 'create table t1 (a int key(a))' +# head -c1024 t1.MYI > corrupt_t1.MYI +flush table mysqltest_db1.t1; +# Switching to connection 'con1'. +check table mysqltest_db1.t1; +Table Op Msg_type Msg_text +mysqltest_db1.t1 check warning 1 client is using or hasn't closed the table properly +mysqltest_db1.t1 check error Size of indexfile is: 1024 Should be: 2048 +mysqltest_db1.t1 check warning Size of datafile is: 14 Should be: 7 +mysqltest_db1.t1 check error Corrupt +# The below statement should fail before repairing t1. +# Otherwise info about such repair will be missing from its result-set. +repair table mysqltest_db1.t1, mysqltest_db1.t2; +ERROR 42000: SELECT, INSERT command denied to user 'mysqltest_u1'@'localhost' for table 't2' +# The same is true for CHECK TABLE statement. +check table mysqltest_db1.t1, mysqltest_db1.t2; +ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't2' +check table mysqltest_db1.t1; +Table Op Msg_type Msg_text +mysqltest_db1.t1 check warning Table is marked as crashed +mysqltest_db1.t1 check warning 1 client is using or hasn't closed the table properly +mysqltest_db1.t1 check error Size of indexfile is: 1024 Should be: 2048 +mysqltest_db1.t1 check warning Size of datafile is: 14 Should be: 7 +mysqltest_db1.t1 check error Corrupt +repair table mysqltest_db1.t1; +Table Op Msg_type Msg_text +mysqltest_db1.t1 repair warning Number of rows changed from 1 to 2 +mysqltest_db1.t1 repair status OK +# Clean-up. +# Switching to connection 'default'. +drop database mysqltest_db1; +drop user mysqltest_u1@localhost; diff --git a/mysql-test/r/grant5.result b/mysql-test/r/grant5.result new file mode 100644 index 00000000000..d7f3b6812bb --- /dev/null +++ b/mysql-test/r/grant5.result @@ -0,0 +1,18 @@ +SHOW GRANTS FOR root@invalid_host; +ERROR 42000: There is no such grant defined for user 'root' on host 'invalid_host' +create user test; +create user foo; +create role foo; +grant foo to test; +set role foo; +show grants for test; +Grants for test@% +GRANT foo TO 'test'@'%' +GRANT USAGE ON *.* TO 'test'@'%' +show grants for foo; +Grants for foo +GRANT USAGE ON *.* TO 'foo' +show grants for foo@'%'; +ERROR 42000: Access denied for user 'test'@'%' to database 'mysql' +drop user test, foo; +drop role foo; diff --git a/mysql-test/r/grant_4332.result b/mysql-test/r/grant_4332.result index cca7825a07e..5a475bed6d8 100644 --- a/mysql-test/r/grant_4332.result +++ b/mysql-test/r/grant_4332.result @@ -1,3 +1,11 @@ +alter table mysql.user modify User char(16) binary not null default ''; +alter table mysql.db modify User char(16) binary not null default ''; +alter table mysql.tables_priv modify User char(16) binary not null default ''; +alter table mysql.columns_priv modify User char(16) binary not null default ''; +alter table mysql.procs_priv modify User char(16) binary not null default ''; +alter table mysql.proc modify definer char(77) collate utf8_bin not null default ''; +alter table mysql.event modify definer char(77) collate utf8_bin not null default ''; +flush privileges; select user(); Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def user() 253 77 14 N 1 31 8 @@ -5,6 +13,10 @@ user() root@localhost create user a17aaaaaaaaaaaaa0@localhost; ERROR HY000: String 'a17aaaaaaaaaaaaa0' is too long for user name (should be no longer than 16) +grant usage on *.* to a17aaaaaaaaaaaaa0@lodalhost; +ERROR HY000: String 'a17aaaaaaaaaaaaa0' is too long for user name (should be no longer than 16) +drop user a17aaaaaaaaaaaaa0@lodalhost; +ERROR HY000: String 'a17aaaaaaaaaaaaa0' is too long for user name (should be no longer than 16) alter table mysql.user modify User char(80) binary not null default ''; alter table mysql.db modify User char(80) binary not null default ''; alter table mysql.tables_priv modify User char(80) binary not null default ''; @@ -12,107 +24,9 @@ alter table mysql.columns_priv modify User char(80) binary not null default ''; alter table mysql.procs_priv modify User char(80) binary not null default ''; alter table mysql.proc modify definer char(141) collate utf8_bin not null default ''; alter table mysql.event modify definer char(141) collate utf8_bin not null default ''; -set global event_scheduler = on; -select user(); -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def user() 253 141 14 N 1 31 8 -user() -root@localhost -create user a17aaaaaaaaaaaaa0@localhost; -grant usage on *.* to a17aaaaaaaaaaaaa0@localhost; -grant select on mysql.user to b64bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0@localhost; -grant select(User) on mysql.tables_priv to c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost; -select user(), current_user(); -user() current_user() -a17aaaaaaaaaaaaa0@localhost a17aaaaaaaaaaaaa0@localhost -show grants; -Grants for a17aaaaaaaaaaaaa0@localhost -GRANT USAGE ON *.* TO 'a17aaaaaaaaaaaaa0'@'localhost' -select user(), current_user(); -user() current_user() -b64bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0@localhost b64bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0@localhost -show grants; -Grants for b64bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0@localhost -GRANT USAGE ON *.* TO 'b64bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0'@'localhost' -GRANT SELECT ON `mysql`.`user` TO 'b64bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0'@'localhost' -select user,host from mysql.user where user like '%0'; -user host -a17aaaaaaaaaaaaa0 localhost -b64bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0 localhost -c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0 localhost -select user,host from mysql.db; -ERROR 42000: SELECT command denied to user 'b64bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0'@'localhost' for table 'db' -select user(), current_user(); -user() current_user() -c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost -show grants; -Grants for c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost -GRANT USAGE ON *.* TO 'c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0'@'localhost' -GRANT SELECT (User) ON `mysql`.`tables_priv` TO 'c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0'@'localhost' -select user from mysql.tables_priv; -user -b64bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0 -c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0 -select user,host from mysql.tables_priv; -ERROR 42000: SELECT command denied to user 'c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0'@'localhost' for column 'host' in table 'tables_priv' -use mtr; -ERROR 42000: Access denied for user 'c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0'@'localhost' to database 'mtr' -drop procedure mtr.add_suppression; -ERROR 42000: alter routine command denied to user 'c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0'@'localhost' for routine 'mtr.add_suppression' -create procedure test.p1() select user(), current_user(), user from mysql.tables_priv; -show create procedure test.p1; -Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -p1 CREATE DEFINER=`c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0`@`localhost` PROCEDURE `p1`() -select user(), current_user(), user from mysql.tables_priv latin1 latin1_swedish_ci latin1_swedish_ci -select definer from information_schema.routines; -definer -c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost -create table test.t1 (a text); -create event e1 on schedule every 1 second -do insert test.t1 values (concat(user(), ' ', current_user())); -select definer from information_schema.events; -definer -c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost -create view v1 as select * from t1; -select definer from information_schema.views; -definer -c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost -drop view v1; -create trigger tr1 before delete on t1 for each row set @a:=1; -select definer from information_schema.triggers; -definer -c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost -drop trigger tr1; -connect(localhost,c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0,foobar,test,MASTER_PORT,MASTER_SOCKET); -ERROR 28000: Access denied for user 'c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0'@'localhost' (using password: YES) -call test.p1(); -user() current_user() user -root@localhost c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost b64bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0 -root@localhost c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0 -select * from t1 limit 1; -a -event_scheduler@localhost c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost -grant usage on *.* to d81ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd0@lodalhost; -ERROR HY000: String 'd81ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd' is too long for user name (should be no longer than 80) -drop user d81ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd0@lodalhost; -ERROR HY000: String 'd81ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd' is too long for user name (should be no longer than 80) -drop user c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost; -drop user b64bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0@localhost; -drop user a17aaaaaaaaaaaaa0@localhost; -set global event_scheduler = off; -drop event e1; -drop procedure test.p1; -drop table t1; -alter table mysql.user modify User char(16) binary not null default ''; -alter table mysql.db modify User char(16) binary not null default ''; -alter table mysql.tables_priv modify User char(16) binary not null default ''; -alter table mysql.columns_priv modify User char(16) binary not null default ''; -alter table mysql.procs_priv modify User char(16) binary not null default ''; -alter table mysql.proc modify definer char(77) collate utf8_bin not null default ''; -alter table mysql.event modify definer char(77) collate utf8_bin not null default ''; flush privileges; select user(); Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def user() 253 77 14 N 1 31 8 +def user() 253 141 14 N 1 31 8 user() root@localhost diff --git a/mysql-test/r/grant_cache_no_prot.result b/mysql-test/r/grant_cache_no_prot.result index e95a858fd9a..777eb10cda6 100644 --- a/mysql-test/r/grant_cache_no_prot.result +++ b/mysql-test/r/grant_cache_no_prot.result @@ -7,11 +7,11 @@ flush status; show grants for current_user; Grants for root@localhost GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION +GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION show grants; Grants for root@localhost GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION +GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION create database if not exists mysqltest; create table mysqltest.t1 (a int,b int,c int); create table mysqltest.t2 (a int,b int,c int); diff --git a/mysql-test/r/grant_cache_ps_prot.result b/mysql-test/r/grant_cache_ps_prot.result index f9786298a81..b504dc4be35 100644 --- a/mysql-test/r/grant_cache_ps_prot.result +++ b/mysql-test/r/grant_cache_ps_prot.result @@ -7,11 +7,11 @@ flush status; show grants for current_user; Grants for root@localhost GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION +GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION show grants; Grants for root@localhost GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION +GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION create database if not exists mysqltest; create table mysqltest.t1 (a int,b int,c int); create table mysqltest.t2 (a int,b int,c int); diff --git a/mysql-test/r/grant_explain_non_select.result b/mysql-test/r/grant_explain_non_select.result new file mode 100644 index 00000000000..85b0ae5c4b4 --- /dev/null +++ b/mysql-test/r/grant_explain_non_select.result @@ -0,0 +1,178 @@ +CREATE DATABASE privtest_db; +CREATE TABLE privtest_db.t1 (a INT); +CREATE TABLE privtest_db.t2 (a INT); +INSERT INTO privtest_db.t2 VALUES (1), (2), (3); +GRANT USAGE ON *.* TO 'privtest'@'localhost'; +GRANT SELECT ON privtest_db.t2 TO 'privtest'@'localhost'; +USE privtest_db; +EXPLAIN INSERT INTO t1 VALUES (10); +ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1' +INSERT INTO t1 VALUES (10); +ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1' +EXPLAIN INSERT INTO t1 SELECT * FROM t2; +ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1' +INSERT INTO t1 SELECT * FROM t2; +ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1' +GRANT INSERT ON privtest_db.t1 TO 'privtest'@'localhost'; +EXPLAIN INSERT INTO t1 VALUES (10); +id select_type table type possible_keys key key_len ref rows Extra +1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL +INSERT INTO t1 VALUES (10); +EXPLAIN INSERT INTO t1 SELECT * FROM t2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 +INSERT INTO t1 SELECT * FROM t2; +REVOKE ALL PRIVILEGES ON privtest_db.t1 FROM 'privtest'@'localhost'; +EXPLAIN REPLACE INTO t1 VALUES (10); +ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1' +REPLACE INTO t1 VALUES (10); +ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1' +EXPLAIN REPLACE INTO t1 SELECT * FROM t2; +ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1' +REPLACE INTO t1 SELECT * FROM t2; +ERROR 42000: INSERT, DELETE command denied to user 'privtest'@'localhost' for table 't1' +GRANT INSERT ON privtest_db.t1 TO 'privtest'@'localhost'; +EXPLAIN REPLACE INTO t1 VALUES (10); +ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1' +REPLACE INTO t1 VALUES (10); +ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1' +EXPLAIN REPLACE INTO t1 SELECT * FROM t2; +ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1' +REPLACE INTO t1 SELECT * FROM t2; +ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1' +REVOKE INSERT ON privtest_db.t1 FROM 'privtest'@'localhost'; +GRANT DELETE ON privtest_db.t1 TO 'privtest'@'localhost'; +EXPLAIN REPLACE INTO t1 VALUES (10); +ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1' +REPLACE INTO t1 VALUES (10); +ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1' +EXPLAIN REPLACE INTO t1 SELECT * FROM t2; +ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1' +REPLACE INTO t1 SELECT * FROM t2; +ERROR 42000: INSERT command denied to user 'privtest'@'localhost' for table 't1' +GRANT INSERT, DELETE ON privtest_db.t1 TO 'privtest'@'localhost'; +EXPLAIN REPLACE INTO t1 VALUES (10); +id select_type table type possible_keys key key_len ref rows Extra +1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL +REPLACE INTO t1 VALUES (10); +EXPLAIN REPLACE INTO t1 SELECT * FROM t2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 +REPLACE INTO t1 SELECT * FROM t2; +REVOKE ALL PRIVILEGES ON privtest_db.t1 FROM 'privtest'@'localhost'; +EXPLAIN UPDATE t1 SET a = a + 1; +ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1' +UPDATE t1 SET a = a + 1; +ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1' +EXPLAIN UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a; +ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1' +UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a; +ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1' +GRANT UPDATE ON privtest_db.t1 TO 'privtest'@'localhost'; +EXPLAIN UPDATE t1 SET a = a + 1; +ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 't1' +UPDATE t1 SET a = a + 1; +ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 't1' +EXPLAIN UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a; +ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 't1' +UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a; +ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 't1' +REVOKE UPDATE ON privtest_db.t1 FROM 'privtest'@'localhost'; +GRANT SELECT ON privtest_db.t1 TO 'privtest'@'localhost'; +EXPLAIN UPDATE t1 SET a = a + 1; +ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1' +UPDATE t1 SET a = a + 1; +ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1' +EXPLAIN UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a; +ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1' +UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a; +ERROR 42000: UPDATE command denied to user 'privtest'@'localhost' for table 't1' +GRANT UPDATE, SELECT ON privtest_db.t1 TO 'privtest'@'localhost'; +EXPLAIN UPDATE t1 SET a = a + 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 +UPDATE t1 SET a = a + 1; +EXPLAIN UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 Using where +UPDATE t1, t2 SET t1.a = t1.a + 1 WHERE t1.a = t2.a; +REVOKE ALL PRIVILEGES ON privtest_db.t1 FROM 'privtest'@'localhost'; +EXPLAIN DELETE FROM t1 WHERE a = 10; +ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1' +DELETE FROM t1 WHERE a = 10; +ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1' +EXPLAIN DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a; +ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1' +DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a; +ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1' +GRANT DELETE ON privtest_db.t1 TO 'privtest'@'localhost'; +EXPLAIN DELETE FROM t1 WHERE a = 10; +ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 't1' +DELETE FROM t1 WHERE a = 10; +ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 't1' +EXPLAIN DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a; +ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1' +DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a; +ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for table 't1' +REVOKE ALL PRIVILEGES ON privtest_db.t1 FROM 'privtest'@'localhost'; +GRANT SELECT ON privtest_db.t1 TO 'privtest'@'localhost'; +EXPLAIN DELETE FROM t1 WHERE a = 10; +ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1' +DELETE FROM t1 WHERE a = 10; +ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1' +EXPLAIN DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a; +ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1' +DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a; +ERROR 42000: DELETE command denied to user 'privtest'@'localhost' for table 't1' +REVOKE ALL PRIVILEGES ON privtest_db.t1 FROM 'privtest'@'localhost'; +GRANT DELETE, SELECT ON privtest_db.t1 TO 'privtest'@'localhost'; +EXPLAIN DELETE FROM t1 WHERE a = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 Using where +DELETE FROM t1 WHERE a = 10; +EXPLAIN DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 Using where +DELETE FROM t1 USING t1, t2 WHERE t1.a = t2.a; +REVOKE ALL PRIVILEGES ON privtest_db.t1 FROM 'privtest'@'localhost'; +CREATE VIEW privtest_db.v1 (a) AS SELECT a FROM privtest_db.t1; +GRANT SELECT, INSERT, UPDATE, DELETE ON privtest_db.v1 TO 'privtest'@'localhost'; +EXPLAIN SELECT * FROM v1; +ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table +SELECT * FROM v1; +a +11 +4 +4 +11 +4 +4 +EXPLAIN INSERT INTO v1 VALUES (10); +ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table +INSERT INTO v1 VALUES (10); +EXPLAIN INSERT INTO v1 SELECT * FROM t2; +ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table +INSERT INTO v1 SELECT * FROM t2; +EXPLAIN REPLACE INTO v1 VALUES (10); +ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table +REPLACE INTO v1 VALUES (10); +EXPLAIN REPLACE INTO v1 SELECT * FROM t2; +ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table +REPLACE INTO v1 SELECT * FROM t2; +EXPLAIN UPDATE v1 SET a = a + 1; +ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table +UPDATE v1 SET a = a + 1; +EXPLAIN UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a; +ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table +UPDATE v1, t2 SET v1.a = v1.a + 1 WHERE v1.a = t2.a; +EXPLAIN DELETE FROM v1 WHERE a = 10; +ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table +DELETE FROM v1 WHERE a = 10; +EXPLAIN DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a; +ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table +DELETE FROM v1 USING v1, t2 WHERE v1.a = t2.a; +DROP USER 'privtest'@localhost; +USE test; +DROP DATABASE privtest_db; diff --git a/mysql-test/r/grant_lowercase.result b/mysql-test/r/grant_lowercase.result index 489f990daf1..f13b077c214 100644 --- a/mysql-test/r/grant_lowercase.result +++ b/mysql-test/r/grant_lowercase.result @@ -5,7 +5,7 @@ ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa drop user user1@localhost; call mtr.add_suppression("Incorrect database name"); alter table mysql.host modify Db varchar(200); -alter table mysql.db modify Db varchar(200); +alter table mysql.db modify User char(16), modify Db varchar(200); insert mysql.host set db=concat('=>', repeat(_utf8 'й', 200)); Warnings: Warning 1265 Data truncated for column 'Db' at row 1 @@ -16,5 +16,5 @@ flush privileges; delete from mysql.host where db like '=>%'; delete from mysql.db where db like '=>%'; alter table mysql.host modify Db char(64); -alter table mysql.db modify Db char(64); +alter table mysql.db modify Db char(64), modify User char(80); flush privileges; diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 52ee73e6612..ed08315cf6a 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -359,7 +359,7 @@ A 4 B 4 a 1 b 1 -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; SELECT a FROM t1 GROUP BY a; a NULL @@ -398,7 +398,7 @@ A 4 B 4 a 1 b 1 -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; drop table t1; CREATE TABLE t1 ( `a` char(193) default NULL, @@ -515,7 +515,7 @@ a count(*) NULL 9 3 b 1 -set option sql_big_tables=1; +set big_tables=1; select a,count(*) from t1 group by a; a count(*) NULL 9 @@ -1524,7 +1524,7 @@ id select_type table type possible_keys key key_len ref rows Extra EXPLAIN SELECT a FROM t1 FORCE INDEX FOR JOIN (i2) FORCE INDEX FOR GROUP BY (i2) GROUP BY a; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range NULL i2 4 NULL 145 Using index for group-by +1 SIMPLE t1 index NULL i2 9 NULL 144 Using index EXPLAIN SELECT a FROM t1 USE INDEX () IGNORE INDEX (i2); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 144 @@ -1918,7 +1918,7 @@ DROP TABLE t1; # Bug#11765254 (58200): Assertion failed: param.sort_length when grouping # by functions # -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; CREATE TABLE t1(a INT); INSERT INTO t1 VALUES (0),(0); SELECT 1 FROM t1 GROUP BY IF(`a`,'',''); @@ -1945,7 +1945,7 @@ Warning 1292 Truncated incorrect INTEGER value: 'jxW<' Warning 1292 Truncated incorrect INTEGER value: 'K' Warning 1292 Truncated incorrect INTEGER value: 'jxW<' DROP TABLE t1; -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; # # MDEV-641 LP:1002108 - Wrong result (or crash) from a query with duplicated field in the group list and a limit clause # Bug#11761078: 53534: INCORRECT 'SELECT SQL_BIG_RESULT...' @@ -1957,12 +1957,12 @@ UNIQUE INDEX idx (col1)); INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10), (11),(12),(13),(14),(15),(16),(17),(18),(19),(20); EXPLAIN SELECT col1 AS field1, col1 AS field2 -FROM t1 GROUP BY field1, field2+0;; +FROM t1 GROUP BY field1, field2;; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL idx 5 NULL 20 Using index; Using temporary; Using filesort +1 SIMPLE t1 index NULL idx 5 NULL 20 Using index FLUSH STATUS; SELECT col1 AS field1, col1 AS field2 -FROM t1 GROUP BY field1, field2+0;; +FROM t1 GROUP BY field1, field2;; field1 field2 1 1 2 2 @@ -1986,7 +1986,7 @@ field1 field2 20 20 SHOW SESSION STATUS LIKE 'Sort_scan%'; Variable_name Value -Sort_scan 1 +Sort_scan 0 EXPLAIN SELECT SQL_BIG_RESULT col1 AS field1, col1 AS field2 FROM t1 GROUP BY field1, field2;; id select_type table type possible_keys key key_len ref rows Extra @@ -2084,7 +2084,7 @@ f1 f2 explain select col1 f1, col1 f2 from t1 group by f2 order by f2, f1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range NULL idx 5 NULL 7 Using index for group-by +1 SIMPLE t1 index NULL idx 5 NULL 20 Using index select col1 f1, col1 f2 from t1 group by f2 order by f2, f1; f1 f2 1 1 @@ -2320,7 +2320,7 @@ a int, b varchar(1), KEY (b,a) ); -INSERT INTO t1 VALUES (1,NULL),(0,'a'); +INSERT INTO t1 VALUES (1,NULL),(0,'a'),(1,NULL),(0,'a'); EXPLAIN SELECT SQL_BUFFER_RESULT MIN(a), b FROM t1 WHERE t1.b = 'a' GROUP BY b; id select_type table type possible_keys key key_len ref rows Extra @@ -2583,3 +2583,48 @@ f1 f2 NULL NULL SET @@sort_buffer_size = @old_sort_buff_size; DROP TABLE t1; +# +# Bug #58782 +# Missing rows with SELECT .. WHERE .. IN subquery +# with full GROUP BY and no aggr +# +CREATE TABLE t1 ( +pk INT NOT NULL, +col_int_nokey INT, +PRIMARY KEY (pk) +); +INSERT INTO t1 VALUES (10,7); +INSERT INTO t1 VALUES (11,1); +INSERT INTO t1 VALUES (12,5); +INSERT INTO t1 VALUES (13,3); +SELECT pk AS field1, col_int_nokey AS field2 +FROM t1 +WHERE col_int_nokey > 0 +GROUP BY field1, field2; +field1 field2 +10 7 +11 1 +12 5 +13 3 +CREATE TABLE where_subselect +SELECT pk AS field1, col_int_nokey AS field2 +FROM t1 +WHERE col_int_nokey > 0 +GROUP BY field1, field2 +; +SELECT * +FROM where_subselect +WHERE (field1, field2) IN ( +SELECT pk AS field1, col_int_nokey AS field2 +FROM t1 +WHERE col_int_nokey > 0 +GROUP BY field1, field2 +); +field1 field2 +10 7 +11 1 +12 5 +13 3 +DROP TABLE t1; +DROP TABLE where_subselect; +# End of Bug #58782 diff --git a/mysql-test/r/group_by_innodb.result b/mysql-test/r/group_by_innodb.result index 4b5d9990c51..af68640c0b1 100644 --- a/mysql-test/r/group_by_innodb.result +++ b/mysql-test/r/group_by_innodb.result @@ -57,3 +57,80 @@ i GROUP_CONCAT( d1, d2 ORDER BY d1, d2 ) NULL 11.1,22.2 DROP TABLE t1; End of 5.5 tests +# +# MDEV-5719: Wrong result with GROUP BY and LEFT OUTER JOIN +# +CREATE TABLE t1 (oidGroup INT, oid INT PRIMARY KEY)ENGINE=INNODB; +INSERT INTO t1 VALUES (1,1),(1,2),(1,3),(1,4); +CREATE TABLE t2 (oid INT PRIMARY KEY)ENGINE=INNODB; +INSERT INTO t2 VALUES (3); +SELECT a.oidGroup, a.oid, b.oid FROM t1 a LEFT JOIN t2 b ON +a.oid=b.oid WHERE a.oidGroup=1; +oidGroup oid oid +1 1 NULL +1 2 NULL +1 3 3 +1 4 NULL +SELECT a.oidGroup, a.oid, b.oid FROM t1 a LEFT JOIN t2 b ON +a.oid=b.oid WHERE a.oidGroup=1 GROUP BY a.oid; +oidGroup oid oid +1 1 NULL +1 2 NULL +1 3 3 +1 4 NULL +DROP TABLE t1, t2; +# +# MDEV-7193: Incorrect Query Result (MySQL Bug 68897) in MariaDB 10.0.14 +# (fixed by MDEV-5719) +# +CREATE TABLE `t1` ( +`param` int(11) NOT NULL, +`idx` int(11) NOT NULL, +`text` varchar(255) default NULL, +PRIMARY KEY (`param`,`idx`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +INSERT INTO `t1` (`param`, `idx`, `text`) VALUES +(1, 0, 'select'), +(1, 1, 'Kabel mit Stecker 5-polig'), +(1, 2, 'Kabel ohne Stecker'), +(2, 0, 'number'), +(2, 1, '22'), +(2, 2, '25'); +CREATE TABLE `t2` ( +`id` int PRIMARY KEY +); +INSERT INTO t2 VALUES (1),(2),(3),(4); +SELECT t2.id AS id, T.text AS xtext,GROUP_CONCAT(T3.text) AS optionen +FROM t2 +LEFT JOIN t1 AS T ON(T.param=t2.id AND T.idx=0 ) +LEFT JOIN t1 AS T3 ON(T3.param=t2.id AND T3.idx>0 ) +GROUP BY t2.id +ORDER BY id ASC; +id xtext optionen +1 select Kabel mit Stecker 5-polig,Kabel ohne Stecker +2 number 22,25 +3 NULL NULL +4 NULL NULL +SELECT t2.id AS id, T.text AS xtext,GROUP_CONCAT(T3.text) AS optionen +FROM t2 +LEFT JOIN t1 AS T ON(T.param=t2.id AND T.idx=0 ) +LEFT JOIN t1 AS T3 ON(T3.param=t2.id AND T3.idx>0 ) +GROUP BY t2.id +ORDER BY id DESC; +id xtext optionen +4 NULL NULL +3 NULL NULL +2 number 22,25 +1 select Kabel mit Stecker 5-polig,Kabel ohne Stecker +DROP TABLE t1, t2; +# +# MDEV-11162: Assertion `num_records == m_idx_array.size()' failed in Filesort_buffer::alloc_sort_buffer(uint, uint) +# +CREATE TABLE t1 (i INT) ENGINE=InnoDB; +SELECT ( SELECT DISTINCT GROUP_CONCAT(SLEEP(0)) FROM t1 GROUP BY i ); +( SELECT DISTINCT GROUP_CONCAT(SLEEP(0)) FROM t1 GROUP BY i ) +NULL +SELECT i FROM t1 order by i LIMIT 1; +i +DROP TABLE t1; +# End of tests diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result index f658898543d..25cd4a25279 100644 --- a/mysql-test/r/group_min_max.result +++ b/mysql-test/r/group_min_max.result @@ -1,6 +1,6 @@ drop table if exists t1; create table t1 ( -a1 char(64), a2 char(64), b char(16), c char(16) not null, d char(16), dummy char(64) default ' ' +a1 char(64), a2 char(64), b char(16), c char(16) not null, d char(16), dummy char(248) default ' ' ); insert into t1 (a1, a2, b, c, d) values ('a','a','a','a111','xy1'),('a','a','a','b111','xy2'),('a','a','a','c111','xy3'),('a','a','a','d111','xy4'), @@ -43,7 +43,7 @@ Table Op Msg_type Msg_text test.t1 analyze status Table is already up to date drop table if exists t2; create table t2 ( -a1 char(64), a2 char(64) not null, b char(16), c char(16), d char(16), dummy char(64) default ' ' +a1 char(64), a2 char(64) not null, b char(16), c char(16), d char(16), dummy char(248) default ' ' ); insert into t2 select * from t1; insert into t2 (a1, a2, b, c, d) values @@ -1358,8 +1358,9 @@ explain select a1,a2,b,min(c),max(c) from t1 where exists ( select * from t2 where t2.c = t1.c ) group by a1,a2,b; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index -2 DEPENDENT SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index +1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using index +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 func 1 +2 MATERIALIZED t2 index NULL idx_t2_1 163 NULL 164 Using index select a1,a2,b,min(c),max(c) from t1 where exists ( select * from t2 where t2.c = t1.c ) group by a1,a2,b; @@ -1384,7 +1385,7 @@ explain select a1,a2,b,min(c),max(c) from t1 where exists ( select * from t2 where t2.c > 'b1' ) group by a1,a2,b; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by +1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using index 2 SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index select a1,a2,b,min(c),max(c) from t1 where exists ( select * from t2 where t2.c > 'b1' ) @@ -1410,20 +1411,20 @@ explain select a1,a2,b,c,min(c), max(c) from t1 where exists ( select * from t2 where t1.b > 'a' and t2.c > 'b1' ) group by a1,a2,b; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by +1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index 2 DEPENDENT SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index select a1,a2,b,c,min(c), max(c) from t1 where exists ( select * from t2 where t1.b > 'a' and t2.c > 'b1' ) group by a1,a2,b; a1 a2 b c min(c) max(c) -a a b h112 e112 h112 -a b b p122 m122 p122 -b a b h212 e212 h212 -b b b p222 m222 p222 -c a b h312 e312 h312 -c b b p322 m322 p322 -d a b h412 e412 h412 -d b b p422 m422 p422 +a a b e112 e112 h112 +a b b m122 m122 p122 +b a b e212 e212 h212 +b b b m222 m222 p222 +c a b e312 e312 h312 +c b b m322 m322 p322 +d a b e412 e412 h412 +d b b m422 m422 p422 SET @save_optimizer_switch=@@optimizer_switch; SET optimizer_switch='semijoin_with_cache=off'; explain select a1,a2,b,c,min(c), max(c) from t1 @@ -1432,7 +1433,7 @@ where t2.c in (select c from t3 where t3.c > t1.b) and t2.c > 'b1' ) group by a1,a2,b; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by +1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index 2 DEPENDENT SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index 2 DEPENDENT SUBQUERY t3 index NULL idx_t3_1 10 NULL 192 Using where; Using index; FirstMatch(t2) select a1,a2,b,c,min(c), max(c) from t1 @@ -1441,22 +1442,22 @@ where t2.c in (select c from t3 where t3.c > t1.b) and t2.c > 'b1' ) group by a1,a2,b; a1 a2 b c min(c) max(c) -a a a d111 a111 d111 -a a b h112 e112 h112 -a b a l121 i121 l121 -a b b p122 m122 p122 -b a a d211 a211 d211 -b a b h212 e212 h212 -b b a l221 i221 l221 -b b b p222 m222 p222 -c a a d311 a311 d311 -c a b h312 e312 h312 -c b a l321 i321 l321 -c b b p322 m322 p322 -d a a d411 a411 d411 -d a b h412 e412 h412 -d b a l421 i421 l421 -d b b p422 m422 p422 +a a a a111 a111 d111 +a a b e112 e112 h112 +a b a i121 i121 l121 +a b b m122 m122 p122 +b a a a211 a211 d211 +b a b e212 e212 h212 +b b a i221 i221 l221 +b b b m222 m222 p222 +c a a a311 a311 d311 +c a b e312 e312 h312 +c b a i321 i321 l321 +c b b m322 m322 p322 +d a a a411 a411 d411 +d a b e412 e412 h412 +d b a i421 i421 l421 +d b b m422 m422 p422 SET optimizer_switch=@save_optimizer_switch; explain select a1,a2,b,c,min(c), max(c) from t1 where exists ( select * from t2 where t1.c > 'a' and t2.c > 'b1' ) @@ -2126,6 +2127,32 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 index idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 128 75.00 Using where; Using index Warnings: Note 1003 select sum(ord(`test`.`t1`.`a1`)) AS `sum(ord(a1))` from `test`.`t1` where (`test`.`t1`.`a1` > 'a') group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b` +create table t4 as select distinct a1, a2, b, c from t1; +alter table t4 add unique index idxt4 (a1, a2, b, c); +# This is "superceded" by MDEV-7118, and Loose Index Scan is again an option: +explain +select a1, a2, b, min(c) from t4 group by a1, a2, b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t4 range NULL idxt4 147 NULL 10 Using index for group-by +select a1, a2, b, min(c) from t4 group by a1, a2, b; +a1 a2 b min(c) +a a a a111 +a a b e112 +a b a i121 +a b b m122 +b a a a211 +b a b e212 +b b a i221 +b b b m222 +c a a a311 +c a b e312 +c b a i321 +c b b m322 +d a a a411 +d a b e412 +d b a i421 +d b b m422 +drop table t4; explain select distinct(a1) from t1 where ord(a2) = 98; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using where; Using index @@ -2249,14 +2276,14 @@ COUNT(DISTINCT a) 1 DROP TABLE t1; DROP PROCEDURE a; -CREATE TABLE t1 (a varchar(64) NOT NULL default '', PRIMARY KEY(a)); +CREATE TABLE t1 (a varchar(64) NOT NULL default '', KEY(a)); INSERT INTO t1 (a) VALUES (''), ('CENTRAL'), ('EASTERN'), ('GREATER LONDON'), ('NORTH CENTRAL'), ('NORTH EAST'), ('NORTH WEST'), ('SCOTLAND'), ('SOUTH EAST'), ('SOUTH WEST'), ('WESTERN'); EXPLAIN SELECT DISTINCT a,a FROM t1 ORDER BY a; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range NULL PRIMARY 66 NULL 12 Using index for group-by +1 SIMPLE t1 range NULL a 66 NULL 6 Using index for group-by SELECT DISTINCT a,a FROM t1 ORDER BY a; a a @@ -2314,11 +2341,11 @@ t1; id2 id3 id5 id4 id3 id6 id5 id1 1 1 1 1 1 1 1 1 DROP TABLE t1,t2,t3,t4,t5,t6; -CREATE TABLE t1 (a int, b int, PRIMARY KEY (a,b), KEY b (b)); +CREATE TABLE t1 (a int, b int, KEY (a,b), KEY b (b)); INSERT INTO t1 VALUES (1,1),(1,2),(1,0),(1,3); explain SELECT MAX(b), a FROM t1 WHERE b < 2 AND a = 1 GROUP BY a; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range PRIMARY,b PRIMARY 8 NULL 1 Using where; Using index for group-by +1 SIMPLE t1 range a,b a 10 NULL 1 Using where; Using index for group-by SELECT MAX(b), a FROM t1 WHERE b < 2 AND a = 1 GROUP BY a; MAX(b) a 1 1 @@ -2351,6 +2378,7 @@ SHOW STATUS LIKE 'handler_read__e%'; Variable_name Value Handler_read_key 8 Handler_read_next 0 +Handler_read_retry 0 EXPLAIN SELECT max(b), a FROM t1 GROUP BY a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range NULL a 5 NULL 8 Using index for group-by @@ -2360,6 +2388,7 @@ SHOW STATUS LIKE 'handler_read__e%'; Variable_name Value Handler_read_key 8 Handler_read_next 0 +Handler_read_retry 0 FLUSH STATUS; SELECT * FROM (SELECT max(b), a FROM t1 GROUP BY a) b; max(b) a @@ -2371,6 +2400,7 @@ SHOW STATUS LIKE 'handler_read__e%'; Variable_name Value Handler_read_key 8 Handler_read_next 0 +Handler_read_retry 0 FLUSH STATUS; (SELECT max(b), a FROM t1 GROUP BY a) UNION (SELECT max(b), a FROM t1 GROUP BY a); @@ -2383,6 +2413,7 @@ SHOW STATUS LIKE 'handler_read__e%'; Variable_name Value Handler_read_key 16 Handler_read_next 0 +Handler_read_retry 0 EXPLAIN (SELECT max(b), a FROM t1 GROUP BY a) UNION (SELECT max(b), a FROM t1 GROUP BY a); id select_type table type possible_keys key key_len ref rows Extra @@ -2435,6 +2466,7 @@ SHOW STATUS LIKE 'handler_read__e%'; Variable_name Value Handler_read_key 8 Handler_read_next 0 +Handler_read_retry 0 DELETE FROM t3; FLUSH STATUS; INSERT INTO t3 SELECT 1, (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) @@ -2443,12 +2475,14 @@ SHOW STATUS LIKE 'handler_read__e%'; Variable_name Value Handler_read_key 8 Handler_read_next 0 +Handler_read_retry 0 FLUSH STATUS; DELETE FROM t3 WHERE (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) > 10000; SHOW STATUS LIKE 'handler_read__e%'; Variable_name Value Handler_read_key 8 Handler_read_next 0 +Handler_read_retry 0 FLUSH STATUS; DELETE FROM t3 WHERE (SELECT (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) x FROM t1) > 10000; @@ -2457,6 +2491,7 @@ SHOW STATUS LIKE 'handler_read__e%'; Variable_name Value Handler_read_key 8 Handler_read_next 1 +Handler_read_retry 0 DROP TABLE t1,t2,t3; CREATE TABLE t1 (a int, INDEX idx(a)); INSERT INTO t1 VALUES @@ -2525,7 +2560,9 @@ a MIN(b) MAX(b) AVG(b) 2 1 3 2.0000 1 1 3 2.0000 DROP TABLE t1; -create table t1 (a int, b int, primary key (a,b), key `index` (a,b)) engine=MyISAM; +create table t1 (a int, b int, key (a,b), key `index` (a,b)) engine=MyISAM; +Warnings: +Note 1831 Duplicate index `index`. This is deprecated and will be disallowed in a future release. insert into t1 (a,b) values (0,0),(0,1),(0,2),(0,3),(0,4),(0,5),(0,6), (0,7),(0,8),(0,9),(0,10),(0,11),(0,12),(0,13), @@ -2597,7 +2634,7 @@ a b 3 13 explain extended select sql_buffer_result a, max(b)+1 from t1 where a = 0 group by a; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ref PRIMARY,index PRIMARY 4 const 15 100.00 Using index; Using temporary +1 SIMPLE t1 ref a,index a 5 const 15 100.00 Using index; Using temporary Warnings: Note 1003 select sql_buffer_result `test`.`t1`.`a` AS `a`,(max(`test`.`t1`.`b`) + 1) AS `max(b)+1` from `test`.`t1` where (`test`.`t1`.`a` = 0) group by `test`.`t1`.`a` drop table t1; @@ -2622,6 +2659,7 @@ DROP TABLE t1; CREATE TABLE t (a INT, b INT, INDEX (a,b)); INSERT INTO t VALUES (2,0), (2,0), (2,1), (2,1); INSERT INTO t SELECT * FROM t; +INSERT INTO t SELECT * FROM t; # test MIN #should use range with index for group by EXPLAIN @@ -3254,6 +3292,7 @@ drop table t1; # CREATE TABLE t1 (a int, b int, KEY (b, a)) ; INSERT INTO t1 VALUES (0,99),(9,99),(4,0),(7,0),(99,0),(7,0),(8,0),(99,0),(1,0); +INSERT INTO t1 VALUES (0,99),(9,99),(4,0),(7,0),(99,0),(7,0),(8,0),(99,0),(1,0); CREATE TABLE t2 (c int) ; INSERT INTO t2 VALUES (0),(1); EXPLAIN @@ -3276,10 +3315,10 @@ MIN(a) b EXPLAIN SELECT MIN(a), b FROM t1 WHERE a > ( SELECT min(c) FROM t2, t1 t1a, t1 t1b WHERE c = 0 ) GROUP BY b; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 index NULL b 10 NULL 9 Using where; Using index +1 PRIMARY t1 index NULL b 10 NULL 18 Using where; Using index 2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where -2 SUBQUERY t1a index NULL b 10 NULL 9 Using index; Using join buffer (flat, BNL join) -2 SUBQUERY t1b index NULL b 10 NULL 9 Using index; Using join buffer (incremental, BNL join) +2 SUBQUERY t1a index NULL b 10 NULL 18 Using index; Using join buffer (flat, BNL join) +2 SUBQUERY t1b index NULL b 10 NULL 18 Using index; Using join buffer (incremental, BNL join) SELECT MIN(a), b FROM t1 WHERE a > ( SELECT min(c) FROM t2, t1 t1a, t1 t1b WHERE c = 0 ) GROUP BY b; MIN(a) b 1 0 @@ -3548,7 +3587,7 @@ DROP TABLE t1,t2; CREATE TABLE t1 ( f1 int(11) NOT NULL DEFAULT '0', f2 char(1) NOT NULL DEFAULT '', -PRIMARY KEY (f1,f2) +KEY (f1,f2) ) ; insert into t1 values(1,'A'),(1 , 'B'), (1, 'C'), (2, 'A'), (3, 'A'), (3, 'B'), (3, 'C'), (3, 'D'); @@ -3559,7 +3598,7 @@ f1 COUNT(DISTINCT f2) 3 4 explain SELECT f1, COUNT(DISTINCT f2) FROM t1 GROUP BY f1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range NULL PRIMARY 5 NULL 9 Using index for group-by (scanning) +1 SIMPLE t1 range NULL f1 5 NULL 9 Using index for group-by (scanning) drop table t1; # End of test#50539. # @@ -3635,7 +3674,7 @@ INSERT INTO faulty (b, c) VALUES EXPLAIN SELECT DISTINCT b, c FROM faulty WHERE b='1802' ORDER BY c; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE faulty range b_and_c b_and_c 12 NULL 2 Using where; Using index for group-by; Using filesort +1 SIMPLE faulty ref b_and_c b_and_c 4 const 2 Using where; Using index SELECT DISTINCT b, c FROM faulty WHERE b='1802' ORDER BY c; b c 1802 2013-02-28 09:00:00 @@ -3656,3 +3695,43 @@ a b 3 2 3 3 drop table t1; +# +# Start of 10.0 tests +# +# +# MDEV-6991 GROUP_MIN_MAX optimization is erroneously applied in some cases +# +CREATE TABLE t1 (id INT NOT NULL, a VARCHAR(20)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,'2001-01-01'); +INSERT INTO t1 VALUES (1,'2001-01-02'); +INSERT INTO t1 VALUES (1,'2001-01-03'); +INSERT INTO t1 VALUES (1,' 2001-01-04'); +INSERT INTO t1 VALUES (2,'2001-01-01'); +INSERT INTO t1 VALUES (2,'2001-01-02'); +INSERT INTO t1 VALUES (2,'2001-01-03'); +INSERT INTO t1 VALUES (2,' 2001-01-04'); +INSERT INTO t1 VALUES (3,'2001-01-01'); +INSERT INTO t1 VALUES (3,'2001-01-02'); +INSERT INTO t1 VALUES (3,'2001-01-03'); +INSERT INTO t1 VALUES (3,' 2001-01-04'); +INSERT INTO t1 VALUES (4,'2001-01-01'); +INSERT INTO t1 VALUES (4,'2001-01-02'); +INSERT INTO t1 VALUES (4,'2001-01-03'); +INSERT INTO t1 VALUES (4,' 2001-01-04'); +SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=DATE'2001-01-04' GROUP BY id; +id MIN(a) MAX(a) +1 2001-01-04 2001-01-04 +2 2001-01-04 2001-01-04 +3 2001-01-04 2001-01-04 +4 2001-01-04 2001-01-04 +ALTER TABLE t1 ADD KEY(id,a); +SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=DATE'2001-01-04' GROUP BY id; +id MIN(a) MAX(a) +1 2001-01-04 2001-01-04 +2 2001-01-04 2001-01-04 +3 2001-01-04 2001-01-04 +4 2001-01-04 2001-01-04 +DROP TABLE t1; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/group_min_max_innodb.result b/mysql-test/r/group_min_max_innodb.result index 1e3ee793a7f..2803107b97e 100644 --- a/mysql-test/r/group_min_max_innodb.result +++ b/mysql-test/r/group_min_max_innodb.result @@ -194,7 +194,7 @@ EXPLAIN SELECT c1, i1, max(i2) FROM t2 WHERE (c1 = 'C' OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 ) GROUP BY c1,i1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range k2 k2 9 NULL 59 Using where; Using index for group-by +1 SIMPLE t2 range k2 k2 5 NULL 59 Using where; Using index SELECT c1, i1, max(i2) FROM t2 WHERE (c1 = 'C' OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 ) GROUP BY c1,i1; @@ -205,7 +205,7 @@ EXPLAIN SELECT c1, i1, max(i2) FROM t2 WHERE (((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 )) GROUP BY c1,i1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range k2 k2 9 NULL 58 Using where; Using index for group-by +1 SIMPLE t2 range k2 k2 5 NULL 58 Using where; Using index SELECT c1, i1, max(i2) FROM t2 WHERE (((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 )) GROUP BY c1,i1; diff --git a/mysql-test/r/handler_read_last.result b/mysql-test/r/handler_read_last.result index 574c3c25ab1..9dd3784673a 100644 --- a/mysql-test/r/handler_read_last.result +++ b/mysql-test/r/handler_read_last.result @@ -12,6 +12,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -26,6 +27,7 @@ Handler_read_key 0 Handler_read_last 1 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -42,6 +44,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 2 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -58,6 +61,7 @@ Handler_read_key 0 Handler_read_last 1 Handler_read_next 0 Handler_read_prev 2 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 diff --git a/mysql-test/r/handlersocket.result b/mysql-test/r/handlersocket.result index 9e5d273cbb6..b519e2e7c93 100644 --- a/mysql-test/r/handlersocket.result +++ b/mysql-test/r/handlersocket.result @@ -5,7 +5,7 @@ plugin_version 1.0 plugin_status ACTIVE plugin_type DAEMON plugin_library handlersocket.so -plugin_library_version 1.4 +plugin_library_version 1.8 plugin_author higuchi dot akira at dena dot jp plugin_description Direct access into InnoDB plugin_license BSD diff --git a/mysql-test/r/have_crypt.require b/mysql-test/r/have_crypt.require deleted file mode 100644 index 739fbb738f0..00000000000 --- a/mysql-test/r/have_crypt.require +++ /dev/null @@ -1,2 +0,0 @@ -Variable_name Value -have_crypt YES diff --git a/mysql-test/r/have_mysql_upgrade.result b/mysql-test/r/have_mysql_upgrade.result deleted file mode 100644 index 952bea420f9..00000000000 --- a/mysql-test/r/have_mysql_upgrade.result +++ /dev/null @@ -1,2 +0,0 @@ -have_mysql_upgrade -1 diff --git a/mysql-test/r/have_partition.require b/mysql-test/r/have_partition.require deleted file mode 100644 index 324c04eed6f..00000000000 --- a/mysql-test/r/have_partition.require +++ /dev/null @@ -1,2 +0,0 @@ -Variable_name Value -have_partitioning YES diff --git a/mysql-test/r/have_ssl.require b/mysql-test/r/have_ssl.require deleted file mode 100644 index 9bdffdf0c13..00000000000 --- a/mysql-test/r/have_ssl.require +++ /dev/null @@ -1,2 +0,0 @@ -Variable_name Value -have_ssl YES diff --git a/mysql-test/r/have_ssl_is_yes_or_disabled_only.require b/mysql-test/r/have_ssl_is_yes_or_disabled_only.require deleted file mode 100644 index dfd6d2dad01..00000000000 --- a/mysql-test/r/have_ssl_is_yes_or_disabled_only.require +++ /dev/null @@ -1,2 +0,0 @@ -Variable_name Value -have_ssl yesordisabled diff --git a/mysql-test/r/having.result b/mysql-test/r/having.result index 18915da1a09..0b933427303 100644 --- a/mysql-test/r/having.result +++ b/mysql-test/r/having.result @@ -712,3 +712,15 @@ a ct 4 2 set sql_mode=@save_sql_mode; drop table t1; +# +# Bug mdev-5160: two-way join with HAVING over the second table +# +CREATE TABLE t1 (c1 varchar(6)) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('s'), ('t'), ('a'), ('x'); +CREATE TABLE t2 (c2 varchar(6)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('a'), ('x'); +SELECT * FROM t1 JOIN t2 ON c1 = c2 HAVING c2 > 'a' ORDER BY c2 LIMIT 1; +c1 c2 +x x +DROP TABLE t1,t2; +End of 10.0 tests diff --git a/mysql-test/r/help.result b/mysql-test/r/help.result index 16719cc8193..319a1ba3e85 100644 --- a/mysql-test/r/help.result +++ b/mysql-test/r/help.result @@ -148,6 +148,21 @@ help 'impossible_category_1'; source_category_name name is_it_category impossible_category_1 impossible_function_1 N impossible_category_1 impossible_function_2 N +# MDEV-9524 Cannot load from mysql.event when sql_mode is set to PAD_CHAR_TO_FULL_LENGTH +help 'impossible_function_1'; +name description example +impossible_function_1 description of + impossible_function1 + example of + impossible_function1 +SET sql_mode=PAD_CHAR_TO_FULL_LENGTH; +help 'impossible_function_1'; +name description example +impossible_function_1 description of + impossible_function1 + example of + impossible_function1 +SET sql_mode=DEFAULT; alter table mysql.help_relation engine=innodb; alter table mysql.help_keyword engine=innodb; alter table mysql.help_topic engine=innodb; diff --git a/mysql-test/r/host_cache_size_functionality.result b/mysql-test/r/host_cache_size_functionality.result new file mode 100644 index 00000000000..e7f9e09fd2f --- /dev/null +++ b/mysql-test/r/host_cache_size_functionality.result @@ -0,0 +1,78 @@ +'#________________________VAR_06_Host_Cache_Size__________________#' +echo '##' +--echo '#---------------------WL6372_VAR_6_01----------------------#' +#################################################################### +# Checking default value # +#################################################################### +SELECT COUNT(@@GLOBAL.Host_Cache_Size) +1 Expected +set @Default_host_cache_size=128; +select @@global.Host_Cache_Size=@Default_host_cache_size; +@@global.Host_Cache_Size=@Default_host_cache_size +1 +1 Expected +'#---------------------WL6372_VAR_6_02----------------------#' +# Restart server with Host_Cache_Size 1 +SELECT @@GLOBAL.Host_Cache_Size; +@@GLOBAL.Host_Cache_Size +1 +1 Expected +set @Default_host_cache_size=128; +SET @@GLOBAL.Host_Cache_Size=DEFAULT; +select @@global.Host_Cache_Size=@Default_host_cache_size; +@@global.Host_Cache_Size=@Default_host_cache_size +1 +1 Expected +'#---------------------WL6372_VAR_6_03----------------------#' +SET @@local.Host_Cache_Size=1; +ERROR HY000: Variable 'host_cache_size' is a GLOBAL variable and should be set with SET GLOBAL +Expected error 'Global variable' +SET @@session.Host_Cache_Size=1; +ERROR HY000: Variable 'host_cache_size' is a GLOBAL variable and should be set with SET GLOBAL +Expected error 'Global variable' +SET @@GLOBAL.Host_Cache_Size=1; +SET @@GLOBAL.Host_Cache_Size=DEFAULT; +SELECT COUNT(@@GLOBAL.Host_Cache_Size); +COUNT(@@GLOBAL.Host_Cache_Size) +1 +1 Expected +select @@global.Host_Cache_Size=@Default_host_cache_size; +@@global.Host_Cache_Size=@Default_host_cache_size +1 +1 Expected +'#---------------------WL6372_VAR_6_04----------------------#' +SELECT @@GLOBAL.Host_Cache_Size = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='Host_Cache_Size'; +@@GLOBAL.Host_Cache_Size = VARIABLE_VALUE +1 +1 Expected +SELECT COUNT(@@GLOBAL.Host_Cache_Size); +COUNT(@@GLOBAL.Host_Cache_Size) +1 +1 Expected +SELECT COUNT(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='Host_Cache_Size'; +COUNT(VARIABLE_VALUE) +1 +1 Expected +'#---------------------WL6372_VAR_6_05----------------------#' +SELECT @@Host_Cache_Size = @@GLOBAL.Host_Cache_Size; +@@Host_Cache_Size = @@GLOBAL.Host_Cache_Size +1 +1 Expected +SELECT COUNT(@@local.Host_Cache_Size); +ERROR HY000: Variable 'host_cache_size' is a GLOBAL variable +Expected error 'Variable is a GLOBAL variable' +SELECT COUNT(@@SESSION.Host_Cache_Size); +ERROR HY000: Variable 'host_cache_size' is a GLOBAL variable +Expected error 'Variable is a GLOBAL variable' +SELECT COUNT(@@GLOBAL.Host_Cache_Size); +COUNT(@@GLOBAL.Host_Cache_Size) +1 +1 Expected +SELECT Host_Cache_Size = @@SESSION.Host_Cache_Size; +ERROR 42S22: Unknown column 'Host_Cache_Size' in 'field list' +Expected error 'Unknown column Host_Cache_Size in field list' +SET @@GLOBAL.Host_Cache_Size=DEFAULT; diff --git a/mysql-test/r/huge_frm-6224.result b/mysql-test/r/huge_frm-6224.result new file mode 100644 index 00000000000..3772317c04d --- /dev/null +++ b/mysql-test/r/huge_frm-6224.result @@ -0,0 +1 @@ +ERROR HY000: The definition for table `t1` is too big diff --git a/mysql-test/r/index_intersect_innodb.result b/mysql-test/r/index_intersect_innodb.result index d28b3a0bf92..33f2247e5d1 100644 --- a/mysql-test/r/index_intersect_innodb.result +++ b/mysql-test/r/index_intersect_innodb.result @@ -463,29 +463,29 @@ EXPLAIN SELECT * FROM City WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,7,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where EXPLAIN SELECT * FROM City WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,3 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,7 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where EXPLAIN SELECT * FROM City WHERE ID BETWEEN 2001 AND 2500 AND Population > 300000 AND Country LIKE 'H%'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country 4,3 NULL # Using sort_intersect(PRIMARY,Country); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country 4,7 NULL # Using sort_intersect(PRIMARY,Country); Using where EXPLAIN SELECT * FROM City WHERE ID BETWEEN 3701 AND 4000 AND Population > 1000000 AND Country BETWEEN 'S' AND 'Z'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,7,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where EXPLAIN SELECT * FROM City WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000 AND Country BETWEEN 'S' AND 'Z' ; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,7,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where SELECT * FROM City USE INDEX () WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%'; ID Name Country Population @@ -739,13 +739,13 @@ EXPLAIN SELECT * FROM City WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,3 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,7 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where EXPLAIN SELECT * FROM City WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000 AND Country BETWEEN 'S' AND 'Z'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,7,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where SELECT * FROM City WHERE Name LIKE 'C%' AND Population > 1000000; ID Name Country Population @@ -1033,7 +1033,7 @@ EXPLAIN SELECT * FROM t1 WHERE (f1 < 535 OR f1 > 985) AND ( f4='r' OR f4 LIKE 'a%' ) ; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index_merge PRIMARY,f4 PRIMARY,f4 4,35 NULL # Using sort_intersect(PRIMARY,f4); Using where +1 SIMPLE t1 index_merge PRIMARY,f4 PRIMARY,f4 4,39 NULL # Using sort_intersect(PRIMARY,f4); Using where SELECT * FROM t1 WHERE (f1 < 535 OR f1 > 985) AND ( f4='r' OR f4 LIKE 'a%' ) ; f1 f4 f5 diff --git a/mysql-test/r/index_merge_innodb.result b/mysql-test/r/index_merge_innodb.result index 00cbf35ec69..b3007408368 100644 --- a/mysql-test/r/index_merge_innodb.result +++ b/mysql-test/r/index_merge_innodb.result @@ -311,6 +311,9 @@ set @d=@d*2; alter table t1 add index i2(key2); alter table t1 add index i3(key3); update t1 set key2=key1,key3=key1; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge i2,i3 i3,i2 4,4 NULL REF Using sort_union(i3,i2); Using where @@ -580,9 +583,12 @@ pk1 pk2 explain select * from t1 where badkey=1 and key1=10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref key1 key1 4 const 100 Using where +set @tmp_index_merge_ror_cpk=@@optimizer_switch; +set optimizer_switch='extended_keys=off'; explain select * from t1 where pk1 < 7500 and key1 = 10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge PRIMARY,key1 key1,PRIMARY 4,4 NULL ROWS Using intersect(key1,PRIMARY); Using where +set optimizer_switch=@tmp_index_merge_ror_cpk; explain select * from t1 where pktail1ok=1 and key1=10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge key1,pktail1ok key1,pktail1ok 4,4 NULL 1 Using intersect(key1,pktail1ok); Using where diff --git a/mysql-test/r/index_merge_myisam.result b/mysql-test/r/index_merge_myisam.result index 091719095fb..b3beff5a967 100644 --- a/mysql-test/r/index_merge_myisam.result +++ b/mysql-test/r/index_merge_myisam.result @@ -223,6 +223,8 @@ index i1b (key1b, key1a), index i2_1(key2, key2_1), index i2_2(key2, key2_1) ); +Warnings: +Note 1831 Duplicate index `i2_2`. This is deprecated and will be disallowed in a future release. insert into t4 select key1,key1,key1 div 10, key1 % 10, key1 % 10, key1 from t0; select * from t4 where key1a = 3 or key1b = 4; key1a key1b key2 key2_1 key2_2 key3 @@ -550,9 +552,9 @@ explain select * from t1 where exists (select 1 from t2, t3 where t2.a=t1.a and (t3.a=t2.b or t3.b=t2.b or t3.b=t2.b+1)); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where -2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where -2 DEPENDENT SUBQUERY t3 ALL a,b NULL NULL NULL 1002 Range checked for each record (index map: 0x3) +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where +1 PRIMARY t3 ALL a,b NULL NULL NULL 1002 Range checked for each record (index map: 0x3); FirstMatch(t1) select * from t1 where exists (select 1 from t2, t3 where t2.a=t1.a and (t3.a=t2.b or t3.b=t2.b or t3.b=t2.b+1)); @@ -1144,6 +1146,9 @@ set @d=@d*2; alter table t1 add index i2(key2); alter table t1 add index i3(key3); update t1 set key2=key1,key3=key1; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge i2,i3 i3,i2 4,4 NULL REF Using sort_union(i3,i2); Using where @@ -1413,9 +1418,12 @@ pk1 pk2 explain select * from t1 where badkey=1 and key1=10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref key1 key1 4 const 91 Using where +set @tmp_index_merge_ror_cpk=@@optimizer_switch; +set optimizer_switch='extended_keys=off'; explain select * from t1 where pk1 < 7500 and key1 = 10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref PRIMARY,key1 key1 4 const ROWS Using where +set optimizer_switch=@tmp_index_merge_ror_cpk; explain select * from t1 where pktail1ok=1 and key1=10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref key1,pktail1ok pktail1ok 4 const 76 Using where @@ -1590,7 +1598,7 @@ explain select * from t1 where a=10 and b=10 or c=10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge a,b,c a,c 5,5 NULL 54 Using union(a,c); Using where This will switch to sort-union (intersection will be gone, too, -thats a known limitation: +that's a known limitation: set optimizer_switch='default,index_merge_union=off'; explain select * from t1 where a=10 and b=10 or c=10; id select_type table type possible_keys key key_len ref rows Extra diff --git a/mysql-test/r/information_schema-big.result b/mysql-test/r/information_schema-big.result index 3d4fa27859d..9bf015d1b37 100644 --- a/mysql-test/r/information_schema-big.result +++ b/mysql-test/r/information_schema-big.result @@ -1,7 +1,7 @@ DROP TABLE IF EXISTS t0,t1,t2,t3,t4,t5; DROP VIEW IF EXISTS v1; # -# Bug#18925: subqueries with MIN/MAX functions on INFORMARTION_SCHEMA +# Bug#18925: subqueries with MIN/MAX functions on INFORMATION_SCHEMA # SELECT t.table_name, c1.column_name FROM information_schema.tables t @@ -19,12 +19,15 @@ c2.column_name LIKE '%SCHEMA%' ) AND t.table_name NOT LIKE 'innodb%'; table_name column_name +ALL_PLUGINS PLUGIN_NAME +APPLICABLE_ROLES GRANTEE CHARACTER_SETS CHARACTER_SET_NAME CLIENT_STATISTICS CLIENT COLLATIONS COLLATION_NAME COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME COLUMNS TABLE_SCHEMA COLUMN_PRIVILEGES TABLE_SCHEMA +ENABLED_ROLES ROLE_NAME ENGINES ENGINE EVENTS EVENT_SCHEMA FILES TABLE_SCHEMA @@ -54,7 +57,6 @@ TRIGGERS TRIGGER_SCHEMA USER_PRIVILEGES GRANTEE USER_STATISTICS USER VIEWS TABLE_SCHEMA -XTRADB_ADMIN_COMMAND result_message SELECT t.table_name, c1.column_name FROM information_schema.tables t INNER JOIN @@ -71,12 +73,15 @@ c2.column_name LIKE '%SCHEMA%' ) AND t.table_name NOT LIKE 'innodb%'; table_name column_name +ALL_PLUGINS PLUGIN_NAME +APPLICABLE_ROLES GRANTEE CHARACTER_SETS CHARACTER_SET_NAME CLIENT_STATISTICS CLIENT COLLATIONS COLLATION_NAME COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME COLUMNS TABLE_SCHEMA COLUMN_PRIVILEGES TABLE_SCHEMA +ENABLED_ROLES ROLE_NAME ENGINES ENGINE EVENTS EVENT_SCHEMA FILES TABLE_SCHEMA @@ -106,4 +111,3 @@ TRIGGERS TRIGGER_SCHEMA USER_PRIVILEGES GRANTEE USER_STATISTICS USER VIEWS TABLE_SCHEMA -XTRADB_ADMIN_COMMAND result_message diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 1f765a70137..21bb6abd7bd 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -46,12 +46,15 @@ table_name not like 'ndb_%' AND table_name not like 'innodb_%' AND table_name not like 'xtradb_%'; select * from v1; c +ALL_PLUGINS +APPLICABLE_ROLES CHARACTER_SETS CLIENT_STATISTICS COLLATIONS COLLATION_CHARACTER_SET_APPLICABILITY COLUMNS COLUMN_PRIVILEGES +ENABLED_ROLES ENGINES EVENTS FILES @@ -81,20 +84,24 @@ TRIGGERS USER_PRIVILEGES USER_STATISTICS VIEWS +column_stats columns_priv db event func general_log +gtid_slave_pos help_category help_keyword help_relation help_topic host +index_stats plugin proc procs_priv proxies_priv +roles_mapping servers slow_log t1 @@ -102,6 +109,7 @@ t2 t3 t4 t5 +table_stats tables_priv time_zone time_zone_leap_second @@ -120,6 +128,7 @@ TABLE_CONSTRAINTS TABLE_CONSTRAINTS TABLE_PRIVILEGES TABLE_PRIVILEGES TABLE_STATISTICS TABLE_STATISTICS TRIGGERS TRIGGERS +table_stats table_stats tables_priv tables_priv time_zone time_zone time_zone_leap_second time_zone_leap_second @@ -141,6 +150,7 @@ TABLE_CONSTRAINTS TABLE_CONSTRAINTS TABLE_PRIVILEGES TABLE_PRIVILEGES TABLE_STATISTICS TABLE_STATISTICS TRIGGERS TRIGGERS +table_stats table_stats tables_priv tables_priv time_zone time_zone time_zone_leap_second time_zone_leap_second @@ -162,6 +172,7 @@ TABLE_CONSTRAINTS TABLE_CONSTRAINTS TABLE_PRIVILEGES TABLE_PRIVILEGES TABLE_STATISTICS TABLE_STATISTICS TRIGGERS TRIGGERS +table_stats table_stats tables_priv tables_priv time_zone time_zone time_zone_leap_second time_zone_leap_second @@ -466,7 +477,11 @@ drop table t1; create table t1 (a int null, primary key(a)); alter table t1 add constraint constraint_1 unique (a); alter table t1 add constraint unique key_1(a); +Warnings: +Note 1831 Duplicate index `key_1`. This is deprecated and will be disallowed in a future release. alter table t1 add constraint constraint_2 unique key_2(a); +Warnings: +Note 1831 Duplicate index `key_2`. This is deprecated and will be disallowed in a future release. show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -607,7 +622,7 @@ proc security_type enum('INVOKER','DEFINER') proc param_list blob proc returns longblob proc body longblob -proc definer char(77) +proc definer char(141) proc created timestamp proc modified timestamp proc sql_mode set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') @@ -642,8 +657,8 @@ select TABLE_NAME,TABLE_TYPE,ENGINE from information_schema.tables where table_schema='information_schema' limit 2; TABLE_NAME TABLE_TYPE ENGINE -CHARACTER_SETS SYSTEM VIEW MEMORY -CLIENT_STATISTICS SYSTEM VIEW MEMORY +ALL_PLUGINS SYSTEM VIEW Aria +APPLICABLE_ROLES SYSTEM VIEW MEMORY show tables from information_schema like "T%"; Tables_in_information_schema (T%) TABLES @@ -698,6 +713,8 @@ max_questions select,insert,update,references max_connections select,insert,update,references max_user_connections select,insert,update,references authentication_string select,insert,update,references +password_expired select,insert,update,references +is_role select,insert,update,references use test; create function sub1(i int) returns int return i+1; @@ -786,8 +803,9 @@ drop view a2, a1; drop table t_crashme; select table_schema,table_name, column_name from information_schema.columns -where data_type = 'longtext'; +where data_type = 'longtext' and table_schema != 'performance_schema'; table_schema table_name column_name +information_schema ALL_PLUGINS PLUGIN_DESCRIPTION information_schema COLUMNS COLUMN_DEFAULT information_schema COLUMNS COLUMN_TYPE information_schema EVENTS EVENT_DEFINITION @@ -1104,7 +1122,7 @@ CREATE PROCEDURE p1 () BEGIN SELECT 'foo' FROM DUAL; END | -ERROR 42000: Unknown database 'information_schema' +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' select ROUTINE_NAME from routines where ROUTINE_SCHEMA='information_schema'; ROUTINE_NAME grant all on information_schema.* to 'user1'@'localhost'; @@ -1174,7 +1192,7 @@ group by column_type order by num; column_type group_concat(table_schema, '.', table_name) num varchar(27) information_schema.COLUMNS 1 varchar(7) information_schema.ROUTINES,information_schema.VIEWS 2 -varchar(20) information_schema.FILES,information_schema.FILES,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PROFILING 6 +varchar(20) information_schema.ALL_PLUGINS,information_schema.ALL_PLUGINS,information_schema.ALL_PLUGINS,information_schema.FILES,information_schema.FILES,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PROFILING 9 create table t1(f1 char(1) not null, f2 char(9) not null) default character set utf8; select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from @@ -1976,3 +1994,45 @@ SELECT @val1 = @val2; # # End of 5.5 tests # +# +# MDEV-5723: mysqldump -uroot unusable for multi-database operations, checks all databases +# +drop database if exists db1; +create database db1; +use db1; +create table t1 (a int); +create table t2 (a int); +create table t3 (a int); +create database mysqltest; +use mysqltest; +create table t1 (a int); +create table t2 (a int); +create table t3 (a int); +flush tables; +flush status; +SELECT +LOGFILE_GROUP_NAME, FILE_NAME, TOTAL_EXTENTS, INITIAL_SIZE, ENGINE, EXTRA +FROM +INFORMATION_SCHEMA.FILES +WHERE +FILE_TYPE = 'UNDO LOG' AND FILE_NAME IS NOT NULL AND +LOGFILE_GROUP_NAME IN (SELECT DISTINCT LOGFILE_GROUP_NAME +FROM INFORMATION_SCHEMA.FILES +WHERE +FILE_TYPE = 'DATAFILE' AND +TABLESPACE_NAME IN (SELECT DISTINCT TABLESPACE_NAME +FROM INFORMATION_SCHEMA.PARTITIONS +WHERE TABLE_SCHEMA IN ('db1') +) +) +GROUP BY +LOGFILE_GROUP_NAME, FILE_NAME, ENGINE +ORDER BY +LOGFILE_GROUP_NAME; +LOGFILE_GROUP_NAME FILE_NAME TOTAL_EXTENTS INITIAL_SIZE ENGINE EXTRA +# This must have Opened_tables=3, not 6. +show status like 'Opened_tables'; +Variable_name Value +Opened_tables 3 +drop database mysqltest; +drop database db1; diff --git a/mysql-test/r/information_schema_all_engines.result b/mysql-test/r/information_schema_all_engines.result index 4dac9a3e53c..7e6cfd176a4 100644 --- a/mysql-test/r/information_schema_all_engines.result +++ b/mysql-test/r/information_schema_all_engines.result @@ -1,39 +1,36 @@ use INFORMATION_SCHEMA; show tables; Tables_in_information_schema +ALL_PLUGINS +APPLICABLE_ROLES CHARACTER_SETS CLIENT_STATISTICS COLLATIONS COLLATION_CHARACTER_SET_APPLICABILITY COLUMNS COLUMN_PRIVILEGES +ENABLED_ROLES ENGINES EVENTS FILES GLOBAL_STATUS GLOBAL_VARIABLES INDEX_STATISTICS -INNODB_BUFFER_POOL_PAGES -INNODB_BUFFER_POOL_PAGES_BLOB -INNODB_BUFFER_POOL_PAGES_INDEX INNODB_CHANGED_PAGES INNODB_CMP INNODB_CMPMEM INNODB_CMPMEM_RESET +INNODB_CMP_PER_INDEX INNODB_CMP_RESET -INNODB_INDEX_STATS INNODB_LOCKS INNODB_LOCK_WAITS -INNODB_RSEG INNODB_SYS_COLUMNS INNODB_SYS_FIELDS INNODB_SYS_FOREIGN INNODB_SYS_FOREIGN_COLS INNODB_SYS_INDEXES -INNODB_SYS_STATS INNODB_SYS_TABLES INNODB_SYS_TABLESTATS -INNODB_TABLE_STATS INNODB_TRX KEY_CACHES KEY_COLUMN_USAGE @@ -58,7 +55,6 @@ TRIGGERS USER_PRIVILEGES USER_STATISTICS VIEWS -XTRADB_ADMIN_COMMAND SELECT t.table_name, c1.column_name FROM information_schema.tables t INNER JOIN @@ -74,39 +70,36 @@ c2.table_name = t.table_name AND c2.column_name LIKE '%SCHEMA%' ) order by t.table_name; table_name column_name +ALL_PLUGINS PLUGIN_NAME +APPLICABLE_ROLES GRANTEE CHARACTER_SETS CHARACTER_SET_NAME CLIENT_STATISTICS CLIENT COLLATIONS COLLATION_NAME COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME COLUMNS TABLE_SCHEMA COLUMN_PRIVILEGES TABLE_SCHEMA +ENABLED_ROLES ROLE_NAME ENGINES ENGINE EVENTS EVENT_SCHEMA FILES TABLE_SCHEMA GLOBAL_STATUS VARIABLE_NAME GLOBAL_VARIABLES VARIABLE_NAME INDEX_STATISTICS TABLE_SCHEMA -INNODB_BUFFER_POOL_PAGES page_type -INNODB_BUFFER_POOL_PAGES_BLOB space_id -INNODB_BUFFER_POOL_PAGES_INDEX index_id INNODB_CHANGED_PAGES space_id INNODB_CMP page_size INNODB_CMPMEM page_size INNODB_CMPMEM_RESET page_size +INNODB_CMP_PER_INDEX database_name INNODB_CMP_RESET page_size -INNODB_INDEX_STATS table_schema INNODB_LOCKS lock_id INNODB_LOCK_WAITS requesting_trx_id -INNODB_RSEG rseg_id INNODB_SYS_COLUMNS TABLE_ID INNODB_SYS_FIELDS INDEX_ID INNODB_SYS_FOREIGN ID INNODB_SYS_FOREIGN_COLS ID INNODB_SYS_INDEXES INDEX_ID -INNODB_SYS_STATS INDEX_ID -INNODB_SYS_TABLES SCHEMA -INNODB_SYS_TABLESTATS SCHEMA -INNODB_TABLE_STATS table_schema +INNODB_SYS_TABLES TABLE_ID +INNODB_SYS_TABLESTATS TABLE_ID INNODB_TRX trx_id KEY_CACHES KEY_CACHE_NAME KEY_COLUMN_USAGE CONSTRAINT_SCHEMA @@ -131,7 +124,6 @@ TRIGGERS TRIGGER_SCHEMA USER_PRIVILEGES GRANTEE USER_STATISTICS USER VIEWS TABLE_SCHEMA -XTRADB_ADMIN_COMMAND result_message SELECT t.table_name, c1.column_name FROM information_schema.tables t INNER JOIN @@ -147,39 +139,36 @@ c2.table_name = t.table_name AND c2.column_name LIKE '%SCHEMA%' ) order by t.table_name; table_name column_name +ALL_PLUGINS PLUGIN_NAME +APPLICABLE_ROLES GRANTEE CHARACTER_SETS CHARACTER_SET_NAME CLIENT_STATISTICS CLIENT COLLATIONS COLLATION_NAME COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME COLUMNS TABLE_SCHEMA COLUMN_PRIVILEGES TABLE_SCHEMA +ENABLED_ROLES ROLE_NAME ENGINES ENGINE EVENTS EVENT_SCHEMA FILES TABLE_SCHEMA GLOBAL_STATUS VARIABLE_NAME GLOBAL_VARIABLES VARIABLE_NAME INDEX_STATISTICS TABLE_SCHEMA -INNODB_BUFFER_POOL_PAGES page_type -INNODB_BUFFER_POOL_PAGES_BLOB space_id -INNODB_BUFFER_POOL_PAGES_INDEX index_id INNODB_CHANGED_PAGES space_id INNODB_CMP page_size INNODB_CMPMEM page_size INNODB_CMPMEM_RESET page_size +INNODB_CMP_PER_INDEX database_name INNODB_CMP_RESET page_size -INNODB_INDEX_STATS table_schema INNODB_LOCKS lock_id INNODB_LOCK_WAITS requesting_trx_id -INNODB_RSEG rseg_id INNODB_SYS_COLUMNS TABLE_ID INNODB_SYS_FIELDS INDEX_ID INNODB_SYS_FOREIGN ID INNODB_SYS_FOREIGN_COLS ID INNODB_SYS_INDEXES INDEX_ID -INNODB_SYS_STATS INDEX_ID -INNODB_SYS_TABLES SCHEMA -INNODB_SYS_TABLESTATS SCHEMA -INNODB_TABLE_STATS table_schema +INNODB_SYS_TABLES TABLE_ID +INNODB_SYS_TABLESTATS TABLE_ID INNODB_TRX trx_id KEY_CACHES KEY_CACHE_NAME KEY_COLUMN_USAGE CONSTRAINT_SCHEMA @@ -204,11 +193,10 @@ TRIGGERS TRIGGER_SCHEMA USER_PRIVILEGES GRANTEE USER_STATISTICS USER VIEWS TABLE_SCHEMA -XTRADB_ADMIN_COMMAND result_message -select 1 as f1 from information_schema.tables where "CHARACTER_SETS"= +select 1 as "must be 1" from information_schema.tables where "ACCOUNTS"= (select cast(table_name as char) from information_schema.tables order by table_name limit 1) limit 1; -f1 +must be 1 1 select t.table_name, group_concat(t.table_schema, '.', t.table_name), count(*) as num1 @@ -226,6 +214,8 @@ c2.table_schema='information_schema' and group by c2.column_type order by num limit 1) group by t.table_name order by num1, t.table_name; table_name group_concat(t.table_schema, '.', t.table_name) num1 +ALL_PLUGINS information_schema.ALL_PLUGINS 1 +APPLICABLE_ROLES information_schema.APPLICABLE_ROLES 1 CHARACTER_SETS information_schema.CHARACTER_SETS 1 CLIENT_STATISTICS information_schema.CLIENT_STATISTICS 1 COLLATIONS information_schema.COLLATIONS 1 @@ -238,27 +228,21 @@ FILES information_schema.FILES 1 GLOBAL_STATUS information_schema.GLOBAL_STATUS 1 GLOBAL_VARIABLES information_schema.GLOBAL_VARIABLES 1 INDEX_STATISTICS information_schema.INDEX_STATISTICS 1 -INNODB_BUFFER_POOL_PAGES information_schema.INNODB_BUFFER_POOL_PAGES 1 -INNODB_BUFFER_POOL_PAGES_BLOB information_schema.INNODB_BUFFER_POOL_PAGES_BLOB 1 -INNODB_BUFFER_POOL_PAGES_INDEX information_schema.INNODB_BUFFER_POOL_PAGES_INDEX 1 INNODB_CHANGED_PAGES information_schema.INNODB_CHANGED_PAGES 1 INNODB_CMP information_schema.INNODB_CMP 1 INNODB_CMPMEM information_schema.INNODB_CMPMEM 1 INNODB_CMPMEM_RESET information_schema.INNODB_CMPMEM_RESET 1 +INNODB_CMP_PER_INDEX information_schema.INNODB_CMP_PER_INDEX 1 INNODB_CMP_RESET information_schema.INNODB_CMP_RESET 1 -INNODB_INDEX_STATS information_schema.INNODB_INDEX_STATS 1 INNODB_LOCKS information_schema.INNODB_LOCKS 1 INNODB_LOCK_WAITS information_schema.INNODB_LOCK_WAITS 1 -INNODB_RSEG information_schema.INNODB_RSEG 1 INNODB_SYS_COLUMNS information_schema.INNODB_SYS_COLUMNS 1 INNODB_SYS_FIELDS information_schema.INNODB_SYS_FIELDS 1 INNODB_SYS_FOREIGN information_schema.INNODB_SYS_FOREIGN 1 INNODB_SYS_FOREIGN_COLS information_schema.INNODB_SYS_FOREIGN_COLS 1 INNODB_SYS_INDEXES information_schema.INNODB_SYS_INDEXES 1 -INNODB_SYS_STATS information_schema.INNODB_SYS_STATS 1 INNODB_SYS_TABLES information_schema.INNODB_SYS_TABLES 1 INNODB_SYS_TABLESTATS information_schema.INNODB_SYS_TABLESTATS 1 -INNODB_TABLE_STATS information_schema.INNODB_TABLE_STATS 1 INNODB_TRX information_schema.INNODB_TRX 1 KEY_CACHES information_schema.KEY_CACHES 1 KEY_COLUMN_USAGE information_schema.KEY_COLUMN_USAGE 1 @@ -288,39 +272,36 @@ VIEWS information_schema.VIEWS 1 +---------------------------------------+ Database: information_schema | Tables | +| ALL_PLUGINS | +| APPLICABLE_ROLES | | CHARACTER_SETS | | CLIENT_STATISTICS | | COLLATIONS | | COLLATION_CHARACTER_SET_APPLICABILITY | | COLUMNS | | COLUMN_PRIVILEGES | +| ENABLED_ROLES | | ENGINES | | EVENTS | | FILES | | GLOBAL_STATUS | | GLOBAL_VARIABLES | | INDEX_STATISTICS | -| INNODB_BUFFER_POOL_PAGES | -| INNODB_BUFFER_POOL_PAGES_BLOB | -| INNODB_BUFFER_POOL_PAGES_INDEX | | INNODB_CHANGED_PAGES | | INNODB_CMP | | INNODB_CMPMEM | | INNODB_CMPMEM_RESET | +| INNODB_CMP_PER_INDEX | | INNODB_CMP_RESET | -| INNODB_INDEX_STATS | | INNODB_LOCKS | | INNODB_LOCK_WAITS | -| INNODB_RSEG | | INNODB_SYS_COLUMNS | | INNODB_SYS_FIELDS | | INNODB_SYS_FOREIGN | | INNODB_SYS_FOREIGN_COLS | | INNODB_SYS_INDEXES | -| INNODB_SYS_STATS | | INNODB_SYS_TABLES | | INNODB_SYS_TABLESTATS | -| INNODB_TABLE_STATS | | INNODB_TRX | | KEY_CACHES | | KEY_COLUMN_USAGE | @@ -345,45 +326,41 @@ Database: information_schema | USER_PRIVILEGES | | USER_STATISTICS | | VIEWS | -| XTRADB_ADMIN_COMMAND | +---------------------------------------+ +---------------------------------------+ +---------------------------------------+ Database: INFORMATION_SCHEMA | Tables | +| ALL_PLUGINS | +| APPLICABLE_ROLES | | CHARACTER_SETS | | CLIENT_STATISTICS | | COLLATIONS | | COLLATION_CHARACTER_SET_APPLICABILITY | | COLUMNS | | COLUMN_PRIVILEGES | +| ENABLED_ROLES | | ENGINES | | EVENTS | | FILES | | GLOBAL_STATUS | | GLOBAL_VARIABLES | | INDEX_STATISTICS | -| INNODB_BUFFER_POOL_PAGES | -| INNODB_BUFFER_POOL_PAGES_BLOB | -| INNODB_BUFFER_POOL_PAGES_INDEX | | INNODB_CHANGED_PAGES | | INNODB_CMP | | INNODB_CMPMEM | | INNODB_CMPMEM_RESET | +| INNODB_CMP_PER_INDEX | | INNODB_CMP_RESET | -| INNODB_INDEX_STATS | | INNODB_LOCKS | | INNODB_LOCK_WAITS | -| INNODB_RSEG | | INNODB_SYS_COLUMNS | | INNODB_SYS_FIELDS | | INNODB_SYS_FOREIGN | | INNODB_SYS_FOREIGN_COLS | | INNODB_SYS_INDEXES | -| INNODB_SYS_STATS | | INNODB_SYS_TABLES | | INNODB_SYS_TABLESTATS | -| INNODB_TABLE_STATS | | INNODB_TRX | | KEY_CACHES | | KEY_COLUMN_USAGE | @@ -408,7 +385,6 @@ Database: INFORMATION_SCHEMA | USER_PRIVILEGES | | USER_STATISTICS | | VIEWS | -| XTRADB_ADMIN_COMMAND | +--------------------+ +--------------------+ +--------------------+ @@ -417,5 +393,5 @@ Wildcard: inf_rmation_schema | information_schema | SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') AND table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA; table_schema count(*) -information_schema 58 -mysql 23 +information_schema 54 +mysql 30 diff --git a/mysql-test/r/information_schema_stats.result b/mysql-test/r/information_schema_stats.result new file mode 100644 index 00000000000..bc2ce9f0294 --- /dev/null +++ b/mysql-test/r/information_schema_stats.result @@ -0,0 +1,70 @@ +set global userstat=1; +create table just_a_test(id int,first_name varchar(10),last_name varchar(10),address varchar(100),phone bigint,email varchar(30), state varchar(30)); +insert into just_a_test values(1,'fa','la','china_a',11111111,'fa_la@163.com','California'), +(2,'fb','lb','china_b',22222222,'fb_lb@163.com','Arizona'), +(3,'fc','lc','china_c',33333333,'fc_lc@163.com','California'), +(4,'fd','ld','china_d',44444444,'fd_ld@163.com','Utah'), +(5,'fe','le','china_e',55555555,'fe_le@163.com','Arizona'); +alter table just_a_test add primary key (id); +alter table just_a_test add key IND_just_a_test_first_name_last_name(first_name,last_name); +alter table just_a_test add key IND_just_a_test_state(state); +select count(*) from just_a_test where first_name='fc' and last_name='lc'; +count(*) +1 +select count(*) from just_a_test where state = 'California'; +count(*) +2 +select * from information_schema.index_statistics where table_schema='test' and table_name='just_a_test'; +TABLE_SCHEMA TABLE_NAME INDEX_NAME ROWS_READ +test just_a_test IND_just_a_test_first_name_last_name 1 +test just_a_test IND_just_a_test_state 2 +select * from information_schema.table_statistics where table_schema='test' and table_name='just_a_test'; +TABLE_SCHEMA TABLE_NAME ROWS_READ ROWS_CHANGED ROWS_CHANGED_X_INDEXES +test just_a_test 18 5 5 +alter table just_a_test drop key IND_just_a_test_first_name_last_name; +select * from information_schema.index_statistics where table_schema='test' and table_name='just_a_test'; +TABLE_SCHEMA TABLE_NAME INDEX_NAME ROWS_READ +test just_a_test IND_just_a_test_state 2 +select * from information_schema.table_statistics where table_schema='test' and table_name='just_a_test'; +TABLE_SCHEMA TABLE_NAME ROWS_READ ROWS_CHANGED ROWS_CHANGED_X_INDEXES +test just_a_test 23 5 5 +alter table just_a_test drop column state; +select * from information_schema.index_statistics where table_schema='test' and table_name='just_a_test'; +TABLE_SCHEMA TABLE_NAME INDEX_NAME ROWS_READ +select * from information_schema.table_statistics where table_schema='test' and table_name='just_a_test'; +TABLE_SCHEMA TABLE_NAME ROWS_READ ROWS_CHANGED ROWS_CHANGED_X_INDEXES +test just_a_test 28 5 5 +drop table just_a_test; +select * from information_schema.index_statistics where table_schema='test' and table_name='just_a_test'; +TABLE_SCHEMA TABLE_NAME INDEX_NAME ROWS_READ +select * from information_schema.table_statistics where table_schema='test' and table_name='just_a_test'; +TABLE_SCHEMA TABLE_NAME ROWS_READ ROWS_CHANGED ROWS_CHANGED_X_INDEXES +create table just_a_test(id int not null primary key,first_name varchar(10),last_name varchar(10),address varchar(100),phone bigint,email varchar(30), state varchar(30),key(first_name,last_name),key(state)); +insert into just_a_test values(1,'fa','la','china_a',11111111,'fa_la@163.com','California'), +(2,'fb','lb','china_b',22222222,'fb_lb@163.com','Arizona'), +(3,'fc','lc','china_c',33333333,'fc_lc@163.com','California'), +(4,'fd','ld','china_d',44444444,'fd_ld@163.com','Utah'), +(5,'fe','le','china_e',55555555,'fe_le@163.com','Arizona'); +select count(*) from just_a_test where first_name='fc' and last_name='lc'; +count(*) +1 +select count(*) from just_a_test where state = 'California'; +count(*) +2 +select count(*) from just_a_test where id between 2 and 4; +count(*) +3 +select * from information_schema.index_statistics where table_schema='test' and table_name='just_a_test'; +TABLE_SCHEMA TABLE_NAME INDEX_NAME ROWS_READ +test just_a_test PRIMARY 5 +test just_a_test first_name 1 +test just_a_test state 2 +select * from information_schema.table_statistics where table_schema='test' and table_name='just_a_test'; +TABLE_SCHEMA TABLE_NAME ROWS_READ ROWS_CHANGED ROWS_CHANGED_X_INDEXES +test just_a_test 8 5 15 +drop table just_a_test; +select * from information_schema.index_statistics where table_schema='test' and table_name='just_a_test'; +TABLE_SCHEMA TABLE_NAME INDEX_NAME ROWS_READ +select * from information_schema.table_statistics where table_schema='test' and table_name='just_a_test'; +TABLE_SCHEMA TABLE_NAME ROWS_READ ROWS_CHANGED ROWS_CHANGED_X_INDEXES +set global userstat=0; diff --git a/mysql-test/r/init_file_longline_3816.result b/mysql-test/r/init_file_longline_3816.result new file mode 100644 index 00000000000..0155f764592 --- /dev/null +++ b/mysql-test/r/init_file_longline_3816.result @@ -0,0 +1,3 @@ +select count(*) from t4; +count(*) +0 diff --git a/mysql-test/r/init_file_set_password-7656.result b/mysql-test/r/init_file_set_password-7656.result new file mode 100644 index 00000000000..e5b3fc75706 --- /dev/null +++ b/mysql-test/r/init_file_set_password-7656.result @@ -0,0 +1,8 @@ +create user foo@localhost; +select user,host,password from mysql.user where user='foo'; +user host password +foo localhost +select user,host,password from mysql.user where user='foo'; +user host password +foo localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 +drop user foo@localhost; diff --git a/mysql-test/r/innodb_bug878769,innodb_plugin.rdiff b/mysql-test/r/innodb_bug878769,innodb_plugin.rdiff deleted file mode 100644 index 0a8ea2d8c67..00000000000 --- a/mysql-test/r/innodb_bug878769,innodb_plugin.rdiff +++ /dev/null @@ -1,11 +0,0 @@ ---- r/innodb_bug878769.result 2011-11-22 18:50:25.000000000 +0100 -+++ r/innodb_bug878769.reject 2012-02-07 12:45:07.000000000 +0100 -@@ -39,7 +39,7 @@ - GROUP BY 1,2; - id select_type table type possible_keys key key_len ref rows Extra - 1 SIMPLE t2 index col_int_key col_int_key 5 NULL 12 Using where; Using index; Using temporary; Using filesort --1 SIMPLE t1 ref col_int_key col_int_key 5 test.t2.col_int_key 1 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan -+1 SIMPLE t1 ref col_int_key col_int_key 5 test.t2.col_int_key 1 - SELECT t1.col_time_key, t1.col_varchar_key - FROM t2 STRAIGHT_JOIN t1 ON t1.col_int_key = t2.col_int_key - GROUP BY 1,2; diff --git a/mysql-test/r/innodb_ext_key.result b/mysql-test/r/innodb_ext_key.result index df681f21f3b..2b3b98eb26a 100644 --- a/mysql-test/r/innodb_ext_key.result +++ b/mysql-test/r/innodb_ext_key.result @@ -20,6 +20,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 5 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -39,6 +40,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 1 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -60,6 +62,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -81,6 +84,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -102,6 +106,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 6 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -123,6 +128,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 1 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -146,6 +152,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 6 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -169,6 +176,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 3 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -188,6 +196,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 6 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -207,6 +216,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -228,6 +238,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 6 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -249,6 +260,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -270,6 +282,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 5 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -291,6 +304,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -317,6 +331,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 9 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 9 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -327,7 +342,7 @@ from lineitem use index (i_l_shipdate, i_l_receiptdate) where l_shipdate='1992-07-01' and l_orderkey=130 or l_receiptdate='1992-07-01' and l_orderkey=5603; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE lineitem index_merge i_l_shipdate,i_l_receiptdate i_l_shipdate,i_l_receiptdate 8,8 NULL 2 Using sort_union(i_l_shipdate,i_l_receiptdate); Using where +1 SIMPLE lineitem index_merge i_l_shipdate,i_l_receiptdate i_l_shipdate,i_l_receiptdate 8,8 NULL 2 Using union(i_l_shipdate,i_l_receiptdate); Using where flush status; select l_orderkey, l_linenumber from lineitem use index (i_l_shipdate, i_l_receiptdate) @@ -343,6 +358,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 2 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 2 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -370,6 +386,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 9 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 9 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -397,6 +414,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 3 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 3 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -422,6 +440,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 9 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 3 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -447,6 +466,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 3 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 3 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -477,6 +497,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 294 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -507,6 +528,7 @@ Handler_read_key 21 Handler_read_last 1 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -529,6 +551,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 1230 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -551,6 +574,7 @@ Handler_read_key 6 Handler_read_last 1 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -581,6 +605,7 @@ Handler_read_key 3 Handler_read_last 0 Handler_read_next 26 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -610,6 +635,7 @@ Handler_read_key 3 Handler_read_last 0 Handler_read_next 3 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -807,6 +833,7 @@ Handler_read_key 10 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 11 @@ -828,6 +855,7 @@ Handler_read_key 10 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 11 @@ -842,6 +870,10 @@ engine=innodb; insert into t3 select a,a,a,a from t2; alter table t3 add primary key (pk1, pk2); alter table t3 add key (col1, col2); +analyze table t1,t3; +Table Op Msg_type Msg_text +test.t1 analyze status OK +test.t3 analyze status OK set optimizer_switch='extended_keys=off'; explain select * from t1, t3 where t3.col1=t1.a and t3.col2=t1.a; @@ -852,7 +884,7 @@ explain select * from t1, t3 where t3.col1=t1.a and t3.col2=t1.a and t3.pk1=t1.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where -1 SIMPLE t3 ref PRIMARY,col1 PRIMARY 4 test.t1.a # Using where +1 SIMPLE t3 ref PRIMARY,col1 col1 8 test.t1.a,test.t1.a # Using where; Using index set optimizer_switch='extended_keys=on'; explain select * from t1, t3 where t3.col1=t1.a and t3.col2=t1.a; diff --git a/mysql-test/r/innodb_icp,innodb_plugin.rdiff b/mysql-test/r/innodb_icp,innodb_plugin.rdiff deleted file mode 100644 index f8ac1186f4a..00000000000 --- a/mysql-test/r/innodb_icp,innodb_plugin.rdiff +++ /dev/null @@ -1,58 +0,0 @@ ---- innodb_icp.result 2017-04-02 23:39:45.063149325 -0700 -+++ innodb_icp,innodb_plugin.result 2017-04-02 23:36:33.279164925 -0700 -@@ -213,7 +213,7 @@ - EXPLAIN - SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE t3 range c1 c1 12 NULL 2 Using index condition; Using where -+1 SIMPLE t3 range c1 c1 12 NULL 2 Using where - SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2; - c1 - EXPLAIN -@@ -637,7 +637,7 @@ - WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania' - ORDER BY a; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE t1 range b b 13 NULL 2 Using where; Rowid-ordered scan; Using filesort -+1 SIMPLE t1 range b b 13 NULL 2 Using where; Using filesort - SELECT * FROM t1 - WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania' - ORDER BY a; -@@ -649,7 +649,7 @@ - WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania' - ORDER BY a; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE t1 range b b 13 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using filesort -+1 SIMPLE t1 range b b 13 NULL 2 Using where; Using filesort - SELECT * FROM t1 - WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania' - ORDER BY a; -@@ -825,15 +825,15 @@ - 4 4 - show status like "Handler_icp%"; - Variable_name Value --Handler_icp_attempts 2 --Handler_icp_match 1 -+Handler_icp_attempts 0 -+Handler_icp_match 0 - SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ; - c1 c2 - 4 4 - show status like "Handler_icp%"; - Variable_name Value --Handler_icp_attempts 2 --Handler_icp_match 1 -+Handler_icp_attempts 0 -+Handler_icp_match 0 - DROP TABLE t1; - create table t1 (a int,b char(5),primary key (a), key (b(1))); - insert into t1 values ('a','b'); -@@ -868,7 +868,7 @@ - EXPLAIN - SELECT * FROM t1 FORCE INDEX(idx1) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y'); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE t1 range idx1 idx1 10 NULL 2 Using index condition; Using where -+1 SIMPLE t1 range idx1 idx1 10 NULL 2 Using where - SELECT * FROM t1 FORCE INDEX(idx1) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y'); - c1 c2 - aa x diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result index 9ca02595939..fb6cdefa14f 100644 --- a/mysql-test/r/innodb_icp.result +++ b/mysql-test/r/innodb_icp.result @@ -711,6 +711,9 @@ a INT PRIMARY KEY NOT NULL AUTO_INCREMENT, b INT, c INT, d DATE NOT NULL, e VARCHAR(1), KEY (c), KEY (d), KEY k2(b), KEY k3(b), KEY k4(b) ); +Warnings: +Note 1831 Duplicate index `k3`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `k4`. This is deprecated and will be disallowed in a future release. INSERT INTO t1 (b,c,d,e) VALUES (6,5,'2006-05-25','y'),(1,5,'2008-01-23','t'), (6,5,'2007-06-18','d'),(4,5,'1900-01-01','r'), diff --git a/mysql-test/r/innodb_load_xa.result b/mysql-test/r/innodb_load_xa.result index 8b8de2032e5..017bc7450bd 100644 --- a/mysql-test/r/innodb_load_xa.result +++ b/mysql-test/r/innodb_load_xa.result @@ -9,10 +9,11 @@ start transaction; insert t1 values (1); insert t1 values (2); commit; -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +mysqld-bin.000001 # Gtid # # GTID #-#-# mysqld-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb -mysqld-bin.000001 # Query # # BEGIN +mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-# mysqld-bin.000001 # Query # # use `test`; insert t1 values (1) mysqld-bin.000001 # Query # # use `test`; insert t1 values (2) mysqld-bin.000001 # Query # # COMMIT diff --git a/mysql-test/r/innodb_mrr_cpk,innodb_plugin.rdiff b/mysql-test/r/innodb_mrr_cpk,innodb_plugin.rdiff deleted file mode 100644 index 2c34a71d5d2..00000000000 --- a/mysql-test/r/innodb_mrr_cpk,innodb_plugin.rdiff +++ /dev/null @@ -1,120 +0,0 @@ ---- r/innodb_mrr_cpk.result 2012-02-23 15:57:49.000000000 +0100 -+++ r/innodb_mrr_cpk,innodb_plugin.reject 2012-02-23 19:44:57.000000000 +0100 -@@ -27,13 +27,13 @@ - explain select * from t1, t2 where t1.a=t2.a; - id select_type table type possible_keys key key_len ref rows Extra - 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where --1 SIMPLE t1 eq_ref PRIMARY PRIMARY 8 test.t2.a 1 Using join buffer (flat, BKA join); Key-ordered scan -+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 8 test.t2.a 1 - This output must be sorted by value of t1.a: - select * from t1, t2 where t1.a=t2.a; - a b filler a - a-1010=A b-1010=B filler a-1010=A --a-1020=A b-1020=B filler a-1020=A - a-1030=A b-1030=B filler a-1030=A -+a-1020=A b-1020=B filler a-1020=A - drop table t1, t2; - create table t1( - a char(8) character set utf8, b int, filler char(100), -@@ -49,24 +49,24 @@ - explain select * from t1, t2 where t1.a=t2.a and t1.b=t2.b; - id select_type table type possible_keys key key_len ref rows Extra - 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where --1 SIMPLE t1 eq_ref PRIMARY PRIMARY 28 test.t2.a,test.t2.b 1 Using join buffer (flat, BKA join); Key-ordered scan -+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 28 test.t2.a,test.t2.b 1 - select * from t1, t2 where t1.a=t2.a and t1.b=t2.b; - a b filler a b - a-1010=A 1010 filler a-1010=A 1010 --a-1020=A 1020 filler a-1020=A 1020 - a-1030=A 1030 filler a-1030=A 1030 -+a-1020=A 1020 filler a-1020=A 1020 - insert into t2 values ('a-1030=A', 1030), ('a-1020=A', 1020); - explain select * from t1, t2 where t1.a=t2.a and t1.b=t2.b; - id select_type table type possible_keys key key_len ref rows Extra - 1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using where --1 SIMPLE t1 eq_ref PRIMARY PRIMARY 28 test.t2.a,test.t2.b 1 Using join buffer (flat, BKA join); Key-ordered scan -+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 28 test.t2.a,test.t2.b 1 - select * from t1, t2 where t1.a=t2.a and t1.b=t2.b; - a b filler a b - a-1010=A 1010 filler a-1010=A 1010 --a-1020=A 1020 filler a-1020=A 1020 --a-1020=A 1020 filler a-1020=A 1020 - a-1030=A 1030 filler a-1030=A 1030 -+a-1020=A 1020 filler a-1020=A 1020 - a-1030=A 1030 filler a-1030=A 1030 -+a-1020=A 1020 filler a-1020=A 1020 - drop table t1, t2; - create table t1( - a varchar(8) character set utf8, b int, filler char(100), -@@ -82,21 +82,21 @@ - explain select * from t1, t2 where t1.a=t2.a and t1.b=t2.b; - id select_type table type possible_keys key key_len ref rows Extra - 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where --1 SIMPLE t1 eq_ref PRIMARY PRIMARY 30 test.t2.a,test.t2.b 1 Using where; Using join buffer (flat, BKA join); Key-ordered scan -+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 30 test.t2.a,test.t2.b 1 Using where - select * from t1, t2 where t1.a=t2.a and t1.b=t2.b; - a b filler a b - a-1010=A 1010 filler a-1010=A 1010 --a-1020=A 1020 filler a-1020=A 1020 - a-1030=A 1030 filler a-1030=A 1030 -+a-1020=A 1020 filler a-1020=A 1020 - explain select * from t1, t2 where t1.a=t2.a; - id select_type table type possible_keys key key_len ref rows Extra - 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where --1 SIMPLE t1 ref PRIMARY PRIMARY 26 test.t2.a 1 Using where; Using join buffer (flat, BKA join); Key-ordered scan -+1 SIMPLE t1 ref PRIMARY PRIMARY 26 test.t2.a 1 Using where - select * from t1, t2 where t1.a=t2.a; - a b filler a b - a-1010=A 1010 filler a-1010=A 1010 --a-1020=A 1020 filler a-1020=A 1020 - a-1030=A 1030 filler a-1030=A 1030 -+a-1020=A 1020 filler a-1020=A 1020 - drop table t1, t2; - create table t1 (a int, b int, c int, filler char(100), primary key(a,b,c)); - insert into t1 select A.a, B.a, C.a, 'filler' from t0 A, t0 B, t0 C; -@@ -111,15 +111,15 @@ - explain select * from t1, t2 where t1.a=t2.a and t1.b=t2.b; - id select_type table type possible_keys key key_len ref rows Extra - 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where --1 SIMPLE t1 ref PRIMARY PRIMARY 8 test.t2.a,test.t2.b 1 Using join buffer (flat, BKA join); Key-ordered scan -+1 SIMPLE t1 ref PRIMARY PRIMARY 8 test.t2.a,test.t2.b 1 - select * from t1, t2 where t1.a=t2.a and t1.b=t2.b; - a b c filler a b -+11 33 124 filler 11 33 -+11 33 125 filler 11 33 -+11 22 1234 filler 11 22 - 11 11 11 filler 11 11 - 11 11 12 filler 11 11 - 11 11 13 filler 11 11 --11 22 1234 filler 11 22 --11 33 124 filler 11 33 --11 33 125 filler 11 33 - set join_cache_level=0; - select * from t1, t2 where t1.a=t2.a and t1.b=t2.b; - a b c filler a b -@@ -133,14 +133,14 @@ - explain select * from t1, t2 where t1.a=t2.a and t2.b + t1.b > 100; - id select_type table type possible_keys key key_len ref rows Extra - 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where --1 SIMPLE t1 ref PRIMARY PRIMARY 4 test.t2.a 1 Using where; Using join buffer (flat, BKA join); Key-ordered scan -+1 SIMPLE t1 ref PRIMARY PRIMARY 4 test.t2.a 1 Using where - select * from t1, t2 where t1.a=t2.a and t2.b + t1.b > 100; - a b c filler a b - set optimizer_switch='index_condition_pushdown=off'; - explain select * from t1, t2 where t1.a=t2.a and t2.b + t1.b > 100; - id select_type table type possible_keys key key_len ref rows Extra - 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where --1 SIMPLE t1 ref PRIMARY PRIMARY 4 test.t2.a 1 Using where; Using join buffer (flat, BKA join); Key-ordered scan -+1 SIMPLE t1 ref PRIMARY PRIMARY 4 test.t2.a 1 Using where - select * from t1, t2 where t1.a=t2.a and t2.b + t1.b > 100; - a b c filler a b - set optimizer_switch='index_condition_pushdown=on'; -@@ -170,7 +170,7 @@ - select * from t2 straight_join t1 force index(kp1) where t1.kp1=t2.a; - id select_type table type possible_keys key key_len ref rows Extra - 1 SIMPLE t2 ALL NULL NULL NULL NULL 10 --1 SIMPLE t1 ref kp1 kp1 32 test.t2.a 1 Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan -+1 SIMPLE t1 ref kp1 kp1 32 test.t2.a 1 - select * from t2 straight_join t1 force index(kp1) where t1.kp1=t2.a; - a pk kp1 col1 - kp1-1000 pk-1000 kp1-1000 val-1000 diff --git a/mysql-test/r/innodb_mysql_lock.result b/mysql-test/r/innodb_mysql_lock.result index 4c7e7f11987..70b86017008 100644 --- a/mysql-test/r/innodb_mysql_lock.result +++ b/mysql-test/r/innodb_mysql_lock.result @@ -1,3 +1,6 @@ +set @old_innodb_lock_wait_timeout=@@global.innodb_lock_wait_timeout; +set global innodb_lock_wait_timeout=300; +set session innodb_lock_wait_timeout=300; # # Bug #22876 Four-way deadlock # @@ -172,3 +175,4 @@ id value 1 12345 COMMIT; DROP TABLE t1; +set global innodb_lock_wait_timeout=@old_innodb_lock_wait_timeout; diff --git a/mysql-test/r/innodb_mysql_lock2.result b/mysql-test/r/innodb_mysql_lock2.result index 17dd747de6f..54203c140a2 100644 --- a/mysql-test/r/innodb_mysql_lock2.result +++ b/mysql-test/r/innodb_mysql_lock2.result @@ -331,13 +331,14 @@ Success: 'update v2 set j= j-10 where j = 3' takes shared row locks on 't1'. # 4.1 SELECT/SET with a stored function which does not # modify data and uses SELECT in its turn. # -# In theory there is no need to take row locks on the table +# There is no need to take row locks on the table # being selected from in SF as the call to such function -# won't get into the binary log. In practice, however, we -# discover that fact too late in the process to be able to -# affect the decision what locks should be taken. -# Hence, strong locks are taken in this case. -Success: 'select f1()' takes shared row locks on 't1'. +# won't get into the binary log. +# +# However in practice innodb takes strong lock on tables +# being selected from within SF, when SF is called from +# non SELECT statements like 'set' statement below. +Success: 'select f1()' doesn't take row locks on 't1'. Success: 'set @a:= f1()' takes shared row locks on 't1'. # # 4.2 INSERT (or other statement which modifies data) with @@ -364,13 +365,15 @@ Success: 'set @a:= f2()' takes shared row locks on 't1'. # modify data and reads a table through subselect # in a control construct. # -# Again, in theory a call to this function won't get to the -# binary log and thus no locking is needed. But in practice -# we don't detect this fact early enough (get_lock_type_for_table()) -# to avoid taking row locks. -Success: 'select f3()' takes shared row locks on 't1'. +# Call to this function won't get to the +# binary log and thus no locking is needed. +# +# However in practice innodb takes strong lock on tables +# being selected from within SF, when SF is called from +# non SELECT statements like 'set' statement below. +Success: 'select f3()' doesn't take row locks on 't1'. Success: 'set @a:= f3()' takes shared row locks on 't1'. -Success: 'select f4()' takes shared row locks on 't1'. +Success: 'select f4()' doesn't take row locks on 't1'. Success: 'set @a:= f4()' takes shared row locks on 't1'. # # 4.5. INSERT (or other statement which modifies data) with @@ -398,13 +401,15 @@ Success: 'set @a:= f5()' takes shared row locks on 't1'. # doesn't modify data and reads tables through # a view. # -# Once again, in theory, calls to such functions won't -# get into the binary log and thus don't need row -# locks. But in practice this fact is discovered -# too late to have any effect. -Success: 'select f6()' takes shared row locks on 't1'. +# Calls to such functions won't get into +# the binary log and thus don't need row locks. +# +# However in practice innodb takes strong lock on tables +# being selected from within SF, when SF is called from +# non SELECT statements like 'set' statement below. +Success: 'select f6()' doesn't take row locks on 't1'. Success: 'set @a:= f6()' takes shared row locks on 't1'. -Success: 'select f7()' takes shared row locks on 't1'. +Success: 'select f7()' doesn't take row locks on 't1'. Success: 'set @a:= f7()' takes shared row locks on 't1'. # # 4.8 INSERT which uses stored function which @@ -431,10 +436,9 @@ Success: 'select f9()' takes shared row locks on 't1'. # data and reads a table indirectly, by calling another # function. # -# In theory, calls to such functions won't get into the binary -# log and thus don't need to acquire row locks. But in practice -# this fact is discovered too late to have any effect. -Success: 'select f10()' takes shared row locks on 't1'. +# Calls to such functions won't get into the binary +# log and thus don't need to acquire row locks. +Success: 'select f10()' doesn't take row locks on 't1'. # # 4.11 INSERT which uses a stored function which doesn't modify # data and reads a table indirectly, by calling another @@ -494,10 +498,9 @@ Success: 'select f14()' takes shared row locks on 't1'. # 5.3 SELECT that calls a function that doesn't modify data and # uses a CALL statement that reads a table via SELECT. # -# In theory, calls to such functions won't get into the binary -# log and thus don't need to acquire row locks. But in practice -# this fact is discovered too late to have any effect. -Success: 'select f15()' takes shared row locks on 't1'. +# Calls to such functions won't get into the binary +# log and thus don't need to acquire row locks. +Success: 'select f15()' doesn't take row locks on 't1'. # # 5.4 INSERT which calls function which doesn't modify data and # uses CALL statement which reads table through SELECT. diff --git a/mysql-test/r/innodb_mysql_sync.result b/mysql-test/r/innodb_mysql_sync.result index 58254412c5b..cfe855fbb76 100644 --- a/mysql-test/r/innodb_mysql_sync.result +++ b/mysql-test/r/innodb_mysql_sync.result @@ -18,10 +18,10 @@ SET DEBUG_SYNC='now SIGNAL table_altered'; # Complete optimization Table Op Msg_type Msg_text test.t1 optimize note Table does not support optimize, doing recreate + analyze instead -test.t1 optimize error Got error -1 from storage engine +test.t1 optimize error Got error -1 "Internal error < 0 (Not system error)" from storage engine MEMORY test.t1 optimize status Operation failed Warnings: -Error 1030 Got error -1 from storage engine +Error 1030 Got error -1 "Internal error < 0 (Not system error)" from storage engine MEMORY DROP TABLE t1; SET DEBUG_SYNC='RESET'; # @@ -86,7 +86,10 @@ SET DEBUG_SYNC= 'now SIGNAL killed'; # Reaping: OPTIMIZE TABLE t1 Table Op Msg_type Msg_text test.t1 optimize note Table does not support optimize, doing recreate + analyze instead +test.t1 optimize error Query execution was interrupted test.t1 optimize status Operation failed +Warnings: +Error 1317 Query execution was interrupted # Connection default DROP TABLE t1; SET DEBUG_SYNC= 'RESET'; @@ -101,7 +104,7 @@ DROP TABLE IF EXISTS t1; CREATE DATABASE db1; CREATE TABLE db1.t1(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, value INT) engine=innodb; INSERT INTO db1.t1(value) VALUES (1), (2); -SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query"; +SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query"; # Sending: ALTER TABLE db1.t1 ADD INDEX(value); # Connection con1 @@ -115,45 +118,47 @@ SET DEBUG_SYNC= "now SIGNAL query"; # Connection default # Reaping: ALTER TABLE db1.t1 ADD INDEX(value) DROP DATABASE db1; -# Test 2: Primary index (implicit), should block reads. +# Test 2: Primary index (implicit), should block writes. CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb; -SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query"; +SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query"; # Sending: -ALTER TABLE t1 ADD UNIQUE INDEX(a); +ALTER TABLE t1 ADD UNIQUE INDEX(a), LOCK=SHARED; # Connection con1 SET DEBUG_SYNC= "now WAIT_FOR manage"; USE test; -# Sending: SELECT * FROM t1; +a b +# Sending: +UPDATE t1 SET a=NULL; # Connection con2 # Waiting for SELECT to be blocked by the metadata lock on t1 SET DEBUG_SYNC= "now SIGNAL query"; # Connection default # Reaping: ALTER TABLE t1 ADD UNIQUE INDEX(a) # Connection con1 -# Reaping: SELECT * FROM t1 -a b -# Test 3: Primary index (explicit), should block reads. +# Reaping: UPDATE t1 SET a=NULL +# Test 3: Primary index (explicit), should block writes. # Connection default ALTER TABLE t1 DROP INDEX a; -SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query"; +SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query"; # Sending: -ALTER TABLE t1 ADD PRIMARY KEY (a); +ALTER TABLE t1 ADD PRIMARY KEY (a), LOCK=SHARED; # Connection con1 SET DEBUG_SYNC= "now WAIT_FOR manage"; -# Sending: SELECT * FROM t1; +a b +# Sending: +UPDATE t1 SET a=NULL; # Connection con2 # Waiting for SELECT to be blocked by the metadata lock on t1 SET DEBUG_SYNC= "now SIGNAL query"; # Connection default # Reaping: ALTER TABLE t1 ADD PRIMARY KEY (a) # Connection con1 -# Reaping: SELECT * FROM t1 -a b +# Reaping: UPDATE t1 SET a=NULL # Test 4: Secondary unique index, should not block reads. # Connection default -SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query"; +SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query"; # Sending: ALTER TABLE t1 ADD UNIQUE (b); # Connection con1 @@ -186,3 +191,356 @@ a b 1 12345 2 23456 DROP TABLE t1; +# +# Bug#13417754 ASSERT IN ROW_DROP_DATABASE_FOR_MYSQL DURING DROP SCHEMA +# +DROP TABLE IF EXISTS t1; +DROP DATABASE IF EXISTS db1; +CREATE TABLE t1(a int) engine=InnoDB; +CREATE DATABASE db1; +# Connection con1 +SET DEBUG_SYNC= 'after_innobase_rename_table SIGNAL locked WAIT_FOR continue'; +# Sending: +ALTER TABLE t1 RENAME db1.t1; +# Connection con2 +SET DEBUG_SYNC= 'now WAIT_FOR locked'; +# DROP DATABASE db1 should now be blocked by ALTER TABLE +# Sending: +DROP DATABASE db1; +# Connection default +# Check that DROP DATABASE is blocked by IX lock on db1 +# Resume ALTER TABLE +SET DEBUG_SYNC= 'now SIGNAL continue'; +# Connection con1 +# Reaping: ALTER TABLE t1 RENAME db1.t1; +# Connection con2 +# Reaping: DROP DATABASE db1 +# Connection default; +SET DEBUG_SYNC= 'RESET'; +# +# WL#5534 Online ALTER, Phase 1 +# +# Multi thread tests. +# See alter_table.test for single thread tests. +DROP TABLE IF EXISTS t1; +CREATE TABLE t1(a INT PRIMARY KEY, b INT) engine=InnoDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SET DEBUG_SYNC= 'RESET'; +SET SESSION lock_wait_timeout= 1; +# +# 1: In-place + writes blocked. +# +# Connection default +SET DEBUG_SYNC= 'alter_opened_table SIGNAL opened WAIT_FOR continue1'; +SET DEBUG_SYNC= 'alter_table_inplace_after_lock_upgrade SIGNAL upgraded WAIT_FOR continue2'; +SET DEBUG_SYNC= 'alter_table_inplace_before_commit SIGNAL beforecommit WAIT_FOR continue3'; +SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL binlog WAIT_FOR continue4'; +# Sending: +ALTER TABLE t1 ADD INDEX i1(b), ALGORITHM= INPLACE, LOCK= SHARED; +# Connection con1; +SET DEBUG_SYNC= 'now WAIT_FOR opened'; +# At this point, neither reads nor writes should be blocked. +SELECT * FROM t1; +a b +1 1 +2 2 +INSERT INTO t1 VALUES (3,3); +SET DEBUG_SYNC= 'now SIGNAL continue1'; +SET DEBUG_SYNC= 'now WAIT_FOR upgraded'; +# Now both reads and writes should be blocked +SELECT * FROM t1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +INSERT INTO t1 VALUES (4,4); +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET DEBUG_SYNC= 'now SIGNAL continue2'; +SET DEBUG_SYNC= 'now WAIT_FOR beforecommit'; +# Still both reads and writes should be blocked. +SELECT * FROM t1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +INSERT INTO t1 VALUES (5,5); +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET DEBUG_SYNC= 'now SIGNAL continue3'; +SET DEBUG_SYNC= 'now WAIT_FOR binlog'; +# Same here. +SELECT * FROM t1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +INSERT INTO t1 VALUES (6,6); +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET DEBUG_SYNC= 'now SIGNAL continue4'; +# Connection default +# Reaping ALTER TABLE ... +SET DEBUG_SYNC= 'RESET'; +DELETE FROM t1 WHERE a= 3; +# +# 2: Copy + writes blocked. +# +SET DEBUG_SYNC= 'alter_opened_table SIGNAL opened WAIT_FOR continue1'; +SET DEBUG_SYNC= 'alter_table_copy_after_lock_upgrade SIGNAL upgraded WAIT_FOR continue2'; +SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL binlog WAIT_FOR continue3'; +# Sending: +ALTER TABLE t1 ADD INDEX i2(b), ALGORITHM= COPY, LOCK= SHARED; +# Connection con1; +SET DEBUG_SYNC= 'now WAIT_FOR opened'; +# At this point, neither reads nor writes should be blocked. +SELECT * FROM t1; +a b +1 1 +2 2 +INSERT INTO t1 VALUES (3,3); +SET DEBUG_SYNC= 'now SIGNAL continue1'; +SET DEBUG_SYNC= 'now WAIT_FOR upgraded'; +# Now writes should be blocked, reads still allowed. +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +INSERT INTO t1 VALUES (4,4); +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET DEBUG_SYNC= 'now SIGNAL continue2'; +SET DEBUG_SYNC= 'now WAIT_FOR binlog'; +# Now both reads and writes should be blocked. +SELECT * FROM t1 limit 1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +INSERT INTO t1 VALUES (5,5); +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET DEBUG_SYNC= 'now SIGNAL continue3'; +# Connection default +# Reaping ALTER TABLE ... +Warnings: +Note 1831 Duplicate index `i2`. This is deprecated and will be disallowed in a future release. +SET DEBUG_SYNC= 'RESET'; +DELETE FROM t1 WHERE a= 3; +# +# 3: In-place + writes allowed. +# +# TODO: Enable this test once WL#5526 is pushed +# +# 4: In-place + reads and writes blocked. +# +# Connection default +SET DEBUG_SYNC= 'alter_opened_table SIGNAL opened WAIT_FOR continue1'; +SET DEBUG_SYNC= 'alter_table_inplace_after_lock_upgrade SIGNAL upgraded WAIT_FOR continue2'; +SET DEBUG_SYNC= 'alter_table_inplace_before_commit SIGNAL beforecommit WAIT_FOR continue3'; +SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL binlog WAIT_FOR continue4'; +# Sending: +ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= INPLACE, LOCK= EXCLUSIVE; +# Connection con1; +SET DEBUG_SYNC= 'now WAIT_FOR opened'; +# At this point, neither reads nor writes should be blocked. +SELECT * FROM t1; +a b +1 1 +2 2 +INSERT INTO t1 VALUES (3,3); +SET DEBUG_SYNC= 'now SIGNAL continue1'; +SET DEBUG_SYNC= 'now WAIT_FOR upgraded'; +# Now both reads and writes should be blocked. +SELECT * FROM t1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +INSERT INTO t1 VALUES (4,4); +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET DEBUG_SYNC= 'now SIGNAL continue2'; +SET DEBUG_SYNC= 'now WAIT_FOR beforecommit'; +# Same here. +SELECT * FROM t1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +INSERT INTO t1 VALUES (5,5); +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET DEBUG_SYNC= 'now SIGNAL continue3'; +SET DEBUG_SYNC= 'now WAIT_FOR binlog'; +# Same here. +SELECT * FROM t1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +INSERT INTO t1 VALUES (6,6); +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET DEBUG_SYNC= 'now SIGNAL continue4'; +# Connection default +# Reaping ALTER TABLE ... +Warnings: +Note 1831 Duplicate index `i4`. This is deprecated and will be disallowed in a future release. +SET DEBUG_SYNC= 'RESET'; +DROP TABLE t1; +SET DEBUG_SYNC= 'RESET'; +# +#BUG#13975225:ONLINE OPTIMIZE TABLE FOR INNODB TABLES +# +SET DEBUG_SYNC= 'alter_table_inplace_after_lock_downgrade SIGNAL downgraded WAIT_FOR continue'; +#Setting up INNODB table. +CREATE TABLE t1(fld1 INT, fld2 INT, fld3 INT) ENGINE= INNODB; +INSERT INTO t1 VALUES (155, 45, 55); +#Concurrent INSERT, UPDATE, SELECT and DELETE is supported +#during OPTIMIZE TABLE operation for INNODB tables. +connection default; +#OPTIMIZE TABLE operation. +OPTIMIZE TABLE t1; +connection con1; +SET DEBUG_SYNC= 'now WAIT_FOR downgraded'; +# With the patch, concurrent DML operation succeeds. +INSERT INTO t1 VALUES (10, 11, 12); +UPDATE t1 SET fld1= 20 WHERE fld1= 155; +DELETE FROM t1 WHERE fld1= 20; +SELECT * from t1; +fld1 fld2 fld3 +10 11 12 +SET DEBUG_SYNC= 'now SIGNAL continue'; +connection default; +Table Op Msg_type Msg_text +test.t1 optimize note Table does not support optimize, doing recreate + analyze instead +test.t1 optimize status OK +DROP TABLE t1; +SET DEBUG_SYNC= 'RESET'; +#Concurrent INSERT, UPDATE, SELECT and DELETE is supported +#during OPTIMIZE TABLE operation for Partitioned table. +SET DEBUG_SYNC= 'alter_table_inplace_after_lock_downgrade SIGNAL downgraded WAIT_FOR continue'; +#Setup PARTITIONED table. +CREATE TABLE t1(fld1 INT) ENGINE= INNODB PARTITION BY HASH(fld1) PARTITIONS 4; +INSERT INTO t1 VALUES(10); +#OPTIMIZE TABLE operation. +OPTIMIZE TABLE t1; +connection con1; +SET DEBUG_SYNC= 'now WAIT_FOR downgraded'; +# With the patch, concurrent DML operation succeeds. +INSERT INTO t1 VALUES (30); +UPDATE t1 SET fld1= 20 WHERE fld1= 10; +DELETE FROM t1 WHERE fld1= 20; +SELECT * from t1; +fld1 +30 +SET DEBUG_SYNC= 'now SIGNAL continue'; +connection default; +Table Op Msg_type Msg_text +test.t1 optimize note Table does not support optimize, doing recreate + analyze instead +test.t1 optimize status OK +DROP TABLE t1; +SET DEBUG_SYNC= 'RESET'; +#ALTER TABLE FORCE and ALTER TABLE ENGINE uses online rebuild +#of the table. +CREATE TABLE t1(fld1 INT, fld2 INT) ENGINE=INNODB; +INSERT INTO t1 VALUES(10, 20); +ALTER TABLE t1 FORCE; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 ENGINE=INNODB; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +#ALTER TABLE FORCE, ALTER TABLE ENGINE and OPTIMIZE TABLE uses +#table copy when the old_alter_table enabled. +SET SESSION old_alter_table= TRUE; +affected rows: 0 +ALTER TABLE t1 FORCE; +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 ENGINE= INNODB; +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +SET DEBUG_SYNC= 'alter_table_copy_after_lock_upgrade SIGNAL upgraded'; +affected rows: 0 +#OPTIMIZE TABLE operation using table copy. +OPTIMIZE TABLE t1; +connection con1; +SET DEBUG_SYNC= 'now WAIT_FOR upgraded'; +affected rows: 0 +INSERT INTO t1 VALUES(10, 20); +affected rows: 1 +connection default; +Table Op Msg_type Msg_text +test.t1 optimize note Table does not support optimize, doing recreate + analyze instead +test.t1 optimize status OK +affected rows: 2 +SET DEBUG_SYNC= 'RESET'; +affected rows: 0 +SET SESSION old_alter_table= FALSE; +affected rows: 0 +#ALTER TABLE FORCE and ALTER TABLE ENGINE uses table copy +#when ALGORITHM COPY is used. +ALTER TABLE t1 FORCE, ALGORITHM= COPY; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 ENGINE= INNODB, ALGORITHM= COPY; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +DROP TABLE t1; +#OPTIMIZE TABLE on a table with FULLTEXT index uses +#ALTER TABLE FORCE using COPY algorithm here. This +#test case ensures the COPY table debug sync point is hit. +SET DEBUG_SYNC= 'alter_table_copy_after_lock_upgrade SIGNAL upgraded'; +#Setup a table with FULLTEXT index. +connection default; +CREATE TABLE t1(fld1 CHAR(10), FULLTEXT(fld1)) ENGINE= INNODB; +INSERT INTO t1 VALUES("String1"); +#OPTIMIZE TABLE operation. +OPTIMIZE TABLE t1; +connection con1; +SET DEBUG_SYNC= 'now WAIT_FOR upgraded'; +INSERT INTO t1 VALUES("String2"); +connection default; +Table Op Msg_type Msg_text +test.t1 optimize note Table does not support optimize, doing recreate + analyze instead +test.t1 optimize status OK +SET DEBUG_SYNC= 'RESET'; +DROP TABLE t1; +#Test which demonstrates that ALTER TABLE, OPTIMIZE PARTITION +#takes OPTIMIZE TABLE code path, hence does an online rebuild +#of the table with the patch. +connection default; +SET DEBUG_SYNC= 'alter_table_inplace_after_lock_downgrade SIGNAL downgraded WAIT_FOR continue'; +#Setup PARTITIONED table. +CREATE TABLE t1(fld1 INT) ENGINE= INNODB PARTITION BY HASH(fld1) PARTITIONS 4; +INSERT INTO t1 VALUES(10); +#OPTIMIZE ALL PARTITIONS operation. +ALTER TABLE t1 OPTIMIZE PARTITION ALL; +connection con1; +SET DEBUG_SYNC= 'now WAIT_FOR downgraded'; +# With the patch, concurrent DML operation succeeds. +INSERT INTO t1 VALUES (30); +UPDATE t1 SET fld1= 20 WHERE fld1= 10; +DELETE FROM t1 WHERE fld1= 20; +SELECT * from t1; +fld1 +30 +SET DEBUG_SYNC= 'now SIGNAL continue'; +connection default; +Table Op Msg_type Msg_text +test.t1 optimize note Table does not support optimize on partitions. All partitions will be rebuilt and analyzed. +test.t1 optimize status OK +SET DEBUG_SYNC= 'RESET'; +#OPTIMIZE PER PARTITION operation. +SET DEBUG_SYNC= 'alter_table_inplace_after_lock_downgrade SIGNAL downgraded WAIT_FOR continue'; +ALTER TABLE t1 OPTIMIZE PARTITION p0; +connection con1; +SET DEBUG_SYNC= 'now WAIT_FOR downgraded'; +# With the patch, concurrent DML operation succeeds. +INSERT INTO t1 VALUES (30); +UPDATE t1 SET fld1= 20 WHERE fld1= 10; +DELETE FROM t1 WHERE fld1= 20; +SELECT * from t1; +fld1 +30 +30 +SET DEBUG_SYNC= 'now SIGNAL continue'; +connection default; +Table Op Msg_type Msg_text +test.t1 optimize note Table does not support optimize on partitions. All partitions will be rebuilt and analyzed. +test.t1 optimize status OK +SET DEBUG_SYNC= 'RESET'; +# Test case for Bug#11938817 (ALTER BEHAVIOR DIFFERENT THEN DOCUMENTED). +# This should not do anything +ALTER TABLE t1; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuild'; +# Check that we rebuild the table +ALTER TABLE t1 engine=innodb; +connection con1; +SET DEBUG_SYNC= 'now WAIT_FOR rebuild'; +connection default; +SET DEBUG_SYNC= 'RESET'; +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuild'; +# Check that we rebuild the table +ALTER TABLE t1 FORCE; +connection con1; +SET DEBUG_SYNC= 'now WAIT_FOR rebuild'; +connection default; +SET DEBUG_SYNC= 'RESET'; +DROP TABLE t1; diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index 82f3977e231..39cb4cac85d 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -717,3 +717,37 @@ insert ignore into t1 values (1,12); Warnings: Warning 1062 Duplicate entry '1' for key 'f1' DROP TABLE t1; +# +# MDEV-13290 Assertion Assertion `!is_set() || (m_status == DA_OK_BULK +# && is_bulk_op())' or `! is_set()' failed +# +SET @save_mode= @@sql_mode; +SET sql_mode= 'STRICT_ALL_TABLES'; +CREATE TABLE t1 (f1 INT DEFAULT 0, f2 INT); +CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION; +REPLACE INTO v1 SET f2 = 1; +ERROR 22007: Truncated incorrect DOUBLE value: 'x' +SELECT * from t1; +f1 f2 +drop view v1; +CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = cast('' as decimal) WITH CHECK OPTION; +REPLACE INTO v1 SET f2 = 1; +ERROR 22007: Truncated incorrect DECIMAL value: '' +SELECT * from t1; +f1 f2 +drop view v1; +SELECT 0,0 INTO OUTFILE 't1.txt'; +CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION; +LOAD DATA INFILE 't1.txt' INTO TABLE v1; +ERROR 22007: Truncated incorrect DOUBLE value: 'x' +SELECT * from t1; +f1 f2 +drop view v1; +drop table t1; +SET @@sql_mode= @save_mode; +CREATE TABLE t1 (f INT); +CREATE VIEW v1 AS SELECT * FROM t1 WHERE f <=> 'foo' WITH CHECK OPTION; +REPLACE INTO v1 SET f = NULL; +ERROR HY000: CHECK OPTION failed 'test.v1' +DROP VIEW v1; +DROP TABLE t1; diff --git a/mysql-test/r/insert_notembedded.result b/mysql-test/r/insert_notembedded.result index 2315d695abe..ba3e2221922 100644 --- a/mysql-test/r/insert_notembedded.result +++ b/mysql-test/r/insert_notembedded.result @@ -32,7 +32,7 @@ INNER JOIN view_stations AS stations ON table_source.id = stations.icao LEFT JOIN table_target AS old USING (mexs_id); -ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'table_target' +ERROR 42000: INSERT, DELETE command denied to user 'user20989'@'localhost' for table 'table_target' REPLACE INTO view_target2 SELECT stations.mexs_id AS mexs_id, datetime AS messzeit FROM table_source @@ -40,7 +40,7 @@ INNER JOIN view_stations AS stations ON table_source.id = stations.icao LEFT JOIN view_target2 AS old USING (mexs_id); -ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'view_target2' +ERROR 42000: INSERT, DELETE command denied to user 'user20989'@'localhost' for table 'view_target2' REPLACE INTO view_target3 SELECT stations.mexs_id AS mexs_id, datetime AS messzeit FROM table_source @@ -60,7 +60,7 @@ ON table_source.id = stations.icao LEFT JOIN table_target AS old USING (mexs_id); REPLACE INTO table_target2 VALUES ('00X45Y78','2006-07-12 07:50:00'); -ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'table_target2' +ERROR 42000: INSERT, DELETE command denied to user 'user20989'@'localhost' for table 'table_target2' REPLACE INTO view_target2 VALUES ('12X45Y78','2006-07-12 07:50:00'); SELECT stations.mexs_id AS mexs_id, datetime AS messzeit FROM table_source diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index 8bfc4e9215e..3f4a26a728e 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -701,6 +701,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 1 diff --git a/mysql-test/r/ipv4_and_ipv6.result b/mysql-test/r/ipv4_and_ipv6.result new file mode 100644 index 00000000000..f15aeba65fa --- /dev/null +++ b/mysql-test/r/ipv4_and_ipv6.result @@ -0,0 +1,58 @@ +=============Test of '::1' ======================================== +mysqld is alive +CREATE USER testuser@'::1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'::1'; +SHOW GRANTS FOR testuser@'::1'; +Grants for testuser@::1 +GRANT USAGE ON *.* TO 'testuser'@'::1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::1' +SET @nip= inet_aton('::1'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'::1'; +RENAME USER testuser@'::1' to testuser1@'::1'; +SET PASSWORD FOR testuser1@'::1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'::1'; +=============Test of '127.0.0.1' (IPv4) =========================== +mysqld is alive +CREATE USER testuser@'127.0.0.1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'127.0.0.1'; +SHOW GRANTS FOR testuser@'127.0.0.1'; +Grants for testuser@127.0.0.1 +GRANT USAGE ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'127.0.0.1' +SET @nip= inet_aton('127.0.0.1'); +SELECT @nip; +@nip +2130706433 +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +127.0.0.1 +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'127.0.0.1'; +RENAME USER testuser@'127.0.0.1' to testuser1@'127.0.0.1'; +SET PASSWORD FOR testuser1@'127.0.0.1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'127.0.0.1'; diff --git a/mysql-test/r/is_debug_build.require b/mysql-test/r/is_debug_build.require deleted file mode 100644 index 4d77bcdc1ed..00000000000 --- a/mysql-test/r/is_debug_build.require +++ /dev/null @@ -1,2 +0,0 @@ -instr(version(), "debug") > 0 -1 diff --git a/mysql-test/r/is_embedded.require b/mysql-test/r/is_embedded.require deleted file mode 100644 index 10594809fe7..00000000000 --- a/mysql-test/r/is_embedded.require +++ /dev/null @@ -1,2 +0,0 @@ -have_embedded -1 diff --git a/mysql-test/r/isam.result b/mysql-test/r/isam.result deleted file mode 100644 index cb308a1c71d..00000000000 --- a/mysql-test/r/isam.result +++ /dev/null @@ -1,251 +0,0 @@ -drop table if exists t1,t2; -create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a)) engine=isam; -delete from t1 where (a & 1); -select sum(length(b)) from t1; -sum(length(b)) -3274494 -drop table t1; -create table t1 (a int not null auto_increment,b int, primary key (a)) engine=isam; -insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4); -delete from t1 where a=4 or a=2; -insert into t1 values (NULL,4),(NULL,5),(6,6); -select * from t1; -a b -1 1 -5 5 -3 3 -4 4 -6 6 -delete from t1 where a=6; -replace t1 values (3,1); -replace t1 values (3,3); -ALTER TABLE t1 add c int; -insert into t1 values (NULL,6,6); -select * from t1; -a b c -1 1 NULL -5 5 NULL -3 3 NULL -4 4 NULL -6 6 6 -drop table t1; -create table t1 (a int,b text, index(a)) engine=isam; -ERROR 42000: Column 'a' is used with UNIQUE or INDEX but is not defined as NOT NULL -create table t1 (a int,b text, index(b)) engine=isam; -ERROR 42000: BLOB column 'b' can't be used in key specification with the used table type -create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=isam; -ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key -create table t1 (ordid int(8), unique (ordid)) engine=isam; -ERROR 42000: Column 'ordid' is used with UNIQUE or INDEX but is not defined as NOT NULL -drop table if exists t1; -Warnings: -Note 1051 Unknown table 't1' -create table t1 (a int not null primary key, b int not null,c int not null, key(b,c)); -insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4); -create table t2 engine=isam select * from t1; -optimize table t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -check table t1,t2; -Table Op Msg_type Msg_text -test.t1 check status OK -test.t2 check note The storage engine for the table doesn't support check -repair table t1,t2; -Table Op Msg_type Msg_text -test.t1 repair status OK -test.t2 repair note The storage engine for the table doesn't support repair -check table t2,t1; -Table Op Msg_type Msg_text -test.t2 check note The storage engine for the table doesn't support check -test.t1 check status OK -lock tables t1 write; -check table t2,t1; -Table Op Msg_type Msg_text -test.t2 check error Table 't2' was not locked with LOCK TABLES -test.t1 check status OK -show columns from t1; -Field Type Null Key Default Extra -a int(11) PRI -b int(11) MUL -c int(11) -show full columns from t1; -Field Type Collation Null Key Default Extra Privileges Comment -a int(11) NULL PRI select,insert,update,references -b int(11) NULL MUL select,insert,update,references -c int(11) NULL select,insert,update,references -show index from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t1 0 PRIMARY 1 a A 4 NULL NULL BTREE -t1 1 b 1 b A 1 NULL NULL BTREE -t1 1 b 2 c A 4 NULL NULL BTREE -drop table t1,t2; -create table t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8 -int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17 -int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int, -i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34 -int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int, -i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51 -int, i52 int, i53 int, i54 int, i55 int, i56 int, i57 int, i58 int, i59 int, -i60 int, i61 int, i62 int, i63 int, i64 int, i65 int, i66 int, i67 int, i68 -int, i69 int, i70 int, i71 int, i72 int, i73 int, i74 int, i75 int, i76 int, -i77 int, i78 int, i79 int, i80 int, i81 int, i82 int, i83 int, i84 int, i85 -int, i86 int, i87 int, i88 int, i89 int, i90 int, i91 int, i92 int, i93 int, -i94 int, i95 int, i96 int, i97 int, i98 int, i99 int, i100 int, i101 int, i102 -int, i103 int, i104 int, i105 int, i106 int, i107 int, i108 int, i109 int, i110 -int, i111 int, i112 int, i113 int, i114 int, i115 int, i116 int, i117 int, i118 -int, i119 int, i120 int, i121 int, i122 int, i123 int, i124 int, i125 int, i126 -int, i127 int, i128 int, i129 int, i130 int, i131 int, i132 int, i133 int, i134 -int, i135 int, i136 int, i137 int, i138 int, i139 int, i140 int, i141 int, i142 -int, i143 int, i144 int, i145 int, i146 int, i147 int, i148 int, i149 int, i150 -int, i151 int, i152 int, i153 int, i154 int, i155 int, i156 int, i157 int, i158 -int, i159 int, i160 int, i161 int, i162 int, i163 int, i164 int, i165 int, i166 -int, i167 int, i168 int, i169 int, i170 int, i171 int, i172 int, i173 int, i174 -int, i175 int, i176 int, i177 int, i178 int, i179 int, i180 int, i181 int, i182 -int, i183 int, i184 int, i185 int, i186 int, i187 int, i188 int, i189 int, i190 -int, i191 int, i192 int, i193 int, i194 int, i195 int, i196 int, i197 int, i198 -int, i199 int, i200 int, i201 int, i202 int, i203 int, i204 int, i205 int, i206 -int, i207 int, i208 int, i209 int, i210 int, i211 int, i212 int, i213 int, i214 -int, i215 int, i216 int, i217 int, i218 int, i219 int, i220 int, i221 int, i222 -int, i223 int, i224 int, i225 int, i226 int, i227 int, i228 int, i229 int, i230 -int, i231 int, i232 int, i233 int, i234 int, i235 int, i236 int, i237 int, i238 -int, i239 int, i240 int, i241 int, i242 int, i243 int, i244 int, i245 int, i246 -int, i247 int, i248 int, i249 int, i250 int, i251 int, i252 int, i253 int, i254 -int, i255 int, i256 int, i257 int, i258 int, i259 int, i260 int, i261 int, i262 -int, i263 int, i264 int, i265 int, i266 int, i267 int, i268 int, i269 int, i270 -int, i271 int, i272 int, i273 int, i274 int, i275 int, i276 int, i277 int, i278 -int, i279 int, i280 int, i281 int, i282 int, i283 int, i284 int, i285 int, i286 -int, i287 int, i288 int, i289 int, i290 int, i291 int, i292 int, i293 int, i294 -int, i295 int, i296 int, i297 int, i298 int, i299 int, i300 int, i301 int, i302 -int, i303 int, i304 int, i305 int, i306 int, i307 int, i308 int, i309 int, i310 -int, i311 int, i312 int, i313 int, i314 int, i315 int, i316 int, i317 int, i318 -int, i319 int, i320 int, i321 int, i322 int, i323 int, i324 int, i325 int, i326 -int, i327 int, i328 int, i329 int, i330 int, i331 int, i332 int, i333 int, i334 -int, i335 int, i336 int, i337 int, i338 int, i339 int, i340 int, i341 int, i342 -int, i343 int, i344 int, i345 int, i346 int, i347 int, i348 int, i349 int, i350 -int, i351 int, i352 int, i353 int, i354 int, i355 int, i356 int, i357 int, i358 -int, i359 int, i360 int, i361 int, i362 int, i363 int, i364 int, i365 int, i366 -int, i367 int, i368 int, i369 int, i370 int, i371 int, i372 int, i373 int, i374 -int, i375 int, i376 int, i377 int, i378 int, i379 int, i380 int, i381 int, i382 -int, i383 int, i384 int, i385 int, i386 int, i387 int, i388 int, i389 int, i390 -int, i391 int, i392 int, i393 int, i394 int, i395 int, i396 int, i397 int, i398 -int, i399 int, i400 int, i401 int, i402 int, i403 int, i404 int, i405 int, i406 -int, i407 int, i408 int, i409 int, i410 int, i411 int, i412 int, i413 int, i414 -int, i415 int, i416 int, i417 int, i418 int, i419 int, i420 int, i421 int, i422 -int, i423 int, i424 int, i425 int, i426 int, i427 int, i428 int, i429 int, i430 -int, i431 int, i432 int, i433 int, i434 int, i435 int, i436 int, i437 int, i438 -int, i439 int, i440 int, i441 int, i442 int, i443 int, i444 int, i445 int, i446 -int, i447 int, i448 int, i449 int, i450 int, i451 int, i452 int, i453 int, i454 -int, i455 int, i456 int, i457 int, i458 int, i459 int, i460 int, i461 int, i462 -int, i463 int, i464 int, i465 int, i466 int, i467 int, i468 int, i469 int, i470 -int, i471 int, i472 int, i473 int, i474 int, i475 int, i476 int, i477 int, i478 -int, i479 int, i480 int, i481 int, i482 int, i483 int, i484 int, i485 int, i486 -int, i487 int, i488 int, i489 int, i490 int, i491 int, i492 int, i493 int, i494 -int, i495 int, i496 int, i497 int, i498 int, i499 int, i500 int, i501 int, i502 -int, i503 int, i504 int, i505 int, i506 int, i507 int, i508 int, i509 int, i510 -int, i511 int, i512 int, i513 int, i514 int, i515 int, i516 int, i517 int, i518 -int, i519 int, i520 int, i521 int, i522 int, i523 int, i524 int, i525 int, i526 -int, i527 int, i528 int, i529 int, i530 int, i531 int, i532 int, i533 int, i534 -int, i535 int, i536 int, i537 int, i538 int, i539 int, i540 int, i541 int, i542 -int, i543 int, i544 int, i545 int, i546 int, i547 int, i548 int, i549 int, i550 -int, i551 int, i552 int, i553 int, i554 int, i555 int, i556 int, i557 int, i558 -int, i559 int, i560 int, i561 int, i562 int, i563 int, i564 int, i565 int, i566 -int, i567 int, i568 int, i569 int, i570 int, i571 int, i572 int, i573 int, i574 -int, i575 int, i576 int, i577 int, i578 int, i579 int, i580 int, i581 int, i582 -int, i583 int, i584 int, i585 int, i586 int, i587 int, i588 int, i589 int, i590 -int, i591 int, i592 int, i593 int, i594 int, i595 int, i596 int, i597 int, i598 -int, i599 int, i600 int, i601 int, i602 int, i603 int, i604 int, i605 int, i606 -int, i607 int, i608 int, i609 int, i610 int, i611 int, i612 int, i613 int, i614 -int, i615 int, i616 int, i617 int, i618 int, i619 int, i620 int, i621 int, i622 -int, i623 int, i624 int, i625 int, i626 int, i627 int, i628 int, i629 int, i630 -int, i631 int, i632 int, i633 int, i634 int, i635 int, i636 int, i637 int, i638 -int, i639 int, i640 int, i641 int, i642 int, i643 int, i644 int, i645 int, i646 -int, i647 int, i648 int, i649 int, i650 int, i651 int, i652 int, i653 int, i654 -int, i655 int, i656 int, i657 int, i658 int, i659 int, i660 int, i661 int, i662 -int, i663 int, i664 int, i665 int, i666 int, i667 int, i668 int, i669 int, i670 -int, i671 int, i672 int, i673 int, i674 int, i675 int, i676 int, i677 int, i678 -int, i679 int, i680 int, i681 int, i682 int, i683 int, i684 int, i685 int, i686 -int, i687 int, i688 int, i689 int, i690 int, i691 int, i692 int, i693 int, i694 -int, i695 int, i696 int, i697 int, i698 int, i699 int, i700 int, i701 int, i702 -int, i703 int, i704 int, i705 int, i706 int, i707 int, i708 int, i709 int, i710 -int, i711 int, i712 int, i713 int, i714 int, i715 int, i716 int, i717 int, i718 -int, i719 int, i720 int, i721 int, i722 int, i723 int, i724 int, i725 int, i726 -int, i727 int, i728 int, i729 int, i730 int, i731 int, i732 int, i733 int, i734 -int, i735 int, i736 int, i737 int, i738 int, i739 int, i740 int, i741 int, i742 -int, i743 int, i744 int, i745 int, i746 int, i747 int, i748 int, i749 int, i750 -int, i751 int, i752 int, i753 int, i754 int, i755 int, i756 int, i757 int, i758 -int, i759 int, i760 int, i761 int, i762 int, i763 int, i764 int, i765 int, i766 -int, i767 int, i768 int, i769 int, i770 int, i771 int, i772 int, i773 int, i774 -int, i775 int, i776 int, i777 int, i778 int, i779 int, i780 int, i781 int, i782 -int, i783 int, i784 int, i785 int, i786 int, i787 int, i788 int, i789 int, i790 -int, i791 int, i792 int, i793 int, i794 int, i795 int, i796 int, i797 int, i798 -int, i799 int, i800 int, i801 int, i802 int, i803 int, i804 int, i805 int, i806 -int, i807 int, i808 int, i809 int, i810 int, i811 int, i812 int, i813 int, i814 -int, i815 int, i816 int, i817 int, i818 int, i819 int, i820 int, i821 int, i822 -int, i823 int, i824 int, i825 int, i826 int, i827 int, i828 int, i829 int, i830 -int, i831 int, i832 int, i833 int, i834 int, i835 int, i836 int, i837 int, i838 -int, i839 int, i840 int, i841 int, i842 int, i843 int, i844 int, i845 int, i846 -int, i847 int, i848 int, i849 int, i850 int, i851 int, i852 int, i853 int, i854 -int, i855 int, i856 int, i857 int, i858 int, i859 int, i860 int, i861 int, i862 -int, i863 int, i864 int, i865 int, i866 int, i867 int, i868 int, i869 int, i870 -int, i871 int, i872 int, i873 int, i874 int, i875 int, i876 int, i877 int, i878 -int, i879 int, i880 int, i881 int, i882 int, i883 int, i884 int, i885 int, i886 -int, i887 int, i888 int, i889 int, i890 int, i891 int, i892 int, i893 int, i894 -int, i895 int, i896 int, i897 int, i898 int, i899 int, i900 int, i901 int, i902 -int, i903 int, i904 int, i905 int, i906 int, i907 int, i908 int, i909 int, i910 -int, i911 int, i912 int, i913 int, i914 int, i915 int, i916 int, i917 int, i918 -int, i919 int, i920 int, i921 int, i922 int, i923 int, i924 int, i925 int, i926 -int, i927 int, i928 int, i929 int, i930 int, i931 int, i932 int, i933 int, i934 -int, i935 int, i936 int, i937 int, i938 int, i939 int, i940 int, i941 int, i942 -int, i943 int, i944 int, i945 int, i946 int, i947 int, i948 int, i949 int, i950 -int, i951 int, i952 int, i953 int, i954 int, i955 int, i956 int, i957 int, i958 -int, i959 int, i960 int, i961 int, i962 int, i963 int, i964 int, i965 int, i966 -int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974 -int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982 -int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990 -int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998 -int, i999 int, i1000 int, b blob) row_format=dynamic; -insert into t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "Sergei"); -update t1 set b=repeat('a',256); -update t1 set i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0; -check table t1; -Table Op Msg_type Msg_text -test.t1 check status OK -drop table t1; diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result index 1e51d55f012..d500b38a8dc 100644 --- a/mysql-test/r/join.result +++ b/mysql-test/r/join.result @@ -756,7 +756,7 @@ columns.TABLE_CATALOG, columns.TABLE_SCHEMA, columns.COLUMN_DEFAULT, columns.IS_ from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='user'; TABLE_NAME COLUMN_NAME TABLE_CATALOG TABLE_SCHEMA NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLLATION SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA COLUMN_COMMENT user Host def mysql 0 mysql PRIMARY 1 A NULL NULL BTREE def mysql NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI -user User def mysql 0 mysql PRIMARY 2 A NULL NULL BTREE def mysql NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI +user User def mysql 0 mysql PRIMARY 2 A NULL NULL BTREE def mysql NO char 80 240 NULL NULL utf8 utf8_bin char(80) PRI drop table t1; drop table t2; drop table t3; @@ -860,6 +860,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 5 @@ -1271,6 +1272,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 1 @@ -1497,3 +1499,55 @@ Note 1003 select NULL AS `i1`,`v2`.`i2` AS `i2`,`v2`.`a` AS `a`,`v2`.`b` AS `b` DROP VIEW v2; DROP TABLE t1,t2; SET optimizer_switch=@save_optimizer_switch; +# +# Bug #35268: Parser can't handle STRAIGHT_JOIN with USING +# +CREATE TABLE t1 (a int); +INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8); +CREATE TABLE t2 (a int); +INSERT INTO t2 (a) VALUES (1),(2),(3),(4); +EXPLAIN +SELECT t1.a FROM t1 NATURAL INNER JOIN t2 ORDER BY t1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 4 Using temporary; Using filesort +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join) +SELECT t1.a FROM t1 NATURAL INNER JOIN t2 ORDER BY t1.a; +a +1 +2 +3 +4 +EXPLAIN +SELECT t1.a FROM t1 STRAIGHT_JOIN t2 USING(a) ORDER BY t1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 Using temporary; Using filesort +1 SIMPLE t2 ALL NULL NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join) +SELECT t1.a FROM t1 STRAIGHT_JOIN t2 USING(a) ORDER BY t1.a; +a +1 +2 +3 +4 +EXPLAIN +SELECT t1.a FROM t1 NATURAL STRAIGHT_JOIN t2 ORDER BY t1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 Using temporary; Using filesort +1 SIMPLE t2 ALL NULL NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join) +SELECT t1.a FROM t1 NATURAL STRAIGHT_JOIN t2 ORDER BY t1.a; +a +1 +2 +3 +4 +DROP TABLE t1,t2; +# +# MDEV-5635: join of a const table with non-const tables +# +CREATE TABLE t1 (a varchar(3) NOT NULL) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('foo'); +CREATE TABLE t2 (b varchar(3), c varchar(3), INDEX(b)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('bar', 'bar'),( 'qux', 'qux'); +SELECT STRAIGHT_JOIN * FROM t1, t2 AS t2_1, t2 AS t2_2 +WHERE t2_2.c = t2_1.c AND t2_2.b = t2_1.b AND ( a IS NULL OR t2_1.c = a ); +a b c b c +DROP TABLE t1,t2; diff --git a/mysql-test/r/join_cache.result b/mysql-test/r/join_cache.result index cc64393f975..5c4875546e6 100644 --- a/mysql-test/r/join_cache.result +++ b/mysql-test/r/join_cache.result @@ -5058,7 +5058,7 @@ EXPLAIN SELECT * FROM t1,t2 WHERE t1.a < 3 and t2.a IS NULL; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using index -1 SIMPLE t2 hash_range idx #hash#idx:idx 5:5 const 4 Using index condition; Rowid-ordered scan; Using join buffer (flat, BNLH join) +1 SIMPLE t2 hash_range idx #hash#idx:idx 5:5 const 4 Using index condition; Using where; Rowid-ordered scan; Using join buffer (flat, BNLH join) SELECT * FROM t1,t2 WHERE t1.a < 3 and t2.a IS NULL; a a b 1 NULL 10 @@ -5577,8 +5577,8 @@ EXPLAIN SELECT * FROM t1, t2 LEFT JOIN t3 ON t2.b=t3.b WHERE t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 -1 SIMPLE t2 ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join) -1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using join buffer (incremental, BNL join) +1 SIMPLE t2 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where SELECT * FROM t1, t2 LEFT JOIN t3 ON t2.b=t3.b WHERE t1.a=t2.a; a a b b c 3 3 30 30 300 @@ -5591,7 +5591,7 @@ set optimizer_switch=@tmp_optimizer_switch; DROP TABLE t1,t2,t3; # # Bug #1058071: LEFT JOIN using blobs -# (mdev-564) when join buffer size is small +# (MDEV-564) when join buffer size is small # CREATE TABLE t1 ( col269 decimal(31,10) unsigned DEFAULT NULL, @@ -5656,8 +5656,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 10 1 SIMPLE t2 ALL NULL NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join) drop table t0,t1,t2; -# -# mdev-6292: huge performance degradation for a sequence +# MDEV-6292: huge performance degradation for a sequence # of LEFT JOIN operations when using join buffer # CREATE TABLE t1 ( @@ -5813,4 +5812,87 @@ id select_type table type possible_keys key key_len ref rows Extra set join_buffer_size=default; set join_cache_level = default; DROP TABLE t1,t2; +# +# MDEV-5123 Remove duplicated conditions pushed both to join_tab->select_cond and join_tab->cache_select->cond for blocked joins. +# +set join_cache_level=default; +set expensive_subquery_limit=0; +create table t1 (c1 int); +create table t2 (c2 int); +create table t3 (c3 int); +insert into t1 values (1), (2); +insert into t2 values (1), (2); +insert into t3 values (2); +explain +select count(*) from t1 straight_join t2 +where c1 = c2-0 and c2 <= (select max(c3) from t3 where c3 = 2 and @counter:=@counter+1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +2 UNCACHEABLE SUBQUERY t3 system NULL NULL NULL NULL 1 +set @counter=0; +select count(*) from t1 straight_join t2 +where c1 = c2-0 and c2 <= (select max(c3) from t3 where c3 = 2 and @counter:=@counter+1); +count(*) +2 +select @counter; +@counter +2 +explain +select count(*) from t1 straight_join t2 +where c1 = c2-0 and +c2 <= (select max(c3) from t3 where c3 = 2 and @counter:=@counter+1) and +c2 / 2 = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +2 UNCACHEABLE SUBQUERY t3 system NULL NULL NULL NULL 1 +set @counter=0; +select count(*) from t1 straight_join t2 +where c1 = c2-0 and +c2 <= (select max(c3) from t3 where c3 = 2 and @counter:=@counter+1) and +c2 / 2 = 1; +count(*) +1 +select @counter; +@counter +2 +drop table t1,t2,t3; +set expensive_subquery_limit=default; +# +# MDEV-6071: EXPLAIN chooses to use join buffer while execution turns it down +# +create table t1 (a int); +insert into t1 values +(7), (9), (1), (4), (2), (3), (5), (8), (11), (6), (10); +explain select count(*) from t1, t1 t2 where t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 11 +1 SIMPLE t2 ALL NULL NULL NULL NULL 11 Using where; Using join buffer (flat, BNL join) +set join_buffer_space_limit=1024*8; +select @@join_buffer_space_limit; +@@join_buffer_space_limit +8192 +select @@join_buffer_size; +@@join_buffer_size +131072 +explain select count(*) from t1, t1 t2 where t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 11 +1 SIMPLE t2 ALL NULL NULL NULL NULL 11 Using where +set join_buffer_space_limit=default; +drop table t1; +# +# MDEV-6687: Assertion `0' failed in Protocol::end_statement on query +# +SET join_cache_level = 3; +# The following should have +# - table order PROFILING,user, +# - table user accessed with hash_ALL: +explain +SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user WHERE password_expired = PAGE_FAULTS_MINOR; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL Using where +1 SIMPLE user hash_ALL NULL #hash#$hj 1 information_schema.PROFILING.PAGE_FAULTS_MINOR 4 Using where; Using join buffer (flat, BNLH join) +set join_cache_level=default; set @@optimizer_switch=@save_optimizer_switch; diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 74580e67499..c0bf5657aa1 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -1244,6 +1244,7 @@ Handler_read_key 5 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 6 @@ -1805,6 +1806,7 @@ Handler_read_key 4 Handler_read_last 0 Handler_read_next 5 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 1048581 @@ -1819,6 +1821,7 @@ Handler_read_key 4 Handler_read_last 0 Handler_read_next 5 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 1048581 diff --git a/mysql-test/r/join_outer_innodb.result b/mysql-test/r/join_outer_innodb.result index 336fb5ee6b6..339cc59ed69 100644 --- a/mysql-test/r/join_outer_innodb.result +++ b/mysql-test/r/join_outer_innodb.result @@ -481,9 +481,9 @@ drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16; # drop table if exists t1,t2,t3; Warnings: -Note 1051 Unknown table 't1' -Note 1051 Unknown table 't2' -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t1' +Note 1051 Unknown table 'test.t2' +Note 1051 Unknown table 'test.t3' create table t2(a int,unique key (a)) engine=innodb; create table t3(b int) engine=innodb; create table t1(a int,b int)engine=innodb; diff --git a/mysql-test/r/join_outer_jcl6.result b/mysql-test/r/join_outer_jcl6.result index d46a4ee6c7a..7e5f89f55b5 100644 --- a/mysql-test/r/join_outer_jcl6.result +++ b/mysql-test/r/join_outer_jcl6.result @@ -1255,6 +1255,7 @@ Handler_read_key 5 Handler_read_last 0 Handler_read_next 9 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 3 Handler_read_rnd_deleted 0 Handler_read_rnd_next 6 @@ -1816,6 +1817,7 @@ Handler_read_key 4 Handler_read_last 0 Handler_read_next 5 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 5 Handler_read_rnd_deleted 0 Handler_read_rnd_next 1048581 @@ -1830,6 +1832,7 @@ Handler_read_key 4 Handler_read_last 0 Handler_read_next 5 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 5 Handler_read_rnd_deleted 0 Handler_read_rnd_next 1048581 diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result index e63afeab126..0616a1b0d0a 100644 --- a/mysql-test/r/key.result +++ b/mysql-test/r/key.result @@ -273,7 +273,7 @@ t drop table t1; DROP TABLE IF EXISTS t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE t1 ( c1 int, c2 varbinary(240), @@ -427,6 +427,8 @@ unique i4 (c4), index i5 (c1, c2, c3, c4), primary key (c2, c3), index (c2, c4)); +Warnings: +Note 1831 Duplicate index `i1`. This is deprecated and will be disallowed in a future release. show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -445,12 +447,18 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 drop index c1; alter table t1 add index (c1); +Warnings: +Note 1831 Duplicate index `c1`. This is deprecated and will be disallowed in a future release. alter table t1 add index (c1); +Warnings: +Note 1831 Duplicate index `c1_2`. This is deprecated and will be disallowed in a future release. alter table t1 drop index i3; alter table t1 add index i3 (c3); alter table t1 drop index i2, drop index i4; alter table t1 add index i2 (c2), add index i4 (c4); alter table t1 drop index i2, drop index i4, add index i6 (c2, c4); +Warnings: +Note 1831 Duplicate index `i6`. This is deprecated and will be disallowed in a future release. alter table t1 add index i2 (c2), add index i4 (c4), drop index i6; alter table t1 drop index i2, drop index i4, add unique i4 (c4); alter table t1 add index i2 (c2), drop index i4, add index i4 (c4); @@ -604,3 +612,30 @@ SELECT 1 as RES FROM t1 AS t1_outer WHERE (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12; RES DROP TABLE t1; +# +# Bug#18144: Cost with FORCE/USE index seems incorrect in some cases. +# +# We are interested in showing that the cost for the last plan is higher +# than for the preceding two plans. +# +CREATE TABLE t1( a INT, b INT, KEY( a ) ); +INSERT INTO t1 values (1, 2), (1, 3), (2, 3), (2, 4), (3, 4), (3, 5); +EXPLAIN SELECT a, SUM( b ) FROM t1 GROUP BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort +SHOW STATUS LIKE 'Last_query_cost'; +Variable_name Value +Last_query_cost 9.212184 +EXPLAIN SELECT a, SUM( b ) FROM t1 USE INDEX( a ) GROUP BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort +SHOW STATUS LIKE 'Last_query_cost'; +Variable_name Value +Last_query_cost 9.212184 +EXPLAIN SELECT a, SUM( b ) FROM t1 FORCE INDEX( a ) GROUP BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 5 NULL 6 +SHOW STATUS LIKE 'Last_query_cost'; +Variable_name Value +Last_query_cost 14.199000 +DROP TABLE t1; diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result index fad980c810c..1146ae8bbfa 100644 --- a/mysql-test/r/key_cache.result +++ b/mysql-test/r/key_cache.result @@ -2,6 +2,7 @@ drop table if exists t1, t2, t3; SET @save_key_buffer_size=@@key_buffer_size; SET @save_key_cache_block_size=@@key_cache_block_size; SET @save_key_cache_segments=@@key_cache_segments; +SET @save_key_cache_file_hash_size=@@key_cache_file_hash_size; SELECT @@key_buffer_size, @@small.key_buffer_size; @@key_buffer_size @@small.key_buffer_size 2097152 131072 @@ -84,15 +85,15 @@ select @@key_buffer_size; select @@key_cache_block_size; @@key_cache_block_size 1024 +select @@key_cache_file_hash_size; +@@key_cache_file_hash_size +512 set global keycache1.key_buffer_size=1024*1024; create table t1 (p int primary key, a char(10)) delay_key_write=1; create table t2 (p int primary key, i int, a char(10), key k1(i), key k2(a)); -show status like 'key_blocks_used'; -Variable_name Value -Key_blocks_used 0 -show status like 'key_blocks_unused'; -Variable_name Value -Key_blocks_unused KEY_BLOCKS_UNUSED +select @org_key_blocks_unused-unused_blocks as key_blocks_unused, used_blocks as key_blocks_used from information_schema.key_caches where key_cache_name="default"; +key_blocks_unused key_blocks_used +0 0 insert into t1 values (1, 'qqqq'), (11, 'yyyy'); insert into t2 values (1, 1, 'qqqq'), (2, 1, 'pppp'), (3, 1, 'yyyy'), (4, 3, 'zzzz'); @@ -108,12 +109,9 @@ p i a 4 3 zzzz update t1 set p=2 where p=1; update t2 set i=2 where i=1; -show status like 'key_blocks_used'; -Variable_name Value -Key_blocks_used 4 -show status like 'key_blocks_unused'; -Variable_name Value -Key_blocks_unused KEY_BLOCKS_UNUSED +select @org_key_blocks_unused-unused_blocks as key_blocks_unused, used_blocks as key_blocks_used from information_schema.key_caches where key_cache_name="default"; +key_blocks_unused key_blocks_used +4 4 cache index t1 key (`primary`) in keycache1; Table Op Msg_type Msg_text test.t1 assign_to_keycache status OK @@ -270,12 +268,9 @@ Table Op Msg_type Msg_text test.t1 assign_to_keycache status OK test.t2 assign_to_keycache status OK drop table t1,t2,t3; -show status like 'key_blocks_used'; -Variable_name Value -Key_blocks_used 4 -show status like 'key_blocks_unused'; -Variable_name Value -Key_blocks_unused KEY_BLOCKS_UNUSED +select @org_key_blocks_unused-unused_blocks as key_blocks_unused, used_blocks as key_blocks_used from information_schema.key_caches where key_cache_name="default"; +key_blocks_unused key_blocks_used +0 4 create table t1 (a int primary key); cache index t1 in keycache2; Table Op Msg_type Msg_text @@ -440,16 +435,16 @@ p i a 4 3 zzzz update t1 set p=3 where p=1; update t2 set i=2 where i=1; -show status like 'key_%'; -Variable_name Value -Key_blocks_not_flushed 0 -Key_blocks_unused KEY_BLOCKS_UNUSED -Key_blocks_used 4 -Key_blocks_warm 0 -Key_read_requests 22 -Key_reads 0 -Key_write_requests 26 -Key_writes 6 +select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused'; +VARIABLE_NAME VARIABLE_VALUE +KEY_BLOCKS_NOT_FLUSHED 0 +KEY_BLOCKS_USED 4 +KEY_BLOCKS_WARM 0 +KEY_READ_REQUESTS 22 +KEY_READS 0 +KEY_WRITE_REQUESTS 26 +KEY_WRITES 6 +select variable_value into @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused'; select * from information_schema.key_caches where segment_number is null; KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_BLOCKS DIRTY_BLOCKS READ_REQUESTS READS WRITE_REQUESTS WRITES default NULL NULL 2097152 1024 4 # 0 22 0 26 6 @@ -488,16 +483,18 @@ p i a 4 3 zzzz update t1 set p=3 where p=1; update t2 set i=2 where i=1; -show status like 'key_%'; -Variable_name Value -Key_blocks_not_flushed 0 -Key_blocks_unused KEY_BLOCKS_UNUSED -Key_blocks_used 4 -Key_blocks_warm 0 -Key_read_requests 22 -Key_reads 0 -Key_write_requests 26 -Key_writes 6 +select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused'; +VARIABLE_NAME VARIABLE_VALUE +KEY_BLOCKS_NOT_FLUSHED 0 +KEY_BLOCKS_USED 4 +KEY_BLOCKS_WARM 0 +KEY_READ_REQUESTS 22 +KEY_READS 0 +KEY_WRITE_REQUESTS 26 +KEY_WRITES 6 +select variable_value < @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused'; +variable_value < @key_blocks_unused +1 select * from information_schema.key_caches where segment_number is null; KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_BLOCKS DIRTY_BLOCKS READ_REQUESTS READS WRITE_REQUESTS WRITES default 2 NULL 2097152 1024 4 # 0 22 0 26 6 @@ -531,16 +528,18 @@ p i a 4 3 zzzz update t1 set p=3 where p=1; update t2 set i=2 where i=1; -show status like 'key_%'; -Variable_name Value -Key_blocks_not_flushed 0 -Key_blocks_unused KEY_BLOCKS_UNUSED -Key_blocks_used 4 -Key_blocks_warm 0 -Key_read_requests 22 -Key_reads 0 -Key_write_requests 26 -Key_writes 6 +select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused'; +VARIABLE_NAME VARIABLE_VALUE +KEY_BLOCKS_NOT_FLUSHED 0 +KEY_BLOCKS_USED 4 +KEY_BLOCKS_WARM 0 +KEY_READ_REQUESTS 22 +KEY_READS 0 +KEY_WRITE_REQUESTS 26 +KEY_WRITES 6 +select variable_value = @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused'; +variable_value = @key_blocks_unused +1 select * from information_schema.key_caches where segment_number is null; KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_BLOCKS DIRTY_BLOCKS READ_REQUESTS READS WRITE_REQUESTS WRITES default 1 NULL 2097152 1024 4 # 0 22 0 26 6 @@ -558,6 +557,7 @@ KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_B default 1 NULL 2097152 1024 4 # 0 0 0 0 0 small NULL NULL 1048576 1024 1 # 0 0 0 0 0 set global key_buffer_size=32*1024; +set global key_cache_file_hash_size=128; select @@key_buffer_size; @@key_buffer_size 32768 @@ -833,3 +833,4 @@ set global keycache1.key_buffer_size=0; set global keycache2.key_buffer_size=0; set global key_buffer_size=@save_key_buffer_size; set global key_cache_segments=@save_key_cache_segments; +set global key_cache_file_hash_size=@save_key_cache_file_hash_size; diff --git a/mysql-test/r/keywords.result b/mysql-test/r/keywords.result index a1d8e40eae3..a3588017e97 100644 --- a/mysql-test/r/keywords.result +++ b/mysql-test/r/keywords.result @@ -272,6 +272,6 @@ DROP TABLE t1; create table option (option int not null); drop table option; set option=1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '=1' at line 1 +ERROR HY000: Unknown system variable 'option' set option option=1; ERROR HY000: Unknown system variable 'option' diff --git a/mysql-test/r/kill.result b/mysql-test/r/kill.result index e91db0c9036..6afce67cc1a 100644 --- a/mysql-test/r/kill.result +++ b/mysql-test/r/kill.result @@ -298,5 +298,15 @@ select 1; Got one of the listed errors select 1; Got one of the listed errors +# +# MDEV-4911 - add KILL query id, and add query id information to +# processlist +# +SELECT SLEEP(1000); +KILL QUERY ID @id; +SLEEP(1000) +1 +KILL QUERY ID 0; +ERROR HY000: Unknown query id: 0 SET DEBUG_SYNC = 'RESET'; DROP FUNCTION MY_KILL; diff --git a/mysql-test/r/kill_processlist-6619.result b/mysql-test/r/kill_processlist-6619.result index f14727f1696..7dd42790cc7 100644 --- a/mysql-test/r/kill_processlist-6619.result +++ b/mysql-test/r/kill_processlist-6619.result @@ -1,10 +1,18 @@ connect con1,localhost,root,,; +SHOW PROCESSLIST; +Id User Host db Command Time State Info Progress +# root # test Sleep # # NULL 0.000 +# root # test Query # # SHOW PROCESSLIST 0.000 +SET DEBUG_SYNC='before_execute_sql_command SIGNAL ready WAIT_FOR go'; +SHOW PROCESSLIST; connection default; +SET DEBUG_SYNC='now WAIT_FOR ready'; KILL QUERY con_id; +SET DEBUG_SYNC='now SIGNAL go'; connection con1; -SHOW PROCESSLIST; ERROR 70100: Query execution was interrupted +SET DEBUG_SYNC='reset'; SHOW PROCESSLIST; Id User Host db Command Time State Info Progress -# root # test # # # # 0.000 -# root # test # # # # 0.000 +# root # test Sleep # # NULL 0.000 +# root # test Query # # SHOW PROCESSLIST 0.000 diff --git a/mysql-test/r/kill_query-6728.result b/mysql-test/r/kill_query-6728.result new file mode 100644 index 00000000000..6638edebeea --- /dev/null +++ b/mysql-test/r/kill_query-6728.result @@ -0,0 +1,7 @@ +connect con1,localhost,root,,; +connection default; +kill query id; +connection con1; +select count(*) > 0 from mysql.user; +count(*) > 0 +1 diff --git a/mysql-test/r/limit_rows_examined.result b/mysql-test/r/limit_rows_examined.result index 4e13e04f961..0b3bc196a31 100644 --- a/mysql-test/r/limit_rows_examined.result +++ b/mysql-test/r/limit_rows_examined.result @@ -439,8 +439,8 @@ from (select * from t1 where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 0)) as tmp LIMIT ROWS EXAMINED 11; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 4 -1 SIMPLE <subquery3> eq_ref distinct_key distinct_key 2 func 1 +1 PRIMARY t1 ALL NULL NULL NULL NULL 4 +1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 2 func 1 3 MATERIALIZED t2 ALL NULL NULL NULL NULL 4 Using where select * from (select * from t1 @@ -748,27 +748,28 @@ ERROR HY000: Sort aborted: SHOW STATUS LIKE 'Handler_read%'; Variable_name Value Handler_read_first 0 -Handler_read_key 4 +Handler_read_key 5 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 -Handler_read_rnd_next 52 +Handler_read_rnd_next 46 SHOW STATUS LIKE 'Handler_tmp%'; Variable_name Value Handler_tmp_update 0 -Handler_tmp_write 66 +Handler_tmp_write 70 FLUSH STATUS; SELECT a AS field1, alias2.d AS field2, alias2.f AS field3, alias2.e AS field4, b AS field5 FROM t1, t2 AS alias2, t2 AS alias3 WHERE alias3.c IN ( SELECT 1 UNION SELECT 6 ) GROUP BY field1, field2, field3, field4, field5 -LIMIT ROWS EXAMINED 250; +LIMIT ROWS EXAMINED 124; field1 field2 field3 field4 field5 00:21:38 06:07:10 a 2007-06-08 04:35:26 2007-05-28 00:00:00 Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 251 rows, which exceeds LIMIT ROWS EXAMINED (250). The query result may be incomplete. +Warning 1931 Query execution was interrupted. The query examined at least 125 rows, which exceeds LIMIT ROWS EXAMINED (124). The query result may be incomplete. SHOW STATUS LIKE 'Handler_read%'; Variable_name Value Handler_read_first 0 @@ -776,13 +777,14 @@ Handler_read_key 5 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 2 Handler_read_rnd_deleted 1 -Handler_read_rnd_next 110 +Handler_read_rnd_next 47 SHOW STATUS LIKE 'Handler_tmp%'; Variable_name Value Handler_tmp_update 0 -Handler_tmp_write 133 +Handler_tmp_write 70 drop table t1, t2; MDEV-161 LIMIT_ROWS EXAMINED: query with the limit and NOT EXISTS, without GROUP BY or aggregate, diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 0421c591aff..f446a503317 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -5,8 +5,8 @@ Warnings: Warning 1265 Data truncated for column 'a' at row 1 Warning 1265 Data truncated for column 'c' at row 1 Warning 1265 Data truncated for column 'd' at row 1 -Warning 1264 Out of range value for column 'a' at row 2 -Warning 1264 Out of range value for column 'b' at row 2 +Warning 1265 Data truncated for column 'a' at row 2 +Warning 1265 Data truncated for column 'b' at row 2 Warning 1265 Data truncated for column 'd' at row 2 load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; SELECT * from t1; @@ -20,7 +20,7 @@ load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated Warnings: Warning 1265 Data truncated for column 'c' at row 1 Warning 1265 Data truncated for column 'd' at row 1 -Warning 1264 Out of range value for column 'b' at row 2 +Warning 1265 Data truncated for column 'b' at row 2 Warning 1265 Data truncated for column 'd' at row 2 SELECT * from t1; a b c d diff --git a/mysql-test/r/locale.result b/mysql-test/r/locale.result index 6de1d0708ca..95c1f51fd87 100644 --- a/mysql-test/r/locale.result +++ b/mysql-test/r/locale.result @@ -129,3 +129,99 @@ SELECT c FROM t1 WHERE MONTHNAME(d)<>c; c test DROP TABLE t1; +# +# Start of 5.6 tests +# +# +# WL#5303 Romansh locale for DAYNAME, MONTHNAME, DATE_FORMAT +# +SET NAMES utf8; +SET @old_50915_lc_time_names := @@lc_time_names; +SET lc_time_names=en_US; +SELECT DATE_FORMAT('2001-01-01', '%w %a %W'); +DATE_FORMAT('2001-01-01', '%w %a %W') +1 Mon Monday +SELECT DATE_FORMAT('2001-03-01', '%c %b %M'); +DATE_FORMAT('2001-03-01', '%c %b %M') +3 Mar March +SET lc_time_names=rm_CH; +SELECT DATE_FORMAT('2001-01-01', '%w %a %W'); +DATE_FORMAT('2001-01-01', '%w %a %W') +1 gli glindesdi +SELECT DATE_FORMAT('2001-01-02', '%w %a %W'); +DATE_FORMAT('2001-01-02', '%w %a %W') +2 ma mardi +SELECT DATE_FORMAT('2001-01-03', '%w %a %W'); +DATE_FORMAT('2001-01-03', '%w %a %W') +3 me mesemna +SELECT DATE_FORMAT('2001-01-04', '%w %a %W'); +DATE_FORMAT('2001-01-04', '%w %a %W') +4 gie gievgia +SELECT DATE_FORMAT('2001-01-05', '%w %a %W'); +DATE_FORMAT('2001-01-05', '%w %a %W') +5 ve venderdi +SELECT DATE_FORMAT('2001-01-06', '%w %a %W'); +DATE_FORMAT('2001-01-06', '%w %a %W') +6 so sonda +SELECT DATE_FORMAT('2001-01-07', '%w %a %W'); +DATE_FORMAT('2001-01-07', '%w %a %W') +0 du dumengia +SELECT DATE_FORMAT('2001-01-01', '%c %b %M'); +DATE_FORMAT('2001-01-01', '%c %b %M') +1 schan schaner +SELECT DATE_FORMAT('2001-02-01', '%c %b %M'); +DATE_FORMAT('2001-02-01', '%c %b %M') +2 favr favrer +SELECT DATE_FORMAT('2001-03-01', '%c %b %M'); +DATE_FORMAT('2001-03-01', '%c %b %M') +3 mars mars +SELECT DATE_FORMAT('2001-04-01', '%c %b %M'); +DATE_FORMAT('2001-04-01', '%c %b %M') +4 avr avrigl +SELECT DATE_FORMAT('2001-05-01', '%c %b %M'); +DATE_FORMAT('2001-05-01', '%c %b %M') +5 matg matg +SELECT DATE_FORMAT('2001-06-01', '%c %b %M'); +DATE_FORMAT('2001-06-01', '%c %b %M') +6 zercl zercladur +SELECT DATE_FORMAT('2001-07-01', '%c %b %M'); +DATE_FORMAT('2001-07-01', '%c %b %M') +7 fan fanadur +SELECT DATE_FORMAT('2001-08-01', '%c %b %M'); +DATE_FORMAT('2001-08-01', '%c %b %M') +8 avust avust +SELECT DATE_FORMAT('2001-09-01', '%c %b %M'); +DATE_FORMAT('2001-09-01', '%c %b %M') +9 sett settember +SELECT DATE_FORMAT('2001-10-01', '%c %b %M'); +DATE_FORMAT('2001-10-01', '%c %b %M') +10 oct october +SELECT DATE_FORMAT('2001-11-01', '%c %b %M'); +DATE_FORMAT('2001-11-01', '%c %b %M') +11 nov november +SELECT DATE_FORMAT('2001-12-01', '%c %b %M'); +DATE_FORMAT('2001-12-01', '%c %b %M') +12 dec december +SET lc_time_names=de_CH; +SELECT DATE_FORMAT('2001-01-06', '%w %a %W'); +DATE_FORMAT('2001-01-06', '%w %a %W') +6 Sa Samstag +SELECT DATE_FORMAT('2001-09-01', '%c %b %M'); +DATE_FORMAT('2001-09-01', '%c %b %M') +9 Sep September +SELECT DATE_FORMAT('2010-03-23 11:00:00','%h %p'); +DATE_FORMAT('2010-03-23 11:00:00','%h %p') +11 AM +SELECT DATE_FORMAT('2010-03-23 13:00:00','%h %p'); +DATE_FORMAT('2010-03-23 13:00:00','%h %p') +01 PM +SELECT format(123456789,2,'rm_CH'); +format(123456789,2,'rm_CH') +123'456'789,00 +SET lc_messages=rm_CH; +SELECT * FROM non_existent; +ERROR 42S02: Table 'test.non_existent' doesn't exist +SET lc_time_names=@old_50915_lc_time_names; +# +# End of 5.6 tests +# diff --git a/mysql-test/r/lock_multi.result b/mysql-test/r/lock_multi.result index 67712ccabe6..f9e4a88fe95 100644 --- a/mysql-test/r/lock_multi.result +++ b/mysql-test/r/lock_multi.result @@ -18,7 +18,7 @@ n 4 drop table t1; create table t1(n int); -insert into t1 values (1); +insert into t1 values (1),(2); select get_lock("mysqltest_lock", 100); get_lock("mysqltest_lock", 100) 1 @@ -27,11 +27,13 @@ update low_priority t1 set n = 4; select n from t1; n 1 +2 select release_lock("mysqltest_lock"); release_lock("mysqltest_lock") 1 n 1 +2 select release_lock("mysqltest_lock"); release_lock("mysqltest_lock") 1 diff --git a/mysql-test/r/lock_sync.result b/mysql-test/r/lock_sync.result index 3877e70372c..219cc08342e 100644 --- a/mysql-test/r/lock_sync.result +++ b/mysql-test/r/lock_sync.result @@ -27,6 +27,7 @@ drop table if exists t0, t1, t2, t3, t4, t5; drop view if exists v1, v2; drop procedure if exists p1; drop procedure if exists p2; +drop procedure if exists p3; drop function if exists f1; drop function if exists f2; drop function if exists f3; @@ -42,6 +43,8 @@ drop function if exists f12; drop function if exists f13; drop function if exists f14; drop function if exists f15; +drop function if exists f16; +drop function if exists f17; create table t1 (i int primary key); insert into t1 values (1), (2), (3), (4), (5); create table t2 (j int primary key); @@ -146,6 +149,26 @@ declare k int; call p2(k); return k; end| +create function f16() returns int +begin +create temporary table if not exists temp1 (a int); +insert into temp1 select * from t1; +drop temporary table temp1; +return 1; +end| +create function f17() returns int +begin +declare j int; +select i from t1 where i = 1 into j; +call p3; +return 1; +end| +create procedure p3() +begin +create temporary table if not exists temp1 (a int); +insert into temp1 select * from t1; +drop temporary table temp1; +end| create trigger t4_bi before insert on t4 for each row begin declare k int; @@ -185,6 +208,7 @@ end| # once during its execution. show create procedure p1; show create procedure p2; +show create procedure p3; show create function f1; show create function f2; show create function f3; @@ -200,6 +224,8 @@ show create function f12; show create function f13; show create function f14; show create function f15; +show create function f16; +show create function f17; # Switch back to connection 'default'. # # 1. Statements that read tables and do not use subqueries. @@ -359,14 +385,11 @@ Success: 'update v2 set j= j-10 where j = 3' doesn't allow concurrent inserts in # 4.1 SELECT/SET with a stored function which does not # modify data and uses SELECT in its turn. # -# In theory there is no need to take strong locks on the table +# There is no need to take strong locks on the table # being selected from in SF as the call to such function -# won't get into the binary log. In practice, however, we -# discover that fact too late in the process to be able to -# affect the decision what locks should be taken. -# Hence, strong locks are taken in this case. -Success: 'select f1()' doesn't allow concurrent inserts into 't1'. -Success: 'set @a:= f1()' doesn't allow concurrent inserts into 't1'. +# won't get into the binary log. +Success: 'select f1()' allows concurrent inserts into 't1'. +Success: 'set @a:= f1()' allows concurrent inserts into 't1'. # # 4.2 INSERT (or other statement which modifies data) with # a stored function which does not modify data and uses @@ -392,14 +415,12 @@ Success: 'set @a:= f2()' doesn't allow concurrent inserts into 't1'. # modify data and reads a table through subselect # in a control construct. # -# Again, in theory a call to this function won't get to the -# binary log and thus no strong lock is needed. But in practice -# we don't detect this fact early enough (get_lock_type_for_table()) -# to avoid taking a strong lock. -Success: 'select f3()' doesn't allow concurrent inserts into 't1'. -Success: 'set @a:= f3()' doesn't allow concurrent inserts into 't1'. -Success: 'select f4()' doesn't allow concurrent inserts into 't1'. -Success: 'set @a:= f4()' doesn't allow concurrent inserts into 't1'. +# Call to this function won't get to the +# binary log and thus no strong lock is needed. +Success: 'select f3()' allows concurrent inserts into 't1'. +Success: 'set @a:= f3()' allows concurrent inserts into 't1'. +Success: 'select f4()' allows concurrent inserts into 't1'. +Success: 'set @a:= f4()' allows concurrent inserts into 't1'. # # 4.5. INSERT (or other statement which modifies data) with # a stored function which does not modify data and reads @@ -426,14 +447,13 @@ Success: 'set @a:= f5()' doesn't allow concurrent inserts into 't1'. # doesn't modify data and reads tables through # a view. # -# Once again, in theory, calls to such functions won't -# get into the binary log and thus don't need strong -# locks. But in practice this fact is discovered -# too late to have any effect. -Success: 'select f6()' doesn't allow concurrent inserts into 't1'. -Success: 'set @a:= f6()' doesn't allow concurrent inserts into 't1'. -Success: 'select f7()' doesn't allow concurrent inserts into 't1'. -Success: 'set @a:= f7()' doesn't allow concurrent inserts into 't1'. +# Calls to such functions won't get into +# the binary log and thus don't need strong +# locks. +Success: 'select f6()' allows concurrent inserts into 't1'. +Success: 'set @a:= f6()' allows concurrent inserts into 't1'. +Success: 'select f7()' allows concurrent inserts into 't1'. +Success: 'set @a:= f7()' allows concurrent inserts into 't1'. # # 4.8 INSERT which uses stored function which # doesn't modify data and reads a table @@ -459,10 +479,9 @@ Success: 'select f9()' doesn't allow concurrent inserts into 't1'. # data and reads a table indirectly, by calling another # function. # -# In theory, calls to such functions won't get into the binary -# log and thus don't need to acquire strong locks. But in practice -# this fact is discovered too late to have any effect. -Success: 'select f10()' doesn't allow concurrent inserts into 't1'. +# Calls to such functions won't get into the binary +# log and thus don't need to acquire strong locks. +Success: 'select f10()' allows concurrent inserts into 't1'. # # 4.11 INSERT which uses a stored function which doesn't modify # data and reads a table indirectly, by calling another @@ -501,6 +520,26 @@ Success: 'select f12((select i+10 from t1 where i=1))' allows concurrent inserts # uses. Therefore it should take strong locks on the data it reads. Success: 'insert into t2 values (f13((select i+10 from t1 where i=1)))' doesn't allow concurrent inserts into 't1'. # +# 4.15 SELECT/SET with a stored function which +# inserts data into a temporary table using +# SELECT on t1. +# +# Since this statement is written to the binary log it should +# be serialized with concurrent statements affecting the data it +# uses. Therefore it should take strong locks on the data it reads. +Success: 'select f16()' doesn't allow concurrent inserts into 't1'. +Success: 'set @a:= f16()' doesn't allow concurrent inserts into 't1'. +# +# 4.16 SELECT/SET with a stored function which call procedure +# which inserts data into a temporary table using +# SELECT on t1. +# +# Since this statement is written to the binary log it should +# be serialized with concurrent statements affecting the data it +# uses. Therefore it should take strong locks on the data it reads. +Success: 'select f17()' doesn't allow concurrent inserts into 't1'. +Success: 'set @a:= f17()' doesn't allow concurrent inserts into 't1'. +# # 5. Statements that read tables through stored procedures. # # @@ -522,10 +561,9 @@ Success: 'select f14()' doesn't allow concurrent inserts into 't1'. # 5.3 SELECT that calls a function that doesn't modify data and # uses a CALL statement that reads a table via SELECT. # -# In theory, calls to such functions won't get into the binary -# log and thus don't need to acquire strong locks. But in practice -# this fact is discovered too late to have any effect. -Success: 'select f15()' doesn't allow concurrent inserts into 't1'. +# Calls to such functions won't get into the binary +# log and thus don't need to acquire strong locks. +Success: 'select f15()' allows concurrent inserts into 't1'. # # 5.4 INSERT which calls function which doesn't modify data and # uses CALL statement which reads table through SELECT. @@ -585,9 +623,12 @@ drop function f12; drop function f13; drop function f14; drop function f15; +drop function f16; +drop function f17; drop view v1, v2; drop procedure p1; drop procedure p2; +drop procedure p3; drop table t1, t2, t3, t4, t5; set @@global.concurrent_insert= @old_concurrent_insert; # @@ -773,54 +814,3 @@ Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function SET DEBUG_SYNC= 'RESET'; DROP VIEW v1; DROP TABLE t1; -# -# Bug#19070633 - POSSIBLE ACCESS TO FREED MEMORY IN IS_FREE_LOCK() AND IS_USED_LOCK(). -# -# Verifying issue for IS_FREE_LOCK() function. -SELECT GET_LOCK("lock_19070633", 600); -GET_LOCK("lock_19070633", 600) -1 -connect con1, localhost, root,,; -# Waiting after getting user level lock info and releasing mutex. -SET DEBUG_SYNC= 'after_getting_user_level_lock_info SIGNAL parked WAIT_FOR go'; -# Sending: SELECT IS_FREE_LOCK("lock_19070633"); -SELECT IS_FREE_LOCK("lock_19070633"); -connection default; -SET DEBUG_SYNC= 'now WAIT_FOR parked'; -SELECT RELEASE_LOCK("lock_19070633"); -RELEASE_LOCK("lock_19070633") -1 -# Signaling connection con1 after releasing the lock. -# Without fix, accessing user level lock info in con1 would result in -# crash or valgrind issue invalid read is reported. -SET DEBUG_SYNC= 'now SIGNAL go'; -connection con1; -# Reaping: SELECT IS_FREE_LOCK("lock_19070633"); -IS_FREE_LOCK("lock_19070633") -0 -connection default; -# Verifying issue for IS_USED_LOCK() function. -SELECT GET_LOCK("lock_19070633", 600); -GET_LOCK("lock_19070633", 600) -1 -connection con1; -# Waiting after getting user level lock info and releasing mutex. -SET DEBUG_SYNC= 'after_getting_user_level_lock_info SIGNAL parked WAIT_FOR go'; -# Sending: SELECT IS_USED_LOCK("lock_19070633"); -SELECT IS_USED_LOCK("lock_19070633"); -connection default; -SET DEBUG_SYNC= 'now WAIT_FOR parked'; -SELECT RELEASE_LOCK("lock_19070633"); -RELEASE_LOCK("lock_19070633") -1 -# Signaling connection con1 after releasing the lock. -# Without fix, accessing user level lock info in con1 would result in -# crash or valgrind issue invalid read is reported. -SET DEBUG_SYNC= 'now SIGNAL go'; -connection con1; -# Reaping: SELECT IS_USED_LOCK("lock_19070633"); -IS_USED_LOCK("lock_19070633") -# -connection default; -SET DEBUG_SYNC= 'RESET'; -disconnect con1; diff --git a/mysql-test/r/log_errchk.result b/mysql-test/r/log_errchk.result index 7311108ace1..e1968e29662 100644 --- a/mysql-test/r/log_errchk.result +++ b/mysql-test/r/log_errchk.result @@ -7,5 +7,5 @@ ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of 'MYSQLT # Case 2: Starting server with fifo file as general log file # and slow query log file. call mtr.add_suppression("Could not use .* for logging \\(error 6\\)"); -call mtr.add_suppression("File '.*' not found \\(Errcode: 6\\)"); +call mtr.add_suppression("File '.*' not found \\(Errcode: 6 "); Setting fifo file as general log file and slow query log failed. diff --git a/mysql-test/r/log_slow.result b/mysql-test/r/log_slow.result index b396de8a3d8..4f5eb9359f6 100644 --- a/mysql-test/r/log_slow.result +++ b/mysql-test/r/log_slow.result @@ -10,7 +10,6 @@ select @@log_slow_verbosity; show variables like "log_slow%"; Variable_name Value log_slow_filter admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk -log_slow_queries ON log_slow_rate_limit 1 log_slow_verbosity set @org_slow_query_log= @@global.slow_query_log; @@ -45,7 +44,7 @@ select @@log_slow_verbosity; innodb show fields from mysql.slow_log; Field Type Null Key Default Extra -start_time timestamp(6) NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP +start_time timestamp(6) NO CURRENT_TIMESTAMP(6) on update CURRENT_TIMESTAMP user_host mediumtext NO NULL query_time time(6) NO NULL lock_time time(6) NO NULL @@ -56,6 +55,7 @@ last_insert_id int(11) NO NULL insert_id int(11) NO NULL server_id int(10) unsigned NO NULL sql_text mediumtext NO NULL +thread_id bigint(21) unsigned NO NULL flush slow logs; set long_query_time=0.1; set log_slow_filter=''; diff --git a/mysql-test/r/log_state.result b/mysql-test/r/log_state.result index 3ccd1451bc4..cc6f3709ae4 100644 --- a/mysql-test/r/log_state.result +++ b/mysql-test/r/log_state.result @@ -6,12 +6,9 @@ set global general_log= OFF; truncate table mysql.general_log; truncate table mysql.slow_log; show global variables -where Variable_name = 'log' or Variable_name = 'log_slow_queries' or -Variable_name = 'general_log' or Variable_name = 'slow_query_log'; +where Variable_name = 'general_log' or Variable_name = 'slow_query_log'; Variable_name Value general_log OFF -log OFF -log_slow_queries OFF slow_query_log OFF flush logs; set global general_log= ON; @@ -30,12 +27,9 @@ TIMESTAMP USER_HOST # 1 Query set global general_log= OFF set global general_log= ON; flush logs; show global variables -where Variable_name = 'log' or Variable_name = 'log_slow_queries' or -Variable_name = 'general_log' or Variable_name = 'slow_query_log'; +where Variable_name = 'general_log' or Variable_name = 'slow_query_log'; Variable_name Value general_log ON -log ON -log_slow_queries OFF slow_query_log OFF # Establish connection con1 (user=root) # Switch to connection con1 @@ -45,7 +39,7 @@ select sleep(@long_query_time + 1); sleep(@long_query_time + 1) 0 select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%'; -start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text +start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id # Switch to connection default set global slow_query_log= ON; # Switch to connection con1 @@ -54,16 +48,13 @@ select sleep(@long_query_time + 1); sleep(@long_query_time + 1) 0 select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%'; -start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text -TIMESTAMP USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 select sleep(@long_query_time + 1) +start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id +TIMESTAMP USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 select sleep(@long_query_time + 1) THREAD_ID # Switch to connection default show global variables -where Variable_name = 'log' or Variable_name = 'log_slow_queries' or -Variable_name = 'general_log' or Variable_name = 'slow_query_log'; +where Variable_name = 'general_log' or Variable_name = 'slow_query_log'; Variable_name Value general_log ON -log ON -log_slow_queries ON slow_query_log ON set global general_log= ON; set global general_log= OFF; @@ -86,12 +77,9 @@ select * from mysql.general_log; event_time user_host thread_id server_id command_type argument set global general_log= ON; show global variables -where Variable_name = 'log' or Variable_name = 'log_slow_queries' or -Variable_name = 'general_log' or Variable_name = 'slow_query_log'; +where Variable_name = 'general_log' or Variable_name = 'slow_query_log'; Variable_name Value general_log ON -log ON -log_slow_queries OFF slow_query_log OFF show variables like 'general_log_file'; Variable_name Value @@ -187,71 +175,6 @@ SET GLOBAL slow_query_log = ON; SET GLOBAL READ_ONLY = OFF; SET GLOBAL general_log = @old_general_log; SET GLOBAL slow_query_log = @old_slow_query_log; -SET GLOBAL general_log = ON; -SHOW VARIABLES LIKE 'general_log'; -Variable_name Value -general_log ON -SHOW VARIABLES LIKE 'log'; -Variable_name Value -log ON -SELECT @@general_log, @@log; -@@general_log @@log -1 1 -SET GLOBAL log = 0; -Warnings: -Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead -SHOW VARIABLES LIKE 'general_log'; -Variable_name Value -general_log OFF -SHOW VARIABLES LIKE 'log'; -Variable_name Value -log OFF -SELECT @@general_log, @@log; -@@general_log @@log -0 0 -SET GLOBAL general_log = 1; -SHOW VARIABLES LIKE 'general_log'; -Variable_name Value -general_log ON -SHOW VARIABLES LIKE 'log'; -Variable_name Value -log ON -SELECT @@general_log, @@log; -@@general_log @@log -1 1 -SHOW VARIABLES LIKE 'slow_query_log'; -Variable_name Value -slow_query_log OFF -SHOW VARIABLES LIKE 'log_slow_queries'; -Variable_name Value -log_slow_queries OFF -SELECT @@slow_query_log, @@log_slow_queries; -@@slow_query_log @@log_slow_queries -0 0 -SET GLOBAL log_slow_queries = 0; -Warnings: -Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead -SHOW VARIABLES LIKE 'slow_query_log'; -Variable_name Value -slow_query_log OFF -SHOW VARIABLES LIKE 'log_slow_queries'; -Variable_name Value -log_slow_queries OFF -SELECT @@slow_query_log, @@log_slow_queries; -@@slow_query_log @@log_slow_queries -0 0 -SET GLOBAL slow_query_log = 1; -SHOW VARIABLES LIKE 'slow_query_log'; -Variable_name Value -slow_query_log ON -SHOW VARIABLES LIKE 'log_slow_queries'; -Variable_name Value -log_slow_queries ON -SELECT @@slow_query_log, @@log_slow_queries; -@@slow_query_log @@log_slow_queries -1 1 -SET GLOBAL general_log = @old_general_log; -SET GLOBAL slow_query_log = @old_slow_query_log; SET GLOBAL general_log_file= CONCAT('/not existing path/log.maste', 'r'); ERROR 42000: Variable 'general_log_file' can't be set to the value of '/not existing path/log.master' SET GLOBAL general_log_file= NULL; @@ -280,34 +203,6 @@ SET GLOBAL general_log_file = @old_general_log_file; SET GLOBAL slow_query_log_file = @old_slow_query_log_file; # -- End of Bug#32748. -deprecated: -SET GLOBAL log = 0; -Warnings: -Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead -SET GLOBAL log_slow_queries = 0; -Warnings: -Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead -SET GLOBAL log = DEFAULT; -Warnings: -Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead -SET GLOBAL log_slow_queries = DEFAULT; -Warnings: -Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead -not deprecated: -SELECT @@global.general_log_file INTO @my_glf; -SELECT @@global.slow_query_log_file INTO @my_sqlf; -SET GLOBAL general_log = 0; -SET GLOBAL slow_query_log = 0; -SET GLOBAL general_log_file = 'WL4403_G.log'; -SET GLOBAL slow_query_log_file = 'WL4403_SQ.log'; -SET GLOBAL general_log_file = @my_glf; -SET GLOBAL slow_query_log_file = @my_sqlf; -SET GLOBAL general_log = DEFAULT; -SET GLOBAL slow_query_log = DEFAULT; -SET @@global.general_log = @old_general_log; -SET @@global.general_log_file = @old_general_log_file; -SET @@global.slow_query_log = @old_slow_query_log; -SET @@global.slow_query_log_file = @old_slow_query_log_file; # # Bug #49756 Rows_examined is always 0 in the slow query log # for update statements diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result index 62775f3db4d..04cd2f01050 100644 --- a/mysql-test/r/log_tables.result +++ b/mysql-test/r/log_tables.result @@ -17,7 +17,7 @@ event_time user_host thread_id server_id command_type argument TIMESTAMP USER_HOST THREAD_ID 1 Query select * from general_log truncate table slow_log; select * from slow_log; -start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text +start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id truncate table general_log; select * from general_log where argument like '%general_log%'; event_time user_host thread_id server_id command_type argument @@ -53,25 +53,25 @@ ERROR HY000: You can't use locks with log tables. show create table mysql.general_log; Table Create Table general_log CREATE TABLE `general_log` ( - `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, - `thread_id` int(11) NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL, `server_id` int(10) unsigned NOT NULL, `command_type` varchar(64) NOT NULL, `argument` mediumtext NOT NULL ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log' show fields from mysql.general_log; Field Type Null Key Default Extra -event_time timestamp(6) NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP +event_time timestamp(6) NO CURRENT_TIMESTAMP(6) on update CURRENT_TIMESTAMP user_host mediumtext NO NULL -thread_id int(11) NO NULL +thread_id bigint(21) unsigned NO NULL server_id int(10) unsigned NO NULL command_type varchar(64) NO NULL argument mediumtext NO NULL show create table mysql.slow_log; Table Create Table slow_log CREATE TABLE `slow_log` ( - `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, `query_time` time(6) NOT NULL, `lock_time` time(6) NOT NULL, @@ -81,11 +81,12 @@ slow_log CREATE TABLE `slow_log` ( `last_insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL, - `sql_text` mediumtext NOT NULL + `sql_text` mediumtext NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' show fields from mysql.slow_log; Field Type Null Key Default Extra -start_time timestamp(6) NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP +start_time timestamp(6) NO CURRENT_TIMESTAMP(6) on update CURRENT_TIMESTAMP user_host mediumtext NO NULL query_time time(6) NO NULL lock_time time(6) NO NULL @@ -96,6 +97,7 @@ last_insert_id int(11) NO NULL insert_id int(11) NO NULL server_id int(10) unsigned NO NULL sql_text mediumtext NO NULL +thread_id bigint(21) unsigned NO NULL flush logs; flush tables; SET GLOBAL GENERAL_LOG=ON; @@ -146,8 +148,8 @@ select sleep(2); sleep(2) 0 select * from mysql.slow_log; -start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text -TIMESTAMP USER_HOST QUERY_TIME 00:00:00.000000 1 0 mysql 0 0 1 select sleep(2) +start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id +TIMESTAMP USER_HOST QUERY_TIME 00:00:00.000000 1 0 mysql 0 0 1 select sleep(2) THREAD_ID set @@session.long_query_time = @saved_long_query_time; alter table mysql.general_log engine=myisam; ERROR HY000: You cannot 'ALTER' a log table if logging is enabled @@ -164,9 +166,9 @@ set global slow_query_log='OFF'; show create table mysql.general_log; Table Create Table general_log CREATE TABLE `general_log` ( - `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, - `thread_id` int(11) NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL, `server_id` int(10) unsigned NOT NULL, `command_type` varchar(64) NOT NULL, `argument` mediumtext NOT NULL @@ -174,7 +176,7 @@ general_log CREATE TABLE `general_log` ( show create table mysql.slow_log; Table Create Table slow_log CREATE TABLE `slow_log` ( - `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, `query_time` time(6) NOT NULL, `lock_time` time(6) NOT NULL, @@ -184,16 +186,17 @@ slow_log CREATE TABLE `slow_log` ( `last_insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL, - `sql_text` mediumtext NOT NULL + `sql_text` mediumtext NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' alter table mysql.general_log engine=myisam; alter table mysql.slow_log engine=myisam; show create table mysql.general_log; Table Create Table general_log CREATE TABLE `general_log` ( - `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, - `thread_id` int(11) NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL, `server_id` int(10) unsigned NOT NULL, `command_type` varchar(64) NOT NULL, `argument` mediumtext NOT NULL @@ -201,7 +204,7 @@ general_log CREATE TABLE `general_log` ( show create table mysql.slow_log; Table Create Table slow_log CREATE TABLE `slow_log` ( - `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, `query_time` time(6) NOT NULL, `lock_time` time(6) NOT NULL, @@ -211,7 +214,8 @@ slow_log CREATE TABLE `slow_log` ( `last_insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL, - `sql_text` mediumtext NOT NULL + `sql_text` mediumtext NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Slow log' set global general_log='ON'; set global slow_query_log='ON'; @@ -251,20 +255,20 @@ alter table mysql.slow_log engine=NonExistentEngine; Warnings: Warning 1286 Unknown storage engine 'NonExistentEngine' alter table mysql.slow_log engine=memory; -ERROR HY000: This storage engine cannot be used for log tables +ERROR HY000: Storage engine MEMORY cannot be used for log tables set storage_engine= @save_storage_engine; drop table mysql.slow_log; drop table mysql.general_log; drop table mysql.general_log; -ERROR 42S02: Unknown table 'general_log' +ERROR 42S02: Unknown table 'mysql.general_log' drop table mysql.slow_log; -ERROR 42S02: Unknown table 'slow_log' +ERROR 42S02: Unknown table 'mysql.slow_log' use mysql; CREATE TABLE `general_log` ( -`event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP +`event_time` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `user_host` mediumtext NOT NULL, -`thread_id` int(11) NOT NULL, +`thread_id` BIGINT(21) UNSIGNED NOT NULL, `server_id` int(10) unsigned NOT NULL, `command_type` varchar(64) NOT NULL, `argument` mediumtext NOT NULL @@ -281,7 +285,8 @@ ON UPDATE CURRENT_TIMESTAMP, `last_insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL, -`sql_text` mediumtext NOT NULL +`sql_text` mediumtext NOT NULL, +`thread_id` BIGINT(21) UNSIGNED NOT NULL ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'; set global general_log='ON'; set global slow_query_log='ON'; @@ -308,7 +313,7 @@ event_time user_host thread_id server_id command_type argument TIMESTAMP USER_HOST THREAD_ID 1 Query select * from general_log truncate table slow_log; select * from slow_log; -start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text +start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id create table general_log_new like general_log; rename table general_log TO renamed_general_log, general_log_new TO general_log; create table slow_log_new like slow_log; @@ -329,9 +334,9 @@ TIMESTAMP USER_HOST THREAD_ID 1 Query select * from slow_log TIMESTAMP USER_HOST THREAD_ID 1 Query create table general_log_new like general_log TIMESTAMP USER_HOST THREAD_ID 1 Query rename table general_log TO renamed_general_log, general_log_new TO general_log select * from slow_log; -start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text +start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id select * from renamed_slow_log; -start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text +start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id set global general_log='OFF'; RENAME TABLE general_log TO general_log2; set global slow_query_log='OFF'; @@ -362,7 +367,6 @@ show tables like "%log%"; Tables_in_mysql (%log%) general_log general_log_new -ndb_binlog_index slow_log slow_log_new drop table slow_log_new, general_log_new; @@ -425,10 +429,10 @@ SELECT "My own slow query", sleep(2); My own slow query sleep(2) My own slow query 0 SELECT * FROM mysql.slow_log WHERE seq >= 2 LIMIT 3; -start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text seq -START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 2 -START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 3 -START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 4 +start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id seq +START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 3 2 +START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 3 3 +START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 3 4 SET GLOBAL slow_query_log = 0; SET SESSION long_query_time =@saved_long_query_time; FLUSH LOGS; @@ -532,7 +536,8 @@ CREATE TABLE `db_17876.slow_log_data` ( `last_insert_id` int(11) default NULL, `insert_id` int(11) default NULL, `server_id` int(11) default NULL, -`sql_text` mediumtext +`sql_text` mediumtext, +`thread_id` bigint(21) unsigned default NULL ); CREATE TABLE `db_17876.general_log_data` ( `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, @@ -547,6 +552,7 @@ BEGIN DECLARE start_time, query_time, lock_time CHAR(28); DECLARE user_host MEDIUMTEXT; DECLARE rows_set, rows_examined, last_insert_id, insert_id, server_id INT; +DECLARE thread_id BIGINT UNSIGNED; DECLARE dbname MEDIUMTEXT; DECLARE sql_text BLOB; DECLARE done INT DEFAULT 0; @@ -560,14 +566,14 @@ DECLARE CONTINUE HANDLER FOR ER_SP_FETCH_NO_DATA SET done = 1; FETCH cur1 INTO start_time, user_host, query_time, lock_time, rows_set, rows_examined, dbname, last_insert_id, -insert_id, server_id, sql_text; +insert_id, server_id, sql_text, thread_id; END; IF NOT done THEN BEGIN INSERT INTO `db_17876.slow_log_data` VALUES(start_time, user_host, query_time, lock_time, rows_set, rows_examined, -dbname, last_insert_id, insert_id, server_id, sql_text); +dbname, last_insert_id, insert_id, server_id, sql_text, thread_id); END; END IF; END; diff --git a/mysql-test/r/log_tables_upgrade.result b/mysql-test/r/log_tables_upgrade.result index e68b34ed18d..6cbb25bd1d4 100644 --- a/mysql-test/r/log_tables_upgrade.result +++ b/mysql-test/r/log_tables_upgrade.result @@ -11,31 +11,31 @@ Table Op Msg_type Msg_text test.bug49823 repair status OK RENAME TABLE general_log TO renamed_general_log; RENAME TABLE test.bug49823 TO general_log; -Phase 1/4: Fixing views -Phase 2/4: Fixing table and database names -Phase 3/4: Checking and upgrading tables +Phase 1/6: Checking and upgrading mysql database Processing databases -information_schema -mtr -mtr.global_suppressions OK -mtr.test_suppressions OK mysql +mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK +mysql.gtid_slave_pos OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK -mysql.ndb_binlog_index OK +mysql.index_stats OK +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK mysql.renamed_general_log OK +mysql.roles_mapping OK mysql.servers OK +mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK @@ -43,9 +43,18 @@ mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK +Phase 2/6: Fixing views +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names +Phase 5/6: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK performance_schema test -Phase 4/4: Running 'mysql_fix_privilege_tables' +Phase 6/6: Running 'FLUSH PRIVILEGES' OK DROP TABLE general_log; RENAME TABLE renamed_general_log TO general_log; diff --git a/mysql-test/r/lowercase_fs_off.result b/mysql-test/r/lowercase_fs_off.result index c3284b225dd..d7e1b8c9e5b 100644 --- a/mysql-test/r/lowercase_fs_off.result +++ b/mysql-test/r/lowercase_fs_off.result @@ -44,7 +44,7 @@ f1(1) call p1(); ERROR 42000: execute command denied to user 'USER_1'@'localhost' for routine 'db1.p1' call P1(); -ERROR 42000: execute command denied to user 'USER_1'@'localhost' for routine 'db1.p1' +ERROR 42000: execute command denied to user 'USER_1'@'localhost' for routine 'db1.P1' select f1(1); ERROR 42000: execute command denied to user 'USER_1'@'localhost' for routine 'db1.f1' REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_1@localhost; @@ -63,3 +63,8 @@ CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a= 1; RENAME TABLE t1 TO T1; ALTER TABLE T1 RENAME t1; DROP TABLE t1; +create table t1 (a int); +create trigger t1_bi before insert on t1 for each row set new.a= 1; +show triggers like '%T1%'; +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +drop table t1; diff --git a/mysql-test/r/lowercase_fs_on.result b/mysql-test/r/lowercase_fs_on.result index a090f46cfbf..b844b3f77dd 100644 --- a/mysql-test/r/lowercase_fs_on.result +++ b/mysql-test/r/lowercase_fs_on.result @@ -1,3 +1,4 @@ # # Bug#20198490 : LOWER_CASE_TABLE_NAMES=0 ON WINDOWS LEADS TO PROBLEMS # +FOUND /\[ERROR\] The server option \'lower_case_table_names\' is configured to use case sensitive table names/ in my_restart.err diff --git a/mysql-test/r/lowercase_table.result b/mysql-test/r/lowercase_table.result index 464f423fa92..ac7d3e6bf7b 100644 --- a/mysql-test/r/lowercase_table.result +++ b/mysql-test/r/lowercase_table.result @@ -108,3 +108,22 @@ ii drop table İİ; set names latin1; End of 5.0 tests +create database mysql_TEST character set latin2; +create table mysql_TEST.T1 (a int); +show create database mysql_TEST; +Database Create Database +mysql_TEST CREATE DATABASE `mysql_test` /*!40100 DEFAULT CHARACTER SET latin2 */ +show create table mysql_TEST.T1; +Table Create Table +T1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin2 +show databases like "mysql%"; +Database (mysql%) +mysql +mysql_test +show databases like "mysql_TE%"; +Database (mysql_TE%) +mysql_test +drop database mysql_TEST; +End of 10.0 tests diff --git a/mysql-test/r/lowercase_table2.result b/mysql-test/r/lowercase_table2.result index abd16641b56..1130e782291 100644 --- a/mysql-test/r/lowercase_table2.result +++ b/mysql-test/r/lowercase_table2.result @@ -108,6 +108,14 @@ SELECT * from T1; a 1 DROP TABLE T1; +create database mysqltest_UPPERCASE; +CREATE TABLE mysqltest_UPPERCASE.T1 (a int) engine=innodb; +CREATE TABLE mysqltest_uppercase.t2 (a int) engine=innodb; +CREATE TABLE mysqltest_UPPERCASE.t3 (a int) engine=innodb; +drop table mysqltest_UPPERCASE.T1; +drop table mysqltest_UPPERCASE.T2; +drop table mysqltest_uppercase.t3; +drop database mysqltest_UPPERCASE; create table T1 (EVENT_ID int auto_increment primary key, LOCATION char(20)); insert into T1 values (NULL,"Mic-4"),(NULL,"Mic-5"),(NULL,"Mic-6"); SELECT LOCATION FROM T1 WHERE EVENT_ID=2 UNION ALL SELECT LOCATION FROM T1 WHERE EVENT_ID=3; @@ -129,6 +137,8 @@ show tables like 'T1%'; Tables_in_test (T1%) T1 alter table t1 add index (A); +Warnings: +Note 1831 Duplicate index `A_2`. This is deprecated and will be disallowed in a future release. show tables like 't1%'; Tables_in_test (t1%) t1 @@ -146,6 +156,9 @@ drop table T1; create database mysqltest_LC2; use mysqltest_LC2; create table myUC (i int); +show tables; +Tables_in_mysqltest_LC2 +myUC insert into myUC values (1),(2),(3); select * from myUC; i @@ -222,16 +235,25 @@ drop database if exists mysqltest_UPPERCASE; drop table if exists t_bug44738_UPPERCASE; create database mysqltest_UPPERCASE; use mysqltest_UPPERCASE; +select database(); +database() +mysqltest_UPPERCASE create table t_bug44738_UPPERCASE (i int) comment='Old comment'; create table t_bug44738_lowercase (i int) comment='Old comment'; +create table t_bug44738_UPPERCASE2 (i int) comment='Old comment'; +create table t_bug44738_lowercase2 (i int) comment='Old comment'; select table_schema, table_name, table_comment from information_schema.tables where table_schema like 'mysqltest_%' and table_name like 't_bug44738_%' order by table_name; table_schema table_name table_comment mysqltest_UPPERCASE t_bug44738_lowercase Old comment +mysqltest_UPPERCASE t_bug44738_lowercase2 Old comment mysqltest_UPPERCASE t_bug44738_UPPERCASE Old comment +mysqltest_UPPERCASE t_bug44738_UPPERCASE2 Old comment alter table t_bug44738_UPPERCASE comment='New comment'; alter table t_bug44738_lowercase comment='New comment'; +alter table mysqltest_uppercase.t_bug44738_UPPERCASE2 comment='New comment'; +alter table mysqltest_UPPERCASE.t_bug44738_lowercase2 comment='New comment'; # There should be no stale entries in TDC for our tables after the # above ALTER TABLE statements so new version of comments should be # returned by the below query to I_S. @@ -240,7 +262,9 @@ where table_schema like 'mysqltest_%' and table_name like 't_bug44738_%' order by table_name; table_schema table_name table_comment mysqltest_UPPERCASE t_bug44738_lowercase New comment +mysqltest_UPPERCASE t_bug44738_lowercase2 New comment mysqltest_UPPERCASE t_bug44738_UPPERCASE New comment +mysqltest_UPPERCASE t_bug44738_UPPERCASE2 New comment drop database mysqltest_UPPERCASE; use test; # Let us check that the original test case which led to discovery @@ -272,8 +296,41 @@ Database Table In_use Name_locked test t_bug44738_uppercase 0 0 # So attempt to create table with the same name should fail. create table t_bug44738_UPPERCASE (i int); -ERROR HY000: Can't find file: 't_bug44738_uppercase' (errno: 2) +ERROR 42S01: Table 't_bug44738_uppercase' already exists # And should succeed after FLUSH TABLES. flush tables; create table t_bug44738_UPPERCASE (i int); drop table t_bug44738_UPPERCASE; +# +# Bug #21317 SHOW CREATE DATABASE does not obey to +# lower_case_table_names +# +create database mysql_TEST; +create table mysql_TEST.T1(a int); +show databases like 'mysql%'; +Database (mysql%) +mysql +mysql_TEST +show databases like 'mysql_T%'; +Database (mysql_T%) +mysql_TEST +show databases like 'mysql_t%'; +Database (mysql_t%) +mysql_TEST +show create database mysql_test; +Database Create Database +mysql_test CREATE DATABASE `mysql_test` /*!40100 DEFAULT CHARACTER SET latin1 */ +show create database mysql_TEST; +Database Create Database +mysql_TEST CREATE DATABASE `mysql_TEST` /*!40100 DEFAULT CHARACTER SET latin1 */ +show create table mysql_TEST.T1; +Table Create Table +T1 CREATE TABLE `T1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +show create table mysql_test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop database mysql_TEST; diff --git a/mysql-test/r/lowercase_table4.result b/mysql-test/r/lowercase_table4.result index f896b9008e3..02e2012a186 100644 --- a/mysql-test/r/lowercase_table4.result +++ b/mysql-test/r/lowercase_table4.result @@ -28,7 +28,7 @@ Create Table CREATE TABLE `Table2` ( KEY `fk1` (`c2`), CONSTRAINT `fk1` FOREIGN KEY (`c2`) REFERENCES `Table1` (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS; +SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='test'; CONSTRAINT_CATALOG def CONSTRAINT_SCHEMA test CONSTRAINT_NAME fk1 @@ -87,7 +87,7 @@ Create Table CREATE TABLE `Customer` ( `Id` int(11) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS; +SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='test'; CONSTRAINT_CATALOG def CONSTRAINT_SCHEMA test CONSTRAINT_NAME product_order_ibfk_1 diff --git a/mysql-test/r/lowercase_table5.result b/mysql-test/r/lowercase_table5.result new file mode 100644 index 00000000000..9adfd0590a8 --- /dev/null +++ b/mysql-test/r/lowercase_table5.result @@ -0,0 +1,13 @@ +CREATE DATABASE mysql_TEST CHARACTER SET utf8; +SHOW CREATE DATABASE mysql_TEST; +Database Create Database +mysql_TEST CREATE DATABASE `mysql_TEST` /*!40100 DEFAULT CHARACTER SET utf8 */ +CREATE DATABASE mysql_test CHARACTER SET latin2; +SHOW CREATE DATABASE mysql_test; +Database Create Database +mysql_test CREATE DATABASE `mysql_test` /*!40100 DEFAULT CHARACTER SET latin2 */ +SHOW CREATE DATABASE mysql_TEST; +Database Create Database +mysql_TEST CREATE DATABASE `mysql_TEST` /*!40100 DEFAULT CHARACTER SET utf8 */ +DROP DATABASE mysql_test; +DROP DATABASE mysql_TEST; diff --git a/mysql-test/r/lowercase_view.result b/mysql-test/r/lowercase_view.result index 33c87ec101c..f43c39c4fc1 100644 --- a/mysql-test/r/lowercase_view.result +++ b/mysql-test/r/lowercase_view.result @@ -20,13 +20,13 @@ ERROR HY000: The definition of table 'v1Aa' prevents operation UPDATE on table ' update v2Aa set col1 = (select max(col1) from t1Aa); ERROR HY000: The definition of table 'v2Aa' prevents operation UPDATE on table 'v2Aa'. update v2aA set col1 = (select max(col1) from v2Aa); -ERROR HY000: You can't specify target table 'v2aA' for update in FROM clause +ERROR HY000: Table 'v2aA' is specified twice, both as a target for 'UPDATE' and as a separate source for data update v2aA,t2Aa set v2Aa.col1 = (select max(col1) from v1aA) where v2aA.col1 = t2aA.col1; ERROR HY000: The definition of table 'v1aA' prevents operation UPDATE on table 'v2aA'. update t1aA,t2Aa set t1Aa.col1 = (select max(col1) from v1Aa) where t1aA.col1 = t2aA.col1; ERROR HY000: The definition of table 'v1Aa' prevents operation UPDATE on table 't1aA'. update v1aA,t2Aa set v1Aa.col1 = (select max(col1) from v1aA) where v1Aa.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 'v1aA' for update in FROM clause +ERROR HY000: Table 'v1aA' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t2Aa,v2Aa set v2aA.col1 = (select max(col1) from v1aA) where v2Aa.col1 = t2aA.col1; ERROR HY000: The definition of table 'v1aA' prevents operation UPDATE on table 't2Aa'. update t2Aa,t1Aa set t1aA.col1 = (select max(col1) from v1Aa) where t1Aa.col1 = t2aA.col1; @@ -36,17 +36,17 @@ ERROR HY000: The definition of table 'v1aA' prevents operation UPDATE on table ' update v2aA,t2Aa set v2Aa.col1 = (select max(col1) from t1aA) where v2aA.col1 = t2aA.col1; ERROR HY000: The definition of table 'v2aA' prevents operation UPDATE on table 'v2aA'. update t1Aa,t2Aa set t1aA.col1 = (select max(col1) from t1Aa) where t1aA.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 't1Aa' for update in FROM clause +ERROR HY000: Table 't1Aa' is specified twice, both as a target for 'UPDATE' and as a separate source for data update v1aA,t2Aa set v1Aa.col1 = (select max(col1) from t1Aa) where v1aA.col1 = t2aA.col1; ERROR HY000: The definition of table 'v1aA' prevents operation UPDATE on table 'v1aA'. update t2Aa,v2Aa set v2aA.col1 = (select max(col1) from t1aA) where v2Aa.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 't2Aa' for update in FROM clause +ERROR HY000: Table 't2Aa' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t2Aa,t1Aa set t1aA.col1 = (select max(col1) from t1Aa) where t1aA.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 't2Aa' for update in FROM clause +ERROR HY000: Table 't2Aa' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t2Aa,v1Aa set v1aA.col1 = (select max(col1) from t1Aa) where v1Aa.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 't2Aa' for update in FROM clause +ERROR HY000: Table 't2Aa' is specified twice, both as a target for 'UPDATE' and as a separate source for data update v2aA,t2Aa set v2Aa.col1 = (select max(col1) from v2aA) where v2Aa.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 'v2aA' for update in FROM clause +ERROR HY000: Table 'v2aA' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t1aA,t2Aa set t1Aa.col1 = (select max(col1) from v2aA) where t1aA.col1 = t2aA.col1; ERROR HY000: The definition of table 'v2aA' prevents operation UPDATE on table 't1aA'. update v1aA,t2Aa set v1Aa.col1 = (select max(col1) from v2Aa) where v1aA.col1 = t2aA.col1; @@ -64,27 +64,27 @@ ERROR HY000: The definition of table 'v3aA' prevents operation UPDATE on table ' update v3aA set v3Aa.col1 = (select max(col1) from v2aA); ERROR HY000: The definition of table 'v2aA' prevents operation UPDATE on table 'v3aA'. update v3aA set v3Aa.col1 = (select max(col1) from v3aA); -ERROR HY000: You can't specify target table 'v3aA' for update in FROM clause +ERROR HY000: Table 'v3aA' is specified twice, both as a target for 'UPDATE' and as a separate source for data delete from v2Aa where col1 = (select max(col1) from v1Aa); ERROR HY000: The definition of table 'v1Aa' prevents operation DELETE on table 'v2Aa'. delete from v2aA where col1 = (select max(col1) from t1Aa); ERROR HY000: The definition of table 'v2aA' prevents operation DELETE on table 'v2aA'. delete from v2Aa where col1 = (select max(col1) from v2aA); -ERROR HY000: You can't specify target table 'v2Aa' for update in FROM clause +ERROR HY000: Table 'v2Aa' is specified twice, both as a target for 'DELETE' and as a separate source for data delete v2Aa from v2aA,t2Aa where (select max(col1) from v1aA) > 0 and v2Aa.col1 = t2aA.col1; ERROR HY000: The definition of table 'v1aA' prevents operation DELETE on table 'v2aA'. delete t1aA from t1Aa,t2Aa where (select max(col1) from v1Aa) > 0 and t1aA.col1 = t2aA.col1; ERROR HY000: The definition of table 'v1Aa' prevents operation DELETE on table 't1Aa'. delete v1aA from v1Aa,t2Aa where (select max(col1) from v1aA) > 0 and v1Aa.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 'v1Aa' for update in FROM clause +ERROR HY000: Table 'v1Aa' is specified twice, both as a target for 'DELETE' and as a separate source for data delete v2aA from v2Aa,t2Aa where (select max(col1) from t1Aa) > 0 and v2aA.col1 = t2aA.col1; ERROR HY000: The definition of table 'v2Aa' prevents operation DELETE on table 'v2Aa'. delete t1aA from t1Aa,t2Aa where (select max(col1) from t1aA) > 0 and t1Aa.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 't1Aa' for update in FROM clause +ERROR HY000: Table 't1Aa' is specified twice, both as a target for 'DELETE' and as a separate source for data delete v1aA from v1Aa,t2Aa where (select max(col1) from t1aA) > 0 and v1aA.col1 = t2aA.col1; ERROR HY000: The definition of table 'v1Aa' prevents operation DELETE on table 'v1Aa'. delete v2Aa from v2aA,t2Aa where (select max(col1) from v2Aa) > 0 and v2aA.col1 = t2aA.col1; -ERROR HY000: You can't specify target table 'v2aA' for update in FROM clause +ERROR HY000: Table 'v2aA' is specified twice, both as a target for 'DELETE' and as a separate source for data delete t1Aa from t1aA,t2Aa where (select max(col1) from v2Aa) > 0 and t1Aa.col1 = t2aA.col1; ERROR HY000: The definition of table 'v2Aa' prevents operation DELETE on table 't1aA'. delete v1Aa from v1aA,t2Aa where (select max(col1) from v2aA) > 0 and v1Aa.col1 = t2aA.col1; @@ -98,15 +98,15 @@ ERROR HY000: The definition of table 'v1aA' prevents operation INSERT on table ' insert into v2Aa values ((select max(col1) from t1Aa)); ERROR HY000: The definition of table 'v2Aa' prevents operation INSERT on table 'v2Aa'. insert into t1aA values ((select max(col1) from t1Aa)); -ERROR HY000: You can't specify target table 't1aA' for update in FROM clause +ERROR HY000: Table 't1aA' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into v2aA values ((select max(col1) from t1aA)); ERROR HY000: The definition of table 'v2aA' prevents operation INSERT on table 'v2aA'. insert into v2Aa values ((select max(col1) from v2aA)); -ERROR HY000: You can't specify target table 'v2Aa' for update in FROM clause +ERROR HY000: Table 'v2Aa' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into t1Aa values ((select max(col1) from v2Aa)); ERROR HY000: The definition of table 'v2Aa' prevents operation INSERT on table 't1Aa'. insert into v2aA values ((select max(col1) from v2Aa)); -ERROR HY000: You can't specify target table 'v2aA' for update in FROM clause +ERROR HY000: Table 'v2aA' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into v3Aa (col1) values ((select max(col1) from v1Aa)); ERROR HY000: The definition of table 'v1Aa' prevents operation INSERT on table 'v3Aa'. insert into v3aA (col1) values ((select max(col1) from t1aA)); diff --git a/mysql-test/r/mdev-504.result b/mysql-test/r/mdev-504.result new file mode 100644 index 00000000000..4d93e77c6e8 --- /dev/null +++ b/mysql-test/r/mdev-504.result @@ -0,0 +1,23 @@ +SET GLOBAL net_write_timeout = 900; +CREATE TABLE A ( +pk INTEGER AUTO_INCREMENT PRIMARY KEY, +fdate DATE +) ENGINE=MyISAM; +CREATE PROCEDURE p_analyze() +BEGIN +DECLARE attempts INTEGER DEFAULT 100; +wl_loop: WHILE attempts > 0 DO +ANALYZE TABLE A; +SET attempts = attempts - 1; +END WHILE wl_loop; +END | +CREATE FUNCTION rnd3() RETURNS INT +BEGIN +RETURN ROUND(3 * RAND() + 0.5); +END | +SET GLOBAL use_stat_tables = PREFERABLY; +DROP TABLE A; +DROP PROCEDURE p_analyze; +DROP FUNCTION rnd3; +SET GLOBAL use_stat_tables = DEFAULT; +SET GLOBAL net_write_timeout = DEFAULT; diff --git a/mysql-test/r/mdev13607.result b/mysql-test/r/mdev13607.result new file mode 100644 index 00000000000..08848bc645b --- /dev/null +++ b/mysql-test/r/mdev13607.result @@ -0,0 +1,469 @@ +# +# Bug mdev-13607: overflow of current_record_count +# +CREATE TABLE t1 (id INT) ENGINE=InnoDB; +INSERT INTO t1 VALUES +(1),(2),(3),(4),(5),(6),(7),(8),(9),(10), +(11),(12),(13),(14),(15),(16),(17),(18),(19),(20), +(21),(22),(23),(24),(25),(26),(27),(28),(29),(30), +(31),(32),(33),(34),(35),(36),(37),(38),(39),(40), +(41),(42),(43),(44),(45),(46),(47),(48),(49),(50); +CREATE TABLE t2 (id INT) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2); +CREATE TABLE t3 (id INT) ENGINE=InnoDB; +INSERT INTO t3 VALUES (1),(2); +ANALYZE TABLE t1, t2, t3; +Table Op Msg_type Msg_text +test.t1 analyze status OK +test.t2 analyze status OK +test.t3 analyze status OK +explain SELECT * FROM +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_1 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_2 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_3 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_4 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_5 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_6 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_7 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_8 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_9 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_10 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_11 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_12 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_13 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_14 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_15 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_16 +; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY r1 ALL NULL NULL NULL NULL 2 +1 PRIMARY d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +1 PRIMARY r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY <derived3> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY <derived4> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY <derived5> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY <derived6> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY <derived7> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY <derived8> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY <derived9> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY <derived10> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY <derived11> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY <derived12> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY <derived13> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY <derived14> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY <derived15> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY <derived16> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY <derived17> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +17 DERIVED r1 ALL NULL NULL NULL NULL 2 +17 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +17 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r1 ALL NULL NULL NULL NULL 2 +16 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +16 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r1 ALL NULL NULL NULL NULL 2 +15 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +15 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r1 ALL NULL NULL NULL NULL 2 +14 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +14 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r1 ALL NULL NULL NULL NULL 2 +13 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +13 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r1 ALL NULL NULL NULL NULL 2 +12 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +12 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r1 ALL NULL NULL NULL NULL 2 +11 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +11 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r1 ALL NULL NULL NULL NULL 2 +10 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +10 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r1 ALL NULL NULL NULL NULL 2 +9 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +9 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r1 ALL NULL NULL NULL NULL 2 +8 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +8 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r1 ALL NULL NULL NULL NULL 2 +7 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +7 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r1 ALL NULL NULL NULL NULL 2 +6 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +6 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r1 ALL NULL NULL NULL NULL 2 +5 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +5 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r1 ALL NULL NULL NULL NULL 2 +4 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +4 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r1 ALL NULL NULL NULL NULL 2 +3 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +3 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +DROP TABLE t1,t2,t3; diff --git a/mysql-test/r/mdl_sync.result b/mysql-test/r/mdl_sync.result index 4f929a5760f..206ad509e37 100644 --- a/mysql-test/r/mdl_sync.result +++ b/mysql-test/r/mdl_sync.result @@ -5,7 +5,7 @@ create table t2 (i int); connection: default lock tables t2 read; connection: con1 -set debug_sync='mdl_upgrade_shared_lock_to_exclusive SIGNAL parked WAIT_FOR go'; +set debug_sync='mdl_upgrade_lock SIGNAL parked WAIT_FOR go'; alter table t1 rename t3; connection: default set debug_sync= 'now WAIT_FOR parked'; @@ -16,7 +16,7 @@ connection: con1 connection: default unlock tables; connection: con2 -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' drop table t3; SET DEBUG_SYNC= 'RESET'; # @@ -48,8 +48,13 @@ select count(*) from t1; count(*) 0 insert into t1 values (1), (1); +# Check that SU lock is compatible with it. To do this use ALTER TABLE +# which will fail when constructing .frm and thus obtaining SU metadata +# lock. +alter table t1 add index (not_exist); +ERROR 42000: Key column 'not_exist' doesn't exist in table # Check that SNW lock is compatible with it. To do this use ALTER TABLE -# which will fail after opening the table and thus obtaining SNW metadata +# which will fail during copying the table and thus obtaining SNW metadata # lock. alter table t1 add primary key (c1); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' @@ -139,8 +144,13 @@ select count(*) from t1; count(*) 3 insert into t1 values (1); +# Check that SU lock is compatible with it. To do this use ALTER TABLE +# which will fail when constructing .frm and thus obtaining SU metadata +# lock. +alter table t1 add index (not_exist); +ERROR 42000: Key column 'not_exist' doesn't exist in table # Check that SNW lock is compatible with it. To do this use ALTER TABLE -# which will fail after opening the table and thus obtaining SNW metadata +# which will fail during copying the table and thus obtaining SNW metadata # lock. alter table t1 add primary key (c1); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' @@ -244,8 +254,13 @@ select count(*) from t1; count(*) 3 insert into t1 values (1); +# Check that SU lock is compatible with it. To do this use ALTER TABLE +# which will fail when constructing .frm and thus obtaining SU metadata +# lock. +alter table t1 add index (not_exist); +ERROR 42000: Key column 'not_exist' doesn't exist in table # Check that SNW lock is compatible with it. To do this use ALTER TABLE -# which will fail after opening the table and thus obtaining SNW metadata +# which will fail during copying the table and thus obtaining SNW metadata # lock. alter table t1 add primary key (c1); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' @@ -334,8 +349,13 @@ c1 # effects of concurrent insert. select * from t1; insert into t1 values (1); +# Check that SU lock is compatible with it. To do this use ALTER TABLE +# which will fail when constructing .frm and thus obtaining SU metadata +# lock. +alter table t1 add index (not_exist); +ERROR 42000: Key column 'not_exist' doesn't exist in table # Check that SNW lock is not compatible with SW lock. -# Again we use ALTER TABLE which fails after opening +# Again we use ALTER TABLE which fails during copying # the table to avoid upgrade of SNW -> X. # Sending: alter table t1 add primary key (c1);; @@ -397,15 +417,111 @@ rename table t2 to t1; # Switching to connection 'default'. # # -# 5) Acquire SNW lock on the table. We have to use DEBUG_SYNC for -# this, to prevent SNW from being immediately upgraded to X. +# 5) Acquire SU lock on the table. We have to use DEBUG_SYNC for +# this, to prevent SU from being immediately upgraded to X. # -set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish'; +set debug_sync= 'alter_opened_table SIGNAL locked WAIT_FOR finish'; +# Sending: +alter table t1 add primary key (c1);; +# +# Switching to connection 'mdl_con1'. +set debug_sync= 'now WAIT_FOR locked'; +# Check that S, SH, SR and SW locks are compatible with it. +handler t1 open; +handler t1 close; +select column_name from information_schema.columns where +table_schema='test' and table_name='t1'; +column_name +c1 +select count(*) from t1; +count(*) +5 +delete from t1 limit 1; +# Check that SU lock is incompatible with SU lock. +# Sending: +alter table t1 add primary key (c1);; +# +# Switching to connection 'mdl_con2'. +# Check that the above ALTER is blocked because of SU lock. +# Unblock ALTERs. +set debug_sync= 'now SIGNAL finish'; +# +# Switching to connection 'default'. +# Reaping first ALTER TABLE. +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +# +# Switching to connection 'mdl_con1'. +# Reaping another ALTER TABLE. +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +# +# Switching to connection 'default'. +set debug_sync= 'alter_opened_table SIGNAL locked WAIT_FOR finish'; +# Sending: +alter table t1 add primary key (c1);; +# +# Switching to connection 'mdl_con1'. +set debug_sync= 'now WAIT_FOR locked'; +# Check that SNRW lock is incompatible with SU lock. +# Sending: +lock table t1 write;; +# +# Switching to connection 'mdl_con2'. +# Check that the above LOCK TABLES is blocked because of SU lock. +# Unblock ALTER and thus LOCK TABLES. +set debug_sync= 'now SIGNAL finish'; +# +# Switching to connection 'default'. +# Reaping ALTER TABLE. +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +# +# Switching to connection 'mdl_con1'. +# Reaping LOCK TABLES +insert into t1 values (1); +unlock tables; +# +# Switching to connection 'default'. +set debug_sync= 'alter_opened_table SIGNAL locked WAIT_FOR finish'; # Sending: alter table t1 add primary key (c1);; # # Switching to connection 'mdl_con1'. set debug_sync= 'now WAIT_FOR locked'; +# Check that X lock is incompatible with SU lock. +# Sending: +rename table t1 to t2;; +# +# Switching to connection 'mdl_con2'. +# Check that the above RENAME is blocked because of SU lock. +# Unblock ALTER and thus RENAME TABLE. +set debug_sync= 'now SIGNAL finish'; +# +# Switching to connection 'default'. +# Now we have ALTER TABLE with SU->SNW and RENAME TABLE with pending +# X-lock. In this case ALTER TABLE should be chosen as victim. +# Reaping ALTER TABLE. +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +# +# Switching to connection 'mdl_con1'. +# Reaping RENAME TABLE +# Revert back to original state of things. +rename table t2 to t1; +# +# There is no need to check that upgrade from SNW/SNRW to X is +# blocked by presence of another SU lock because SNW/SNRW is +# incompatible with SU anyway. +# +# Switching to connection 'default'. +# +# +# 6) Acquire SNW lock on the table. We have to use DEBUG_SYNC for +# this, to prevent SNW from being immediately upgraded to X. +# +set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish'; +# Sending: +alter table t1 add primary key (c1), lock=shared, algorithm=copy;; +# +# Switching to connection 'mdl_con1'. +set debug_sync= 'now WAIT_FOR locked'; # Check that S, SH and SR locks are compatible with it. handler t1 open; handler t1 close; @@ -433,13 +549,13 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # Reaping DELETE. # # Switching to connection 'default'. -set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish'; +set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish'; # Sending: -alter table t1 add primary key (c1);; +alter table t1 add primary key (c1), lock=shared, algorithm=copy;; # # Switching to connection 'mdl_con1'. set debug_sync= 'now WAIT_FOR locked'; -# Check that SNW lock is incompatible with SNW lock. +# Check that SU lock is incompatible with SNW lock. # Sending: alter table t1 add primary key (c1);; # @@ -456,10 +572,14 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # Reaping another ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # +# Note that we can't easily check SNW vs SNW locks since +# SNW is only used by ALTER TABLE after upgrading from SU +# and SU is also incompatible with SNW. +# # Switching to connection 'default'. -set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish'; +set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish'; # Sending: -alter table t1 add primary key (c1);; +alter table t1 add primary key (c1), lock=shared, algorithm=copy;; # # Switching to connection 'mdl_con1'. set debug_sync= 'now WAIT_FOR locked'; @@ -482,9 +602,9 @@ insert into t1 values (1); unlock tables; # # Switching to connection 'default'. -set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish'; +set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish'; # Sending: -alter table t1 add primary key (c1);; +alter table t1 add primary key (c1), algorithm=copy, lock=shared;; # # Switching to connection 'mdl_con1'. set debug_sync= 'now WAIT_FOR locked'; @@ -513,7 +633,7 @@ rename table t2 to t1; # Switching to connection 'default'. # # -# 6) Acquire SNRW lock on the table. +# 7) Acquire SNRW lock on the table. # # lock table t1 write; @@ -560,12 +680,12 @@ unlock tables; lock table t1 write; # # Switching to connection 'mdl_con1'. -# Check that SNW lock is incompatible with SNRW lock. +# Check that SU lock is incompatible with SNRW lock. # Sending: alter table t1 add primary key (c1);; # # Switching to connection 'default'. -# Check that the above ALTER is blocked because of UNWR lock. +# Check that the above ALTER is blocked because of SNRW lock. # Unblock ALTER. unlock tables; # @@ -573,6 +693,10 @@ unlock tables; # Reaping ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # +# Note that we can't easily check SNW vs SNRW locks since +# SNW is only used by ALTER TABLE after upgrading from SU +# and SU is also incompatible with SNRW. +# # Switching to connection 'default'. lock table t1 write; # @@ -616,7 +740,7 @@ rename table t2 to t1; # Switching to connection 'default'. # # -# 7) Now do the same round of tests for X lock. We use additional +# 8) Now do the same round of tests for X lock. We use additional # table to get long-lived lock of this type. # create table t2 (c1 int); @@ -744,7 +868,7 @@ rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME has acquired X lock on t1 and is waiting for t2. -# Check that SNW lock is incompatible with X lock. +# Check that SU lock is incompatible with X lock. # Sending: alter table t1 add primary key (c1);; # @@ -761,7 +885,11 @@ ERROR 42S01: Table 't2' already exists # Switching to connection 'mdl_con1'. # Reaping ALTER. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -# +# +# Note that we can't easily check SNW vs X locks since +# SNW is only used by ALTER TABLE after upgrading from SU +# and SU is also incompatible with X. +# # Switching to connection 'mdl_con2'. # Prepare for blocking RENAME TABLE. lock tables t2 read; @@ -822,6 +950,9 @@ rename table t3 to t1; # are pending. I.e. let us test rules for priorities between # different types of metadata locks. # +# Note: No tests for pending SU lock as this lock requires +# even stronger active or pending lock. +# # # Switching to connection 'mdl_con2'. # @@ -1138,6 +1269,9 @@ unlock tables; # transactional context. Obviously we are mostly interested # in conflicting types of locks. # +# Note: No tests for active/pending SU lock since +# ALTER TABLE is in its own transaction. +# # # 1) Let us check how various locks used within transactional # context interact with active/pending SNW lock. @@ -1154,9 +1288,9 @@ count(*) # We have to use DEBUG_SYNC facility as otherwise SNW lock # will be immediately released (or upgraded to X lock). insert into t2 values (1), (1); -set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish'; +set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish'; # Sending: -alter table t2 add primary key (c1);; +alter table t2 add primary key (c1), algorithm=copy, lock=shared;; # # Switching to connection 'default'. set debug_sync= 'now WAIT_FOR locked'; @@ -1199,9 +1333,9 @@ count(*) # # Switching to connection 'mdl_con1'. # Create an active SNW lock on t1. -set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish'; +set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish'; # Sending: -alter table t1 add primary key (c1);; +alter table t1 add primary key (c1), algorithm=copy, lock=shared;; # # Switching to connection 'default'. set debug_sync= 'now WAIT_FOR locked'; @@ -1972,7 +2106,7 @@ drop tables t1, t2; # create table t1 (i int); # Ensure that ALTER waits once it has acquired SNW lock. -set debug_sync='after_open_table_mdl_shared SIGNAL parked1 WAIT_FOR go1'; +set debug_sync='alter_table_copy_after_lock_upgrade SIGNAL parked1 WAIT_FOR go1'; # Sending: alter table t1 add column j int; # @@ -2279,13 +2413,18 @@ set global log_output=@save_log_output; # drop tables if exists t1, t2; create table t1 (i int); +insert into t1 values(1); # Let us check that we won't deadlock if during filling # of I_S table we encounter conflicting metadata lock # which owner is in its turn waiting for our connection. lock tables t1 read; +# Switching to connection 'con46044_2'. +# Sending: +update t1 set i = 2; # Switching to connection 'con46044'. +# Waiting until UPDATE t1 SET ... is blocked. # Sending: -create table t2 select * from t1 for update;; +create table t2 select * from t1;; # Switching to connection 'default'. # Waiting until CREATE TABLE ... SELECT ... is blocked. # First let us check that SHOW FIELDS/DESCRIBE doesn't @@ -2315,6 +2454,7 @@ unlock tables; # Switching to connection 'con46044'. # Reaping CREATE TABLE ... SELECT ... . drop table t2; +# Reaping UPDATE t1 statement # # Let us also check that queries to I_S wait for conflicting metadata # locks to go away instead of skipping table with a warning in cases @@ -2324,9 +2464,13 @@ drop table t2; # We check same three queries to I_S in this new situation. # Switching to connection 'con46044_2'. lock tables t1 read; +# Switching to connection 'con46044_3'. +# Sending: +update t1 set i = 3; # Switching to connection 'con46044'. +# Waiting until UPDATE t1 SET ... is blocked. # Sending: -create table t2 select * from t1 for update;; +create table t2 select * from t1;; # Switching to connection 'default'. # Waiting until CREATE TABLE ... SELECT ... is blocked. # Let us check that SHOW FIELDS/DESCRIBE gets blocked. @@ -2342,11 +2486,16 @@ unlock tables; Field Type Null Key Default Extra i int(11) YES NULL drop table t2; +# Reaping UPDATE t1 statement # Switching to connection 'con46044_2'. lock tables t1 read; +# Switching to connection 'con46044_3'. +# Sending: +update t1 set i = 4; # Switching to connection 'con46044'. +# Waiting until UPDATE t1 SET ... is blocked. # Sending: -create table t2 select * from t1 for update;; +create table t2 select * from t1;; # Switching to connection 'default'. # Waiting until CREATE TABLE ... SELECT ... is blocked. # Check that I_S query which reads only .FRMs gets blocked. @@ -2362,11 +2511,16 @@ unlock tables; column_name i drop table t2; +# Reaping UPDATE t1 statement # Switching to connection 'con46044_2'. lock tables t1 read; +# Switching to connection 'con46044_3'. +# Sending: +update t1 set i = 5; # Switching to connection 'con46044'. +# Waiting until UPDATE t1 SET ... is blocked. # Sending: -create table t2 select * from t1 for update;; +create table t2 select * from t1;; # Switching to connection 'default'. # Waiting until CREATE TABLE ... SELECT ... is blocked. # Finally, check that I_S query which does full-blown table open @@ -2383,6 +2537,7 @@ unlock tables; table_name table_type auto_increment table_comment t2 BASE TABLE NULL drop table t2; +# Reaping UPDATE t1 statement # Switching to connection 'default'. # Clean-up. drop table t1; @@ -2400,7 +2555,7 @@ c1 c2 c3 3 3 0 # # Switching to connection 'con46273'. -set debug_sync='after_lock_tables_takes_lock SIGNAL alter_table_locked WAIT_FOR alter_go'; +set debug_sync='alter_table_copy_after_lock_upgrade SIGNAL alter_table_locked WAIT_FOR alter_go'; alter table t1 add column e int, rename to t2;; # # Switching to connection 'default'. @@ -2538,9 +2693,9 @@ drop table if exists t1; set debug_sync= 'RESET'; create table t1 (i int) engine=InnoDB; # Switching to connection 'con50913_1'. -set debug_sync= 'thr_multi_lock_after_thr_lock SIGNAL parked WAIT_FOR go'; +set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL parked WAIT_FOR go'; # Sending: -alter table t1 add column j int; +alter table t1 add column j int, ALGORITHM=COPY; # Switching to connection 'default'. # Wait until ALTER TABLE gets blocked on a sync point after # acquiring thr_lock.c lock. @@ -2580,7 +2735,7 @@ i # Switching to connection 'default'. # Start ALTER TABLE which will acquire SNW lock and # table lock and get blocked on sync point. -set debug_sync= 'thr_multi_lock_after_thr_lock SIGNAL parked WAIT_FOR go'; +set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL parked WAIT_FOR go'; # Sending: alter table t1 add column j int; # Switching to connection 'con1'. @@ -2830,7 +2985,7 @@ SET DEBUG_SYNC= 'now SIGNAL blocked'; # Reaping: DROP DATABASE db1 # Connection con2 # Reaping: RENAME TABLE db1.t1 TO test.t1 -Got one of the listed errors +ERROR 42S02: Table 'db1.t1' doesn't exist # Connection default CREATE DATABASE db1; CREATE TABLE test.t2 (a INT); @@ -2869,7 +3024,7 @@ SET DEBUG_SYNC= 'now SIGNAL blocked'; # Reaping: DROP DATABASE db1 # Connection con2 # Reaping: DROP TABLE db1.t1 -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'db1.t1' # Connection default SET DEBUG_SYNC= 'RESET'; # @@ -2914,12 +3069,16 @@ CREATE TABLE m1(a INT) engine=MERGE UNION=(t1, t2); INSERT INTO t1 VALUES (1), (2); INSERT INTO t2 VALUES (3), (4); # Connection con1 -SET DEBUG_SYNC= 'mdl_upgrade_shared_lock_to_exclusive SIGNAL upgrade WAIT_FOR continue'; +# We need EXECUTE 2 since ALTER TABLE does SU => SNW => X and we want +# to stop at the second upgrade. +SET DEBUG_SYNC= 'mdl_upgrade_lock SIGNAL upgrade WAIT_FOR continue EXECUTE 2'; # Sending: ALTER TABLE m1 engine=MERGE UNION=(t2, t1); # Connection con2 # Waiting for ALTER TABLE to try lock upgrade SET DEBUG_SYNC= 'now WAIT_FOR upgrade'; +SET DEBUG_SYNC= 'now SIGNAL continue'; +SET DEBUG_SYNC= 'now WAIT_FOR upgrade'; # Sending: DELETE FROM t2 WHERE a = 3; # Connection default @@ -2927,18 +3086,17 @@ DELETE FROM t2 WHERE a = 3; # Now that DELETE blocks on a metadata lock, we should be able to do # SELECT * FROM m1 here. SELECT used to be blocked by a DELETE table # lock request. -SELECT * FROM m1; -a -1 -2 -3 -4 +SELECT * FROM m1 WHERE a < 3; # Resuming ALTER TABLE SET DEBUG_SYNC= 'now SIGNAL continue'; # Connection con1 # Reaping: ALTER TABLE m1 engine=MERGE UNION=(t2, t1) # Connection con2 # Reaping: DELETE FROM t2 WHERE a = 3 +# Reaping: SELECT * FROM m1 WHERE a < 3 +a +1 +2 # Connection default DROP TABLE m1, t1, t2; SET DEBUG_SYNC= 'RESET'; diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 66ba6cea70e..31edbc0fdce 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -2257,7 +2257,7 @@ CREATE TABLE m1(a int)engine=merge union=(t1,t2,t3,t4,t5,t6,t7); SELECT 1 FROM m1; 1 HANDLER m1 OPEN; -ERROR HY000: Table storage engine for 'm1' doesn't have this option +ERROR HY000: Storage engine MRG_MyISAM of the table `test`.`m1` doesn't have this option DROP TABLE m1,t1,t2,t3,t4,t5,t6,t7; SELECT 1 FROM m1; ERROR 42S02: Table 'test.m1' doesn't exist @@ -3559,7 +3559,7 @@ CREATE TABLE t2 (c1 int); CREATE TABLE t3 (c1 int) ENGINE = MERGE UNION (t1,t2); START TRANSACTION; HANDLER t3 OPEN; -ERROR HY000: Table storage engine for 't3' doesn't have this option +ERROR HY000: Storage engine MRG_MyISAM of the table `test`.`t3` doesn't have this option DROP TABLE t1, t2, t3; # Connection default. # Disconnecting con1, all mdl_tickets must have been released. @@ -3657,85 +3657,85 @@ insert into tmp (b) values (1); insert into t1 (a) values (1); insert into t3 (b) values (1); insert into m1 (a) values ((select max(a) from m1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from m2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from t1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from t2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from t3, m1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from t3, m2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from t3, t1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from t3, t2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from tmp, m1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from tmp, m2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from tmp, t1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from tmp, t2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into m1 (a) values ((select max(a) from v1)); ERROR HY000: The definition of table 'v1' prevents operation INSERT on table 'm1'. insert into m1 (a) values ((select max(a) from tmp, v1)); ERROR HY000: The definition of table 'v1' prevents operation INSERT on table 'm1'. update m1 set a = ((select max(a) from m1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from m2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from t1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from t2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from t3, m1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from t3, m2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from t3, t1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from t3, t2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from tmp, m1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from tmp, m2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from tmp, t1)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from tmp, t2)); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update m1 set a = ((select max(a) from v1)); ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 'm1'. update m1 set a = ((select max(a) from tmp, v1)); ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 'm1'. delete from m1 where a = (select max(a) from m1); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from m2); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from t1); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from t2); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from t3, m1); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from t3, m2); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from t3, t1); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from t3, t2); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from tmp, m1); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from tmp, m2); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from tmp, t1); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from tmp, t2); -ERROR HY000: You can't specify target table 'm1' for update in FROM clause +ERROR HY000: Table 'm1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from m1 where a = (select max(a) from v1); ERROR HY000: The definition of table 'v1' prevents operation DELETE on table 'm1'. delete from m1 where a = (select max(a) from tmp, v1); @@ -3850,3 +3850,92 @@ test.t1 analyze status Table is already up to date DEALLOCATE PREPARE stmt; DROP TABLE t1, tmerge; End of 5.5 tests +# +# Additional coverage for refactoring which is made as part +# of fix for bug #27480 "Extend CREATE TEMPORARY TABLES privilege +# to allow temp table operations". +# +# Check that prelocking works correctly for various variants of +# merge tables. +drop table if exists t1, t2, m1; +drop function if exists f1; +create table t1 (j int); +insert into t1 values (1); +create function f1() returns int return (select count(*) from m1); +create temporary table t2 (a int) engine=myisam; +insert into t2 values (1); +create temporary table m1 (a int) engine=merge union=(t2); +select f1() from t1; +f1() +1 +drop tables t2, m1; +create table t2 (a int) engine=myisam; +insert into t2 values (1); +create table m1 (a int) engine=merge union=(t2); +select f1() from t1; +f1() +1 +drop table m1; +create temporary table m1 (a int) engine=merge union=(t2); +select f1() from t1; +f1() +1 +drop tables t1, t2, m1; +drop function f1; +# +# Check that REPAIR/CHECK and CHECKSUM statements work correctly +# for various variants of merge tables. +create table t1 (a int) engine=myisam; +insert into t1 values (1); +create table m1 (a int) engine=merge union=(t1); +check table m1; +Table Op Msg_type Msg_text +test.m1 check status OK +repair table m1; +Table Op Msg_type Msg_text +test.m1 repair note The storage engine for the table doesn't support repair +checksum table m1; +Table Checksum +test.m1 3459908756 +drop tables t1, m1; +create temporary table t1 (a int) engine=myisam; +insert into t1 values (1); +create temporary table m1 (a int) engine=merge union=(t1); +check table m1; +Table Op Msg_type Msg_text +test.m1 check status OK +repair table m1; +Table Op Msg_type Msg_text +test.m1 repair note The storage engine for the table doesn't support repair +checksum table m1; +Table Checksum +test.m1 3459908756 +drop tables t1, m1; +create table t1 (a int) engine=myisam; +insert into t1 values (1); +create temporary table m1 (a int) engine=merge union=(t1); +check table m1; +Table Op Msg_type Msg_text +test.m1 check status OK +repair table m1; +Table Op Msg_type Msg_text +test.m1 repair note The storage engine for the table doesn't support repair +checksum table m1; +Table Checksum +test.m1 3459908756 +drop tables t1, m1; +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS m1; +DROP TRIGGER IF EXISTS trg1; +DROP TABLE IF EXISTS q1; +DROP TABLE IF EXISTS q2; +CREATE TABLE t1(a INT); +CREATE TABLE m1(a INT) ENGINE = MERGE UNION (q1, q2); +CREATE TRIGGER trg1 BEFORE DELETE ON t1 +FOR EACH ROW +INSERT INTO m1 VALUES (1); +DELETE FROM t1; +ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist +DROP TRIGGER trg1; +DROP TABLE t1; +DROP TABLE m1; diff --git a/mysql-test/r/mix2_myisam.result b/mysql-test/r/mix2_myisam.result index 6f90555325b..8aacbf060bd 100644 --- a/mysql-test/r/mix2_myisam.result +++ b/mysql-test/r/mix2_myisam.result @@ -256,6 +256,8 @@ user_id name phone ref_email detail drop table t1; CREATE TABLE t1 (a int not null, b int not null,c int not null, key(a),primary key(a,b), unique(c),key(a),unique(b)) ENGINE = MyISAM; +Warnings: +Note 1831 Duplicate index `a_2`. This is deprecated and will be disallowed in a future release. show index from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment t1 0 PRIMARY 1 a A # NULL NULL BTREE @@ -1547,6 +1549,8 @@ id select_type table type possible_keys key key_len ref rows Extra alter table t1 add unique(v); ERROR 23000: Duplicate entry '{ ' for key 'v_2' alter table t1 add key(v); +Warnings: +Note 1831 Duplicate index `v_2`. This is deprecated and will be disallowed in a future release. select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a'; qq *a*a*a* diff --git a/mysql-test/r/mrr_icp_extra.result b/mysql-test/r/mrr_icp_extra.result index f7adcfb19fd..eaabd3d8119 100644 --- a/mysql-test/r/mrr_icp_extra.result +++ b/mysql-test/r/mrr_icp_extra.result @@ -350,6 +350,8 @@ id select_type table type possible_keys key key_len ref rows Extra alter table t1 add unique(v); ERROR 23000: Duplicate entry '{ ' for key 'v_2' alter table t1 add key(v); +Warnings: +Note 1831 Duplicate index `v_2`. This is deprecated and will be disallowed in a future release. select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a'; qq *a*a*a* diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 09df98c741e..3b75cef2cf0 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -439,9 +439,9 @@ drop table t1, t2, t3; create table t1 (col1 int); create table t2 (col1 int); update t1,t2 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1; -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2.col1; -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data drop table t1,t2; create table t1 ( aclid bigint not null primary key, @@ -457,7 +457,7 @@ drop table t1, t2; create table t1(a int); create table t2(a int); delete from t1,t2 using t1,t2 where t1.a=(select a from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data drop table t1, t2; create table t1 ( c char(8) not null ) engine=innodb; insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'); @@ -603,11 +603,11 @@ select * from t2 /* must be (3,1), (4,4) */; a b 3 1 4 4 -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT delete from t1; delete from t2; @@ -616,11 +616,11 @@ insert into t2 values (1,2),(3,4),(4,4); reset master; UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a; ERROR 23000: Duplicate entry '4' for key 'PRIMARY' -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT drop table t1, t2; set @@session.binlog_format= @sav_binlog_format; @@ -695,7 +695,7 @@ DROP TABLE t1; # DROP TABLE IF EXISTS t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE t1 ( id int(10) unsigned NOT NULL, level tinyint(3) unsigned NOT NULL, @@ -704,7 +704,7 @@ PRIMARY KEY (id) INSERT INTO t1 VALUES (2519583,1); DROP TABLE IF EXISTS t2; Warnings: -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t2' CREATE TABLE t2 ( club_id int(11) NOT NULL DEFAULT '0', profile_id int(11) NOT NULL DEFAULT '0', @@ -714,7 +714,7 @@ PRIMARY KEY (profile_id,club_id) INSERT INTO t2 VALUES (2,2519583,12); DROP TABLE IF EXISTS t3; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' CREATE TABLE t3 ( member_level_id int(11) unsigned NOT NULL DEFAULT '0', map_level int(11) unsigned NOT NULL DEFAULT '0', @@ -1018,3 +1018,57 @@ deallocate prepare stmt1; drop view v3,v2,v1; drop table t1,t2,t3; end of 5.5 tests + +# Bug mdev-5970 +# Bug#13256831 - ERROR 1032 (HY000): CAN'T FIND RECORD + +CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT) ENGINE=InnoDB; +CREATE TABLE t2 (f1 INT PRIMARY KEY, f2 INT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (5, 7); +INSERT INTO t2 VALUES (6, 97); +CREATE ALGORITHM = MERGE VIEW v1 AS +SELECT a2.f1 AS f1, a2.f2 AS f2 +FROM t1 AS a1 JOIN t2 AS a2 ON a1.f2 > a2.f1 +WITH LOCAL CHECK OPTION; +SELECT * FROM v1; +f1 f2 +6 97 +UPDATE v1 SET f1 = 1; +SELECT * FROM v1; +f1 f2 +1 97 +DROP TABLE t1, t2; +DROP VIEW v1; +# +# MDEV-5973: MySQL Bug#11757486:49539: NON-DESCRIPTIVE ERR (ERROR 0 +# FROM STORAGE ENGINE) WITH MULTI-TABLE UPDATE +# +CREATE TABLE table_11757486 (field1 tinyint) ENGINE=INNODB; +INSERT INTO table_11757486 VALUES (0),(0); +SET SESSION SQL_MODE='STRICT_ALL_TABLES'; +UPDATE IGNORE (SELECT 128 as col1) x, table_11757486 SET field1=x.col1; +Warnings: +Warning 1264 Out of range value for column 'field1' at row 1 +Warning 1264 Out of range value for column 'field1' at row 2 +UPDATE IGNORE table_11757486 SET field1=128; +Warnings: +Warning 1264 Out of range value for column 'field1' at row 1 +Warning 1264 Out of range value for column 'field1' at row 2 +Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. UPDATE IGNORE is unsafe because the order in which rows are updated determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave. +UPDATE (SELECT 128 as col1) x, table_11757486 SET field1=x.col1; +ERROR 22003: Out of range value for column 'field1' at row 1 +UPDATE table_11757486 SET field1=128; +ERROR 22003: Out of range value for column 'field1' at row 1 +SET SESSION SQL_MODE=''; +UPDATE IGNORE (SELECT 128 as col1) x, table_11757486 SET field1=x.col1; +Warnings: +Warning 1264 Out of range value for column 'field1' at row 1 +Warning 1264 Out of range value for column 'field1' at row 2 +UPDATE IGNORE table_11757486 SET field1=128; +Warnings: +Warning 1264 Out of range value for column 'field1' at row 1 +Warning 1264 Out of range value for column 'field1' at row 2 +Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. UPDATE IGNORE is unsafe because the order in which rows are updated determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave. +DROP TABLE table_11757486; +SET SESSION SQL_MODE=default; +end of 10.0 tests diff --git a/mysql-test/r/myisam-metadata.result b/mysql-test/r/myisam-metadata.result deleted file mode 100644 index 4cec3c3e12f..00000000000 --- a/mysql-test/r/myisam-metadata.result +++ /dev/null @@ -1,15 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -id INT PRIMARY KEY, -a VARCHAR(100), -INDEX(a) -) ENGINE=MyISAM; -ALTER TABLE t1 DISABLE KEYS; -SET debug_sync= 'myisam_after_repair_by_sort WAIT_FOR go'; -ALTER TABLE t1 ENABLE KEYS; -SET debug_sync= 'now SIGNAL go'; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MyISAM 10 Dynamic 100000 27 # # # 0 NULL # # # latin1_swedish_ci NULL -DROP TABLE t1; -set debug_sync='reset'; diff --git a/mysql-test/r/myisam-system.result b/mysql-test/r/myisam-system.result index b3ba8066f5c..af5de8f2749 100644 --- a/mysql-test/r/myisam-system.result +++ b/mysql-test/r/myisam-system.result @@ -2,12 +2,18 @@ drop table if exists t1,t2; create table t1 (a int) engine=myisam; drop table if exists t1; Warnings: -Warning 2 Can't find file: 't1' (errno: 2) +Warning 2 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory") create table t1 (a int) engine=myisam; +select * from t1; +ERROR HY000: Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory") drop table t1; -Got one of the listed errors +Warnings: +Warning 2 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory") create table t1 (a int) engine=myisam; +select * from t1; +ERROR HY000: File './test/t1.MYD' not found (Errcode: 2 "No such file or directory") drop table t1; -Got one of the listed errors +Warnings: +Warning 2 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory") drop table t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 81a2001c28c..6b23aefd73b 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -454,7 +454,7 @@ a b c drop table t1; DROP TABLE IF EXISTS t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE t1 (a varchar(150) NOT NULL, KEY (a)); INSERT t1 VALUES ("can \tcan"); INSERT t1 VALUES ("can can"); @@ -618,7 +618,7 @@ t1 1 a 1 a A 1000 NULL NULL YES BTREE alter table t1 engine=heap; alter table t1 disable keys; Warnings: -Note 1031 Table storage engine for 't1' doesn't have this option +Note 1031 Storage engine MEMORY of the table `test`.`t1` doesn't have this option show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment t1 1 a 1 a NULL 500 NULL NULL YES HASH @@ -1242,6 +1242,8 @@ id select_type table type possible_keys key key_len ref rows Extra alter table t1 add unique(v); ERROR 23000: Duplicate entry '{ ' for key 'v_2' alter table t1 add key(v); +Warnings: +Note 1831 Duplicate index `v_2`. This is deprecated and will be disallowed in a future release. select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a'; qq *a*a*a* @@ -2362,7 +2364,7 @@ Warnings: Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '4' REPAIR TABLE t1; Table Op Msg_type Msg_text -test.t1 repair error myisam_sort_buffer_size is too small +test.t1 repair error myisam_sort_buffer_size is too small. X test.t1 repair warning Number of rows changed from 0 to 7168 test.t1 repair status OK SET myisam_repair_threads=2; @@ -2431,7 +2433,7 @@ INSERT INTO t1 VALUES ('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'), ('0'),('0'),('0'),('0'),('0'),('0'),('0'); Warnings: -Error 1034 myisam_sort_buffer_size is too small +Error 1034 myisam_sort_buffer_size is too small. X Error 1034 Number of rows changed from 0 to 157 SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size; INSERT INTO t1 VALUES('1'); @@ -2446,6 +2448,9 @@ DROP TABLE t1; SET myisam_repair_threads=2; SET myisam_sort_buffer_size=4096; CREATE TABLE t1(a CHAR(255), KEY(a), KEY(a), KEY(a)); +Warnings: +Note 1831 Duplicate index `a_2`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `a_3`. This is deprecated and will be disallowed in a future release. INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9),(0),(1),(2),(3); REPAIR TABLE t1; Table Op Msg_type Msg_text diff --git a/mysql-test/r/myisam_debug.result b/mysql-test/r/myisam_debug.result index 36a8fe6c724..ca45ce1fc9f 100644 --- a/mysql-test/r/myisam_debug.result +++ b/mysql-test/r/myisam_debug.result @@ -27,3 +27,15 @@ CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1,t2; +call mtr.add_suppression('Incorrect key file for table'); +create table t1 (a int, index(a)); +lock tables t1 write; +insert t1 values (1),(2),(1); +set @old_dbug=@@debug_dbug; +set debug_dbug='+d,mi_lock_database_failure'; +unlock tables; +Warnings: +Error 126 Incorrect key file for table './test/t1.MYI'; try to repair it +Error 1030 Got error 22 "Invalid argument" from storage engine MyISAM +set debug_dbug=@old_dbug; +drop table t1; diff --git a/mysql-test/r/myisam_enable_keys-10506.result b/mysql-test/r/myisam_enable_keys-10506.result index 547f001fe34..e7ffba787f0 100644 --- a/mysql-test/r/myisam_enable_keys-10506.result +++ b/mysql-test/r/myisam_enable_keys-10506.result @@ -110,5 +110,5 @@ INSERT INTO t1 (i, d, dt, v) VALUES (NULL, '2008-09-11', '2004-06-07 23:17:09', 'k'); ALTER TABLE t1 ADD UNIQUE KEY ind1 (pk, d, i, v); ALTER TABLE t1 ADD UNIQUE KEY ind2 (d, v); -ERROR 23000: Duplicate entry '1900-01-01-m' for key 'ind2' +ERROR 23000: Duplicate entry '2008-09-11-k' for key 'ind2' DROP TABLE t1; diff --git a/mysql-test/r/myisam_explain_non_select_all.result b/mysql-test/r/myisam_explain_non_select_all.result new file mode 100644 index 00000000000..3dfa56c38d6 --- /dev/null +++ b/mysql-test/r/myisam_explain_non_select_all.result @@ -0,0 +1,2932 @@ +set @save_storage_engine= @@session.default_storage_engine; +set session default_storage_engine = MyISAM; +#1 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +# +# query: UPDATE t1 SET a = 10 WHERE a < 10 +# select: SELECT * FROM t1 WHERE a < 10 +# +EXPLAIN UPDATE t1 SET a = 10 WHERE a < 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 SET a = 10 WHERE a < 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a < 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` < 10) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 4 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd_next 4 +Handler_update 3 + +DROP TABLE t1; +#2 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +# +# query: DELETE FROM t1 WHERE a < 10 +# select: SELECT * FROM t1 WHERE a < 10 +# +EXPLAIN DELETE FROM t1 WHERE a < 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1 WHERE a < 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a < 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` < 10) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 4 +# Status of testing query execution: +Variable_name Value +Handler_delete 3 +Handler_read_rnd_next 4 + +DROP TABLE t1; +#3 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +# +# query: DELETE FROM t1 USING t1 WHERE a = 1 +# select: SELECT * FROM t1 WHERE a = 1 +# +EXPLAIN DELETE FROM t1 USING t1 WHERE a = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1 USING t1 WHERE a = 1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a = 1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = 1) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 4 +# Status of testing query execution: +Variable_name Value +Handler_delete 1 +Handler_read_rnd_next 4 + +DROP TABLE t1; +#4 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1), (2), (3); +# +# query: UPDATE t1, t2 SET t1.a = 10 WHERE t1.a = 1 +# select: SELECT * FROM t1, t2 WHERE t1.a = 1 +# +EXPLAIN UPDATE t1, t2 SET t1.a = 10 WHERE t1.a = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1, t2 SET t1.a = 10 WHERE t1.a = 1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1, t2 WHERE t1.a = 1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where (`test`.`t1`.`a` = 1) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 8 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd_next 8 +Handler_update 1 + +DROP TABLE t1, t2; +#5 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1), (2), (3); +# +# query: UPDATE t1 t11, (SELECT * FROM t2) t12 SET t11.a = 10 WHERE t11.a = 1 +# select: SELECT * FROM t1 t11, (SELECT * FROM t2) t12 WHERE t11.a = 1 +# +EXPLAIN UPDATE t1 t11, (SELECT * FROM t2) t12 SET t11.a = 10 WHERE t11.a = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t11 ALL NULL NULL NULL NULL 3 Using where +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 +2 DERIVED t2 ALL NULL NULL NULL NULL 3 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 t11, (SELECT * FROM t2) t12 SET t11.a = 10 WHERE t11.a = 1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 ALL NULL NULL NULL NULL 3 100.00 Using where +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 100.00 +2 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 t11, (SELECT * FROM t2) t12 WHERE t11.a = 1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t11`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` `t11` join `test`.`t2` where (`test`.`t11`.`a` = 1) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 8 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd_next 12 +Handler_update 1 + +DROP TABLE t1, t2; +#6 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1), (2), (3); +# +# query: UPDATE t1 SET a = 10 WHERE 1 IN (SELECT 1 FROM t2 WHERE t2.b < 3) +# select: SELECT * FROM t1 WHERE 1 IN (SELECT 1 FROM t2 WHERE t2.b < 3) +# +EXPLAIN UPDATE t1 SET a = 10 WHERE 1 IN (SELECT 1 FROM t2 WHERE t2.b < 3); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 +2 SUBQUERY t2 ALL NULL NULL NULL NULL 3 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 SET a = 10 WHERE 1 IN (SELECT 1 FROM t2 WHERE t2.b < 3); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 +2 SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +Handler_read_rnd_next 1 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1 IN (SELECT 1 FROM t2 WHERE t2.b < 3); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using join buffer (flat, BNL join) +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) where (`test`.`t2`.`b` < 3) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 1 +Handler_read_rnd_next 8 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd_next 5 +Handler_update 3 + +DROP TABLE t1, t2; +#7 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1), (2), (3); +# +# query: UPDATE t1 SET a = 10 WHERE a IN (SELECT b FROM t2 WHERE t1.a < 3) +# select: SELECT * FROM t1 WHERE a IN (SELECT b FROM t2 WHERE t1.a < 3) +# +EXPLAIN UPDATE t1 SET a = 10 WHERE a IN (SELECT b FROM t2 WHERE t1.a < 3); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 3 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 SET a = 10 WHERE a IN (SELECT b FROM t2 WHERE t1.a < 3); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (SELECT b FROM t2 WHERE t1.a < 3); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where +1 PRIMARY t2 ALL NULL NULL NULL NULL 3 100.00 Using where; FirstMatch(t1); Using join buffer (flat, BNL join) +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) where ((`test`.`t2`.`b` = `test`.`t1`.`a`) and (`test`.`t1`.`a` < 3)) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 8 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd_next 7 +Handler_update 2 + +DROP TABLE t1, t2; +#7 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1), (2), (3); +# +# query: UPDATE t1, t2 SET a = 10 WHERE a IN (SELECT b FROM t2 WHERE t2.b < 3) +# select: SELECT * FROM t1, t2 WHERE a IN (SELECT b FROM t2 WHERE t2.b < 3) +# +EXPLAIN UPDATE t1, t2 SET a = 10 WHERE a IN (SELECT b FROM t2 WHERE t2.b < 3); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 +1 PRIMARY t2 ALL NULL NULL NULL NULL 3 +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1, t2 SET a = 10 WHERE a IN (SELECT b FROM t2 WHERE t2.b < 3); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +1 PRIMARY t2 ALL NULL NULL NULL NULL 3 100.00 +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1, t2 WHERE a IN (SELECT b FROM t2 WHERE t2.b < 3); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +1 PRIMARY t2 ALL NULL NULL NULL NULL 3 100.00 Using join buffer (flat, BNL join) +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` semi join (`test`.`t2`) join `test`.`t2` where ((`test`.`t2`.`b` < 3)) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 3 +Handler_read_rnd_next 12 +# Status of testing query execution: +Variable_name Value +Handler_read_key 3 +Handler_read_rnd_next 16 +Handler_update 2 + +DROP TABLE t1, t2; +#8 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1), (2), (3); +# +# query: UPDATE t1 t11, (SELECT * FROM t2) t12 SET t11.a = t11.a + 10 +# select: SELECT * FROM t1 t11, (SELECT * FROM t2) t12 +# +EXPLAIN UPDATE t1 t11, (SELECT * FROM t2) t12 SET t11.a = t11.a + 10; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t11 ALL NULL NULL NULL NULL 3 +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 +2 DERIVED t2 ALL NULL NULL NULL NULL 3 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 t11, (SELECT * FROM t2) t12 SET t11.a = t11.a + 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 ALL NULL NULL NULL NULL 3 100.00 +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 100.00 +2 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 t11, (SELECT * FROM t2) t12; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 ALL NULL NULL NULL NULL 3 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t11`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` `t11` join `test`.`t2` +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 8 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd 3 +Handler_read_rnd_deleted 1 +Handler_read_rnd_next 24 +Handler_update 3 + +DROP TABLE t1, t2; +#9 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1), (2), (3); +# +# query: UPDATE t1 t11, (SELECT 1 FROM DUAL) t12 SET t11.a = t11.a + 10 +# select: SELECT * FROM t1 t11, (SELECT 1 FROM DUAL) t12 +# +EXPLAIN UPDATE t1 t11, (SELECT 1 FROM DUAL) t12 SET t11.a = t11.a + 10; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> system NULL NULL NULL NULL 1 +1 PRIMARY t11 ALL NULL NULL NULL NULL 3 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 t11, (SELECT 1 FROM DUAL) t12 SET t11.a = t11.a + 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived2> system NULL NULL NULL NULL 1 100.00 +1 PRIMARY t11 ALL NULL NULL NULL NULL 3 100.00 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used +# Status of EXPLAIN EXTENDED query +Variable_name Value +Handler_read_rnd_next 1 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 t11, (SELECT 1 FROM DUAL) t12; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived2> system NULL NULL NULL NULL 1 100.00 +1 PRIMARY t11 ALL NULL NULL NULL NULL 3 100.00 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select `test`.`t11`.`a` AS `a`,1 AS `1` from `test`.`t1` `t11` +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +Handler_read_rnd_next 1 +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 5 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd 3 +Handler_read_rnd_next 9 +Handler_update 3 + +DROP TABLE t1, t2; +#10 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1), (2), (3); +# +# query: UPDATE t1 t11, (SELECT * FROM t2) t12 SET t11.a = 10 WHERE t11.a > 1 +# select: SELECT * FROM t1 t11, (SELECT * FROM t2) t12 WHERE t11.a > 1 +# +EXPLAIN UPDATE t1 t11, (SELECT * FROM t2) t12 SET t11.a = 10 WHERE t11.a > 1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t11 ALL NULL NULL NULL NULL 3 Using where +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 +2 DERIVED t2 ALL NULL NULL NULL NULL 3 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 t11, (SELECT * FROM t2) t12 SET t11.a = 10 WHERE t11.a > 1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 ALL NULL NULL NULL NULL 3 100.00 Using where +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 100.00 +2 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 t11, (SELECT * FROM t2) t12 WHERE t11.a > 1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t11`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` `t11` join `test`.`t2` where (`test`.`t11`.`a` > 1) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 8 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd_next 16 +Handler_update 2 + +DROP TABLE t1, t2; +#11 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +# +# query: DELETE FROM t1 WHERE a > 1 LIMIT 1 +# select: SELECT * FROM t1 WHERE a > 1 LIMIT 1 +# +EXPLAIN DELETE FROM t1 WHERE a > 1 LIMIT 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1 WHERE a > 1 LIMIT 1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a > 1 LIMIT 1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` > 1) limit 1 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 2 +# Status of testing query execution: +Variable_name Value +Handler_delete 1 +Handler_read_rnd_next 2 + +DROP TABLE t1; +#12 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +# +# query: DELETE FROM t1 WHERE 0 +# select: SELECT * FROM t1 WHERE 0 +# +EXPLAIN DELETE FROM t1 WHERE 0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1 WHERE 0; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 0; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 0 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +# Status of testing query execution: +Variable_name Value + +DROP TABLE t1; +#13 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +# +# query: DELETE FROM t1 USING t1 WHERE 0 +# select: SELECT * FROM t1 WHERE 0 +# +EXPLAIN DELETE FROM t1 USING t1 WHERE 0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1 USING t1 WHERE 0; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE 0; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 0 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +# Status of testing query execution: +Variable_name Value + +DROP TABLE t1; +#14 +CREATE TABLE t1 (a INT, b INT, UNIQUE KEY (a), KEY (b)); +INSERT INTO t1 VALUES (3, 3), (7, 7); +# +# query: DELETE FROM t1 WHERE a = 3 +# select: SELECT * FROM t1 WHERE a = 3 +# +EXPLAIN DELETE FROM t1 WHERE a = 3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 5 NULL 1 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1 WHERE a = 3; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range a a 5 NULL 1 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a = 3; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 const a a 5 const 1 100.00 +Warnings: +Note 1003 select 3 AS `a`,3 AS `b` from `test`.`t1` where 1 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +Handler_read_key 1 +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 1 +# Status of testing query execution: +Variable_name Value +Handler_delete 1 +Handler_read_key 1 + +DROP TABLE t1; +#15 +CREATE TABLE t1 (a INT, b INT, UNIQUE KEY (a), KEY (b)); +INSERT INTO t1 VALUES (3, 3), (7, 7); +# +# query: DELETE FROM t1 WHERE a < 3 +# select: SELECT * FROM t1 WHERE a < 3 +# +EXPLAIN DELETE FROM t1 WHERE a < 3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 5 NULL 1 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1 WHERE a < 3; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range a a 5 NULL 1 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a < 3; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range a a 5 NULL 1 100.00 Using index condition +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (`test`.`t1`.`a` < 3) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 1 +# Status of testing query execution: +Variable_name Value +Handler_read_key 1 + +DROP TABLE t1; +#16 +CREATE TABLE t1 ( a int PRIMARY KEY ); +# +# query: DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a +# select: SELECT * FROM t1 WHERE t1.a > 0 ORDER BY t1.a +# +EXPLAIN DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE t1.a > 0 ORDER BY t1.a; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select NULL AS `a` from `test`.`t1` where 0 order by NULL +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +Handler_read_rnd_next 1 +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 1 +# Status of testing query execution: +Variable_name Value +Handler_read_key 1 + +INSERT INTO t1 VALUES (1), (2), (3); +# +# query: DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a +# select: SELECT * FROM t1 WHERE t1.a > 0 ORDER BY t1.a +# +EXPLAIN DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE t1.a > 0 ORDER BY t1.a; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 3 100.00 Using where; Using index +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` > 0) order by `test`.`t1`.`a` +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_first 1 +Handler_read_next 3 +# Status of testing query execution: +Variable_name Value +Handler_delete 3 +Handler_read_key 1 +Handler_read_next 3 + +DROP TABLE t1; +#17 +CREATE TABLE t1(a INT PRIMARY KEY); +INSERT INTO t1 VALUES (4),(3),(1),(2); +# +# query: DELETE FROM t1 WHERE (@a:= a) ORDER BY a LIMIT 1 +# select: SELECT * FROM t1 WHERE (@a:= a) ORDER BY a LIMIT 1 +# +EXPLAIN DELETE FROM t1 WHERE (@a:= a) ORDER BY a LIMIT 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL PRIMARY 4 NULL 1 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1 WHERE (@a:= a) ORDER BY a LIMIT 1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index NULL PRIMARY 4 NULL 1 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE (@a:= a) ORDER BY a LIMIT 1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index NULL PRIMARY 4 NULL 1 100.00 Using where; Using index +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (@a:=`test`.`t1`.`a`) order by `test`.`t1`.`a` limit 1 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_first 1 +# Status of testing query execution: +Variable_name Value +Handler_delete 1 +Handler_read_first 1 + +DROP TABLE t1; +#18 +CREATE TABLE t1 (a DATE, b TIME, c INT, KEY c(c), KEY b(b), KEY a(a)); +INSERT INTO t1 VALUES (), (), (), (), (), (), (), (), (), (); +UPDATE t1 SET a = c, b = c; +# +# query: DELETE FROM t1 ORDER BY a ASC, b ASC LIMIT 1 +# select: SELECT * FROM t1 ORDER BY a ASC, b ASC LIMIT 1 +# +EXPLAIN DELETE FROM t1 ORDER BY a ASC, b ASC LIMIT 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1 ORDER BY a ASC, b ASC LIMIT 1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 ORDER BY a ASC, b ASC LIMIT 1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 Using filesort +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` order by `test`.`t1`.`a`,`test`.`t1`.`b` limit 1 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 11 +Sort_priority_queue_sorts 1 +Sort_rows 1 +Sort_scan 1 +# Status of testing query execution: +Variable_name Value +Handler_delete 1 +Handler_read_rnd 1 +Handler_read_rnd_next 11 +Sort_rows 10 +Sort_scan 1 + +DROP TABLE t1; +#19 +CREATE TABLE t1 (a1 INT NOT NULL, b1 INT NOT NULL); +CREATE TABLE t2 (a2 INT NOT NULL, b2 INT NOT NULL, PRIMARY KEY (a2,b2)); +CREATE TABLE t3 (a3 INT NOT NULL, b3 INT NOT NULL, PRIMARY KEY (a3,b3)); +INSERT INTO t1 VALUES (1,1), (2,1), (1,3); +INSERT INTO t2 VALUES (1,1), (2,2), (3,3); +INSERT INTO t3 VALUES (1,1), (2,1), (1,3); +# +# query: DELETE t1,t2,t3 FROM t1,t2,t3 WHERE a1=a2 AND b2=a3 AND b1=b3 +# select: SELECT * FROM t1,t2,t3 WHERE a1=a2 AND b2=a3 AND b1=b3 +# +EXPLAIN DELETE t1,t2,t3 FROM t1,t2,t3 WHERE a1=a2 AND b2=a3 AND b1=b3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.b2,test.t1.b1 1 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE t1,t2,t3 FROM t1,t2,t3 WHERE a1=a2 AND b2=a3 AND b1=b3; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 +1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 100.00 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.b2,test.t1.b1 1 100.00 +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1,t2,t3 WHERE a1=a2 AND b2=a3 AND b1=b3; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 +1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 100.00 Using index +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.b2,test.t1.b1 1 100.00 Using index +Warnings: +Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,`test`.`t2`.`a2` AS `a2`,`test`.`t2`.`b2` AS `b2`,`test`.`t3`.`a3` AS `a3`,`test`.`t3`.`b3` AS `b3` from `test`.`t1` join `test`.`t2` join `test`.`t3` where ((`test`.`t2`.`a2` = `test`.`t1`.`a1`) and (`test`.`t3`.`a3` = `test`.`t2`.`b2`) and (`test`.`t3`.`b3` = `test`.`t1`.`b1`)) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 6 +Handler_read_next 3 +Handler_read_rnd_next 4 +# Status of testing query execution: +Variable_name Value +Handler_delete 8 +Handler_read_key 6 +Handler_read_next 3 +Handler_read_rnd 5 +Handler_read_rnd_next 4 + +DROP TABLE t1, t2, t3; +#20 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +CREATE TABLE t2 (a INT); +INSERT INTO t2 VALUES (1), (2), (3); +# +# query: UPDATE t1 SET a = 10 WHERE a IN (SELECT a FROM t2) +# select: SELECT * FROM t1 WHERE a IN (SELECT a FROM t2) +# +EXPLAIN UPDATE t1 SET a = 10 WHERE a IN (SELECT a FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 3 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 SET a = 10 WHERE a IN (SELECT a FROM t2); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (SELECT a FROM t2); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00 +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) where 1 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 3 +Handler_read_rnd_next 8 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd_next 10 +Handler_update 3 + +DROP TABLE t1, t2; +#21 +CREATE TABLE t1 (a1 INT); +INSERT INTO t1 VALUES (1), (2), (3), (4), (5); +CREATE TABLE t2 (a2 VARCHAR(10)); +INSERT INTO t2 VALUES (1), (2), (3), (4), (5); +SET @save_optimizer_switch= @@optimizer_switch; +# +# query: DELETE FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2) +# select: SELECT * FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2) +# +EXPLAIN DELETE FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a1` AS `a1` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`>(<in_optimizer>(`test`.`t1`.`a1`,<exists>(select `test`.`t2`.`a2` from `test`.`t2` where ((`test`.`t2`.`a2` > 2) and (<cache>(`test`.`t1`.`a1`) = `test`.`t2`.`a2`))))) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 5 +Handler_read_rnd_next 30 +# Status of testing query execution: +Variable_name Value +Handler_delete 3 +Handler_read_rnd_next 30 + +SET @@optimizer_switch= @save_optimizer_switch; +TRUNCATE t1; +INSERT INTO t1 VALUES (1), (2), (3), (4), (5); +# +# query: DELETE FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2) +# select: SELECT * FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2) +# +EXPLAIN DELETE FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; FirstMatch(t1); Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`a1` AS `a1` from `test`.`t1` semi join (`test`.`t2`) where ((`test`.`t2`.`a2` > 2) and (`test`.`t1`.`a1` = `test`.`t2`.`a2`)) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 12 +# Status of testing query execution: +Variable_name Value +Handler_delete 3 +Handler_read_rnd_next 30 + +DROP TABLE t1, t2; +#22 +CREATE TABLE t1 (i INT, j INT); +INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5); +# +# query: UPDATE t1 SET i = 10 +# select: SELECT * FROM t1 +# +EXPLAIN UPDATE t1 SET i = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 SET i = 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +Warnings: +Note 1003 select `test`.`t1`.`i` AS `i`,`test`.`t1`.`j` AS `j` from `test`.`t1` +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 6 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd_next 6 +Handler_update 5 + +DROP TABLE t1; +#23 +CREATE TABLE t1 (i INT, j INT); +INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5); +# +# query: DELETE FROM t1 +# select: SELECT * FROM t1 +# +EXPLAIN DELETE FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL 5 Deleting all rows +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL 5 NULL Deleting all rows +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +Warnings: +Note 1003 select `test`.`t1`.`i` AS `i`,`test`.`t1`.`j` AS `j` from `test`.`t1` +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 6 +# Status of testing query execution: +Variable_name Value + +DROP TABLE t1; +#24 +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2(a INT, b INT, c INT, d INT, INDEX(a, b, c)); +INSERT INTO t2 (a, b, c) SELECT i, i, i FROM t1; +INSERT INTO t2 (a, b, c) SELECT t1.i, t1.i, t1.i FROM t1, t1 x1, t1 x2; +# +# query: DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5 +# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5 +# +EXPLAIN DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index NULL a 15 NULL 5 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index NULL a 15 NULL 5 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index NULL a 15 NULL 5 100.00 Using where +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where (`test`.`t2`.`b` = 10) order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_first 1 +Handler_read_next 4 +# Status of testing query execution: +Variable_name Value +Handler_delete 5 +Handler_read_first 1 +Handler_read_next 4 + +DROP TABLE t1, t2; +#25 +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (1), (2), (3); +CREATE TABLE t2 (i INT); +# +# query: INSERT INTO t2 SELECT * FROM t1 +# select: SELECT * FROM t1 +# +EXPLAIN INSERT INTO t2 SELECT * FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED INSERT INTO t2 SELECT * FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 +Warnings: +Note 1003 select `test`.`t1`.`i` AS `i` from `test`.`t1` +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 4 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd_next 4 +Handler_write 3 + +DROP TABLE t1, t2; +#26 +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (1), (2), (3); +CREATE TABLE t2 (i INT); +# +# query: REPLACE INTO t2 SELECT * FROM t1 +# select: SELECT * FROM t1 +# +EXPLAIN REPLACE INTO t2 SELECT * FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED REPLACE INTO t2 SELECT * FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 +Warnings: +Note 1003 select `test`.`t1`.`i` AS `i` from `test`.`t1` +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 4 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd_next 4 +Handler_write 3 + +DROP TABLE t1, t2; +#27 +CREATE TABLE t1 (i INT); +# +# query: INSERT INTO t1 SET i = 10 +# select: +# +EXPLAIN INSERT INTO t1 SET i = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED INSERT INTO t1 SET i = 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 INSERT t1 ALL NULL NULL NULL NULL NULL 100.00 NULL +# Status of EXPLAIN EXTENDED query +Variable_name Value +# Status of testing query execution: +Variable_name Value +Handler_write 1 + +DROP TABLE t1; +#28 +CREATE TABLE t1 (i INT); +# +# query: REPLACE INTO t1 SET i = 10 +# select: +# +EXPLAIN REPLACE INTO t1 SET i = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED REPLACE INTO t1 SET i = 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 INSERT t1 ALL NULL NULL NULL NULL NULL 100.00 NULL +# Status of EXPLAIN EXTENDED query +Variable_name Value +# Status of testing query execution: +Variable_name Value +Handler_write 1 + +DROP TABLE t1; +#29 +CREATE TABLE t1 (a INT, i INT PRIMARY KEY); +INSERT INTO t1 (i) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +# +# query: DELETE FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5 +# select: SELECT * FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5 +# +EXPLAIN DELETE FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 5 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 5 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 8 100.00 Using index condition +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where ((`test`.`t1`.`i` > 10) and (`test`.`t1`.`i` <= 18)) order by `test`.`t1`.`i` limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 1 +Handler_read_next 4 +# Status of testing query execution: +Variable_name Value +Handler_delete 5 +Handler_read_key 1 +Handler_read_next 4 + +DROP TABLE t1; +#30 +CREATE TABLE t1(a INT, i CHAR(2), INDEX(i(1))); +INSERT INTO t1 (i) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +# +# query: DELETE FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5 +# select: SELECT * FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5 +# +EXPLAIN DELETE FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 26 Using where; Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL i NULL NULL NULL 26 100.00 Using where; Using filesort +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where ((`test`.`t1`.`i` > 10) and (`test`.`t1`.`i` <= 18)) order by `test`.`t1`.`i` limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 27 +Sort_priority_queue_sorts 1 +Sort_rows 5 +Sort_scan 1 +# Status of testing query execution: +Variable_name Value +Handler_delete 5 +Handler_read_rnd 5 +Handler_read_rnd_next 27 +Sort_rows 8 +Sort_scan 1 + +DROP TABLE t1; +#31 +CREATE TABLE t1 (i INT); +INSERT INTO t1 (i) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2(a INT, b INT, c INT, d INT, INDEX(a, b, c)); +INSERT INTO t2 (a, b, c) SELECT i, i, i FROM t1; +# +# query: DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5 +# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5 +# +EXPLAIN DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where (`test`.`t2`.`b` = 10) order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 27 +Sort_priority_queue_sorts 1 +Sort_rows 1 +Sort_scan 1 +# Status of testing query execution: +Variable_name Value +Handler_delete 1 +Handler_read_rnd 1 +Handler_read_rnd_next 27 +Sort_rows 1 +Sort_scan 1 + +DROP TABLE t1, t2; +#32 +CREATE TABLE t1 (i INT); +INSERT INTO t1 (i) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2(a INT, b INT, c INT, d INT, INDEX(a, b, c)); +INSERT INTO t2 (a, b, c) SELECT i, i, i FROM t1; +INSERT INTO t2 (a, b, c) SELECT t1.i, t1.i, t1.i FROM t1, t1 x1, t1 x2; +# +# query: DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5 +# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5 +# +EXPLAIN DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index NULL a 15 NULL 5 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index NULL a 15 NULL 5 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index NULL a 15 NULL 5 100.00 Using where +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where (`test`.`t2`.`b` = 10) order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_first 1 +Handler_read_next 4 +# Status of testing query execution: +Variable_name Value +Handler_delete 5 +Handler_read_first 1 +Handler_read_next 4 + +DROP TABLE t1, t2; +#33 +CREATE TABLE t1 (i INT); +INSERT INTO t1 (i) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2 (a CHAR(2), b CHAR(2), c CHAR(2), d CHAR(2), INDEX (a,b(1),c)); +INSERT INTO t2 SELECT i, i, i, i FROM t1; +# +# query: DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5 +# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5 +# +EXPLAIN DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where (`test`.`t2`.`b` = 10) order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 27 +Sort_priority_queue_sorts 1 +Sort_rows 1 +Sort_scan 1 +# Status of testing query execution: +Variable_name Value +Handler_delete 1 +Handler_read_rnd 1 +Handler_read_rnd_next 27 +Sort_rows 1 +Sort_scan 1 + +DROP TABLE t1, t2; +#34 +CREATE TABLE t1 (i INT); +INSERT INTO t1 (i) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2 (a CHAR(2), b CHAR(2), c CHAR(2), d CHAR(2), INDEX (a,b,c)) +ENGINE=HEAP; +INSERT INTO t2 SELECT i, i, i, i FROM t1; +# +# query: DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5 +# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5 +# +EXPLAIN DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where (`test`.`t2`.`b` = 10) order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd 1 +Handler_read_rnd_next 27 +Sort_priority_queue_sorts 1 +Sort_rows 1 +Sort_scan 1 +# Status of testing query execution: +Variable_name Value +Handler_delete 1 +Handler_read_rnd 1 +Handler_read_rnd_next 27 +Sort_rows 1 +Sort_scan 1 + +DROP TABLE t1, t2; +#35 +CREATE TABLE t1 (i INT); +INSERT INTO t1 (i) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35),(36),(37),(38),(39), +(40),(41),(42); +CREATE TABLE t2 (i INT, key1 INT, key2 INT, INDEX (key1), INDEX (key2)); +INSERT INTO t2 (key1, key2) SELECT i, i FROM t1; +# +# query: DELETE FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1 +# select: SELECT * FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1 +# +EXPLAIN DELETE FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index_merge key1,key2 key1,key2 5,5 NULL 7 Using sort_union(key1,key2); Using where; Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index_merge key1,key2 key1,key2 5,5 NULL 7 100.00 Using sort_union(key1,key2); Using where; Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index_merge key1,key2 key1,key2 5,5 NULL 7 100.00 Using sort_union(key1,key2); Using where; Using filesort +Warnings: +Note 1003 select `test`.`t2`.`i` AS `i`,`test`.`t2`.`key1` AS `key1`,`test`.`t2`.`key2` AS `key2` from `test`.`t2` where ((`test`.`t2`.`key1` < 13) or (`test`.`t2`.`key2` < 14)) order by `test`.`t2`.`key1` +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 2 +Handler_read_next 7 +Handler_read_rnd 4 +Sort_range 1 +Sort_rows 4 +# Status of testing query execution: +Variable_name Value +Handler_delete 4 +Handler_read_key 2 +Handler_read_next 7 +Handler_read_rnd 8 +Sort_range 1 +Sort_rows 4 + +DROP TABLE t1, t2; +#36 +CREATE TABLE t1 (i INT); +INSERT INTO t1 (i) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2(a INT, i INT PRIMARY KEY); +INSERT INTO t2 (i) SELECT i FROM t1; +# +# query: DELETE FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5 +# select: SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5 +# +EXPLAIN DELETE FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 5 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 5 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 8 100.00 Using where +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` desc limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 1 +Handler_read_prev 4 +# Status of testing query execution: +Variable_name Value +Handler_delete 5 +Handler_read_key 1 +Handler_read_prev 4 + +DROP TABLE t1, t2; +#37 +CREATE TABLE t1 (i INT); +INSERT INTO t1 (i) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2 (a CHAR(2), b CHAR(2), c CHAR(2), INDEX (a, b)); +INSERT INTO t2 SELECT i, i, i FROM t1; +# +# query: DELETE FROM t2 ORDER BY a, b DESC LIMIT 5 +# select: SELECT * FROM t2 ORDER BY a, b DESC LIMIT 5 +# +EXPLAIN DELETE FROM t2 ORDER BY a, b DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t2 ORDER BY a, b DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 ORDER BY a, b DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using filesort +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` order by `test`.`t2`.`a`,`test`.`t2`.`b` desc limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 27 +Sort_priority_queue_sorts 1 +Sort_rows 5 +Sort_scan 1 +# Status of testing query execution: +Variable_name Value +Handler_delete 5 +Handler_read_rnd 5 +Handler_read_rnd_next 27 +Sort_rows 26 +Sort_scan 1 + +DROP TABLE t1, t2; +#38 +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2 (a CHAR(2), b CHAR(2), c INT, INDEX (a, b)); +INSERT INTO t2 (a, b) SELECT i, i FROM t1; +INSERT INTO t2 (a, b) SELECT t1.i, t1.i FROM t1, t1 x1, t1 x2; +# +# query: DELETE FROM t2 ORDER BY a DESC, b DESC LIMIT 5 +# select: SELECT * FROM t2 ORDER BY a DESC, b DESC LIMIT 5 +# +EXPLAIN DELETE FROM t2 ORDER BY a DESC, b DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index NULL a 6 NULL 5 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t2 ORDER BY a DESC, b DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index NULL a 6 NULL 5 100.00 +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 ORDER BY a DESC, b DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index NULL a 6 NULL 5 100.00 +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` order by `test`.`t2`.`a` desc,`test`.`t2`.`b` desc limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_last 1 +Handler_read_prev 4 +# Status of testing query execution: +Variable_name Value +Handler_delete 5 +Handler_read_last 1 +Handler_read_prev 4 + +DROP TABLE t1, t2; +#39 +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2(a INT, i INT PRIMARY KEY); +INSERT INTO t2 (i) SELECT i FROM t1; +# +# query: UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5 +# select: SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5 +# +EXPLAIN UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 5 Using where; Using buffer +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 5 100.00 Using where; Using buffer +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 8 100.00 Using index condition +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 1 +Handler_read_next 4 +# Status of testing query execution: +Variable_name Value +Handler_read_key 1 +Handler_read_next 4 +Handler_read_rnd 5 +Handler_update 5 + +DROP TABLE t1, t2; +#40 +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2(a INT, i CHAR(2), INDEX(i(1))); +INSERT INTO t2 (i) SELECT i FROM t1; +# +# query: UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5 +# select: SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5 +# +EXPLAIN UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL i NULL NULL NULL 26 100.00 Using where; Using filesort +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 27 +Sort_priority_queue_sorts 1 +Sort_rows 5 +Sort_scan 1 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd 5 +Handler_read_rnd_next 27 +Handler_update 5 +Sort_priority_queue_sorts 1 +Sort_rows 5 +Sort_scan 1 + +DROP TABLE t1, t2; +#41 +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2(a INT, b INT, c INT, d INT, INDEX(a, b, c)); +INSERT INTO t2 (a, b, c) SELECT i, i, i FROM t1; +# +# query: UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5 +# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5 +# +EXPLAIN UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where (`test`.`t2`.`b` = 10) order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 27 +Sort_priority_queue_sorts 1 +Sort_rows 1 +Sort_scan 1 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd 1 +Handler_read_rnd_next 27 +Handler_update 1 +Sort_priority_queue_sorts 1 +Sort_rows 1 +Sort_scan 1 + +DROP TABLE t1, t2; +#42 +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2(a INT, b INT, c INT, d INT, INDEX(a, b, c)); +INSERT INTO t2 (a, b, c) SELECT i, i, i FROM t1; +INSERT INTO t2 (a, b, c) SELECT t1.i, t1.i, t1.i FROM t1, t1 x1, t1 x2; +# +# query: UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5 +# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5 +# +EXPLAIN UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index NULL a 15 NULL 5 Using where; Using buffer +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index NULL a 15 NULL 5 100.00 Using where; Using buffer +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index NULL a 15 NULL 5 100.00 Using where +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where (`test`.`t2`.`b` = 10) order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_first 1 +Handler_read_next 4 +# Status of testing query execution: +Variable_name Value +Handler_read_first 1 +Handler_read_next 4 +Handler_read_rnd 5 +Handler_update 5 + +DROP TABLE t1, t2; +#43 +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2 (a CHAR(2), b CHAR(2), c CHAR(2), d CHAR(2), INDEX (a,b(1),c)); +INSERT INTO t2 SELECT i, i, i, i FROM t1; +# +# query: UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5 +# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5 +# +EXPLAIN UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where (`test`.`t2`.`b` = 10) order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 27 +Sort_priority_queue_sorts 1 +Sort_rows 1 +Sort_scan 1 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd 1 +Handler_read_rnd_next 27 +Sort_priority_queue_sorts 1 +Sort_rows 1 +Sort_scan 1 + +DROP TABLE t1, t2; +#44 +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2 (a CHAR(2), b CHAR(2), c CHAR(2), d CHAR(2), INDEX (a,b,c)) +ENGINE=HEAP; +INSERT INTO t2 SELECT i, i, i, i FROM t1; +# +# query: UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5 +# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5 +# +EXPLAIN UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where (`test`.`t2`.`b` = 10) order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd 1 +Handler_read_rnd_next 27 +Sort_priority_queue_sorts 1 +Sort_rows 1 +Sort_scan 1 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd 1 +Handler_read_rnd_next 27 +Sort_priority_queue_sorts 1 +Sort_rows 1 +Sort_scan 1 + +DROP TABLE t1, t2; +#45 +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35),(36),(37),(38),(39), +(40),(41),(42); +CREATE TABLE t2 (i INT, key1 INT, key2 INT, INDEX (key1), INDEX (key2)); +INSERT INTO t2 (key1, key2) SELECT i, i FROM t1; +# +# query: UPDATE t2 SET i = 123 WHERE key1 < 13 or key2 < 14 ORDER BY key1 +# select: SELECT * FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1 +# +EXPLAIN UPDATE t2 SET i = 123 WHERE key1 < 13 or key2 < 14 ORDER BY key1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index_merge key1,key2 key1,key2 5,5 NULL 7 Using sort_union(key1,key2); Using where; Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t2 SET i = 123 WHERE key1 < 13 or key2 < 14 ORDER BY key1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index_merge key1,key2 key1,key2 5,5 NULL 7 100.00 Using sort_union(key1,key2); Using where; Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index_merge key1,key2 key1,key2 5,5 NULL 7 100.00 Using sort_union(key1,key2); Using where; Using filesort +Warnings: +Note 1003 select `test`.`t2`.`i` AS `i`,`test`.`t2`.`key1` AS `key1`,`test`.`t2`.`key2` AS `key2` from `test`.`t2` where ((`test`.`t2`.`key1` < 13) or (`test`.`t2`.`key2` < 14)) order by `test`.`t2`.`key1` +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 2 +Handler_read_next 7 +Handler_read_rnd 4 +Sort_range 1 +Sort_rows 4 +# Status of testing query execution: +Variable_name Value +Handler_read_key 2 +Handler_read_next 7 +Handler_read_rnd 8 +Handler_update 4 +Sort_range 1 +Sort_rows 4 + +DROP TABLE t1, t2; +#46 +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2(a INT, i INT PRIMARY KEY); +INSERT INTO t2 (i) SELECT i FROM t1; +# +# query: UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5 +# select: SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5 +# +EXPLAIN UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 5 Using where; Using buffer +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 5 100.00 Using where; Using buffer +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 8 100.00 Using where +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` desc limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 1 +Handler_read_prev 4 +# Status of testing query execution: +Variable_name Value +Handler_read_key 1 +Handler_read_prev 4 +Handler_read_rnd 5 +Handler_update 5 + +DROP TABLE t1, t2; +#47 +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2 (a CHAR(2), b CHAR(2), c CHAR(2), INDEX (a, b)); +INSERT INTO t2 SELECT i, i, i FROM t1; +# +# query: UPDATE t2 SET c = 10 ORDER BY a, b DESC LIMIT 5 +# select: SELECT * FROM t2 ORDER BY a, b DESC LIMIT 5 +# +EXPLAIN UPDATE t2 SET c = 10 ORDER BY a, b DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t2 SET c = 10 ORDER BY a, b DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 ORDER BY a, b DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using filesort +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` order by `test`.`t2`.`a`,`test`.`t2`.`b` desc limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 27 +Sort_priority_queue_sorts 1 +Sort_rows 5 +Sort_scan 1 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd 5 +Handler_read_rnd_next 27 +Handler_update 4 +Sort_priority_queue_sorts 1 +Sort_rows 5 +Sort_scan 1 + +DROP TABLE t1, t2; +#48 +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), +(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), +(30),(31),(32),(33),(34),(35); +CREATE TABLE t2 (a CHAR(2), b CHAR(2), c INT, INDEX (a, b)); +INSERT INTO t2 (a, b) SELECT i, i FROM t1; +INSERT INTO t2 (a, b) SELECT t1.i, t1.i FROM t1, t1 x1, t1 x2; +# +# query: UPDATE t2 SET c = 10 ORDER BY a DESC, b DESC LIMIT 5 +# select: SELECT * FROM t2 ORDER BY a DESC, b DESC LIMIT 5 +# +EXPLAIN UPDATE t2 SET c = 10 ORDER BY a DESC, b DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index NULL a 6 NULL 5 Using buffer +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t2 SET c = 10 ORDER BY a DESC, b DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index NULL a 6 NULL 5 100.00 Using buffer +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2 ORDER BY a DESC, b DESC LIMIT 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index NULL a 6 NULL 5 100.00 +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` order by `test`.`t2`.`a` desc,`test`.`t2`.`b` desc limit 5 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_last 1 +Handler_read_prev 4 +# Status of testing query execution: +Variable_name Value +Handler_read_last 1 +Handler_read_prev 4 +Handler_read_rnd 5 +Handler_update 5 + +DROP TABLE t1, t2; +#49 +CREATE TABLE t1 ( +pk INT NOT NULL AUTO_INCREMENT, +c1_idx CHAR(1) DEFAULT 'y', +c2 INT, +PRIMARY KEY (pk), +INDEX c1_idx (c1_idx) +); +INSERT INTO t1 VALUES (1,'y',1), (2,'n',2), (3,'y',3), (4,'n',4); +# +# query: UPDATE t1 SET c2 = 0 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2 +# select: SELECT * FROM t1 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2 +# +EXPLAIN UPDATE t1 SET c2 = 0 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c1_idx c1_idx 2 NULL 2 Using where; Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 SET c2 = 0 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range c1_idx c1_idx 2 NULL 2 100.00 Using where; Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ref c1_idx c1_idx 2 const 2 100.00 Using index condition; Using where; Using filesort +Warnings: +Note 1003 select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`c1_idx` AS `c1_idx`,`test`.`t1`.`c2` AS `c2` from `test`.`t1` where (`test`.`t1`.`c1_idx` = 'y') order by `test`.`t1`.`pk` desc limit 2 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 1 +Handler_read_next 2 +Sort_priority_queue_sorts 1 +Sort_range 1 +Sort_rows 2 +# Status of testing query execution: +Variable_name Value +Handler_read_key 1 +Handler_read_next 2 +Handler_read_rnd 2 +Handler_update 2 +Sort_priority_queue_sorts 1 +Sort_range 1 +Sort_rows 2 + +# +# query: DELETE FROM t1 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2 +# select: SELECT * FROM t1 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2 +# +EXPLAIN DELETE FROM t1 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c1_idx c1_idx 2 NULL 2 Using where; Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM t1 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range c1_idx c1_idx 2 NULL 2 100.00 Using where; Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ref c1_idx c1_idx 2 const 2 100.00 Using index condition; Using where; Using filesort +Warnings: +Note 1003 select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`c1_idx` AS `c1_idx`,`test`.`t1`.`c2` AS `c2` from `test`.`t1` where (`test`.`t1`.`c1_idx` = 'y') order by `test`.`t1`.`pk` desc limit 2 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 1 +Handler_read_next 2 +Sort_priority_queue_sorts 1 +Sort_range 1 +Sort_rows 2 +# Status of testing query execution: +Variable_name Value +Handler_delete 2 +Handler_read_key 1 +Handler_read_next 2 +Handler_read_rnd 2 +Sort_range 1 +Sort_rows 2 + +DROP TABLE t1; +#50 +CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY); +INSERT INTO t1 VALUES (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(); +# +# query: UPDATE t1 SET a=a+10 WHERE a > 34 +# select: SELECT * FROM t1 WHERE a > 34 +# +EXPLAIN UPDATE t1 SET a=a+10 WHERE a > 34; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using buffer +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 SET a=a+10 WHERE a > 34; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 100.00 Using where; Using buffer +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a > 34; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 100.00 Using where; Using index +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` > 34) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 1 +Handler_read_next 2 +# Status of testing query execution: +Variable_name Value +Handler_read_key 1 +Handler_read_next 2 +Handler_read_rnd 2 +Handler_update 2 + +DROP TABLE t1; +#51 +CREATE TABLE t1 (c1 INT, c2 INT, c3 INT); +CREATE TABLE t2 (c1 INT, c2 INT); +INSERT INTO t1 VALUES (1, 1, 10), (2, 2, 20); +# +# query: UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c1 SET t2.c2 = 10 +# select: SELECT * FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 +# +EXPLAIN UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c1 SET t2.c2 = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c1 SET t2.c2 = 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 +# Status of EXPLAIN EXTENDED query +Variable_name Value +Handler_read_rnd_next 1 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t1`.`c2` AS `c2`,`test`.`t1`.`c3` AS `c3`,NULL AS `c1`,NULL AS `c2` from `test`.`t1` +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +Handler_read_rnd_next 1 +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 4 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd_next 4 + +# +# query: UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c1 SET t2.c2 = 10 WHERE t1.c3 = 10 +# select: SELECT * FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c3 = 10 +# +EXPLAIN UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c1 SET t2.c2 = 10 WHERE t1.c3 = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c1 SET t2.c2 = 10 WHERE t1.c3 = 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +Handler_read_rnd_next 1 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c3 = 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t1`.`c2` AS `c2`,`test`.`t1`.`c3` AS `c3`,NULL AS `c1`,NULL AS `c2` from `test`.`t1` where (`test`.`t1`.`c3` = 10) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +Handler_read_rnd_next 1 +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 4 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd_next 4 + +DROP TABLE t1, t2; +#52 +CREATE TABLE t1(f1 INT, f2 INT); +CREATE TABLE t2(f3 INT, f4 INT); +CREATE INDEX IDX ON t2(f3); +INSERT INTO t1 VALUES(1,0),(2,0); +INSERT INTO t2 VALUES(1,1),(2,2); +# +# query: UPDATE t1 SET t1.f2=(SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1) +# select: SELECT (SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1) FROM t1 +# +EXPLAIN UPDATE t1 SET t1.f2=(SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +2 DEPENDENT SUBQUERY t2 ALL IDX NULL NULL NULL 2 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 SET t1.f2=(SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 +2 DEPENDENT SUBQUERY t2 ALL IDX NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.t1.f1' of SELECT #2 was resolved in SELECT #1 +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT (SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1) FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 +2 DEPENDENT SUBQUERY t2 ALL IDX NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.t1.f1' of SELECT #2 was resolved in SELECT #1 +Note 1003 select <expr_cache><`test`.`t1`.`f1`>((select max(`test`.`t2`.`f4`) from `test`.`t2` where (`test`.`t2`.`f3` = `test`.`t1`.`f1`))) AS `(SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1)` from `test`.`t1` +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 2 +Handler_read_rnd_next 9 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd_next 9 +Handler_update 2 + +DROP TABLE t1, t2; +#55 +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (1); +SET @a = NULL; +EXPLAIN DELETE FROM t1 WHERE (@a:= a); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 1 Using where +DROP TABLE t1; +#56 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +DELETE FROM t1 USING t1 WHERE uknown_column = 12345; +ERROR 42S22: Unknown column 'uknown_column' in 'where clause' +EXPLAIN EXTENDED DELETE FROM t1 USING t1 WHERE uknown_column = 12345; +ERROR 42S22: Unknown column 'uknown_column' in 'where clause' +DROP TABLE t1; +#57 +CREATE TABLE t1(f1 INT); +EXPLAIN EXTENDED UPDATE t1 SET f2=1 ORDER BY f2; +ERROR 42S22: Unknown column 'f2' in 'order clause' +UPDATE t1 SET f2=1 ORDER BY f2; +ERROR 42S22: Unknown column 'f2' in 'order clause' +DROP TABLE t1; +#62 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (0), (1); +CREATE VIEW v1 AS SELECT t11.a, t12.a AS b FROM t1 t11, t1 t12; +# +# query: UPDATE v1 SET a = 1 WHERE a > 0 +# select: SELECT * FROM v1 WHERE a > 0 +# +EXPLAIN UPDATE v1 SET a = 1 WHERE a > 0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t11 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t12 ALL NULL NULL NULL NULL 2 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE v1 SET a = 1 WHERE a > 0; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 ALL NULL NULL NULL NULL 2 100.00 Using where +1 SIMPLE t12 ALL NULL NULL NULL NULL 2 100.00 +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM v1 WHERE a > 0; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 ALL NULL NULL NULL NULL 2 100.00 Using where +1 SIMPLE t12 ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t11`.`a` AS `a`,`test`.`t12`.`a` AS `b` from `test`.`t1` `t11` join `test`.`t1` `t12` where (`test`.`t11`.`a` > 0) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 6 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd 1 +Handler_read_rnd_deleted 1 +Handler_read_rnd_next 8 + +# +# query: UPDATE t1, v1 SET v1.a = 1 WHERE t1.a = v1.a +# select: SELECT * FROM t1, v1 WHERE t1.a = v1.a +# +EXPLAIN UPDATE t1, v1 SET v1.a = 1 WHERE t1.a = v1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 +1 SIMPLE t11 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t12 ALL NULL NULL NULL NULL 2 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1, v1 SET v1.a = 1 WHERE t1.a = v1.a; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 +1 SIMPLE t11 ALL NULL NULL NULL NULL 2 100.00 Using where +1 SIMPLE t12 ALL NULL NULL NULL NULL 2 100.00 +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1, v1 WHERE t1.a = v1.a; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 +1 SIMPLE t11 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t12 ALL NULL NULL NULL NULL 2 100.00 Using join buffer (incremental, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t11`.`a` AS `a`,`test`.`t12`.`a` AS `b` from `test`.`t1` join `test`.`t1` `t11` join `test`.`t1` `t12` where (`test`.`t11`.`a` = `test`.`t1`.`a`) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 9 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd 2 +Handler_read_rnd_deleted 1 +Handler_read_rnd_next 18 +Handler_update 1 + +DROP TABLE t1; +DROP VIEW v1; +#63 +CREATE TABLE t1 (a INT, PRIMARY KEY(a)); +INSERT INTO t1 VALUES (1), (2), (3), (4), (5); +CREATE VIEW v1 (a) AS SELECT a FROM t1; +# +# query: DELETE FROM v1 WHERE a < 4 +# select: SELECT * FROM v1 WHERE a < 4 +# +EXPLAIN DELETE FROM v1 WHERE a < 4; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE FROM v1 WHERE a < 4; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 100.00 Using where +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM v1 WHERE a < 4; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 100.00 Using where; Using index +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` < 4) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_first 1 +Handler_read_next 3 +# Status of testing query execution: +Variable_name Value +Handler_delete 3 +Handler_read_first 1 +Handler_read_next 3 + +DROP TABLE t1; +DROP VIEW v1; +#64 +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +INSERT INTO t1 VALUES (1,2), (2,3), (3,4), (4,5), (5,10); +CREATE TABLE t2 (x INT); +INSERT INTO t2 VALUES (1), (2), (3), (4); +CREATE VIEW v1 (a,c) AS SELECT a, b+1 FROM t1; +# +# query: DELETE v1 FROM t2, v1 WHERE t2.x = v1.a +# select: SELECT * FROM t2, v1 WHERE t2.x = v1.a +# +EXPLAIN DELETE v1 FROM t2, v1 WHERE t2.x = v1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 4 Using where +1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.x 1 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE v1 FROM t2, v1 WHERE t2.x = v1.a; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 4 100.00 Using where +1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.x 1 100.00 +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2, v1 WHERE t2.x = v1.a; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 4 100.00 Using where +1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.x 1 100.00 +Warnings: +Note 1003 select `test`.`t2`.`x` AS `x`,`test`.`t1`.`a` AS `a`,(`test`.`t1`.`b` + 1) AS `c` from `test`.`t2` join `test`.`t1` where (`test`.`t1`.`a` = `test`.`t2`.`x`) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 4 +Handler_read_rnd_next 5 +# Status of testing query execution: +Variable_name Value +Handler_delete 4 +Handler_read_key 4 +Handler_read_rnd 4 +Handler_read_rnd_next 5 + +DROP TABLE t1,t2; +DROP VIEW v1; +#65 +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a)); +INSERT INTO t1 VALUES (1,2), (2,3), (3,4), (4,5), (5,10); +CREATE TABLE t2 (x INT); +INSERT INTO t2 VALUES (1), (2), (3), (4); +CREATE VIEW v1 (a,c) AS SELECT a, b+1 FROM t1; +# +# query: DELETE v1 FROM t2, v1 WHERE t2.x = v1.a +# select: SELECT * FROM t2, v1 WHERE t2.x = v1.a +# +EXPLAIN DELETE v1 FROM t2, v1 WHERE t2.x = v1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 4 Using where +1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.x 1 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED DELETE v1 FROM t2, v1 WHERE t2.x = v1.a; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 4 100.00 Using where +1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.x 1 100.00 +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t2, v1 WHERE t2.x = v1.a; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 4 100.00 Using where +1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.x 1 100.00 +Warnings: +Note 1003 select `test`.`t2`.`x` AS `x`,`test`.`t1`.`a` AS `a`,(`test`.`t1`.`b` + 1) AS `c` from `test`.`t2` join `test`.`t1` where (`test`.`t1`.`a` = `test`.`t2`.`x`) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 4 +Handler_read_rnd_next 5 +# Status of testing query execution: +Variable_name Value +Handler_delete 4 +Handler_read_key 4 +Handler_read_rnd 4 +Handler_read_rnd_next 5 + +DROP TABLE t1,t2; +DROP VIEW v1; +#66 +CREATE TABLE t1 (a INT); +CREATE VIEW v1 (x) AS SELECT a FROM t1; +# +# query: INSERT INTO v1 VALUES (10) +# select: SELECT NULL +# +EXPLAIN INSERT INTO v1 VALUES (10); +id select_type table type possible_keys key key_len ref rows Extra +1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED INSERT INTO v1 VALUES (10); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 INSERT t1 ALL NULL NULL NULL NULL NULL 100.00 NULL +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT NULL; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select NULL AS `NULL` +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +# Status of testing query execution: +Variable_name Value +Handler_write 1 + +DROP TABLE t1; +DROP VIEW v1; +#67 +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1), (2), (3); +CREATE VIEW v1 (x) AS SELECT b FROM t2; +# +# query: INSERT INTO v1 SELECT * FROM t1 +# select: SELECT * FROM t1 +# +EXPLAIN INSERT INTO v1 SELECT * FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED INSERT INTO v1 SELECT * FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +# Status of EXPLAIN EXTENDED query +Variable_name Value +Handler_read_rnd_next 1 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +Warnings: +Note 1003 select NULL AS `a` from `test`.`t1` +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +Handler_read_rnd_next 1 +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 1 +# Status of testing query execution: +Variable_name Value +Handler_read_rnd_next 1 + +DROP TABLE t1, t2; +DROP VIEW v1; +#68 +CREATE TABLE t1 (i INT); +EXPLAIN INSERT DELAYED INTO t1 VALUES (1); +id select_type table type possible_keys key key_len ref rows Extra +1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL +DROP TABLE t1; +#69 +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1), (2), (3); +# +# query: UPDATE t1 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x) +# select: SELECT * FROM t1 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x) +# +EXPLAIN UPDATE t1 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where +2 DEPENDENT SUBQUERY <derived3> index_subquery key0 key0 5 func 2 +3 DERIVED t2 ALL NULL NULL NULL NULL 3 Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where +2 DEPENDENT SUBQUERY <derived3> index_subquery key0 key0 5 func 2 100.00 +3 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3 100.00 +3 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 Using filesort +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join ((select `test`.`t2`.`b` AS `b` from `test`.`t2` order by `test`.`t2`.`b` limit 2,2) `x`) where 1 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 3 +Handler_read_rnd_next 10 +Sort_priority_queue_sorts 1 +Sort_rows 3 +Sort_scan 1 +# Status of testing query execution: +Variable_name Value +Handler_read_key 3 +Handler_read_rnd_next 8 +Handler_update 1 +Sort_priority_queue_sorts 1 +Sort_rows 3 +Sort_scan 1 + +# +# query: UPDATE t1, t2 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x) +# select: SELECT * FROM t1, t2 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x) +# +EXPLAIN UPDATE t1, t2 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 +1 PRIMARY t2 ALL NULL NULL NULL NULL 3 +2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3 +3 DERIVED t2 ALL NULL NULL NULL NULL 3 Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1, t2 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +1 PRIMARY t2 ALL NULL NULL NULL NULL 3 100.00 +2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3 100.00 +3 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1, t2 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +1 PRIMARY t2 ALL NULL NULL NULL NULL 3 100.00 Using join buffer (flat, BNL join) +2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3 100.00 +3 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 Using filesort +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` semi join ((select `test`.`t2`.`b` AS `b` from `test`.`t2` order by `test`.`t2`.`b` limit 2,2) `x`) join `test`.`t2` where 1 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 3 +Handler_read_rnd_next 10 +Sort_priority_queue_sorts 1 +Sort_rows 3 +Sort_scan 1 +# Status of testing query execution: +Variable_name Value +Handler_read_key 3 +Handler_read_rnd_next 10 +Sort_priority_queue_sorts 1 +Sort_rows 3 +Sort_scan 1 + +# +# query: UPDATE t1, (SELECT * FROM t2) y SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x) +# select: SELECT * FROM t1, (SELECT * FROM t2) y WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x) +# +EXPLAIN UPDATE t1, (SELECT * FROM t2) y SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 +1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1 +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 +3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 3 +4 DERIVED t2 ALL NULL NULL NULL NULL 3 Using filesort +2 DERIVED t2 ALL NULL NULL NULL NULL 3 +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1, (SELECT * FROM t2) y SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 +1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1 100.00 +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 100.00 +3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 3 100.00 +4 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 Using filesort +2 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT * FROM t1, (SELECT * FROM t2) y WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 +1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1 100.00 +1 PRIMARY t2 ALL NULL NULL NULL NULL 3 100.00 Using join buffer (flat, BNL join) +3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 3 100.00 +4 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 Using filesort +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` semi join ((select `test`.`t2`.`b` AS `b` from `test`.`t2` order by `test`.`t2`.`b` limit 2,2) `x`) join `test`.`t2` where 1 +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_key 3 +Handler_read_rnd_next 10 +Sort_priority_queue_sorts 1 +Sort_rows 3 +Sort_scan 1 +# Status of testing query execution: +Variable_name Value +Handler_read_key 3 +Handler_read_rnd_next 10 +Sort_priority_queue_sorts 1 +Sort_rows 3 +Sort_scan 1 + +DROP TABLE t1,t2; +#70 +CREATE TABLE t1 (c1 INT KEY); +CREATE TABLE t2 (c2 INT); +CREATE TABLE t3 (c3 INT); +EXPLAIN EXTENDED UPDATE t3 SET c3 = ( +SELECT COUNT(d1.c1) +FROM ( +SELECT a11.c1 FROM t1 AS a11 +STRAIGHT_JOIN t2 AS a21 ON a21.c2 = a11.c1 +JOIN t1 AS a12 ON a12.c1 = a11.c1 +) d1 +); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 ALL NULL NULL NULL NULL 0 100.00 +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +DROP TABLE t1, t2, t3; +#73 +CREATE TABLE t1 (id INT); +CREATE TABLE t2 (id INT); +INSERT INTO t1 VALUES (1), (2); +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USING(id) GROUP BY t1.id; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found; Using temporary; Using filesort +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 +DROP TABLE t1,t2; +#74 +CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; +Warnings: +Warning 1286 Unknown storage engine 'InnoDB' +Warning 1266 Using storage engine MyISAM for table 't1' +INSERT INTO t1 VALUES (1), (2), (3), (4), (5); +# used key is modified & Using temporary +# +# query: UPDATE t1 SET a=a+1 WHERE a>10 +# select: SELECT a t1 FROM t1 WHERE a>10 +# +EXPLAIN UPDATE t1 SET a=a+1 WHERE a>10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where; Using buffer +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 SET a=a+1 WHERE a>10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 100.00 Using where; Using buffer +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT a t1 FROM t1 WHERE a>10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 5 20.00 Using where; Using index +Warnings: +Note 1003 select `test`.`t1`.`a` AS `t1` from `test`.`t1` where (`test`.`t1`.`a` > 10) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_first 1 +Handler_read_next 5 +# Status of testing query execution: +Variable_name Value +Handler_read_key 1 + +# used key is modified & Using filesort +# +# query: UPDATE t1 SET a=a+1 WHERE a>10 ORDER BY a+20 +# select: SELECT a t1 FROM t1 WHERE a>10 ORDER BY a+20 +# +EXPLAIN UPDATE t1 SET a=a+1 WHERE a>10 ORDER BY a+20; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where; Using filesort +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED UPDATE t1 SET a=a+1 WHERE a>10 ORDER BY a+20; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 100.00 Using where; Using filesort +# Status of EXPLAIN EXTENDED query +Variable_name Value +FLUSH STATUS; +FLUSH TABLES; +EXPLAIN EXTENDED SELECT a t1 FROM t1 WHERE a>10 ORDER BY a+20; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 5 20.00 Using where; Using index; Using filesort +Warnings: +Note 1003 select `test`.`t1`.`a` AS `t1` from `test`.`t1` where (`test`.`t1`.`a` > 10) order by (`test`.`t1`.`a` + 20) +# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution +Variable_name Value +# Status of "equivalent" SELECT query execution: +Variable_name Value +Handler_read_rnd_next 6 +Sort_scan 1 +# Status of testing query execution: +Variable_name Value +Handler_read_key 1 +Sort_range 1 + +DROP TABLE t1; +# +# Bug #12949629: CLIENT LOSES CONNECTION AFTER EXECUTING A PROCEDURE WITH +# EXPLAIN UPDATE/DEL/INS +# +CREATE TABLE t1 (i INT); +CREATE TABLE t2 (i INT); +CREATE PROCEDURE p1() BEGIN EXPLAIN INSERT INTO t1 VALUES (1);END| +CREATE PROCEDURE p2() BEGIN INSERT INTO t1 VALUES (1);END| +CREATE PROCEDURE p3() BEGIN EXPLAIN INSERT INTO t1 SELECT 1;END| +CREATE PROCEDURE p4() BEGIN INSERT INTO t1 SELECT 1;END| +CREATE PROCEDURE p5() BEGIN EXPLAIN REPLACE INTO t1 VALUES (1);END| +CREATE PROCEDURE p6() BEGIN REPLACE INTO t1 VALUES (1);END| +CREATE PROCEDURE p7() BEGIN EXPLAIN REPLACE INTO t1 SELECT 1;END| +CREATE PROCEDURE p8() BEGIN REPLACE INTO t1 SELECT 1;END| +CREATE PROCEDURE p9() BEGIN EXPLAIN UPDATE t1 SET i = 10;END| +CREATE PROCEDURE p10() BEGIN UPDATE t1 SET i = 10;END| +CREATE PROCEDURE p11() BEGIN EXPLAIN UPDATE t1,t2 SET t1.i = 10 WHERE t1.i = t2.i ;END| +CREATE PROCEDURE p12() BEGIN UPDATE t1,t2 SET t1.i = 10 WHERE t1.i = t2.i ;END| +CREATE PROCEDURE p13() BEGIN EXPLAIN DELETE FROM t1;END| +CREATE PROCEDURE p14() BEGIN DELETE FROM t1;END| +CREATE PROCEDURE p15() BEGIN EXPLAIN DELETE FROM t1 USING t1;END| +CREATE PROCEDURE p16() BEGIN DELETE FROM t1 USING t1;END| +CALL p16(); +DROP PROCEDURE p16; +CALL p15(); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found +DROP PROCEDURE p15; +CALL p14(); +DROP PROCEDURE p14; +CALL p13(); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL 0 Deleting all rows +DROP PROCEDURE p13; +CALL p12(); +DROP PROCEDURE p12; +CALL p11(); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +DROP PROCEDURE p11; +CALL p10(); +DROP PROCEDURE p10; +CALL p9(); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 0 +DROP PROCEDURE p9; +CALL p8(); +DROP PROCEDURE p8; +CALL p7(); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used +DROP PROCEDURE p7; +CALL p6(); +DROP PROCEDURE p6; +CALL p5(); +id select_type table type possible_keys key key_len ref rows Extra +1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL +DROP PROCEDURE p5; +CALL p4(); +DROP PROCEDURE p4; +CALL p3(); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used +DROP PROCEDURE p3; +CALL p2(); +DROP PROCEDURE p2; +CALL p1(); +id select_type table type possible_keys key key_len ref rows Extra +1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL +DROP PROCEDURE p1; +DROP TABLE t1, t2; +# +set default_storage_engine= @save_storage_engine; +set optimizer_switch=default; diff --git a/mysql-test/r/myisam_icp.result b/mysql-test/r/myisam_icp.result index 9b31bca7932..ea57146dad2 100644 --- a/mysql-test/r/myisam_icp.result +++ b/mysql-test/r/myisam_icp.result @@ -715,6 +715,9 @@ a INT PRIMARY KEY NOT NULL AUTO_INCREMENT, b INT, c INT, d DATE NOT NULL, e VARCHAR(1), KEY (c), KEY (d), KEY k2(b), KEY k3(b), KEY k4(b) ); +Warnings: +Note 1831 Duplicate index `k3`. This is deprecated and will be disallowed in a future release. +Note 1831 Duplicate index `k4`. This is deprecated and will be disallowed in a future release. INSERT INTO t1 (b,c,d,e) VALUES (6,5,'2006-05-25','y'),(1,5,'2008-01-23','t'), (6,5,'2007-06-18','d'),(4,5,'1900-01-01','r'), diff --git a/mysql-test/r/myisam_optimize.result b/mysql-test/r/myisam_optimize.result index 341c3e180b8..ae0c5b59d06 100644 --- a/mysql-test/r/myisam_optimize.result +++ b/mysql-test/r/myisam_optimize.result @@ -11,7 +11,7 @@ select left(b,10), a from t1 order by a; left(b,10) a CCCCCCCCCC 3 CCCCCCCCCC 4 -set debug_sync='myisam_after_repair_by_sort wait_for go'; +set debug_sync='myisam_before_repair_by_sort wait_for go'; optimize table t1; select a, left(b,10) from t1 order by a; set debug_sync='now signal go'; diff --git a/mysql-test/r/myisampack.result b/mysql-test/r/myisampack.result index aeb12c1f68e..13321695360 100644 --- a/mysql-test/r/myisampack.result +++ b/mysql-test/r/myisampack.result @@ -113,7 +113,7 @@ ERROR 42S02: Table 'test.t3' doesn't exist # ===== myisampack.4 ===== #Tests the myisampack join operation with an existing destination .frm,.MYI,.MDI #the command should fail with exit status 2 -myisampack: Can't create/write to file (Errcode: 17) +myisampack: Can't create/write to file (Errcode: 17 "File exists") Aborted: file is not compressed DROP TABLE t1,t2,t3; DROP TABLE mysql_db1.t1; @@ -204,3 +204,10 @@ checksum table t1; Table Checksum test.t1 2330021136 drop table t1; +# +# BUG#11751736: DROP DATABASE STATEMENT SHOULD REMOVE .OLD SUFFIX FROM +# DATABASE DIRECTORY +# +CREATE DATABASE db1; +CREATE TABLE db1.t1(c1 INT) ENGINE=MyISAM; +DROP DATABASE db1; diff --git a/mysql-test/r/mysql5613mysql.result b/mysql-test/r/mysql5613mysql.result new file mode 100644 index 00000000000..501c723f711 --- /dev/null +++ b/mysql-test/r/mysql5613mysql.result @@ -0,0 +1,302 @@ +# +# MDEV-4819 Upgrade from MySQL 5.6 does not work +# Testing that we can open system tables created in MySQL-5.6 (5.6.13) +# +SHOW CREATE TABLE columns_priv; +Table Create Table +columns_priv CREATE TABLE `columns_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges' +SELECT * FROM columns_priv LIMIT 0; +Host Db User Table_name Column_name Timestamp Column_priv +DROP TABLE columns_priv; +SHOW CREATE TABLE db; +Table Create Table +db CREATE TABLE `db` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`Db`,`User`), + KEY `User` (`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' +SELECT * FROM db LIMIT 0; +Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv +DROP TABLE db; +SHOW CREATE TABLE event; +Table Create Table +event CREATE TABLE `event` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `body` longblob NOT NULL, + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `execute_at` datetime DEFAULT NULL, + `interval_value` int(11) DEFAULT NULL, + `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_executed` datetime DEFAULT NULL, + `starts` datetime DEFAULT NULL, + `ends` datetime DEFAULT NULL, + `status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED', + `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `originator` int(10) unsigned NOT NULL, + `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events' +SELECT * FROM event LIMIT 0; +db name body definer execute_at interval_value interval_field created modified last_executed starts ends status on_completion sql_mode comment originator time_zone character_set_client collation_connection db_collation body_utf8 +DROP TABLE event; +SHOW CREATE TABLE func; +Table Create Table +func CREATE TABLE `func` ( + `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `ret` tinyint(1) NOT NULL DEFAULT '0', + `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', + `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions' +SELECT * FROM func LIMIT 0; +name ret dl type +DROP TABLE func; +SHOW CREATE TABLE plugin; +Table Create Table +plugin CREATE TABLE `plugin` ( + `name` varchar(64) NOT NULL DEFAULT '', + `dl` varchar(128) NOT NULL DEFAULT '', + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL plugins' +SELECT * FROM plugin LIMIT 0; +name dl +DROP TABLE plugin; +SHOW CREATE TABLE proc; +Table Create Table +proc CREATE TABLE `proc` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `type` enum('FUNCTION','PROCEDURE') NOT NULL, + `specific_name` char(64) NOT NULL DEFAULT '', + `language` enum('SQL') NOT NULL DEFAULT 'SQL', + `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL', + `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO', + `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER', + `param_list` blob NOT NULL, + `returns` longblob NOT NULL, + `body` longblob NOT NULL, + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`,`type`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures' +SELECT * FROM proc LIMIT 0; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +DROP TABLE proc; +SHOW CREATE TABLE procs_priv; +Table Create Table +procs_priv CREATE TABLE `procs_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', + `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges' +SELECT * FROM procs_priv LIMIT 0; +Host Db User Routine_name Routine_type Grantor Proc_priv Timestamp +DROP TABLE procs_priv; +SHOW CREATE TABLE proxies_priv; +Table Create Table +proxies_priv CREATE TABLE `proxies_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_user` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `With_grant` tinyint(1) NOT NULL DEFAULT '0', + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges' +SELECT * FROM proxies_priv LIMIT 0; +Host User Proxied_host Proxied_user With_grant Grantor Timestamp +DROP TABLE proxies_priv; +SHOW CREATE TABLE servers; +Table Create Table +servers CREATE TABLE `servers` ( + `Server_name` char(64) NOT NULL DEFAULT '', + `Host` char(64) NOT NULL DEFAULT '', + `Db` char(64) NOT NULL DEFAULT '', + `Username` char(64) NOT NULL DEFAULT '', + `Password` char(64) NOT NULL DEFAULT '', + `Port` int(4) NOT NULL DEFAULT '0', + `Socket` char(64) NOT NULL DEFAULT '', + `Wrapper` char(64) NOT NULL DEFAULT '', + `Owner` char(64) NOT NULL DEFAULT '', + PRIMARY KEY (`Server_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table' +SELECT * FROM servers LIMIT 0; +Server_name Host Db Username Password Port Socket Wrapper Owner +DROP TABLE servers; +SHOW CREATE TABLE tables_priv; +Table Create Table +tables_priv CREATE TABLE `tables_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges' +SELECT * FROM tables_priv LIMIT 0; +Host Db User Table_name Grantor Timestamp Table_priv Column_priv +DROP TABLE tables_priv; +SHOW CREATE TABLE time_zone_leap_second; +Table Create Table +time_zone_leap_second CREATE TABLE `time_zone_leap_second` ( + `Transition_time` bigint(20) NOT NULL, + `Correction` int(11) NOT NULL, + PRIMARY KEY (`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones' +SELECT * FROM time_zone_leap_second LIMIT 0; +Transition_time Correction +DROP TABLE time_zone_leap_second; +SHOW CREATE TABLE time_zone; +Table Create Table +time_zone CREATE TABLE `time_zone` ( + `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N', + PRIMARY KEY (`Time_zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zones' +SELECT * FROM time_zone LIMIT 0; +Time_zone_id Use_leap_seconds +DROP TABLE time_zone; +SHOW CREATE TABLE time_zone_name; +Table Create Table +time_zone_name CREATE TABLE `time_zone_name` ( + `Name` char(64) NOT NULL, + `Time_zone_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone names' +SELECT * FROM time_zone_name LIMIT 0; +Name Time_zone_id +DROP TABLE time_zone_name; +SHOW CREATE TABLE time_zone_transition; +Table Create Table +time_zone_transition CREATE TABLE `time_zone_transition` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_time` bigint(20) NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Time_zone_id`,`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transitions' +SELECT * FROM time_zone_transition LIMIT 0; +Time_zone_id Transition_time Transition_type_id +DROP TABLE time_zone_transition; +SHOW CREATE TABLE time_zone_transition_type; +Table Create Table +time_zone_transition_type CREATE TABLE `time_zone_transition_type` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + `Offset` int(11) NOT NULL DEFAULT '0', + `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Abbreviation` char(8) NOT NULL DEFAULT '', + PRIMARY KEY (`Time_zone_id`,`Transition_type_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types' +SELECT * FROM time_zone_transition_type LIMIT 0; +Time_zone_id Transition_type_id Offset Is_DST Abbreviation +DROP TABLE time_zone_transition_type; +SHOW CREATE TABLE user; +Table Create Table +user CREATE TABLE `user` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', + `ssl_cipher` blob NOT NULL, + `x509_issuer` blob NOT NULL, + `x509_subject` blob NOT NULL, + `max_questions` int(11) unsigned NOT NULL DEFAULT '0', + `max_updates` int(11) unsigned NOT NULL DEFAULT '0', + `max_connections` int(11) unsigned NOT NULL DEFAULT '0', + `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0', + `plugin` char(64) COLLATE utf8_bin DEFAULT '', + `authentication_string` text COLLATE utf8_bin, + `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' +SELECT * FROM user LIMIT 0; +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired +DROP TABLE user; diff --git a/mysql-test/r/mysql_client_test.result b/mysql-test/r/mysql_client_test.result index 7875464ebe2..4ad07b20ab5 100644 --- a/mysql-test/r/mysql_client_test.result +++ b/mysql-test/r/mysql_client_test.result @@ -1,5 +1,6 @@ SET @old_general_log= @@global.general_log; SET @old_slow_query_log= @@global.slow_query_log; +call mtr.add_suppression(" Error reading file './client_test_db/test_frm_bug.frm'"); ok # cat MYSQL_TMP_DIR/test_wl4435.out.log diff --git a/mysql-test/r/mysql_client_test_comp.result b/mysql-test/r/mysql_client_test_comp.result new file mode 100644 index 00000000000..b9cac467b92 --- /dev/null +++ b/mysql-test/r/mysql_client_test_comp.result @@ -0,0 +1,4 @@ +SET @old_slow_query_log= @@global.slow_query_log; +call mtr.add_suppression(" Error reading file './client_test_db/test_frm_bug.frm'"); +ok +SET @@global.slow_query_log= @old_slow_query_log; diff --git a/mysql-test/r/mysql_client_test_nonblock.result b/mysql-test/r/mysql_client_test_nonblock.result index edda7980e97..e37e2132b0c 100644 --- a/mysql-test/r/mysql_client_test_nonblock.result +++ b/mysql-test/r/mysql_client_test_nonblock.result @@ -1,5 +1,6 @@ SET @old_general_log= @@global.general_log; SET @old_slow_query_log= @@global.slow_query_log; +call mtr.add_suppression(" Error reading file './client_test_db/test_frm_bug.frm'"); ok SET @@global.general_log= @old_general_log; SET @@global.slow_query_log= @old_slow_query_log; diff --git a/mysql-test/r/mysql_upgrade-6984.result b/mysql-test/r/mysql_upgrade-6984.result new file mode 100644 index 00000000000..6aea4806ddb --- /dev/null +++ b/mysql-test/r/mysql_upgrade-6984.result @@ -0,0 +1,60 @@ +update mysql.user set password=password("foo") where user='root'; +Phase 1/6: Checking and upgrading mysql database +Processing databases +mysql +mysql.column_stats OK +mysql.columns_priv OK +mysql.db OK +mysql.event OK +mysql.func OK +mysql.gtid_slave_pos OK +mysql.help_category OK +mysql.help_keyword OK +mysql.help_relation OK +mysql.help_topic OK +mysql.host OK +mysql.index_stats OK +mysql.innodb_index_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.innodb_table_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.plugin OK +mysql.proc OK +mysql.procs_priv OK +mysql.proxies_priv OK +mysql.roles_mapping OK +mysql.servers OK +mysql.table_stats OK +mysql.tables_priv OK +mysql.time_zone OK +mysql.time_zone_leap_second OK +mysql.time_zone_name OK +mysql.time_zone_transition OK +mysql.time_zone_transition_type OK +mysql.user OK + +Repairing tables +mysql.innodb_index_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.innodb_table_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +Phase 2/6: Fixing views +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names +Phase 5/6: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK +performance_schema +test +Phase 6/6: Running 'FLUSH PRIVILEGES' +OK +update mysql.user set password='' where user='root'; +flush privileges; +set global event_scheduler=OFF; diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result index 49adac312cd..565423be624 100644 --- a/mysql-test/r/mysql_upgrade.result +++ b/mysql-test/r/mysql_upgrade.result @@ -1,28 +1,28 @@ Run mysql_upgrade once -Phase 1/4: Fixing views -Phase 2/4: Fixing table and database names -Phase 3/4: Checking and upgrading tables +Phase 1/6: Checking and upgrading mysql database Processing databases -information_schema -mtr -mtr.global_suppressions OK -mtr.test_suppressions OK mysql +mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK +mysql.gtid_slave_pos OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK -mysql.ndb_binlog_index OK +mysql.index_stats OK +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK +mysql.roles_mapping OK mysql.servers OK +mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK @@ -30,37 +30,46 @@ mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK +Phase 2/6: Fixing views +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names +Phase 5/6: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK performance_schema test -Phase 4/4: Running 'mysql_fix_privilege_tables' +Phase 6/6: Running 'FLUSH PRIVILEGES' OK Run it again - should say already completed This installation of MySQL is already upgraded to VERSION, use --force if you still need to run mysql_upgrade Force should run it regardless of whether it has been run before -Phase 1/4: Fixing views -Phase 2/4: Fixing table and database names -Phase 3/4: Checking and upgrading tables +Phase 1/6: Checking and upgrading mysql database Processing databases -information_schema -mtr -mtr.global_suppressions OK -mtr.test_suppressions OK mysql +mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK +mysql.gtid_slave_pos OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK -mysql.ndb_binlog_index OK +mysql.index_stats OK +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK +mysql.roles_mapping OK mysql.servers OK +mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK @@ -68,37 +77,46 @@ mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK +Phase 2/6: Fixing views +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names +Phase 5/6: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK performance_schema test -Phase 4/4: Running 'mysql_fix_privilege_tables' +Phase 6/6: Running 'FLUSH PRIVILEGES' OK CREATE USER mysqltest1@'%' IDENTIFIED by 'sakila'; GRANT ALL ON *.* TO mysqltest1@'%'; Run mysql_upgrade with password protected account -Phase 1/4: Fixing views -Phase 2/4: Fixing table and database names -Phase 3/4: Checking and upgrading tables +Phase 1/6: Checking and upgrading mysql database Processing databases -information_schema -mtr -mtr.global_suppressions OK -mtr.test_suppressions OK mysql +mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK +mysql.gtid_slave_pos OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK -mysql.ndb_binlog_index OK +mysql.index_stats OK +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK +mysql.roles_mapping OK mysql.servers OK +mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK @@ -106,9 +124,18 @@ mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK +Phase 2/6: Fixing views +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names +Phase 5/6: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK performance_schema test -Phase 4/4: Running 'mysql_fix_privilege_tables' +Phase 6/6: Running 'FLUSH PRIVILEGES' OK DROP USER mysqltest1@'%'; Version check failed. Got the following error when calling the 'mysql' command line client @@ -118,30 +145,30 @@ Run mysql_upgrade with a non existing server socket mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect FATAL ERROR: Upgrade failed set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE'; -Phase 1/4: Fixing views -Phase 2/4: Fixing table and database names -Phase 3/4: Checking and upgrading tables +Phase 1/6: Checking and upgrading mysql database Processing databases -information_schema -mtr -mtr.global_suppressions OK -mtr.test_suppressions OK mysql +mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK +mysql.gtid_slave_pos OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK -mysql.ndb_binlog_index OK +mysql.index_stats OK +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK +mysql.roles_mapping OK mysql.servers OK +mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK @@ -149,9 +176,18 @@ mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK +Phase 2/6: Fixing views +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names +Phase 5/6: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK performance_schema test -Phase 4/4: Running 'mysql_fix_privilege_tables' +Phase 6/6: Running 'FLUSH PRIVILEGES' OK set GLOBAL sql_mode=default; # @@ -162,30 +198,30 @@ CREATE PROCEDURE testproc() BEGIN END; UPDATE mysql.proc SET character_set_client = NULL WHERE name LIKE 'testproc'; UPDATE mysql.proc SET collation_connection = NULL WHERE name LIKE 'testproc'; UPDATE mysql.proc SET db_collation = NULL WHERE name LIKE 'testproc'; -Phase 1/4: Fixing views -Phase 2/4: Fixing table and database names -Phase 3/4: Checking and upgrading tables +Phase 1/6: Checking and upgrading mysql database Processing databases -information_schema -mtr -mtr.global_suppressions OK -mtr.test_suppressions OK mysql +mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK +mysql.gtid_slave_pos OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK -mysql.ndb_binlog_index OK +mysql.index_stats OK +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK +mysql.roles_mapping OK mysql.servers OK +mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK @@ -193,9 +229,18 @@ mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK +Phase 2/6: Fixing views +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names +Phase 5/6: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK performance_schema test -Phase 4/4: Running 'mysql_fix_privilege_tables' +Phase 6/6: Running 'FLUSH PRIVILEGES' OK CALL testproc(); DROP PROCEDURE testproc; @@ -209,30 +254,30 @@ WARNING: NULL values of the 'db_collation' column ('mysql.proc' table) have been GRANT USAGE ON *.* TO 'user3'@'%'; GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'; Run mysql_upgrade with all privileges on a user -Phase 1/4: Fixing views -Phase 2/4: Fixing table and database names -Phase 3/4: Checking and upgrading tables +Phase 1/6: Checking and upgrading mysql database Processing databases -information_schema -mtr -mtr.global_suppressions OK -mtr.test_suppressions OK mysql +mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK +mysql.gtid_slave_pos OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK -mysql.ndb_binlog_index OK +mysql.index_stats OK +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK +mysql.roles_mapping OK mysql.servers OK +mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK @@ -240,9 +285,18 @@ mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK +Phase 2/6: Fixing views +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names +Phase 5/6: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK performance_schema test -Phase 4/4: Running 'mysql_fix_privilege_tables' +Phase 6/6: Running 'FLUSH PRIVILEGES' OK SHOW GRANTS FOR 'user3'@'%'; Grants for user3@% @@ -251,10 +305,42 @@ GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%' DROP USER 'user3'@'%'; End of 5.1 tests The --upgrade-system-tables option was used, user tables won't be touched. -Phase 1/4: Fixing views... Skipped -Phase 2/4: Fixing table and database names ... Skipped -Phase 3/4: Checking and upgrading tables... Skipped -Phase 4/4: Running 'mysql_fix_privilege_tables' +Phase 1/6: Checking and upgrading mysql database +Processing databases +mysql +mysql.column_stats OK +mysql.columns_priv OK +mysql.db OK +mysql.event OK +mysql.func OK +mysql.gtid_slave_pos OK +mysql.help_category OK +mysql.help_keyword OK +mysql.help_relation OK +mysql.help_topic OK +mysql.host OK +mysql.index_stats OK +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK +mysql.plugin OK +mysql.proc OK +mysql.procs_priv OK +mysql.proxies_priv OK +mysql.roles_mapping OK +mysql.servers OK +mysql.table_stats OK +mysql.tables_priv OK +mysql.time_zone OK +mysql.time_zone_leap_second OK +mysql.time_zone_name OK +mysql.time_zone_transition OK +mysql.time_zone_transition_type OK +mysql.user OK +Phase 2/6: Fixing views... Skipped +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names ... Skipped +Phase 5/6: Checking and upgrading tables... Skipped +Phase 6/6: Running 'FLUSH PRIVILEGES' OK # # Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION @@ -262,30 +348,30 @@ OK # # Droping the previously created mysql_upgrade_info file.. # Running mysql_upgrade with --skip-write-binlog.. -Phase 1/4: Fixing views -Phase 2/4: Fixing table and database names -Phase 3/4: Checking and upgrading tables +Phase 1/6: Checking and upgrading mysql database Processing databases -information_schema -mtr -mtr.global_suppressions OK -mtr.test_suppressions OK mysql +mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK +mysql.gtid_slave_pos OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK -mysql.ndb_binlog_index OK +mysql.index_stats OK +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK +mysql.roles_mapping OK mysql.servers OK +mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK @@ -293,9 +379,18 @@ mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK +Phase 2/6: Fixing views +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names +Phase 5/6: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK performance_schema test -Phase 4/4: Running 'mysql_fix_privilege_tables' +Phase 6/6: Running 'FLUSH PRIVILEGES' OK # # Bug #21489398: MYSQL_UPGRADE: FATAL ERROR: UPGRADE FAILED - IMPROVE ERROR @@ -308,20 +403,6 @@ FATAL ERROR: Upgrade failed # MDEV-4332 Increase username length from 16 characters # MDEV-6068, MDEV-6178 mysql_upgrade breaks databases with long user names # -alter table mysql.user modify User char(80) binary not null default ''; -alter table mysql.db modify User char(80) binary not null default ''; -alter table mysql.tables_priv modify User char(80) binary not null default ''; -alter table mysql.columns_priv modify User char(80) binary not null default ''; -alter table mysql.procs_priv modify User char(80) binary not null default ''; -alter table mysql.proc modify definer char(141) collate utf8_bin not null default ''; -alter table mysql.event modify definer char(141) collate utf8_bin not null default ''; -alter table mysql.proxies_priv modify User char(80) COLLATE utf8_bin not null default ''; -alter table mysql.proxies_priv modify Proxied_user char(80) COLLATE utf8_bin not null default ''; -alter table mysql.proxies_priv modify Grantor char(141) COLLATE utf8_bin not null default ''; -alter table mysql.servers modify Username char(80) not null default ''; -alter table mysql.procs_priv modify Grantor char(141) COLLATE utf8_bin not null default ''; -alter table mysql.tables_priv modify Grantor char(141) COLLATE utf8_bin not null default ''; -flush privileges; GRANT SELECT ON mysql.* TO very_long_user_name_number_1; GRANT SELECT ON mysql.* TO very_long_user_name_number_2; GRANT ALL ON *.* TO even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@localhost WITH GRANT OPTION; @@ -330,30 +411,30 @@ GRANT INSERT ON mysql.user TO very_long_user_name_number_2; GRANT UPDATE (User) ON mysql.db TO very_long_user_name_number_1; GRANT UPDATE (User) ON mysql.db TO very_long_user_name_number_2; CREATE PROCEDURE test.pr() BEGIN END; -Phase 1/4: Fixing views -Phase 2/4: Fixing table and database names -Phase 3/4: Checking and upgrading tables +Phase 1/6: Checking and upgrading mysql database Processing databases -information_schema -mtr -mtr.global_suppressions OK -mtr.test_suppressions OK mysql +mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK +mysql.gtid_slave_pos OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK -mysql.ndb_binlog_index OK +mysql.index_stats OK +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK +mysql.roles_mapping OK mysql.servers OK +mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK @@ -361,9 +442,18 @@ mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK +Phase 2/6: Fixing views +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names +Phase 5/6: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK performance_schema test -Phase 4/4: Running 'mysql_fix_privilege_tables' +Phase 6/6: Running 'FLUSH PRIVILEGES' OK SELECT definer FROM mysql.proc WHERE db = 'test' AND name = 'pr'; definer @@ -374,18 +464,25 @@ even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@loca even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@localhost DROP USER very_long_user_name_number_1, very_long_user_name_number_2, even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@localhost; DROP PROCEDURE test.pr; -alter table mysql.user modify User char(16) binary not null default ''; -alter table mysql.db modify User char(16) binary not null default ''; -alter table mysql.tables_priv modify User char(16) binary not null default ''; -alter table mysql.columns_priv modify User char(16) binary not null default ''; -alter table mysql.procs_priv modify User char(16) binary not null default ''; -alter table mysql.proc modify definer char(77) collate utf8_bin not null default ''; -alter table mysql.event modify definer char(77) collate utf8_bin not null default ''; -alter table mysql.proxies_priv modify User char(16) COLLATE utf8_bin not null default ''; -alter table mysql.proxies_priv modify Proxied_user char(16) COLLATE utf8_bin not null default ''; -alter table mysql.proxies_priv modify Grantor char(77) COLLATE utf8_bin not null default ''; -alter table mysql.servers modify Username char(64) not null default ''; -alter table mysql.procs_priv modify Grantor char(77) COLLATE utf8_bin not null default ''; -alter table mysql.tables_priv modify Grantor char(77) COLLATE utf8_bin not null default ''; -flush privileges; -End of tests +use test; +alter table mysql.innodb_table_stats modify last_update int not null; +create table extralongname_extralongname_extralongname_extralongname_ext ( +id int(10) unsigned not null, +created_date date not null, +created timestamp not null, +primary key (created,id,created_date) +) engine=innodb stats_persistent=1 default charset=latin1 +partition by range (year(created_date)) +subpartition by hash (month(created_date)) +subpartitions 2 ( +partition p2007 values less than (2008), +partition p2008 values less than (2009) +); +select length(table_name) from mysql.innodb_table_stats; +length(table_name) +79 +79 +79 +79 +drop table extralongname_extralongname_extralongname_extralongname_ext; +End of 10.0 tests diff --git a/mysql-test/r/mysql_upgrade_no_innodb.result b/mysql-test/r/mysql_upgrade_no_innodb.result new file mode 100644 index 00000000000..acbca131587 --- /dev/null +++ b/mysql-test/r/mysql_upgrade_no_innodb.result @@ -0,0 +1,50 @@ +The --upgrade-system-tables option was used, user tables won't be touched. +Phase 1/6: Checking and upgrading mysql database +Processing databases +mysql +mysql.column_stats OK +mysql.columns_priv OK +mysql.db OK +mysql.event OK +mysql.func OK +mysql.gtid_slave_pos OK +mysql.help_category OK +mysql.help_keyword OK +mysql.help_relation OK +mysql.help_topic OK +mysql.host OK +mysql.index_stats OK +mysql.innodb_index_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.innodb_table_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.plugin OK +mysql.proc OK +mysql.procs_priv OK +mysql.proxies_priv OK +mysql.roles_mapping OK +mysql.servers OK +mysql.table_stats OK +mysql.tables_priv OK +mysql.time_zone OK +mysql.time_zone_leap_second OK +mysql.time_zone_name OK +mysql.time_zone_transition OK +mysql.time_zone_transition_type OK +mysql.user OK + +Repairing tables +mysql.innodb_index_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.innodb_table_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +Phase 2/6: Fixing views... Skipped +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names ... Skipped +Phase 5/6: Checking and upgrading tables... Skipped +Phase 6/6: Running 'FLUSH PRIVILEGES' +OK diff --git a/mysql-test/r/mysql_upgrade_ssl.result b/mysql-test/r/mysql_upgrade_ssl.result index 858a2d405c3..e06d1bb1671 100644 --- a/mysql-test/r/mysql_upgrade_ssl.result +++ b/mysql-test/r/mysql_upgrade_ssl.result @@ -1,30 +1,30 @@ # # Bug#55672 mysql_upgrade dies with internal error # -Phase 1/4: Fixing views -Phase 2/4: Fixing table and database names -Phase 3/4: Checking and upgrading tables +Phase 1/6: Checking and upgrading mysql database Processing databases -information_schema -mtr -mtr.global_suppressions OK -mtr.test_suppressions OK mysql +mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK +mysql.gtid_slave_pos OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK -mysql.ndb_binlog_index OK +mysql.index_stats OK +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK +mysql.roles_mapping OK mysql.servers OK +mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK @@ -32,7 +32,16 @@ mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK +Phase 2/6: Fixing views +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names +Phase 5/6: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK performance_schema test -Phase 4/4: Running 'mysql_fix_privilege_tables' +Phase 6/6: Running 'FLUSH PRIVILEGES' OK diff --git a/mysql-test/r/mysql_upgrade_view.result b/mysql-test/r/mysql_upgrade_view.result index fc174e9cfd1..7966941cb1f 100644 --- a/mysql-test/r/mysql_upgrade_view.result +++ b/mysql-test/r/mysql_upgrade_view.result @@ -63,34 +63,34 @@ test.v2 check error Upgrade required. Please do "REPAIR VIEW `v2`" or dump/reloa check view v3 for upgrade; Table Op Msg_type Msg_text test.v3 check error Upgrade required. Please do "REPAIR VIEW `v3`" or dump/reload to fix it! -Phase 1/4: Fixing views -test.v1 OK -test.v1badcheck OK -test.v2 OK -test.v3 OK -Phase 2/4: Fixing table and database names -Phase 3/4: Checking and upgrading tables +Phase 1/6: Checking and upgrading mysql database Processing databases -information_schema -mtr -mtr.global_suppressions OK -mtr.test_suppressions OK mysql +mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK +mysql.gtid_slave_pos OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK -mysql.ndb_binlog_index OK +mysql.index_stats OK +mysql.innodb_index_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.innodb_table_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK +mysql.roles_mapping OK mysql.servers OK +mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK @@ -98,11 +98,32 @@ mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK + +Repairing tables +mysql.innodb_index_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.innodb_table_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +Phase 2/6: Fixing views +test.v1 OK +test.v1badcheck OK +test.v2 OK +test.v3 OK +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names +Phase 5/6: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK performance_schema test test.kv OK test.t1 OK -Phase 4/4: Running 'mysql_fix_privilege_tables' +Phase 6/6: Running 'FLUSH PRIVILEGES' OK show create view v1; View Create View character_set_client collation_connection @@ -125,9 +146,11 @@ REPAIR NO_WRITE_TO_BINLOG VIEW v3; Table Op Msg_type Msg_text test.v3 repair status OK set sql_log_bin=0; -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; REPAIR VIEW v1,v2 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; REPAIR VIEW v1badcheck LOAD DATA INFILE 'MYSQLD_DATADIR/test/v1.frm' REPLACE INTO TABLE kv FIELDS TERMINATED BY '='; SELECT k,v from kv where k in ('md5','algorithm'); @@ -182,35 +205,35 @@ show create view v4; View Create View character_set_client collation_connection v4 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS select `t1`.`a` AS `a` from `t1` latin1 latin1_swedish_ci MySQL upgrade detected -Phase 1/4: Fixing views from mysql -test.v1 OK -test.v2 OK -test.v3 OK -test.v4 OK -Phase 2/4: Fixing table and database names -Phase 3/4: Checking and upgrading tables +Phase 1/6: Checking and upgrading mysql database Processing databases -information_schema -mtr -mtr.global_suppressions OK -mtr.test_suppressions OK mysql +mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.ev_bk OK mysql.event OK mysql.func OK +mysql.gtid_slave_pos OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK -mysql.ndb_binlog_index OK +mysql.index_stats OK +mysql.innodb_index_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.innodb_table_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK +mysql.roles_mapping OK mysql.servers OK +mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK @@ -218,11 +241,32 @@ mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK + +Repairing tables +mysql.innodb_index_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.innodb_table_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +Phase 2/6: Fixing views from mysql +test.v1 OK +test.v2 OK +test.v3 OK +test.v4 OK +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names +Phase 5/6: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK performance_schema test test.kv OK test.t1 OK -Phase 4/4: Running 'mysql_fix_privilege_tables' +Phase 6/6: Running 'FLUSH PRIVILEGES' OK show create view v1; View Create View character_set_client collation_connection @@ -254,15 +298,23 @@ test.v1 OK test.v2 OK test.v3 OK test.v4 OK -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; REPAIR VIEW v1,v2 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; REPAIR VIEW v1badcheck +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; REPAIR TABLE `kv` USE_FRM +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; REPAIR TABLE `t1` USE_FRM +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; REPAIR VIEW `v1` FROM MYSQL +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; REPAIR VIEW `v2` FROM MYSQL +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; REPAIR VIEW `v3` FROM MYSQL +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; REPAIR VIEW `v4` FROM MYSQL drop table if exists kv; drop view v1,v2,v3,v4; @@ -270,13 +322,58 @@ rename table mysql.event to mysql.ev_bk; flush tables; The --upgrade-system-tables option was used, user tables won't be touched. MySQL upgrade detected -Phase 1/4: Fixing views from mysql +Phase 1/6: Checking and upgrading mysql database +Processing databases +mysql +mysql.column_stats OK +mysql.columns_priv OK +mysql.db OK +mysql.ev_bk OK +mysql.event OK +mysql.func OK +mysql.gtid_slave_pos OK +mysql.help_category OK +mysql.help_keyword OK +mysql.help_relation OK +mysql.help_topic OK +mysql.host OK +mysql.index_stats OK +mysql.innodb_index_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.innodb_table_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.plugin OK +mysql.proc OK +mysql.procs_priv OK +mysql.proxies_priv OK +mysql.roles_mapping OK +mysql.servers OK +mysql.table_stats OK +mysql.tables_priv OK +mysql.time_zone OK +mysql.time_zone_leap_second OK +mysql.time_zone_name OK +mysql.time_zone_transition OK +mysql.time_zone_transition_type OK +mysql.user OK + +Repairing tables +mysql.innodb_index_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.innodb_table_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +Phase 2/6: Fixing views from mysql test.v1 OK test.v2 OK test.v3 OK -Phase 2/4: Fixing table and database names ... Skipped -Phase 3/4: Checking and upgrading tables... Skipped -Phase 4/4: Running 'mysql_fix_privilege_tables' +Phase 3/6: Running 'mysql_fix_privilege_tables' +Phase 4/6: Fixing table and database names ... Skipped +Phase 5/6: Checking and upgrading tables... Skipped +Phase 6/6: Running 'FLUSH PRIVILEGES' OK drop table mysql.event; rename table mysql.ev_bk to mysql.event; diff --git a/mysql-test/r/mysqlbinlog-innodb.result b/mysql-test/r/mysqlbinlog-innodb.result index a5865fe4fac..f0358928c0e 100644 --- a/mysql-test/r/mysqlbinlog-innodb.result +++ b/mysql-test/r/mysqlbinlog-innodb.result @@ -24,6 +24,9 @@ FLUSH LOGS; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; +BEGIN +/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -33,14 +36,9 @@ SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/ SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -BEGIN -/*!*/; -use `test`/*!*/; -SET TIMESTAMP=1000000000/*!*/; INSERT INTO t1 VALUES (1) /*!*/; COMMIT/*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -57,6 +55,9 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; +BEGIN +/*!*/; +use `foo`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -66,14 +67,9 @@ SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/ SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -BEGIN -/*!*/; -use `foo`/*!*/; -SET TIMESTAMP=1000000000/*!*/; INSERT INTO t1 VALUES (1) /*!*/; COMMIT/*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 823c7dc8629..fe1af53e837 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -37,7 +37,6 @@ create table t1 (word varchar(20)) SET TIMESTAMP=1000000000/*!*/; create table t2 (id int auto_increment not null primary key) /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -46,7 +45,6 @@ insert into t1 values ("abirvalg") SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET INSERT_ID=1/*!*/; @@ -56,7 +54,6 @@ insert into t2 values () SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -65,7 +62,6 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -74,7 +70,6 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -83,7 +78,6 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -103,6 +97,9 @@ ROLLBACK /* added by mysqlbinlog */; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; +BEGIN +/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -112,16 +109,11 @@ SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/ SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -BEGIN -/*!*/; -use `test`/*!*/; -SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -142,6 +134,8 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; +BEGIN +/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -151,37 +145,29 @@ SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/ SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -BEGIN -/*!*/; -SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -198,6 +184,9 @@ ROLLBACK /* added by mysqlbinlog */; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; +BEGIN +/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -207,10 +196,6 @@ SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/ SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -BEGIN -/*!*/; -use `test`/*!*/; -SET TIMESTAMP=1000000000/*!*/; insert into t1 values ("Alas") /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -246,7 +231,6 @@ create table t1 (word varchar(20)) SET TIMESTAMP=1000000000/*!*/; create table t2 (id int auto_increment not null primary key) /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -255,7 +239,6 @@ insert into t1 values ("abirvalg") SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET INSERT_ID=1/*!*/; @@ -265,7 +248,6 @@ insert into t2 values () SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -274,7 +256,6 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -283,7 +264,6 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -292,7 +272,6 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -312,6 +291,9 @@ ROLLBACK /* added by mysqlbinlog */; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; +BEGIN +/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -321,16 +303,11 @@ SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/ SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -BEGIN -/*!*/; -use `test`/*!*/; -SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -351,6 +328,8 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; +BEGIN +/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -360,37 +339,29 @@ SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/ SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -BEGIN -/*!*/; -SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -407,6 +378,9 @@ ROLLBACK /* added by mysqlbinlog */; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; +BEGIN +/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -416,10 +390,6 @@ SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/ SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -BEGIN -/*!*/; -use `test`/*!*/; -SET TIMESTAMP=1000000000/*!*/; insert into t1 values ("Alas") /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -583,7 +553,6 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a varchar(64) character set utf8) /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -592,27 +561,24 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; -SET @@session.collation_database=7/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; +SET @@session.collation_database=7/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; -SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -621,27 +587,24 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; -SET @@session.collation_database=7/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; +SET @@session.collation_database=7/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; -SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=1000000000/*!*/; BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -663,13 +626,13 @@ FLUSH LOGS; INSERT INTO t1 VALUES ('0123456789'); FLUSH LOGS; DROP TABLE t1; -We expect this value to be 1 +We expect this value to be 2 (one for the INSERT, one for COMMIT). The bug being tested was that 'Query' lines were not preceded by '#' If the line is in the table, it had to have been preceded by a '#' -SELECT COUNT(*) AS `BUG#28293_expect_3` FROM patch WHERE a LIKE '%Query%'; -BUG#28293_expect_3 -3 +SELECT COUNT(*) AS `BUG#28293_expect_2` FROM patch WHERE a LIKE '#%Query%'; +BUG#28293_expect_2 +2 DROP TABLE patch; FLUSH LOGS; CREATE TABLE t1(a INT); @@ -922,14 +885,22 @@ CREATE TABLE t1(id int); DROP TABLE t1; DROP DATABASE test1; FLUSH LOGS; -show binlog events in 'master-bin.000002' from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Binlog_checkpoint # # master-bin.000002 +master-bin.000002 # Gtid # # GTID #-#-# master-bin.000002 # Query # # CREATE DATABASE test1 +master-bin.000002 # Gtid # # GTID #-#-# master-bin.000002 # Query # # use `test1`; CREATE TABLE t1(id int) +master-bin.000002 # Gtid # # GTID #-#-# master-bin.000002 # Query # # DROP DATABASE test1 +master-bin.000002 # Gtid # # GTID #-#-# master-bin.000002 # Query # # CREATE DATABASE test1 +master-bin.000002 # Gtid # # GTID #-#-# master-bin.000002 # Query # # use `test1`; CREATE TABLE t1(id int) +master-bin.000002 # Gtid # # GTID #-#-# master-bin.000002 # Query # # use `test1`; DROP TABLE `t1` /* generated by server */ +master-bin.000002 # Gtid # # GTID #-#-# master-bin.000002 # Query # # DROP DATABASE test1 RESET MASTER; USE test; @@ -943,3 +914,340 @@ t1 SHOW TABLES IN test; Tables_in_test SET GLOBAL SERVER_ID = 1; +# +# MDEV-4645: Incorrect reads of frozen binlog events; +# FDE corrupted in relay log +# +/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +# at 4 +#130807 20:29:20 server id 1 end_log_pos 106 +# Position +# |Timestamp |Type |Master ID |Size |Master Pos |Flags +# 4 |20 ae 02 52 |0f |01 00 00 00 |66 00 00 00 |6a 00 00 00 |00 01 +# +# 17 04 00 35 2e 31 2e 36 33 2d 67 6f 6f 67 6c 65 2d |..5.1.63-google-| +# 27 64 65 62 75 67 2d 6c 6f 67 00 00 00 00 00 00 00 |debug-log.......| +# 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +# 47 00 00 00 00 20 ae 02 52 17 38 0d 00 08 00 12 00 |.... ..R.8......| +# 57 04 04 04 04 12 00 00 53 00 04 1a 08 00 00 00 08 |.......S........| +# 67 08 08 02 |...| +# +# Event: Start: binlog v 4, server v 5.1.63-google-debug-log created 130807 20:29:20 at startup +ROLLBACK/*!*/; +BINLOG ' +IK4CUg8BAAAAZgAAAGoAAAAAAQQANS4xLjYzLWdvb2dsZS1kZWJ1Zy1sb2cAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAgrgJSFzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC +'/*!*/; +# at 106 +#130807 20:29:24 server id 1 end_log_pos 207 +# Position +# |Timestamp |Type |Master ID |Size |Master Pos |Flags +# 6a |24 ae 02 52 |02 |01 00 00 00 |65 00 00 00 |cf 00 00 00 |00 00 +# +# 81 01 00 00 00 00 00 00 00 00 00 00 1a 00 00 00 40 |...............@| +# 91 00 00 01 00 00 00 00 00 00 00 00 06 03 73 74 64 |.............std| +# a1 04 08 00 08 00 08 00 00 63 72 65 61 74 65 20 74 |........create t| +# b1 61 62 6c 65 20 74 65 73 74 2e 74 31 20 28 69 64 |able test.t1 (id| +# c1 20 69 6e 74 20 6e 6f 74 20 6e 75 6c 6c 29 | int not null)| +# +# Event: Query thread_id=1 exec_time=0 error_code=0 +SET TIMESTAMP=1375907364/*!*/; +SET @@session.pseudo_thread_id=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; +create table test.t1 (id int not null) +/*!*/; +# at 207 +#130807 20:29:26 server id 1 end_log_pos 305 +# Position +# |Timestamp |Type |Master ID |Size |Master Pos |Flags +# cf |26 ae 02 52 |02 |01 00 00 00 |62 00 00 00 |31 01 00 00 |00 00 +# +# e6 01 00 00 00 00 00 00 00 00 00 00 1a 00 00 00 40 |...............@| +# f6 00 00 01 00 00 00 00 00 00 00 00 06 03 73 74 64 |.............std| +# 106 04 08 00 08 00 08 00 00 69 6e 73 65 72 74 20 69 |........insert i| +# 116 6e 74 6f 20 74 65 73 74 2e 74 31 20 28 69 64 29 |nto test.t1 (id)| +# 126 20 76 61 6c 75 65 73 20 28 31 29 | values (1)| +# +# Event: Query thread_id=1 exec_time=0 error_code=0 +SET TIMESTAMP=1375907366/*!*/; +insert into test.t1 (id) values (1) +/*!*/; +# at 305 +#130807 20:29:28 server id 1 end_log_pos 386 +# Position +# |Timestamp |Type |Master ID |Size |Master Pos |Flags +# 131 |28 ae 02 52 |02 |01 00 00 00 |51 00 00 00 |82 01 00 00 |00 00 +# +# 148 01 00 00 00 00 00 00 00 00 00 00 1a 00 00 00 40 |...............@| +# 158 00 00 01 00 00 00 00 00 00 00 00 06 03 73 74 64 |.............std| +# 168 04 08 00 08 00 08 00 00 64 72 6f 70 20 74 61 62 |........drop tab| +# 178 6c 65 20 74 65 73 74 2e 74 31 |le test.t1| +# +# Event: Query thread_id=1 exec_time=0 error_code=0 +SET TIMESTAMP=1375907368/*!*/; +drop table test.t1 +/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; +/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +# at 4 +#130807 20:25:35 server id 1 end_log_pos 106 +# Position +# |Timestamp |Type |Master ID |Size |Master Pos |Flags +# 4 |3f ad 02 52 |0f |01 00 00 00 |66 00 00 00 |6a 00 00 00 |00 00 +# +# 17 04 00 35 2e 31 2e 36 33 2d 67 6f 6f 67 6c 65 2d |..5.1.63-google-| +# 27 64 65 62 75 67 2d 6c 6f 67 00 00 00 00 00 00 00 |debug-log.......| +# 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +# 47 00 00 00 00 3f ad 02 52 1b 38 0d 00 08 00 12 00 |....?..R.8......| +# 57 04 04 04 04 12 00 00 53 00 04 1a 08 00 00 00 08 |.......S........| +# 67 08 08 02 |...| +# +# Event: Start: binlog v 4, server v 5.1.63-google-debug-log created 130807 20:25:35 at startup +ROLLBACK/*!*/; +BINLOG ' +P60CUg8BAAAAZgAAAGoAAAAAAAQANS4xLjYzLWdvb2dsZS1kZWJ1Zy1sb2cAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAA/rQJSGzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC +'/*!*/; +# at 106 +#130807 20:25:41 server id 1 end_log_pos 211 +# Position +# |Timestamp |Type |Master ID |Size |Master Pos |Flags +# 6a |45 ad 02 52 |02 |01 00 00 00 |69 00 00 00 |d3 00 00 00 |00 00 +# +# 85 01 00 00 00 01 00 00 00 00 00 00 1a 00 00 00 40 |...............@| +# 95 00 00 01 00 00 00 00 00 00 00 00 06 03 73 74 64 |.............std| +# a5 04 08 00 08 00 08 00 00 63 72 65 61 74 65 20 74 |........create t| +# b5 61 62 6c 65 20 74 65 73 74 2e 74 31 20 28 69 64 |able test.t1 (id| +# c5 20 69 6e 74 20 6e 6f 74 20 6e 75 6c 6c 29 | int not null)| +# +# Event: Query thread_id=1 exec_time=1 error_code=0 +SET TIMESTAMP=1375907141/*!*/; +SET @@session.pseudo_thread_id=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; +create table test.t1 (id int not null) +/*!*/; +# at 211 +#130807 20:25:44 server id 1 end_log_pos 313 +# Position +# |Timestamp |Type |Master ID |Size |Master Pos |Flags +# d3 |48 ad 02 52 |02 |01 00 00 00 |66 00 00 00 |39 01 00 00 |00 00 +# +# ee 01 00 00 00 00 00 00 00 00 00 00 1a 00 00 00 40 |...............@| +# fe 00 00 01 00 00 00 00 00 00 00 00 06 03 73 74 64 |.............std| +# 10e 04 08 00 08 00 08 00 00 69 6e 73 65 72 74 20 69 |........insert i| +# 11e 6e 74 6f 20 74 65 73 74 2e 74 31 20 28 69 64 29 |nto test.t1 (id)| +# 12e 20 76 61 6c 75 65 73 20 28 31 29 | values (1)| +# +# Event: Query thread_id=1 exec_time=0 error_code=0 +SET TIMESTAMP=1375907144/*!*/; +insert into test.t1 (id) values (1) +/*!*/; +# at 313 +#130807 20:25:48 server id 1 end_log_pos 398 +# Position +# |Timestamp |Type |Master ID |Size |Master Pos |Flags +# 139 |4c ad 02 52 |02 |01 00 00 00 |55 00 00 00 |8e 01 00 00 |00 00 +# +# 154 01 00 00 00 00 00 00 00 00 00 00 1a 00 00 00 40 |...............@| +# 164 00 00 01 00 00 00 00 00 00 00 00 06 03 73 74 64 |.............std| +# 174 04 08 00 08 00 08 00 00 64 72 6f 70 20 74 61 62 |........drop tab| +# 184 6c 65 20 74 65 73 74 2e 74 31 |le test.t1| +# +# Event: Query thread_id=1 exec_time=0 error_code=0 +SET TIMESTAMP=1375907148/*!*/; +drop table test.t1 +/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; +/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +# at 4 +#130807 20:20:55 server id 1 end_log_pos 106 +# Position +# |Timestamp |Type |Master ID |Size |Master Pos |Flags +# 4 |27 ac 02 52 |0f |01 00 00 00 |66 00 00 00 |6a 00 00 00 |00 01 +# +# 17 04 00 35 2e 31 2e 36 33 2d 67 6f 6f 67 6c 65 2d |..5.1.63-google-| +# 27 64 65 62 75 67 2d 6c 6f 67 00 00 00 00 00 00 00 |debug-log.......| +# 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +# 47 00 00 00 00 27 ac 02 52 1f 38 0d 00 08 00 12 00 |....'..R.8......| +# 57 04 04 04 04 12 00 00 53 00 04 1a 08 00 00 00 08 |.......S........| +# 67 08 08 02 |...| +# +# Event: Start: binlog v 4, server v 5.1.63-google-debug-log created 130807 20:20:55 at startup +ROLLBACK/*!*/; +BINLOG ' +J6wCUg8BAAAAZgAAAGoAAAAAAQQANS4xLjYzLWdvb2dsZS1kZWJ1Zy1sb2cAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAnrAJSHzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC +'/*!*/; +# at 106 +#130807 20:21:19 server id 1 end_log_pos 215 +# Position +# |Timestamp |Type |Master ID |Size |Master Pos |Flags +# 6a |3f ac 02 52 |02 |01 00 00 00 |6d 00 00 00 |d7 00 00 00 |00 00 +# +# 89 01 00 00 00 00 00 00 00 00 00 00 1a 00 00 00 40 |...............@| +# 99 00 00 01 00 00 00 00 00 00 00 00 06 03 73 74 64 |.............std| +# a9 04 08 00 08 00 08 00 00 63 72 65 61 74 65 20 74 |........create t| +# b9 61 62 6c 65 20 74 65 73 74 2e 74 31 20 28 69 64 |able test.t1 (id| +# c9 20 69 6e 74 20 6e 6f 74 20 6e 75 6c 6c 29 | int not null)| +# +# Event: Query thread_id=1 exec_time=0 error_code=0 +SET TIMESTAMP=1375906879/*!*/; +SET @@session.pseudo_thread_id=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; +create table test.t1 (id int not null) +/*!*/; +# at 215 +#130807 20:21:31 server id 1 end_log_pos 321 +# Position +# |Timestamp |Type |Master ID |Size |Master Pos |Flags +# d7 |4b ac 02 52 |02 |01 00 00 00 |6a 00 00 00 |41 01 00 00 |00 00 +# +# f6 01 00 00 00 00 00 00 00 00 00 00 1a 00 00 00 40 |...............@| +# 106 00 00 01 00 00 00 00 00 00 00 00 06 03 73 74 64 |.............std| +# 116 04 08 00 08 00 08 00 00 69 6e 73 65 72 74 20 69 |........insert i| +# 126 6e 74 6f 20 74 65 73 74 2e 74 31 20 28 69 64 29 |nto test.t1 (id)| +# 136 20 76 61 6c 75 65 73 20 28 31 29 | values (1)| +# +# Event: Query thread_id=1 exec_time=0 error_code=0 +SET TIMESTAMP=1375906891/*!*/; +insert into test.t1 (id) values (1) +/*!*/; +# at 321 +#130807 20:21:41 server id 1 end_log_pos 410 +# Position +# |Timestamp |Type |Master ID |Size |Master Pos |Flags +# 141 |55 ac 02 52 |02 |01 00 00 00 |59 00 00 00 |9a 01 00 00 |00 00 +# +# 160 01 00 00 00 00 00 00 00 00 00 00 1a 00 00 00 40 |...............@| +# 170 00 00 01 00 00 00 00 00 00 00 00 06 03 73 74 64 |.............std| +# 180 04 08 00 08 00 08 00 00 64 72 6f 70 20 74 61 62 |........drop tab| +# 190 6c 65 20 74 65 73 74 2e 74 31 |le test.t1| +# +# Event: Query thread_id=1 exec_time=0 error_code=0 +SET TIMESTAMP=1375906901/*!*/; +drop table test.t1 +/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; +/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +# at 4 +#130807 20:38:51 server id 1 end_log_pos 106 +# Position +# |Timestamp |Type |Master ID |Size |Master Pos |Flags +# 4 |5b b0 02 52 |0f |01 00 00 00 |66 00 00 00 |6a 00 00 00 |00 00 +# +# 17 04 00 35 2e 31 2e 36 33 2d 67 6f 6f 67 6c 65 2d |..5.1.63-google-| +# 27 64 65 62 75 67 2d 6c 6f 67 00 00 00 00 00 00 00 |debug-log.......| +# 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +# 47 00 00 00 00 5b b0 02 52 13 38 0d 00 08 00 12 00 |....[..R.8......| +# 57 04 04 04 04 12 00 00 53 00 04 1a 08 00 00 00 08 |.......S........| +# 67 08 08 02 |...| +# +# Event: Start: binlog v 4, server v 5.1.63-google-debug-log created 130807 20:38:51 at startup +ROLLBACK/*!*/; +BINLOG ' +W7ACUg8BAAAAZgAAAGoAAAAAAAQANS4xLjYzLWdvb2dsZS1kZWJ1Zy1sb2cAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAABbsAJSEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC +'/*!*/; +# at 106 +#130807 20:38:53 server id 1 end_log_pos 203 +# Position +# |Timestamp |Type |Master ID |Size |Master Pos |Flags +# 6a |5d b0 02 52 |02 |01 00 00 00 |61 00 00 00 |cb 00 00 00 |00 00 +# +# 7d 01 00 00 00 00 00 00 00 00 00 00 1a 00 00 00 40 |...............@| +# 8d 00 00 01 00 00 00 00 00 00 00 00 06 03 73 74 64 |.............std| +# 9d 04 08 00 08 00 08 00 00 63 72 65 61 74 65 20 74 |........create t| +# ad 61 62 6c 65 20 74 65 73 74 2e 74 31 20 28 69 64 |able test.t1 (id| +# bd 20 69 6e 74 20 6e 6f 74 20 6e 75 6c 6c 29 | int not null)| +# +# Event: Query thread_id=1 exec_time=0 error_code=0 +SET TIMESTAMP=1375907933/*!*/; +SET @@session.pseudo_thread_id=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; +create table test.t1 (id int not null) +/*!*/; +# at 203 +#130807 20:38:55 server id 1 end_log_pos 297 +# Position +# |Timestamp |Type |Master ID |Size |Master Pos |Flags +# cb |5f b0 02 52 |02 |01 00 00 00 |5e 00 00 00 |29 01 00 00 |00 00 +# +# de 01 00 00 00 00 00 00 00 00 00 00 1a 00 00 00 40 |...............@| +# ee 00 00 01 00 00 00 00 00 00 00 00 06 03 73 74 64 |.............std| +# fe 04 08 00 08 00 08 00 00 69 6e 73 65 72 74 20 69 |........insert i| +# 10e 6e 74 6f 20 74 65 73 74 2e 74 31 20 28 69 64 29 |nto test.t1 (id)| +# 11e 20 76 61 6c 75 65 73 20 28 31 29 | values (1)| +# +# Event: Query thread_id=1 exec_time=0 error_code=0 +SET TIMESTAMP=1375907935/*!*/; +insert into test.t1 (id) values (1) +/*!*/; +# at 297 +#130807 20:38:57 server id 1 end_log_pos 374 +# Position +# |Timestamp |Type |Master ID |Size |Master Pos |Flags +# 129 |61 b0 02 52 |02 |01 00 00 00 |4d 00 00 00 |76 01 00 00 |00 00 +# +# 13c 01 00 00 00 00 00 00 00 00 00 00 1a 00 00 00 40 |...............@| +# 14c 00 00 01 00 00 00 00 00 00 00 00 06 03 73 74 64 |.............std| +# 15c 04 08 00 08 00 08 00 00 64 72 6f 70 20 74 61 62 |........drop tab| +# 16c 6c 65 20 74 65 73 74 2e 74 31 |le test.t1| +# +# Event: Query thread_id=1 exec_time=0 error_code=0 +SET TIMESTAMP=1375907937/*!*/; +drop table test.t1 +/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; +mysqlbinlog Ver VER for OS at ARCH diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result index 56556fffb77..256b1375b6b 100644 --- a/mysql-test/r/mysqlcheck.result +++ b/mysql-test/r/mysqlcheck.result @@ -1,23 +1,30 @@ +call mtr.add_suppression("Invalid .old.. table or database name"); DROP TABLE IF EXISTS t1, `t``1`, `t 1`, test.`t.1`, v1; drop view if exists t1, `t``1`, `t 1`, test.`t.1`, v1; drop database if exists client_test_db; mtr.global_suppressions OK mtr.test_suppressions OK +mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK +mysql.gtid_slave_pos OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK -mysql.ndb_binlog_index OK +mysql.index_stats OK +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK +mysql.roles_mapping OK mysql.servers OK +mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK @@ -27,21 +34,31 @@ mysql.time_zone_transition_type OK mysql.user OK mtr.global_suppressions Table is already up to date mtr.test_suppressions Table is already up to date +mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK +mysql.gtid_slave_pos OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK -mysql.ndb_binlog_index OK +mysql.index_stats OK +mysql.innodb_index_stats +note : Table does not support optimize, doing recreate + analyze instead +status : OK +mysql.innodb_table_stats +note : Table does not support optimize, doing recreate + analyze instead +status : OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK +mysql.roles_mapping OK mysql.servers OK +mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK @@ -49,21 +66,27 @@ mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK +mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK +mysql.gtid_slave_pos OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK -mysql.ndb_binlog_index OK +mysql.index_stats OK +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK +mysql.roles_mapping OK mysql.servers OK +mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK @@ -71,21 +94,31 @@ mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK +mysql.column_stats Table is already up to date mysql.columns_priv Table is already up to date mysql.db Table is already up to date mysql.event Table is already up to date mysql.func Table is already up to date +mysql.gtid_slave_pos Table is already up to date mysql.help_category Table is already up to date mysql.help_keyword Table is already up to date mysql.help_relation Table is already up to date mysql.help_topic Table is already up to date mysql.host Table is already up to date -mysql.ndb_binlog_index Table is already up to date +mysql.index_stats Table is already up to date +mysql.innodb_index_stats +note : Table does not support optimize, doing recreate + analyze instead +status : OK +mysql.innodb_table_stats +note : Table does not support optimize, doing recreate + analyze instead +status : OK mysql.plugin Table is already up to date mysql.proc Table is already up to date mysql.procs_priv Table is already up to date mysql.proxies_priv Table is already up to date +mysql.roles_mapping Table is already up to date mysql.servers Table is already up to date +mysql.table_stats Table is already up to date mysql.tables_priv Table is already up to date mysql.time_zone Table is already up to date mysql.time_zone_leap_second Table is already up to date @@ -148,6 +181,7 @@ Table Op Msg_type Msg_text test.v1 check status OK information_schema.routines check note The storage engine for the table doesn't support check drop view v1; +call mtr.add_suppression("Error reading file './test/t1.frm'"); CREATE TABLE t1(a INT) engine=myisam; CREATE TABLE t2(a INT) engine=myisam; test.t1 @@ -164,15 +198,15 @@ t1 v1 show tables; Tables_in_test -t1 #mysql50#v-1 +t1 v1 test.t1 OK show tables; Tables_in_test t1 -v1 v-1 +v1 drop view v1, `v-1`; drop table t1; SET NAMES utf8; @@ -263,10 +297,7 @@ CHECK TABLE bug47205 FOR UPGRADE; Table Op Msg_type Msg_text test.bug47205 check error Table rebuild required. Please do "ALTER TABLE `bug47205` FORCE" or dump/reload to fix it! # ALTER TABLE ... FORCE should rebuild the table -# and therefore output "affected rows: 1" ALTER TABLE bug47205 FORCE; -affected rows: 1 -info: Records: 1 Duplicates: 0 Warnings: 0 # Table should now be ok CHECK TABLE bug47205 FOR UPGRADE; Table Op Msg_type Msg_text @@ -343,6 +374,9 @@ test.t.2 check status OK test.t.3 check status OK drop view `v.1`; drop table test.`t.1`, `t.2`, `t.3`; +# +# MDEV-8123 mysqlcheck: new --process-views option conflicts with --quick, --extended and such +# create view v1 as select 1; mysqlcheck --process-views test test.v1 OK @@ -357,6 +391,9 @@ test.v1 OK mysqlcheck --process-views --check-upgrade test test.v1 OK drop view v1; +# +# MDEV-8124 mysqlcheck: --auto-repair runs REPAIR TABLE instead of REPAIR VIEW on views +# create table t1(a int); mysqlcheck --process-views --check-upgrade --auto-repair test test.t1 OK @@ -383,21 +420,27 @@ mysqltest1.t1 check error got error: 0 when reading datafile at record: 0 mysqltest1.t1 check error Corrupt mtr.global_suppressions Table is already up to date mtr.test_suppressions Table is already up to date +mysql.column_stats Table is already up to date mysql.columns_priv Table is already up to date mysql.db Table is already up to date mysql.event Table is already up to date mysql.func Table is already up to date +mysql.gtid_slave_pos Table is already up to date mysql.help_category Table is already up to date mysql.help_keyword Table is already up to date mysql.help_relation Table is already up to date mysql.help_topic Table is already up to date mysql.host Table is already up to date -mysql.ndb_binlog_index Table is already up to date +mysql.index_stats Table is already up to date +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK mysql.plugin Table is already up to date mysql.proc Table is already up to date mysql.procs_priv Table is already up to date mysql.proxies_priv Table is already up to date +mysql.roles_mapping Table is already up to date mysql.servers Table is already up to date +mysql.table_stats Table is already up to date mysql.tables_priv Table is already up to date mysql.time_zone Table is already up to date mysql.time_zone_leap_second Table is already up to date @@ -416,3 +459,16 @@ Repairing tables mysqltest1.t1 OK drop table t2; drop database mysqltest1; +# +#MDEV-7384 [PATCH] add PERSISENT FOR ALL option to mysqlanalyze/mysqlcheck +# +create table t1(a int); +insert into t1 (a) values (1), (2), (3); +select * from mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test.t1 Engine-independent statistics collected +status : OK +select * from mysql.column_stats where db_name = 'test' and table_name = 't1'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 1 3 0.0000 4.0000 1.0000 0 NULL NULL +drop table t1; diff --git a/mysql-test/r/mysqld--help,win.rdiff b/mysql-test/r/mysqld--help,win.rdiff index cd39445f3e6..24719fce917 100644 --- a/mysql-test/r/mysqld--help,win.rdiff +++ b/mysql-test/r/mysqld--help,win.rdiff @@ -1,6 +1,6 @@ --- mysql-test/r/mysqld--help.result 2012-09-08 22:22:06 +0000 +++ mysql-test/r/mysqld--help.result 2012-10-01 14:03:59 +0000 -@@ -244,7 +244,6 @@ +@@ -248,7 +248,6 @@ The number of segments in a key cache -L, --language=name Client error messages in given language. May be given as a full path. Deprecated. Use --lc-messages-dir instead. @@ -8,7 +8,7 @@ --lc-messages=name Set the language used for the error messages. -L, --lc-messages-dir=name Directory where error messages are -@@ -440,6 +439,7 @@ +@@ -443,6 +442,7 @@ NULLS_UNEQUAL (default behavior for 4.1 and later), NULLS_EQUAL (emulate 4.0 behavior), and NULLS_IGNORED --myisam-use-mmap Use memory mapping for reading and writing MyISAM tables @@ -16,7 +16,7 @@ --net-buffer-length=# Buffer length for TCP/IP and socket communication --net-read-timeout=# -@@ -707,6 +707,9 @@ +@@ -710,6 +710,9 @@ files within specified directory --server-id=# Uniquely identifies the server instance in the community of replication partners @@ -26,7 +26,7 @@ --show-slave-auth-info Show user and password in SHOW SLAVE HOSTS on this master. -@@ -774,6 +777,10 @@ +@@ -777,6 +780,10 @@ Log slow queries to given log file. Defaults logging to 'hostname'-slow.log. Must be enabled to activate other slow log options @@ -37,7 +37,7 @@ --socket=name Socket file to use for connection --sort-buffer-size=# Each thread that needs to do a sort allocates a buffer of -@@ -782,6 +789,7 @@ +@@ -785,6 +792,7 @@ for the complete list of valid sql modes --stack-trace Print a symbolic stack trace on failure (Defaults to on; use --skip-stack-trace to disable.) @@ -45,7 +45,35 @@ --stored-program-cache=# The soft upper limit for number of cached stored routines for one connection. -@@ -822,8 +830,8 @@ +@@ -817,25 +825,11 @@ + values are COMMIT or ROLLBACK. + --thread-cache-size=# + How many threads we should keep in a cache for reuse +- --thread-pool-idle-timeout=# +- Timeout in seconds for an idle thread in the thread +- pool.Worker thread will be shut down after timeout + --thread-pool-max-threads=# + Maximum allowed number of worker threads in the thread + pool +- --thread-pool-oversubscribe=# +- How many additional active worker threads in a group are +- allowed. +- --thread-pool-size=# +- Number of thread groups in the pool. This parameter is +- roughly equivalent to maximum number of concurrently +- executing threads (threads in a waiting state do not +- count as executing). +- --thread-pool-stall-limit=# +- Maximum query execution time in milliseconds,before an +- executing non-yielding thread is considered stalled.If a +- worker thread is stalled, additional worker thread may be +- created to handle remaining clients. ++ --thread-pool-min-threads=# ++ Minimum number of threads in the thread pool. + --thread-stack=# The stack size for each thread + --time-format=name The TIME format (ignored) + --timed-mutexes Specify whether to time mutexes (only InnoDB mutexes are +@@ -844,8 +838,8 @@ size, MySQL will automatically convert it to an on-disk MyISAM or Aria table -t, --tmpdir=name Path for temporary files. Several paths may be specified, @@ -56,7 +84,7 @@ --transaction-alloc-block-size=# Allocation block size for transactions to be stored in binary log -@@ -923,7 +931,6 @@ key-cache-age-threshold 300 +@@ -949,7 +943,6 @@ key-cache-block-size 1024 key-cache-division-limit 100 key-cache-segments 0 @@ -64,7 +92,7 @@ lc-messages en_US lc-messages-dir MYSQL_SHAREDIR/ lc-time-names en_US -@@ -986,6 +993,7 @@ myisam-repair-threads 1 +@@ -1012,6 +1005,7 @@ myisam-sort-buffer-size 8388608 myisam-stats-method nulls_unequal myisam-use-mmap FALSE @@ -72,7 +100,7 @@ net-buffer-length 16384 net-read-timeout 30 net-retry-count 10 -@@ -1051,6 +1059,8 @@ safe-user-create FALSE +@@ -1077,6 +1071,8 @@ secure-auth FALSE secure-file-priv (No default value) server-id 0 @@ -81,7 +109,7 @@ show-slave-auth-info FALSE skip-grant-tables TRUE skip-name-resolve FALSE -@@ -1067,6 +1077,7 @@ slave-transaction-retries 10 +@@ -1093,6 +1089,7 @@ slave-type-conversions slow-launch-time 2 slow-query-log FALSE @@ -89,4 +117,15 @@ sort-buffer-size 2097152 sql-mode stack-trace TRUE - +@@ -1109,10 +1106,8 @@ + table-open-cache 400 + tc-heuristic-recover COMMIT + thread-cache-size 0 +-thread-pool-idle-timeout 60 + thread-pool-max-threads 500 +-thread-pool-oversubscribe 3 +-thread-pool-stall-limit 500 ++thread-pool-min-threads 1 + thread-stack 294912 + time-format %H:%i:%s + timed-mutexes FALSE diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result index ef68c064dd4..79a00a568b2 100644 --- a/mysql-test/r/mysqld--help.result +++ b/mysql-test/r/mysqld--help.result @@ -41,6 +41,17 @@ The following options may be given as the first argument: Type of BINLOG_CHECKSUM_ALG. Include checksum for log events in the binary log. Possible values are NONE and CRC32; default is NONE. + --binlog-commit-wait-count=# + If non-zero, binlog write will wait at most + binlog_commit_wait_usec microseconds for at least this + many commits to queue up for group commit to the binlog. + This can reduce I/O on the binlog and provide increased + opportunity for parallel apply on the slave, but too high + a value will decrease commit throughput. + --binlog-commit-wait-usec=# + Maximum time, in microseconds, to wait for more commits + to queue up for binlog group commit. Only takes effect if + the value of binlog_commit_wait_count is non-zero. --binlog-direct-non-transactional-updates Causes updates to non-transactional engines using statement format to be written directly to binary log. @@ -108,8 +119,6 @@ The following options may be given as the first argument: --concurrent-insert[=name] Use concurrent insert with MyISAM. Possible values are NEVER, AUTO, ALWAYS - --connect-timeout=# The number of seconds the mysqld server is waiting for a - connect packet before responding with 'Bad handshake' --console Write error output on screen; don't remove the console window on windows. --core-file Write core on errors. @@ -127,6 +136,10 @@ The following options may be given as the first argument: --deadlock-timeout-short=# Short timeout for the two-step deadlock detection (in microseconds) + --default-regex-flags=name + Default flags for the regex library. Syntax: + default-regex-flags='[flag[,flag[,flag...]]]'. See the + manual for the complete list of valid flags --default-storage-engine=name The default storage engine for new tables --default-time-zone=name @@ -151,10 +164,6 @@ The following options may be given as the first argument: --div-precision-increment=# Precision of the result of '/' operator will be increased on that value - --engine-condition-pushdown - Push supported query conditions to the storage engine. - Deprecated, use --optimizer-switch instead. - (Defaults to on; use --skip-engine-condition-pushdown to disable.) --event-scheduler[=name] Enable the event scheduler. Possible values are ON, OFF, and DISABLED (keep the event scheduler completely @@ -201,7 +210,35 @@ The following options may be given as the first argument: --group-concat-max-len=# The maximum length of the result of function GROUP_CONCAT() + --gtid-domain-id=# Used with global transaction ID to identify logically + independent replication streams. When events can + propagate through multiple parallel paths (for example + multiple masters), each independent source server must + use a distinct domain_id. For simple tree-shaped + replication topologies, it can be left at its default, 0. + --gtid-ignore-duplicates + When set, different master connections in multi-source + replication are allowed to receive and process event + groups with the same GTID (when using GTID mode). Only + one will be applied, any others will be ignored. Within a + given replication domain, just the sequence number will + be used to decide whether a given GTID has been already + applied; this means it is the responsibility of the user + to ensure that GTID sequence numbers are strictly + increasing. + --gtid-strict-mode Enforce strict seq_no ordering of events in the binary + log. Slave stops with an error if it encounters an event + that would cause it to generate an out-of-order binlog if + executed. -?, --help Display this help and exit. + --histogram-size=# Number of bytes used for a histogram. If set to 0, no + histograms are created by ANALYZE. + --histogram-type=name + Specifies type of the histograms created by ANALYZE. + Possible values are: SINGLE_PREC_HB - single precision + height-balanced, DOUBLE_PREC_HB - double precision + height-balanced. + --host-cache-size=# How many host names should be cached to avoid resolving. --ignore-builtin-innodb Disable initialization of builtin InnoDB plugin --ignore-db-dirs=name @@ -244,6 +281,11 @@ The following options may be given as the first argument: The default size of key cache blocks --key-cache-division-limit=# The minimum percentage of warm blocks in key cache + --key-cache-file-hash-size=# + Number of hash buckets for open and changed files. If + you have a lot of MyISAM files open you should increase + this for faster flush of changes. A good value is + probably 1/10 of number of possible open MyISAM files. --key-cache-segments=# The number of segments in a key cache -L, --language=name Client error messages in given language. May be given as @@ -260,8 +302,6 @@ The following options may be given as the first argument: --lock-wait-timeout=# Timeout in seconds to wait for a lock before returning an error. - -l, --log[=name] Log connections and queries to file (deprecated option, - use --general-log/--general-log-file instead). --log-basename=name Basename for all log files and the .pid file. This sets all log file names at once (in 'datadir') and is normally the only option you need for specifying log files. Sets @@ -310,14 +350,6 @@ The following options may be given as the first argument: slave, filesort, filesort_on_disk, full_join, full_scan, query_cache, query_cache_miss, tmp_table, tmp_table_on_disk - --log-slow-queries[=name] - Enable logging of slow queries (longer than - --long-query-time) to log file or table. Optional - argument is a file name for the slow log. If not given, - 'log-basename'-slow.log will be used. Use - --log-output=TABLE if you want to have the log in the - table mysql.slow_log. Deprecated option, use - --slow-query-log/--slow-query-log-file instead. --log-slow-rate-limit=# Write to slow log every #th slow query. Set to 1 to log everything. Increase it to reduce the size of the slow or @@ -327,7 +359,7 @@ The following options may be given as the first argument: log if it is open. --log-slow-verbosity=name log-slow-verbosity=[value[,value ...]] where value is one - of 'innodb', 'query_plan' + of 'innodb', 'query_plan', 'explain' --log-tc=name Path to transaction coordinator log (used for transactions that affect more than one storage engine, when binary log is disabled). @@ -361,8 +393,7 @@ The following options may be given as the first argument: --max-binlog-cache-size=# Sets the total size of the transactional cache --max-binlog-size=# Binary log will be rotated automatically when the size - exceeds this value. Will also apply to relay logs if - max_relay_log_size is 0 + exceeds this value. --max-binlog-stmt-cache-size=# Sets the total size of the statement cache --max-connect-errors=# @@ -374,6 +405,8 @@ The following options may be given as the first argument: Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used + --max-digest-length=# + Maximum length considered for digest text. --max-error-count=# Max number of errors/warnings to store for a statement --max-heap-table-size=# Don't allow creation of heap tables bigger than this @@ -388,9 +421,9 @@ The following options may be given as the first argument: --max-prepared-stmt-count=# Maximum number of prepared statements in the server --max-relay-log-size=# - If non-zero: relay log will be rotated automatically when - the size exceeds this value; if zero: when the size - exceeds max_binlog_size + relay log will be rotated automatically when the size + exceeds this value. If 0 are startup, it's set to + max_binlog_size --max-seeks-for-key=# Limit assumed max number of seeks when looking up rows based on a key @@ -410,6 +443,8 @@ The following options may be given as the first argument: --memlock Lock mysqld in memory. --metadata-locks-cache-size=# Size of unused metadata locks cache + --metadata-locks-hash-instances=# + Number of metadata locks hash instances --min-examined-row-limit=# Don't write queries to slow log that examine fewer rows than that @@ -466,8 +501,6 @@ The following options may be given as the first argument: Enable old-style user limits (before 5.0.3, user resources were counted per each user+host vs. per account). - --one-thread (Deprecated): Only use one thread (for debugging under - Linux). Use thread-handling=no-threads instead. --open-files-limit=# If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this @@ -491,6 +524,9 @@ The following options may be given as the first argument: optimizer will switch to the original find_best search. NOTE: The value 63 and its associated behaviour is deprecated + --optimizer-selectivity-sampling-limit=# + Controls number of record samples to check condition + selectivity --optimizer-switch=name optimizer_switch=option=val[,option=val...], where option is one of {derived_merge, derived_with_keys, firstmatch, @@ -503,46 +539,162 @@ The following options may be given as the first argument: mrr_cost_based, mrr_sort_keys, optimize_join_buffer_size, outer_join_with_cache, partial_match_rowid_merge, partial_match_table_scan, semijoin, semijoin_with_cache, - subquery_cache, table_elimination, extended_keys } and - val is one of {on, off, default} + subquery_cache, table_elimination, extended_keys, + exists_to_in } and val is one of {on, off, default} + --optimizer-use-condition-selectivity=# + Controls selectivity of which conditions the optimizer + takes into account to calculate cardinality of a partial + join when it searches for the best execution plan + Meaning: 1 - use selectivity of index backed range + conditions to calculate the cardinality of a partial join + if the last joined table is accessed by full table scan + or an index scan, 2 - use selectivity of index backed + range conditions to calculate the cardinality of a + partial join in any case, 3 - additionally always use + selectivity of range conditions that are not backed by + any index to calculate the cardinality of a partial join, + 4 - use histograms to calculate selectivity of range + conditions that are not backed by any index to calculate + the cardinality of a partial join.5 - additionally use + selectivity of certain non-range predicates calculated on + record samples --performance-schema Enable the performance schema. + --performance-schema-accounts-size=# + Maximum number of instrumented user@host accounts. Use 0 + to disable, -1 for automated sizing. + --performance-schema-consumer-events-stages-current + Default startup value for the events_stages_current + consumer. + --performance-schema-consumer-events-stages-history + Default startup value for the events_stages_history + consumer. + --performance-schema-consumer-events-stages-history-long + Default startup value for the events_stages_history_long + consumer. + --performance-schema-consumer-events-statements-current + Default startup value for the events_statements_current + consumer. + (Defaults to on; use --skip-performance-schema-consumer-events-statements-current to disable.) + --performance-schema-consumer-events-statements-history + Default startup value for the events_statements_history + consumer. + --performance-schema-consumer-events-statements-history-long + Default startup value for the + events_statements_history_long consumer. + --performance-schema-consumer-events-waits-current + Default startup value for the events_waits_current + consumer. + --performance-schema-consumer-events-waits-history + Default startup value for the events_waits_history + consumer. + --performance-schema-consumer-events-waits-history-long + Default startup value for the events_waits_history_long + consumer. + --performance-schema-consumer-global-instrumentation + Default startup value for the global_instrumentation + consumer. + (Defaults to on; use --skip-performance-schema-consumer-global-instrumentation to disable.) + --performance-schema-consumer-statements-digest + Default startup value for the statements_digest consumer. + (Defaults to on; use --skip-performance-schema-consumer-statements-digest to disable.) + --performance-schema-consumer-thread-instrumentation + Default startup value for the thread_instrumentation + consumer. + (Defaults to on; use --skip-performance-schema-consumer-thread-instrumentation to disable.) + --performance-schema-digests-size=# + Size of the statement digest. Use 0 to disable, -1 for + automated sizing. + --performance-schema-events-stages-history-long-size=# + Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to + disable, -1 for automated sizing. + --performance-schema-events-stages-history-size=# + Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0 + to disable, -1 for automated sizing. + --performance-schema-events-statements-history-long-size=# + Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0 + to disable, -1 for automated sizing. + --performance-schema-events-statements-history-size=# + Number of rows per thread in EVENTS_STATEMENTS_HISTORY. + Use 0 to disable, -1 for automated sizing. --performance-schema-events-waits-history-long-size=# - Number of rows in EVENTS_WAITS_HISTORY_LONG. + Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to + disable, -1 for automated sizing. --performance-schema-events-waits-history-size=# - Number of rows per thread in EVENTS_WAITS_HISTORY. + Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0 + to disable, -1 for automated sizing. + --performance-schema-hosts-size=# + Maximum number of instrumented hosts. Use 0 to disable, + -1 for automated sizing. + --performance-schema-instrument[=name] + Default startup value for a performance schema + instrument. --performance-schema-max-cond-classes=# Maximum number of condition instruments. --performance-schema-max-cond-instances=# - Maximum number of instrumented condition objects. + Maximum number of instrumented condition objects. Use 0 + to disable, -1 for automated sizing. + --performance-schema-max-digest-length=# + Maximum length considered for digest text, when stored in + performance_schema tables. --performance-schema-max-file-classes=# Maximum number of file instruments. --performance-schema-max-file-handles=# Maximum number of opened instrumented files. --performance-schema-max-file-instances=# - Maximum number of instrumented files. + Maximum number of instrumented files. Use 0 to disable, + -1 for automated sizing. --performance-schema-max-mutex-classes=# Maximum number of mutex instruments. --performance-schema-max-mutex-instances=# - Maximum number of instrumented MUTEX objects. + Maximum number of instrumented MUTEX objects. Use 0 to + disable, -1 for automated sizing. --performance-schema-max-rwlock-classes=# Maximum number of rwlock instruments. --performance-schema-max-rwlock-instances=# - Maximum number of instrumented RWLOCK objects. + Maximum number of instrumented RWLOCK objects. Use 0 to + disable, -1 for automated sizing. + --performance-schema-max-socket-classes=# + Maximum number of socket instruments. + --performance-schema-max-socket-instances=# + Maximum number of opened instrumented sockets. Use 0 to + disable, -1 for automated sizing. + --performance-schema-max-stage-classes=# + Maximum number of stage instruments. + --performance-schema-max-statement-classes=# + Maximum number of statement instruments. --performance-schema-max-table-handles=# - Maximum number of opened instrumented tables. + Maximum number of opened instrumented tables. Use 0 to + disable, -1 for automated sizing. --performance-schema-max-table-instances=# - Maximum number of instrumented tables. + Maximum number of instrumented tables. Use 0 to disable, + -1 for automated sizing. --performance-schema-max-thread-classes=# Maximum number of thread instruments. --performance-schema-max-thread-instances=# - Maximum number of instrumented threads. + Maximum number of instrumented threads. Use 0 to disable, + -1 for automated sizing. + --performance-schema-session-connect-attrs-size=# + Size of session attribute string buffer per thread. Use 0 + to disable, -1 for automated sizing. + --performance-schema-setup-actors-size=# + Maximum number of rows in SETUP_ACTORS. + --performance-schema-setup-objects-size=# + Maximum number of rows in SETUP_OBJECTS. + --performance-schema-users-size=# + Maximum number of instrumented users. Use 0 to disable, + -1 for automated sizing. --pid-file=name Pid file used by safe_mysqld --plugin-dir=name Directory for plugins --plugin-load=name Semicolon-separated list of plugins to load, where each plugin is specified as ether a plugin_name=library_file pair or only a library_file. If the latter case, all plugins from a given library_file will be loaded. + --plugin-load-add=name + Optional semicolon-separated list of plugins to load. + This option adds to the list specified by --plugin-load + in an incremental way. It can be specified many times, + adding more plugins every time. --plugin-maturity=name The lowest desirable plugin maturity (unknown, experimental, alpha, beta, gamma, or stable). Plugins @@ -613,7 +765,7 @@ The following options may be given as the first argument: --relay-log-space-limit=# Maximum space to use for all relay logs --replicate-annotate-row-events - Tells the slave to write annotate rows events recieved + Tells the slave to write annotate rows events received from the master to its own binary log. Ignored if log_slave_updates is not set --replicate-do-db=name @@ -729,19 +881,31 @@ The following options may be given as the first argument: --skip-show-database Don't allow 'SHOW DATABASE' commands --skip-slave-start If set, slave is not autostarted. - --skip-thread-priority - Don't give threads different priorities. This option is - deprecated because it has no effect; the implied behavior - is already the default. --slave-compressed-protocol Use compression on master/slave protocol + --slave-ddl-exec-mode=name + How replication events should be executed. Legal values + are STRICT and IDEMPOTENT (default). In IDEMPOTENT mode, + replication will not stop for DDL operations that are + idempotent. This means that CREATE TABLE is treated as + CREATE TABLE OR REPLACE and DROP TABLE is treated as DROP + TABLE IF EXISTS. + --slave-domain-parallel-threads=# + Maximum number of parallel threads to use on slave for + events in a single replication domain. When using + multiple domains, this can be used to limit a single + domain from grabbing all threads and thus stalling other + domains. The default of 0 means to allow a domain to grab + as many threads as it wants, up to the value of + slave_parallel_threads. --slave-exec-mode=name - Modes for how replication events should be executed. - Legal values are STRICT (default) and IDEMPOTENT. In - IDEMPOTENT mode, replication will not stop for operations - that are idempotent. In STRICT mode, replication will - stop on any unexpected difference between the master and - the slave + How replication events should be executed. Legal values + are STRICT (default) and IDEMPOTENT. In IDEMPOTENT mode, + replication will not stop for operations that are + idempotent. For example, in row based replication + attempts to delete rows that doesn't exist will be + ignored. In STRICT mode, replication will stop on any + unexpected difference between the master and the slave --slave-load-tmpdir=name The location where the slave should put its temporary files when replicating a LOAD DATA INFILE command @@ -749,8 +913,20 @@ The following options may be given as the first argument: The maximum packet length to sent successfully from the master to slave. --slave-net-timeout=# - Number of seconds to wait for more data from a + Number of seconds to wait for more data from any master/slave connection before aborting the read + --slave-parallel-max-queued=# + Limit on how much memory SQL threads should use per + parallel replication thread when reading ahead in the + relay log looking for opportunities for parallel + replication. Only used when --slave-parallel-threads > 0. + --slave-parallel-threads=# + If non-zero, number of threads to spawn to apply in + parallel events on the slave that were group-committed on + the master or were logged with GTID in different + replication domains. Note that these threads are in + addition to the IO and SQL threads, which are always + created by a replication slave --slave-skip-errors=name Tells the slave thread to continue replication when a query event returns an error from the provided list @@ -822,6 +998,25 @@ The following options may be given as the first argument: values are COMMIT or ROLLBACK. --thread-cache-size=# How many threads we should keep in a cache for reuse + --thread-pool-idle-timeout=# + Timeout in seconds for an idle thread in the thread + pool.Worker thread will be shut down after timeout + --thread-pool-max-threads=# + Maximum allowed number of worker threads in the thread + pool + --thread-pool-oversubscribe=# + How many additional active worker threads in a group are + allowed. + --thread-pool-size=# + Number of thread groups in the pool. This parameter is + roughly equivalent to maximum number of concurrently + executing threads (threads in a waiting state do not + count as executing). + --thread-pool-stall-limit=# + Maximum query execution time in milliseconds,before an + executing non-yielding thread is considered stalled.If a + worker thread is stalled, additional worker thread may be + created to handle remaining clients. --thread-stack=# The stack size for each thread --time-format=name The TIME format (ignored) --timed-mutexes Specify whether to time mutexes. Deprecated, has no @@ -840,6 +1035,9 @@ The following options may be given as the first argument: --transaction-prealloc-size=# Persistent buffer for transactions to be stored in binary log + --transaction-read-only + Default transaction access mode. True if transactions are + read-only. --updatable-views-with-limit=name YES = Don't issue an error message (warning only) if a VIEW without presence of a key of the underlying table is @@ -847,6 +1045,9 @@ The following options may be given as the first argument: Prohibit update of a VIEW, which does not contain a key of the underlying table and the query uses a LIMIT clause (usually get from GUI tools) + --use-stat-tables=name + Specifies how to use system statistics tables. Possible + values are NEVER, COMPLEMENTARY, PREFERABLY -u, --user=name Run mysqld daemon as user. --userstat Enables statistics gathering for USER_STATISTICS, CLIENT_STATISTICS, INDEX_STATISTICS and TABLE_STATISTICS @@ -862,12 +1063,14 @@ auto-increment-increment 1 auto-increment-offset 1 autocommit TRUE automatic-sp-privileges TRUE -back-log 50 +back-log 150 big-tables FALSE bind-address (No default value) binlog-annotate-row-events FALSE binlog-cache-size 32768 binlog-checksum NONE +binlog-commit-wait-count 0 +binlog-commit-wait-usec 100000 binlog-direct-non-transactional-updates FALSE binlog-format STATEMENT binlog-optimize-thread-scheduling TRUE @@ -876,20 +1079,18 @@ binlog-stmt-cache-size 32768 bulk-insert-buffer-size 8388608 character-set-client-handshake TRUE character-set-filesystem binary -character-set-server latin1 character-sets-dir MYSQL_CHARSETSDIR/ chroot (No default value) -collation-server latin1_swedish_ci completion-type NO_CHAIN concurrent-insert AUTO -connect-timeout 10 -console FALSE +console TRUE date-format %Y-%m-%d datetime-format %Y-%m-%d %H:%i:%s deadlock-search-depth-long 15 deadlock-search-depth-short 4 deadlock-timeout-long 50000000 deadlock-timeout-short 10000 +default-regex-flags default-storage-engine myisam default-time-zone (No default value) default-week-format 0 @@ -898,7 +1099,6 @@ delayed-insert-limit 100 delayed-insert-timeout 300 delayed-queue-size 1000 div-precision-increment 4 -engine-condition-pushdown FALSE event-scheduler OFF expensive-subquery-limit 100 expire-logs-days 0 @@ -915,7 +1115,13 @@ ft-stopword-file (No default value) gdb FALSE general-log FALSE group-concat-max-len 1024 +gtid-domain-id 0 +gtid-ignore-duplicates FALSE +gtid-strict-mode FALSE help TRUE +histogram-size 0 +histogram-type SINGLE_PREC_HB +host-cache-size 128 ignore-builtin-innodb FALSE ignore-db-dirs init-connect @@ -931,6 +1137,7 @@ key-buffer-size 134217728 key-cache-age-threshold 300 key-cache-block-size 1024 key-cache-division-limit 100 +key-cache-file-hash-size 512 key-cache-segments 0 large-pages FALSE lc-messages en_US @@ -965,16 +1172,17 @@ max-allowed-packet 1048576 max-binlog-cache-size 18446744073709547520 max-binlog-size 1073741824 max-binlog-stmt-cache-size 18446744073709547520 -max-connect-errors 10 +max-connect-errors 100 max-connections 151 max-delayed-threads 20 +max-digest-length 1024 max-error-count 64 max-heap-table-size 16777216 max-join-size 18446744073709551615 max-length-for-sort-data 1024 max-long-data-size 1048576 max-prepared-stmt-count 16382 -max-relay-log-size 0 +max-relay-log-size 1073741824 max-seeks-for-key 18446744073709551615 max-sort-length 1024 max-sp-recursion-depth 0 @@ -983,6 +1191,7 @@ max-user-connections 0 max-write-lock-count 18446744073709551615 memlock FALSE metadata-locks-cache-size 1024 +metadata-locks-hash-instances 8 min-examined-row-limit 0 mrr-buffer-size 262144 multi-range-count 256 @@ -992,7 +1201,7 @@ myisam-max-sort-file-size 9223372036853727232 myisam-mmap-size 18446744073709551615 myisam-recover-options DEFAULT myisam-repair-threads 1 -myisam-sort-buffer-size 8388608 +myisam-sort-buffer-size 134216704 myisam-stats-method nulls_unequal myisam-use-mmap FALSE net-buffer-length 16384 @@ -1006,30 +1215,61 @@ old-passwords FALSE old-style-user-limits FALSE optimizer-prune-level 1 optimizer-search-depth 62 -optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on +optimizer-selectivity-sampling-limit 100 +optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on +optimizer-use-condition-selectivity 1 performance-schema FALSE -performance-schema-events-waits-history-long-size 10000 -performance-schema-events-waits-history-size 10 +performance-schema-accounts-size -1 +performance-schema-consumer-events-stages-current FALSE +performance-schema-consumer-events-stages-history FALSE +performance-schema-consumer-events-stages-history-long FALSE +performance-schema-consumer-events-statements-current TRUE +performance-schema-consumer-events-statements-history FALSE +performance-schema-consumer-events-statements-history-long FALSE +performance-schema-consumer-events-waits-current FALSE +performance-schema-consumer-events-waits-history FALSE +performance-schema-consumer-events-waits-history-long FALSE +performance-schema-consumer-global-instrumentation TRUE +performance-schema-consumer-statements-digest TRUE +performance-schema-consumer-thread-instrumentation TRUE +performance-schema-digests-size -1 +performance-schema-events-stages-history-long-size -1 +performance-schema-events-stages-history-size -1 +performance-schema-events-statements-history-long-size -1 +performance-schema-events-statements-history-size -1 +performance-schema-events-waits-history-long-size -1 +performance-schema-events-waits-history-size -1 +performance-schema-hosts-size -1 +performance-schema-instrument performance-schema-max-cond-classes 80 -performance-schema-max-cond-instances 1000 +performance-schema-max-cond-instances -1 +performance-schema-max-digest-length 1024 performance-schema-max-file-classes 50 performance-schema-max-file-handles 32768 -performance-schema-max-file-instances 10000 +performance-schema-max-file-instances -1 performance-schema-max-mutex-classes 200 -performance-schema-max-mutex-instances 1000000 -performance-schema-max-rwlock-classes 30 -performance-schema-max-rwlock-instances 1000000 -performance-schema-max-table-handles 100000 -performance-schema-max-table-instances 50000 +performance-schema-max-mutex-instances -1 +performance-schema-max-rwlock-classes 40 +performance-schema-max-rwlock-instances -1 +performance-schema-max-socket-classes 10 +performance-schema-max-socket-instances -1 +performance-schema-max-stage-classes 150 +performance-schema-max-statement-classes 180 +performance-schema-max-table-handles -1 +performance-schema-max-table-instances -1 performance-schema-max-thread-classes 50 -performance-schema-max-thread-instances 1000 -plugin-load (No default value) +performance-schema-max-thread-instances -1 +performance-schema-session-connect-attrs-size -1 +performance-schema-setup-actors-size 100 +performance-schema-setup-objects-size 100 +performance-schema-users-size -1 plugin-maturity unknown port 3306 port-open-timeout 0 preload-buffer-size 32768 profiling-history-size 15 progress-report-time 5 +protocol-version 10 query-alloc-block-size 8192 query-cache-limit 1048576 query-cache-min-res-unit 4096 @@ -1068,9 +1308,13 @@ skip-networking FALSE skip-show-database FALSE skip-slave-start FALSE slave-compressed-protocol FALSE +slave-ddl-exec-mode IDEMPOTENT +slave-domain-parallel-threads 0 slave-exec-mode STRICT slave-max-allowed-packet 1073741824 slave-net-timeout 3600 +slave-parallel-max-queued 131072 +slave-parallel-threads 0 slave-skip-errors (No default value) slave-sql-verify-checksum TRUE slave-transaction-retries 10 @@ -1093,6 +1337,10 @@ table-definition-cache 400 table-open-cache 400 tc-heuristic-recover OFF thread-cache-size 0 +thread-pool-idle-timeout 60 +thread-pool-max-threads 500 +thread-pool-oversubscribe 3 +thread-pool-stall-limit 500 thread-stack 294912 time-format %H:%i:%s timed-mutexes FALSE @@ -1100,7 +1348,9 @@ tmp-table-size 16777216 transaction-alloc-block-size 8192 transaction-isolation REPEATABLE-READ transaction-prealloc-size 4096 +transaction-read-only FALSE updatable-views-with-limit YES +use-stat-tables NEVER userstat FALSE verbose TRUE wait-timeout 28800 diff --git a/mysql-test/r/mysqldump-max.result b/mysql-test/r/mysqldump-max.result index 6722f308358..8d5ab551bee 100644 --- a/mysql-test/r/mysqldump-max.result +++ b/mysql-test/r/mysqldump-max.result @@ -332,12 +332,12 @@ a b 2 1 DROP TABLE t1; DROP TABLE t2; -SHOW BINLOG EVENTS LIMIT 6,3; +SHOW BINLOG EVENTS LIMIT 7,3; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 663 Query 1 731 BEGIN -master-bin.000001 731 Query 1 828 use `test`; INSERT INTO t2 VALUES (1,0), (2,0) -master-bin.000001 828 Xid 1 855 COMMIT /* XID */ --- CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=855; +master-bin.000001 593 Xid 1 620 COMMIT /* XID */ +master-bin.000001 620 Gtid 1 658 GTID 0-1-3 +master-bin.000001 658 Query 1 777 use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB +-- CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=939; SELECT * FROM t1 ORDER BY a; a 1 diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 68de653742c..2d26bc774cb 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -1821,7 +1821,7 @@ a b Osnabrück Köln drop table t1; # -# Bug#15328 Segmentation fault occured if my.cnf is invalid for escape sequence +# Bug#15328 Segmentation fault occurred if my.cnf is invalid for escape sequence # --fields-optionally-enclosed-by=" # @@ -2698,13 +2698,13 @@ DROP TABLE t1, t2; # DROP TABLE IF EXISTS `test1`; Warnings: -Note 1051 Unknown table 'test1' +Note 1051 Unknown table 'test.test1' CREATE TABLE `test1` ( `a1` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `test2`; Warnings: -Note 1051 Unknown table 'test2' +Note 1051 Unknown table 'test.test2' CREATE TABLE `test2` ( `a2` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -3642,8 +3642,8 @@ reset master; mysqldump: Couldn't execute 'FLUSH /*!40101 LOCAL */ TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227) mysqldump: Couldn't execute 'FLUSH /*!40101 LOCAL */ TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227) grant RELOAD on *.* to mysqltest_1@localhost; -mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation (1227) -mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation (1227) +mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the SUPER, REPLICATION CLIENT privilege(s) for this operation (1227) +mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the SUPER, REPLICATION CLIENT privilege(s) for this operation (1227) grant REPLICATION CLIENT on *.* to mysqltest_1@localhost; drop table t1; drop user mysqltest_1@localhost; @@ -5205,12 +5205,16 @@ INSERT INTO b12809202_db.t2 VALUES (1), (2), (3); -- Connecting to localhost... -- main : logs flushed successfully! -- Starting transaction... +-- Setting savepoint... -- Retrieving table structure for table t1... -- Sending SELECT query... -- Retrieving rows... +-- Rolling back to savepoint sp... -- Retrieving table structure for table t2... -- Sending SELECT query... -- Retrieving rows... +-- Rolling back to savepoint sp... +-- Releasing savepoint... -- Disconnecting from localhost... #### Dump ends here #### @@ -5232,15 +5236,12 @@ SET @@global.log_output="TABLE"; SET @@global.general_log='OFF'; SET @@global.slow_query_log='OFF'; DROP DATABASE mysql; -Warnings: -Error 1146 Table 'mysql.proc' doesn't exist -Error 1146 Table 'mysql.event' doesn't exist SHOW CREATE TABLE mysql.general_log; Table Create Table general_log CREATE TABLE `general_log` ( - `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, - `thread_id` int(11) NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL, `server_id` int(10) unsigned NOT NULL, `command_type` varchar(64) NOT NULL, `argument` mediumtext NOT NULL @@ -5248,7 +5249,7 @@ general_log CREATE TABLE `general_log` ( SHOW CREATE TABLE mysql.slow_log; Table Create Table slow_log CREATE TABLE `slow_log` ( - `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, `query_time` time(6) NOT NULL, `lock_time` time(6) NOT NULL, @@ -5258,7 +5259,8 @@ slow_log CREATE TABLE `slow_log` ( `last_insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL, - `sql_text` mediumtext NOT NULL + `sql_text` mediumtext NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' SET @@global.log_output= @old_log_output_state; SET @@global.slow_query_log= @old_slow_query_log_state; @@ -5401,3 +5403,4 @@ DELIMITER ; /*!50003 SET collation_connection = @saved_col_connection */ ; ALTER DATABASE `a\"'``b` CHARACTER SET utf8 COLLATE utf8_general_ci ; DROP DATABASE `a\"'``b`; +FOUND /Database: mysql/ in bug11505.sql diff --git a/mysql-test/r/mysqlslap.result b/mysql-test/r/mysqlslap.result index af78677647f..d3c5107dee3 100644 --- a/mysql-test/r/mysqlslap.result +++ b/mysql-test/r/mysqlslap.result @@ -234,8 +234,8 @@ test # 'bug58090' database should be present. SHOW DATABASES; Database -information_schema bug58090 +information_schema mtr mysql performance_schema diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index 9800aed6368..b3d8fb93e1f 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -232,7 +232,7 @@ mysqltest: At line 2: Spurious text after `query` expression mysqltest: At line 1: Missing argument(s) to 'error' mysqltest: At line 1: Missing argument(s) to 'error' mysqltest: At line 1: The sqlstate definition must start with an uppercase S -mysqltest: At line 1: The error name definition must start with an uppercase E or H +mysqltest: At line 1: The error name definition must start with an uppercase E or W or H mysqltest: At line 1: Invalid argument to error: '9eeeee' - the errno may only consist of digits[0-9] mysqltest: At line 1: Invalid argument to error: '1sssss' - the errno may only consist of digits[0-9] mysqltest: At line 1: The sqlstate must be exactly 5 chars long @@ -674,6 +674,9 @@ txt b is b and more is more txt a is a and less is more +sflfdt 'ABCDfF bbddff h' bs txt; +txt +ABCDfF bbddff h create table t2 ( a char(10)); garbage; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1 diff --git a/mysql-test/r/named_pipe.result b/mysql-test/r/named_pipe.result index 82c758eaad9..43fb44beece 100644 --- a/mysql-test/r/named_pipe.result +++ b/mysql-test/r/named_pipe.result @@ -508,7 +508,7 @@ insert into tmp select * from t3; insert into t3 select * from tmp; alter table t3 add t2nr int not null auto_increment primary key first; drop table tmp; -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10; namn Abraham Abraham @@ -521,7 +521,7 @@ ammonium ammonium analyzable analyzable animals animals animized animized -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10; concat(fld3," ",fld3) Abraham Abraham @@ -558,7 +558,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10; fld3 count(*) affixed 1 @@ -571,7 +571,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10; fld3 repeat("a",length(fld3)) count(*) circus aaaaaa 1 @@ -2154,3 +2154,4 @@ Privat (Private Nutzung) Mobilfunk Warnings: Warning 1052 Column 'kundentyp' in group statement is ambiguous drop table t1; +FOUND /\[ERROR\] Create named pipe failed/ in second-mysqld.err diff --git a/mysql-test/r/not_embedded.require b/mysql-test/r/not_embedded.require deleted file mode 100644 index b2ea98bcd0a..00000000000 --- a/mysql-test/r/not_embedded.require +++ /dev/null @@ -1,2 +0,0 @@ -have_embedded -0 diff --git a/mysql-test/r/not_embedded_server.result b/mysql-test/r/not_embedded_server.result index eccf6151d33..2295276099a 100644 --- a/mysql-test/r/not_embedded_server.result +++ b/mysql-test/r/not_embedded_server.result @@ -6,6 +6,7 @@ slave_skip_errors OFF # Bug#58026: massive recursion and crash in regular expression handling # SELECT '1' RLIKE RPAD('1', 10000, '('); +Got one of the listed errors # # WL#4284: Transactional DDL locking # @@ -47,3 +48,88 @@ DROP USER nopriv_user@localhost; # # End Bug#54812 # + +# +# Test for Bug#12601974 - STORED PROCEDURE SQL_MODE=NO_BACKSLASH_ESCAPES +# IGNORED AND BREAKS REPLICATION +# +SET @org_mode=@@sql_mode; +SET @@sql_mode=''; +# USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION +CREATE USER 'user\'s_12601974'@'localhost'; +CREATE USER 'user\'s_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'user\'s_12601974'@'localhost' +DROP USER 'user\'s_12601974'@'localhost'; +CREATE USER 'user\"s_12601974'@'localhost'; +CREATE USER 'user\"s_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'user\"s_12601974'@'localhost' +DROP USER 'user\"s_12601974'@'localhost'; +CREATE USER 'user\bs_12601974'@'localhost'; +CREATE USER 'user\bs_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'users_12601974'@'localhost' +DROP USER 'user\bs_12601974'@'localhost'; +CREATE USER 'user\ns_12601974'@'localhost'; +CREATE USER 'user\ns_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'user\ns_12601974'@'localhost' +DROP USER 'user\ns_12601974'@'localhost'; +CREATE USER 'user\rs_12601974'@'localhost'; +CREATE USER 'user\rs_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'user\rs_12601974'@'localhost' +DROP USER 'user\rs_12601974'@'localhost'; +CREATE USER 'user\ts_12601974'@'localhost'; +CREATE USER 'user\ts_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'user s_12601974'@'localhost' +DROP USER 'user\ts_12601974'@'localhost'; +CREATE USER 'user\\s_12601974'@'localhost'; +CREATE USER 'user\\s_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'user\\s_12601974'@'localhost' +DROP USER 'user\\s_12601974'@'localhost'; +CREATE USER 'user\%s_12601974'@'localhost'; +CREATE USER 'user\%s_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'user\\%s_12601974'@'localhost' +DROP USER 'user\%s_12601974'@'localhost'; +CREATE USER 'user\_s_12601974'@'localhost'; +CREATE USER 'user\_s_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'user\\_s_12601974'@'localhost' +DROP USER 'user\_s_12601974'@'localhost'; + +# END OF CASE - USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION +SET @@sql_mode='NO_BACKSLASH_ESCAPES'; +# USER NAME CONTAINING BACKSLASH IN DROP USER OPERATION +CREATE USER 'user\"s_12601974'@'localhost'; +CREATE USER 'user\"s_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'user\"s_12601974'@'localhost' +DROP USER 'user\"s_12601974'@'localhost'; +CREATE USER 'user\bs_12601974'@'localhost'; +CREATE USER 'user\bs_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'user\bs_12601974'@'localhost' +DROP USER 'user\bs_12601974'@'localhost'; +CREATE USER 'user\ns_12601974'@'localhost'; +CREATE USER 'user\ns_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'user\ns_12601974'@'localhost' +DROP USER 'user\ns_12601974'@'localhost'; +CREATE USER 'user\rs_12601974'@'localhost'; +CREATE USER 'user\rs_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'user\rs_12601974'@'localhost' +DROP USER 'user\rs_12601974'@'localhost'; +CREATE USER 'user\ts_12601974'@'localhost'; +CREATE USER 'user\ts_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'user\ts_12601974'@'localhost' +DROP USER 'user\ts_12601974'@'localhost'; +CREATE USER 'user\\s_12601974'@'localhost'; +CREATE USER 'user\\s_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'user\\s_12601974'@'localhost' +DROP USER 'user\\s_12601974'@'localhost'; +CREATE USER 'user\%s_12601974'@'localhost'; +CREATE USER 'user\%s_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'user\%s_12601974'@'localhost' +DROP USER 'user\%s_12601974'@'localhost'; +CREATE USER 'user\_s_12601974'@'localhost'; +CREATE USER 'user\_s_12601974'@'localhost'; +ERROR HY000: Operation CREATE USER failed for 'user\_s_12601974'@'localhost' +DROP USER 'user\_s_12601974'@'localhost'; + +# END OF CASE - USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION +SET @@sql_mode= @org_mode; + +#End of Test for Bug#12601974 diff --git a/mysql-test/r/not_openssl.require b/mysql-test/r/not_openssl.require deleted file mode 100644 index 2b5e423999c..00000000000 --- a/mysql-test/r/not_openssl.require +++ /dev/null @@ -1,2 +0,0 @@ -Variable_name Value -have_openssl NO diff --git a/mysql-test/r/not_partition.require b/mysql-test/r/not_partition.require deleted file mode 100644 index 808242277cb..00000000000 --- a/mysql-test/r/not_partition.require +++ /dev/null @@ -1,2 +0,0 @@ -Variable_name Value -have_partitioning NO diff --git a/mysql-test/r/not_partition.result b/mysql-test/r/not_partition.result index 3c0523279a9..3d6f3fe39a3 100644 --- a/mysql-test/r/not_partition.result +++ b/mysql-test/r/not_partition.result @@ -3,7 +3,7 @@ FLUSH TABLES; SELECT * FROM t1; ERROR 42000: Unknown storage engine 'partition' TRUNCATE TABLE t1; -ERROR 42S02: Table 'test.t1' doesn't exist +ERROR 42000: Unknown storage engine 'partition' ANALYZE TABLE t1; Table Op Msg_type Msg_text test.t1 analyze Error Unknown storage engine 'partition' @@ -21,17 +21,17 @@ Table Op Msg_type Msg_text test.t1 repair Error Unknown storage engine 'partition' test.t1 repair error Corrupt ALTER TABLE t1 REPAIR PARTITION ALL; -ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-plugin-partition' to have it working +ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with '--with-plugin-partition' to have it working ALTER TABLE t1 CHECK PARTITION ALL; -ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-plugin-partition' to have it working +ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with '--with-plugin-partition' to have it working ALTER TABLE t1 OPTIMIZE PARTITION ALL; -ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-plugin-partition' to have it working +ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with '--with-plugin-partition' to have it working ALTER TABLE t1 ANALYZE PARTITION ALL; -ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-plugin-partition' to have it working +ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with '--with-plugin-partition' to have it working ALTER TABLE t1 REBUILD PARTITION ALL; ERROR 42000: Unknown storage engine 'partition' ALTER TABLE t1 TRUNCATE PARTITION ALL; -ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-plugin-partition' to have it working +ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with '--with-plugin-partition' to have it working ALTER TABLE t1 ENGINE Memory; ERROR 42000: Unknown storage engine 'partition' ALTER TABLE t1 ADD (new INT); @@ -46,11 +46,11 @@ joined DATE NOT NULL ) PARTITION BY KEY(joined) PARTITIONS 6; -ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-plugin-partition' to have it working +ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with '--with-plugin-partition' to have it working ALTER TABLE t1 PARTITION BY KEY(joined) PARTITIONS 2; -ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-plugin-partition' to have it working +ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with '--with-plugin-partition' to have it working drop table t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' CREATE TABLE t1 ( firstname VARCHAR(25) NOT NULL, lastname VARCHAR(25) NOT NULL, @@ -65,9 +65,9 @@ PARTITION p2 VALUES LESS THAN (1980), PARTITION p3 VALUES LESS THAN (1990), PARTITION p4 VALUES LESS THAN MAXVALUE ); -ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-plugin-partition' to have it working +ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with '--with-plugin-partition' to have it working drop table t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' CREATE TABLE t1 (id INT, purchased DATE) PARTITION BY RANGE( YEAR(purchased) ) SUBPARTITION BY HASH( TO_DAYS(purchased) ) @@ -76,12 +76,26 @@ PARTITION p0 VALUES LESS THAN (1990), PARTITION p1 VALUES LESS THAN (2000), PARTITION p2 VALUES LESS THAN MAXVALUE ); -ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-plugin-partition' to have it working +ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with '--with-plugin-partition' to have it working drop table t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' create table t1 (a varchar(10) charset latin1 collate latin1_bin); insert into t1 values (''),(' '),('a'),('a '),('a '); explain partitions select * from t1 where a='a ' OR a='a'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using where drop table t1; +# +# bug#11760213-52599: ALTER TABLE REMOVE PARTITIONING ON NON-PARTITIONED +# TABLE CORRUPTS MYISAM +DROP TABLE if exists `t1`; +CREATE TABLE `t1`(`a` INT)ENGINE=myisam; +ALTER TABLE `t1` ADD COLUMN `b` INT; +CREATE UNIQUE INDEX `i1` ON `t1`(`b`); +CREATE UNIQUE INDEX `i2` ON `t1`(`a`); +ALTER TABLE `t1` ADD PRIMARY KEY (`a`); +ALTER TABLE `t1` REMOVE PARTITIONING; +CHECK TABLE `t1` EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; diff --git a/mysql-test/r/not_windows.require b/mysql-test/r/not_windows.require deleted file mode 100644 index 09aae1ed1d0..00000000000 --- a/mysql-test/r/not_windows.require +++ /dev/null @@ -1,2 +0,0 @@ -TRUE -1 diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index ce233e0db23..b5219333ef1 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -382,3 +382,15 @@ CREATE TABLE t2 (d DATE) ENGINE=MyISAM; SELECT * FROM t1,t2 WHERE 1 IS NOT NULL AND t1.b IS NULL; a b c d DROP TABLE t1,t2; +# +# Start of 10.0 tests +# +# +# MDEV-7001 Bad result for NOT NOT STRCMP('a','b') and NOT NOT NULLIF(2,3) +# +SELECT NOT NOT NULLIF(2,3); +NOT NOT NULLIF(2,3) +1 +# +# End of 10.0 tests +# diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result index e80851329a4..81bfa1ac994 100644 --- a/mysql-test/r/null_key.result +++ b/mysql-test/r/null_key.result @@ -429,6 +429,7 @@ Handler_read_key 6 Handler_read_last 0 Handler_read_next 2 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 5 diff --git a/mysql-test/r/old-mode.result b/mysql-test/r/old-mode.result index 6e6f9965e73..4f650c3c781 100644 --- a/mysql-test/r/old-mode.result +++ b/mysql-test/r/old-mode.result @@ -18,4 +18,99 @@ test.t2 2948697075 drop table t1,t2; SHOW PROCESSLIST; Id User Host db Command Time State Info -<Id> root <Host> test Query <Time> NULL SHOW PROCESSLIST +<Id> root <Host> test Query <Time> <State> SHOW PROCESSLIST +# +# MDEV-5372 Make "CAST(time_expr AS DATETIME)" compatible with the SQL Standard) +# +set @@old_mode=zero_date_time_cast; +SELECT CAST(TIME'-10:30:30' AS DATETIME); +CAST(TIME'-10:30:30' AS DATETIME) +NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '-10:30:30' +SELECT CAST(TIME'10:20:30' AS DATETIME); +CAST(TIME'10:20:30' AS DATETIME) +0000-00-00 10:20:30 +SELECT CAST(TIME'830:20:30' AS DATETIME); +CAST(TIME'830:20:30' AS DATETIME) +0000-01-03 14:20:30 +CREATE TABLE t1 (a DATETIME); +INSERT INTO t1 VALUES (TIME'-10:20:30'); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +INSERT INTO t1 VALUES (TIME'10:20:30'); +INSERT INTO t1 VALUES (TIME'830:20:30'); +SELECT * FROM t1; +a +0000-00-00 00:00:00 +0000-00-00 10:20:30 +0000-01-03 14:20:30 +DROP TABLE t1; +CREATE TABLE t1 (a TIMESTAMP); +INSERT INTO t1 VALUES (TIME'-10:20:30'); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +INSERT INTO t1 VALUES (TIME'10:20:30'); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +INSERT INTO t1 VALUES (TIME'830:20:30'); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +SELECT * FROM t1; +a +0000-00-00 00:00:00 +0000-00-00 00:00:00 +0000-00-00 00:00:00 +DROP TABLE t1; +CREATE TABLE t1 (a TIME); +INSERT INTO t1 VALUES (TIME'-10:20:30'); +INSERT INTO t1 VALUES (TIME'10:20:30'); +INSERT INTO t1 VALUES (TIME'830:20:30'); +SELECT a, CAST(a AS DATETIME), TO_DAYS(a) FROM t1; +a CAST(a AS DATETIME) TO_DAYS(a) +-10:20:30 NULL NULL +10:20:30 0000-00-00 10:20:30 NULL +830:20:30 0000-01-03 14:20:30 NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '-10:20:30' +Warning 1264 Out of range value for column 'a' at row 1 +Warning 1264 Out of range value for column 'a' at row 2 +Warning 1264 Out of range value for column 'a' at row 3 +DROP TABLE t1; +SELECT TO_DAYS(TIME'-10:20:30'); +TO_DAYS(TIME'-10:20:30') +NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '-10:20:30' +SELECT TO_DAYS(TIME'10:20:30'); +TO_DAYS(TIME'10:20:30') +NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '10:20:30' +SELECT TO_DAYS(TIME'830:20:30'); +TO_DAYS(TIME'830:20:30') +3 +CREATE TABLE t1 (a DATETIME, b TIME); +INSERT INTO t1 VALUES (NULL, '00:20:12'); +INSERT INTO t1 VALUES (NULL, '-00:20:12'); +SELECT IF(1,ADDDATE(IFNULL(a,b),0),1) FROM t1; +IF(1,ADDDATE(IFNULL(a,b),0),1) +NULL +NULL +Warnings: +Warning 1292 Incorrect datetime value: '0000-00-00 00:20:12' +Warning 1292 Truncated incorrect datetime value: '-00:20:12' +DROP TABLE t1; +# +# MDEV-6649 Different warnings for TIME and TIME(N) when @@old_mode=zero_date_time_cast +# +SET @@old_mode=zero_date_time_cast; +CREATE TABLE t1 (a TIME,b TIME(1)); +INSERT INTO t1 VALUES (TIME'830:20:30',TIME'830:20:30'); +SELECT TO_DAYS(a), TO_DAYS(b) FROM t1; +TO_DAYS(a) TO_DAYS(b) +NULL NULL +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +Warning 1264 Out of range value for column 'b' at row 1 +DROP TABLE t1; diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result index a49a12c230d..1d264bd57b1 100644 --- a/mysql-test/r/openssl_1.result +++ b/mysql-test/r/openssl_1.result @@ -56,8 +56,8 @@ mysqltest: Could not open connection 'default': 2026 SSL connection error: Unabl SHOW STATUS LIKE 'Ssl_cipher'; Variable_name Value Ssl_cipher DHE-RSA-AES256-SHA -Variable_name Value -Ssl_cipher DHE-RSA-AES256-SHA +have_ssl +1 End of 5.0 tests DROP TABLE IF EXISTS thread_status; DROP EVENT IF EXISTS event_status; @@ -197,15 +197,22 @@ Variable_name Value Ssl_cipher DHE-RSA-AES256-SHA Variable_name Value Ssl_cipher EDH-RSA-DES-CBC3-SHA -Variable_name Value -Ssl_cipher RC4-SHA select 'is still running; no cipher request crashed the server' as result from dual; result is still running; no cipher request crashed the server GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509; FLUSH PRIVILEGES; -SHOW STATUS LIKE 'Ssl_cipher'; -Variable_name Value -Ssl_cipher DHE-RSA-AES256-SHA +SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'; +have_ssl +1 DROP USER bug42158@localhost; End of 5.1 tests +/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 94a38ca7827..07f278a6563 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -1445,6 +1445,7 @@ CALL mtr.add_suppression("Out of sort memory"); select * from t1 order by b; ERROR HY001: Out of sort memory, consider increasing server sort buffer size drop table t1; +set session sort_buffer_size= 30000; # # Bug #39844: Query Crash Mysql Server 5.0.67 # @@ -1539,6 +1540,890 @@ ppfcz1 DE ppfcz1 14 8 57.5 ppfcz1 DE ppfcz1 14 9 59.5 ppfcz1 DE ppfcz1 14 10 61.5 DROP TABLE t1,t2,t3; +# +# WL#1393 - Optimizing filesort with small limit +# +CREATE TABLE t1(f0 int auto_increment primary key, f1 int, f2 varchar(200)); +INSERT INTO t1(f1, f2) VALUES +(0,"0"),(1,"1"),(2,"2"),(3,"3"),(4,"4"),(5,"5"), +(6,"6"),(7,"7"),(8,"8"),(9,"9"),(10,"10"), +(11,"11"),(12,"12"),(13,"13"),(14,"14"),(15,"15"), +(16,"16"),(17,"17"),(18,"18"),(19,"19"),(20,"20"), +(21,"21"),(22,"22"),(23,"23"),(24,"24"),(25,"25"), +(26,"26"),(27,"27"),(28,"28"),(29,"29"),(30,"30"), +(31,"31"),(32,"32"),(33,"33"),(34,"34"),(35,"35"), +(36,"36"),(37,"37"),(38,"38"),(39,"39"),(40,"40"), +(41,"41"),(42,"42"),(43,"43"),(44,"44"),(45,"45"), +(46,"46"),(47,"47"),(48,"48"),(49,"49"),(50,"50"), +(51,"51"),(52,"52"),(53,"53"),(54,"54"),(55,"55"), +(56,"56"),(57,"57"),(58,"58"),(59,"59"),(60,"60"), +(61,"61"),(62,"62"),(63,"63"),(64,"64"),(65,"65"), +(66,"66"),(67,"67"),(68,"68"),(69,"69"),(70,"70"), +(71,"71"),(72,"72"),(73,"73"),(74,"74"),(75,"75"), +(76,"76"),(77,"77"),(78,"78"),(79,"79"),(80,"80"), +(81,"81"),(82,"82"),(83,"83"),(84,"84"),(85,"85"), +(86,"86"),(87,"87"),(88,"88"),(89,"89"),(90,"90"), +(91,"91"),(92,"92"),(93,"93"),(94,"94"),(95,"95"), +(96,"96"),(97,"97"),(98,"98"),(99,"99"); +SELECT * FROM t1 ORDER BY f1 ASC, f0 LIMIT 100; +f0 f1 f2 +1 0 0 +2 1 1 +3 2 2 +4 3 3 +5 4 4 +6 5 5 +7 6 6 +8 7 7 +9 8 8 +10 9 9 +11 10 10 +12 11 11 +13 12 12 +14 13 13 +15 14 14 +16 15 15 +17 16 16 +18 17 17 +19 18 18 +20 19 19 +21 20 20 +22 21 21 +23 22 22 +24 23 23 +25 24 24 +26 25 25 +27 26 26 +28 27 27 +29 28 28 +30 29 29 +31 30 30 +32 31 31 +33 32 32 +34 33 33 +35 34 34 +36 35 35 +37 36 36 +38 37 37 +39 38 38 +40 39 39 +41 40 40 +42 41 41 +43 42 42 +44 43 43 +45 44 44 +46 45 45 +47 46 46 +48 47 47 +49 48 48 +50 49 49 +51 50 50 +52 51 51 +53 52 52 +54 53 53 +55 54 54 +56 55 55 +57 56 56 +58 57 57 +59 58 58 +60 59 59 +61 60 60 +62 61 61 +63 62 62 +64 63 63 +65 64 64 +66 65 65 +67 66 66 +68 67 67 +69 68 68 +70 69 69 +71 70 70 +72 71 71 +73 72 72 +74 73 73 +75 74 74 +76 75 75 +77 76 76 +78 77 77 +79 78 78 +80 79 79 +81 80 80 +82 81 81 +83 82 82 +84 83 83 +85 84 84 +86 85 85 +87 86 86 +88 87 87 +89 88 88 +90 89 89 +91 90 90 +92 91 91 +93 92 92 +94 93 93 +95 94 94 +96 95 95 +97 96 96 +98 97 97 +99 98 98 +100 99 99 +SELECT * FROM t1 ORDER BY f1 ASC, f0 LIMIT 30; +f0 f1 f2 +1 0 0 +2 1 1 +3 2 2 +4 3 3 +5 4 4 +6 5 5 +7 6 6 +8 7 7 +9 8 8 +10 9 9 +11 10 10 +12 11 11 +13 12 12 +14 13 13 +15 14 14 +16 15 15 +17 16 16 +18 17 17 +19 18 18 +20 19 19 +21 20 20 +22 21 21 +23 22 22 +24 23 23 +25 24 24 +26 25 25 +27 26 26 +28 27 27 +29 28 28 +30 29 29 +SELECT * FROM t1 ORDER BY f1 ASC, f0 LIMIT 0; +f0 f1 f2 +SELECT * FROM t1 ORDER BY f2 DESC, f0 LIMIT 30; +f0 f1 f2 +100 99 99 +99 98 98 +98 97 97 +97 96 96 +96 95 95 +95 94 94 +94 93 93 +93 92 92 +92 91 91 +91 90 90 +10 9 9 +90 89 89 +89 88 88 +88 87 87 +87 86 86 +86 85 85 +85 84 84 +84 83 83 +83 82 82 +82 81 81 +81 80 80 +9 8 8 +80 79 79 +79 78 78 +78 77 77 +77 76 76 +76 75 75 +75 74 74 +74 73 73 +73 72 72 +SELECT * FROM t1 ORDER BY f2 DESC, f0 LIMIT 0; +f0 f1 f2 +SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 20; +f0 f1 f2 +12 11 11 +13 12 12 +14 13 13 +15 14 14 +16 15 15 +17 16 16 +18 17 17 +19 18 18 +20 19 19 +21 20 20 +22 21 21 +23 22 22 +24 23 23 +25 24 24 +26 25 25 +27 26 26 +28 27 27 +29 28 28 +30 29 29 +31 30 30 +SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 0; +f0 f1 f2 +SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 10 OFFSET 10; +f0 f1 f2 +22 21 21 +23 22 22 +24 23 23 +25 24 24 +26 25 25 +27 26 26 +28 27 27 +29 28 28 +30 29 29 +31 30 30 +SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 0 OFFSET 10; +f0 f1 f2 +set sort_buffer_size= 32768; +CREATE TEMPORARY TABLE tmp (f1 int, f2 varchar(20)); +INSERT INTO tmp SELECT f1, f2 FROM t1; +INSERT INTO t1(f1, f2) SELECT * FROM tmp; +INSERT INTO tmp SELECT f1, f2 FROM t1; +INSERT INTO t1(f1, f2) SELECT * FROM tmp; +SELECT * FROM t1 ORDER BY f1 ASC, f0 LIMIT 30; +f0 f1 f2 +1 0 0 +101 0 0 +201 0 0 +301 0 0 +401 0 0 +2 1 1 +102 1 1 +202 1 1 +302 1 1 +402 1 1 +3 2 2 +103 2 2 +203 2 2 +303 2 2 +403 2 2 +4 3 3 +104 3 3 +204 3 3 +304 3 3 +404 3 3 +5 4 4 +105 4 4 +205 4 4 +305 4 4 +405 4 4 +6 5 5 +106 5 5 +206 5 5 +306 5 5 +406 5 5 +SELECT * FROM t1 ORDER BY f1 ASC, f0 LIMIT 0; +f0 f1 f2 +SELECT * FROM t1 ORDER BY f2 DESC, f0 LIMIT 30; +f0 f1 f2 +100 99 99 +200 99 99 +300 99 99 +400 99 99 +500 99 99 +99 98 98 +199 98 98 +299 98 98 +399 98 98 +499 98 98 +98 97 97 +198 97 97 +298 97 97 +398 97 97 +498 97 97 +97 96 96 +197 96 96 +297 96 96 +397 96 96 +497 96 96 +96 95 95 +196 95 95 +296 95 95 +396 95 95 +496 95 95 +95 94 94 +195 94 94 +295 94 94 +395 94 94 +495 94 94 +SELECT * FROM t1 ORDER BY f2 DESC, f0 LIMIT 0; +f0 f1 f2 +SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 20; +f0 f1 f2 +12 11 11 +112 11 11 +212 11 11 +312 11 11 +412 11 11 +13 12 12 +113 12 12 +213 12 12 +313 12 12 +413 12 12 +14 13 13 +114 13 13 +214 13 13 +314 13 13 +414 13 13 +15 14 14 +115 14 14 +215 14 14 +315 14 14 +415 14 14 +SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 0; +f0 f1 f2 +SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 10 OFFSET 10; +f0 f1 f2 +14 13 13 +114 13 13 +214 13 13 +314 13 13 +414 13 13 +15 14 14 +115 14 14 +215 14 14 +315 14 14 +415 14 14 +SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 0 OFFSET 10; +f0 f1 f2 +set sort_buffer_size= 32768; +SELECT SQL_CALC_FOUND_ROWS * FROM t1 +ORDER BY f1, f0 LIMIT 30; +f0 f1 f2 +1 0 0 +101 0 0 +201 0 0 +301 0 0 +401 0 0 +2 1 1 +102 1 1 +202 1 1 +302 1 1 +402 1 1 +3 2 2 +103 2 2 +203 2 2 +303 2 2 +403 2 2 +4 3 3 +104 3 3 +204 3 3 +304 3 3 +404 3 3 +5 4 4 +105 4 4 +205 4 4 +305 4 4 +405 4 4 +6 5 5 +106 5 5 +206 5 5 +306 5 5 +406 5 5 +SELECT FOUND_ROWS(); +FOUND_ROWS() +500 +SELECT SQL_CALC_FOUND_ROWS * FROM t1 +ORDER BY f1, f0 LIMIT 0; +f0 f1 f2 +SELECT FOUND_ROWS(); +FOUND_ROWS() +500 +SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE f1>10 +ORDER BY f2, f0 LIMIT 20; +f0 f1 f2 +12 11 11 +112 11 11 +212 11 11 +312 11 11 +412 11 11 +13 12 12 +113 12 12 +213 12 12 +313 12 12 +413 12 12 +14 13 13 +114 13 13 +214 13 13 +314 13 13 +414 13 13 +15 14 14 +115 14 14 +215 14 14 +315 14 14 +415 14 14 +SELECT FOUND_ROWS(); +FOUND_ROWS() +445 +SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE f1>10 +ORDER BY f2, f0 LIMIT 0; +f0 f1 f2 +SELECT FOUND_ROWS(); +FOUND_ROWS() +445 +SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE f1>10 +ORDER BY f2, f0 LIMIT 10 OFFSET 10; +f0 f1 f2 +14 13 13 +114 13 13 +214 13 13 +314 13 13 +414 13 13 +15 14 14 +115 14 14 +215 14 14 +315 14 14 +415 14 14 +SELECT FOUND_ROWS(); +FOUND_ROWS() +445 +SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE f1>10 +ORDER BY f2, f0 LIMIT 0 OFFSET 10; +f0 f1 f2 +SELECT FOUND_ROWS(); +FOUND_ROWS() +445 +set sort_buffer_size= 327680; +SELECT * FROM t1 JOIN tmp on t1.f2=tmp.f2 +ORDER BY tmp.f1, f0 LIMIT 30; +f0 f1 f2 f1 f2 +1 0 0 0 0 +1 0 0 0 0 +1 0 0 0 0 +101 0 0 0 0 +101 0 0 0 0 +101 0 0 0 0 +201 0 0 0 0 +201 0 0 0 0 +201 0 0 0 0 +301 0 0 0 0 +301 0 0 0 0 +301 0 0 0 0 +401 0 0 0 0 +401 0 0 0 0 +401 0 0 0 0 +2 1 1 1 1 +2 1 1 1 1 +2 1 1 1 1 +102 1 1 1 1 +102 1 1 1 1 +102 1 1 1 1 +202 1 1 1 1 +202 1 1 1 1 +202 1 1 1 1 +302 1 1 1 1 +302 1 1 1 1 +302 1 1 1 1 +402 1 1 1 1 +402 1 1 1 1 +402 1 1 1 1 +SELECT * FROM t1 JOIN tmp on t1.f2=tmp.f2 +ORDER BY tmp.f1, f0 LIMIT 30 OFFSET 30; +f0 f1 f2 f1 f2 +3 2 2 2 2 +3 2 2 2 2 +3 2 2 2 2 +103 2 2 2 2 +103 2 2 2 2 +103 2 2 2 2 +203 2 2 2 2 +203 2 2 2 2 +203 2 2 2 2 +303 2 2 2 2 +303 2 2 2 2 +303 2 2 2 2 +403 2 2 2 2 +403 2 2 2 2 +403 2 2 2 2 +4 3 3 3 3 +4 3 3 3 3 +4 3 3 3 3 +104 3 3 3 3 +104 3 3 3 3 +104 3 3 3 3 +204 3 3 3 3 +204 3 3 3 3 +204 3 3 3 3 +304 3 3 3 3 +304 3 3 3 3 +304 3 3 3 3 +404 3 3 3 3 +404 3 3 3 3 +404 3 3 3 3 +SELECT SQL_CALC_FOUND_ROWS * FROM t1 JOIN tmp on t1.f2=tmp.f2 +ORDER BY tmp.f1, f0 LIMIT 30 OFFSET 30; +f0 f1 f2 f1 f2 +3 2 2 2 2 +3 2 2 2 2 +3 2 2 2 2 +103 2 2 2 2 +103 2 2 2 2 +103 2 2 2 2 +203 2 2 2 2 +203 2 2 2 2 +203 2 2 2 2 +303 2 2 2 2 +303 2 2 2 2 +303 2 2 2 2 +403 2 2 2 2 +403 2 2 2 2 +403 2 2 2 2 +4 3 3 3 3 +4 3 3 3 3 +4 3 3 3 3 +104 3 3 3 3 +104 3 3 3 3 +104 3 3 3 3 +204 3 3 3 3 +204 3 3 3 3 +204 3 3 3 3 +304 3 3 3 3 +304 3 3 3 3 +304 3 3 3 3 +404 3 3 3 3 +404 3 3 3 3 +404 3 3 3 3 +SELECT FOUND_ROWS(); +FOUND_ROWS() +1500 +SELECT SQL_CALC_FOUND_ROWS * FROM t1 JOIN tmp on t1.f2=tmp.f2 +WHERE t1.f2>20 +ORDER BY tmp.f1, f0 LIMIT 30 OFFSET 30; +f0 f1 f2 f1 f2 +24 23 23 23 23 +24 23 23 23 23 +24 23 23 23 23 +124 23 23 23 23 +124 23 23 23 23 +124 23 23 23 23 +224 23 23 23 23 +224 23 23 23 23 +224 23 23 23 23 +324 23 23 23 23 +324 23 23 23 23 +324 23 23 23 23 +424 23 23 23 23 +424 23 23 23 23 +424 23 23 23 23 +25 24 24 24 24 +25 24 24 24 24 +25 24 24 24 24 +125 24 24 24 24 +125 24 24 24 24 +125 24 24 24 24 +225 24 24 24 24 +225 24 24 24 24 +225 24 24 24 24 +325 24 24 24 24 +325 24 24 24 24 +325 24 24 24 24 +425 24 24 24 24 +425 24 24 24 24 +425 24 24 24 24 +SELECT FOUND_ROWS(); +FOUND_ROWS() +1185 +CREATE VIEW v1 as SELECT * FROM t1 ORDER BY f1, f0 LIMIT 30; +SELECT * FROM v1; +f0 f1 f2 +1 0 0 +101 0 0 +201 0 0 +301 0 0 +401 0 0 +2 1 1 +102 1 1 +202 1 1 +302 1 1 +402 1 1 +3 2 2 +103 2 2 +203 2 2 +303 2 2 +403 2 2 +4 3 3 +104 3 3 +204 3 3 +304 3 3 +404 3 3 +5 4 4 +105 4 4 +205 4 4 +305 4 4 +405 4 4 +6 5 5 +106 5 5 +206 5 5 +306 5 5 +406 5 5 +drop view v1; +CREATE VIEW v1 as SELECT * FROM t1 ORDER BY f1, f0 LIMIT 100; +SELECT * FROM v1 ORDER BY f2, f0 LIMIT 30; +f0 f1 f2 +1 0 0 +101 0 0 +201 0 0 +301 0 0 +401 0 0 +2 1 1 +102 1 1 +202 1 1 +302 1 1 +402 1 1 +11 10 10 +111 10 10 +211 10 10 +311 10 10 +411 10 10 +12 11 11 +112 11 11 +212 11 11 +312 11 11 +412 11 11 +13 12 12 +113 12 12 +213 12 12 +313 12 12 +413 12 12 +14 13 13 +114 13 13 +214 13 13 +314 13 13 +414 13 13 +CREATE VIEW v2 as SELECT * FROM t1 ORDER BY f2, f0 LIMIT 100; +SELECT * FROM v1 JOIN v2 on v1.f1=v2.f1 ORDER BY v1.f2,v1.f0,v2.f0 +LIMIT 30; +f0 f1 f2 f0 f1 f2 +1 0 0 1 0 0 +1 0 0 101 0 0 +1 0 0 201 0 0 +1 0 0 301 0 0 +1 0 0 401 0 0 +101 0 0 1 0 0 +101 0 0 101 0 0 +101 0 0 201 0 0 +101 0 0 301 0 0 +101 0 0 401 0 0 +201 0 0 1 0 0 +201 0 0 101 0 0 +201 0 0 201 0 0 +201 0 0 301 0 0 +201 0 0 401 0 0 +301 0 0 1 0 0 +301 0 0 101 0 0 +301 0 0 201 0 0 +301 0 0 301 0 0 +301 0 0 401 0 0 +401 0 0 1 0 0 +401 0 0 101 0 0 +401 0 0 201 0 0 +401 0 0 301 0 0 +401 0 0 401 0 0 +2 1 1 2 1 1 +2 1 1 102 1 1 +2 1 1 202 1 1 +2 1 1 302 1 1 +2 1 1 402 1 1 +SELECT floor(f1/10) f3, count(f2) FROM t1 +GROUP BY 1 ORDER BY 2,1 LIMIT 5; +f3 count(f2) +0 50 +1 50 +2 50 +3 50 +4 50 +SELECT floor(f1/10) f3, count(f2) FROM t1 +GROUP BY 1 ORDER BY 2,1 LIMIT 0; +f3 count(f2) +CREATE PROCEDURE wl1393_sp_test() +BEGIN +SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 30; +SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 15 OFFSET 15; +SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE f1>10 +ORDER BY f2, f0 LIMIT 15 OFFSET 15; +SELECT FOUND_ROWS(); +SELECT * FROM v1 ORDER BY f2, f0 LIMIT 30; +END| +CALL wl1393_sp_test()| +f0 f1 f2 +12 11 11 +112 11 11 +212 11 11 +312 11 11 +412 11 11 +13 12 12 +113 12 12 +213 12 12 +313 12 12 +413 12 12 +14 13 13 +114 13 13 +214 13 13 +314 13 13 +414 13 13 +15 14 14 +115 14 14 +215 14 14 +315 14 14 +415 14 14 +16 15 15 +116 15 15 +216 15 15 +316 15 15 +416 15 15 +17 16 16 +117 16 16 +217 16 16 +317 16 16 +417 16 16 +f0 f1 f2 +15 14 14 +115 14 14 +215 14 14 +315 14 14 +415 14 14 +16 15 15 +116 15 15 +216 15 15 +316 15 15 +416 15 15 +17 16 16 +117 16 16 +217 16 16 +317 16 16 +417 16 16 +f0 f1 f2 +15 14 14 +115 14 14 +215 14 14 +315 14 14 +415 14 14 +16 15 15 +116 15 15 +216 15 15 +316 15 15 +416 15 15 +17 16 16 +117 16 16 +217 16 16 +317 16 16 +417 16 16 +FOUND_ROWS() +445 +f0 f1 f2 +1 0 0 +101 0 0 +201 0 0 +301 0 0 +401 0 0 +2 1 1 +102 1 1 +202 1 1 +302 1 1 +402 1 1 +11 10 10 +111 10 10 +211 10 10 +311 10 10 +411 10 10 +12 11 11 +112 11 11 +212 11 11 +312 11 11 +412 11 11 +13 12 12 +113 12 12 +213 12 12 +313 12 12 +413 12 12 +14 13 13 +114 13 13 +214 13 13 +314 13 13 +414 13 13 +DROP PROCEDURE wl1393_sp_test| +SELECT d1.f1, d1.f2 FROM t1 +LEFT JOIN (SELECT * FROM t1 ORDER BY f1 LIMIT 30) d1 on t1.f1=d1.f1 +ORDER BY d1.f2 DESC LIMIT 30; +f1 f2 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +5 5 +4 4 +4 4 +4 4 +4 4 +4 4 +SELECT * FROM t1 WHERE f1 = (SELECT f1 FROM t1 ORDER BY 1 LIMIT 1); +f0 f1 f2 +1 0 0 +101 0 0 +201 0 0 +301 0 0 +401 0 0 +SELECT * FROM t1 WHERE f1 = (SELECT f1 FROM t1 ORDER BY 1 LIMIT 2); +ERROR 21000: Subquery returns more than 1 row +DROP TABLE t1, tmp; +DROP VIEW v1, v2; +# end of WL#1393 - Optimizing filesort with small limit +# +# Bug #58761 +# Crash in Field::is_null in field.h on subquery in WHERE clause +# +CREATE TABLE t1 ( +pk INT NOT NULL AUTO_INCREMENT, +col_int_key INT DEFAULT NULL, +col_varchar_key VARCHAR(1) DEFAULT NULL, +PRIMARY KEY (pk), +KEY col_varchar_key (col_varchar_key,col_int_key) +); +INSERT INTO t1 VALUES (27,7,'x'); +INSERT INTO t1 VALUES (28,6,'m'); +INSERT INTO t1 VALUES (29,4,'c'); +CREATE TABLE where_subselect +SELECT DISTINCT `pk` AS field1 , `pk` AS field2 +FROM t1 AS alias1 +WHERE alias1 . `col_int_key` > 229 +OR alias1 . `col_varchar_key` IS NOT NULL +GROUP BY field1, field2 +; +SELECT * +FROM where_subselect +WHERE (field1, field2) IN ( +SELECT DISTINCT `pk` AS field1 , `pk` AS field2 +FROM t1 AS alias1 +WHERE alias1 . `col_int_key` > 229 +OR alias1 . `col_varchar_key` IS NOT NULL +GROUP BY field1, field2 +); +field1 field2 +27 27 +28 28 +29 29 +DROP TABLE t1; +DROP TABLE where_subselect; +# End of Bug #58761 CREATE TABLE t1 ( id1 INT NULL, id2 INT NOT NULL, @@ -1977,6 +2862,7 @@ Handler_read_key 250 Handler_read_last 0 Handler_read_next 249 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 249 Handler_read_rnd_deleted 0 Handler_read_rnd_next 250 @@ -1995,6 +2881,7 @@ Handler_read_key 250 Handler_read_last 0 Handler_read_next 249 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 1 Handler_read_rnd_deleted 0 Handler_read_rnd_next 250 @@ -2062,3 +2949,16 @@ ORDER BY NULL, @a0 := 3, @a1 := 3, @a2 := 3, @a3 := 3, @a4 := 3, 1 2 End of 5.5 tests +# +# MDEV-5884: EXPLAIN UPDATE ... ORDER BY LIMIT shows wrong #rows +# +create table t2(a int); +insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 (key1 int, col1 int, key(key1)); +insert into t1 +select A.a + 10 * B.a + 100 * C.a, 1234 from t2 A, t2 B, t2 C; +# Should show rows=2, not rows=100 +explain update t1 set key1=key1+1 where key1 between 10 and 110 order by key1 limit 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range key1 key1 5 NULL 2 Using where; Using buffer +drop table t1,t2; diff --git a/mysql-test/r/order_by_sortkey.result b/mysql-test/r/order_by_sortkey.result new file mode 100644 index 00000000000..c1d9609eb47 --- /dev/null +++ b/mysql-test/r/order_by_sortkey.result @@ -0,0 +1,161 @@ +CREATE TABLE t1( +f0 int auto_increment PRIMARY KEY, +f1 int, +f2 varchar(200) +); +INSERT INTO t1(f1, f2) VALUES +(0,"0"),(1,"1"),(2,"2"),(3,"3"),(4,"4"),(5,"5"), +(6,"6"),(7,"7"),(8,"8"),(9,"9"),(10,"10"), +(11,"11"),(12,"12"),(13,"13"),(14,"14"),(15,"15"), +(16,"16"),(17,"17"),(18,"18"),(19,"19"),(20,"20"), +(21,"21"),(22,"22"),(23,"23"),(24,"24"),(25,"25"), +(26,"26"),(27,"27"),(28,"28"),(29,"29"),(30,"30"), +(31,"31"),(32,"32"),(33,"33"),(34,"34"),(35,"35"), +(36,"36"),(37,"37"),(38,"38"),(39,"39"),(40,"40"), +(41,"41"),(42,"42"),(43,"43"),(44,"44"),(45,"45"), +(46,"46"),(47,"47"),(48,"48"),(49,"49"),(50,"50"), +(51,"51"),(52,"52"),(53,"53"),(54,"54"),(55,"55"), +(56,"56"),(57,"57"),(58,"58"),(59,"59"),(60,"60"), +(61,"61"),(62,"62"),(63,"63"),(64,"64"),(65,"65"), +(66,"66"),(67,"67"),(68,"68"),(69,"69"),(70,"70"), +(71,"71"),(72,"72"),(73,"73"),(74,"74"),(75,"75"), +(76,"76"),(77,"77"),(78,"78"),(79,"79"),(80,"80"), +(81,"81"),(82,"82"),(83,"83"),(84,"84"),(85,"85"), +(86,"86"),(87,"87"),(88,"88"),(89,"89"),(90,"90"), +(91,"91"),(92,"92"),(93,"93"),(94,"94"),(95,"95"), +(96,"96"),(97,"97"),(98,"98"),(99,"99"); +CREATE TEMPORARY TABLE tmp (f1 int, f2 varchar(20)); +INSERT INTO tmp SELECT f1,f2 FROM t1; +INSERT INTO t1(f1,f2) SELECT * FROM tmp; +INSERT INTO tmp SELECT f1,f2 FROM t1; +INSERT INTO t1(f1,f2) SELECT * FROM tmp; +INSERT INTO t1(f1,f2) SELECT * FROM tmp; +INSERT INTO tmp SELECT f1,f2 FROM t1; +INSERT INTO t1(f1,f2) SELECT * FROM tmp; +INSERT INTO tmp SELECT f1,f2 FROM t1; +INSERT INTO t1(f1,f2) SELECT * FROM tmp; +INSERT INTO tmp SELECT f1,f2 FROM t1; +INSERT INTO t1(f1,f2) SELECT * FROM tmp; +INSERT INTO tmp SELECT f1,f2 FROM t1; +INSERT INTO t1(f1,f2) SELECT * FROM tmp; +INSERT INTO tmp SELECT f1,f2 FROM t1; +INSERT INTO t1(f1,f2) SELECT * FROM tmp; +set sort_buffer_size= 32768; +FLUSH STATUS; +SHOW SESSION STATUS LIKE 'Sort%'; +Variable_name Value +Sort_merge_passes 0 +Sort_priority_queue_sorts 0 +Sort_range 0 +Sort_rows 0 +Sort_scan 0 +SELECT * FROM t1 ORDER BY f2 LIMIT 100; +f0 f1 f2 +1 0 0 +101 0 0 +201 0 0 +301 0 0 +401 0 0 +501 0 0 +601 0 0 +701 0 0 +801 0 0 +901 0 0 +1001 0 0 +1101 0 0 +1201 0 0 +1301 0 0 +1401 0 0 +1501 0 0 +1601 0 0 +1701 0 0 +1801 0 0 +1901 0 0 +2001 0 0 +2101 0 0 +2201 0 0 +2301 0 0 +2401 0 0 +2501 0 0 +2601 0 0 +2701 0 0 +2801 0 0 +2901 0 0 +3001 0 0 +3101 0 0 +3201 0 0 +3301 0 0 +3401 0 0 +3501 0 0 +3601 0 0 +3701 0 0 +3801 0 0 +3901 0 0 +4001 0 0 +4101 0 0 +4201 0 0 +4301 0 0 +4401 0 0 +4501 0 0 +4601 0 0 +4701 0 0 +4801 0 0 +4901 0 0 +5001 0 0 +5101 0 0 +5201 0 0 +5301 0 0 +5401 0 0 +5501 0 0 +5601 0 0 +5701 0 0 +5801 0 0 +5901 0 0 +6001 0 0 +6101 0 0 +6201 0 0 +6301 0 0 +6401 0 0 +6501 0 0 +6601 0 0 +6701 0 0 +6801 0 0 +6901 0 0 +7001 0 0 +7101 0 0 +7201 0 0 +7301 0 0 +7401 0 0 +7501 0 0 +7601 0 0 +7701 0 0 +7801 0 0 +7901 0 0 +8001 0 0 +8101 0 0 +8201 0 0 +8301 0 0 +8401 0 0 +8501 0 0 +8601 0 0 +8701 0 0 +8801 0 0 +8901 0 0 +9001 0 0 +9101 0 0 +9201 0 0 +9301 0 0 +9401 0 0 +9501 0 0 +9601 0 0 +9701 0 0 +9801 0 0 +9901 0 0 +SHOW SESSION STATUS LIKE 'Sort%'; +Variable_name Value +Sort_merge_passes 0 +Sort_priority_queue_sorts 1 +Sort_range 0 +Sort_rows 100 +Sort_scan 1 +DROP TABLE t1, tmp; diff --git a/mysql-test/r/order_by_zerolength-4285.result b/mysql-test/r/order_by_zerolength-4285.result new file mode 100644 index 00000000000..f60ce7d90c7 --- /dev/null +++ b/mysql-test/r/order_by_zerolength-4285.result @@ -0,0 +1,26 @@ +create table t1 (pk int primary key); +insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +select * from t1 order by now(), cast(pk as char(0)); +pk +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +Warnings: +Warning 1292 Truncated incorrect CHAR(0) value: '1' +Warning 1292 Truncated incorrect CHAR(0) value: '2' +Warning 1292 Truncated incorrect CHAR(0) value: '3' +Warning 1292 Truncated incorrect CHAR(0) value: '4' +Warning 1292 Truncated incorrect CHAR(0) value: '5' +Warning 1292 Truncated incorrect CHAR(0) value: '6' +Warning 1292 Truncated incorrect CHAR(0) value: '7' +Warning 1292 Truncated incorrect CHAR(0) value: '8' +Warning 1292 Truncated incorrect CHAR(0) value: '9' +Warning 1292 Truncated incorrect CHAR(0) value: '10' +drop table t1; diff --git a/mysql-test/r/parser.result b/mysql-test/r/parser.result index 9a14c0e324b..cca754da295 100644 --- a/mysql-test/r/parser.result +++ b/mysql-test/r/parser.result @@ -441,7 +441,7 @@ select master_pos_wait(); ERROR 42000: Incorrect parameter count in the call to native function 'master_pos_wait' select master_pos_wait(1); ERROR 42000: Incorrect parameter count in the call to native function 'master_pos_wait' -select master_pos_wait(1, 2, 3, 4); +select master_pos_wait(1, 2, 3, 4, 5); ERROR 42000: Incorrect parameter count in the call to native function 'master_pos_wait' select rand(1, 2, 3); ERROR 42000: Incorrect parameter count in the call to native function 'rand' diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 435ed6270ca..d4b719f3a75 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -67,6 +67,19 @@ AND A.b = '06' AND A.c = 343; DROP TABLE t1; # +# Bug#59503: explain extended crash in get_mm_leaf +# +CREATE TABLE t1 (a VARCHAR(51) CHARACTER SET latin1) +ENGINE=MyISAM +PARTITION BY KEY (a) PARTITIONS 1; +INSERT INTO t1 VALUES ('a'),('b'),('c'); +EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE a > 1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1003 select 1 AS `1` from `test`.`t1` where (`test`.`t1`.`a` > 1) +DROP TABLE t1; +# # Bug#57778: failed primary key add to partitioned innodb table # inconsistent and crashes # @@ -175,7 +188,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`ID`,`aaaa,aaaaa`,`ddddddddd`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (ID) -SUBPARTITION BY LINEAR KEY (ID,`aaaa,aaaaa`) +SUBPARTITION BY LINEAR KEY (`ID`,`aaaa,aaaaa`) SUBPARTITIONS 2 (PARTITION p01 VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION p11 VALUES LESS THAN (200) ENGINE = MyISAM, @@ -286,6 +299,8 @@ insert into t1 select * from t1; create index i on t1 (a); ERROR 42000: Duplicate key name 'i' create index i2 on t1 (a); +Warnings: +Note 1831 Duplicate index `i2`. This is deprecated and will be disallowed in a future release. drop table t1; CREATE TABLE t1 (a INT, FOREIGN KEY (a) REFERENCES t0 (a)) ENGINE=MyISAM @@ -303,6 +318,32 @@ INSERT INTO t1 VALUES (NULL); SELECT * FROM t1 WHERE pk < 0 ORDER BY pk; pk DROP TABLE t1; +SET sql_mode=no_engine_substitution; +CREATE TABLE t1 (a INT) +ENGINE=NonExistentEngine; +ERROR 42000: Unknown storage engine 'NonExistentEngine' +CREATE TABLE t1 (a INT) +ENGINE=NonExistentEngine +PARTITION BY HASH (a); +ERROR 42000: Unknown storage engine 'NonExistentEngine' +CREATE TABLE t1 (a INT) +ENGINE=Memory; +ALTER TABLE t1 ENGINE=NonExistentEngine; +ERROR 42000: Unknown storage engine 'NonExistentEngine' +ALTER TABLE t1 +PARTITION BY HASH (a) +(PARTITION p0 ENGINE=Memory, +PARTITION p1 ENGINE=NonExistentEngine); +ERROR 42000: Unknown storage engine 'NonExistentEngine' +ALTER TABLE t1 ENGINE=NonExistentEngine; +ERROR 42000: Unknown storage engine 'NonExistentEngine' +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +DROP TABLE t1; +SET sql_mode=''; CREATE TABLE t1 (a INT) ENGINE=NonExistentEngine; Warnings: @@ -339,6 +380,7 @@ t1 CREATE TABLE `t1` ( (PARTITION p0 ENGINE = MEMORY, PARTITION p1 ENGINE = MEMORY) */ DROP TABLE t1; +SET sql_mode=DEFAULT; CREATE TABLE t1 (a INT NOT NULL, KEY(a)) PARTITION BY RANGE(a) (PARTITION p1 VALUES LESS THAN (200), PARTITION pmax VALUES LESS THAN MAXVALUE); @@ -520,6 +562,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -540,6 +583,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -572,6 +616,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 2 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -590,6 +635,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 2 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -608,6 +654,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 2 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -626,6 +673,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 2 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -1056,13 +1104,13 @@ select * from t1 where f1 = 10; f1 f2 10 1 drop table t1; -set session storage_engine= 'memory'; +set session default_storage_engine= 'memory'; create table t1 (f_int1 int(11) default null) engine = memory partition by range (f_int1) subpartition by hash (f_int1) (partition part1 values less than (1000) (subpartition subpart11 engine = memory)); drop table t1; -set session storage_engine='myisam'; +set session default_storage_engine='myisam'; create table t1 (f_int1 integer, f_int2 integer, primary key (f_int1)) partition by hash(f_int1) partitions 2; insert into t1 values (1,1),(2,2); @@ -1885,8 +1933,7 @@ WHERE t1.id IN ( SELECT distinct id FROM t4 WHERE taken BETWEEN @f_date AND date_add(@t_date, INTERVAL 1 DAY)) -ORDER BY t1.id -; +ORDER BY t1.id; MyISAM_part 16421 19092 @@ -1907,7 +1954,7 @@ INSERT INTO t1 VALUES ('2006-09-29 21:50:01',22589,'Verified'); DROP TABLE IF EXISTS t2; Warnings: -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t2' CREATE TABLE t2 ( id int(8) NOT NULL, severity tinyint(4) NOT NULL DEFAULT '0', @@ -2565,3 +2612,25 @@ LAZYK NULL NULL NULL NULL Walla Walla NULL NULL USA NULL NULL LETSS NULL NULL NULL NULL San Francisco NULL NULL USA NULL NULL LONEP NULL NULL NULL NULL Portland NULL NULL USA NULL NULL DROP TABLE t1; +CREATE TABLE t1 ( d DATE NOT NULL) +PARTITION BY RANGE( YEAR(d) ) ( +PARTITION p0 VALUES LESS THAN (1960), +PARTITION p1 VALUES LESS THAN (1970), +PARTITION p2 VALUES LESS THAN (1980), +PARTITION p3 VALUES LESS THAN (1990) +); +ALTER TABLE t1 ADD PARTITION IF NOT EXISTS( +PARTITION `p5` VALUES LESS THAN (2010) +COMMENT 'APSTART \' APEND' +); +ALTER TABLE t1 ADD PARTITION IF NOT EXISTS( +PARTITION `p5` VALUES LESS THAN (2010) +COMMENT 'APSTART \' APEND' +); +Warnings: +Note 1517 Duplicate partition name p5 +alter table t1 drop partition if exists p5; +alter table t1 drop partition if exists p5; +Warnings: +Note 1507 Error in list of partitions to DROP +DROP TABLE t1; diff --git a/mysql-test/r/partition_alter.result b/mysql-test/r/partition_alter.result new file mode 100644 index 00000000000..cbd90b5ba7c --- /dev/null +++ b/mysql-test/r/partition_alter.result @@ -0,0 +1,53 @@ +CREATE TABLE `test_data` ( +`hid` bigint(20) unsigned NOT NULL, +`itid` bigint(20) unsigned NOT NULL, +`clocktime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +`values` double(16,4) NOT NULL, +PRIMARY KEY (`hid`,`itid`,`clocktime`) +) ; +INSERT INTO `test_data` (`hid`, `itid`, `clocktime`, `values`) VALUES +(1, 1, '2015-03-10 06:25:16', 0.0000), +(1, 1, '2015-03-10 06:26:24', 0.0000), +(1, 1, '2015-03-10 06:27:32', 0.0000), +(1, 1, '2015-03-10 06:28:40', 0.0000), +(1, 1, '2015-03-10 06:29:49', 0.0000), +(1, 1, '2015-03-10 06:30:57', 0.0000), +(1, 1, '2015-03-10 06:32:05', 0.0000), +(1, 1, '2015-03-10 06:33:14', 0.0000), +(1, 1, '2015-03-10 06:34:22', 0.0000), +(1, 1, '2015-03-10 06:35:30', 0.0000), +(1, 1, '2015-03-10 06:36:39', 0.0000), +(1, 1, '2015-03-10 06:37:47', 0.0000), +(1, 1, '2015-03-10 06:38:55', 0.0000), +(1, 1, '2015-03-10 06:40:03', 0.0000), +(1, 1, '2015-03-10 06:41:09', 0.0000), +(1, 1, '2015-03-10 06:42:21', 0.0000), +(1, 1, '2015-03-10 06:43:29', 0.0000), +(1, 1, '2015-03-10 06:44:37', 0.0000), +(1, 1, '2015-03-10 06:45:46', 0.0000), +(1, 1, '2015-03-10 06:47:05', 0.0000), +(1, 1, '2015-03-10 06:48:21', 0.0000), +(1, 1, '2015-03-10 06:49:41', 0.0000), +(1, 1, '2015-03-10 06:50:58', 0.0000), +(1, 1, '2015-03-10 06:52:08', 0.0000), +(1, 1, '2015-03-10 06:53:17', 0.0000), +(1, 1, '2015-03-10 06:54:25', 0.0000), +(563, 1, '2015-03-17 14:28:28', 0.3125), +(563, 1, '2015-03-17 14:29:39', 0.2775), +(563, 1, '2015-03-17 14:30:49', 0.2675); +CREATE PROCEDURE `create_part_max`() +alter table `test_data` + partition by range(unix_timestamp(clocktime)) ( +partition partMAX values less than MAXVALUE +); +call create_part_max(); +call create_part_max(); +drop procedure create_part_max; +prepare stmt from "alter table `test_data` + partition by range(unix_timestamp(clocktime)) ( + partition partMAX values less than MAXVALUE + )"; +execute stmt; +execute stmt; +deallocate prepare stmt; +drop table test_data; diff --git a/mysql-test/r/partition_binlog.result b/mysql-test/r/partition_binlog.result index c8fa02c4b99..21eca8f1c00 100644 --- a/mysql-test/r/partition_binlog.result +++ b/mysql-test/r/partition_binlog.result @@ -9,7 +9,7 @@ PARTITION BY RANGE (id) PARTITION pmax VALUES LESS THAN (MAXVALUE)); INSERT INTO t1 VALUES (1), (10), (100), (1000); ALTER TABLE t1 TRUNCATE PARTITION p1; -ERROR HY000: Incorrect partition name +ERROR HY000: Unknown partition 'p1' in table 't1' ALTER TABLE t1 DROP PARTITION p1; ERROR HY000: Error in list of partitions to DROP # No error returned, output in table format instead: @@ -39,11 +39,16 @@ Table Op Msg_type Msg_text test.t1 repair status OK ALTER TABLE t1 TRUNCATE PARTITION p0; ALTER TABLE t1 DROP PARTITION p0; -show binlog events in 'master-bin.000001' from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; ALTER TABLE t1 ANALYZE PARTITION p0 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; ALTER TABLE t1 OPTIMIZE PARTITION p0 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; ALTER TABLE t1 REPAIR PARTITION p0 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; ALTER TABLE t1 TRUNCATE PARTITION p0 +master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; ALTER TABLE t1 DROP PARTITION p0 DROP TABLE t1; diff --git a/mysql-test/r/partition_debug_sync.result b/mysql-test/r/partition_debug_sync.result index ad0f6df5ff2..7abe0163a98 100644 --- a/mysql-test/r/partition_debug_sync.result +++ b/mysql-test/r/partition_debug_sync.result @@ -5,7 +5,9 @@ SET DEBUG_SYNC= 'RESET'; # Test when remove partitioning is done while drop table is waiting # for the table. # After MDL was introduced, there is no longer any race, so test is done -# by adding a small sleep to verify that the delete waits. +# by adding a small sleep to verify that the delete waits. This happens +# only until ALTER tries to upgrade its MDL lock, which ends up in MDL +# deadlock which is correctly reported. # Con 1 SET DEBUG_SYNC= 'RESET'; CREATE TABLE t1 @@ -18,17 +20,16 @@ ENGINE = MYISAM PARTITION p1 VALUES LESS THAN (20), PARTITION p2 VALUES LESS THAN (100), PARTITION p3 VALUES LESS THAN MAXVALUE ) */; -SET SESSION debug_dbug= "+d,sleep_before_create_table_no_lock"; SET DEBUG_SYNC= 'alter_table_before_create_table_no_lock SIGNAL removing_partitioning WAIT_FOR waiting_for_alter'; -SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL partitioning_removed'; +SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL waiting_for_upgrade'; ALTER TABLE t1 REMOVE PARTITIONING; # Con default SET DEBUG_SYNC= 'now WAIT_FOR removing_partitioning'; SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL waiting_for_alter'; -SET DEBUG_SYNC= 'rm_table_no_locks_before_delete_table WAIT_FOR partitioning_removed'; +SET DEBUG_SYNC= 'rm_table_no_locks_before_delete_table WAIT_FOR waiting_for_upgrade'; DROP TABLE IF EXISTS t1; # Con 1 -SET SESSION debug_dbug= "-d,sleep_before_create_table_no_lock"; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET'; # @@ -42,24 +43,46 @@ CREATE TABLE t2 b INTEGER NOT NULL, KEY (b)) ENGINE = MYISAM -/*!50100 PARTITION BY RANGE (a) -(PARTITION p0 VALUES LESS THAN (2), +PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (2), PARTITION p1 VALUES LESS THAN (20), PARTITION p2 VALUES LESS THAN (100), -PARTITION p3 VALUES LESS THAN MAXVALUE ) */; +PARTITION p3 VALUES LESS THAN MAXVALUE); SET DEBUG_SYNC= 'alter_table_before_open_tables SIGNAL removing_partitions WAIT_FOR waiting_for_alter'; SET DEBUG_SYNC= 'alter_table_before_rename_result_table WAIT_FOR delete_done'; ALTER TABLE t2 REMOVE PARTITIONING; # Con default -SET SESSION debug_dbug= "+d,sleep_before_no_locks_delete_table"; SET DEBUG_SYNC= 'now WAIT_FOR removing_partitions'; SET DEBUG_SYNC= 'rm_table_no_locks_before_delete_table SIGNAL waiting_for_alter'; SET DEBUG_SYNC= 'rm_table_no_locks_before_binlog SIGNAL delete_done'; DROP TABLE IF EXISTS t2; -SET SESSION debug_dbug= "-d,sleep_before_no_locks_delete_table"; # Con 1 ERROR 42S02: Table 'test.t2' doesn't exist SET DEBUG_SYNC= 'RESET'; # Con default SET DEBUG_SYNC= 'RESET'; End of 5.1 tests +# +# Coverage test for non pruned ha_partition::store_lock() +# +CREATE TABLE t1 (a int) ENGINE = InnoDB; +CREATE TABLE t2 (a int PRIMARY KEY) +ENGINE = InnoDB PARTITION BY HASH (a) PARTITIONS 3; +HANDLER t1 OPEN; +# Con1 +LOCK TABLES t1 WRITE, t2 READ; +# Default +SET DEBUG_SYNC="wait_for_lock SIGNAL locking"; +INSERT INTO t2 VALUES (1), (2), (3); +# Con1 +SET DEBUG_SYNC="now WAIT_FOR locking"; +ALTER TABLE t1 ADD COLUMN b int; +# Default +ERROR HY000: Wait on a lock was aborted due to a pending exclusive lock +SELECT 1; +1 +1 +# Con1 +UNLOCK TABLES; +# Default +SET DEBUG_SYNC = 'RESET'; +DROP TABLE t1, t2; diff --git a/mysql-test/r/partition_disabled.result b/mysql-test/r/partition_disabled.result index 2978a3b6d2e..c78552beb9d 100644 --- a/mysql-test/r/partition_disabled.result +++ b/mysql-test/r/partition_disabled.result @@ -3,7 +3,7 @@ FLUSH TABLES; SELECT * FROM t1; ERROR HY000: The MariaDB server is running with the --skip-partition option so it cannot execute this statement TRUNCATE TABLE t1; -ERROR 42S02: Table 'test.t1' doesn't exist +ERROR HY000: The MariaDB server is running with the --skip-partition option so it cannot execute this statement ANALYZE TABLE t1; Table Op Msg_type Msg_text test.t1 analyze Error The MariaDB server is running with the --skip-partition option so it cannot execute this statement @@ -56,7 +56,7 @@ ERROR HY000: The MariaDB server is running with the --skip-partition option so i ALTER TABLE t1 PARTITION BY KEY(joined) PARTITIONS 2; ERROR HY000: The MariaDB server is running with the --skip-partition option so it cannot execute this statement drop table t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' CREATE TABLE t1 ( firstname VARCHAR(25) NOT NULL, lastname VARCHAR(25) NOT NULL, @@ -73,7 +73,7 @@ PARTITION p4 VALUES LESS THAN MAXVALUE ); ERROR HY000: The MariaDB server is running with the --skip-partition option so it cannot execute this statement drop table t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' CREATE TABLE t1 (id INT, purchased DATE) PARTITION BY RANGE( YEAR(purchased) ) SUBPARTITION BY HASH( TO_DAYS(purchased) ) @@ -84,10 +84,25 @@ PARTITION p2 VALUES LESS THAN MAXVALUE ); ERROR HY000: The MariaDB server is running with the --skip-partition option so it cannot execute this statement drop table t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' create table t1 (a varchar(10) charset latin1 collate latin1_bin); insert into t1 values (''),(' '),('a'),('a '),('a '); explain partitions select * from t1 where a='a ' OR a='a'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using where drop table t1; +# +# bug#11760213-52599: ALTER TABLE REMOVE PARTITIONING ON NON-PARTITIONED +# TABLE CORRUPTS MYISAM +DROP TABLE if exists `t1`; +CREATE TABLE `t1`(`a` INT)ENGINE=myisam; +ALTER TABLE `t1` ADD COLUMN `b` INT; +CREATE UNIQUE INDEX `i1` ON `t1`(`b`); +CREATE UNIQUE INDEX `i2` ON `t1`(`a`); +ALTER TABLE `t1` ADD PRIMARY KEY (`a`); +ALTER TABLE `t1` REMOVE PARTITIONING; +ERROR HY000: Partition management on a not partitioned table is not possible +CHECK TABLE `t1` EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result index 0c15ded0d73..f05b145053d 100644 --- a/mysql-test/r/partition_error.result +++ b/mysql-test/r/partition_error.result @@ -1,5 +1,15 @@ drop table if exists t1, t2; # +# Bug#60039: crash when exchanging a partition on +# nonpartitioned table with a view +# +CREATE TABLE t1 (a int); +CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1; +ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE v1; +ERROR 42000: Can't open table +DROP VIEW v1; +DROP TABLE t1; +# # Bug#13608188 - 64038: CRASH IN HANDLER::HA_THD ON ALTER TABLE AFTER # REPAIR NON-EXISTING PARTITION # @@ -1759,3 +1769,99 @@ ERROR HY000: This partition function is not allowed create table t1 (a int) partition by list (uuid_short()) (partition p0 values in (0), partition p1 values in (1)); ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ') (partition p0 values in (0), partition p1 values in (1))' at line 1 End of 5.5 tests +CREATE TABLE t1 (a INT) +PARTITION BY LIST (a) +SUBPARTITION BY HASH (a) SUBPARTITIONS 2 +(PARTITION p1 VALUES IN (1) COMMENT "Comment in p1" + (SUBPARTITION p1spFirst COMMENT "SubPartition comment in p1spFirst", +SUBPARTITION p1spSecond COMMENT "SubPartition comment in p1spSecond"), +PARTITION p2 VALUES IN (2) COMMENT "Comment in p2" + (SUBPARTITION p2spFirst COMMENT "SubPartition comment in p2spFirst", +SUBPARTITION p2spSecond COMMENT "SubPartition comment in p2spSecond")); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY LIST (a) +SUBPARTITION BY HASH (a) +(PARTITION p1 VALUES IN (1) + (SUBPARTITION p1spFirst COMMENT = 'SubPartition comment in p1spFirst' ENGINE = MyISAM, + SUBPARTITION p1spSecond COMMENT = 'SubPartition comment in p1spSecond' ENGINE = MyISAM), + PARTITION p2 VALUES IN (2) + (SUBPARTITION p2spFirst COMMENT = 'SubPartition comment in p2spFirst' ENGINE = MyISAM, + SUBPARTITION p2spSecond COMMENT = 'SubPartition comment in p2spSecond' ENGINE = MyISAM)) */ +SELECT PARTITION_NAME, SUBPARTITION_NAME, PARTITION_COMMENT FROM INFORMATION_SCHEMA.PARTITIONS +WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test'; +PARTITION_NAME SUBPARTITION_NAME PARTITION_COMMENT +p1 p1spFirst SubPartition comment in p1spFirst +p1 p1spSecond SubPartition comment in p1spSecond +p2 p2spFirst SubPartition comment in p2spFirst +p2 p2spSecond SubPartition comment in p2spSecond +DROP TABLE t1; +CREATE TABLE t1 (a INT) +PARTITION BY LIST (a) +SUBPARTITION BY HASH (a) SUBPARTITIONS 2 +(PARTITION p1 VALUES IN (1) +(SUBPARTITION p1spFirst COMMENT "SubPartition comment in p1spFirst", +SUBPARTITION p1spSecond), +PARTITION p2 VALUES IN (2) COMMENT "Comment in p2" + (SUBPARTITION p2spFirst, +SUBPARTITION p2spSecond COMMENT "SubPartition comment in p2spSecond")); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY LIST (a) +SUBPARTITION BY HASH (a) +(PARTITION p1 VALUES IN (1) + (SUBPARTITION p1spFirst COMMENT = 'SubPartition comment in p1spFirst' ENGINE = MyISAM, + SUBPARTITION p1spSecond ENGINE = MyISAM), + PARTITION p2 VALUES IN (2) + (SUBPARTITION p2spFirst COMMENT = 'Comment in p2' ENGINE = MyISAM, + SUBPARTITION p2spSecond COMMENT = 'SubPartition comment in p2spSecond' ENGINE = MyISAM)) */ +SELECT PARTITION_NAME, SUBPARTITION_NAME, PARTITION_COMMENT FROM INFORMATION_SCHEMA.PARTITIONS +WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test'; +PARTITION_NAME SUBPARTITION_NAME PARTITION_COMMENT +p1 p1spFirst SubPartition comment in p1spFirst +p1 p1spSecond +p2 p2spFirst Comment in p2 +p2 p2spSecond SubPartition comment in p2spSecond +DROP TABLE t1; +CREATE TABLE t1 +(a INT , +KEY inx_a (a) ) +PARTITION BY RANGE (a) +SUBPARTITION BY HASH (a) SUBPARTITIONS 2 +(PARTITION pUpTo10 VALUES LESS THAN (10) COMMENT +"This is a long comment (2050 ascii characters) 50 pUpTo10 partition ......80-!.................. 100 ................................................................................................ 200....................................................................................................................................................................................................................................................................................................... 500 ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1000 ..............1024-|.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1500 .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. 2000 ......................................2048-|++" + (SUBPARTITION `p-10sp0` ,SUBPARTITION `p-10sp1` ), +PARTITION pMax VALUES LESS THAN MAXVALUE COMMENT +"This is a long comment (2050 ascii characters) 50 pMax partition comment .80-!.................. 100 ................................................................................................ 200....................................................................................................................................................................................................................................................................................................... 500 ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1000 ..............1024-|.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1500 .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. 2000 ......................................2048-|++" + (SUBPARTITION `pMaxsp0` ,SUBPARTITION `pMaxsp1` )); +Warnings: +Warning 1793 Comment for table partition 'pUpTo10' is too long (max = 1024) +Warning 1793 Comment for table partition 'pMax' is too long (max = 1024) +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + KEY `inx_a` (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +SUBPARTITION BY HASH (a) +(PARTITION pUpTo10 VALUES LESS THAN (10) + (SUBPARTITION `p-10sp0` COMMENT = 'This is a long comment (2050 ascii characters) 50 pUpTo10 partition ......80-!.................. 100 ................................................................................................ 200....................................................................................................................................................................................................................................................................................................... 500 ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1000 ..............1024-|' ENGINE = MyISAM, + SUBPARTITION `p-10sp1` COMMENT = 'This is a long comment (2050 ascii characters) 50 pUpTo10 partition ......80-!.................. 100 ................................................................................................ 200....................................................................................................................................................................................................................................................................................................... 500 ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1000 ..............1024-|' ENGINE = MyISAM), + PARTITION pMax VALUES LESS THAN MAXVALUE + (SUBPARTITION pMaxsp0 COMMENT = 'This is a long comment (2050 ascii characters) 50 pMax partition comment .80-!.................. 100 ................................................................................................ 200....................................................................................................................................................................................................................................................................................................... 500 ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1000 ..............1024-|' ENGINE = MyISAM, + SUBPARTITION pMaxsp1 COMMENT = 'This is a long comment (2050 ascii characters) 50 pMax partition comment .80-!.................. 100 ................................................................................................ 200....................................................................................................................................................................................................................................................................................................... 500 ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1000 ..............1024-|' ENGINE = MyISAM)) */ +SELECT PARTITION_NAME, SUBPARTITION_NAME, PARTITION_COMMENT FROM INFORMATION_SCHEMA.PARTITIONS +WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test'; +PARTITION_NAME SUBPARTITION_NAME PARTITION_COMMENT +pUpTo10 p-10sp0 This is a long comment (2050 ascii characters) 50 pUpTo10 partition ......80-! +pUpTo10 p-10sp1 This is a long comment (2050 ascii characters) 50 pUpTo10 partition ......80-! +pMax pMaxsp0 This is a long comment (2050 ascii characters) 50 pMax partition comment .80-! +pMax pMaxsp1 This is a long comment (2050 ascii characters) 50 pMax partition comment .80-! +DROP TABLE t1; diff --git a/mysql-test/r/partition_example.result b/mysql-test/r/partition_example.result index 2129eea0818..7b6e9aa5213 100644 --- a/mysql-test/r/partition_example.result +++ b/mysql-test/r/partition_example.result @@ -7,7 +7,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL -) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 +) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `VAROPT`='5' /*!50100 PARTITION BY LIST (a) (PARTITION p0 VALUES IN (1) ENGINE = EXAMPLE, PARTITION p1 VALUES IN (2) ENGINE = EXAMPLE) */ @@ -20,7 +20,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL -) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ull`=12340 +) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ull`=12340 `VAROPT`='5' /*!50100 PARTITION BY LIST (a) (PARTITION p0 VALUES IN (1) ENGINE = EXAMPLE, PARTITION p1 VALUES IN (2) ENGINE = EXAMPLE) */ diff --git a/mysql-test/r/partition_exchange.result b/mysql-test/r/partition_exchange.result new file mode 100644 index 00000000000..fec08e99c72 --- /dev/null +++ b/mysql-test/r/partition_exchange.result @@ -0,0 +1,1291 @@ +DROP TABLE IF EXISTS t1, t2, t3, t, tp, tsp, tmp; +# +# Bug#11894100: EXCHANGE PARTITION CAN'T BE EXECUTED IF +# ROW_FORMAT WAS SET EXPLICITLY +# +# Same definition (both have ROW_FORMAT set) +CREATE TABLE t1 ( +id int(11) NOT NULL AUTO_INCREMENT, +year year(2) DEFAULT NULL, +modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', +PRIMARY KEY (id) +) ENGINE=InnoDB ROW_FORMAT=COMPACT +PARTITION BY HASH (id) +PARTITIONS 2; +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +CREATE TABLE t2 LIKE t1; +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +ALTER TABLE t2 REMOVE PARTITIONING; +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +SHOW CREATE TABLE t1; +Table t1 +Create Table CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` year(2) DEFAULT NULL, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT +/*!50100 PARTITION BY HASH (id) +PARTITIONS 2 */ +SHOW CREATE TABLE t2; +Table t2 +Create Table CREATE TABLE `t2` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` year(2) DEFAULT NULL, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT +SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS +FROM INFORMATION_SCHEMA.TABLES +WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2'); +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +ROW_FORMAT Compact +CREATE_OPTIONS row_format=COMPACT partitioned +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +ROW_FORMAT Compact +CREATE_OPTIONS row_format=COMPACT +ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2; +Warnings: +Level Note +Code 1287 +Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +SHOW CREATE TABLE t1; +Table t1 +Create Table CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` year(2) DEFAULT NULL, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT +/*!50100 PARTITION BY HASH (id) +PARTITIONS 2 */ +SHOW CREATE TABLE t2; +Table t2 +Create Table CREATE TABLE `t2` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` year(2) DEFAULT NULL, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT +SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS +FROM INFORMATION_SCHEMA.TABLES +WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2'); +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +ROW_FORMAT Compact +CREATE_OPTIONS row_format=COMPACT partitioned +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +ROW_FORMAT Compact +CREATE_OPTIONS row_format=COMPACT +DROP TABLE t2; +# Only the partitioned table have ROW_FORMAT set. +CREATE TABLE t2 ( +id int(11) NOT NULL AUTO_INCREMENT, +year year(2) DEFAULT NULL, +modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', +PRIMARY KEY (id) +) ENGINE=InnoDB; +Warnings: +Level Note +Code 1287 +Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2; +Warnings: +Level Note +Code 1287 +Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +SHOW CREATE TABLE t1; +Table t1 +Create Table CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` year(2) DEFAULT NULL, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT +/*!50100 PARTITION BY HASH (id) +PARTITIONS 2 */ +SHOW CREATE TABLE t2; +Table t2 +Create Table CREATE TABLE `t2` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` year(2) DEFAULT NULL, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS +FROM INFORMATION_SCHEMA.TABLES +WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2'); +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +ROW_FORMAT Compact +CREATE_OPTIONS row_format=COMPACT partitioned +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +ROW_FORMAT Compact +CREATE_OPTIONS +# Only the non partitioned table have ROW_FORMAT set. +DROP TABLE t1, t2; +CREATE TABLE t1 ( +id int(11) NOT NULL AUTO_INCREMENT, +year year(2) DEFAULT NULL, +modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', +PRIMARY KEY (id) +) ENGINE=InnoDB +PARTITION BY HASH (id) +PARTITIONS 2; +Warnings: +Level Note +Code 1287 +Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +CREATE TABLE t2 ( +id int(11) NOT NULL AUTO_INCREMENT, +year year(2) DEFAULT NULL, +modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', +PRIMARY KEY (id) +) ENGINE=InnoDB ROW_FORMAT = COMPACT; +Warnings: +Level Note +Code 1287 +Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2; +Warnings: +Level Note +Code 1287 +Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +SHOW CREATE TABLE t1; +Table t1 +Create Table CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` year(2) DEFAULT NULL, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY HASH (id) +PARTITIONS 2 */ +SHOW CREATE TABLE t2; +Table t2 +Create Table CREATE TABLE `t2` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` year(2) DEFAULT NULL, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT +SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS +FROM INFORMATION_SCHEMA.TABLES +WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2'); +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +ROW_FORMAT Compact +CREATE_OPTIONS partitioned +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +ROW_FORMAT Compact +CREATE_OPTIONS row_format=COMPACT +# No table have ROW_FORMAT set. +DROP TABLE t1, t2; +CREATE TABLE t1 ( +id int(11) NOT NULL AUTO_INCREMENT, +year year(2) DEFAULT NULL, +modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', +PRIMARY KEY (id) +) ENGINE=InnoDB +PARTITION BY HASH (id) +PARTITIONS 2; +Warnings: +Level Note +Code 1287 +Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +CREATE TABLE t2 ( +id int(11) NOT NULL AUTO_INCREMENT, +year year(2) DEFAULT NULL, +modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', +PRIMARY KEY (id) +) ENGINE=InnoDB; +Warnings: +Level Note +Code 1287 +Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2; +Warnings: +Level Note +Code 1287 +Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +SHOW CREATE TABLE t1; +Table t1 +Create Table CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` year(2) DEFAULT NULL, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY HASH (id) +PARTITIONS 2 */ +SHOW CREATE TABLE t2; +Table t2 +Create Table CREATE TABLE `t2` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` year(2) DEFAULT NULL, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS +FROM INFORMATION_SCHEMA.TABLES +WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2'); +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +ROW_FORMAT Compact +CREATE_OPTIONS partitioned +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +ROW_FORMAT Compact +CREATE_OPTIONS +# Not same ROW_FORMAT as default (but same). +DROP TABLE t1, t2; +CREATE TABLE t1 ( +id int(11) NOT NULL AUTO_INCREMENT, +year year(2) DEFAULT NULL, +modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', +PRIMARY KEY (id) +) ENGINE=InnoDB ROW_FORMAT = REDUNDANT +PARTITION BY HASH (id) +PARTITIONS 2; +Warnings: +Level Note +Code 1287 +Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +CREATE TABLE t2 ( +id int(11) NOT NULL AUTO_INCREMENT, +year year(2) DEFAULT NULL, +modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', +PRIMARY KEY (id) +) ENGINE=InnoDB ROW_FORMAT = REDUNDANT; +Warnings: +Level Note +Code 1287 +Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2; +Warnings: +Level Note +Code 1287 +Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +SHOW CREATE TABLE t1; +Table t1 +Create Table CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` year(2) DEFAULT NULL, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT +/*!50100 PARTITION BY HASH (id) +PARTITIONS 2 */ +SHOW CREATE TABLE t2; +Table t2 +Create Table CREATE TABLE `t2` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` year(2) DEFAULT NULL, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT +SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS +FROM INFORMATION_SCHEMA.TABLES +WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2'); +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +ROW_FORMAT Redundant +CREATE_OPTIONS row_format=REDUNDANT partitioned +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +ROW_FORMAT Redundant +CREATE_OPTIONS row_format=REDUNDANT +# Not same ROW_FORMAT as default (tables differs). +DROP TABLE t1, t2; +CREATE TABLE t1 ( +id int(11) NOT NULL AUTO_INCREMENT, +year year(2) DEFAULT NULL, +modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', +PRIMARY KEY (id) +) ENGINE=InnoDB +PARTITION BY HASH (id) +PARTITIONS 2; +Warnings: +Level Note +Code 1287 +Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +CREATE TABLE t2 ( +id int(11) NOT NULL AUTO_INCREMENT, +year year(2) DEFAULT NULL, +modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', +PRIMARY KEY (id) +) ENGINE=InnoDB ROW_FORMAT = REDUNDANT; +Warnings: +Level Note +Code 1287 +Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2; +ERROR HY000: Non matching attribute 'ROW_FORMAT' between partition and table +SHOW CREATE TABLE t1; +Table t1 +Create Table CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` year(2) DEFAULT NULL, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY HASH (id) +PARTITIONS 2 */ +SHOW CREATE TABLE t2; +Table t2 +Create Table CREATE TABLE `t2` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` year(2) DEFAULT NULL, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT +SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS +FROM INFORMATION_SCHEMA.TABLES +WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2'); +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +ROW_FORMAT Compact +CREATE_OPTIONS partitioned +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +ROW_FORMAT Redundant +CREATE_OPTIONS row_format=REDUNDANT +# Different than default (forced ROW_TYPE) +DROP TABLE t1, t2; +CREATE TABLE t1 ( +id int(11) NOT NULL AUTO_INCREMENT, +year year(2) DEFAULT NULL, +modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', +PRIMARY KEY (id) +) ENGINE=InnoDB ROW_FORMAT = COMPACT +PARTITION BY HASH (id) +PARTITIONS 2; +Warnings: +Level Note +Code 1287 +Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +CREATE TABLE t2 ( +id int(11) NOT NULL AUTO_INCREMENT, +year year(2) DEFAULT NULL, +modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', +PRIMARY KEY (id) +) ENGINE=InnoDB ROW_FORMAT = REDUNDANT; +Warnings: +Level Note +Code 1287 +Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2; +ERROR HY000: Non matching attribute 'ROW_FORMAT' between partition and table +SHOW CREATE TABLE t1; +Table t1 +Create Table CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` year(2) DEFAULT NULL, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT +/*!50100 PARTITION BY HASH (id) +PARTITIONS 2 */ +SHOW CREATE TABLE t2; +Table t2 +Create Table CREATE TABLE `t2` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` year(2) DEFAULT NULL, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT +SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS +FROM INFORMATION_SCHEMA.TABLES +WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2'); +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +ROW_FORMAT Compact +CREATE_OPTIONS row_format=COMPACT partitioned +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +ROW_FORMAT Redundant +CREATE_OPTIONS row_format=REDUNDANT +DROP TABLE t1, t2; +# +# Bug#56484: !table || (!table->read_set || +# bitmap_is_set(table->read_set, field_index)) +# +CREATE TABLE t1 (a INT NOT NULL,b TIME NOT NULL DEFAULT '00:00:00') +ENGINE=MyISAM +PARTITION BY HASH (a) PARTITIONS 2; +CREATE TABLE t2 (a INT) ENGINE=MYISAM; +ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2; +ERROR HY000: Tables have different definitions +DROP TABLE t1, t2; +# +# Bug#55784: Foreign key integrity broken by alter table +# +CREATE TABLE t1 (s1 INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t2 (s1 INT, FOREIGN KEY (s1) REFERENCES t1 (s1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1),(2),(3); +INSERT INTO t2 VALUES (1),(2),(3); +CREATE TABLE t3 (s1 INT PRIMARY KEY) +ENGINE=InnoDB +PARTITION BY LIST (s1) +(PARTITION p1 VALUES IN (1,2,3)); +ALTER TABLE t3 EXCHANGE PARTITION p1 WITH TABLE t1; +ERROR HY000: Table to exchange with partition has foreign key references: 't1' +DROP TABLE t2, t1, t3; +# Tests for WL#4445 +CREATE TABLE t (a INT, +b VARCHAR(55), +PRIMARY KEY (a)) +ENGINE = MyISAM; +CREATE TABLE tp (a INT, +b VARCHAR(55), +PRIMARY KEY (a)) +ENGINE = MyISAM +PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (100), +PARTITION p1 VALUES LESS THAN MAXVALUE); +CREATE TABLE tsp (a INT, +b VARCHAR(55), +PRIMARY KEY (a)) +ENGINE = MyISAM +PARTITION BY RANGE (a) +SUBPARTITION BY HASH(a) +(PARTITION p0 VALUES LESS THAN (100) +(SUBPARTITION sp0, +SUBPARTITION sp1), +PARTITION p1 VALUES LESS THAN MAXVALUE +(SUBPARTITION sp2, +SUBPARTITION sp3)); +INSERT INTO t VALUES (1, "First value"), (3, "Three"), (5, "Five"), (99, "End of values"); +INSERT INTO tp VALUES (2, "First value"), (10, "Ten"), (50, "Fifty"), (200, "Two hundred, end of values"), (61, "Sixty one"), (62, "Sixty two"), (63, "Sixty three"), (64, "Sixty four"), (161, "161"), (162, "162"), (163, "163"), (164, "164"); +INSERT INTO tsp VALUES (2, "First value"), (10, "Ten"), (50, "Fifty"), (200, "Two hundred, end of values"), (61, "Sixty one"), (62, "Sixty two"), (63, "Sixty three"), (64, "Sixty four"), (161, "161"), (162, "162"), (163, "163"), (164, "164"); +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE tp; +Table Create Table +tp CREATE TABLE `tp` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (100) ENGINE = MyISAM, + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +SELECT * FROM t; +a b +1 First value +3 Three +5 Five +99 End of values +SELECT * FROM tp; +a b +10 Ten +161 161 +162 162 +163 163 +164 164 +2 First value +200 Two hundred, end of values +50 Fifty +61 Sixty one +62 Sixty two +63 Sixty three +64 Sixty four +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE tp; +Table Create Table +tp CREATE TABLE `tp` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (100) ENGINE = MyISAM, + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +SELECT * FROM t; +a b +10 Ten +2 First value +50 Fifty +61 Sixty one +62 Sixty two +63 Sixty three +64 Sixty four +SELECT * FROM tp; +a b +1 First value +161 161 +162 162 +163 163 +164 164 +200 Two hundred, end of values +3 Three +5 Five +99 End of values +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SELECT * FROM t; +a b +1 First value +3 Three +5 Five +99 End of values +SELECT * FROM tp; +a b +10 Ten +161 161 +162 162 +163 163 +164 164 +2 First value +200 Two hundred, end of values +50 Fifty +61 Sixty one +62 Sixty two +63 Sixty three +64 Sixty four +ALTER TABLE tp EXCHANGE PARTITION p1 WITH TABLE t; +ERROR HY000: Found a row that does not match the partition +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE tp; +Table Create Table +tp CREATE TABLE `tp` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (100) ENGINE = MyISAM, + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +SELECT * FROM t; +a b +1 First value +3 Three +5 Five +99 End of values +SELECT * FROM tp; +a b +10 Ten +161 161 +162 162 +163 163 +164 164 +2 First value +200 Two hundred, end of values +50 Fifty +61 Sixty one +62 Sixty two +63 Sixty three +64 Sixty four +# Test list of partitions +ALTER TABLE tp EXCHANGE PARTITION p1 WITH TABLE t IGNORE; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IGNORE' at line 1 +ALTER TABLE tp EXCHANGE PARTITION p0,p1 WITH TABLE t IGNORE; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'p1 WITH TABLE t IGNORE' at line 1 +ALTER TABLE tp EXCHANGE PARTITION p0,p1 WITH TABLE t; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'p1 WITH TABLE t' at line 1 +ALTER TABLE tp EXCHANGE PARTITION (p0,p1) WITH TABLE t; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(p0,p1) WITH TABLE t' at line 1 +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE (t,t2); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(t,t2)' at line 1 +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t,t2; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't2' at line 1 +ALTER TABLE tp EXCHANGE PARTITION non_existent WITH TABLE t; +ERROR HY000: Unknown partition 'non_existent' in table 'tp' +ALTER TABLE tsp EXCHANGE PARTITION p0 WITH TABLE t; +ERROR HY000: Subpartitioned table, use subpartition instead of partition +ALTER TABLE tsp EXCHANGE PARTITION sp0 WITH TABLE tp; +ERROR HY000: Table to exchange with partition is partitioned: 'tp' +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE tp; +Table Create Table +tp CREATE TABLE `tp` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (100) ENGINE = MyISAM, + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +SHOW CREATE TABLE tsp; +Table Create Table +tsp CREATE TABLE `tsp` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +SUBPARTITION BY HASH (a) +(PARTITION p0 VALUES LESS THAN (100) + (SUBPARTITION sp0 ENGINE = MyISAM, + SUBPARTITION sp1 ENGINE = MyISAM), + PARTITION p1 VALUES LESS THAN MAXVALUE + (SUBPARTITION sp2 ENGINE = MyISAM, + SUBPARTITION sp3 ENGINE = MyISAM)) */ +SELECT * FROM t; +a b +1 First value +3 Three +5 Five +99 End of values +SELECT * FROM tp; +a b +10 Ten +161 161 +162 162 +163 163 +164 164 +2 First value +200 Two hundred, end of values +50 Fifty +61 Sixty one +62 Sixty two +63 Sixty three +64 Sixty four +# Test exchange partition +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE tp; +Table Create Table +tp CREATE TABLE `tp` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (100) ENGINE = MyISAM, + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +SELECT * FROM t; +a b +10 Ten +2 First value +50 Fifty +61 Sixty one +62 Sixty two +63 Sixty three +64 Sixty four +SELECT * FROM tp; +a b +1 First value +161 161 +162 162 +163 163 +164 164 +200 Two hundred, end of values +3 Three +5 Five +99 End of values +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE tp; +Table Create Table +tp CREATE TABLE `tp` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (100) ENGINE = MyISAM, + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +SELECT * FROM t; +a b +1 First value +3 Three +5 Five +99 End of values +SELECT * FROM tp; +a b +10 Ten +161 161 +162 162 +163 163 +164 164 +2 First value +200 Two hundred, end of values +50 Fifty +61 Sixty one +62 Sixty two +63 Sixty three +64 Sixty four +# Test exchange subpartition +ALTER TABLE tsp EXCHANGE PARTITION sp1 WITH TABLE t; +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE tsp; +Table Create Table +tsp CREATE TABLE `tsp` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +SUBPARTITION BY HASH (a) +(PARTITION p0 VALUES LESS THAN (100) + (SUBPARTITION sp0 ENGINE = MyISAM, + SUBPARTITION sp1 ENGINE = MyISAM), + PARTITION p1 VALUES LESS THAN MAXVALUE + (SUBPARTITION sp2 ENGINE = MyISAM, + SUBPARTITION sp3 ENGINE = MyISAM)) */ +SELECT * FROM t; +a b +61 Sixty one +63 Sixty three +SELECT * FROM tsp; +a b +1 First value +10 Ten +161 161 +162 162 +163 163 +164 164 +2 First value +200 Two hundred, end of values +3 Three +5 Five +50 Fifty +62 Sixty two +64 Sixty four +99 End of values +ALTER TABLE tsp EXCHANGE PARTITION sp1 WITH TABLE t; +ALTER TABLE t ENGINE = InnoDB; +ALTER TABLE tp ENGINE = InnoDB; +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE tp; +Table Create Table +tp CREATE TABLE `tp` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB, + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ +SELECT * FROM t; +a b +1 First value +3 Three +5 Five +99 End of values +SELECT * FROM tp; +a b +10 Ten +161 161 +162 162 +163 163 +164 164 +2 First value +200 Two hundred, end of values +50 Fifty +61 Sixty one +62 Sixty two +63 Sixty three +64 Sixty four +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE tp; +Table Create Table +tp CREATE TABLE `tp` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB, + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ +SELECT * FROM t; +a b +10 Ten +2 First value +50 Fifty +61 Sixty one +62 Sixty two +63 Sixty three +64 Sixty four +SELECT * FROM tp; +a b +1 First value +161 161 +162 162 +163 163 +164 164 +200 Two hundred, end of values +3 Three +5 Five +99 End of values +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +# test different engines +ALTER TABLE t ENGINE = MyISAM; +ALTER TABLE tp ENGINE = InnoDB; +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE tp; +Table Create Table +tp CREATE TABLE `tp` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB, + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MariaDB +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE tp; +Table Create Table +tp CREATE TABLE `tp` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB, + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ +# Test different charsets +ALTER TABLE t ENGINE = MyISAM; +CREATE TABLE tmp LIKE t; +INSERT INTO tmp SELECT * FROM t; +RENAME TABLE t TO tmp2, tmp TO t; +ALTER TABLE tp ENGINE = MyISAM; +ALTER TABLE t CHARACTER SET = koi8r COLLATE koi8r_general_ci; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +ERROR HY000: Non matching attribute 'CHARACTER SET' between partition and table +DROP TABLE t; +# Test multiple different table options +CREATE TABLE t (a INT, +b VARCHAR(55), +PRIMARY KEY (a)) +ENGINE = MyISAM MAX_ROWS = 100000 MIN_ROWS = 1000; +INSERT INTO t SELECT * FROM tmp2; +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 MIN_ROWS=1000 MAX_ROWS=100000 +SHOW CREATE TABLE tp; +Table Create Table +tp CREATE TABLE `tp` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (100) ENGINE = MyISAM, + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +ERROR HY000: Non matching attribute 'MAX_ROWS' between partition and table +SHOW WARNINGS; +Level Code Message +Error 1731 Non matching attribute 'MAX_ROWS' between partition and table +Error 1731 Non matching attribute 'MIN_ROWS' between partition and table +DROP TABLE t; +RENAME TABLE tmp2 TO t; +ALTER TABLE t ADD KEY ba_key (b, a); +ALTER TABLE tp ADD KEY ba_key (b, a); +ALTER TABLE tsp ADD KEY ba_key (b, a); +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `ba_key` (`b`,`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE tp; +Table Create Table +tp CREATE TABLE `tp` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `ba_key` (`b`,`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (100) ENGINE = MyISAM, + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +SELECT * FROM t; +a b +10 Ten +2 First value +50 Fifty +61 Sixty one +62 Sixty two +63 Sixty three +64 Sixty four +SELECT * FROM tp; +a b +1 First value +161 161 +162 162 +163 163 +164 164 +200 Two hundred, end of values +3 Three +5 Five +99 End of values +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +ALTER TABLE t DROP KEY ba_key; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +ERROR HY000: Tables have different definitions +ALTER TABLE t ADD KEY b_key (b); +ALTER TABLE tsp EXCHANGE PARTITION sp1 WITH TABLE t; +ERROR HY000: Tables have different definitions +ALTER TABLE t ADD KEY ba_key (b, a); +ALTER TABLE t DROP KEY b_key; +ALTER TABLE t CHANGE a c INT; +ALTER TABLE tsp EXCHANGE PARTITION sp1 WITH TABLE t; +ERROR HY000: Tables have different definitions +ALTER TABLE t CHANGE c a INT; +# test temporary table +ALTER TABLE t ENGINE = MyISAM; +ALTER TABLE tp ENGINE = MyISAM; +CREATE TEMPORARY TABLE tmp LIKE t; +INSERT INTO tmp SELECT * FROM t; +ALTER TABLE t RENAME TO tmp2; +ALTER TABLE tmp RENAME TO t; +SHOW CREATE TABLE t; +Table Create Table +t CREATE TEMPORARY TABLE `t` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `ba_key` (`b`,`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE tp; +Table Create Table +tp CREATE TABLE `tp` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `ba_key` (`b`,`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (100) ENGINE = MyISAM, + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +ERROR HY000: Table to exchange with partition is temporary: 't' +SHOW CREATE TABLE t; +Table Create Table +t CREATE TEMPORARY TABLE `t` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `ba_key` (`b`,`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE tp; +Table Create Table +tp CREATE TABLE `tp` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` varchar(55) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `ba_key` (`b`,`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (100) ENGINE = MyISAM, + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +DROP TEMPORARY TABLE t; +ALTER TABLE tmp2 RENAME TO t; +# Test non partitioned table +ALTER TABLE tp REMOVE PARTITIONING; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +ERROR HY000: Partition management on a not partitioned table is not possible +DROP TABLE t, tp, tsp; +# Test with general_log +use mysql; +SET @old_general_log_state = @@global.general_log; +SET GLOBAL general_log = 0; +ALTER TABLE general_log ENGINE = MyISAM; +CREATE TABLE t LIKE general_log; +ALTER TABLE t PARTITION BY RANGE (UNIX_TIMESTAMP(event_time) DIV 1) +(PARTITION p0 VALUES LESS THAN (123456789), +PARTITION pMAX VALUES LESS THAN MAXVALUE); +ALTER TABLE t EXCHANGE PARTITION p0 WITH TABLE general_log; +ERROR HY000: You cannot 'ALTER PARTITION' a log table if logging is enabled +ALTER TABLE general_log ENGINE = CSV; +SET @@global.general_log = @old_general_log_state; +DROP TABLE t; +use test; +# Test with LOCK TABLE +CREATE TABLE tp +(a VARCHAR(24), +b DATETIME, +PRIMARY KEY (a,b)) +PARTITION BY RANGE COLUMNS (a, b) +(PARTITION p0 VALUES LESS THAN ("Middle", '0000-00-00'), +PARTITION p1 VALUES LESS THAN (MAXVALUE, '9999-12-31 23:59:59')); +CREATE TABLE t LIKE tp; +ALTER TABLE t REMOVE PARTITIONING; +CREATE TABLE t2 LIKE t; +INSERT INTO tp VALUES ("First in tp", '2000-01-02 03:04:25'), ("Zebra in tp", '0000-00-00 00:00:00'), ("Second in tp", '2010-01-01 05:12:24'); +INSERT INTO t VALUES ("First in t", '2000-01-02 03:04:25'), ("a test in t", '0000-00-00 00:00:00'), ("Echo in t", '2010-01-01 05:12:24'); +# tp_lock '0' t_lock 'READ' t2_lock 'READ' count '17' +LOCK TABLE t READ, t2 READ; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +Error 1100 Table 'tp' was not locked with LOCK TABLES +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +Error 1100 Table 'tp' was not locked with LOCK TABLES +UNLOCK TABLES; +# tp_lock '0' t_lock 'WRITE' t2_lock 'READ' count '16' +LOCK TABLE t WRITE, t2 READ; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +Error 1100 Table 'tp' was not locked with LOCK TABLES +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +Error 1100 Table 'tp' was not locked with LOCK TABLES +UNLOCK TABLES; +# tp_lock 'READ' t_lock '0' t2_lock 'READ' count '15' +LOCK TABLE tp READ, t2 READ; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 'tp' was locked with a READ lock and can't be updated +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 'tp' was locked with a READ lock and can't be updated +UNLOCK TABLES; +# tp_lock 'READ' t_lock 'READ' t2_lock 'READ' count '14' +LOCK TABLE t READ, tp READ, t2 READ; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 'tp' was locked with a READ lock and can't be updated +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 'tp' was locked with a READ lock and can't be updated +UNLOCK TABLES; +# tp_lock 'READ' t_lock 'WRITE' t2_lock 'READ' count '13' +LOCK TABLE t WRITE, tp READ, t2 READ; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 'tp' was locked with a READ lock and can't be updated +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 'tp' was locked with a READ lock and can't be updated +UNLOCK TABLES; +# tp_lock 'WRITE' t_lock '0' t2_lock 'READ' count '12' +LOCK TABLE tp WRITE, t2 READ; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +Error 1100 Table 't' was not locked with LOCK TABLES +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 't2' was locked with a READ lock and can't be updated +UNLOCK TABLES; +# tp_lock 'WRITE' t_lock 'READ' t2_lock 'READ' count '11' +LOCK TABLE t READ, tp WRITE, t2 READ; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 't' was locked with a READ lock and can't be updated +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 't2' was locked with a READ lock and can't be updated +UNLOCK TABLES; +# tp_lock 'WRITE' t_lock 'WRITE' t2_lock 'READ' count '10' +LOCK TABLE t WRITE, tp WRITE, t2 READ; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 't2' was locked with a READ lock and can't be updated +UNLOCK TABLES; +# tp_lock '0' t_lock '0' t2_lock 'WRITE' count '9' +LOCK TABLE t2 WRITE; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +Error 1100 Table 'tp' was not locked with LOCK TABLES +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +Error 1100 Table 'tp' was not locked with LOCK TABLES +UNLOCK TABLES; +# tp_lock '0' t_lock 'READ' t2_lock 'WRITE' count '8' +LOCK TABLE t READ, t2 WRITE; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +Error 1100 Table 'tp' was not locked with LOCK TABLES +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +Error 1100 Table 'tp' was not locked with LOCK TABLES +UNLOCK TABLES; +# tp_lock '0' t_lock 'WRITE' t2_lock 'WRITE' count '7' +LOCK TABLE t WRITE, t2 WRITE; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +Error 1100 Table 'tp' was not locked with LOCK TABLES +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +Error 1100 Table 'tp' was not locked with LOCK TABLES +UNLOCK TABLES; +# tp_lock 'READ' t_lock '0' t2_lock 'WRITE' count '6' +LOCK TABLE tp READ, t2 WRITE; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 'tp' was locked with a READ lock and can't be updated +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 'tp' was locked with a READ lock and can't be updated +UNLOCK TABLES; +# tp_lock 'READ' t_lock 'READ' t2_lock 'WRITE' count '5' +LOCK TABLE t READ, tp READ, t2 WRITE; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 'tp' was locked with a READ lock and can't be updated +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 'tp' was locked with a READ lock and can't be updated +UNLOCK TABLES; +# tp_lock 'READ' t_lock 'WRITE' t2_lock 'WRITE' count '4' +LOCK TABLE t WRITE, tp READ, t2 WRITE; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 'tp' was locked with a READ lock and can't be updated +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 'tp' was locked with a READ lock and can't be updated +UNLOCK TABLES; +# tp_lock 'WRITE' t_lock '0' t2_lock 'WRITE' count '3' +LOCK TABLE tp WRITE, t2 WRITE; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +Error 1100 Table 't' was not locked with LOCK TABLES +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +UNLOCK TABLES; +# tp_lock 'WRITE' t_lock 'READ' t2_lock 'WRITE' count '2' +LOCK TABLE t READ, tp WRITE, t2 WRITE; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +Error 1099 Table 't' was locked with a READ lock and can't be updated +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +UNLOCK TABLES; +# tp_lock 'WRITE' t_lock 'WRITE' t2_lock 'WRITE' count '1' +LOCK TABLE t WRITE, tp WRITE, t2 WRITE; +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t; +SHOW WARNINGS; +Level Code Message +ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t2; +SHOW WARNINGS; +Level Code Message +UNLOCK TABLES; +DROP TABLE t, t2, tp; diff --git a/mysql-test/r/partition_explicit_prune.result b/mysql-test/r/partition_explicit_prune.result new file mode 100644 index 00000000000..3ca1e688e8f --- /dev/null +++ b/mysql-test/r/partition_explicit_prune.result @@ -0,0 +1,1872 @@ +# +# Bug#13559657: PARTITION SELECTION DOES NOT WORK WITH VIEWS +# +CREATE TABLE t1 (a int) +ENGINE = InnoDB +PARTITION BY HASH (a) PARTITIONS 2; +INSERT INTO t1 VALUES (0), (1), (2), (3); +CREATE VIEW v1 AS SELECT a FROM t1 PARTITION (p0); +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` PARTITION (`p0`) latin1 latin1_swedish_ci +FLUSH STATUS; +SELECT * FROM v1; +a +0 +2 +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_READ_RND_NEXT 3 +HANDLER_TMP_WRITE 23 +# 4 locks (1 table, 1 partition lock/unlock) +FLUSH STATUS; +SELECT a FROM t1 PARTITION (p0); +a +0 +2 +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_READ_RND_NEXT 3 +HANDLER_TMP_WRITE 23 +# 4 locks (1 table, 1 partition lock/unlock) +FLUSH STATUS; +INSERT INTO v1 VALUES (10); +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +HANDLER_WRITE 2 +# 4 locks (1 table, 1 partition lock/unlock) +FLUSH STATUS; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_TMP_WRITE 23 +# 2 locks (1 table, all partitions pruned) +FLUSH STATUS; +SELECT * FROM v1; +a +0 +10 +2 +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_READ_RND_NEXT 4 +HANDLER_TMP_WRITE 23 +# 4 locks (1 table, 1 partition lock/unlock) +FLUSH STATUS; +SELECT a FROM t1 PARTITION (p0); +a +0 +10 +2 +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_READ_RND_NEXT 4 +HANDLER_TMP_WRITE 23 +# 4 locks (1 table, 1 partition lock/unlock) +SELECT * FROM t1; +a +0 +1 +10 +2 +3 +DROP VIEW v1; +CREATE VIEW v1 AS SELECT a FROM t1 PARTITION (p0) WITH CHECK OPTION; +FLUSH STATUS; +INSERT INTO v1 VALUES (20); +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +HANDLER_WRITE 2 +# 4 locks (1 table, 1 partition lock/unlock) +FLUSH STATUS; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_TMP_WRITE 23 +# 2 locks (1 table, all partitions pruned) +SELECT * FROM v1; +a +0 +10 +2 +20 +SELECT * FROM t1; +a +0 +1 +10 +2 +20 +3 +DROP VIEW v1; +CREATE VIEW v1 AS +SELECT a FROM t1 PARTITION (p0) WHERE a = 30 WITH CHECK OPTION; +FLUSH STATUS; +INSERT INTO v1 VALUES (30); +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +HANDLER_WRITE 2 +# 4 locks (1 table, 1 partition lock/unlock) +FLUSH STATUS; +INSERT INTO v1 VALUES (31); +ERROR HY000: CHECK OPTION failed 'test.v1' +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_ROLLBACK 1 +HANDLER_TMP_WRITE 23 +# 2 locks (1 table, all partitions pruned) +FLUSH STATUS; +INSERT INTO v1 VALUES (32); +ERROR HY000: CHECK OPTION failed 'test.v1' +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_ROLLBACK 1 +HANDLER_TMP_WRITE 23 +# 4 locks (1 table, 1 partition lock/unlock) +SELECT * FROM v1; +a +30 +SELECT * FROM t1; +a +0 +1 +10 +2 +20 +3 +30 +DROP VIEW v1; +DROP TABLE t1; +# Original tests for WL#5217 +# Must have InnoDB as engine to get the same statistics results. +# embedded uses MyISAM as default. CREATE SELECT uses the default engine. +SET @old_default_storage_engine = @@default_storage_engine; +SET @@default_storage_engine = 'InnoDB'; +# Test to show if I_S affects HANDLER_ counts +FLUSH STATUS; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_TMP_WRITE 23 +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_READ_RND_NEXT 27 +HANDLER_TMP_WRITE 49 +# OK, seems to add number of variables processed before HANDLER_WRITE +# and number of variables + 1 evaluated in the previous call in RND_NEXT +CREATE TABLE t1 +(a INT NOT NULL, +b varchar (64), +INDEX (b,a), +PRIMARY KEY (a)) +ENGINE = InnoDB +PARTITION BY RANGE (a) +SUBPARTITION BY HASH (a) SUBPARTITIONS 2 +(PARTITION pNeg VALUES LESS THAN (0) +(SUBPARTITION subp0, +SUBPARTITION subp1), +PARTITION `p0-9` VALUES LESS THAN (10) +(SUBPARTITION subp2, +SUBPARTITION subp3), +PARTITION `p10-99` VALUES LESS THAN (100) +(SUBPARTITION subp4, +SUBPARTITION subp5), +PARTITION `p100-99999` VALUES LESS THAN (100000) +(SUBPARTITION subp6, +SUBPARTITION subp7)); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(64) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `b` (`b`,`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +SUBPARTITION BY HASH (a) +(PARTITION pNeg VALUES LESS THAN (0) + (SUBPARTITION subp0 ENGINE = InnoDB, + SUBPARTITION subp1 ENGINE = InnoDB), + PARTITION `p0-9` VALUES LESS THAN (10) + (SUBPARTITION subp2 ENGINE = InnoDB, + SUBPARTITION subp3 ENGINE = InnoDB), + PARTITION `p10-99` VALUES LESS THAN (100) + (SUBPARTITION subp4 ENGINE = InnoDB, + SUBPARTITION subp5 ENGINE = InnoDB), + PARTITION `p100-99999` VALUES LESS THAN (100000) + (SUBPARTITION subp6 ENGINE = InnoDB, + SUBPARTITION subp7 ENGINE = InnoDB)) */ +# First test that the syntax is OK +SHOW CREATE TABLE t1 PARTITION (subp0); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PARTITION (subp0)' at line 1 +# Not a correct partition list +INSERT INTO t1 PARTITION () VALUES (1, "error"); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') VALUES (1, "error")' at line 1 +INSERT INTO t1 PARTITION (pNonExisting) VALUES (1, "error"); +ERROR HY000: Unknown partition 'pNonExisting' in table 't1' +INSERT INTO t1 PARTITION (pNeg, pNonExisting) VALUES (1, "error"); +ERROR HY000: Unknown partition 'pNonExisting' in table 't1' +# Duplicate partitions and overlapping partitions and subpartitios is OK +FLUSH STATUS; +INSERT INTO t1 PARTITION (pNeg, pNeg) VALUES (-1, "pNeg(-subp1)"); +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +HANDLER_WRITE 2 +# Should be 1 commit +# 4 external locks (due to pruning of locks) +# (1 ha_partition + 1 ha_innobase) x 2 (lock + unlock) +# and 18 write (1 ha_innobase + 17 internal I_S write) +INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-3, "pNeg(-subp1)"); +INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-2, "(pNeg-)subp0"); +# should be correct +INSERT INTO t1 PARTITION (`p100-99999`) VALUES (100, "`p100-99999`(-subp6)"), (101, "`p100-99999`(-subp7)"), (1000, "`p100-99999`(-subp6)"); +INSERT INTO t1 PARTITION(`p10-99`,subp3) VALUES (1, "subp3"), (10, "p10-99"); +FLUSH STATUS; +INSERT INTO t1 PARTITION(subp3) VALUES (3, "subp3"); +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +HANDLER_WRITE 2 +# Should be 1 commit +# 4 external locks +# (1 ha_partition + 1 ha_innobase) x 2 (lock + unlock) +# and 18 write (1 ha_innobase + 17 internal I_S write) +FLUSH STATUS; +LOCK TABLE t1 WRITE; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +# should be 1 commit +# 9 locks (1 ha_partition + 8 ha_innobase) +# 17 writes (internal I_S) +INSERT INTO t1 PARTITION(`p0-9`) VALUES (5, "p0-9:subp3"); +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 2 +HANDLER_READ_RND_NEXT 27 +HANDLER_TMP_WRITE 49 +HANDLER_WRITE 2 +# + 1 commit +# + 19 rnd next (internal I_S) +# + 19 write (18 internal I_S + 1 insert) +UNLOCK TABLES; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 2 +HANDLER_READ_RND_NEXT 54 +HANDLER_TMP_WRITE 75 +HANDLER_WRITE 2 +# + 9 locks (unlocks) +# + 19 rnd next (internal I_S) +# + 18 write (internal I_S) +# Not matching partitions with inserted value +INSERT INTO t1 PARTITION (pNeg, pNeg) VALUES (1, "error"); +ERROR HY000: Found a row not matching the given partition set +INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (1, "error"); +ERROR HY000: Found a row not matching the given partition set +INSERT INTO t1 PARTITION (`p100-99999`) VALUES (1, "error"), (10, "error"); +ERROR HY000: Found a row not matching the given partition set +INSERT INTO t1 VALUES (1000000, "error"), (9999999, "error"); +ERROR HY000: Table has no partition for value 1000000 +INSERT INTO t1 PARTITION (`p100-99999`) VALUES (1000000, "error"), (9999999, "error"); +ERROR HY000: Table has no partition for value 1000000 +INSERT INTO t1 PARTITION (pNeg, subp4) VALUES (-7, "pNeg(-subp1)"), (-10, "pNeg(-subp0)"), (-1, "pNeg(-subp1)"), (-99, "pNeg(-subp1)"); +Got one of the listed errors +SELECT * FROM t1 ORDER BY a; +a b +-3 pNeg(-subp1) +-2 (pNeg-)subp0 +-1 pNeg(-subp1) +1 subp3 +3 subp3 +5 p0-9:subp3 +10 p10-99 +100 `p100-99999`(-subp6) +101 `p100-99999`(-subp7) +1000 `p100-99999`(-subp6) +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SET @save_innodb_stats_on_metadata=@@global.innodb_stats_on_metadata; +SET @@global.innodb_stats_on_metadata=ON; +SELECT PARTITION_NAME, SUBPARTITION_NAME, TABLE_ROWS +FROM INFORMATION_SCHEMA.PARTITIONS +WHERE TABLE_SCHEMA = 'test' +AND TABLE_NAME = 't1' ORDER BY SUBPARTITION_NAME; +PARTITION_NAME SUBPARTITION_NAME TABLE_ROWS +pNeg subp0 1 +pNeg subp1 2 +p0-9 subp2 0 +p0-9 subp3 3 +p10-99 subp4 1 +p10-99 subp5 0 +p100-99999 subp6 2 +p100-99999 subp7 1 +SET @@global.innodb_stats_on_metadata=@save_innodb_stats_on_metadata; +FLUSH STATUS; +SELECT * FROM t1 PARTITION (pNonexistent); +ERROR HY000: Unknown partition 'pNonexistent' in table 't1' +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_TMP_WRITE 23 +# should have failed before locking (only 17 internal I_S writes) +FLUSH STATUS; +SELECT * FROM t1 PARTITION (subp2); +a b +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_READ_FIRST 1 +HANDLER_TMP_WRITE 23 +# Should be 1 commit +# 4 locks (1 ha_partition + 1 ha_innobase) x 2 (lock/unlock) +# 1 read first (also calls index_read) +# 2 read key (first from innobase_get_index and second from index first) +# 17 writes (internal I_S) +FLUSH STATUS; +SELECT * FROM t1 PARTITION (subp2,pNeg) AS TableAlias; +a b +-2 (pNeg-)subp0 +-3 pNeg(-subp1) +-1 pNeg(-subp1) +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_READ_FIRST 3 +HANDLER_READ_NEXT 3 +HANDLER_TMP_WRITE 23 +# Should be 1 commit +# 8 locks (1 ha_partition + 2 + 1 ha_innobase) x 2 +# 3 read first (one for each partition) +# 6 read key (3 from read first and 3 from innobase_get_index) +# 3 read next (one next call after each read row) +# 17 writes (internal I_S) +FLUSH STATUS; +LOCK TABLE t1 READ, t1 as TableAlias READ; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +# 1 commit +# 18 locks +# 18 READ KEY from opening a new partition table instance, +# (1 innobase_get_index for each index, per partition, 1 x 2 x 8 = 16 +# + info(HA_STATUS_CONST) call on the partition with the most number +# of rows, 2 innobase_get_index for updating both index statistics) +# 17 writes (internal I_S) +SELECT * FROM t1 PARTITION (subp3) AS TableAlias; +a b +5 p0-9:subp3 +1 subp3 +3 subp3 +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 2 +HANDLER_READ_FIRST 1 +HANDLER_READ_NEXT 3 +HANDLER_READ_RND_NEXT 27 +HANDLER_TMP_WRITE 49 +# + 1 commit +# + 1 read first (read first key from index in one partition) +# + 2 read key (innobase_get_index from index_init + from index_first) +# + 3 read next (one after each row) +# + 19 rnd next (from the last I_S query) +# + 18 write (internal I_S) +SELECT COUNT(*) FROM t1 PARTITION (`p10-99`); +COUNT(*) +1 +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 3 +HANDLER_READ_FIRST 3 +HANDLER_READ_NEXT 4 +HANDLER_READ_RND_NEXT 54 +HANDLER_TMP_WRITE 75 +# + 1 commit +# + 2 read first (one for each subpart) +# + 4 read key (innobase_get_index from index_init + from index_first) +# + 1 read next (one after each row) +# + 19 rnd next (from the last I_S query) +# + 18 write (internal I_S) +SELECT * FROM t1 WHERE a = 1000000; +a b +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 4 +HANDLER_READ_FIRST 3 +HANDLER_READ_NEXT 4 +HANDLER_READ_RND_NEXT 81 +HANDLER_TMP_WRITE 101 +# No matching partition, only internal I_S. +SELECT * FROM t1 PARTITION (pNeg) WHERE a = 100; +a b +UNLOCK TABLES; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 5 +HANDLER_READ_FIRST 3 +HANDLER_READ_NEXT 4 +HANDLER_READ_RND_NEXT 108 +HANDLER_TMP_WRITE 127 +# + 18 for unlock (same as lock above) (100 is not in pNeg, no match) +# Test that EXPLAIN PARTITION works +EXPLAIN PARTITIONS SELECT * FROM t1 PARTITION (pNonexistent); +ERROR HY000: Unknown partition 'pNonexistent' in table 't1' +EXPLAIN PARTITIONS SELECT * FROM t1 PARTITION (subp2); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0-9_subp2 index NULL b 71 NULL 2 Using index +FLUSH STATUS; +EXPLAIN PARTITIONS SELECT * FROM t1 PARTITION (subp2,pNeg) AS TableAlias; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE TableAlias pNeg_subp0,pNeg_subp1,p0-9_subp2 index NULL b 71 NULL 4 Using index +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +# 8 locks (1 ha_partition + 3 ha_innobase) x 2 (lock/unlock) +EXPLAIN PARTITIONS SELECT * FROM t1 PARTITION (subp3) AS TableAlias; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE TableAlias p0-9_subp3 index NULL b 71 NULL 3 Using index +EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 PARTITION (`p10-99`); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p10-99_subp4,p10-99_subp5 index NULL PRIMARY 4 NULL 2 Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 1000000; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +EXPLAIN PARTITIONS SELECT * FROM t1 PARTITION (pNeg) WHERE a = 100; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +# Test how it changes the alias/keywords/reserved words +SELECT * FROM t1 PARTITION; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 +SELECT * FROM t1 `PARTITION`; +a b +-2 (pNeg-)subp0 +5 p0-9:subp3 +10 p10-99 +-3 pNeg(-subp1) +-1 pNeg(-subp1) +1 subp3 +3 subp3 +100 `p100-99999`(-subp6) +1000 `p100-99999`(-subp6) +101 `p100-99999`(-subp7) +SELECT * FROM t1 AS PARTITION; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PARTITION' at line 1 +SELECT * FROM t1 AS `PARTITION`; +a b +-2 (pNeg-)subp0 +5 p0-9:subp3 +10 p10-99 +-3 pNeg(-subp1) +-1 pNeg(-subp1) +1 subp3 +3 subp3 +100 `p100-99999`(-subp6) +1000 `p100-99999`(-subp6) +101 `p100-99999`(-subp7) +# +# Test REPLACE +# +FLUSH STATUS; +REPLACE INTO t1 PARTITION (subp0) VALUES (-21, 'Should fail!'); +ERROR HY000: Found a row not matching the given partition set +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_ROLLBACK 1 +HANDLER_TMP_WRITE 23 +HANDLER_WRITE 1 +# 2 locks (1 ha_partition) x 2 (lock/unlock), Was 4 locks before WL4443 +# explicit pruning says part_id 0 and implicit pruning says part_id 1 +# so no partition will be locked! +# 0 rollback (since no locked partition) +# 17 writes (I_S internal) +FLUSH STATUS; +REPLACE INTO t1 PARTITION (subp1) VALUES (-21, 'Insert by REPLACE'); +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +HANDLER_WRITE 2 +# 1 commit +# 4 locks (1 ha_partition + 1 ha_innobase) x 2 (lock/unlock) +# 18 writes (17 I_S internal, 1 ha_innobase) +SELECT * FROM t1 PARTITION (pNeg); +a b +-2 (pNeg-)subp0 +-21 Insert by REPLACE +-3 pNeg(-subp1) +-1 pNeg(-subp1) +FLUSH STATUS; +REPLACE INTO t1 PARTITION (subp1) VALUES (-21, 'REPLACEd by REPLACE'); +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_READ_KEY 2 +HANDLER_TMP_WRITE 23 +HANDLER_UPDATE 2 +HANDLER_WRITE 2 +# 1 commit +# 4 locks (1 ha_partition + 1 ha_innobase) x 2 (lock/unlock) +# 2 read key (1 innobase_get_index when init the index + 1 index read +# to get the position to update) +# 1 update (updated one row, since there is no delete trigger, update +# is used instead of delete+insert) +# 18 write (17 from I_S, 1 for the failed insert) +SELECT * FROM t1 PARTITION (pNeg); +a b +-2 (pNeg-)subp0 +-3 pNeg(-subp1) +-1 pNeg(-subp1) +-21 REPLACEd by REPLACE +FLUSH STATUS; +LOCK TABLE t1 WRITE; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +# 1 commit +# 9 locks +# 17 write (internal I_S) +DELETE FROM t1 PARTITION(subp1) WHERE b = "REPLACEd by REPLACE"; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 2 +HANDLER_DELETE 2 +HANDLER_READ_KEY 1 +HANDLER_READ_NEXT 1 +HANDLER_READ_RND_NEXT 27 +HANDLER_TMP_WRITE 49 +# + 1 commit +# + 1 delete (one row deleted) +# + 3 read key (1 innodb_get_index in records_in_range, +# 1 innodb_get_index in index_init, 1 index_read in index_read_first) +# + 1 read next (search for another row in secondary index) +# + 19 rnd next (internal I_S) +# + 18 write (internal I_S) +REPLACE INTO t1 PARTITION (subp0) VALUES (-21, 'Should fail!'); +ERROR HY000: Found a row not matching the given partition set +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 2 +HANDLER_DELETE 2 +HANDLER_READ_KEY 1 +HANDLER_READ_NEXT 1 +HANDLER_READ_RND_NEXT 54 +HANDLER_ROLLBACK 1 +HANDLER_TMP_WRITE 75 +HANDLER_WRITE 1 +# Failed before start_stmt/execution. +# + 19 rnd next (internal I_S) +# 0 rollback (No partition had called start_stmt, all parts pruned) +# + 18 write (internal I_S) +REPLACE INTO t1 PARTITION (pNeg) VALUES (-21, 'Insert by REPLACE'); +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 3 +HANDLER_DELETE 2 +HANDLER_READ_KEY 1 +HANDLER_READ_NEXT 1 +HANDLER_READ_RND_NEXT 81 +HANDLER_ROLLBACK 1 +HANDLER_TMP_WRITE 101 +HANDLER_WRITE 3 +# + 1 commit +# + 19 rnd next (internal I_S) +# + 19 write (18 internal I_S + 1 real write) +REPLACE INTO t1 PARTITION (subp1) VALUES (-21, 'REPLACEd by REPLACE'); +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 4 +HANDLER_DELETE 2 +HANDLER_READ_KEY 3 +HANDLER_READ_NEXT 1 +HANDLER_READ_RND_NEXT 108 +HANDLER_ROLLBACK 1 +HANDLER_TMP_WRITE 127 +HANDLER_UPDATE 2 +HANDLER_WRITE 5 +# + 1 commit +# + 2 read key (see non locked query) +# + 19 rnd next (internal I_S) +# + 1 update (see non locked query) +# + 19 write (18 internal I_S + 1 failed write) +SELECT * FROM t1 PARTITION (subp1); +a b +-3 pNeg(-subp1) +-1 pNeg(-subp1) +-21 REPLACEd by REPLACE +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 5 +HANDLER_DELETE 2 +HANDLER_READ_FIRST 1 +HANDLER_READ_KEY 3 +HANDLER_READ_NEXT 4 +HANDLER_READ_RND_NEXT 135 +HANDLER_ROLLBACK 1 +HANDLER_TMP_WRITE 153 +HANDLER_UPDATE 2 +HANDLER_WRITE 5 +# + 1 commit +# + 1 read first +# + 2 read key +# + 3 read next +# + 19 rnd next (internal I_S) +# + 18 write (internal I_S) +UNLOCK TABLES; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 5 +HANDLER_DELETE 2 +HANDLER_READ_FIRST 1 +HANDLER_READ_KEY 3 +HANDLER_READ_NEXT 4 +HANDLER_READ_RND_NEXT 162 +HANDLER_ROLLBACK 1 +HANDLER_TMP_WRITE 179 +HANDLER_UPDATE 2 +HANDLER_WRITE 5 +# + 9 locks +# + 19 rnd next (internal I_S) +# + 18 write (internal I_S) +# +# Test LOAD +# +SELECT * FROM t1 PARTITION (pNeg, `p10-99`); +a b +-2 (pNeg-)subp0 +10 p10-99 +-3 pNeg(-subp1) +-1 pNeg(-subp1) +-21 REPLACEd by REPLACE +FLUSH STATUS; +SELECT * FROM t1 PARTITION (pNeg, `p10-99`) INTO OUTFILE 'loadtest.txt'; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_READ_FIRST 4 +HANDLER_READ_NEXT 5 +HANDLER_TMP_WRITE 23 +# 1 commit +# 10 locks (1 ha_partition + 4 ha_innobase) x 2 (lock/unlock) +# 4 read first (for reading the first row in 4 partitions) +# 8 read key (4 from read first + 4 for index init) +# 5 read next (one after each row) +# 17 write (internal I_S) +FLUSH STATUS; +ALTER TABLE t1 TRUNCATE PARTITION pNeg, `p10-99`; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +# 10 locks (table + 4 partition) x (lock + unlock) +SELECT * FROM t1 PARTITION (pNeg, `p10-99`); +a b +FLUSH STATUS; +LOAD DATA INFILE 'loadtest.txt' INTO TABLE t1 PARTITION (pNeg); +ERROR HY000: Found a row not matching the given partition set +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_ROLLBACK 1 +HANDLER_TMP_WRITE 23 +HANDLER_WRITE 3 +# 6 locks (1 ha_partition + 2 ha_innobase) x 2 (lock+unlock) +# 1 rollback +SELECT * FROM t1 PARTITION (pNeg, `p10-99`); +a b +FLUSH STATUS; +LOAD DATA INFILE 'loadtest.txt' INTO TABLE t1 PARTITION (pNeg, subp4, subp5); +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +HANDLER_WRITE 10 +# 10 lock (1 ha_partition + 4 ha_innobase) x 2 (lock + unlock) +ALTER TABLE t1 TRUNCATE PARTITION pNeg, `p10-99`; +FLUSH STATUS; +LOCK TABLE t1 WRITE; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +# 9 locks +# 18 read key (ALTER forces table to be closed, see above for open) +LOAD DATA INFILE 'loadtest.txt' INTO TABLE t1 PARTITION (pNeg, `p10-99`); +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 2 +HANDLER_READ_RND_NEXT 27 +HANDLER_TMP_WRITE 49 +HANDLER_WRITE 10 +# + 23 write (18 internal I_S + 5 rows) +UNLOCK TABLES; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 2 +HANDLER_READ_RND_NEXT 54 +HANDLER_TMP_WRITE 75 +HANDLER_WRITE 10 +# + 9 locks +# +# Test UPDATE +# +FLUSH STATUS; +UPDATE t1 PARTITION(subp0) SET b = concat(b, ', Updated'); +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_READ_RND_NEXT 2 +HANDLER_TMP_WRITE 23 +HANDLER_UPDATE 2 +# 1 commit +# 4 lock (1 ha_partition + 1 ha_innobase) x 2 (lock + unlock) +# 1 read first (read first row, called from first rnd_next) +# 2 read key (innobase_get_index from rnd_init + +# read next row from second rnd_next) +# 1 update (update the row) +SELECT * FROM t1 PARTITION (subp0) ORDER BY a; +a b +-2 (pNeg-)subp0, Updated +FLUSH STATUS; +UPDATE t1 PARTITION(subp0) SET b = concat(b, ', Updated2') WHERE a = -2; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_READ_KEY 1 +HANDLER_TMP_WRITE 23 +HANDLER_UPDATE 2 +# 1 commit +# 4 lock +# 1 read key +# 1 update +FLUSH STATUS; +UPDATE t1 PARTITION(subp0) SET a = -4, b = concat(b, ', Updated from a = -2') +WHERE a = -2; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_READ_KEY 1 +HANDLER_READ_RND 1 +HANDLER_TMP_WRITE 23 +HANDLER_UPDATE 2 +# 1 commit +# 4 lock +# 2 read key - (2 index read) +# 1 read rnd - rnd_pos +# 1 update +FLUSH STATUS; +UPDATE t1 PARTITION(subp0) SET b = concat(b, ', Updated2') WHERE a = 100; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +# Nothing, since impossible PARTITION+WHERE clause. +FLUSH STATUS; +UPDATE t1 PARTITION(subp0) SET a = -2, b = concat(b, ', Updated from a = 100') +WHERE a = 100; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +# Nothing, since impossible PARTITION+WHERE clause. +FLUSH STATUS; +UPDATE t1 PARTITION(`p100-99999`) SET a = -2, b = concat(b, ', Updated from a = 100') +WHERE a = 100; +ERROR HY000: Found a row not matching the given partition set +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_READ_KEY 1 +HANDLER_READ_RND 1 +HANDLER_ROLLBACK 1 +HANDLER_TMP_WRITE 23 +HANDLER_UPDATE 1 +# 6 lock +# 4 read key (1 index init + 1 index read + 1 rnd init + 1 rnd pos) +# 1 read rnd (rnd pos) +# 1 rollback +FLUSH STATUS; +UPDATE t1 PARTITION(`p100-99999`, pNeg) SET a = -4, b = concat(b, ', Updated from a = 100') +WHERE a = 100; +Got one of the listed errors +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_READ_KEY 1 +HANDLER_READ_RND 1 +HANDLER_ROLLBACK 1 +HANDLER_TMP_WRITE 23 +HANDLER_UPDATE 1 +HANDLER_WRITE 1 +# 10 locks +# 4 read key +# 1 read rnd +# 1 rollback +# 18 write (17 internal I_S + 1 failed insert) +FLUSH STATUS; +UPDATE t1 PARTITION(`p100-99999`, pNeg) SET a = -222, b = concat(b, ', Updated from a = 100') +WHERE a = 100; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_DELETE 1 +HANDLER_READ_KEY 1 +HANDLER_READ_RND 1 +HANDLER_TMP_WRITE 23 +HANDLER_UPDATE 1 +HANDLER_WRITE 1 +# 1 commit +# 1 delete +# 4 read key +# 1 read rnd +# 18 write (17 internal I_S + 1 insert) +SELECT * FROM t1 ORDER BY a; +a b +-222 `p100-99999`(-subp6), Updated from a = 100 +-21 REPLACEd by REPLACE +-4 (pNeg-)subp0, Updated, Updated2, Updated from a = -2 +-3 pNeg(-subp1) +-1 pNeg(-subp1) +1 subp3 +3 subp3 +5 p0-9:subp3 +10 p10-99 +101 `p100-99999`(-subp7) +1000 `p100-99999`(-subp6) +# Test of non matching partition (i.e ER_NO_PARTITION_FOUND) +FLUSH STATUS; +UPDATE t1 SET b = concat(b, ', Updated2') WHERE a = 1000000; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +# Nothing (no matching partition found) +FLUSH STATUS; +UPDATE t1 PARTITION (pNeg) SET b = concat(b, ', Updated2') WHERE a = 1000000; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +# Nothing (no matching partition found) +FLUSH STATUS; +LOCK TABLE t1 WRITE; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +# 9 locks +UPDATE t1 PARTITION (subp7) SET b = concat(b, ', Updated to 103'), a = 103 WHERE a = 101; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 2 +HANDLER_READ_KEY 1 +HANDLER_READ_RND 1 +HANDLER_READ_RND_NEXT 27 +HANDLER_TMP_WRITE 49 +HANDLER_UPDATE 2 +# + 4 read key +# + 1 read rnd +# + 1 update +UPDATE t1 PARTITION (`p100-99999`) SET b = concat(b, ', Updated to 110'), a = 110 WHERE a = 103; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 3 +HANDLER_DELETE 1 +HANDLER_READ_KEY 2 +HANDLER_READ_RND 2 +HANDLER_READ_RND_NEXT 54 +HANDLER_TMP_WRITE 75 +HANDLER_UPDATE 3 +HANDLER_WRITE 1 +# + 1 delete +# + 4 read key +# + 1 read rnd +# + 19 write (18 internal I_S + 1 insert) +UNLOCK TABLES; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 3 +HANDLER_DELETE 1 +HANDLER_READ_KEY 2 +HANDLER_READ_RND 2 +HANDLER_READ_RND_NEXT 81 +HANDLER_TMP_WRITE 101 +HANDLER_UPDATE 3 +HANDLER_WRITE 1 ++ 9 locks +# +# Test DELETE +# +SELECT * FROM t1 ORDER BY b, a; +a b +-4 (pNeg-)subp0, Updated, Updated2, Updated from a = -2 +5 p0-9:subp3 +10 p10-99 +-3 pNeg(-subp1) +-1 pNeg(-subp1) +-21 REPLACEd by REPLACE +1 subp3 +3 subp3 +1000 `p100-99999`(-subp6) +-222 `p100-99999`(-subp6), Updated from a = 100 +110 `p100-99999`(-subp7), Updated to 103, Updated to 110 +FLUSH STATUS; +DELETE FROM t1 PARTITION (pNeg) WHERE a = -1; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_DELETE 2 +HANDLER_READ_KEY 1 +HANDLER_TMP_WRITE 23 +# 1 delete +# 4 locks (pruning works!). +# 1 read key (index read) +FLUSH STATUS; +DELETE FROM t1 PARTITION (subp1) WHERE b like '%subp1%'; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_DELETE 2 +HANDLER_READ_RND_NEXT 3 +HANDLER_TMP_WRITE 23 +# 1 delete +# 4 locks +# 1 read first +# 2 read key +# 3 read rnd +FLUSH STATUS; +LOCK TABLE t1 WRITE; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +# 9 locks +DELETE FROM t1 PARTITION (subp1) WHERE b = 'p0-9:subp3'; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 2 +HANDLER_READ_KEY 1 +HANDLER_READ_RND_NEXT 27 +HANDLER_TMP_WRITE 49 +# + 3 read key (1 innodb_get_index in records_in_range +# + 1 innobase_get_index in index_init + 1 index read) +DELETE FROM t1 PARTITION (`p0-9`) WHERE b = 'p0-9:subp3'; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 3 +HANDLER_DELETE 2 +HANDLER_READ_KEY 3 +HANDLER_READ_NEXT 1 +HANDLER_READ_RND_NEXT 54 +HANDLER_TMP_WRITE 75 +# + 1 delete +# + 6 read key (same as above, but for two subpartitions) +# + 1 read next (read next after found row) +UNLOCK TABLES; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 3 +HANDLER_DELETE 2 +HANDLER_READ_KEY 3 +HANDLER_READ_NEXT 1 +HANDLER_READ_RND_NEXT 81 +HANDLER_TMP_WRITE 101 +# + 9 locks +# Test multi-table DELETE +# Can be expressed in two different ways. +CREATE TABLE t2 LIKE t1; +FLUSH STATUS; +INSERT INTO t2 PARTITION (`p10-99`, subp3, `p100-99999`) SELECT * FROM t1 PARTITION (subp3, `p10-99`, `p100-99999`); +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_READ_FIRST 5 +HANDLER_READ_NEXT 5 +HANDLER_TMP_WRITE 23 +HANDLER_WRITE 10 +# 24 locks (2 table, 5 + 5 subpartitions lock/unlock) +FLUSH STATUS; +ALTER TABLE t2 TRUNCATE PARTITION `p10-99`, `p0-9`, `p100-99999`; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +# 14 locks (1 table, 6 subpartitions lock/unlock) +FLUSH STATUS; +INSERT INTO t2 PARTITION (subp3) SELECT * FROM t1 PARTITION (subp3, `p10-99`, `p100-99999`); +ERROR HY000: Found a row not matching the given partition set +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_READ_FIRST 5 +HANDLER_ROLLBACK 1 +HANDLER_TMP_WRITE 23 +HANDLER_WRITE 1 +# 16 locks (2 tables, 1 + 5 subpartitions lock/unlock) +FLUSH STATUS; +INSERT IGNORE INTO t2 PARTITION (subp3) SELECT * FROM t1 PARTITION (subp3, `p10-99`, `p100-99999`); +Warnings: +Warning 1748 Found a row not matching the given partition set +Warning 1748 Found a row not matching the given partition set +Warning 1748 Found a row not matching the given partition set +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_READ_FIRST 5 +HANDLER_READ_NEXT 5 +HANDLER_TMP_WRITE 23 +HANDLER_WRITE 7 +# 16 locks (2 tables, 1 + 5 subpartitions lock/unlock) +TRUNCATE TABLE t2; +FLUSH STATUS; +INSERT INTO t2 SELECT * FROM t1 PARTITION (subp3, `p10-99`, `p100-99999`); +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_READ_FIRST 5 +HANDLER_READ_NEXT 5 +HANDLER_TMP_WRITE 23 +HANDLER_WRITE 10 +# 30 locks (2 table, 8 + 5 subpartitions lock/unlock) +FLUSH STATUS; +CREATE TABLE t3 SELECT * FROM t1 PARTITION (pNeg,subp3,`p100-99999`); +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_READ_FIRST 5 +HANDLER_READ_NEXT 7 +HANDLER_TMP_WRITE 23 +HANDLER_WRITE 7 +# 14 locks (2 table, 5 subpartitions lock/unlock) +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(64) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `b` (`b`,`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +SUBPARTITION BY HASH (a) +(PARTITION pNeg VALUES LESS THAN (0) + (SUBPARTITION subp0 ENGINE = InnoDB, + SUBPARTITION subp1 ENGINE = InnoDB), + PARTITION `p0-9` VALUES LESS THAN (10) + (SUBPARTITION subp2 ENGINE = InnoDB, + SUBPARTITION subp3 ENGINE = InnoDB), + PARTITION `p10-99` VALUES LESS THAN (100) + (SUBPARTITION subp4 ENGINE = InnoDB, + SUBPARTITION subp5 ENGINE = InnoDB), + PARTITION `p100-99999` VALUES LESS THAN (100000) + (SUBPARTITION subp6 ENGINE = InnoDB, + SUBPARTITION subp7 ENGINE = InnoDB)) */ +SELECT * FROM t1; +a b +-4 (pNeg-)subp0, Updated, Updated2, Updated from a = -2 +10 p10-99 +-21 REPLACEd by REPLACE +1 subp3 +3 subp3 +1000 `p100-99999`(-subp6) +-222 `p100-99999`(-subp6), Updated from a = 100 +110 `p100-99999`(-subp7), Updated to 103, Updated to 110 +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) NOT NULL, + `b` varchar(64) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `b` (`b`,`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +SUBPARTITION BY HASH (a) +(PARTITION pNeg VALUES LESS THAN (0) + (SUBPARTITION subp0 ENGINE = InnoDB, + SUBPARTITION subp1 ENGINE = InnoDB), + PARTITION `p0-9` VALUES LESS THAN (10) + (SUBPARTITION subp2 ENGINE = InnoDB, + SUBPARTITION subp3 ENGINE = InnoDB), + PARTITION `p10-99` VALUES LESS THAN (100) + (SUBPARTITION subp4 ENGINE = InnoDB, + SUBPARTITION subp5 ENGINE = InnoDB), + PARTITION `p100-99999` VALUES LESS THAN (100000) + (SUBPARTITION subp6 ENGINE = InnoDB, + SUBPARTITION subp7 ENGINE = InnoDB)) */ +SELECT * FROM t2; +a b +10 p10-99 +1 subp3 +3 subp3 +1000 `p100-99999`(-subp6) +110 `p100-99999`(-subp7), Updated to 103, Updated to 110 +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `a` int(11) NOT NULL, + `b` varchar(64) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM t3; +a b +-4 (pNeg-)subp0, Updated, Updated2, Updated from a = -2 +-21 REPLACEd by REPLACE +1 subp3 +3 subp3 +1000 `p100-99999`(-subp6) +-222 `p100-99999`(-subp6), Updated from a = 100 +110 `p100-99999`(-subp7), Updated to 103, Updated to 110 +FLUSH STATUS; +DELETE t1 PARTITION (pNeg), t3 FROM t1, t3 +WHERE t1.a = t3.a AND t3.b = 'subp3'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PARTITION (pNeg), t3 FROM t1, t3 +WHERE t1.a = t3.a AND t3.b = 'subp3'' at line 1 +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_TMP_WRITE 23 +# Multi table delete without any matching rows +FLUSH STATUS; +DELETE t1, t2 FROM t1 PARTITION (pNeg), t3, t2 PARTITION (subp3) +WHERE t1.a = t3.a AND t3.b = 'subp3' AND t3.a = t2.a; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_READ_RND_NEXT 3 +HANDLER_TMP_WRITE 23 +# 12 locks (3 in t1, 1 in t3, 2 in t2) x 2 (lock + unlock) +# 1 read first (first rnd_next in t2) +# 4 read key (1 innodb_get_index in rnd_init in t2 + index read in t2 +# + 2 innodb_get_index in index_init in t1) +# 3 read rnd next (3 rnd next in t2, 2 rows + 1 empty) +# Multi table delete matching all rows in subp3 (2 rows in per table) +FLUSH STATUS; +DELETE FROM t2, t3 USING t2 PARTITION (`p0-9`), t3, t1 PARTITION (subp3) +WHERE t1.a = t3.a AND t3.b = 'subp3' AND t2.a = t1.a; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_DELETE 6 +HANDLER_READ_FIRST 1 +HANDLER_READ_KEY 2 +HANDLER_READ_NEXT 2 +HANDLER_READ_RND 4 +HANDLER_READ_RND_NEXT 16 +HANDLER_TMP_WRITE 23 +# 4 delete (2 in t2 + 2 in t3) +# 12 locks (3 in t2, 1 in t3, 2 in t1) x 2 (lock + unlock) +# 3 read first (1 in t1 + 1 in t3 + 1 in t3, for second row in t1) +# 17 read key (1 index_init in t1 + 1 read first in t1 + +# 2 index_init in t2 + 1 index read in t2 + +# 1 index_init in t3 + 1 index read in t3 + +# 1 index read in t2 + +# 1 index_init in t3 + 1 index read in t3 + +# 2 index_init in t2 + 2 index read in t2 (from rnd_pos) +# 1 index_init in t3 + 2 index read in t3 (from rnd_pos)) +# 2 read next (1 in t1 + 1 in t1, second row) +# 4 read rnd (position on 4 found rows to delete) +# 16 rnd next (8 in t3 + 8 in t3, for second row) +SELECT * FROM t1 ORDER BY a; +a b +-222 `p100-99999`(-subp6), Updated from a = 100 +-21 REPLACEd by REPLACE +-4 (pNeg-)subp0, Updated, Updated2, Updated from a = -2 +1 subp3 +3 subp3 +10 p10-99 +110 `p100-99999`(-subp7), Updated to 103, Updated to 110 +1000 `p100-99999`(-subp6) +SELECT * FROM t2 ORDER BY a; +a b +10 p10-99 +110 `p100-99999`(-subp7), Updated to 103, Updated to 110 +1000 `p100-99999`(-subp6) +SELECT * FROM t3 ORDER BY a; +a b +-222 `p100-99999`(-subp6), Updated from a = 100 +-21 REPLACEd by REPLACE +-4 (pNeg-)subp0, Updated, Updated2, Updated from a = -2 +110 `p100-99999`(-subp7), Updated to 103, Updated to 110 +1000 `p100-99999`(-subp6) +# Test TRUNCATE TABLE (should fail, since one should use +# ALTER TABLE ... TRUNCATE PARTITION instead) +TRUNCATE TABLE t1 PARTITION(`p10-99`); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PARTITION(`p10-99`)' at line 1 +# Test of locking in TRUNCATE PARTITION +# Note that it does not support truncating subpartitions +FLUSH STATUS; +ALTER TABLE t1 TRUNCATE PARTITION pNeg; +SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS +WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; +VARIABLE_NAME VARIABLE_VALUE +HANDLER_COMMIT 1 +HANDLER_TMP_WRITE 23 +# 6 locks (lock/unlock two subpartitions + table) +# Test on non partitioned table +SELECT * FROM t3 PARTITION (pNeg); +ERROR HY000: PARTITION () clause on non partitioned table +DROP TABLE t1, t2, t3; +# Test from superseeded WL# 2682 +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +CREATE TABLE `t1` ( +`id` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +PARTITION BY RANGE (id) ( +PARTITION p0 VALUES LESS THAN (6) ENGINE = MyISAM, +PARTITION p1 VALUES LESS THAN (11) ENGINE = MyISAM, +PARTITION p2 VALUES LESS THAN (16) ENGINE = MyISAM, +PARTITION p3 VALUES LESS THAN (21) ENGINE = MyISAM); +INSERT INTO `t1` VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), +(11), (12), (13), (14), (15), (16), (17), (18), (19), (20); +SELECT * FROM t1; +id +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +SELECT * FROM t1 PARTITION (p0); +id +1 +2 +3 +4 +5 +SELECT * FROM t1 PARTITION (p1); +id +6 +7 +8 +9 +10 +SELECT * FROM t1 PARTITION (p2); +id +11 +12 +13 +14 +15 +SELECT * FROM t1 PARTITION (p3); +id +16 +17 +18 +19 +20 +SELECT * FROM t1 PARTITION (p3) WHERE id = 2; +id +SELECT * FROM t1 PARTITION (foo); +ERROR HY000: Unknown partition 'foo' in table 't1' +CREATE TABLE `t2` ( +`id` int(11) NOT NULL DEFAULT 0, +PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +PARTITION BY RANGE (id) ( +PARTITION p0 VALUES LESS THAN (6) ENGINE = MyISAM, +PARTITION p1 VALUES LESS THAN (11) ENGINE = MyISAM, +PARTITION p2 VALUES LESS THAN (16) ENGINE = MyISAM, +PARTITION p3 VALUES LESS THAN (21) ENGINE = MyISAM); +INSERT INTO `t2` VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), +(11), (12), (13), (14), (15), (16), (17), (18), (19), (20); +SELECT * FROM t2; +id +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +SELECT * FROM t2 PARTITION (p0); +id +1 +2 +3 +4 +5 +SELECT * FROM t2 PARTITION (p1); +id +6 +7 +8 +9 +10 +SELECT * FROM t2 PARTITION (p2); +id +11 +12 +13 +14 +15 +SELECT * FROM t2 PARTITION (p3); +id +16 +17 +18 +19 +20 +SELECT * FROM t2 PARTITION (p3) ORDER BY id; +id +16 +17 +18 +19 +20 +SELECT * FROM t2 PARTITION (p3) WHERE id = 2; +id +SELECT * FROM t2 PARTITION (foo); +ERROR HY000: Unknown partition 'foo' in table 't2' +CREATE TABLE `t3` ( +`id` int(32) default NULL, +`name` varchar(32) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +PARTITION BY LIST (id) ( +PARTITION p0 VALUES IN (1,3,5,7), +PARTITION p1 VALUES IN (0,2,4,6,8), +PARTITION p2 VALUES IN (9,10,11,12,13) +); +INSERT INTO `t3` VALUES (1,'first'), (3,'third'),(5,'fifth'),(7,'seventh'),(0,'zilch'),(2,'second'),(4,'fourth'),(6,'sixth'),(8,'eighth'),(9,'ninth'),(10,'tenth'),(11,'eleventh'),(12,'twelfth'),(13,'thirteenth'); +SELECT * FROM `t3`; +id name +1 first +3 third +5 fifth +7 seventh +0 zilch +2 second +4 fourth +6 sixth +8 eighth +9 ninth +10 tenth +11 eleventh +12 twelfth +13 thirteenth +SELECT * FROM `t3` PARTITION (p0); +id name +1 first +3 third +5 fifth +7 seventh +SELECT * FROM `t3` PARTITION (p1); +id name +0 zilch +2 second +4 fourth +6 sixth +8 eighth +SELECT * FROM `t3` PARTITION (p2); +id name +9 ninth +10 tenth +11 eleventh +12 twelfth +13 thirteenth +SELECT * FROM `t3` PARTITION (p2) ORDER BY id; +id name +9 ninth +10 tenth +11 eleventh +12 twelfth +13 thirteenth +DROP TABLE IF EXISTS `t4`; +Warnings: +Note 1051 Unknown table 'test.t4' +CREATE TABLE `t4` ( +`id` int(32) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (id) ; +INSERT INTO `t4` SELECT * FROM `t2`; +INSERT INTO `t4` SELECT * FROM `t2` ORDER BY id; +CREATE TABLE `t5` ( +id int(32), +name varchar(64), +purchased date) +PARTITION BY RANGE( YEAR(purchased) ) +SUBPARTITION BY HASH( TO_DAYS(purchased) ) ( +PARTITION p0 VALUES LESS THAN (1990) ( +SUBPARTITION s0, +SUBPARTITION s1 +), +PARTITION p1 VALUES LESS THAN (2000) ( +SUBPARTITION s2, +SUBPARTITION s3 +), +PARTITION p2 VALUES LESS THAN MAXVALUE ( +SUBPARTITION s4, +SUBPARTITION s5 +) +); +INSERT INTO `t5` VALUES (1, 'aaaaaaa', '2006-01-05 00:00:00'); +INSERT INTO `t5` VALUES (2, 'bbbbbbb', '2005-08-05 00:00:00'); +INSERT INTO `t5` VALUES (3, 'ccccccc', '1985-08-07 00:00:00'); +INSERT INTO `t5` VALUES (4, 'ddddddd', '2000-01-01 00:00:00'); +INSERT INTO `t5` VALUES (5, 'eeeeeee', '1999-12-01 00:00:00'); +INSERT INTO `t5` VALUES (6, 'fffffff', '2003-11-12 00:00:00'); +INSERT INTO `t5` VALUES (7, 'ggggggg', '1990-01-05 00:00:00'); +INSERT INTO `t5` VALUES (8, 'hhhhhhh', '1978-01-05 00:00:00'); +INSERT INTO `t5` VALUES (9, 'iiiiiii', '1979-01-05 00:00:00'); +INSERT INTO `t5` VALUES (10, 'jjjjjjj', '1992-01-05 00:00:00'); +INSERT INTO `t5` VALUES (11, 'kkkkkkk', '1993-01-05 00:00:00'); +INSERT INTO `t5` VALUES (12, 'mmmmmmm', '1994-01-05 00:00:00'); +INSERT INTO `t5` VALUES (13, 'nnnnnnn', '1989-01-05 00:00:00'); +INSERT INTO `t5` VALUES (14, 'ooooooo', '1983-12-05 00:00:00'); +INSERT INTO `t5` VALUES (15, 'ppppppp', '1986-06-05 00:00:00'); +INSERT INTO `t5` VALUES (16, 'qqqqqqq', '1974-04-11 00:00:00'); +INSERT INTO `t5` VALUES (17, 'qqqqqqq', '1960-03-15 00:00:00'); +INSERT INTO `t5` VALUES (18, 'sssssss', '1950-09-23 00:00:00'); +INSERT INTO `t5` VALUES (19, 'ttttttt', '1999-08-02 00:00:00'); +INSERT INTO `t5` VALUES (20, 'uuuuuuu', '1994-05-28 00:00:00'); +SELECT * FROM `t5`; +id name purchased +8 hhhhhhh 1978-01-05 +13 nnnnnnn 1989-01-05 +14 ooooooo 1983-12-05 +18 sssssss 1950-09-23 +3 ccccccc 1985-08-07 +9 iiiiiii 1979-01-05 +15 ppppppp 1986-06-05 +16 qqqqqqq 1974-04-11 +17 qqqqqqq 1960-03-15 +5 eeeeeee 1999-12-01 +12 mmmmmmm 1994-01-05 +7 ggggggg 1990-01-05 +10 jjjjjjj 1992-01-05 +11 kkkkkkk 1993-01-05 +19 ttttttt 1999-08-02 +20 uuuuuuu 1994-05-28 +2 bbbbbbb 2005-08-05 +6 fffffff 2003-11-12 +1 aaaaaaa 2006-01-05 +4 ddddddd 2000-01-01 +SELECT * FROM `t5` PARTITION(p0) ORDER BY id; +id name purchased +3 ccccccc 1985-08-07 +8 hhhhhhh 1978-01-05 +9 iiiiiii 1979-01-05 +13 nnnnnnn 1989-01-05 +14 ooooooo 1983-12-05 +15 ppppppp 1986-06-05 +16 qqqqqqq 1974-04-11 +17 qqqqqqq 1960-03-15 +18 sssssss 1950-09-23 +SELECT * FROM `t5` PARTITION(s0) ORDER BY id; +id name purchased +8 hhhhhhh 1978-01-05 +13 nnnnnnn 1989-01-05 +14 ooooooo 1983-12-05 +18 sssssss 1950-09-23 +SELECT * FROM `t5` PARTITION(s1) ORDER BY id; +id name purchased +3 ccccccc 1985-08-07 +9 iiiiiii 1979-01-05 +15 ppppppp 1986-06-05 +16 qqqqqqq 1974-04-11 +17 qqqqqqq 1960-03-15 +SELECT * FROM `t5` PARTITION(p1) ORDER BY id; +id name purchased +5 eeeeeee 1999-12-01 +7 ggggggg 1990-01-05 +10 jjjjjjj 1992-01-05 +11 kkkkkkk 1993-01-05 +12 mmmmmmm 1994-01-05 +19 ttttttt 1999-08-02 +20 uuuuuuu 1994-05-28 +SELECT * FROM `t5` PARTITION(s2) ORDER BY id; +id name purchased +5 eeeeeee 1999-12-01 +12 mmmmmmm 1994-01-05 +SELECT * FROM `t5` PARTITION(s3) ORDER BY id; +id name purchased +7 ggggggg 1990-01-05 +10 jjjjjjj 1992-01-05 +11 kkkkkkk 1993-01-05 +19 ttttttt 1999-08-02 +20 uuuuuuu 1994-05-28 +SELECT * FROM `t5` PARTITION(p2) ORDER BY id; +id name purchased +1 aaaaaaa 2006-01-05 +2 bbbbbbb 2005-08-05 +4 ddddddd 2000-01-01 +6 fffffff 2003-11-12 +SELECT * FROM `t5` PARTITION(s4) ORDER BY id; +id name purchased +2 bbbbbbb 2005-08-05 +6 fffffff 2003-11-12 +SELECT * FROM `t5` PARTITION(s5) ORDER BY id; +id name purchased +1 aaaaaaa 2006-01-05 +4 ddddddd 2000-01-01 +drop table t1,t2,t3,t4,t5; +create table t1 (a int) partition by hash(a) partitions 3; +insert into t1 values(1),(2),(3); +explain partitions select * from t1 where a=1; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 2 Using where +explain partitions select * from t1 partition (p1) where a=1; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 2 Using where +explain partitions select * from t1 partition (p1) where a=1 or a=2; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 2 Using where +explain partitions select * from t1 partition (p2) where a=1; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +drop table t1; +# +# Bug#59864: Crash if table empty: DELETE FROM t2 PARTITION (subp3). +# +CREATE TABLE t1 +(a INT NOT NULL, +b varchar (64), +INDEX (b,a), +PRIMARY KEY (a)) +PARTITION BY RANGE (a) +SUBPARTITION BY HASH (a) SUBPARTITIONS 3 +(PARTITION pNeg VALUES LESS THAN (0) +(SUBPARTITION subp0, +SUBPARTITION subp1, +SUBPARTITION subp2), +PARTITION `p0-29` VALUES LESS THAN (30) +(SUBPARTITION subp3, +SUBPARTITION subp4, +SUBPARTITION subp5), +PARTITION `p30-299` VALUES LESS THAN (300) +(SUBPARTITION subp6, +SUBPARTITION subp7, +SUBPARTITION subp8), +PARTITION `p300-2999` VALUES LESS THAN (3000) +(SUBPARTITION subp9, +SUBPARTITION subp10, +SUBPARTITION subp11), +PARTITION `p3000-299999` VALUES LESS THAN (300000) +(SUBPARTITION subp12, +SUBPARTITION subp13, +SUBPARTITION subp14)); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(64) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `b` (`b`,`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +SUBPARTITION BY HASH (a) +(PARTITION pNeg VALUES LESS THAN (0) + (SUBPARTITION subp0 ENGINE = InnoDB, + SUBPARTITION subp1 ENGINE = InnoDB, + SUBPARTITION subp2 ENGINE = InnoDB), + PARTITION `p0-29` VALUES LESS THAN (30) + (SUBPARTITION subp3 ENGINE = InnoDB, + SUBPARTITION subp4 ENGINE = InnoDB, + SUBPARTITION subp5 ENGINE = InnoDB), + PARTITION `p30-299` VALUES LESS THAN (300) + (SUBPARTITION subp6 ENGINE = InnoDB, + SUBPARTITION subp7 ENGINE = InnoDB, + SUBPARTITION subp8 ENGINE = InnoDB), + PARTITION `p300-2999` VALUES LESS THAN (3000) + (SUBPARTITION subp9 ENGINE = InnoDB, + SUBPARTITION subp10 ENGINE = InnoDB, + SUBPARTITION subp11 ENGINE = InnoDB), + PARTITION `p3000-299999` VALUES LESS THAN (300000) + (SUBPARTITION subp12 ENGINE = InnoDB, + SUBPARTITION subp13 ENGINE = InnoDB, + SUBPARTITION subp14 ENGINE = InnoDB)) */ +INSERT INTO t1 VALUES (-9, "negative nine"), (-8, "-8"), (-7, "-7"), (-6, "-6"), (-5, "-5"), (-4, "-4"), (-3, "-3"), (-2, "-2"), (-1, "-1"); +INSERT INTO t1 VALUES (9, "nine"), (8, "8"), (7, "7"), (6, "6"), (5, "5"), (4, "4"), (3, "3"), (2, "2"), (1, "1"); +INSERT INTO t1 VALUES (39, "Thirty nine"), (38, "38"), (37, "37"), (36, "36"), (35, "35"), (34, "34"), (33, "33"), (32, "32"), (31, "31"); +INSERT INTO t1 VALUES (339, "Three hundred thirty nine"), (338, "338"), (337, "337"), (336, "336"), (335, "335"), (334, "334"), (333, "333"), (332, "332"), (331, "331"); +INSERT INTO t1 VALUES (3339, "Three thousand three hundred thirty nine"), (3338, "3338"), (3337, "3337"), (3336, "3336"), (3335, "3335"), (3334, "3334"), (3333, "3333"), (3332, "3332"), (3331, "3331"); +SELECT * FROM t1; +a b +-1 -1 +-2 -2 +-3 -3 +-4 -4 +-5 -5 +-6 -6 +-7 -7 +-8 -8 +-9 negative nine +1 1 +2 2 +3 3 +31 31 +32 32 +33 33 +331 331 +332 332 +333 333 +3331 3331 +3332 3332 +3333 3333 +3334 3334 +3335 3335 +3336 3336 +3337 3337 +3338 3338 +3339 Three thousand three hundred thirty nine +334 334 +335 335 +336 336 +337 337 +338 338 +339 Three hundred thirty nine +34 34 +35 35 +36 36 +37 37 +38 38 +39 Thirty nine +4 4 +5 5 +6 6 +7 7 +8 8 +9 nine +SELECT * FROM t1 PARTITION (subp3); +a b +3 3 +6 6 +9 nine +DELETE FROM t1 PARTITION (subp3); +SELECT * FROM t1; +a b +-1 -1 +-2 -2 +-3 -3 +-4 -4 +-5 -5 +-6 -6 +-7 -7 +-8 -8 +-9 negative nine +1 1 +2 2 +31 31 +32 32 +33 33 +331 331 +332 332 +333 333 +3331 3331 +3332 3332 +3333 3333 +3334 3334 +3335 3335 +3336 3336 +3337 3337 +3338 3338 +3339 Three thousand three hundred thirty nine +334 334 +335 335 +336 336 +337 337 +338 338 +339 Three hundred thirty nine +34 34 +35 35 +36 36 +37 37 +38 38 +39 Thirty nine +4 4 +5 5 +7 7 +8 8 +SELECT * FROM t1 PARTITION (subp3); +a b +DELETE FROM t1 PARTITION (`p0-29`); +SELECT * FROM t1; +a b +-1 -1 +-2 -2 +-3 -3 +-4 -4 +-5 -5 +-6 -6 +-7 -7 +-8 -8 +-9 negative nine +31 31 +32 32 +33 33 +331 331 +332 332 +333 333 +3331 3331 +3332 3332 +3333 3333 +3334 3334 +3335 3335 +3336 3336 +3337 3337 +3338 3338 +3339 Three thousand three hundred thirty nine +334 334 +335 335 +336 336 +337 337 +338 338 +339 Three hundred thirty nine +34 34 +35 35 +36 36 +37 37 +38 38 +39 Thirty nine +SELECT * FROM t1 PARTITION (`p0-29`); +a b +ALTER TABLE t1 PARTITION BY HASH (a) PARTITIONS 3; +DELETE FROM t1 PARTITION (p2); +SELECT * FROM t1; +a b +-1 -1 +-3 -3 +-4 -4 +-6 -6 +-7 -7 +-9 negative nine +31 31 +33 33 +331 331 +333 333 +3331 3331 +3333 3333 +3334 3334 +3336 3336 +3337 3337 +3339 Three thousand three hundred thirty nine +334 334 +336 336 +337 337 +339 Three hundred thirty nine +34 34 +36 36 +37 37 +39 Thirty nine +SELECT * FROM t1 PARTITION (p2); +a b +DROP TABLE t1; +# +# Test explicit partition selection on a non partitioned temp table +# +CREATE TEMPORARY TABLE t1 (a INT); +SELECT * FROM t1 PARTITION(pNonexisting); +ERROR HY000: PARTITION () clause on non partitioned table +DROP TEMPORARY TABLE t1; +# +# Test CREATE LIKE does not take PARTITION clause +# +CREATE TABLE t1 (a INT) PARTITION BY HASH (a) PARTITIONS 3; +CREATE TABLE t2 LIKE t1 PARTITION (p0, p2); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PARTITION (p0, p2)' at line 1 +DROP TABLE t1; +SET @@default_storage_engine = @old_default_storage_engine; diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index ed4aaf71a00..f863ec5522a 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -31,6 +31,17 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range PRIMARY,b b 67 NULL 18 Using where; Using index DROP TABLE t1; # +# Bug#13007154: Crash in keys_to_use_for_scanning with ORDER BY +# and PARTITIONING +# +CREATE TABLE t1 (a INT, KEY(a)) +ENGINE = InnoDB +PARTITION BY KEY (a) PARTITIONS 1; +SELECT 1 FROM t1 WHERE a > (SELECT LAST_INSERT_ID() FROM t1 LIMIT 0) +ORDER BY a; +1 +DROP TABLE t1; +# # Bug#56287: crash when using Partition datetime in sub in query # CREATE TABLE t1 @@ -51,8 +62,8 @@ p200912 0 p201103 1 p201912 0 SELECT count(*) FROM t1 p where c3 in -(select c3 from t1 t where t.c3 < date '2011-04-26 19:19:44' - and t.c3 > date '2011-04-26 19:18:44') ; +(select c3 from t1 t where t.c3 < timestamp '2011-04-26 19:19:44' + and t.c3 > timestamp '2011-04-26 19:18:44') ; count(*) 0 DROP TABLE t1; @@ -60,7 +71,8 @@ DROP TABLE t1; # Bug#54747: Deadlock between REORGANIZE PARTITION and # SELECT is not detected # -SET @old_innodb_thread_concurrency:= @@innodb_thread_concurrency; +SET @old_innodb_thread_concurrency := @@innodb_thread_concurrency; +SET @old_innodb_thread_sleep_delay := @@innodb_thread_sleep_delay; SET GLOBAL innodb_thread_concurrency = 1; CREATE TABLE t1 (user_num BIGINT, @@ -91,6 +103,7 @@ COMMIT; # con1, reaping ALTER. # Disconnecting con1 and switching to default. Cleaning up. SET GLOBAL innodb_thread_concurrency = @old_innodb_thread_concurrency; +SET GLOBAL innodb_thread_sleep_delay = @old_innodb_thread_sleep_delay; DROP TABLE t1; # # Bug#50418: DROP PARTITION does not interact with transactions @@ -595,6 +608,8 @@ b INT, c INT, PRIMARY KEY (c,a), KEY (a),KEY (a) ) ENGINE=INNODB PARTITION BY KEY () PARTITIONS 2; +Warnings: +Note 1831 Duplicate index `a_2`. This is deprecated and will be disallowed in a future release. INSERT INTO t1 VALUES (1,5,1),(2,4,1),(3,3,1),(4,2,1),(5,1,1); UPDATE t1 SET b = 0, c=1 WHERE a <=>0; SELECT * FROM t1; @@ -807,3 +822,71 @@ GROUP BY A.IMORY_ID, A.NUMBER, A.NAME, DATE_FORMAT(A.DATETIME, '%Y-%m-%d') ; IMORY_ID NUMBER NAME TARGET_DATE CALL_CNT SMS_CNT DURATION STATS_COUNT drop table t2, t1; +set global default_storage_engine='innodb'; +# +# MDEV-5963: InnoDB: Assertion failure in file row0sel.cc line 2503, +# Failing assertion: 0 with "key ptr now exceeds key end by 762 bytes" +# (independent testcase for Oracle Bug#13947868) +# +CREATE TABLE t1 (f1 VARCHAR(512) CHARACTER SET utf8) ENGINE=InnoDB; +INSERT INTO t1 VALUES ('j'); +CREATE TABLE t2 ( +f2 VARCHAR(5) CHARACTER SET latin1, +f3 VARCHAR(5) CHARACTER SET utf8, +f4 INT, +f5 VARCHAR(512) CHARACTER SET utf8, +f6 VARCHAR(256) CHARACTER SET utf8, +key (f2), +key (f3), +key (f5) +) ENGINE=InnoDB PARTITION BY LIST COLUMNS (f4) +SUBPARTITION BY KEY(f6) SUBPARTITIONS 4 ( +PARTITION p0 VALUES IN (1,3,9,null), +PARTITION p1 VALUES IN (2,4,0) +); +Warnings: +Warning 1071 Specified key was too long; max key length is 767 bytes +INSERT INTO t2 VALUES +('k','s',3,'b','j'),('a','b',NULL,'v','j'),('c','m',9,'t',NULL), +('b','l',9,'b',NULL),('i','y',3,'o','w'),('c','m',NULL,'a','m'), +('f','o',9,'m','w'),('f','q',NULL,'o','a'); +CREATE TABLE t3 LIKE t2; +SELECT * FROM t1 INNER JOIN t2 ON ( f5 = f1 ); +f1 f2 f3 f4 f5 f6 +INSERT INTO t3 SELECT * FROM t2 WHERE f3 = 'm' AND f2 ='c'; +DROP TABLE t1,t2,t3; +set global default_storage_engine=default; +# +# Bug#13737949: CRASH IN HA_PARTITION::INDEX_INIT +# Bug#18694052: SERVER CRASH IN HA_PARTITION::INIT_RECORD_PRIORITY_QUEUE +# +CREATE TABLE t1 +(a INT, +b INT, +PRIMARY KEY (a)) +ENGINE = InnoDB +PARTITION BY HASH (a) PARTITIONS 3; +START TRANSACTION WITH CONSISTENT SNAPSHOT; +# con1 +ALTER TABLE t1 ADD INDEX idx1 (b); +# con default +SELECT b FROM t1 WHERE b = 0; +ERROR HY000: Table definition has changed, please retry transaction +SELECT b FROM t1 WHERE b = 0; +ERROR HY000: Table definition has changed, please retry transaction +DROP TABLE t1; +# Same test without partitioning +CREATE TABLE t1 +(a INT, +b INT, +PRIMARY KEY (a)) +ENGINE = InnoDB; +START TRANSACTION WITH CONSISTENT SNAPSHOT; +# con1 +ALTER TABLE t1 ADD INDEX idx1 (b); +# con default +SELECT b FROM t1 WHERE b = 0; +ERROR HY000: Table definition has changed, please retry transaction +SELECT b FROM t1 WHERE b = 0; +ERROR HY000: Table definition has changed, please retry transaction +DROP TABLE t1; diff --git a/mysql-test/r/partition_innodb_plugin.result b/mysql-test/r/partition_innodb_plugin.result index 21f18f715d0..7057bb0a55b 100644 --- a/mysql-test/r/partition_innodb_plugin.result +++ b/mysql-test/r/partition_innodb_plugin.result @@ -67,7 +67,7 @@ LOCK TABLE t1 WRITE; # ALTER fails because COMPRESSED/KEY_BLOCK_SIZE # are incompatible with innodb_file_per_table = OFF; ALTER TABLE t1 ADD PARTITION PARTITIONS 1; -ERROR HY000: Got error 1478 from storage engine +ERROR HY000: Got error 140 "Wrong create options" from storage engine InnoDB t1#P#p0.ibd t1.frm t1.par @@ -141,12 +141,12 @@ ERROR 40001: Deadlock found when trying to get lock; try restarting transaction # First table reported in 'SHOW ENGINE InnoDB STATUS' SHOW ENGINE InnoDB STATUS; Type Name Status -InnoDB index `PRIMARY` of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */ +InnoDB index `PRIMARY` of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */ set @old_sql_mode = @@sql_mode; set sql_mode = 'ANSI_QUOTES'; SHOW ENGINE InnoDB STATUS; Type Name Status -InnoDB index `PRIMARY` of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */ +InnoDB index `PRIMARY` of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */ set @@sql_mode = @old_sql_mode; # con1 ROLLBACK; diff --git a/mysql-test/r/partition_mgm_err.result b/mysql-test/r/partition_mgm_err.result index a13278d724e..cbf45a2b7be 100644 --- a/mysql-test/r/partition_mgm_err.result +++ b/mysql-test/r/partition_mgm_err.result @@ -98,7 +98,7 @@ PARTITION BY KEY (a) (PARTITION x0, PARTITION x1); ALTER TABLE t1 ADD PARTITION PARTITIONS 0; ERROR HY000: At least one partition must be added -ALTER TABLE t1 ADD PARTITION PARTITIONS 1024; +ALTER TABLE t1 ADD PARTITION PARTITIONS 8192; ERROR HY000: Too many partitions (including subpartitions) were defined ALTER TABLE t1 DROP PARTITION x0; ERROR HY000: DROP PARTITION can only be used on RANGE/LIST partitions diff --git a/mysql-test/r/partition_myisam.result b/mysql-test/r/partition_myisam.result index d54e2a2856a..08a5bf72f64 100644 --- a/mysql-test/r/partition_myisam.result +++ b/mysql-test/r/partition_myisam.result @@ -1,80 +1,62 @@ DROP TABLE IF EXISTS t1, t2; # -# Bug#50036: Inconsistent errors when using TIMESTAMP -# columns/expressions -# Added test with existing TIMESTAMP partitioning (when it was allowed). -CREATE TABLE t1 (a TIMESTAMP) -ENGINE = MyISAM -PARTITION BY HASH (UNIX_TIMESTAMP(a)); -INSERT INTO t1 VALUES ('2000-01-02 03:04:05'); -SELECT * FROM t1; -a -2000-01-02 03:04:05 -FLUSH TABLES; -# replacing t1.frm with TO_DAYS(a) which was allowed earlier. -# Disable warnings, since the result would differ when running with -# --ps-protocol (only for the 'SELECT * FROM t1' statement). -SELECT * FROM t1; -a -2000-01-02 03:04:05 -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP -) ENGINE=<curr_engine> DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (TO_DAYS(a)) */ -INSERT INTO t1 VALUES ('2001-02-03 04:05:06'); -SELECT * FROM t1; -a -2000-01-02 03:04:05 -2001-02-03 04:05:06 -ALTER TABLE t1 ADD PARTITION PARTITIONS 2; -Warnings: -Warning 1486 Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed -ALTER TABLE t1 -PARTITION BY RANGE (TO_DAYS(a)) -(PARTITION p0 VALUES LESS THAN (10000), -PARTITION p1 VALUES LESS THAN (MAXVALUE)); -ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed +# BUG#11933226 - 60681: CHECKSUM TABLE RETURNS 0 FOR PARTITIONED TABLE +# +CREATE TABLE t1 ( +i INT +) +ENGINE=MyISAM +PARTITION BY RANGE (i) +(PARTITION p3 VALUES LESS THAN (3), +PARTITION p5 VALUES LESS THAN (5), +PARTITION pMax VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6); +CHECKSUM TABLE t1; +Table Checksum +test.t1 2653438147 +ALTER TABLE t1 CHECKSUM = 1; +CHECKSUM TABLE t1 EXTENDED; +Table Checksum +test.t1 2653438147 +# Before patch this returned 0! +CHECKSUM TABLE t1; +Table Checksum +test.t1 2653438147 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (TO_DAYS(a)) -PARTITIONS 3 */ -CREATE TABLE t2 LIKE t1; -SHOW CREATE TABLE t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (TO_DAYS(a)) -PARTITIONS 3 */ -Warnings: -Warning 1486 Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed -DROP TABLE t2; -CREATE TABLE t2 SELECT * FROM t1; -DROP TABLE t2; -ALTER TABLE t1 PARTITION BY HASH (UNIX_TIMESTAMP(a)); + `i` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 CHECKSUM=1 +/*!50100 PARTITION BY RANGE (i) +(PARTITION p3 VALUES LESS THAN (3) ENGINE = MyISAM, + PARTITION p5 VALUES LESS THAN (5) ENGINE = MyISAM, + PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +DROP TABLE t1; +# Same test without partitioning +CREATE TABLE t1 ( +i INT +) ENGINE=MyISAM; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP + `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (UNIX_TIMESTAMP(a)) */ -ALTER TABLE t1 ADD PARTITION PARTITIONS 2; +INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6); +CHECKSUM TABLE t1; +Table Checksum +test.t1 2653438147 +ALTER TABLE t1 CHECKSUM = 1; +CHECKSUM TABLE t1 EXTENDED; +Table Checksum +test.t1 2653438147 +CHECKSUM TABLE t1; +Table Checksum +test.t1 2653438147 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (UNIX_TIMESTAMP(a)) -PARTITIONS 3 */ -SELECT * FROM t1; -a -2000-01-02 03:04:05 -2001-02-03 04:05:06 + `i` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 CHECKSUM=1 DROP TABLE t1; # # Bug#31931: Mix of handlers error message @@ -102,14 +84,13 @@ FLUSH TABLES; CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check Error Failed to read from the .par file -test.t1 check Error Incorrect information in file: './test/t1.frm' test.t1 check error Corrupt SELECT * FROM t1; ERROR HY000: Failed to read from the .par file -# Note that we will remove the frm file when we detect that -# .par file has been deleted. +# Note that it is currently impossible to drop a partitioned table +# without the .par file DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR HY000: Got error 1 "Operation not permitted" from storage engine partition # # Bug#50392: insert_id is not reset for partitioned tables # auto_increment on duplicate entry @@ -264,3 +245,18 @@ f2 DROP VIEW v; DROP TABLE t2; DROP TABLE t1; +# +# bug#11760213-52599: ALTER TABLE REMOVE PARTITIONING ON NON-PARTITIONED +# TABLE CORRUPTS MYISAM +DROP TABLE if exists `t1`; +CREATE TABLE `t1`(`a` INT)ENGINE=myisam; +ALTER TABLE `t1` ADD COLUMN `b` INT; +CREATE UNIQUE INDEX `i1` ON `t1`(`b`); +CREATE UNIQUE INDEX `i2` ON `t1`(`a`); +ALTER TABLE `t1` ADD PRIMARY KEY (`a`); +ALTER TABLE `t1` REMOVE PARTITIONING; +ERROR HY000: Partition management on a not partitioned table is not possible +CHECK TABLE `t1` EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; diff --git a/mysql-test/r/partition_not_blackhole.result b/mysql-test/r/partition_not_blackhole.result index dc0339f8c48..7759f947c32 100644 --- a/mysql-test/r/partition_not_blackhole.result +++ b/mysql-test/r/partition_not_blackhole.result @@ -11,6 +11,6 @@ t1 SHOW CREATE TABLE t1; ERROR HY000: Incorrect information in file: './test/t1.frm' DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR HY000: Got error 1 "Operation not permitted" from storage engine partition t1.frm t1.par diff --git a/mysql-test/r/partition_not_windows.result b/mysql-test/r/partition_not_windows.result index 42dca557b3e..a1da9af675b 100644 --- a/mysql-test/r/partition_not_windows.result +++ b/mysql-test/r/partition_not_windows.result @@ -94,4 +94,4 @@ PARTITION p1 DATA DIRECTORY = '/not/existent/p1Data', PARTITION p2 DATA DIRECTORY = '/not/existent/p2Data', PARTITION p3 DATA DIRECTORY = '/not/existent/p3Data' ); -Got one of the listed errors +ERROR HY000: Can't create/write to file '/not/existent/p0Data/example#P#p0.MYD' (Errcode: 2 "No such file or directory") diff --git a/mysql-test/r/partition_open_files_limit.result b/mysql-test/r/partition_open_files_limit.result index 1441ba4e78e..fed32a69c44 100644 --- a/mysql-test/r/partition_open_files_limit.result +++ b/mysql-test/r/partition_open_files_limit.result @@ -5,7 +5,7 @@ ENGINE=MyISAM PARTITION BY KEY () PARTITIONS 1; INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11); # if the bug exists, then crash will happen here ALTER TABLE t1 ADD PARTITION PARTITIONS 511; -ERROR HY000: Out of resources when opening file '<partition file>' (Errcode: 24) +ERROR HY000: Out of resources when opening file '<partition file>' (Errcode: 24 "Too many open files") SELECT * FROM t1; a 1 diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result index e52c2c7d886..65b788a7d1b 100644 --- a/mysql-test/r/partition_pruning.result +++ b/mysql-test/r/partition_pruning.result @@ -3467,3 +3467,21 @@ id select_type table partitions type possible_keys key key_len ref rows Extra 1 PRIMARY t2 p_1000 ref PRIMARY PRIMARY 8 const 2 Using index 1 PRIMARY t1 p_1000 ALL PRIMARY NULL NULL NULL 6 Using where; Using join buffer (flat, BNL join) drop table t1,t2; +# +# MDEV-9505: Valgrind failure in SEL_ARG::store_min,find_used_partitions,... +# +create table t1 (a int, b char(10), c varchar(5), d int) +partition by range columns(a,b,c) +subpartition by key (c,d) +subpartitions 3 +( partition p0 values less than (1,'abc','abc'), +partition p1 values less than (2,'abc','abc'), +partition p2 values less than (3,'abc','abc'), +partition p3 values less than (4,'abc','abc') +); +insert into t1 values (1,'a','b',1),(2,'a','b',2),(3,'a','b',3); +select * from t1 where (a = 1 AND b < 'd' AND (c = 'b' OR (c = 'c' AND d = 1)) OR +(a = 1 AND b >= 'a' AND (c = 'c' OR (c = 'd' AND d = 2)))); +a b c d +1 a b 1 +drop table t1; diff --git a/mysql-test/r/partition_symlink.result b/mysql-test/r/partition_symlink.result index f26a1642a52..2588a9b10e4 100644 --- a/mysql-test/r/partition_symlink.result +++ b/mysql-test/r/partition_symlink.result @@ -1,5 +1,44 @@ DROP TABLE IF EXISTS t1; DROP DATABASE IF EXISTS mysqltest2; +# +# Test for WL#4445: EXCHANGE PARTITION +# +CREATE TABLE t1 (a INT) +ENGINE = MyISAM +PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0) +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp', +PARTITION p1 VALUES IN (1) +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp', +PARTITION p2 VALUES IN (2)); +CREATE TABLE t2 (a INT) +ENGINE = MyISAM +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp'; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, + PARTITION p1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, + PARTITION p2 VALUES IN (2) ENGINE = MyISAM) */ +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/tmp/' +INSERT INTO t1 VALUES (0), (1), (2); +ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2; +ERROR HY000: Tables have different definitions +ALTER TABLE t1 EXCHANGE PARTITION p2 WITH TABLE t2; +ERROR HY000: Tables have different definitions +SELECT * FROM t2; +a +DROP TABLE t1, t2; # Creating two non colliding tables mysqltest2.t1 and test.t1 # test.t1 have partitions in mysqltest2-directory! # user root: diff --git a/mysql-test/r/partition_truncate.result b/mysql-test/r/partition_truncate.result index 66c0cd3d9da..7a82e47d818 100644 --- a/mysql-test/r/partition_truncate.result +++ b/mysql-test/r/partition_truncate.result @@ -5,7 +5,7 @@ partition by list (a) alter table t1 truncate partition p1,p1; ERROR HY000: Incorrect partition name alter table t1 truncate partition p0; -ERROR HY000: Incorrect partition name +ERROR HY000: Unknown partition 'p0' in table 't1' drop table t1; create table t1 (a int) partition by list (a) diff --git a/mysql-test/r/partition_windows.result b/mysql-test/r/partition_windows.result index 756690925f8..dabcedcb3f9 100644 --- a/mysql-test/r/partition_windows.result +++ b/mysql-test/r/partition_windows.result @@ -26,5 +26,9 @@ ALTER TABLE t1 ADD PARTITION (PARTITION p3 DATA DIRECTORY = 'G:/mysqltest/p3Data Warnings: Warning 1618 <DATA DIRECTORY> option ignored Warning 1618 <INDEX DIRECTORY> option ignored +Warning 1618 <DATA DIRECTORY> option ignored +Warning 1618 <INDEX DIRECTORY> option ignored +Warning 1618 <DATA DIRECTORY> option ignored +Warning 1618 <INDEX DIRECTORY> option ignored INSERT INTO t1 VALUES (NULL, "last", 4); DROP TABLE t1; diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result index 4fb4986d0fd..ce382e35bd1 100644 --- a/mysql-test/r/plugin.result +++ b/mysql-test/r/plugin.result @@ -5,7 +5,7 @@ Warning 1266 Using storage engine MyISAM for table 't1' DROP TABLE t1; INSTALL PLUGIN example SONAME 'ha_example'; INSTALL PLUGIN EXAMPLE SONAME 'ha_example'; -ERROR HY000: Function 'EXAMPLE' already exists +ERROR HY000: Plugin 'EXAMPLE' already installed UNINSTALL PLUGIN example; INSTALL SONAME 'ha_example'; select * from information_schema.plugins where plugin_library like 'ha_example%'; @@ -15,7 +15,7 @@ PLUGIN_STATUS ACTIVE PLUGIN_TYPE STORAGE ENGINE PLUGIN_TYPE_VERSION # PLUGIN_LIBRARY ha_example.so -PLUGIN_LIBRARY_VERSION 1.4 +PLUGIN_LIBRARY_VERSION 1.8 PLUGIN_AUTHOR Brian Aker, MySQL AB PLUGIN_DESCRIPTION Example storage engine PLUGIN_LICENSE GPL @@ -28,14 +28,16 @@ PLUGIN_STATUS ACTIVE PLUGIN_TYPE DAEMON PLUGIN_TYPE_VERSION # PLUGIN_LIBRARY ha_example.so -PLUGIN_LIBRARY_VERSION 1.4 +PLUGIN_LIBRARY_VERSION 1.8 PLUGIN_AUTHOR Sergei Golubchik PLUGIN_DESCRIPTION Unusable Daemon PLUGIN_LICENSE GPL LOAD_OPTION ON PLUGIN_MATURITY Experimental PLUGIN_AUTH_VERSION 3.14.15.926 -CREATE TABLE t1(a int) ENGINE=EXAMPLE; +CREATE TABLE t1 (a int) ENGINE=EXAMPLE; +CREATE TABLE t2 (a int) ENGINE=EXAMPLE; +FLUSH TABLES; SELECT * FROM t1; a set global example_ulong_var=500; @@ -43,7 +45,7 @@ set global example_enum_var= e1; set session example_int_var= -1; show status like 'example%'; Variable_name Value -example_func_example enum_var is 0, ulong_var is 500, int_var is -1, double_var is 8.500000, really +Example_func_example enum_var is 0, ulong_var is 500, int_var is -1, double_var is 8.500000, really show variables like 'example%'; Variable_name Value example_double_thdvar 8.500000 @@ -51,6 +53,7 @@ example_double_var 8.500000 example_enum_var e1 example_int_var -1 example_ulong_var 500 +example_varopt_default 5 select @@session.example_int_var; @@session.example_int_var -1 @@ -64,7 +67,7 @@ PLUGIN_STATUS DELETED PLUGIN_TYPE STORAGE ENGINE PLUGIN_TYPE_VERSION # PLUGIN_LIBRARY ha_example.so -PLUGIN_LIBRARY_VERSION 1.4 +PLUGIN_LIBRARY_VERSION 1.8 PLUGIN_AUTHOR Brian Aker, MySQL AB PLUGIN_DESCRIPTION Example storage engine PLUGIN_LICENSE GPL @@ -72,6 +75,10 @@ LOAD_OPTION ON PLUGIN_MATURITY Experimental PLUGIN_AUTH_VERSION 0.1 DROP TABLE t1; +select * from information_schema.plugins where plugin_library like 'ha_example%'; +SELECT * FROM t2; +ERROR 42000: Unknown storage engine 'EXAMPLE' +DROP TABLE t2; UNINSTALL PLUGIN EXAMPLE; ERROR 42000: PLUGIN EXAMPLE does not exist UNINSTALL PLUGIN non_exist; @@ -120,12 +127,12 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL `complex`='c,f,f,f' -) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=10000 `STR`='dskj' `one_or_two`='one' `YESNO`=0 +) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=10000 `STR`='dskj' `one_or_two`='one' `YESNO`=0 `VAROPT`='5' drop table t1; SET @OLD_SQL_MODE=@@SQL_MODE; SET SQL_MODE='IGNORE_BAD_TABLE_OPTIONS'; #illegal value fixed -CREATE TABLE t1 (a int) ENGINE=example ULL=10000000000000000000 one_or_two='ttt' YESNO=SSS; +CREATE TABLE t1 (a int, b int) ENGINE=example ULL=10000000000000000000 one_or_two='ttt' YESNO=SSS; Warnings: Warning 1912 Incorrect value '10000000000000000000' for option 'ULL' Warning 1912 Incorrect value 'ttt' for option 'one_or_two' @@ -133,21 +140,35 @@ Warning 1912 Incorrect value 'SSS' for option 'YESNO' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=10000000000000000000 `one_or_two`='ttt' `YESNO`=SSS + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=10000000000000000000 `one_or_two`='ttt' `YESNO`=SSS `VAROPT`='5' #alter table alter table t1 ULL=10000000; +Warnings: +Note 1105 EXAMPLE DEBUG: ULL 4294967290 -> 10000000 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `one_or_two`='ttt' `YESNO`=SSS `ULL`=10000000 + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `one_or_two`='ttt' `YESNO`=SSS `VAROPT`='5' `ULL`=10000000 alter table t1 change a a int complex='c,c,c'; +Warnings: +Note 1105 EXAMPLE DEBUG: Field `a` COMPLEX '(null)' -> 'c,c,c' +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL `complex`='c,c,c', + `b` int(11) DEFAULT NULL +) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `one_or_two`='ttt' `YESNO`=SSS `VAROPT`='5' `ULL`=10000000 +alter table t1 one_or_two=two; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL `complex`='c,c,c' -) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `one_or_two`='ttt' `YESNO`=SSS `ULL`=10000000 + `a` int(11) DEFAULT NULL `complex`='c,c,c', + `b` int(11) DEFAULT NULL +) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `YESNO`=SSS `VAROPT`='5' `ULL`=10000000 `one_or_two`=two drop table t1; #illegal value error SET SQL_MODE=''; @@ -162,17 +183,40 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL -) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=4660 +) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=4660 `VAROPT`='5' +SET example_varopt_default=33; select create_options from information_schema.tables where table_schema='test' and table_name='t1'; create_options -`ULL`=4660 +`ULL`=4660 `VAROPT`='5' ALTER TABLE t1 ULL=DEFAULT; +Warnings: +Note 1105 EXAMPLE DEBUG: ULL 4660 -> 4294967295 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL -) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 +) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `VAROPT`='5' DROP TABLE t1; +create table t1 (a int) engine=example; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `VAROPT`='33' +drop table t1; +create table t1 (a int) engine=example varopt=15; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `varopt`=15 +alter table t1 varopt=default; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `VAROPT`='33' +drop table t1; SET @@SQL_MODE=@OLD_SQL_MODE; select 1; 1 @@ -277,3 +321,16 @@ UNUSABLE uninstall soname 'ha_example'; select plugin_name from information_schema.plugins where plugin_library like 'ha_example%'; plugin_name +# +# MDEV-5309 - RENAME TABLE does not check for existence of the table's +# engine +# +INSTALL PLUGIN example SONAME 'ha_example'; +CREATE TABLE t1(a INT) ENGINE=EXAMPLE; +SELECT * FROM t1; +a +FLUSH TABLES; +UNINSTALL PLUGIN example; +RENAME TABLE t1 TO t2; +ERROR 42S02: Table 'test.t1' doesn't exist +DROP TABLE t1; diff --git a/mysql-test/r/plugin_auth.result b/mysql-test/r/plugin_auth.result index 8c9657f4d39..0d3948dd313 100644 --- a/mysql-test/r/plugin_auth.result +++ b/mysql-test/r/plugin_auth.result @@ -20,11 +20,11 @@ SHOW CREATE TABLE mysql.proxies_priv; Table Create Table proxies_priv CREATE TABLE `proxies_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `Proxied_user` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_user` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `With_grant` tinyint(1) NOT NULL DEFAULT '0', - `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`), KEY `Grantor` (`Grantor`) @@ -34,8 +34,6 @@ USER() CURRENT_USER() plug@localhost plug_dest@% ## test SET PASSWORD SET PASSWORD = PASSWORD('plug_dest'); -Warnings: -Note 1699 SET PASSWORD has no significance for users authenticating via plugins ## test bad credentials ERROR 28000: Access denied for user 'plug'@'localhost' (using password: YES) ## test bad default plugin : should get CR_AUTH_PLUGIN_CANNOT_LOAD @@ -114,7 +112,7 @@ ERROR 42000: There is no such grant defined for user 'grant_plug' on host '%' in grant_plug_dest_con ## testing what an ordinary user can grant this should fail : no rights to grant all -GRANT PROXY ON ''@'' TO grant_plug; +GRANT PROXY ON ''@'%%' TO grant_plug; ERROR 28000: Access denied for user 'grant_plug_dest'@'localhost' this should fail : not the same user GRANT PROXY ON grant_plug TO grant_plug_dest; @@ -137,15 +135,15 @@ ERROR 42000: You are not allowed to create a user with GRANT in default connection # test what root can grant should work : root has PROXY to all users -GRANT PROXY ON ''@'' TO grant_plug; -REVOKE PROXY ON ''@'' FROM grant_plug; +GRANT PROXY ON ''@'%%' TO grant_plug; +REVOKE PROXY ON ''@'%%' FROM grant_plug; should work : root has PROXY to all users -GRANT PROXY ON ''@'' TO proxy_admin IDENTIFIED BY 'test' +GRANT PROXY ON ''@'%%' TO proxy_admin IDENTIFIED BY 'test' WITH GRANT OPTION; need USAGE : PROXY doesn't contain it. GRANT USAGE on *.* TO proxy_admin; in proxy_admin_con; -should work : proxy_admin has proxy to ''@'' +should work : proxy_admin has proxy to ''@'%%' GRANT PROXY ON future_user TO grant_plug; in default connection SHOW GRANTS FOR grant_plug; @@ -232,25 +230,25 @@ DROP USER plug_dest; # Bug #56798 : Wrong credentials assigned when using a proxy user. # GRANT ALL PRIVILEGES ON *.* TO power_user; -GRANT USAGE ON anonymous_db.* TO ''@'' +GRANT USAGE ON anonymous_db.* TO ''@'%%' IDENTIFIED WITH 'test_plugin_server' AS 'power_user'; -GRANT PROXY ON power_user TO ''@''; +GRANT PROXY ON power_user TO ''@'%%'; CREATE DATABASE confidential_db; SELECT user(),current_user(),@@proxy_user; user() current_user() @@proxy_user -test_login_user@localhost power_user@% ''@'' +test_login_user@localhost power_user@% ''@'%%' DROP USER power_user; -DROP USER ''@''; +DROP USER ''@'%%'; DROP DATABASE confidential_db; # Test case #2 (crash with double grant proxy) -CREATE USER ''@'' IDENTIFIED WITH 'test_plugin_server' AS 'standard_user'; +CREATE USER ''@'%%' IDENTIFIED WITH 'test_plugin_server' AS 'standard_user'; CREATE USER standard_user; CREATE DATABASE shared; GRANT ALL PRIVILEGES ON shared.* TO standard_user; -GRANT PROXY ON standard_user TO ''@''; +GRANT PROXY ON standard_user TO ''@'%%'; #should not crash -GRANT PROXY ON standard_user TO ''@''; -DROP USER ''@''; +GRANT PROXY ON standard_user TO ''@'%%'; +DROP USER ''@'%%'; DROP USER standard_user; DROP DATABASE shared; # @@ -423,8 +421,6 @@ SELECT USER(),CURRENT_USER(); USER() CURRENT_USER() bug12818542@localhost bug12818542_dest@localhost SET PASSWORD = PASSWORD('bruhaha'); -Warnings: -Note 1699 SET PASSWORD has no significance for users authenticating via plugins SELECT USER(),CURRENT_USER(); USER() CURRENT_USER() bug12818542@localhost bug12818542_dest@localhost diff --git a/mysql-test/r/plugin_auth_qa.result b/mysql-test/r/plugin_auth_qa.result index 72d21994792..b86a01f6b52 100644 --- a/mysql-test/r/plugin_auth_qa.result +++ b/mysql-test/r/plugin_auth_qa.result @@ -303,7 +303,7 @@ grant_user test_plugin_server plug_dest CREATE USER plug_dest; DROP USER plug_dest; GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest; -ERROR 42000: Can't find any matching row in the user table +ERROR 28000: Can't find any matching row in the user table DROP USER grant_user; GRANT INSERT ON test_user_db.* TO grant_user IDENTIFIED WITH test_plugin_server AS 'plug_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; diff --git a/mysql-test/r/plugin_auth_qa_1.result b/mysql-test/r/plugin_auth_qa_1.result index d700be36ac0..44b5a88de1e 100644 --- a/mysql-test/r/plugin_auth_qa_1.result +++ b/mysql-test/r/plugin_auth_qa_1.result @@ -186,7 +186,7 @@ connection default; disconnect plug_user; DROP USER new_user,new_dest,plug_dest; ========== test 2, 2.1, 2.2 ================================ -CREATE USER ''@'' IDENTIFIED WITH test_plugin_server AS 'proxied_user'; +CREATE USER ''@'%%' IDENTIFIED WITH test_plugin_server AS 'proxied_user'; CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string @@ -204,7 +204,7 @@ connection default; disconnect proxy_con; connect(proxy_con,localhost,proxy_user,proxied_user); ERROR 28000: Access denied for user 'proxy_user'@'localhost' (using password: YES) -GRANT PROXY ON proxied_user TO ''@''; +GRANT PROXY ON proxied_user TO ''@'%%'; connect(proxy_con,localhost,proxied_user,proxied_user_passwd); SELECT USER(),CURRENT_USER(); USER() CURRENT_USER() @@ -218,11 +218,11 @@ proxy_user@localhost proxied_user@% ========== test 2.2.1 ====================================== SELECT @@proxy_user; @@proxy_user -''@'' +''@'%%' connection default; disconnect proxy_con; -DROP USER ''@'',proxied_user; -GRANT ALL PRIVILEGES ON test_user_db.* TO ''@'' +DROP USER ''@'%%',proxied_user; +GRANT ALL PRIVILEGES ON test_user_db.* TO ''@'%%' IDENTIFIED WITH test_plugin_server AS 'proxied_user'; CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; @@ -240,7 +240,7 @@ connection default; disconnect proxy_con; connect(proxy_con,localhost,proxy_user,proxied_user); ERROR 28000: Access denied for user 'proxy_user'@'localhost' (using password: YES) -GRANT PROXY ON proxied_user TO ''@''; +GRANT PROXY ON proxied_user TO ''@'%%'; connect(proxy_con,localhost,proxied_user,proxied_user_passwd); SELECT USER(),CURRENT_USER(); USER() CURRENT_USER() @@ -253,21 +253,21 @@ USER() CURRENT_USER() proxy_user@localhost proxied_user@% SELECT @@proxy_user; @@proxy_user -''@'' +''@'%%' connection default; disconnect proxy_con; -DROP USER ''@'',proxied_user; -CREATE USER ''@'' IDENTIFIED WITH test_plugin_server AS 'proxied_user'; +DROP USER ''@'%%',proxied_user; +CREATE USER ''@'%%' IDENTIFIED WITH test_plugin_server AS 'proxied_user'; CREATE USER proxied_user_1 IDENTIFIED BY 'proxied_user_1_pwd'; CREATE USER proxied_user_2 IDENTIFIED BY 'proxied_user_2_pwd'; CREATE USER proxied_user_3 IDENTIFIED BY 'proxied_user_3_pwd'; CREATE USER proxied_user_4 IDENTIFIED BY 'proxied_user_4_pwd'; CREATE USER proxied_user_5 IDENTIFIED BY 'proxied_user_5_pwd'; -GRANT PROXY ON proxied_user_1 TO ''@''; -GRANT PROXY ON proxied_user_2 TO ''@''; -GRANT PROXY ON proxied_user_3 TO ''@''; -GRANT PROXY ON proxied_user_4 TO ''@''; -GRANT PROXY ON proxied_user_5 TO ''@''; +GRANT PROXY ON proxied_user_1 TO ''@'%%'; +GRANT PROXY ON proxied_user_2 TO ''@'%%'; +GRANT PROXY ON proxied_user_3 TO ''@'%%'; +GRANT PROXY ON proxied_user_4 TO ''@'%%'; +GRANT PROXY ON proxied_user_5 TO ''@'%%'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string test_plugin_server proxied_user @@ -322,7 +322,7 @@ disconnect proxy_con_2; disconnect proxy_con_3; disconnect proxy_con_4; disconnect proxy_con_5; -DROP USER ''@'',proxied_user_1,proxied_user_2,proxied_user_3,proxied_user_4,proxied_user_5; +DROP USER ''@'%%',proxied_user_1,proxied_user_2,proxied_user_3,proxied_user_4,proxied_user_5; ========== test 3 ========================================== GRANT ALL PRIVILEGES ON *.* TO plug_user IDENTIFIED WITH test_plugin_server AS 'plug_dest'; diff --git a/mysql-test/r/plugin_auth_qa_3.result b/mysql-test/r/plugin_auth_qa_3.result index dd4fb76ff8d..62a37a21478 100644 --- a/mysql-test/r/plugin_auth_qa_3.result +++ b/mysql-test/r/plugin_auth_qa_3.result @@ -6,6 +6,6 @@ exec MYSQL --default_auth=qa_auth_client -h localhost -P MASTER_MYPORT -u qa_tes current_user() user() @@local.proxy_user @@local.external_user qa_test_11_dest@% qa_test_11_user@localhost 'qa_test_11_user'@'%' NULL exec MYSQL --default_auth=qa_auth_client -h localhost -P MASTER_MYPORT -u qa_test_2_user --password=qa_test_11_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 -ERROR 1045 (28000): Access denied for user 'qa_test_2_user'@'localhost' (using password: NO) +ERROR 1045 (28000): Access denied for user 'qa_test_2_user'@'localhost' (using password: YES) DROP USER qa_test_11_user, qa_test_11_dest; DROP DATABASE test_user_db; diff --git a/mysql-test/r/plugin_load.result b/mysql-test/r/plugin_load.result index 33116cc20ab..35bacf670a5 100644 --- a/mysql-test/r/plugin_load.result +++ b/mysql-test/r/plugin_load.result @@ -1,3 +1,10 @@ SELECT @@global.example_enum_var = 'e2'; @@global.example_enum_var = 'e2' 1 +select plugin_name, plugin_status from information_schema.plugins +where plugin_name in ('SIMPLE_PARSER', 'EXAMPLE', +'DAEMON_EXAMPLE', 'TWO_QUESTIONS', 'THREE_ATTEMPTS'); +plugin_name plugin_status +EXAMPLE ACTIVE +daemon_example ACTIVE +simple_parser ACTIVE diff --git a/mysql-test/r/pool_of_threads.result b/mysql-test/r/pool_of_threads.result index f153ebc48f4..ddc451516e2 100644 --- a/mysql-test/r/pool_of_threads.result +++ b/mysql-test/r/pool_of_threads.result @@ -510,7 +510,7 @@ insert into tmp select * from t3; insert into t3 select * from tmp; alter table t3 add t2nr int not null auto_increment primary key first; drop table tmp; -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10; namn Abraham Abraham @@ -523,7 +523,7 @@ ammonium ammonium analyzable analyzable animals animals animized animized -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10; concat(fld3," ",fld3) Abraham Abraham @@ -560,7 +560,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10; fld3 count(*) affixed 1 @@ -573,7 +573,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10; fld3 repeat("a",length(fld3)) count(*) circus aaaaaa 1 diff --git a/mysql-test/r/profiling.result b/mysql-test/r/profiling.result index 6292cd085e4..4c531a8a5f7 100644 --- a/mysql-test/r/profiling.result +++ b/mysql-test/r/profiling.result @@ -123,8 +123,8 @@ select query_id, count(*), sum(duration) from information_schema.profiling group select CPU_user, CPU_system, Context_voluntary, Context_involuntary, Block_ops_in, Block_ops_out, Messages_sent, Messages_received, Page_faults_major, Page_faults_minor, Swaps, Source_function, Source_file, Source_line from information_schema.profiling; drop table if exists t1, t2, t3; Warnings: -Note 1051 Unknown table 't2' -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t2' +Note 1051 Unknown table 'test.t3' create table t1 (id int ); create table t2 (id int not null); create table t3 (id int not null primary key); @@ -309,7 +309,7 @@ select @@profiling; set session profiling = OFF; drop table if exists profile_log; Warnings: -Note 1051 Unknown table 'profile_log' +Note 1051 Unknown table 'test.profile_log' create table profile_log (how_many int); drop procedure if exists p1; drop procedure if exists p2; diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 3fed0a5b0d1..8394eab0e40 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -51,7 +51,7 @@ execute stmt4; prepare stmt4 from 'drop table t2'; execute stmt4; execute stmt4; -ERROR 42S02: Unknown table 't2' +ERROR 42S02: Unknown table 'test.t2' prepare stmt5 from 'select ? + a from t1'; set @a=1; execute stmt5 using @a; @@ -526,7 +526,7 @@ FOUND_ROWS() deallocate prepare stmt; drop table if exists t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' create table t1 (c1 int(11) not null, c2 int(11) not null, primary key (c1,c2), key c2 (c2), key c1 (c1)); insert into t1 values (200887, 860); @@ -613,8 +613,8 @@ insert into t2 values ("1", "1", "sup", "0"), ("2", "1", "sup", "1"), ("4", "1", "sup", "0"); create table t3 ( id int(11) not null default '0', -preceeding_id int(11) not null default '0', -primary key (id,preceeding_id) +preceding_id int(11) not null default '0', +primary key (id,preceding_id) ); create table t4 ( user_id varchar(50) not null, @@ -625,7 +625,7 @@ insert into t4 values("nicke", "imp"); prepare stmt from 'select distinct t1.partner_id from t1 left join t3 on t1.id = t3.id - left join t1 pp on pp.id = t3.preceeding_id + left join t1 pp on pp.id = t3.preceding_id where exists ( select * @@ -1201,13 +1201,13 @@ SET @aux= "SELECT COUNT(*) prepare my_stmt from @aux; execute my_stmt; COUNT(*) -42 +44 execute my_stmt; COUNT(*) -42 +44 execute my_stmt; COUNT(*) -42 +44 deallocate prepare my_stmt; drop procedure if exists p1| drop table if exists t1| @@ -2799,48 +2799,48 @@ drop table if exists t2; create procedure proc_1() show warnings; drop table if exists t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' call proc_1(); Level Code Message -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' drop table if exists t2; Warnings: -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t2' call proc_1(); Level Code Message -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t2' drop table if exists t1, t2; Warnings: -Note 1051 Unknown table 't1' -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t1' +Note 1051 Unknown table 'test.t2' call proc_1(); Level Code Message -Note 1051 Unknown table 't1' -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t1' +Note 1051 Unknown table 'test.t2' drop procedure proc_1; create function func_1() returns int begin show warnings; return 1; end| ERROR 0A000: Not allowed to return a result set from a function prepare abc from "show warnings"; drop table if exists t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' execute abc; Level Code Message -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' drop table if exists t2; Warnings: -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t2' execute abc; Level Code Message -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t2' drop table if exists t1, t2; Warnings: -Note 1051 Unknown table 't1' -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t1' +Note 1051 Unknown table 'test.t2' execute abc; Level Code Message -Note 1051 Unknown table 't1' -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t1' +Note 1051 Unknown table 'test.t2' deallocate prepare abc; set @my_password="password"; set @my_data="clear text to encode"; @@ -2926,7 +2926,7 @@ i j DROP TABLE t1, t2; drop table if exists t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' prepare stmt from "create table t1 (c char(100) character set utf8, key (c(10)))"; execute stmt; @@ -3949,6 +3949,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -3963,6 +3964,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -3977,6 +3979,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 8 @@ -3991,6 +3994,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -4138,6 +4142,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 1 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -4152,6 +4157,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 1 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result index cc31944fd1f..a1bcf734b31 100644 --- a/mysql-test/r/ps_1general.result +++ b/mysql-test/r/ps_1general.result @@ -325,10 +325,10 @@ drop table if exists t5; prepare stmt1 from ' drop table if exists t5 ' ; execute stmt1 ; Warnings: -Note 1051 Unknown table 't5' +Note 1051 Unknown table 'test.t5' prepare stmt1 from ' drop table t5 ' ; execute stmt1 ; -ERROR 42S02: Unknown table 't5' +ERROR 42S02: Unknown table 'test.t5' prepare stmt1 from ' SELECT @@version ' ; execute stmt1 ; @@version @@ -533,7 +533,7 @@ drop table t2; prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ; create table t5 (a int) ; execute stmt1 ; -ERROR HY000: Can't find file: './test/t7' (errno: 2) +ERROR 42S02: Table 'test.t7' doesn't exist create table t7 (a int) ; execute stmt1 ; execute stmt1 ; diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index 1c3c2de764b..6ca76191db5 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.result @@ -3256,7 +3256,7 @@ values ( 50, 1.0e+10, 1.0e+10, 1.0e+10, 1.0e+10, 1.0e+10 ) ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3264,7 +3264,7 @@ values ( 51, @arg00, @arg00, @arg00, @arg00, @arg00) ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 prepare stmt1 from "insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3273,7 +3273,7 @@ values execute stmt1 ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 prepare stmt2 from "insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3282,7 +3282,7 @@ values execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 set @arg00= 'abc' ; set @arg00= NULL ; diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index 8b4b6daa108..47237790ae5 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -3239,7 +3239,7 @@ values ( 50, 1.0e+10, 1.0e+10, 1.0e+10, 1.0e+10, 1.0e+10 ) ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3247,7 +3247,7 @@ values ( 51, @arg00, @arg00, @arg00, @arg00, @arg00) ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 prepare stmt1 from "insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3256,7 +3256,7 @@ values execute stmt1 ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 prepare stmt2 from "insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3265,7 +3265,7 @@ values execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 set @arg00= 'abc' ; set @arg00= NULL ; diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index 0ea54a45afa..57532797dd7 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -3240,7 +3240,7 @@ values ( 50, 1.0e+10, 1.0e+10, 1.0e+10, 1.0e+10, 1.0e+10 ) ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3248,7 +3248,7 @@ values ( 51, @arg00, @arg00, @arg00, @arg00, @arg00) ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 prepare stmt1 from "insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3257,7 +3257,7 @@ values execute stmt1 ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 prepare stmt2 from "insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3266,7 +3266,7 @@ values execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 set @arg00= 'abc' ; set @arg00= NULL ; diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index 2fc9475e926..9a9f457a212 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -3176,7 +3176,7 @@ values ( 50, 1.0e+10, 1.0e+10, 1.0e+10, 1.0e+10, 1.0e+10 ) ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3184,7 +3184,7 @@ values ( 51, @arg00, @arg00, @arg00, @arg00, @arg00) ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 prepare stmt1 from "insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3193,7 +3193,7 @@ values execute stmt1 ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 prepare stmt2 from "insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3202,7 +3202,7 @@ values execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 set @arg00= 'abc' ; set @arg00= NULL ; @@ -6530,7 +6530,7 @@ values ( 50, 1.0e+10, 1.0e+10, 1.0e+10, 1.0e+10, 1.0e+10 ) ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -6538,7 +6538,7 @@ values ( 51, @arg00, @arg00, @arg00, @arg00, @arg00) ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 prepare stmt1 from "insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -6547,7 +6547,7 @@ values execute stmt1 ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 prepare stmt2 from "insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -6556,7 +6556,7 @@ values execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1265 Data truncated for column 'c16' at row 1 +Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 set @arg00= 'abc' ; set @arg00= NULL ; diff --git a/mysql-test/r/ps_ddl.result b/mysql-test/r/ps_ddl.result index 5f156c170a4..dec0d12c455 100644 --- a/mysql-test/r/ps_ddl.result +++ b/mysql-test/r/ps_ddl.result @@ -356,25 +356,24 @@ a drop view v1; create view v1 as select a from t2; set @var=8; -# XXX: bug, the SQL statement in the trigger is still -# pointing at table 't3', since the view was expanded -# at first statement execution. -# Since the view definition is inlined in the statement -# at prepare, changing the view definition does not cause -# repreparation. -# Repreparation of the main statement doesn't cause repreparation +# View in the INSERT-statement in the trigger is still pointing to +# table 't3', because the trigger hasn't noticed the change +# in view definition. This will be fixed by WL#4179. +# +# The prepared INSERT-statement however does notice the change, +# but repreparation of the main statement doesn't cause repreparation # of trigger statements. +# +# The following EXECUTE results in ER_NO_SUCH_TABLE (t3) error, because +# pre-locking list of the prepared statement has been changed +# (the prepared statement has noticed the meta-data change), +# but the trigger still tries to deal with 't3', which is not opened. +# That's why '8' is not inserted neither into 't2', nor into 't3'. execute stmt using @var; -call p_verify_reprepare_count(0); +ERROR 42S02: Table 'test.t3' doesn't exist +call p_verify_reprepare_count(1); SUCCESS -# -# Sic: the insert went into t3, even though the view now -# points at t2. This is because neither the merged view -# nor its prelocking list are affected by view DDL -# The binary log is of course wrong, since it is not -# using prepared statements -# select * from t2; a 5 @@ -382,7 +381,6 @@ select * from t3; a 6 7 -8 flush table t1; set @var=9; execute stmt using @var; @@ -397,7 +395,6 @@ select * from t3; a 6 7 -8 drop view v1; drop table t1,t2,t3; # Test 7-d: dependent TABLE has changed @@ -817,17 +814,14 @@ a b c 10 20 50 20 40 100 30 60 150 -# Currently a different result from conventional statements. -# A view is inlined once at prepare, later on view DDL -# does not affect prepared statement and it is not re-prepared. -# This is reported in Bug#36002 Prepared statements: if a view -# used in a statement is replaced, bad data +# This is actually a test case for Bug#11748352 (36002 Prepared +# statements: if a view used in a statement is replaced, bad data). execute stmt; a b c -10 20 30 -20 40 60 -30 60 90 -call p_verify_reprepare_count(0); +10 20 50 +20 40 100 +30 60 150 +call p_verify_reprepare_count(1); SUCCESS flush table t2; @@ -839,9 +833,200 @@ a b c call p_verify_reprepare_count(1); SUCCESS +# Check that we properly handle ALTER VIEW statements. +execute stmt; +a b c +10 20 50 +20 40 100 +30 60 150 +call p_verify_reprepare_count(0); +SUCCESS + +alter view t1 as select a, 3*a as b, 4*a as c from t2; +execute stmt; +a b c +10 30 40 +20 60 80 +30 90 120 +call p_verify_reprepare_count(1); +SUCCESS + +execute stmt; +a b c +10 30 40 +20 60 80 +30 90 120 +call p_verify_reprepare_count(0); +SUCCESS + +execute stmt; +a b c +10 30 40 +20 60 80 +30 90 120 +call p_verify_reprepare_count(0); +SUCCESS + +select * from t1; +a b c +10 30 40 +20 60 80 +30 90 120 +# Check that DROP & CREATE is properly handled under LOCK TABLES. +drop view t1; +flush tables; +create view t1 as select a, 5*a as b, 6*a as c from t2; +lock tables t1 read, t2 read; +execute stmt; +a b c +10 50 60 +20 100 120 +30 150 180 +call p_verify_reprepare_count(1); +SUCCESS + +execute stmt; +a b c +10 50 60 +20 100 120 +30 150 180 +call p_verify_reprepare_count(0); +SUCCESS + +execute stmt; +a b c +10 50 60 +20 100 120 +30 150 180 +call p_verify_reprepare_count(0); +SUCCESS + +unlock tables; +# ... and once again... +drop view t1; +create view t1 as select a, 6*a as b, 7*a as c from t2; +lock tables t1 read, t2 read; +execute stmt; +a b c +10 60 70 +20 120 140 +30 180 210 +call p_verify_reprepare_count(1); +SUCCESS + +execute stmt; +a b c +10 60 70 +20 120 140 +30 180 210 +call p_verify_reprepare_count(0); +SUCCESS + +execute stmt; +a b c +10 60 70 +20 120 140 +30 180 210 +call p_verify_reprepare_count(0); +SUCCESS + +unlock tables; +# Check that ALTER VIEW is properly handled under LOCK TABLES. +alter view t1 as select a, 7*a as b, 8*a as c from t2; +lock tables t1 read, t2 read; +execute stmt; +a b c +10 70 80 +20 140 160 +30 210 240 +call p_verify_reprepare_count(1); +SUCCESS + +execute stmt; +a b c +10 70 80 +20 140 160 +30 210 240 +call p_verify_reprepare_count(0); +SUCCESS + +execute stmt; +a b c +10 70 80 +20 140 160 +30 210 240 +call p_verify_reprepare_count(0); +SUCCESS + +unlock tables; drop table t2; drop view t1; deallocate prepare stmt; +# Check that DROP & CREATE is properly handled under LOCK TABLES when +# LOCK TABLES does not contain the complete set of views. +create table t1(a int); +insert into t1 values (1), (2), (3); +create view v1 as select a from t1; +lock tables t1 read, v1 read; +prepare stmt from 'select * from v1'; +execute stmt; +a +1 +2 +3 +call p_verify_reprepare_count(0); +SUCCESS + +execute stmt; +a +1 +2 +3 +call p_verify_reprepare_count(0); +SUCCESS + +unlock tables; +drop view v1; +create view v1 as select 2*a from t1; +lock tables t1 read; +execute stmt; +ERROR HY000: Table 'v1' was not locked with LOCK TABLES +unlock tables; +drop table t1; +drop view v1; +deallocate prepare stmt; +# Check that ALTER VIEW is properly handled under LOCK TABLES when +# LOCK TABLES does not contain the complete set of views. +create table t1(a int); +insert into t1 values (1), (2), (3); +create view v1 as select a from t1; +lock tables t1 read, v1 read; +prepare stmt from 'select * from v1'; +execute stmt; +a +1 +2 +3 +call p_verify_reprepare_count(0); +SUCCESS + +execute stmt; +a +1 +2 +3 +call p_verify_reprepare_count(0); +SUCCESS + +unlock tables; +alter view v1 as select 2*a from t1; +lock tables t1 read; +execute stmt; +ERROR HY000: Table 'v1' was not locked with LOCK TABLES +unlock tables; +drop table t1; +drop view v1; +deallocate prepare stmt; ===================================================================== Part 18: VIEW -> VIEW (VIEW dependencies) transitions ===================================================================== @@ -939,15 +1124,15 @@ drop view v2; create view v2 as select a from t2; execute stmt; a -1 -2 -3 +4 +5 +6 execute stmt; a -1 -2 -3 -call p_verify_reprepare_count(0); +4 +5 +6 +call p_verify_reprepare_count(1); SUCCESS flush table t1; @@ -956,7 +1141,7 @@ a 4 5 6 -call p_verify_reprepare_count(1); +call p_verify_reprepare_count(0); SUCCESS execute stmt; @@ -1745,7 +1930,7 @@ SUCCESS execute stmt; ERROR 42S01: Table 't2' already exists -call p_verify_reprepare_count(1); +call p_verify_reprepare_count(0); SUCCESS execute stmt; @@ -1761,7 +1946,7 @@ SUCCESS execute stmt; ERROR 42S01: Table 't2' already exists -call p_verify_reprepare_count(1); +call p_verify_reprepare_count(0); SUCCESS drop temporary table t2; @@ -1779,7 +1964,7 @@ drop table t2; create view t2 as select 1; execute stmt; Got one of the listed errors -call p_verify_reprepare_count(1); +call p_verify_reprepare_count(0); SUCCESS execute stmt; @@ -2317,3 +2502,43 @@ drop procedure if exists p_verify_reprepare_count; drop procedure if exists p1; drop function if exists f1; drop view if exists v1, v2; +# +# Additional coverage for refactoring which was made as part of work +# on bug '27480: Extend CREATE TEMPORARY TABLES privilege to allow +# temp table operations'. +# +# Check that we don't try to pre-open temporary tables for the elements +# from prelocking list, as this can lead to unwarranted ER_CANT_REOPEN +# errors. +DROP TABLE IF EXISTS t1, tm; +CREATE TABLE t1 (a INT); +CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW +SET @a:= (SELECT COUNT(*) FROM t1); +# Prelocking list for the below statement should +# contain t1 twice - once for the INSERT and once +# SELECT from the trigger. +PREPARE stmt1 FROM 'INSERT INTO t1 VALUES (1)'; +EXECUTE stmt1; +# Create temporary table which will shadow t1. +CREATE TEMPORARY TABLE t1 (b int); +# The below execution of statement should not fail with ER_CANT_REOPEN +# error. Instead stmt1 should be auto-matically reprepared and succeed. +EXECUTE stmt1; +DEALLOCATE PREPARE stmt1; +DROP TEMPORARY TABLE t1; +DROP TABLE t1; +# +# Also check that we properly reset table list elements from UNION +# clause of CREATE TABLE and ALTER TABLE statements. +# +CREATE TEMPORARY TABLE t1 (i INT); +PREPARE stmt2 FROM 'CREATE TEMPORARY TABLE tm (i INT) ENGINE=MERGE UNION=(t1)'; +EXECUTE stmt2; +DROP TEMPORARY TABLE tm; +EXECUTE stmt2; +DEALLOCATE PREPARE stmt2; +PREPARE stmt3 FROM 'ALTER TABLE tm UNION=(t1)'; +EXECUTE stmt3; +EXECUTE stmt3; +DEALLOCATE PREPARE stmt3; +DROP TEMPORARY TABLES tm, t1; diff --git a/mysql-test/r/ps_ddl1.result b/mysql-test/r/ps_ddl1.result index 87abcd90590..667cbed8a7a 100644 --- a/mysql-test/r/ps_ddl1.result +++ b/mysql-test/r/ps_ddl1.result @@ -420,7 +420,7 @@ call p_verify_reprepare_count(0); SUCCESS execute stmt; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' call p_verify_reprepare_count(0); SUCCESS diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 862e7e0d8df..118c6785136 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -652,14 +652,14 @@ select * from t1; a 1 2 -SET OPTION SQL_SELECT_LIMIT=1; +SET SQL_SELECT_LIMIT=1; select * from t1; a 1 show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 2 -SET OPTION SQL_SELECT_LIMIT=DEFAULT; +SET SQL_SELECT_LIMIT=DEFAULT; drop table t1; flush query cache; reset query cache; @@ -2078,6 +2078,51 @@ drop table t1; set GLOBAL query_cache_size=1355776; SET GLOBAL userstat=default; End of 5.5 tests +# +# Bug#12977203: SERVER CRASH ON A DERIVED TABLE WITH QUERY CACHE ENABLED +# +SET @qc= @@query_cache_size; +SET GLOBAL query_cache_size=1355776; +CREATE TABLE t1 (f1 blob); +SELECT COUNT(*) FROM (SELECT * FROM t1 ) tt; +COUNT(*) +0 +DROP TABLE t1; +SET GLOBAL query_cache_size= @qc; +# +# MDEV-617 LP:671189 - Query cache is not used for tables or +# databases with dots in their names +# +CREATE DATABASE `foo.bar`; +use `foo.bar`; +flush status; +CREATE TABLE moocow (a int); +INSERT INTO moocow VALUES (1), (2), (3); +SHOW STATUS LIKE 'Qcache_inserts'; +Variable_name Value +Qcache_inserts 0 +SELECT * FROM moocow; +a +1 +2 +3 +SHOW STATUS LIKE 'Qcache_inserts'; +Variable_name Value +Qcache_inserts 1 +SHOW STATUS LIKE 'Qcache_hits'; +Variable_name Value +Qcache_hits 0 +SELECT * FROM moocow; +a +1 +2 +3 +SHOW STATUS LIKE 'Qcache_hits'; +Variable_name Value +Qcache_hits 1 +use test; +drop database `foo.bar`; +End of 10.0 tests restore defaults SET GLOBAL query_cache_type= default; SET GLOBAL query_cache_size= default; diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index 630a692cef6..51e4e313eac 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -221,27 +221,27 @@ update t1 set y=x; explain select * from t1, t1 t2 where t1.y = 8 and t2.x between 7 and t1.y+0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 -1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Using join buffer (flat, BNL join) +1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Using where; Using join buffer (flat, BNL join) explain select * from t1, t1 t2 where t1.y = 8 and t2.x >= 7 and t2.x <= t1.y+0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 -1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Using join buffer (flat, BNL join) +1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Using where; Using join buffer (flat, BNL join) explain select * from t1, t1 t2 where t1.y = 2 and t2.x between t1.y-1 and t1.y+1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 -1 SIMPLE t2 range x x 5 NULL 3 Using index condition; Using join buffer (flat, BNL join) +1 SIMPLE t2 range x x 5 NULL 3 Using index condition; Using where; Using join buffer (flat, BNL join) explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= t1.y-1 and t2.x <= t1.y+1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 -1 SIMPLE t2 range x x 5 NULL 3 Using index condition; Using join buffer (flat, BNL join) +1 SIMPLE t2 range x x 5 NULL 3 Using index condition; Using where; Using join buffer (flat, BNL join) explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 0 and t1.y; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 -1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Using join buffer (flat, BNL join) +1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Using where; Using join buffer (flat, BNL join) explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 0 and t2.x <= t1.y; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 -1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Using join buffer (flat, BNL join) +1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Using where; Using join buffer (flat, BNL join) explain select count(*) from t1 where x in (1); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref x x 5 const 1 Using index @@ -2052,7 +2052,7 @@ DROP VIEW v3; SET NAMES utf8; DROP TABLE IF EXISTS t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE t1( id int AUTO_INCREMENT, fd varchar(20), @@ -2144,3 +2144,99 @@ value1 1000685 12345 value1 1003560 12345 value1 1004807 12345 drop table t1; +# +# BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE +# +CREATE TABLE t1 (pk INT PRIMARY KEY); +INSERT INTO t1 VALUES (1),(3),(5); +SELECT * FROM t1 WHERE pk <> 3 OR pk < 4; +pk +1 +3 +5 +DROP TABLE t1; +# +# BUG#13803810: TOO FEW ROWS RETURNED FOR RANGE ACCESS IN +# VARCHAR INDEX USING DATETIME VALUE + +CREATE TABLE t1 (a DATETIME); +INSERT INTO t1 VALUES ('2001-01-01 00:00:00'); +INSERT INTO t1 VALUES ('2001-01-01 11:22:33'); +CREATE TABLE t2 (b VARCHAR(64), KEY (b)); +INSERT INTO t2 VALUES ('2001-01-01'); +INSERT INTO t2 VALUES ('2001.01.01'); +INSERT INTO t2 VALUES ('2001#01#01'); +INSERT INTO t2 VALUES ('2001-01-01 00:00:00'); +INSERT INTO t2 VALUES ('2001-01-01 11:22:33'); + +# range/ref access cannot be used for this query + +EXPLAIN SELECT * FROM t2 WHERE b=CAST('2001-01-01' AS DATE); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index b b 67 NULL 5 Using where; Using index +SELECT * FROM t2 WHERE b=CAST('2001-01-01' AS DATE); +b +2001#01#01 +2001-01-01 +2001-01-01 00:00:00 +2001.01.01 + +# range/ref access cannot be used for any of the queries below. +# See BUG#13814468 about 'Range checked for each record' + +EXPLAIN SELECT * FROM t1, t2 WHERE a=b ORDER BY BINARY a, BINARY b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort +1 SIMPLE t2 ALL b NULL NULL NULL 5 Range checked for each record (index map: 0x1) +SELECT * FROM t1, t2 WHERE a=b ORDER BY BINARY a, BINARY b; +a b +2001-01-01 00:00:00 2001#01#01 +2001-01-01 00:00:00 2001-01-01 +2001-01-01 00:00:00 2001-01-01 00:00:00 +2001-01-01 00:00:00 2001.01.01 +2001-01-01 11:22:33 2001-01-01 11:22:33 + +EXPLAIN SELECT * FROM t1, t2 WHERE b=a ORDER BY BINARY a, BINARY b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort +1 SIMPLE t2 ALL b NULL NULL NULL 5 Range checked for each record (index map: 0x1) +SELECT * FROM t1, t2 WHERE b=a ORDER BY BINARY a, BINARY b; +a b +2001-01-01 00:00:00 2001#01#01 +2001-01-01 00:00:00 2001-01-01 +2001-01-01 00:00:00 2001-01-01 00:00:00 +2001-01-01 00:00:00 2001.01.01 +2001-01-01 11:22:33 2001-01-01 11:22:33 + +DROP TABLE t1,t2; +# +# MDEV-5606: range optimizer: "x < y" is sargable, while "y > x" is not +# +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2(a int); +insert into t2 select A.a + B.a* 10 + C.a * 100 from t1 A, t1 B, t1 C; +alter table t2 add key(a); +# Should have "range checked for each table" for second table: +explain select * from t1, t2 where t2.a < t1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 +1 SIMPLE t2 ALL a NULL NULL NULL 1000 Range checked for each record (index map: 0x1) +# Should have "range checked for each table" for second table: +explain select * from t1, t2 where t1.a > t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 +1 SIMPLE t2 ALL a NULL NULL NULL 1000 Range checked for each record (index map: 0x1) +create table t3 (a int primary key, b int); +insert into t3 select a,a from t1; +# The second table should use 'range': +explain select * from t3, t2 where t2.a < t3.b and t3.a=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 const PRIMARY PRIMARY 4 const 1 +1 SIMPLE t2 range a a 5 NULL 1 Using where; Using index +# The second table should use 'range': +explain select * from t3, t2 where t3.b > t2.a and t3.a=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 const PRIMARY PRIMARY 4 const 1 +1 SIMPLE t2 range a a 5 NULL 1 Using where; Using index +drop table t1,t2,t3; diff --git a/mysql-test/r/range_mrr_icp.result b/mysql-test/r/range_mrr_icp.result index 3f5de5b0189..16c0825b2e2 100644 --- a/mysql-test/r/range_mrr_icp.result +++ b/mysql-test/r/range_mrr_icp.result @@ -223,27 +223,27 @@ update t1 set y=x; explain select * from t1, t1 t2 where t1.y = 8 and t2.x between 7 and t1.y+0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 -1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Rowid-ordered scan; Using join buffer (flat, BNL join) +1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using join buffer (flat, BNL join) explain select * from t1, t1 t2 where t1.y = 8 and t2.x >= 7 and t2.x <= t1.y+0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 -1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Rowid-ordered scan; Using join buffer (flat, BNL join) +1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using join buffer (flat, BNL join) explain select * from t1, t1 t2 where t1.y = 2 and t2.x between t1.y-1 and t1.y+1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 -1 SIMPLE t2 range x x 5 NULL 3 Using index condition; Rowid-ordered scan; Using join buffer (flat, BNL join) +1 SIMPLE t2 range x x 5 NULL 3 Using index condition; Using where; Rowid-ordered scan; Using join buffer (flat, BNL join) explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= t1.y-1 and t2.x <= t1.y+1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 -1 SIMPLE t2 range x x 5 NULL 3 Using index condition; Rowid-ordered scan; Using join buffer (flat, BNL join) +1 SIMPLE t2 range x x 5 NULL 3 Using index condition; Using where; Rowid-ordered scan; Using join buffer (flat, BNL join) explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 0 and t1.y; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 -1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Rowid-ordered scan; Using join buffer (flat, BNL join) +1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using join buffer (flat, BNL join) explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 0 and t2.x <= t1.y; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 -1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Rowid-ordered scan; Using join buffer (flat, BNL join) +1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using join buffer (flat, BNL join) explain select count(*) from t1 where x in (1); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref x x 5 const 1 Using index @@ -2054,7 +2054,7 @@ DROP VIEW v3; SET NAMES utf8; DROP TABLE IF EXISTS t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE t1( id int AUTO_INCREMENT, fd varchar(20), @@ -2146,4 +2146,100 @@ value1 1000685 12345 value1 1003560 12345 value1 1004807 12345 drop table t1; +# +# BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE +# +CREATE TABLE t1 (pk INT PRIMARY KEY); +INSERT INTO t1 VALUES (1),(3),(5); +SELECT * FROM t1 WHERE pk <> 3 OR pk < 4; +pk +1 +3 +5 +DROP TABLE t1; +# +# BUG#13803810: TOO FEW ROWS RETURNED FOR RANGE ACCESS IN +# VARCHAR INDEX USING DATETIME VALUE + +CREATE TABLE t1 (a DATETIME); +INSERT INTO t1 VALUES ('2001-01-01 00:00:00'); +INSERT INTO t1 VALUES ('2001-01-01 11:22:33'); +CREATE TABLE t2 (b VARCHAR(64), KEY (b)); +INSERT INTO t2 VALUES ('2001-01-01'); +INSERT INTO t2 VALUES ('2001.01.01'); +INSERT INTO t2 VALUES ('2001#01#01'); +INSERT INTO t2 VALUES ('2001-01-01 00:00:00'); +INSERT INTO t2 VALUES ('2001-01-01 11:22:33'); + +# range/ref access cannot be used for this query + +EXPLAIN SELECT * FROM t2 WHERE b=CAST('2001-01-01' AS DATE); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index b b 67 NULL 5 Using where; Using index +SELECT * FROM t2 WHERE b=CAST('2001-01-01' AS DATE); +b +2001#01#01 +2001-01-01 +2001-01-01 00:00:00 +2001.01.01 + +# range/ref access cannot be used for any of the queries below. +# See BUG#13814468 about 'Range checked for each record' + +EXPLAIN SELECT * FROM t1, t2 WHERE a=b ORDER BY BINARY a, BINARY b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort +1 SIMPLE t2 ALL b NULL NULL NULL 5 Range checked for each record (index map: 0x1) +SELECT * FROM t1, t2 WHERE a=b ORDER BY BINARY a, BINARY b; +a b +2001-01-01 00:00:00 2001#01#01 +2001-01-01 00:00:00 2001-01-01 +2001-01-01 00:00:00 2001-01-01 00:00:00 +2001-01-01 00:00:00 2001.01.01 +2001-01-01 11:22:33 2001-01-01 11:22:33 + +EXPLAIN SELECT * FROM t1, t2 WHERE b=a ORDER BY BINARY a, BINARY b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort +1 SIMPLE t2 ALL b NULL NULL NULL 5 Range checked for each record (index map: 0x1) +SELECT * FROM t1, t2 WHERE b=a ORDER BY BINARY a, BINARY b; +a b +2001-01-01 00:00:00 2001#01#01 +2001-01-01 00:00:00 2001-01-01 +2001-01-01 00:00:00 2001-01-01 00:00:00 +2001-01-01 00:00:00 2001.01.01 +2001-01-01 11:22:33 2001-01-01 11:22:33 + +DROP TABLE t1,t2; +# +# MDEV-5606: range optimizer: "x < y" is sargable, while "y > x" is not +# +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2(a int); +insert into t2 select A.a + B.a* 10 + C.a * 100 from t1 A, t1 B, t1 C; +alter table t2 add key(a); +# Should have "range checked for each table" for second table: +explain select * from t1, t2 where t2.a < t1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 +1 SIMPLE t2 ALL a NULL NULL NULL 1000 Range checked for each record (index map: 0x1) +# Should have "range checked for each table" for second table: +explain select * from t1, t2 where t1.a > t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 +1 SIMPLE t2 ALL a NULL NULL NULL 1000 Range checked for each record (index map: 0x1) +create table t3 (a int primary key, b int); +insert into t3 select a,a from t1; +# The second table should use 'range': +explain select * from t3, t2 where t2.a < t3.b and t3.a=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 const PRIMARY PRIMARY 4 const 1 +1 SIMPLE t2 range a a 5 NULL 1 Using where; Using index +# The second table should use 'range': +explain select * from t3, t2 where t3.b > t2.a and t3.a=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 const PRIMARY PRIMARY 4 const 1 +1 SIMPLE t2 range a a 5 NULL 1 Using where; Using index +drop table t1,t2,t3; set optimizer_switch=@mrr_icp_extra_tmp; diff --git a/mysql-test/r/range_vs_index_merge.result b/mysql-test/r/range_vs_index_merge.result index 0acaed37d22..bc46a4fdd0b 100644 --- a/mysql-test/r/range_vs_index_merge.result +++ b/mysql-test/r/range_vs_index_merge.result @@ -797,6 +797,8 @@ EXPLAIN SELECT * FROM City WHERE Name LIKE 'Pa%'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE City range Name Name 35 NULL 41 Using index condition +set @tmp_range_vs_index_merge=@@optimizer_switch; +set optimizer_switch='extended_keys=off'; EXPLAIN SELECT * FROM City WHERE ((Population > 101000 AND Population < 102000) OR @@ -985,6 +987,7 @@ ID Name Country Population 3798 Phoenix USA 1321045 DROP INDEX Population ON City; DROP INDEX Name ON City; +set optimizer_switch=@tmp_range_vs_index_merge; EXPLAIN SELECT * FROM City WHERE Country='USA' AND Population BETWEEN 101000 AND 102000 OR @@ -1307,6 +1310,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 385 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 377 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -1335,6 +1339,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 59 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -1364,6 +1369,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 59 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -1576,7 +1582,7 @@ update t1 set c1=lpad(id+1000, 12, ' '), c2=lpad(id+10000, 15, ' '); alter table t1 add unique index (c1), add unique index (c2), add index (c3); analyze table t1; Table Op Msg_type Msg_text -test.t1 analyze status OK +test.t1 analyze status Table is already up to date explain select * from t1 where (c1=' 100000' or c2=' 2000000'); id select_type table type possible_keys key key_len ref rows Extra @@ -1801,4 +1807,85 @@ id state capital 7 Pennsylvania Harrisburg 8 Virginia Richmond DROP TABLE t1; +# +# mdev-11574: do not build index merge of two indexes when +# one index is an infix of the other index +# +set names utf8; +CREATE DATABASE world; +use world; +CREATE TABLE Country ( +Code char(3) NOT NULL default '', +Name char(52) NOT NULL default '', +SurfaceArea float(10,2) NOT NULL default '0.00', +Population int(11) NOT NULL default '0', +Capital int(11) default NULL, +PRIMARY KEY (Code), +UNIQUE INDEX (Name) +); +CREATE TABLE City ( +ID int(11) NOT NULL auto_increment, +Name char(35) NOT NULL default '', +Country char(3) NOT NULL default '', +Population int(11) NOT NULL default '0', +PRIMARY KEY (ID), +INDEX (Population), +INDEX (Country) +); +CREATE TABLE CountryLanguage ( +Country char(3) NOT NULL default '', +Language char(30) NOT NULL default '', +Percentage float(3,1) NOT NULL default '0.0', +PRIMARY KEY (Country, Language), +INDEX (Percentage) +); +DROP INDEX Country ON City; +CREATE INDEX CountryName ON City(Country,Name); +CREATE INDEX Name ON City(Name); +select * from City +where +Country='FIN' AND Name IN ('Lahti','Imatra') OR +Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR +Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR +Country='DEU' AND Name IN ('Berlin', 'Bonn') OR +Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR +Country='PRT' AND Name IN ('Braga', 'Porto') OR +Country='FRA' AND Name IN ('Paris', 'Marcel') OR +Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR +Country='NOR' AND Name IN ('Oslo', 'Bergen') OR +Country='ITA' AND Name IN ('Napoli', 'Venezia'); +ID Name Country Population +175 Antwerpen BEL 446525 +176 Gent BEL 224180 +3068 Berlin DEU 3386667 +3087 Bonn DEU 301048 +3242 Lahti FIN 96921 +2974 Paris FRA 2125246 +1466 Napoli ITA 1002619 +1474 Venezia ITA 277305 +2808 Bergen NOR 230948 +2807 Oslo NOR 508726 +2928 Warszawa POL 1615369 +2931 Wroclaw POL 636765 +2918 Braga PRT 90535 +2915 Porto PRT 273060 +3580 Moscow RUS 8389200 +3581 St Petersburg RUS 4694000 +3048 Stockholm SWE 750348 +3051 Uppsala SWE 189569 +explain select * from City +where +Country='FIN' AND Name IN ('Lahti','Imatra') OR +Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR +Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR +Country='DEU' AND Name IN ('Berlin', 'Bonn') OR +Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR +Country='PRT' AND Name IN ('Braga', 'Porto') OR +Country='FRA' AND Name IN ('Paris', 'Marcel') OR +Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR +Country='NOR' AND Name IN ('Oslo', 'Bergen') OR +Country='ITA' AND Name IN ('Napoli', 'Venezia'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE City range CountryName,Name CountryName 38 NULL 22 Using index condition; Using where +DROP DATABASE world; set session optimizer_switch='index_merge_sort_intersection=default'; diff --git a/mysql-test/r/range_vs_index_merge_innodb,innodb_plugin.rdiff b/mysql-test/r/range_vs_index_merge_innodb,innodb_plugin.rdiff deleted file mode 100644 index 7e3c4a33ad2..00000000000 --- a/mysql-test/r/range_vs_index_merge_innodb,innodb_plugin.rdiff +++ /dev/null @@ -1,289 +0,0 @@ ---- range_vs_index_merge_innodb.result 2017-01-17 15:00:18.039148421 -0800 -+++ range_vs_index_merge_innodb,innodb_plugin.result 2017-01-17 14:58:45.129148312 -0800 -@@ -50,14 +50,14 @@ - WHERE (Population >= 100000 OR Name LIKE 'P%') AND Country='CAN' OR - (Population < 100000 OR Name Like 'T%') AND Country='ARG'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Population,Country,Name Country 3 NULL 106 Using index condition; Using where -+1 SIMPLE City range Population,Country,Name Country 3 NULL 106 Using where - EXPLAIN - SELECT * FROM City - WHERE Population < 200000 AND Name LIKE 'P%' AND - (Population > 300000 OR Name LIKE 'T%') AND - (Population < 100000 OR Name LIKE 'Pa%'); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Population,Name Name 35 NULL 235 Using index condition; Using where -+1 SIMPLE City range Population,Name Name 35 NULL 235 Using where - EXPLAIN - SELECT * FROM City - WHERE Population > 100000 AND Name LIKE 'Aba%' OR -@@ -70,12 +70,12 @@ - SELECT * FROM City - WHERE (Population > 101000 AND Population < 115000); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Population Population 4 NULL 458 Using index condition -+1 SIMPLE City range Population Population 4 NULL 458 Using where - EXPLAIN - SELECT * FROM City - WHERE (Population > 101000 AND Population < 102000); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Population Population 4 NULL 38 Using index condition -+1 SIMPLE City range Population Population 4 NULL 38 Using where - EXPLAIN - SELECT * FROM City - WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'F')); -@@ -92,7 +92,7 @@ - WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'F')) - AND (Population > 101000 AND Population < 102000); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Population,Country,Name Population 4 NULL 38 Using index condition; Using where -+1 SIMPLE City range Population,Country,Name Population 4 NULL 38 Using where - SELECT * FROM City USE INDEX () - WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'F')) - AND (Population > 101000 AND Population < 115000); -@@ -172,37 +172,37 @@ - EXPLAIN - SELECT * FROM City WHERE (Name < 'Ac'); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Name Name 35 NULL 23 Using index condition -+1 SIMPLE City range Name Name 35 NULL 23 Using where - EXPLAIN - SELECT * FROM City WHERE (Name < 'Bb'); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Name Name 35 NULL 373 Using index condition -+1 SIMPLE City range Name Name 35 NULL 373 Using where - EXPLAIN - SELECT * FROM City WHERE (Country > 'A' AND Country < 'B'); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Country Country 3 NULL 106 Using index condition -+1 SIMPLE City range Country Country 3 NULL 106 Using where - EXPLAIN - SELECT * FROM City WHERE (Name BETWEEN 'P' AND 'Pb'); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Name Name 35 NULL 71 Using index condition -+1 SIMPLE City range Name Name 35 NULL 71 Using where - EXPLAIN - SELECT * FROM City WHERE (Name BETWEEN 'P' AND 'S'); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Name Name 35 NULL 384 Using index condition -+1 SIMPLE City range Name Name 35 NULL 384 Using where - EXPLAIN - SELECT * FROM City WHERE (Population > 101000 AND Population < 110000); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Population Population 4 NULL 327 Using index condition -+1 SIMPLE City range Population Population 4 NULL 327 Using where - EXPLAIN - SELECT * FROM City WHERE (Population > 103000 AND Population < 104000); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Population Population 4 NULL 36 Using index condition -+1 SIMPLE City range Population Population 4 NULL 36 Using where - EXPLAIN - SELECT * FROM City - WHERE (Name < 'Ac' AND (Country > 'A' AND Country < 'B')) OR - (Name BETWEEN 'P' AND 'Pb' AND (Population > 101000 AND Population < 110000)); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Population,Country,Name Name 35 NULL 94 Using index condition; Using where -+1 SIMPLE City range Population,Country,Name Name 35 NULL 94 Using where - EXPLAIN - SELECT * FROM City - WHERE (Name < 'Ac' AND (Country > 'A' AND Country < 'B')) OR -@@ -340,15 +340,15 @@ - EXPLAIN - SELECT * FROM City WHERE Country > 'A' AND Country < 'ARG'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Country Country 3 NULL 19 Using index condition -+1 SIMPLE City range Country Country 3 NULL 19 Using where - EXPLAIN - SELECT * FROM City WHERE Name LIKE 'H%' OR Name LIKE 'P%' ; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Name Name 35 NULL 394 Using index condition; Using where -+1 SIMPLE City range Name Name 35 NULL 394 Using where - EXPLAIN - SELECT * FROM City WHERE Name LIKE 'Ha%' OR Name LIKE 'Pa%' ; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Name Name 35 NULL 133 Using index condition; Using where -+1 SIMPLE City range Name Name 35 NULL 133 Using where - EXPLAIN - SELECT * FROM City - WHERE ((ID < 10) AND (Name LIKE 'H%' OR (Country > 'A' AND Country < 'ARG'))) -@@ -577,27 +577,27 @@ - EXPLAIN - SELECT * FROM City WHERE Population > 101000 AND Population < 102000; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Population Population 4 NULL 38 Using index condition -+1 SIMPLE City range Population Population 4 NULL 38 Using where - EXPLAIN - SELECT * FROM City WHERE Population > 101000 AND Population < 110000; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Population Population 4 NULL 327 Using index condition -+1 SIMPLE City range Population Population 4 NULL 327 Using where - EXPLAIN - SELECT * FROM City WHERE Country < 'C'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Country Country 3 NULL 446 Using index condition -+1 SIMPLE City range Country Country 3 NULL 446 Using where - EXPLAIN - SELECT * FROM City WHERE Country < 'AGO'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Country Country 3 NULL 5 Using index condition -+1 SIMPLE City range Country Country 3 NULL 5 Using where - EXPLAIN - SELECT * FROM City WHERE Name BETWEEN 'P' AND 'S'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Name Name 35 NULL 384 Using index condition -+1 SIMPLE City range Name Name 35 NULL 384 Using where - EXPLAIN - SELECT * FROM City WHERE Name BETWEEN 'P' AND 'Pb'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Name Name 35 NULL 71 Using index condition -+1 SIMPLE City range Name Name 35 NULL 71 Using where - EXPLAIN - SELECT * FROM City WHERE ID BETWEEN 3400 AND 3800; - id select_type table type possible_keys key key_len ref rows Extra -@@ -609,7 +609,7 @@ - EXPLAIN - SELECT * FROM City WHERE Name LIKE 'P%'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Name Name 35 NULL 235 Using index condition -+1 SIMPLE City range Name Name 35 NULL 235 Using where - EXPLAIN - SELECT * FROM City - WHERE ((Population > 101000 AND Population < 102000) AND -@@ -680,23 +680,23 @@ - EXPLAIN - SELECT * FROM City WHERE Name LIKE 'Pas%'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Name Name 35 NULL 8 Using index condition -+1 SIMPLE City range Name Name 35 NULL 8 Using where - EXPLAIN - SELECT * FROM City WHERE Name LIKE 'P%'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Name Name 35 NULL 235 Using index condition -+1 SIMPLE City range Name Name 35 NULL 235 Using where - EXPLAIN - SELECT * FROM City WHERE (Population > 101000 AND Population < 103000); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Population Population 4 NULL 80 Using index condition -+1 SIMPLE City range Population Population 4 NULL 80 Using where - EXPLAIN - SELECT * FROM City WHERE Country='USA'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City ref Country,CountryPopulation Country 3 const 274 Using index condition -+1 SIMPLE City ref Country,CountryPopulation Country 3 const 274 Using where - EXPLAIN - SELECT * FROM City WHERE Country='FIN'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City ref Country,CountryPopulation Country 3 const 7 Using index condition -+1 SIMPLE City ref Country,CountryPopulation Country 3 const 7 Using where - EXPLAIN - SELECT * FROM City - WHERE ((Population > 101000 AND Population < 103000) OR Name LIKE 'Pas%') -@@ -708,7 +708,7 @@ - WHERE ((Population > 101000 AND Population < 103000) OR Name LIKE 'P%') - AND Country='FIN'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City ref Population,Country,Name,CountryPopulation Country 3 const 7 Using index condition; Using where -+1 SIMPLE City ref Population,Country,Name,CountryPopulation Country 3 const 7 Using where - SELECT * FROM City - WHERE ((Population > 101000 AND Population < 103000) OR Name LIKE 'Pas%') - AND Country='USA'; -@@ -753,15 +753,15 @@ - EXPLAIN - SELECT * FROM City WHERE Country='USA'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City ref Country,CountryPopulation,CountryName Country 3 const 274 Using index condition -+1 SIMPLE City ref Country,CountryPopulation,CountryName Country 3 const 274 Using where - EXPLAIN - SELECT * FROM City WHERE Country='FIN'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City ref Country,CountryPopulation,CountryName Country 3 const 7 Using index condition -+1 SIMPLE City ref Country,CountryPopulation,CountryName Country 3 const 7 Using where - EXPLAIN - SELECT * FROM City WHERE Country='BRA'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City ref Country,CountryPopulation,CountryName Country 3 const 250 Using index condition -+1 SIMPLE City ref Country,CountryPopulation,CountryName Country 3 const 250 Using where - EXPLAIN - SELECT * FROM City WHERE ID BETWEEN 3790 AND 3800; - id select_type table type possible_keys key key_len ref rows Extra -@@ -789,15 +789,15 @@ - EXPLAIN - SELECT * FROM City WHERE (Population > 101000 AND Population < 102000); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Population Population 4 NULL 38 Using index condition -+1 SIMPLE City range Population Population 4 NULL 38 Using where - EXPLAIN - SELECT * FROM City WHERE (Population > 101000 AND Population < 103000); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Population Population 4 NULL 80 Using index condition -+1 SIMPLE City range Population Population 4 NULL 80 Using where - EXPLAIN - SELECT * FROM City WHERE Name LIKE 'Pa%'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Name Name 35 NULL 71 Using index condition -+1 SIMPLE City range Name Name 35 NULL 71 Using where - EXPLAIN - SELECT * FROM City - WHERE ((Population > 101000 AND Population < 102000) OR -@@ -818,7 +818,7 @@ - ID BETWEEN 3500 AND 3800) AND Country='FIN' - AND (Name BETWEEN 'P' AND 'T' OR ID BETWEEN 4000 AND 4300); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City ref PRIMARY,Population,Country,Name,CountryPopulation,CountryName Country 3 const 7 Using index condition; Using where -+1 SIMPLE City ref PRIMARY,Population,Country,Name,CountryPopulation,CountryName Country 3 const 7 Using where - SELECT * FROM City USE INDEX () - WHERE ((Population > 101000 AND Population < 102000) OR - ID BETWEEN 3790 AND 3800) AND Country='USA' -@@ -950,14 +950,14 @@ - ID BETWEEN 3500 AND 3800) AND Country='USA' - AND (Name LIKE 'P%' OR ID BETWEEN 4000 AND 4300); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range PRIMARY,Population,Country,Name,CountryPopulation,CountryName CountryName 38 NULL 18 Using index condition; Using where -+1 SIMPLE City range PRIMARY,Population,Country,Name,CountryPopulation,CountryName CountryName 38 NULL 18 Using where - EXPLAIN - SELECT * FROM City - WHERE ((Population > 101000 AND Population < 11000) OR - ID BETWEEN 3500 AND 3800) AND Country='USA' - AND (Name LIKE 'Pho%' OR ID BETWEEN 4000 AND 4300); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range PRIMARY,Population,Country,Name,CountryPopulation,CountryName Name 35 NULL 1 Using index condition; Using where -+1 SIMPLE City range PRIMARY,Population,Country,Name,CountryPopulation,CountryName Name 35 NULL 1 Using where - SELECT * FROM City USE INDEX () - WHERE ((Population > 101000 AND Population < 11000) OR - ID BETWEEN 3500 AND 3800) AND Country='USA' -@@ -1077,7 +1077,7 @@ - (Name='Samara' AND Country='RUS') OR - (Name='Seattle' AND Country='USA'); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Country,CountryPopulation,CountryName,CityName CountryName 38 NULL 27 Using index condition; Using where -+1 SIMPLE City range Country,CountryPopulation,CountryName,CityName CountryName 38 NULL 27 Using where - SELECT Name, Country, Population FROM City WHERE - (Name='Manila' AND Country='PHL') OR - (Name='Addis Abeba' AND Country='ETH') OR -@@ -1164,7 +1164,7 @@ - (Name='Samara' AND Country='RUS') OR - (Name='Seattle' AND Country='USA'); - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Country,CountryPopulation,CountryName,CityName CountryName 38 NULL 27 Using index condition; Using where -+1 SIMPLE City range Country,CountryPopulation,CountryName,CityName CountryName 38 NULL 27 Using where - SELECT Name, Country, Population FROM City WHERE - (Name='Manila' AND Country='PHL') OR - (Name='Addis Abeba' AND Country='ETH') OR -@@ -1346,7 +1346,7 @@ - AND (Population >= 100000 AND Population < 120000) - ORDER BY Population LIMIT 5; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE City range Country,Name,Population Population 4 NULL # Using index condition; Using where -+1 SIMPLE City range Country,Name,Population Population 4 NULL # Using where - FLUSH STATUS; - SELECT * FROM City - WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'H')) -@@ -1790,7 +1790,7 @@ - WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9 - OR ( capital >= 'Topeka' OR state = 'Kansas' ) AND state != 'Texas'; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE t1 range state,capital state 71 NULL 10 Using index condition; Using where -+1 SIMPLE t1 range state,capital state 71 NULL 10 Using where - SELECT * FROM t1 FORCE KEY (state,capital) - WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9 - OR ( capital >= 'Topeka' OR state = 'Kansas' ) AND state != 'Texas'; diff --git a/mysql-test/r/range_vs_index_merge_innodb.result b/mysql-test/r/range_vs_index_merge_innodb.result index ff4940281ce..a6ec200538d 100644 --- a/mysql-test/r/range_vs_index_merge_innodb.result +++ b/mysql-test/r/range_vs_index_merge_innodb.result @@ -362,14 +362,14 @@ WHERE ((ID < 800) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG'))) OR ((ID BETWEEN 900 AND 1500) AND (Name LIKE 'Pa%' OR (Population > 103000 AND Population < 104000))); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 35,3,4 NULL 681 Using sort_union(Name,Country,PRIMARY); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 39,3,4 NULL 680 Using sort_union(Name,Country,PRIMARY); Using where EXPLAIN SELECT * FROM City WHERE ((ID < 200) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG'))) OR ((ID BETWEEN 100 AND 200) AND (Name LIKE 'Pa%' OR (Population > 103000 AND Population < 104000))); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 35,3,4 NULL 181 Using sort_union(Name,Country,PRIMARY); Using where +1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Population,PRIMARY 39,4,4 NULL 305 Using sort_union(Name,Population,PRIMARY); Using where SELECT * FROM City USE INDEX () WHERE ((ID < 10) AND (Name LIKE 'H%' OR (Country > 'A' AND Country < 'ARG'))) OR ((ID BETWEEN 100 AND 110) AND @@ -798,6 +798,8 @@ EXPLAIN SELECT * FROM City WHERE Name LIKE 'Pa%'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE City range Name Name 35 NULL 71 Using index condition +set @tmp_range_vs_index_merge=@@optimizer_switch; +set optimizer_switch='extended_keys=off'; EXPLAIN SELECT * FROM City WHERE ((Population > 101000 AND Population < 102000) OR @@ -986,6 +988,7 @@ ID Name Country Population 3798 Phoenix USA 1321045 DROP INDEX Population ON City; DROP INDEX Name ON City; +set optimizer_switch=@tmp_range_vs_index_merge; EXPLAIN SELECT * FROM City WHERE Country='USA' AND Population BETWEEN 101000 AND 102000 OR @@ -1308,6 +1311,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 385 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 377 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -1336,6 +1340,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 59 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -1365,6 +1370,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 59 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -1802,5 +1808,86 @@ id state capital 7 Pennsylvania Harrisburg 8 Virginia Richmond DROP TABLE t1; +# +# mdev-11574: do not build index merge of two indexes when +# one index is an infix of the other index +# +set names utf8; +CREATE DATABASE world; +use world; +CREATE TABLE Country ( +Code char(3) NOT NULL default '', +Name char(52) NOT NULL default '', +SurfaceArea float(10,2) NOT NULL default '0.00', +Population int(11) NOT NULL default '0', +Capital int(11) default NULL, +PRIMARY KEY (Code), +UNIQUE INDEX (Name) +); +CREATE TABLE City ( +ID int(11) NOT NULL auto_increment, +Name char(35) NOT NULL default '', +Country char(3) NOT NULL default '', +Population int(11) NOT NULL default '0', +PRIMARY KEY (ID), +INDEX (Population), +INDEX (Country) +); +CREATE TABLE CountryLanguage ( +Country char(3) NOT NULL default '', +Language char(30) NOT NULL default '', +Percentage float(3,1) NOT NULL default '0.0', +PRIMARY KEY (Country, Language), +INDEX (Percentage) +); +DROP INDEX Country ON City; +CREATE INDEX CountryName ON City(Country,Name); +CREATE INDEX Name ON City(Name); +select * from City +where +Country='FIN' AND Name IN ('Lahti','Imatra') OR +Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR +Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR +Country='DEU' AND Name IN ('Berlin', 'Bonn') OR +Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR +Country='PRT' AND Name IN ('Braga', 'Porto') OR +Country='FRA' AND Name IN ('Paris', 'Marcel') OR +Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR +Country='NOR' AND Name IN ('Oslo', 'Bergen') OR +Country='ITA' AND Name IN ('Napoli', 'Venezia'); +ID Name Country Population +175 Antwerpen BEL 446525 +176 Gent BEL 224180 +3068 Berlin DEU 3386667 +3087 Bonn DEU 301048 +3242 Lahti FIN 96921 +2974 Paris FRA 2125246 +1466 Napoli ITA 1002619 +1474 Venezia ITA 277305 +2808 Bergen NOR 230948 +2807 Oslo NOR 508726 +2928 Warszawa POL 1615369 +2931 Wroclaw POL 636765 +2918 Braga PRT 90535 +2915 Porto PRT 273060 +3580 Moscow RUS 8389200 +3581 St Petersburg RUS 4694000 +3048 Stockholm SWE 750348 +3051 Uppsala SWE 189569 +explain select * from City +where +Country='FIN' AND Name IN ('Lahti','Imatra') OR +Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR +Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR +Country='DEU' AND Name IN ('Berlin', 'Bonn') OR +Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR +Country='PRT' AND Name IN ('Braga', 'Porto') OR +Country='FRA' AND Name IN ('Paris', 'Marcel') OR +Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR +Country='NOR' AND Name IN ('Oslo', 'Bergen') OR +Country='ITA' AND Name IN ('Napoli', 'Venezia'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE City range CountryName,Name CountryName 38 NULL 20 Using index condition; Using where +DROP DATABASE world; set session optimizer_switch='index_merge_sort_intersection=default'; SET SESSION STORAGE_ENGINE=DEFAULT; diff --git a/mysql-test/r/read_only.result b/mysql-test/r/read_only.result index 2d0f9d730fd..ee35549eb78 100644 --- a/mysql-test/r/read_only.result +++ b/mysql-test/r/read_only.result @@ -49,7 +49,7 @@ insert into t1 values(1); ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement drop temporary table if exists t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' connection default; set global read_only=0; lock table t1 write; @@ -122,10 +122,10 @@ select @@global.read_only; 1 unlock tables; drop temporary table ttt; -ERROR 42S02: Unknown table 'ttt' +ERROR 42S02: Unknown table 'test.ttt' drop temporary table if exists ttt; Warnings: -Note 1051 Unknown table 'ttt' +Note 1051 Unknown table 'test.ttt' connection default; set global read_only=0; drop table t1,t2; @@ -162,3 +162,40 @@ delete from mysql.columns_priv where User like 'mysqltest_%'; flush privileges; drop database mysqltest_db1; set global read_only= @start_read_only; +# +# WL#5968 Implement START TRANSACTION READ (WRITE|ONLY); +# +# +# Test interaction with read_only system variable. +DROP TABLE IF EXISTS t1; +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (1), (2); +CREATE USER user1; +SET GLOBAL read_only= 1; +# All allowed with super privilege +START TRANSACTION; +COMMIT; +START TRANSACTION READ ONLY; +COMMIT; +START TRANSACTION READ WRITE; +COMMIT; +# We allow implicit RW transaction without super privilege +# for compatibility reasons +START TRANSACTION; +# Check that table updates are still disallowed. +INSERT INTO t1 VALUES (3); +ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement +UPDATE t1 SET a= 1; +ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement +DELETE FROM t1; +ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement +COMMIT; +START TRANSACTION READ ONLY; +COMMIT; +# Explicit RW trans is not allowed without super privilege +START TRANSACTION READ WRITE; +ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement +COMMIT; +DROP USER user1; +SET GLOBAL read_only= 0; +DROP TABLE t1; diff --git a/mysql-test/r/rename.result b/mysql-test/r/rename.result index edf05d0c5d3..74370ba74dd 100644 --- a/mysql-test/r/rename.result +++ b/mysql-test/r/rename.result @@ -14,20 +14,20 @@ select * from t1; 1 table 1 1 table 1 rename table t1 to t2; -Got one of the listed errors +ERROR 42S01: Table 't2' already exists rename table t1 to t1; -Got one of the listed errors +ERROR 42S01: Table 't1' already exists rename table t3 to t4, t2 to t3, t1 to t2, t4 to t2; -Got one of the listed errors +ERROR 42S01: Table 't2' already exists show tables like "t_"; Tables_in_test (t_) t1 t2 t3 rename table t3 to t1, t2 to t3, t1 to t2, t4 to t1; -Got one of the listed errors +ERROR 42S01: Table 't1' already exists rename table t3 to t4, t5 to t3, t1 to t2, t4 to t1; -Got one of the listed errors +ERROR 42S02: Table 'test.t5' doesn't exist select * from t1; 1 table 1 1 table 1 @@ -39,7 +39,7 @@ select * from t3; 3 table 3 drop table if exists t1,t2,t3,t4; Warnings: -Note 1051 Unknown table 't4' +Note 1051 Unknown table 'test.t4' CREATE TABLE t1 (a int); CREATE TABLE t3 (a int); FLUSH TABLES WITH READ LOCK; diff --git a/mysql-test/r/repair.result b/mysql-test/r/repair.result index 51c3374602d..79bc6d55c55 100644 --- a/mysql-test/r/repair.result +++ b/mysql-test/r/repair.result @@ -77,12 +77,12 @@ INSERT INTO t1 VALUES ('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'), ('0'),('0'),('0'),('0'),('0'),('0'),('0'); Warnings: -Error 1034 myisam_sort_buffer_size is too small +Error 1034 myisam_sort_buffer_size is too small. X Error 1034 Number of rows changed from 0 to 157 SET myisam_repair_threads=2; REPAIR TABLE t1; Table Op Msg_type Msg_text -test.t1 repair error myisam_sort_buffer_size is too small +test.t1 repair error myisam_sort_buffer_size is too small. X test.t1 repair warning Number of rows changed from 0 to 157 test.t1 repair status OK SET myisam_repair_threads=@@global.myisam_repair_threads; @@ -188,14 +188,14 @@ drop tables t1, t2; # # Test with a saved table from 3.23 select count(*) from t1; -ERROR HY000: Got error 185 'Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump and restore the table to fix this' from MyISAM +ERROR HY000: Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump an" from storage engine MyISAM check table t1; Table Op Msg_type Msg_text -test.t1 check Error Got error 185 'Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump and restore the table to fix this' from MyISAM +test.t1 check Error Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump an" from storage engine MyISAM test.t1 check error Corrupt repair table t1; Table Op Msg_type Msg_text -test.t1 repair Error Got error 185 'Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump and restore the table to fix this' from MyISAM +test.t1 repair Error Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump an" from storage engine MyISAM test.t1 repair error Corrupt repair table t1 use_frm; Table Op Msg_type Msg_text diff --git a/mysql-test/r/rpl_colSize.result b/mysql-test/r/rpl_colSize.result deleted file mode 100644 index 91456742833..00000000000 --- a/mysql-test/r/rpl_colSize.result +++ /dev/null @@ -1,179 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP TABLE IF EXISTS t1; -**** Testing WL#3228 changes. **** -*** Create "wider" table on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t1 ( -a float (47), -b double (143,9), -c decimal (65,30), -d numeric (4,0), -e bit (32), -f char (21), -g varchar (1300), -h binary (33), -j varbinary (200), -k enum ('5','6','7', '8','9','0'), -l set ('1','2','3','4','5','6','7','8','9','0','11','12','13','14','15','16','17','18','19','21','22','23','24','25','26','27','28','29'), -m TINYBLOB, -n BLOB, -o MEDIUMBLOB, -p LONGBLOB, -q TINYTEXT, -r TEXT, -s MEDIUMTEXT, -t LONGTEXT -); -*** Create same table on master but with narrow columns *** -CREATE TABLE t1 ( -a float (44), -b double (10,3), -c decimal (10,2), -d numeric (3,0), -e bit (16), -f char (10), -g varchar (100), -h binary (20), -j varbinary (20), -k enum ('5','6','7'), -l set ('1','2','3','4','5','6','7','8','9','0'), -m TINYBLOB, -n BLOB, -o MEDIUMBLOB, -p LONGBLOB, -q TINYTEXT, -r TEXT, -s MEDIUMTEXT, -t LONGTEXT -); -RESET MASTER; -*** Start replication *** -START SLAVE; -*** Insert data on master and display it. *** -INSERT INTO t1 () VALUES ( -17.567, -2.123, -10.20, -125, -hex(64), -'TEST', -'This is a test', -'binary data', -'more binary data', -'6', -'7', -"blob 1", -"blob 2", -"blob 3", -"blob 4", -"text 1", -"text 2", -"text 3", -"text 4"); -SELECT * FROM t1 ORDER BY a; -a b c d e f g h j k l m n o p q r s t -17.567 2.123 10.20 125 # TEST This is a test # more binary data 6 7 blob 1 blob 2 blob 3 blob 4 text 1 text 2 text 3 text 4 -*** Select data from slave to compare *** -SELECT * FROM t1 ORDER BY a; -a b c d e f g h j k l m n o p q r s t -17.567 2.123000000 10.200000000000000000000000000000 125 # TEST This is a test # more binary data 6 7 blob 1 blob 2 blob 3 blob 4 text 1 text 2 text 3 text 4 -DROP TABLE t1; -Create varchar table on master -CREATE TABLE t1 ( -a VARCHAR(50), -b VARCHAR(100), -c VARCHAR(300), -d CHAR(5) -); -Alter varchar table on slave -ALTER TABLE t1 CHANGE COLUMN a a VARCHAR(100); -ALTER TABLE t1 CHANGE COLUMN b b VARCHAR(400); -ALTER TABLE t1 CHANGE COLUMN c c VARCHAR(500); -ALTER TABLE t1 CHANGE COLUMN d d CHAR(100); -Insert some values and select them on master -INSERT INTO t1 VALUES ("This is a test of col a.", -"This is another test of col b.", -"This is a test of the large col c.", -"Col d"); -SELECT * FROM t1; -a b c d -This is a test of col a. This is another test of col b. This is a test of the large col c. Col d -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(50) DEFAULT NULL, - `b` varchar(100) DEFAULT NULL, - `c` varchar(300) DEFAULT NULL, - `d` char(5) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -Insert some values and select them on slave -SELECT * FROM t1; -a b c d -This is a test of col a. This is another test of col b. This is a test of the large col c. Col d -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(100) DEFAULT NULL, - `b` varchar(400) DEFAULT NULL, - `c` varchar(500) DEFAULT NULL, - `d` char(100) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -DROP TABLE t1; -Create bit table on master -CREATE TABLE t1 ( -a BIT(7), -b BIT(8), -c BIT(21), -d BIT(11), -e BIT(11) -); -Create bit table on slave -DROP TABLE t1; -CREATE TABLE t1 ( -a BIT(16), -b BIT(22), -c BIT(54), -d BIT(25), -e BIT(13) -); -Insert some values and select them on master -INSERT INTO t1 VALUES ( -b'1010101', -b'10101011', -b'101010110101010101111', -b'10101010101', -b'10101011111' - ); -SELECT BIN(a), BIN(b), BIN(c), BIN(d), BIN(e) FROM t1; -BIN(a) BIN(b) BIN(c) BIN(d) BIN(e) -1010101 10101011 101010110101010101111 10101010101 10101011111 -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` bit(7) DEFAULT NULL, - `b` bit(8) DEFAULT NULL, - `c` bit(21) DEFAULT NULL, - `d` bit(11) DEFAULT NULL, - `e` bit(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -Insert some values and select them on master -SELECT BIN(a), BIN(b), BIN(c), BIN(d), BIN(e) FROM t1; -BIN(a) BIN(b) BIN(c) BIN(d) BIN(e) -1010101 10101011 101010110101010101111 10101010101 10101011111 -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` bit(16) DEFAULT NULL, - `b` bit(22) DEFAULT NULL, - `c` bit(54) DEFAULT NULL, - `d` bit(25) DEFAULT NULL, - `e` bit(13) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -*** Cleanup *** -DROP TABLE t1; diff --git a/mysql-test/r/rpl_extraColmaster_innodb.result b/mysql-test/r/rpl_extraColmaster_innodb.result Binary files differdeleted file mode 100644 index 27d6592a7ad..00000000000 --- a/mysql-test/r/rpl_extraColmaster_innodb.result +++ /dev/null diff --git a/mysql-test/r/rpl_extraColmaster_myisam.result b/mysql-test/r/rpl_extraColmaster_myisam.result Binary files differdeleted file mode 100644 index 9a77ae6ca19..00000000000 --- a/mysql-test/r/rpl_extraColmaster_myisam.result +++ /dev/null diff --git a/mysql-test/r/rpl_mysqldump_slave.result b/mysql-test/r/rpl_mysqldump_slave.result index 6ff7ca23352..9d2fe860f47 100644 --- a/mysql-test/r/rpl_mysqldump_slave.result +++ b/mysql-test/r/rpl_mysqldump_slave.result @@ -4,18 +4,59 @@ include/master-slave.inc # New --dump-slave, --apply-slave-statements functionality # use test; -CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; -STOP SLAVE; -CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; -START SLAVE; -STOP SLAVE; -CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; -START SLAVE; -slave start; +-- SET GLOBAL gtid_slave_pos=''; +CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; +STOP ALL SLAVES; +-- SET GLOBAL gtid_slave_pos=''; +CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; +START ALL SLAVES; +STOP ALL SLAVES; +-- SET GLOBAL gtid_slave_pos=''; +CHANGE MASTER '' TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; +START ALL SLAVES; +start slave; Warnings: Note 1254 Slave is already running -CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; -slave start; +-- SET GLOBAL gtid_slave_pos=''; +CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; +start slave; Warnings: Note 1254 Slave is already running +*** Test mysqldump --dump-slave GTID functionality. +SET gtid_seq_no = 1000; +CREATE TABLE t1 (a INT PRIMARY KEY); +DROP TABLE t1; +CREATE TABLE t2 (a INT PRIMARY KEY); +DROP TABLE t2; + +1. --dump-slave=1 + +SET GLOBAL gtid_slave_pos='0-1-1001'; +CHANGE MASTER '' TO MASTER_USE_GTID=slave_pos; +-- CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; + +2. --dump-slave=2 + +-- SET GLOBAL gtid_slave_pos='0-1-1001'; +-- CHANGE MASTER '' TO MASTER_USE_GTID=slave_pos; +-- CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; +*** Test mysqldump --master-data GTID functionality. + +1. --master-data=1 + +-- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START; +CHANGE MASTER TO MASTER_USE_GTID=slave_pos; +SET GLOBAL gtid_slave_pos='0-2-1003'; + +2. --master-data=2 + +-- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START; +-- CHANGE MASTER TO MASTER_USE_GTID=slave_pos; +-- SET GLOBAL gtid_slave_pos='0-2-1003'; + +3. --master-data --single-transaction + +-- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START; +CHANGE MASTER TO MASTER_USE_GTID=slave_pos; +SET GLOBAL gtid_slave_pos='0-2-1003'; include/rpl_end.inc diff --git a/mysql-test/r/schema.result b/mysql-test/r/schema.result index 809d652053e..bb6dbd65f84 100644 --- a/mysql-test/r/schema.result +++ b/mysql-test/r/schema.result @@ -5,8 +5,8 @@ Database Create Database foo CREATE DATABASE `foo` /*!40100 DEFAULT CHARACTER SET latin1 */ show schemas; Database -information_schema foo +information_schema mtr mysql performance_schema diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index cff5caf7b7a..8d5ee08e44e 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -513,7 +513,7 @@ insert into tmp select * from t3; insert into t3 select * from tmp; alter table t3 add t2nr int not null auto_increment primary key first; drop table tmp; -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10; namn Abraham Abraham @@ -526,7 +526,7 @@ ammonium ammonium analyzable analyzable animals animals animized animized -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10; concat(fld3," ",fld3) Abraham Abraham @@ -563,7 +563,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10; fld3 count(*) affixed 1 @@ -576,7 +576,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10; fld3 repeat("a",length(fld3)) count(*) circus aaaaaa 1 @@ -4175,18 +4175,24 @@ str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00' set SQL_MODE=TRADITIONAL; select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'; str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34' -1 +NULL +Warnings: +Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date select str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'; str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34' 0 select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34'; str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34' -0 +NULL +Warnings: +Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01' and '2007/10/20'; str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01' and '2007/10/20' -1 +NULL +Warnings: +Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date set SQL_MODE=DEFAULT; select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'; str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20' @@ -4345,6 +4351,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 6 @@ -5185,6 +5192,37 @@ WHERE t2.pk <> 2; pk i pk i pk i DROP TABLE t1,t2,t_empty; End of 5.1 tests +# +# Bug#45227: Lost HAVING clause led to a wrong result. +# +CREATE TABLE `CC` ( +`int_nokey` int(11) NOT NULL, +`int_key` int(11) NOT NULL, +`varchar_key` varchar(1) NOT NULL, +`varchar_nokey` varchar(1) NOT NULL, +KEY `int_key` (`int_key`), +KEY `varchar_key` (`varchar_key`) +); +INSERT INTO `CC` VALUES +(0,8,'q','q'),(5,8,'m','m'),(7,3,'j','j'),(1,2,'z','z'),(8,2,'a','a'),(2,6,'',''),(1,8,'e' +,'e'),(8,9,'t','t'),(5,2,'q','q'),(4,6,'b','b'),(5,5,'w','w'),(3,2,'m','m'),(0,4,'x','x'), +(8,9,'',''),(0,6,'w','w'),(4,5,'x','x'),(0,0,'e','e'),(0,0,'e','e'),(2,8,'p','p'),(0,0,'x' +,'x'); +EXPLAIN SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4 +HAVING G1 ORDER BY `varchar_key` LIMIT 6 ; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE CC range int_key int_key 4 NULL 10 Using index condition; Using where; Using filesort +SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4 +HAVING G1 ORDER BY `varchar_key` LIMIT 6 ; +G1 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'z' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'q' +Warning 1292 Truncated incorrect DOUBLE value: 'm' +Warning 1292 Truncated incorrect DOUBLE value: 'j' +DROP TABLE CC; +# End of test#45227 # # BUG#776274: substitution of a single row table # @@ -5291,6 +5329,14 @@ f1 DROP TABLE t1; DROP VIEW view_t1; # End of test BUG#63020 +# +# Bug #13571700 TINYBLOB NOT NULL, CRASH IN PROTOCOL::NET_STORE_DATA +# +CREATE TABLE t1 (a TINYBLOB NOT NULL); +SELECT a, COUNT(*) FROM t1 WHERE 0; +a COUNT(*) +NULL 0 +DROP TABLE t1; SET optimizer_switch=@save_optimizer_switch; # # LP bug#994275 Assertion `real->type() == Item::FIELD_ITEM' failed @@ -5470,3 +5516,38 @@ pk1 a1 b1 pk2 a2 3 1 6 1 1 DROP TABLE t1,t2; End of 5.3 tests +# +# mysql BUG#1271 Undefined variable in PASSWORD() +# function is not handled correctly +# +create table t1 ( +name VARCHAR(50) NOT NULL PRIMARY KEY, +pw VARCHAR(41) NOT NULL); +INSERT INTO t1 (name, pw) +VALUES ('tom', PASSWORD('my_pw')); +SET @pass='my_pw'; +SET @wrong='incorrect'; +select * from t1; +name pw +tom *F305E8EC27734F687F2EB6EC03CF0F7AF27C18E1 +select length(PASSWORD(@pass)); +length(PASSWORD(@pass)) +41 +SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@pass); +name +tom +SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@wrong); +name +SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined); +name +select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@pass)); +(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@pass)) +tom +select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@wrong)); +(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@wrong)) +NULL +select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined)); +(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined)) +NULL +drop table t1; +End of 10.0 tests diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index 7896f8a9f4e..7b38515cf70 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -280,3 +280,86 @@ SELECT FOUND_ROWS(); FOUND_ROWS() 1 DROP TABLE t1; +create table t1 (f1 int primary key, f2 tinyint) engine=myisam; +insert t1 values (10,3),(11,2),(12,3); +create table t2 (f3 int primary key) engine=myisam; +insert t2 values (11),(12),(13); +select f1 from t1,t2 where f1=f3 and f2=3 order by f1; +f1 +12 +select found_rows(); +found_rows() +1 +drop table t1, t2; +create table t1 (a1 int auto_increment primary key, c1 int); +insert t1 (a1) values (null); +insert t1 (a1) select null from t1; +insert t1 (a1) select null from t1; +insert t1 (a1) select null from t1; +insert t1 (a1) select null from t1; +insert t1 (a1) select null from t1; +insert t1 (a1) select null from t1; +insert t1 (a1) select null from t1; +insert t1 (a1) select null from t1; +insert t1 (a1) select null from t1; +update t1 set c1=a1 % 2; +create table t2 (a2 int, b2 int, c2 char(16) default '', primary key (a2, b2)); +insert t2 select a1, 1, 'ok' from t1; +insert t2 select a1, 2, 'ko' from t1; +insert t2 select a1, 3, 'ko' from t1; +insert t2 select a1, 4, 'ok' from t1; +insert t2 select a1, 5, 'ok' from t1; +select sql_calc_found_rows distinct a1,c2 from t1 join t2 on a2=a1 +where a1 <= 256 and c1=0 and c2='ok' order by a1 desc limit 46; +select found_rows(); +found_rows() +128 +drop table t1, t2; +create table t1 (i1 int, v1 int, primary key(i1,v1)); +insert into t1 values (1,1),(2,2),(3,3); +create table t2 (i2 int primary key, v2 int); +insert into t2 values (1,5),(2,5),(3,10); +select 1 as res from t1 left join t2 on i1 = i2 where v2 = 5 or v1 = 5 or v1 = 10 order by v1; +res +1 +1 +select sql_calc_found_rows 1 as res from t1 left join t2 on i1 = i2 where v2 = 5 or v1 = 5 or v1 = 10 order by v1 limit 1; +select found_rows() as count; +count +2 +select sql_calc_found_rows 1 as res from t1 left join t2 on i1 = i2 where v2 = 5 order by v1 limit 1; +select found_rows() as count; +count +2 +drop table t1, t2; +create table t1 (i int, v varchar(64), key (i)); +select sql_calc_found_rows * from t1 where i = 0 order by v limit 59,2; +i v +0 foo +0 foo +select found_rows(); +found_rows() +75 +select sql_calc_found_rows * from t1 ignore index (i) where i = 0 order by v limit 59,2; +i v +0 foo +0 foo +select found_rows(); +found_rows() +75 +drop table t1; +create table t1(c1 int); +insert into t1 values(1),(2),(3),(4),(5); +select * from t1 order by c1 limit 2,1; +c1 +3 +select found_rows(); +found_rows() +3 +select sql_calc_found_rows * from t1 order by c1 limit 2,1; +c1 +3 +select found_rows(); +found_rows() +5 +drop table t1; diff --git a/mysql-test/r/select_jcl6.result b/mysql-test/r/select_jcl6.result index 359e7c8e2e7..db7f2c473a8 100644 --- a/mysql-test/r/select_jcl6.result +++ b/mysql-test/r/select_jcl6.result @@ -524,7 +524,7 @@ insert into tmp select * from t3; insert into t3 select * from tmp; alter table t3 add t2nr int not null auto_increment primary key first; drop table tmp; -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10; namn Abraham Abraham @@ -537,7 +537,7 @@ ammonium ammonium analyzable analyzable animals animals animized animized -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10; concat(fld3," ",fld3) Abraham Abraham @@ -574,7 +574,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10; fld3 count(*) affixed 1 @@ -587,7 +587,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10; fld3 repeat("a",length(fld3)) count(*) circus aaaaaa 1 @@ -4186,18 +4186,24 @@ str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00' set SQL_MODE=TRADITIONAL; select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'; str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34' -1 +NULL +Warnings: +Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date select str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'; str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34' 0 select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34'; str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34' -0 +NULL +Warnings: +Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01' and '2007/10/20'; str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01' and '2007/10/20' -1 +NULL +Warnings: +Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date set SQL_MODE=DEFAULT; select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'; str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20' @@ -4356,6 +4362,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 10 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 10 Handler_read_rnd_deleted 1 Handler_read_rnd_next 6 @@ -5196,6 +5203,37 @@ WHERE t2.pk <> 2; pk i pk i pk i DROP TABLE t1,t2,t_empty; End of 5.1 tests +# +# Bug#45227: Lost HAVING clause led to a wrong result. +# +CREATE TABLE `CC` ( +`int_nokey` int(11) NOT NULL, +`int_key` int(11) NOT NULL, +`varchar_key` varchar(1) NOT NULL, +`varchar_nokey` varchar(1) NOT NULL, +KEY `int_key` (`int_key`), +KEY `varchar_key` (`varchar_key`) +); +INSERT INTO `CC` VALUES +(0,8,'q','q'),(5,8,'m','m'),(7,3,'j','j'),(1,2,'z','z'),(8,2,'a','a'),(2,6,'',''),(1,8,'e' +,'e'),(8,9,'t','t'),(5,2,'q','q'),(4,6,'b','b'),(5,5,'w','w'),(3,2,'m','m'),(0,4,'x','x'), +(8,9,'',''),(0,6,'w','w'),(4,5,'x','x'),(0,0,'e','e'),(0,0,'e','e'),(2,8,'p','p'),(0,0,'x' +,'x'); +EXPLAIN SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4 +HAVING G1 ORDER BY `varchar_key` LIMIT 6 ; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE CC range int_key int_key 4 NULL 10 Using index condition; Using where; Rowid-ordered scan; Using filesort +SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4 +HAVING G1 ORDER BY `varchar_key` LIMIT 6 ; +G1 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'j' +Warning 1292 Truncated incorrect DOUBLE value: 'z' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'q' +Warning 1292 Truncated incorrect DOUBLE value: 'm' +DROP TABLE CC; +# End of test#45227 # # BUG#776274: substitution of a single row table # @@ -5302,6 +5340,14 @@ f1 DROP TABLE t1; DROP VIEW view_t1; # End of test BUG#63020 +# +# Bug #13571700 TINYBLOB NOT NULL, CRASH IN PROTOCOL::NET_STORE_DATA +# +CREATE TABLE t1 (a TINYBLOB NOT NULL); +SELECT a, COUNT(*) FROM t1 WHERE 0; +a COUNT(*) +NULL 0 +DROP TABLE t1; SET optimizer_switch=@save_optimizer_switch; # # LP bug#994275 Assertion `real->type() == Item::FIELD_ITEM' failed @@ -5481,6 +5527,41 @@ pk1 a1 b1 pk2 a2 3 1 6 1 1 DROP TABLE t1,t2; End of 5.3 tests +# +# mysql BUG#1271 Undefined variable in PASSWORD() +# function is not handled correctly +# +create table t1 ( +name VARCHAR(50) NOT NULL PRIMARY KEY, +pw VARCHAR(41) NOT NULL); +INSERT INTO t1 (name, pw) +VALUES ('tom', PASSWORD('my_pw')); +SET @pass='my_pw'; +SET @wrong='incorrect'; +select * from t1; +name pw +tom *F305E8EC27734F687F2EB6EC03CF0F7AF27C18E1 +select length(PASSWORD(@pass)); +length(PASSWORD(@pass)) +41 +SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@pass); +name +tom +SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@wrong); +name +SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined); +name +select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@pass)); +(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@pass)) +tom +select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@wrong)); +(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@wrong)) +NULL +select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined)); +(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined)) +NULL +drop table t1; +End of 10.0 tests set join_cache_level=default; show variables like 'join_cache_level'; Variable_name Value diff --git a/mysql-test/r/select_pkeycache.result b/mysql-test/r/select_pkeycache.result index cff5caf7b7a..8d5ee08e44e 100644 --- a/mysql-test/r/select_pkeycache.result +++ b/mysql-test/r/select_pkeycache.result @@ -513,7 +513,7 @@ insert into tmp select * from t3; insert into t3 select * from tmp; alter table t3 add t2nr int not null auto_increment primary key first; drop table tmp; -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10; namn Abraham Abraham @@ -526,7 +526,7 @@ ammonium ammonium analyzable analyzable animals animals animized animized -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10; concat(fld3," ",fld3) Abraham Abraham @@ -563,7 +563,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10; fld3 count(*) affixed 1 @@ -576,7 +576,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10; fld3 repeat("a",length(fld3)) count(*) circus aaaaaa 1 @@ -4175,18 +4175,24 @@ str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00' set SQL_MODE=TRADITIONAL; select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'; str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34' -1 +NULL +Warnings: +Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date select str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'; str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34' 0 select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34'; str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34' -0 +NULL +Warnings: +Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01' and '2007/10/20'; str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01' and '2007/10/20' -1 +NULL +Warnings: +Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date set SQL_MODE=DEFAULT; select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'; str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20' @@ -4345,6 +4351,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 6 @@ -5185,6 +5192,37 @@ WHERE t2.pk <> 2; pk i pk i pk i DROP TABLE t1,t2,t_empty; End of 5.1 tests +# +# Bug#45227: Lost HAVING clause led to a wrong result. +# +CREATE TABLE `CC` ( +`int_nokey` int(11) NOT NULL, +`int_key` int(11) NOT NULL, +`varchar_key` varchar(1) NOT NULL, +`varchar_nokey` varchar(1) NOT NULL, +KEY `int_key` (`int_key`), +KEY `varchar_key` (`varchar_key`) +); +INSERT INTO `CC` VALUES +(0,8,'q','q'),(5,8,'m','m'),(7,3,'j','j'),(1,2,'z','z'),(8,2,'a','a'),(2,6,'',''),(1,8,'e' +,'e'),(8,9,'t','t'),(5,2,'q','q'),(4,6,'b','b'),(5,5,'w','w'),(3,2,'m','m'),(0,4,'x','x'), +(8,9,'',''),(0,6,'w','w'),(4,5,'x','x'),(0,0,'e','e'),(0,0,'e','e'),(2,8,'p','p'),(0,0,'x' +,'x'); +EXPLAIN SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4 +HAVING G1 ORDER BY `varchar_key` LIMIT 6 ; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE CC range int_key int_key 4 NULL 10 Using index condition; Using where; Using filesort +SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4 +HAVING G1 ORDER BY `varchar_key` LIMIT 6 ; +G1 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'z' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'q' +Warning 1292 Truncated incorrect DOUBLE value: 'm' +Warning 1292 Truncated incorrect DOUBLE value: 'j' +DROP TABLE CC; +# End of test#45227 # # BUG#776274: substitution of a single row table # @@ -5291,6 +5329,14 @@ f1 DROP TABLE t1; DROP VIEW view_t1; # End of test BUG#63020 +# +# Bug #13571700 TINYBLOB NOT NULL, CRASH IN PROTOCOL::NET_STORE_DATA +# +CREATE TABLE t1 (a TINYBLOB NOT NULL); +SELECT a, COUNT(*) FROM t1 WHERE 0; +a COUNT(*) +NULL 0 +DROP TABLE t1; SET optimizer_switch=@save_optimizer_switch; # # LP bug#994275 Assertion `real->type() == Item::FIELD_ITEM' failed @@ -5470,3 +5516,38 @@ pk1 a1 b1 pk2 a2 3 1 6 1 1 DROP TABLE t1,t2; End of 5.3 tests +# +# mysql BUG#1271 Undefined variable in PASSWORD() +# function is not handled correctly +# +create table t1 ( +name VARCHAR(50) NOT NULL PRIMARY KEY, +pw VARCHAR(41) NOT NULL); +INSERT INTO t1 (name, pw) +VALUES ('tom', PASSWORD('my_pw')); +SET @pass='my_pw'; +SET @wrong='incorrect'; +select * from t1; +name pw +tom *F305E8EC27734F687F2EB6EC03CF0F7AF27C18E1 +select length(PASSWORD(@pass)); +length(PASSWORD(@pass)) +41 +SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@pass); +name +tom +SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@wrong); +name +SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined); +name +select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@pass)); +(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@pass)) +tom +select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@wrong)); +(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@wrong)) +NULL +select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined)); +(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined)) +NULL +drop table t1; +End of 10.0 tests diff --git a/mysql-test/r/selectivity.result b/mysql-test/r/selectivity.result new file mode 100644 index 00000000000..61a77d135e7 --- /dev/null +++ b/mysql-test/r/selectivity.result @@ -0,0 +1,1540 @@ +drop table if exists t0,t1,t2,t3; +select @@global.use_stat_tables; +@@global.use_stat_tables +COMPLEMENTARY +select @@session.use_stat_tables; +@@session.use_stat_tables +COMPLEMENTARY +set @save_use_stat_tables=@@use_stat_tables; +set use_stat_tables='preferably'; +set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; +set @save_histogram_size=@@histogram_size; +set @save_histogram_type=@@histogram_type; +set optimizer_use_condition_selectivity=3; +create table t1 (a int); +insert into t1 values +(9), (3), (2), (NULL), (NULL), (2), (NULL), (1), (5), (NULL); +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +select * from mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 1 9 0.4000 4.0000 1.2000 0 NULL NULL +flush table t1; +explain extended +select * from t1 where a is null; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 40.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where isnull(`test`.`t1`.`a`) +explain extended +select * from t1 where a is not null; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 60.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` is not null) +drop table t1; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP DATABASE IF EXISTS dbt3_s001; +CREATE DATABASE dbt3_s001; +use dbt3_s001; +=== Q2 === +set optimizer_use_condition_selectivity=5; +explain extended +select +s_acctbal, s_name, n_name, p_partkey, p_mfgr, s_address, s_phone, s_comment +from +part, supplier, partsupp, nation, region +where +p_partkey = ps_partkey +and s_suppkey = ps_suppkey +and p_size = 9 +and p_type like '%TIN' + and s_nationkey = n_nationkey +and n_regionkey = r_regionkey +and r_name = 'ASIA' + and ps_supplycost = ( +select +min(ps_supplycost) +from +partsupp, supplier, nation, region +where +p_partkey = ps_partkey +and s_suppkey = ps_suppkey +and s_nationkey = n_nationkey +and n_regionkey = r_regionkey +and r_name = 'ASIA' + ) +order by +s_acctbal desc, n_name, s_name, p_partkey; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY part ALL PRIMARY NULL NULL NULL 200 0.31 Using where; Using temporary; Using filesort +1 PRIMARY partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where +1 PRIMARY supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.partsupp.ps_suppkey 1 100.00 Using where +1 PRIMARY nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 100.00 Using where +1 PRIMARY region eq_ref PRIMARY PRIMARY 4 dbt3_s001.nation.n_regionkey 1 20.00 Using where +2 DEPENDENT SUBQUERY region ALL PRIMARY NULL NULL NULL 5 20.00 Using where +2 DEPENDENT SUBQUERY partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 +2 DEPENDENT SUBQUERY supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.partsupp.ps_suppkey 1 100.00 Using where +2 DEPENDENT SUBQUERY nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 100.00 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.part.p_partkey' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `dbt3_s001`.`supplier`.`s_acctbal` AS `s_acctbal`,`dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`nation`.`n_name` AS `n_name`,`dbt3_s001`.`part`.`p_partkey` AS `p_partkey`,`dbt3_s001`.`part`.`p_mfgr` AS `p_mfgr`,`dbt3_s001`.`supplier`.`s_address` AS `s_address`,`dbt3_s001`.`supplier`.`s_phone` AS `s_phone`,`dbt3_s001`.`supplier`.`s_comment` AS `s_comment` from `dbt3_s001`.`part` join `dbt3_s001`.`supplier` join `dbt3_s001`.`partsupp` join `dbt3_s001`.`nation` join `dbt3_s001`.`region` where ((`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`supplier`.`s_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`part`.`p_size` = 9) and (`dbt3_s001`.`nation`.`n_nationkey` = `dbt3_s001`.`supplier`.`s_nationkey`) and (`dbt3_s001`.`region`.`r_regionkey` = `dbt3_s001`.`nation`.`n_regionkey`) and (`dbt3_s001`.`region`.`r_name` = 'ASIA') and (`dbt3_s001`.`part`.`p_type` like '%TIN') and (`dbt3_s001`.`partsupp`.`ps_supplycost` = <expr_cache><`dbt3_s001`.`part`.`p_partkey`>((select min(`dbt3_s001`.`partsupp`.`ps_supplycost`) from `dbt3_s001`.`partsupp` join `dbt3_s001`.`supplier` join `dbt3_s001`.`nation` join `dbt3_s001`.`region` where ((`dbt3_s001`.`supplier`.`s_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`nation`.`n_nationkey` = `dbt3_s001`.`supplier`.`s_nationkey`) and (`dbt3_s001`.`nation`.`n_regionkey` = `dbt3_s001`.`region`.`r_regionkey`) and (`dbt3_s001`.`region`.`r_name` = 'ASIA') and (`dbt3_s001`.`part`.`p_partkey` = `dbt3_s001`.`partsupp`.`ps_partkey`)))))) order by `dbt3_s001`.`supplier`.`s_acctbal` desc,`dbt3_s001`.`nation`.`n_name`,`dbt3_s001`.`supplier`.`s_name`,`dbt3_s001`.`part`.`p_partkey` +set optimizer_use_condition_selectivity=4; +explain extended +select +s_acctbal, s_name, n_name, p_partkey, p_mfgr, s_address, s_phone, s_comment +from +part, supplier, partsupp, nation, region +where +p_partkey = ps_partkey +and s_suppkey = ps_suppkey +and p_size = 9 +and p_type like '%TIN' + and s_nationkey = n_nationkey +and n_regionkey = r_regionkey +and r_name = 'ASIA' + and ps_supplycost = ( +select +min(ps_supplycost) +from +partsupp, supplier, nation, region +where +p_partkey = ps_partkey +and s_suppkey = ps_suppkey +and s_nationkey = n_nationkey +and n_regionkey = r_regionkey +and r_name = 'ASIA' + ) +order by +s_acctbal desc, n_name, s_name, p_partkey; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY region ALL PRIMARY NULL NULL NULL 5 20.00 Using where; Using temporary; Using filesort +1 PRIMARY nation ref PRIMARY,i_n_regionkey i_n_regionkey 5 dbt3_s001.region.r_regionkey 5 100.00 +1 PRIMARY supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1 100.00 +1 PRIMARY part ALL PRIMARY NULL NULL NULL 200 2.08 Using where; Using join buffer (flat, BNL join) +1 PRIMARY partsupp eq_ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 8 dbt3_s001.part.p_partkey,dbt3_s001.supplier.s_suppkey 1 100.00 Using where +2 DEPENDENT SUBQUERY region ALL PRIMARY NULL NULL NULL 5 20.00 Using where +2 DEPENDENT SUBQUERY partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 +2 DEPENDENT SUBQUERY supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.partsupp.ps_suppkey 1 100.00 Using where +2 DEPENDENT SUBQUERY nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 100.00 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.part.p_partkey' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `dbt3_s001`.`supplier`.`s_acctbal` AS `s_acctbal`,`dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`nation`.`n_name` AS `n_name`,`dbt3_s001`.`part`.`p_partkey` AS `p_partkey`,`dbt3_s001`.`part`.`p_mfgr` AS `p_mfgr`,`dbt3_s001`.`supplier`.`s_address` AS `s_address`,`dbt3_s001`.`supplier`.`s_phone` AS `s_phone`,`dbt3_s001`.`supplier`.`s_comment` AS `s_comment` from `dbt3_s001`.`part` join `dbt3_s001`.`supplier` join `dbt3_s001`.`partsupp` join `dbt3_s001`.`nation` join `dbt3_s001`.`region` where ((`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`partsupp`.`ps_suppkey` = `dbt3_s001`.`supplier`.`s_suppkey`) and (`dbt3_s001`.`part`.`p_size` = 9) and (`dbt3_s001`.`supplier`.`s_nationkey` = `dbt3_s001`.`nation`.`n_nationkey`) and (`dbt3_s001`.`nation`.`n_regionkey` = `dbt3_s001`.`region`.`r_regionkey`) and (`dbt3_s001`.`region`.`r_name` = 'ASIA') and (`dbt3_s001`.`part`.`p_type` like '%TIN') and (`dbt3_s001`.`partsupp`.`ps_supplycost` = <expr_cache><`dbt3_s001`.`part`.`p_partkey`>((select min(`dbt3_s001`.`partsupp`.`ps_supplycost`) from `dbt3_s001`.`partsupp` join `dbt3_s001`.`supplier` join `dbt3_s001`.`nation` join `dbt3_s001`.`region` where ((`dbt3_s001`.`supplier`.`s_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`nation`.`n_nationkey` = `dbt3_s001`.`supplier`.`s_nationkey`) and (`dbt3_s001`.`nation`.`n_regionkey` = `dbt3_s001`.`region`.`r_regionkey`) and (`dbt3_s001`.`region`.`r_name` = 'ASIA') and (`dbt3_s001`.`part`.`p_partkey` = `dbt3_s001`.`partsupp`.`ps_partkey`)))))) order by `dbt3_s001`.`supplier`.`s_acctbal` desc,`dbt3_s001`.`nation`.`n_name`,`dbt3_s001`.`supplier`.`s_name`,`dbt3_s001`.`part`.`p_partkey` +=== Q15 === +create view revenue0 (supplier_no, total_revenue) as +select l_suppkey, sum(l_extendedprice * (1 - l_discount)) +from lineitem +where +l_shipdate >= '1995-08-01' + and l_shipdate < date_add('1995-08-01', interval 90 day) +group by l_suppkey; +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='index_condition_pushdown=off'; +set optimizer_use_condition_selectivity=1; +EXPLAIN EXTENDED select s_suppkey, s_name, s_address, s_phone, total_revenue +from supplier, revenue0 +where s_suppkey = supplier_no +and total_revenue = (select max(total_revenue) from revenue0) +order by s_suppkey; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY supplier ALL PRIMARY NULL NULL NULL 10 100.00 Using filesort +1 PRIMARY <derived3> ref key0 key0 5 dbt3_s001.supplier.s_suppkey 10 100.00 Using where +3 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 268 100.00 Using where; Using temporary; Using filesort +2 SUBQUERY <derived4> ALL NULL NULL NULL NULL 268 100.00 +4 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 268 100.00 Using where; Using temporary; Using filesort +Warnings: +Note 1003 select `dbt3_s001`.`supplier`.`s_suppkey` AS `s_suppkey`,`dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address`,`dbt3_s001`.`supplier`.`s_phone` AS `s_phone`,`revenue0`.`total_revenue` AS `total_revenue` from `dbt3_s001`.`supplier` join `dbt3_s001`.`revenue0` where ((`revenue0`.`supplier_no` = `dbt3_s001`.`supplier`.`s_suppkey`) and (`revenue0`.`total_revenue` = (select max(`revenue0`.`total_revenue`) from `dbt3_s001`.`revenue0`))) order by `dbt3_s001`.`supplier`.`s_suppkey` +select s_suppkey, s_name, s_address, s_phone, total_revenue +from supplier, revenue0 +where s_suppkey = supplier_no +and total_revenue = (select max(total_revenue) from revenue0) +order by s_suppkey; +s_suppkey s_name s_address s_phone total_revenue +1 Supplier#000000001 N kD4on9OM Ipw3,gf0JBoQDd7tgrzrddZ 27-918-335-1736 729084.7773 +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED select s_suppkey, s_name, s_address, s_phone, total_revenue +from supplier, revenue0 +where s_suppkey = supplier_no +and total_revenue = (select max(total_revenue) from revenue0) +order by s_suppkey; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY supplier ALL PRIMARY NULL NULL NULL 10 100.00 Using filesort +1 PRIMARY <derived3> ref key0 key0 5 dbt3_s001.supplier.s_suppkey 10 100.00 Using where +3 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 268 100.00 Using where; Using temporary; Using filesort +2 SUBQUERY <derived4> ALL NULL NULL NULL NULL 268 100.00 +4 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 268 100.00 Using where; Using temporary; Using filesort +Warnings: +Note 1003 select `dbt3_s001`.`supplier`.`s_suppkey` AS `s_suppkey`,`dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address`,`dbt3_s001`.`supplier`.`s_phone` AS `s_phone`,`revenue0`.`total_revenue` AS `total_revenue` from `dbt3_s001`.`supplier` join `dbt3_s001`.`revenue0` where ((`revenue0`.`supplier_no` = `dbt3_s001`.`supplier`.`s_suppkey`) and (`revenue0`.`total_revenue` = (select max(`revenue0`.`total_revenue`) from `dbt3_s001`.`revenue0`))) order by `dbt3_s001`.`supplier`.`s_suppkey` +select s_suppkey, s_name, s_address, s_phone, total_revenue +from supplier, revenue0 +where s_suppkey = supplier_no +and total_revenue = (select max(total_revenue) from revenue0) +order by s_suppkey; +s_suppkey s_name s_address s_phone total_revenue +1 Supplier#000000001 N kD4on9OM Ipw3,gf0JBoQDd7tgrzrddZ 27-918-335-1736 729084.7773 +set optimizer_switch=@save_optimizer_switch; +drop view revenue0; +=== Q16 === +set optimizer_use_condition_selectivity=1; +EXPLAIN EXTENDED select p_brand, p_type, p_size, count(distinct ps_suppkey) as supplier_cnt +from partsupp, part +where p_partkey = ps_partkey +and p_brand <> 'Brand#11' + and p_type not like 'SMALL POLISHED%' + and p_size in (49, 37, 27, 5, 40, 6, 22, 8) +and ps_suppkey not in (select s_suppkey from supplier +where s_comment like '%Customer%Complaints%') +group by p_brand, p_type, p_size +order by supplier_cnt desc, p_brand, p_type, p_size; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY part ALL PRIMARY NULL NULL NULL 200 100.00 Using where; Using temporary; Using filesort +1 PRIMARY partsupp ref PRIMARY,i_ps_partkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where; Using index +2 MATERIALIZED supplier ALL PRIMARY NULL NULL NULL 10 100.00 Using where +Warnings: +Note 1003 select `dbt3_s001`.`part`.`p_brand` AS `p_brand`,`dbt3_s001`.`part`.`p_type` AS `p_type`,`dbt3_s001`.`part`.`p_size` AS `p_size`,count(distinct `dbt3_s001`.`partsupp`.`ps_suppkey`) AS `supplier_cnt` from `dbt3_s001`.`partsupp` join `dbt3_s001`.`part` where ((`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`part`.`p_brand` <> 'Brand#11') and (not((`dbt3_s001`.`part`.`p_type` like 'SMALL POLISHED%'))) and (`dbt3_s001`.`part`.`p_size` in (49,37,27,5,40,6,22,8)) and (not(<expr_cache><`dbt3_s001`.`partsupp`.`ps_suppkey`>(<in_optimizer>(`dbt3_s001`.`partsupp`.`ps_suppkey`,`dbt3_s001`.`partsupp`.`ps_suppkey` in ( <materialize> (select `dbt3_s001`.`supplier`.`s_suppkey` from `dbt3_s001`.`supplier` where (`dbt3_s001`.`supplier`.`s_comment` like '%Customer%Complaints%') ), <primary_index_lookup>(`dbt3_s001`.`partsupp`.`ps_suppkey` in <temporary table> on distinct_key where ((`dbt3_s001`.`partsupp`.`ps_suppkey` = `<subquery2>`.`s_suppkey`))))))))) group by `dbt3_s001`.`part`.`p_brand`,`dbt3_s001`.`part`.`p_type`,`dbt3_s001`.`part`.`p_size` order by count(distinct `dbt3_s001`.`partsupp`.`ps_suppkey`) desc,`dbt3_s001`.`part`.`p_brand`,`dbt3_s001`.`part`.`p_type`,`dbt3_s001`.`part`.`p_size` +select p_brand, p_type, p_size, count(distinct ps_suppkey) as supplier_cnt +from partsupp, part +where p_partkey = ps_partkey +and p_brand <> 'Brand#11' + and p_type not like 'SMALL POLISHED%' + and p_size in (49, 37, 27, 5, 40, 6, 22, 8) +and ps_suppkey not in (select s_suppkey from supplier +where s_comment like '%Customer%Complaints%') +group by p_brand, p_type, p_size +order by supplier_cnt desc, p_brand, p_type, p_size; +p_brand p_type p_size supplier_cnt +Brand#21 MEDIUM ANODIZED TIN 8 4 +Brand#22 PROMO PLATED TIN 5 4 +Brand#24 MEDIUM BURNISHED NICKEL 6 4 +Brand#24 SMALL ANODIZED STEEL 40 4 +Brand#32 MEDIUM BURNISHED BRASS 49 4 +Brand#33 MEDIUM POLISHED BRASS 49 4 +Brand#41 STANDARD BRUSHED NICKEL 40 4 +Brand#44 PROMO POLISHED STEEL 5 4 +Brand#45 PROMO ANODIZED BRASS 22 4 +Brand#53 STANDARD BRUSHED STEEL 27 4 +Brand#54 MEDIUM POLISHED BRASS 22 4 +Brand#54 STANDARD ANODIZED BRASS 22 4 +Brand#13 LARGE BRUSHED STEEL 8 2 +Brand#25 ECONOMY BURNISHED COPPER 27 2 +Brand#44 STANDARD PLATED TIN 37 1 +Brand#51 ECONOMY POLISHED STEEL 49 1 +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED select p_brand, p_type, p_size, count(distinct ps_suppkey) as supplier_cnt +from partsupp, part +where p_partkey = ps_partkey +and p_brand <> 'Brand#11' + and p_type not like 'SMALL POLISHED%' + and p_size in (49, 37, 27, 5, 40, 6, 22, 8) +and ps_suppkey not in (select s_suppkey from supplier +where s_comment like '%Customer%Complaints%') +group by p_brand, p_type, p_size +order by supplier_cnt desc, p_brand, p_type, p_size; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY part ALL PRIMARY NULL NULL NULL 200 16.67 Using where; Using temporary; Using filesort +1 PRIMARY partsupp ref PRIMARY,i_ps_partkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where; Using index +2 MATERIALIZED supplier ALL PRIMARY NULL NULL NULL 10 100.00 Using where +Warnings: +Note 1003 select `dbt3_s001`.`part`.`p_brand` AS `p_brand`,`dbt3_s001`.`part`.`p_type` AS `p_type`,`dbt3_s001`.`part`.`p_size` AS `p_size`,count(distinct `dbt3_s001`.`partsupp`.`ps_suppkey`) AS `supplier_cnt` from `dbt3_s001`.`partsupp` join `dbt3_s001`.`part` where ((`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`part`.`p_brand` <> 'Brand#11') and (not((`dbt3_s001`.`part`.`p_type` like 'SMALL POLISHED%'))) and (`dbt3_s001`.`part`.`p_size` in (49,37,27,5,40,6,22,8)) and (not(<expr_cache><`dbt3_s001`.`partsupp`.`ps_suppkey`>(<in_optimizer>(`dbt3_s001`.`partsupp`.`ps_suppkey`,`dbt3_s001`.`partsupp`.`ps_suppkey` in ( <materialize> (select `dbt3_s001`.`supplier`.`s_suppkey` from `dbt3_s001`.`supplier` where (`dbt3_s001`.`supplier`.`s_comment` like '%Customer%Complaints%') ), <primary_index_lookup>(`dbt3_s001`.`partsupp`.`ps_suppkey` in <temporary table> on distinct_key where ((`dbt3_s001`.`partsupp`.`ps_suppkey` = `<subquery2>`.`s_suppkey`))))))))) group by `dbt3_s001`.`part`.`p_brand`,`dbt3_s001`.`part`.`p_type`,`dbt3_s001`.`part`.`p_size` order by count(distinct `dbt3_s001`.`partsupp`.`ps_suppkey`) desc,`dbt3_s001`.`part`.`p_brand`,`dbt3_s001`.`part`.`p_type`,`dbt3_s001`.`part`.`p_size` +select p_brand, p_type, p_size, count(distinct ps_suppkey) as supplier_cnt +from partsupp, part +where p_partkey = ps_partkey +and p_brand <> 'Brand#11' + and p_type not like 'SMALL POLISHED%' + and p_size in (49, 37, 27, 5, 40, 6, 22, 8) +and ps_suppkey not in (select s_suppkey from supplier +where s_comment like '%Customer%Complaints%') +group by p_brand, p_type, p_size +order by supplier_cnt desc, p_brand, p_type, p_size; +p_brand p_type p_size supplier_cnt +Brand#21 MEDIUM ANODIZED TIN 8 4 +Brand#22 PROMO PLATED TIN 5 4 +Brand#24 MEDIUM BURNISHED NICKEL 6 4 +Brand#24 SMALL ANODIZED STEEL 40 4 +Brand#32 MEDIUM BURNISHED BRASS 49 4 +Brand#33 MEDIUM POLISHED BRASS 49 4 +Brand#41 STANDARD BRUSHED NICKEL 40 4 +Brand#44 PROMO POLISHED STEEL 5 4 +Brand#45 PROMO ANODIZED BRASS 22 4 +Brand#53 STANDARD BRUSHED STEEL 27 4 +Brand#54 MEDIUM POLISHED BRASS 22 4 +Brand#54 STANDARD ANODIZED BRASS 22 4 +Brand#13 LARGE BRUSHED STEEL 8 2 +Brand#25 ECONOMY BURNISHED COPPER 27 2 +Brand#44 STANDARD PLATED TIN 37 1 +Brand#51 ECONOMY POLISHED STEEL 49 1 +set optimizer_use_condition_selectivity=4; +EXPLAIN EXTENDED select p_brand, p_type, p_size, count(distinct ps_suppkey) as supplier_cnt +from partsupp, part +where p_partkey = ps_partkey +and p_brand <> 'Brand#11' + and p_type not like 'SMALL POLISHED%' + and p_size in (49, 37, 27, 5, 40, 6, 22, 8) +and ps_suppkey not in (select s_suppkey from supplier +where s_comment like '%Customer%Complaints%') +group by p_brand, p_type, p_size +order by supplier_cnt desc, p_brand, p_type, p_size; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY part ALL PRIMARY NULL NULL NULL 200 16.67 Using where; Using temporary; Using filesort +1 PRIMARY partsupp ref PRIMARY,i_ps_partkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where; Using index +2 MATERIALIZED supplier ALL PRIMARY NULL NULL NULL 10 100.00 Using where +Warnings: +Note 1003 select `dbt3_s001`.`part`.`p_brand` AS `p_brand`,`dbt3_s001`.`part`.`p_type` AS `p_type`,`dbt3_s001`.`part`.`p_size` AS `p_size`,count(distinct `dbt3_s001`.`partsupp`.`ps_suppkey`) AS `supplier_cnt` from `dbt3_s001`.`partsupp` join `dbt3_s001`.`part` where ((`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`part`.`p_brand` <> 'Brand#11') and (not((`dbt3_s001`.`part`.`p_type` like 'SMALL POLISHED%'))) and (`dbt3_s001`.`part`.`p_size` in (49,37,27,5,40,6,22,8)) and (not(<expr_cache><`dbt3_s001`.`partsupp`.`ps_suppkey`>(<in_optimizer>(`dbt3_s001`.`partsupp`.`ps_suppkey`,`dbt3_s001`.`partsupp`.`ps_suppkey` in ( <materialize> (select `dbt3_s001`.`supplier`.`s_suppkey` from `dbt3_s001`.`supplier` where (`dbt3_s001`.`supplier`.`s_comment` like '%Customer%Complaints%') ), <primary_index_lookup>(`dbt3_s001`.`partsupp`.`ps_suppkey` in <temporary table> on distinct_key where ((`dbt3_s001`.`partsupp`.`ps_suppkey` = `<subquery2>`.`s_suppkey`))))))))) group by `dbt3_s001`.`part`.`p_brand`,`dbt3_s001`.`part`.`p_type`,`dbt3_s001`.`part`.`p_size` order by count(distinct `dbt3_s001`.`partsupp`.`ps_suppkey`) desc,`dbt3_s001`.`part`.`p_brand`,`dbt3_s001`.`part`.`p_type`,`dbt3_s001`.`part`.`p_size` +select p_brand, p_type, p_size, count(distinct ps_suppkey) as supplier_cnt +from partsupp, part +where p_partkey = ps_partkey +and p_brand <> 'Brand#11' + and p_type not like 'SMALL POLISHED%' + and p_size in (49, 37, 27, 5, 40, 6, 22, 8) +and ps_suppkey not in (select s_suppkey from supplier +where s_comment like '%Customer%Complaints%') +group by p_brand, p_type, p_size +order by supplier_cnt desc, p_brand, p_type, p_size; +p_brand p_type p_size supplier_cnt +Brand#21 MEDIUM ANODIZED TIN 8 4 +Brand#22 PROMO PLATED TIN 5 4 +Brand#24 MEDIUM BURNISHED NICKEL 6 4 +Brand#24 SMALL ANODIZED STEEL 40 4 +Brand#32 MEDIUM BURNISHED BRASS 49 4 +Brand#33 MEDIUM POLISHED BRASS 49 4 +Brand#41 STANDARD BRUSHED NICKEL 40 4 +Brand#44 PROMO POLISHED STEEL 5 4 +Brand#45 PROMO ANODIZED BRASS 22 4 +Brand#53 STANDARD BRUSHED STEEL 27 4 +Brand#54 MEDIUM POLISHED BRASS 22 4 +Brand#54 STANDARD ANODIZED BRASS 22 4 +Brand#13 LARGE BRUSHED STEEL 8 2 +Brand#25 ECONOMY BURNISHED COPPER 27 2 +Brand#44 STANDARD PLATED TIN 37 1 +Brand#51 ECONOMY POLISHED STEEL 49 1 +=== Q18 === +set optimizer_use_condition_selectivity=1; +EXPLAIN EXTENDED select +c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity) +from customer, orders, lineitem +where +o_orderkey in (select l_orderkey from lineitem +group by l_orderkey having sum(l_quantity) > 250) +and c_custkey = o_custkey +and o_orderkey = l_orderkey +group by c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice +order by o_totalprice desc, o_orderdate; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY orders ALL PRIMARY,i_o_custkey NULL NULL NULL 1500 100.00 Using where; Using temporary; Using filesort +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 dbt3_s001.orders.o_orderkey 1 100.00 +1 PRIMARY customer eq_ref PRIMARY PRIMARY 4 dbt3_s001.orders.o_custkey 1 100.00 +1 PRIMARY lineitem ref PRIMARY,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey_quantity 4 dbt3_s001.orders.o_orderkey 4 100.00 Using index +2 MATERIALIZED lineitem index NULL i_l_orderkey_quantity 13 NULL 6005 100.00 Using index +Warnings: +Note 1003 select `dbt3_s001`.`customer`.`c_name` AS `c_name`,`dbt3_s001`.`customer`.`c_custkey` AS `c_custkey`,`dbt3_s001`.`orders`.`o_orderkey` AS `o_orderkey`,`dbt3_s001`.`orders`.`o_orderDATE` AS `o_orderdate`,`dbt3_s001`.`orders`.`o_totalprice` AS `o_totalprice`,sum(`dbt3_s001`.`lineitem`.`l_quantity`) AS `sum(l_quantity)` from <materialize> (select `dbt3_s001`.`lineitem`.`l_orderkey` from `dbt3_s001`.`lineitem` group by `dbt3_s001`.`lineitem`.`l_orderkey` having (sum(`dbt3_s001`.`lineitem`.`l_quantity`) > 250)) join `dbt3_s001`.`customer` join `dbt3_s001`.`orders` join `dbt3_s001`.`lineitem` where ((`dbt3_s001`.`customer`.`c_custkey` = `dbt3_s001`.`orders`.`o_custkey`) and (`<subquery2>`.`l_orderkey` = `dbt3_s001`.`orders`.`o_orderkey`) and (`dbt3_s001`.`lineitem`.`l_orderkey` = `dbt3_s001`.`orders`.`o_orderkey`)) group by `dbt3_s001`.`customer`.`c_name`,`dbt3_s001`.`customer`.`c_custkey`,`dbt3_s001`.`orders`.`o_orderkey`,`dbt3_s001`.`orders`.`o_orderDATE`,`dbt3_s001`.`orders`.`o_totalprice` order by `dbt3_s001`.`orders`.`o_totalprice` desc,`dbt3_s001`.`orders`.`o_orderDATE` +select +c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity) +from customer, orders, lineitem +where +o_orderkey in (select l_orderkey from lineitem +group by l_orderkey having sum(l_quantity) > 250) +and c_custkey = o_custkey +and o_orderkey = l_orderkey +group by c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice +order by o_totalprice desc, o_orderdate; +c_name c_custkey o_orderkey o_orderdate o_totalprice sum(l_quantity) +Customer#000000070 70 2567 1998-02-27 263411.29 266 +Customer#000000010 10 4421 1997-04-04 258779.02 255 +Customer#000000082 82 3460 1995-10-03 245976.74 254 +Customer#000000068 68 2208 1995-05-01 245388.06 256 +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED select +c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity) +from customer, orders, lineitem +where +o_orderkey in (select l_orderkey from lineitem +group by l_orderkey having sum(l_quantity) > 250) +and c_custkey = o_custkey +and o_orderkey = l_orderkey +group by c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice +order by o_totalprice desc, o_orderdate; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 6005 0.00 Using temporary; Using filesort +1 PRIMARY orders eq_ref PRIMARY,i_o_custkey PRIMARY 4 <subquery2>.l_orderkey 1 100.00 Using where +1 PRIMARY customer eq_ref PRIMARY PRIMARY 4 dbt3_s001.orders.o_custkey 1 100.00 +1 PRIMARY lineitem ref PRIMARY,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 <subquery2>.l_orderkey 4 100.00 +2 MATERIALIZED lineitem index NULL i_l_orderkey_quantity 13 NULL 6005 100.00 Using index +Warnings: +Note 1003 select `dbt3_s001`.`customer`.`c_name` AS `c_name`,`dbt3_s001`.`customer`.`c_custkey` AS `c_custkey`,`dbt3_s001`.`orders`.`o_orderkey` AS `o_orderkey`,`dbt3_s001`.`orders`.`o_orderDATE` AS `o_orderdate`,`dbt3_s001`.`orders`.`o_totalprice` AS `o_totalprice`,sum(`dbt3_s001`.`lineitem`.`l_quantity`) AS `sum(l_quantity)` from <materialize> (select `dbt3_s001`.`lineitem`.`l_orderkey` from `dbt3_s001`.`lineitem` group by `dbt3_s001`.`lineitem`.`l_orderkey` having (sum(`dbt3_s001`.`lineitem`.`l_quantity`) > 250)) join `dbt3_s001`.`customer` join `dbt3_s001`.`orders` join `dbt3_s001`.`lineitem` where ((`dbt3_s001`.`customer`.`c_custkey` = `dbt3_s001`.`orders`.`o_custkey`) and (`dbt3_s001`.`orders`.`o_orderkey` = `<subquery2>`.`l_orderkey`) and (`dbt3_s001`.`lineitem`.`l_orderkey` = `<subquery2>`.`l_orderkey`)) group by `dbt3_s001`.`customer`.`c_name`,`dbt3_s001`.`customer`.`c_custkey`,`dbt3_s001`.`orders`.`o_orderkey`,`dbt3_s001`.`orders`.`o_orderDATE`,`dbt3_s001`.`orders`.`o_totalprice` order by `dbt3_s001`.`orders`.`o_totalprice` desc,`dbt3_s001`.`orders`.`o_orderDATE` +select +c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity) +from customer, orders, lineitem +where +o_orderkey in (select l_orderkey from lineitem +group by l_orderkey having sum(l_quantity) > 250) +and c_custkey = o_custkey +and o_orderkey = l_orderkey +group by c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice +order by o_totalprice desc, o_orderdate; +c_name c_custkey o_orderkey o_orderdate o_totalprice sum(l_quantity) +Customer#000000070 70 2567 1998-02-27 263411.29 266 +Customer#000000010 10 4421 1997-04-04 258779.02 255 +Customer#000000082 82 3460 1995-10-03 245976.74 254 +Customer#000000068 68 2208 1995-05-01 245388.06 256 +=== Q22 === +set optimizer_use_condition_selectivity=1; +EXPLAIN EXTENDED select cntrycode, count(*) as numcust, sum(c_acctbal) as totacctbal +from ( +select substr(c_phone, 1, 2) as cntrycode, c_acctbal +from customer +where +substr(c_phone, 1, 2) in ('10', '20', '14', '19', '11', '28', '25') +and c_acctbal > (select avg(c_acctbal) from customer +where c_acctbal > 0.00 +and substr(c_phone, 1, 2) in +('10', '20', '14', '19', '11', '28', '25')) +and not exists (select * from orders where o_custkey = c_custkey) +) as vip +group by cntrycode +order by cntrycode; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY customer ALL NULL NULL NULL NULL 150 100.00 Using where; Using temporary; Using filesort +4 DEPENDENT SUBQUERY orders ref i_o_custkey i_o_custkey 5 dbt3_s001.customer.c_custkey 15 100.00 Using index +3 SUBQUERY customer ALL NULL NULL NULL NULL 150 100.00 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.customer.c_custkey' of SELECT #4 was resolved in SELECT #2 +Note 1003 select substr(`dbt3_s001`.`customer`.`c_phone`,1,2) AS `cntrycode`,count(0) AS `numcust`,sum(`dbt3_s001`.`customer`.`c_acctbal`) AS `totacctbal` from `dbt3_s001`.`customer` where ((substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25')) and (`dbt3_s001`.`customer`.`c_acctbal` > (select avg(`dbt3_s001`.`customer`.`c_acctbal`) from `dbt3_s001`.`customer` where ((`dbt3_s001`.`customer`.`c_acctbal` > 0.00) and (substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25'))))) and (not(<in_optimizer>(1,exists(select 1 from `dbt3_s001`.`orders` where (`dbt3_s001`.`orders`.`o_custkey` = `dbt3_s001`.`customer`.`c_custkey`)))))) group by substr(`dbt3_s001`.`customer`.`c_phone`,1,2) order by substr(`dbt3_s001`.`customer`.`c_phone`,1,2) +select cntrycode, count(*) as numcust, sum(c_acctbal) as totacctbal +from ( +select substr(c_phone, 1, 2) as cntrycode, c_acctbal +from customer +where +substr(c_phone, 1, 2) in ('10', '20', '14', '19', '11', '28', '25') +and c_acctbal > (select avg(c_acctbal) from customer +where c_acctbal > 0.00 +and substr(c_phone, 1, 2) in +('10', '20', '14', '19', '11', '28', '25')) +and not exists (select * from orders where o_custkey = c_custkey) +) as vip +group by cntrycode +order by cntrycode; +cntrycode numcust totacctbal +11 4 29942.58 +19 2 17120.35 +20 1 9091.82 +28 2 14755.5 +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED select cntrycode, count(*) as numcust, sum(c_acctbal) as totacctbal +from ( +select substr(c_phone, 1, 2) as cntrycode, c_acctbal +from customer +where +substr(c_phone, 1, 2) in ('10', '20', '14', '19', '11', '28', '25') +and c_acctbal > (select avg(c_acctbal) from customer +where c_acctbal > 0.00 +and substr(c_phone, 1, 2) in +('10', '20', '14', '19', '11', '28', '25')) +and not exists (select * from orders where o_custkey = c_custkey) +) as vip +group by cntrycode +order by cntrycode; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY customer ALL NULL NULL NULL NULL 150 100.00 Using where; Using temporary; Using filesort +4 DEPENDENT SUBQUERY orders ref i_o_custkey i_o_custkey 5 dbt3_s001.customer.c_custkey 15 100.00 Using index +3 SUBQUERY customer ALL NULL NULL NULL NULL 150 91.00 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.customer.c_custkey' of SELECT #4 was resolved in SELECT #2 +Note 1003 select substr(`dbt3_s001`.`customer`.`c_phone`,1,2) AS `cntrycode`,count(0) AS `numcust`,sum(`dbt3_s001`.`customer`.`c_acctbal`) AS `totacctbal` from `dbt3_s001`.`customer` where ((substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25')) and (`dbt3_s001`.`customer`.`c_acctbal` > (select avg(`dbt3_s001`.`customer`.`c_acctbal`) from `dbt3_s001`.`customer` where ((`dbt3_s001`.`customer`.`c_acctbal` > 0.00) and (substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25'))))) and (not(<in_optimizer>(1,exists(select 1 from `dbt3_s001`.`orders` where (`dbt3_s001`.`orders`.`o_custkey` = `dbt3_s001`.`customer`.`c_custkey`)))))) group by substr(`dbt3_s001`.`customer`.`c_phone`,1,2) order by substr(`dbt3_s001`.`customer`.`c_phone`,1,2) +select cntrycode, count(*) as numcust, sum(c_acctbal) as totacctbal +from ( +select substr(c_phone, 1, 2) as cntrycode, c_acctbal +from customer +where +substr(c_phone, 1, 2) in ('10', '20', '14', '19', '11', '28', '25') +and c_acctbal > (select avg(c_acctbal) from customer +where c_acctbal > 0.00 +and substr(c_phone, 1, 2) in +('10', '20', '14', '19', '11', '28', '25')) +and not exists (select * from orders where o_custkey = c_custkey) +) as vip +group by cntrycode +order by cntrycode; +cntrycode numcust totacctbal +11 4 29942.58 +19 2 17120.35 +20 1 9091.82 +28 2 14755.5 +=== Q20 === +set optimizer_use_condition_selectivity=1; +EXPLAIN EXTENDED select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY supplier ALL PRIMARY,i_s_nationkey NULL NULL NULL 10 100.00 Using where; Using filesort +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +1 PRIMARY nation eq_ref PRIMARY PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 100.00 Using where +2 MATERIALIZED part ALL PRIMARY NULL NULL NULL 200 100.00 Using where +2 MATERIALIZED partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where +4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 100.00 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2 +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2 +Note 1003 select sql_calc_found_rows `dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address` from `dbt3_s001`.`supplier` semi join (`dbt3_s001`.`part` join `dbt3_s001`.`partsupp`) join `dbt3_s001`.`nation` where ((`dbt3_s001`.`nation`.`n_nationkey` = `dbt3_s001`.`supplier`.`s_nationkey`) and (`dbt3_s001`.`nation`.`n_name` = 'UNITED STATES') and (`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`partsupp`.`ps_availqty` > <expr_cache><`dbt3_s001`.`partsupp`.`ps_partkey`,`dbt3_s001`.`partsupp`.`ps_suppkey`>((select (0.5 * sum(`dbt3_s001`.`lineitem`.`l_quantity`)) from `dbt3_s001`.`lineitem` where ((`dbt3_s001`.`lineitem`.`l_partkey` = `dbt3_s001`.`partsupp`.`ps_partkey`) and (`dbt3_s001`.`lineitem`.`l_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`lineitem`.`l_shipDATE` >= <cache>(cast('1993-01-01' as date))) and (`dbt3_s001`.`lineitem`.`l_shipDATE` < <cache>((cast('1993-01-01' as date) + interval '1' year))))))) and (`dbt3_s001`.`part`.`p_name` like 'g%')) order by `dbt3_s001`.`supplier`.`s_name` limit 10 +select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +s_name s_address +Supplier#000000010 Saygah3gYWMp72i PY +SELECT ((SELECT COUNT(*) FROM part WHERE p_name LIKE 'g%') / +(SELECT COUNT(*) FROM part)) AS sel; +sel +0.0600 +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY nation ALL PRIMARY NULL NULL NULL 25 4.00 Using where; Using temporary; Using filesort +1 PRIMARY supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1 100.00 +1 PRIMARY part ALL PRIMARY NULL NULL NULL 200 4.17 Using where; Start temporary; Using join buffer (flat, BNL join) +1 PRIMARY partsupp eq_ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 8 dbt3_s001.part.p_partkey,dbt3_s001.supplier.s_suppkey 1 100.00 Using where; End temporary +4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 15.14 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2 +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2 +Note 1003 select sql_calc_found_rows `dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address` from `dbt3_s001`.`supplier` semi join (`dbt3_s001`.`part` join `dbt3_s001`.`partsupp`) join `dbt3_s001`.`nation` where ((`dbt3_s001`.`supplier`.`s_nationkey` = `dbt3_s001`.`nation`.`n_nationkey`) and (`dbt3_s001`.`nation`.`n_name` = 'UNITED STATES') and (`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`partsupp`.`ps_suppkey` = `dbt3_s001`.`supplier`.`s_suppkey`) and (`dbt3_s001`.`partsupp`.`ps_availqty` > <expr_cache><`dbt3_s001`.`partsupp`.`ps_partkey`,`dbt3_s001`.`partsupp`.`ps_suppkey`>((select (0.5 * sum(`dbt3_s001`.`lineitem`.`l_quantity`)) from `dbt3_s001`.`lineitem` where ((`dbt3_s001`.`lineitem`.`l_partkey` = `dbt3_s001`.`partsupp`.`ps_partkey`) and (`dbt3_s001`.`lineitem`.`l_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`lineitem`.`l_shipDATE` >= <cache>(cast('1993-01-01' as date))) and (`dbt3_s001`.`lineitem`.`l_shipDATE` < <cache>((cast('1993-01-01' as date) + interval '1' year))))))) and (`dbt3_s001`.`part`.`p_name` like 'g%')) order by `dbt3_s001`.`supplier`.`s_name` limit 10 +select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +s_name s_address +Supplier#000000010 Saygah3gYWMp72i PY +set histogram_size=127; +ANALYZE TABLE part PERSISTENT FOR COLUMNS(p_name) INDEXES(); +Table Op Msg_type Msg_text +dbt3_s001.part analyze status Engine-independent statistics collected +dbt3_s001.part analyze status Table is already up to date +flush table part; +set optimizer_use_condition_selectivity=4; +EXPLAIN EXTENDED select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY nation ALL PRIMARY NULL NULL NULL 25 4.00 Using where; Using temporary; Using filesort +1 PRIMARY supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1 100.00 +1 PRIMARY part ALL PRIMARY NULL NULL NULL 200 7.03 Using where +1 PRIMARY partsupp eq_ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 8 dbt3_s001.part.p_partkey,dbt3_s001.supplier.s_suppkey 1 100.00 Using where; FirstMatch(supplier) +4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 15.14 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2 +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2 +Note 1003 select sql_calc_found_rows `dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address` from `dbt3_s001`.`supplier` semi join (`dbt3_s001`.`part` join `dbt3_s001`.`partsupp`) join `dbt3_s001`.`nation` where ((`dbt3_s001`.`supplier`.`s_nationkey` = `dbt3_s001`.`nation`.`n_nationkey`) and (`dbt3_s001`.`nation`.`n_name` = 'UNITED STATES') and (`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`partsupp`.`ps_suppkey` = `dbt3_s001`.`supplier`.`s_suppkey`) and (`dbt3_s001`.`partsupp`.`ps_availqty` > <expr_cache><`dbt3_s001`.`partsupp`.`ps_partkey`,`dbt3_s001`.`partsupp`.`ps_suppkey`>((select (0.5 * sum(`dbt3_s001`.`lineitem`.`l_quantity`)) from `dbt3_s001`.`lineitem` where ((`dbt3_s001`.`lineitem`.`l_partkey` = `dbt3_s001`.`partsupp`.`ps_partkey`) and (`dbt3_s001`.`lineitem`.`l_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`lineitem`.`l_shipDATE` >= <cache>(cast('1993-01-01' as date))) and (`dbt3_s001`.`lineitem`.`l_shipDATE` < <cache>((cast('1993-01-01' as date) + interval '1' year))))))) and (`dbt3_s001`.`part`.`p_name` like 'g%')) order by `dbt3_s001`.`supplier`.`s_name` limit 10 +select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +s_name s_address +Supplier#000000010 Saygah3gYWMp72i PY +set histogram_type='DOUBLE_PREC_HB'; +set histogram_size=126; +ANALYZE TABLE part PERSISTENT FOR COLUMNS(p_name) INDEXES(); +Table Op Msg_type Msg_text +dbt3_s001.part analyze status Engine-independent statistics collected +dbt3_s001.part analyze status Table is already up to date +flush table part; +EXPLAIN EXTENDED select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY nation ALL PRIMARY NULL NULL NULL 25 4.00 Using where; Using temporary; Using filesort +1 PRIMARY supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1 100.00 +1 PRIMARY part ALL PRIMARY NULL NULL NULL 200 7.81 Using where +1 PRIMARY partsupp eq_ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 8 dbt3_s001.part.p_partkey,dbt3_s001.supplier.s_suppkey 1 100.00 Using where; FirstMatch(supplier) +4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 15.14 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2 +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2 +Note 1003 select sql_calc_found_rows `dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address` from `dbt3_s001`.`supplier` semi join (`dbt3_s001`.`part` join `dbt3_s001`.`partsupp`) join `dbt3_s001`.`nation` where ((`dbt3_s001`.`supplier`.`s_nationkey` = `dbt3_s001`.`nation`.`n_nationkey`) and (`dbt3_s001`.`nation`.`n_name` = 'UNITED STATES') and (`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`partsupp`.`ps_suppkey` = `dbt3_s001`.`supplier`.`s_suppkey`) and (`dbt3_s001`.`partsupp`.`ps_availqty` > <expr_cache><`dbt3_s001`.`partsupp`.`ps_partkey`,`dbt3_s001`.`partsupp`.`ps_suppkey`>((select (0.5 * sum(`dbt3_s001`.`lineitem`.`l_quantity`)) from `dbt3_s001`.`lineitem` where ((`dbt3_s001`.`lineitem`.`l_partkey` = `dbt3_s001`.`partsupp`.`ps_partkey`) and (`dbt3_s001`.`lineitem`.`l_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`lineitem`.`l_shipDATE` >= <cache>(cast('1993-01-01' as date))) and (`dbt3_s001`.`lineitem`.`l_shipDATE` < <cache>((cast('1993-01-01' as date) + interval '1' year))))))) and (`dbt3_s001`.`part`.`p_name` like 'g%')) order by `dbt3_s001`.`supplier`.`s_name` limit 10 +select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +s_name s_address +Supplier#000000010 Saygah3gYWMp72i PY +set histogram_type='SINGLE_PREC_HB'; +set histogram_size=24; +ANALYZE TABLE nation PERSISTENT FOR COLUMNS(n_name) INDEXES(); +Table Op Msg_type Msg_text +dbt3_s001.nation analyze status Engine-independent statistics collected +dbt3_s001.nation analyze status Table is already up to date +flush table nation; +EXPLAIN EXTENDED select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY nation ALL PRIMARY NULL NULL NULL 25 4.00 Using where; Using temporary; Using filesort +1 PRIMARY supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1 100.00 +1 PRIMARY part ALL PRIMARY NULL NULL NULL 200 7.81 Using where +1 PRIMARY partsupp eq_ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 8 dbt3_s001.part.p_partkey,dbt3_s001.supplier.s_suppkey 1 100.00 Using where; FirstMatch(supplier) +4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 15.14 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2 +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2 +Note 1003 select sql_calc_found_rows `dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address` from `dbt3_s001`.`supplier` semi join (`dbt3_s001`.`part` join `dbt3_s001`.`partsupp`) join `dbt3_s001`.`nation` where ((`dbt3_s001`.`supplier`.`s_nationkey` = `dbt3_s001`.`nation`.`n_nationkey`) and (`dbt3_s001`.`nation`.`n_name` = 'UNITED STATES') and (`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`partsupp`.`ps_suppkey` = `dbt3_s001`.`supplier`.`s_suppkey`) and (`dbt3_s001`.`partsupp`.`ps_availqty` > <expr_cache><`dbt3_s001`.`partsupp`.`ps_partkey`,`dbt3_s001`.`partsupp`.`ps_suppkey`>((select (0.5 * sum(`dbt3_s001`.`lineitem`.`l_quantity`)) from `dbt3_s001`.`lineitem` where ((`dbt3_s001`.`lineitem`.`l_partkey` = `dbt3_s001`.`partsupp`.`ps_partkey`) and (`dbt3_s001`.`lineitem`.`l_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`lineitem`.`l_shipDATE` >= <cache>(cast('1993-01-01' as date))) and (`dbt3_s001`.`lineitem`.`l_shipDATE` < <cache>((cast('1993-01-01' as date) + interval '1' year))))))) and (`dbt3_s001`.`part`.`p_name` like 'g%')) order by `dbt3_s001`.`supplier`.`s_name` limit 10 +select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +s_name s_address +Supplier#000000010 Saygah3gYWMp72i PY +DROP DATABASE dbt3_s001; +set histogram_type=@save_histogram_type; +set histogram_size=@save_histogram_size; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +use test; +# +# Bug mdev-4348: using view with use_condition_selectivity > 1 +# +set @tmp_use_stat_tables=@@use_stat_tables; +set use_stat_tables='never'; +set optimizer_use_condition_selectivity=3; +CREATE TABLE t1 (a int, b int); +INSERT t1 VALUES (7,1), (0,7); +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; +CREATE TABLE t2 (c int, d int, index idx(d)); +INSERT INTO t2 VALUES +(0,4), (8,6), (1,3), (8,5), (9,3), (2,2), (6,2), +(1,9), (6,3), (2,8), (4,1), (0,7), (4,8), (4,5); +EXPLAIN EXTENDED +SELECT * FROM v1 INNER JOIN t2 ON ( a = c AND b = d ); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +1 SIMPLE t2 ref idx idx 5 test.t1.b 2 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`c` = `test`.`t1`.`a`) and (`test`.`t2`.`d` = `test`.`t1`.`b`)) +SELECT * FROM v1 INNER JOIN t2 ON ( a = c AND b = d ); +a b c d +0 7 0 7 +DROP VIEW v1; +DROP TABLE t1,t2; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set use_stat_tables=@tmp_use_stat_tables; +# +# Bug mdev-4349: impossible range for non-indexed column +# +set optimizer_use_condition_selectivity=3; +create table t1 (a int); +insert into t1 values +(3), (7), (2), (5), (7), (1), (2), (2); +set optimizer_use_condition_selectivity=1; +explain extended +select * from t1 where a < 1 and a > 7; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` < 1) and (`test`.`t1`.`a` > 7)) +select * from t1 where a < 1 and a > 7; +a +set optimizer_use_condition_selectivity=3; +explain extended +select * from t1 where a < 1 and a > 7; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 0 +select * from t1 where a < 1 and a > 7; +a +drop table t1; +create table t1 (a int); +insert into t1 values (1); +create table t2 (b int); +insert into t2 values (2),(3); +explain extended +select * from t1 where a in ( select b from t2 ) AND ( a > 3 ); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select 1 AS `a` from (`test`.`t2`) where 0 +select * from t1 where a in ( select b from t2 ) AND ( a > 3 ); +a +drop table t1,t2; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +# +# Bug mdev-4350: erroneous negative selectivity +# +create table t1 (a int); +insert into t1 values (1), (1); +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 values (0); +select count(*) from t1; +count(*) +1025 +set use_stat_tables='preferably'; +set histogram_size=127; +set histogram_type='SINGLE_PREC_HB'; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +flush table t1; +set optimizer_use_condition_selectivity=4; +explain extended select * from t1 where a=0; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 1025 0.39 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = 0) +drop table t1; +set histogram_size=@save_histogram_size; +set histogram_type=@save_histogram_type; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +# +# Bug mdev-4367: 2-way join with an empty table +# when optimizer_use_condition_selectivity=3 +# +set optimizer_use_condition_selectivity=3; +CREATE TABLE t1 (a varchar(1)) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('j'),('k'); +CREATE TABLE t2 (b varchar(1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('x'),('y'); +CREATE TABLE t3 (c varchar(1), KEY(c)) ENGINE=MyISAM; +SELECT * FROM t1 STRAIGHT_JOIN (t2 JOIN t3 ON c = b AND b > 'z'); +a b c +DROP TABLE t1,t2,t3; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +# +# Bug mdev-4366: impossible condition on an indexed column discovered after +# substitution of constant tables +# with optimizer_use_condition_selectivity=3 +# +CREATE TABLE t1 (pk int PRIMARY KEY, a int); +INSERT INTO t1 VALUES +(1,4), (2,6), (3,3), (4,5); +CREATE TABLE t2 (b int); +INSERT INTO t2 VALUES (1), (7); +set optimizer_use_condition_selectivity=1; +EXPLAIN EXTENDED +SELECT 1 FROM t1, t2 WHERE pk = 6 AND a = 2 AND b = 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select 1 AS `1` from `test`.`t1` join `test`.`t2` where 0 +SELECT 1 FROM t1, t2 WHERE pk = 6 AND a = 2 AND b = 10; +1 +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED +SELECT 1 FROM t1, t2 WHERE pk = 6 AND a = 2 AND b = 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select 1 AS `1` from `test`.`t1` join `test`.`t2` where 0 +SELECT 1 FROM t1, t2 WHERE pk = 6 AND a = 2 AND b = 10; +1 +DROP TABLE t1,t2; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +# +# Bug mdev-4370: Histograms have bean created, but the query is run after +# FLUSH TABLES with optimizer_use_condition_selectivity=3 +# +set use_stat_tables=PREFERABLY; +set histogram_size=10; +set histogram_type='SINGLE_PREC_HB'; +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (9), (1); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +FLUSH TABLES; +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED +SELECT * FROM t1 WHERE a > 3; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 75.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` > 3) +SELECT * FROM t1 WHERE a > 3; +a +9 +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1; +set histogram_size=@save_histogram_size; +set histogram_type=@save_histogram_type; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4371: Join with condition supported by index on an empty table +# with optimizer_use_condition_selectivity=3 +# +set use_stat_tables=PREFERABLY; +CREATE TABLE t1 (a int, b int, INDEX(a)); +CREATE TABLE t2 (c int); +INSERT INTO t2 VALUES (1),(2),(3),(4),(5),(6),(7),(8); +ANALYZE TABLE t1, t2; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status Table is already up to date +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +FLUSH TABLES; +set optimizer_use_condition_selectivity=3; +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='index_condition_pushdown=off'; +EXPLAIN EXTENDED +SELECT * FROM t1, t2 WHERE a > 9; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select NULL AS `a`,NULL AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t1` join `test`.`t2` where 0 +SELECT * FROM t1, t2 WHERE a > 9; +a b c +set optimizer_switch=@save_optimizer_switch; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4373: condition on a short varchar column +# with optimizer_use_condition_selectivity=3 +# +set use_stat_tables=PREFERABLY; +CREATE TABLE t1 (a varchar(1)); +INSERT INTO t1 VALUES ('x'), ('y'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +FLUSH TABLES; +set optimizer_use_condition_selectivity=3; +SELECT * FROM t1 WHERE a <= 'w'; +a +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4372: exists subquery in WHERE +# with optimizer_use_condition_selectivity=3 +# +set use_stat_tables = PREFERABLY; +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES +(1),(7),(4),(7),(0),(2),(9),(4),(0),(9),(1),(3),(8),(8); +CREATE TABLE t2 (b int); +INSERT INTO t2 VALUES (4),(5),(2),(5),(1),(1),(2); +ANALYZE TABLE t1, t2; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +FLUSH TABLES; +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED +SELECT * FROM t1, t2 WHERE EXISTS ( SELECT 1 FROM t1, t2 ) AND a != b OR a <= 4; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 7 100.00 +1 PRIMARY t1 ALL NULL NULL NULL NULL 14 100.00 Using where; Using join buffer (flat, BNL join) +2 SUBQUERY t2 ALL NULL NULL NULL NULL 7 100.00 +2 SUBQUERY t1 ALL NULL NULL NULL NULL 14 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where ((<cache>(<in_optimizer>(1,exists(select 1 from `test`.`t1` join `test`.`t2`))) and (`test`.`t1`.`a` <> `test`.`t2`.`b`)) or (`test`.`t1`.`a` <= 4)) +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4363: selectivity of the condition a IS NULL OR IS NOT NULL +# with optimizer_use_condition_selectivity=3 +# +set use_stat_tables = PREFERABLY; +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES +(1),(7),(4),(7),(NULL),(2),(NULL),(4),(NULL),(NULL),(1),(3),(8),(8); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +FLUSH TABLE t1; +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED +SELECT * FROM t1 WHERE a IS NULL; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 14 28.57 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where isnull(`test`.`t1`.`a`) +EXPLAIN EXTENDED +SELECT * FROM t1 WHERE a IS NOT NULL; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 14 71.43 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` is not null) +EXPLAIN EXTENDED +SELECT * FROM t1 WHERE a IS NULL OR a IS NOT NULL; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 14 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (isnull(`test`.`t1`.`a`) or (`test`.`t1`.`a` is not null)) +EXPLAIN EXTENDED +SELECT * FROM t1 WHERE a IS NULL OR a < 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 14 69.39 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (isnull(`test`.`t1`.`a`) or (`test`.`t1`.`a` < 5)) +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4378: 2-way join with a materialized IN subquery in WHERE +# when optimizer_use_condition_selectivity=4 +# +set use_stat_tables=PREFERABLY; +set histogram_size=50; +set histogram_type=SINGLE_PREC_HB; +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (8),(9),(6); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (8),(1),(8),(9),(24),(6),(1),(6),(2),(4); +CREATE TABLE t3 (ln VARCHAR(16)) ENGINE=MyISAM; +INSERT INTO t3 VALUES +('smith'),('black'),('white'),('jones'), +('brown'),('taylor'),('anderson'),('taylor'); +ANALYZE TABLE t1, t2, t3; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +test.t3 analyze status Engine-independent statistics collected +test.t3 analyze status OK +FLUSH TABLES; +set optimizer_use_condition_selectivity=4; +SELECT * FROM t1, t2 WHERE 'garcia' IN ( SELECT MIN( ln ) FROM t3 WHERE ln = 'sun' ); +a b +set histogram_size=@save_histogram_size; +set histogram_type=@save_histogram_type; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2,t3; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4380: 2-way join with a materialized IN subquery in WHERE +# when optimizer_use_condition_selectivity=3 +# +set use_stat_tables=PREFERABLY; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (5),(9); +CREATE TABLE t2 (b VARCHAR(8)); +INSERT INTO t2 VALUES ('red'),('blue'); +CREATE TABLE t3 (c VARCHAR(8), d VARCHAR(8)); +INSERT INTO t3 VALUES ('white','black'),('cyan','yellow'); +ANALYZE TABLE t1, t2, t3; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +test.t3 analyze status Engine-independent statistics collected +test.t3 analyze status OK +FLUSH TABLES; +set optimizer_use_condition_selectivity=3; +SELECT * FROM t1, t2 WHERE ( 'orange', 'green' ) IN ( +SELECT MAX(c), MAX(d) FROM t3, t2 WHERE c >= d AND b = c +); +a b +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2,t3; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4389: join with degenerated range condition in WHERE +# when optimizer_use_condition_selectivity=3 +# +set use_stat_tables=PREFERABLY; +CREATE TABLE t1 (f1 VARCHAR(1)); +INSERT t1 VALUES ('p'),('q'); +CREATE TABLE t2 (f2 VARCHAR(1)); +INSERT INTO t2 VALUES +('o'),('v'),('f'),('f'),('e'),('l'),('j'),('p'),('r'),('j'), +('j'),('u'),('i'),('r'),('x'),('a'),('x'),('s'); +ANALYZE TABLE t1, t2; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +FLUSH TABLES; +SET optimizer_use_condition_selectivity=3; +SELECT * FROM t1, t2 AS t2a, t2 AS t2b WHERE f1 <= 'a' AND t2a.f2 = f1; +f1 f2 f2 +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4406: range condition for non-nullable column +# when optimizer_use_condition_selectivity=3 +# +create table t1 (a int not null); +insert into t1 values +(7), (6), (4), (9), (1), (5), (2), (1), (3), (8); +set use_stat_tables='preferably'; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +flush table t1; +set optimizer_use_condition_selectivity=3; +select count(*) from t1 where a between 5 and 7; +count(*) +3 +explain extended select * from t1 where a between 5 and 7; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 25.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` between 5 and 7) +alter table t1 change column a a int; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +flush table t1; +explain extended select * from t1 where a between 5 and 7; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 25.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` between 5 and 7) +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t1; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-5200: impossible where with a semijoin subquery +# when optimizer_use_condition_selectivity=2 +# +set use_stat_tables = 'preferably'; +set optimizer_use_condition_selectivity = 2; +CREATE TABLE t1 (i1 int) ENGINE=MyISAM; +INSERT INTO t1 VALUES (0), (1); +CREATE TABLE t2 (pk2 int, i2 int, c2 char(1), PRIMARY KEY(pk2)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1,8,'m'), (2,9,'b'); +CREATE TABLE t3 (c3 char(1), INDEX(c3)) ENGINE=MyISAM; +INSERT INTO t3 VALUES ('v'), ('c'); +ANALYZE TABLE t1,t2,t3; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +test.t3 analyze status Engine-independent statistics collected +test.t3 analyze status OK +SELECT * FROM t1 +WHERE 2 IN ( SELECT pk2 FROM t2 LEFT JOIN t3 ON (c3 = c2 ) WHERE i2 = 3 ); +i1 +EXPLAIN EXTENDED +SELECT * FROM t1 +WHERE 2 IN ( SELECT pk2 FROM t2 LEFT JOIN t3 ON (c3 = c2 ) WHERE i2 = 3 ); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select `test`.`t1`.`i1` AS `i1` from `test`.`t1` semi join (`test`.`t2` left join `test`.`t3` on((`test`.`t3`.`c3` = 'b'))) where 0 +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2,t3; +# +# Bug mdev-5415: query over an information schema table +# when optimizer_use_condition_selectivity=3 +# +set optimizer_use_condition_selectivity = 3; +SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE SQL_MODE != ''; +TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +# +# Bug mdev-5630: always true conjunctive condition +# when optimizer_use_condition_selectivity=3 +# +set use_stat_tables = 'preferably'; +set optimizer_use_condition_selectivity = 3; +CREATE TABLE t1 (a int) ENGINE=MyISAM; +INSERT INTO t1 VALUES (10); +CREATE TABLE t2 (id int, flag char(1), INDEX(id)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (100,'0'),(101,'1'); +ANALYZE TABLE t1, t2; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +SELECT * FROM t1, t2 WHERE id = a AND ( a = 16 OR flag AND a != 6 ); +a id flag +DROP TABLE t1,t2; +# +# Bug mdev-4429: join with range condition whose selectivity == 0 +# when optimizer_use_condition_selectivity=3 +# +CREATE TABLE language (lang_group INT, lang VARCHAR(16) PRIMARY KEY); +INSERT INTO language VALUES +(1,'Chinese'),(6,'English'),(1,'French'), +(1,'German'),(1,'Italian'),(0,'Japanese'); +CREATE TABLE country (code varchar(3) PRIMARY KEY, +country_group INT DEFAULT NULL); +INSERT INTO country VALUES ('USA',3),('FRA',5); +CREATE TABLE continent (cont_group INT, cont varchar(16) PRIMARY KEY); +INSERT INTO continent VALUES +(1,'N.America'),(1,'S.America'),(3,'Australia'), +(4,'Africa'),(5,'Antarctica'),(6,'Eurasia'); +SET use_stat_tables=PREFERABLY; +ANALYZE TABLE country, language, continent; +Table Op Msg_type Msg_text +test.country analyze status Engine-independent statistics collected +test.country analyze status OK +test.language analyze status Engine-independent statistics collected +test.language analyze status OK +test.continent analyze status Engine-independent statistics collected +test.continent analyze status OK +FLUSH TABLES; +SET optimizer_use_condition_selectivity=3; +SELECT * FROM language, country, continent +WHERE country_group = lang_group AND lang_group IS NULL; +lang_group lang code country_group cont_group cont +EXPLAIN EXTENDED +SELECT * FROM language, country, continent +WHERE country_group = lang_group AND lang_group IS NULL; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE country ALL NULL NULL NULL NULL 2 0.00 Using where +1 SIMPLE language ALL NULL NULL NULL NULL 6 0.00 Using where; Using join buffer (flat, BNL join) +1 SIMPLE continent ALL NULL NULL NULL NULL 6 100.00 Using join buffer (incremental, BNL join) +Warnings: +Note 1003 select `test`.`language`.`lang_group` AS `lang_group`,`test`.`language`.`lang` AS `lang`,`test`.`country`.`code` AS `code`,`test`.`country`.`country_group` AS `country_group`,`test`.`continent`.`cont_group` AS `cont_group`,`test`.`continent`.`cont` AS `cont` from `test`.`language` join `test`.`country` join `test`.`continent` where ((`test`.`language`.`lang_group` = `test`.`country`.`country_group`) and isnull(`test`.`country`.`country_group`)) +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table language, country, continent; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-5191: performance degradation due to a suboptimal chosen plan +# when optimizer_use_condition_selectivity=3 +# +set use_stat_tables = 'preferably'; +set @@RAND_SEED1=810763568, @@RAND_SEED2=600681772; +set TIMESTAMP=1394806993; +create table t1 (a int, b int) engine=myisam; +insert t1 values (rand()*1e5, rand()*1e5); +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +create table t2 (c int, d int, key(c), key(d)) engine=myisam; +insert t2 select floor(rand()*1e5/2)*2, floor(rand()*1e5/3)*3 from t1; +analyze table t1,t2; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status Table is already up to date +set optimizer_use_condition_selectivity=1; +explain extended +select * from t1, t2, t1 as t3 +where t1.b=t2.c and t2.d=t3.a and t3.b<5 and t1.a < 2000; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 262144 100.00 Using where +1 SIMPLE t2 ref c,d c 5 test.t1.b 5 100.00 +1 SIMPLE t3 ALL NULL NULL NULL NULL 262144 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` join `test`.`t2` join `test`.`t1` `t3` where ((`test`.`t2`.`c` = `test`.`t1`.`b`) and (`test`.`t3`.`a` = `test`.`t2`.`d`) and (`test`.`t3`.`b` < 5) and (`test`.`t1`.`a` < 2000)) +select * from t1, t2, t1 as t3 +where t1.b=t2.c and t2.d=t3.a and t3.b<5 and t1.a < 2000; +a b c d a b +1495 89366 89366 28296 28296 3 +961 24512 24512 85239 85239 4 +1063 89366 89366 28296 28296 3 +221 56120 56120 28296 28296 3 +set optimizer_use_condition_selectivity=3; +explain extended +select * from t1, t2, t1 as t3 +where t1.b=t2.c and t2.d=t3.a and t3.b<5 and t1.a < 2000; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 ALL NULL NULL NULL NULL 262144 0.00 Using where +1 SIMPLE t2 ref c,d d 5 test.t3.a 7 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 262144 2.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` join `test`.`t2` join `test`.`t1` `t3` where ((`test`.`t1`.`b` = `test`.`t2`.`c`) and (`test`.`t2`.`d` = `test`.`t3`.`a`) and (`test`.`t3`.`b` < 5) and (`test`.`t1`.`a` < 2000)) +select * from t1, t2, t1 as t3 +where t1.b=t2.c and t2.d=t3.a and t3.b<5 and t1.a < 2000; +a b c d a b +961 24512 24512 85239 85239 4 +1495 89366 89366 28296 28296 3 +1063 89366 89366 28296 28296 3 +221 56120 56120 28296 28296 3 +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t1,t2; +set histogram_type=@save_histogram_type; +set histogram_size=@save_histogram_size; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +# +# Bug mdev-5931: no where condition after constant table row substitution +# with optimizer_use_condition_selectivity=3 +# +CREATE TABLE t1 (a varchar(3), b varchar(3)) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('foo', 'foo'); +CREATE TABLE t2 (c INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1), (2); +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED +SELECT * FROM t1, t2 WHERE c >= 0 OR a = b ; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 +Warnings: +Note 1003 select 'foo' AS `a`,'foo' AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where 1 +SELECT * FROM t1, t2 WHERE c >= 0 OR a = b ; +a b c +foo foo 1 +foo foo 2 +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2; +# +# Bug mdev-6325: wrong selectivity of a column with ref access +# +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1(a int); +insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C; +create table t2 (a int, b int, key(a)); +insert into t2 select A.a + 10*B.a, 12345 from t0 A, t0 B, t0 C; +set use_stat_tables='preferably'; +set histogram_size=100; +set optimizer_use_condition_selectivity=4; +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +analyze table t2 persistent for all; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status Table is already up to date +explain extended +select * from t1 straight_join t2 where t1.a=t2.a and t1.a<10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 0.99 Using where +1 SIMPLE t2 ref a a 5 test.t1.a 10 100.00 +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` straight_join `test`.`t2` where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (`test`.`t1`.`a` < 10)) +explain extended +select * from t1 straight_join t2 where t1.a=t2.a and t2.a<10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 0.99 Using where +1 SIMPLE t2 ref a a 5 test.t1.a 10 100.00 +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` straight_join `test`.`t2` where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (`test`.`t1`.`a` < 10)) +set histogram_size=@save_histogram_size; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t0,t1,t2; +# +# Bug mdev-6843: col IS NULL in where condition when col is always NULL +# +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1(a int); +insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C; +create table t2 (a int, b int); +insert into t2 select NULL, a from t1; +set use_stat_tables='preferably'; +set histogram_size=100; +set optimizer_use_condition_selectivity=4; +analyze table t2 persistent for all; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +explain extended +select * from t2 a straight_join t2 b where a.a is null; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE a ALL NULL NULL NULL NULL 1000 100.00 Using where +1 SIMPLE b ALL NULL NULL NULL NULL 1000 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`a`.`a` AS `a`,`test`.`a`.`b` AS `b`,`test`.`b`.`a` AS `a`,`test`.`b`.`b` AS `b` from `test`.`t2` `a` straight_join `test`.`t2` `b` where isnull(`test`.`a`.`a`) +set histogram_size=@save_histogram_size; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t0,t1,t2; +# +# Bug mdev-7316: a conjunct in WHERE with selectivity == 0 +# +CREATE TABLE t1 (a varchar(16), b int, PRIMARY KEY(a), KEY(b)) ENGINE=INNODB; +Warnings: +Warning 1286 Unknown storage engine 'INNODB' +Warning 1266 Using storage engine MyISAM for table 't1' +INSERT INTO t1 VALUES +('USAChinese',10), ('USAEnglish',20), ('USAFrench',30); +CREATE TABLE t2 (i int) ENGINE=INNODB; +Warnings: +Warning 1286 Unknown storage engine 'INNODB' +Warning 1266 Using storage engine MyISAM for table 't2' +INSERT INTO t2 VALUES +(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(1),(2),(3),(4); +ANALYZE TABLE t1, t2; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +set use_stat_tables='preferably'; +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED +SELECT * FROM t1, t2 +WHERE a <> 'USARussian' AND b IS NULL; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ref PRIMARY,b b 5 const 1 100.00 Using index condition; Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 14 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`i` AS `i` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a` <> 'USARussian') and isnull(`test`.`t1`.`b`)) +SELECT * FROM t1, t2 +WHERE a <> 'USARussian' AND b IS NULL; +a b i +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-11096: range condition over column without statistical data +# +set use_stat_tables='preferably'; +set optimizer_use_condition_selectivity=3; +create table t1(col1 char(32)); +insert into t1 values ('a'),('b'),('c'),('d'), ('e'),('f'),('g'),('h'); +analyze table t1 persistent for columns () indexes (); +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +explain extended +select * from t1 where col1 > 'b' and col1 < 'e'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`col1` AS `col1` from `test`.`t1` where ((`test`.`t1`.`col1` > 'b') and (`test`.`t1`.`col1` < 'e')) +select * from t1 where col1 > 'b' and col1 < 'e'; +col1 +c +d +drop table t1; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-9628: unindexed blob column without min-max statistics +# with optimizer_use_condition_selectivity=3 +# +set use_stat_tables='preferably'; +set optimizer_use_condition_selectivity=3; +create table t1(col1 char(32)); +insert into t1 values ('a'),('b'),('c'),('d'), ('e'),('f'),('g'),('h'); +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +create table t2(col1 text); +insert into t2 values ('a'),('b'),('c'),('d'), ('e'),('f'),('g'),('h'); +analyze table t2; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +select * from t1 where col1 > 'b' and col1 < 'd'; +col1 +c +explain extended +select * from t1 where col1 > 'b' and col1 < 'd'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 28.57 Using where +Warnings: +Note 1003 select `test`.`t1`.`col1` AS `col1` from `test`.`t1` where ((`test`.`t1`.`col1` > 'b') and (`test`.`t1`.`col1` < 'd')) +select * from t2 where col1 > 'b' and col1 < 'd'; +col1 +c +explain extended +select * from t2 where col1 > 'b' and col1 < 'd'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 8 100.00 Using where +Warnings: +Note 1003 select `test`.`t2`.`col1` AS `col1` from `test`.`t2` where ((`test`.`t2`.`col1` > 'b') and (`test`.`t2`.`col1` < 'd')) +select * from t2 where col1 < 'b' and col1 > 'd'; +col1 +explain extended +select * from t2 where col1 < 'b' and col1 > 'd'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select `test`.`t2`.`col1` AS `col1` from `test`.`t2` where 0 +drop table t1,t2; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-11364: IS NULL over not nullable datetime column +# in mergeable derived +# +set use_stat_tables='preferably'; +set optimizer_use_condition_selectivity=4; +set HISTOGRAM_SIZE = 255; +CREATE TABLE t1 (t TIME, d DATE NOT NULL); +INSERT INTO t1 VALUES ('10:00:00', '0000-00-00'),('11:00:00','0000-00-00'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SELECT * FROM (SELECT t FROM t1 WHERE d IS NULL) sq; +t +10:00:00 +11:00:00 +DROP TABLE t1; +set histogram_size=@save_histogram_size; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set use_stat_tables=@save_use_stat_tables; diff --git a/mysql-test/r/selectivity_innodb.result b/mysql-test/r/selectivity_innodb.result new file mode 100644 index 00000000000..a026c2e6d92 --- /dev/null +++ b/mysql-test/r/selectivity_innodb.result @@ -0,0 +1,1673 @@ +SET SESSION STORAGE_ENGINE='InnoDB'; +set @save_optimizer_switch_for_selectivity_test=@@optimizer_switch; +set optimizer_switch='extended_keys=on'; +drop table if exists t0,t1,t2,t3; +select @@global.use_stat_tables; +@@global.use_stat_tables +COMPLEMENTARY +select @@session.use_stat_tables; +@@session.use_stat_tables +COMPLEMENTARY +set @save_use_stat_tables=@@use_stat_tables; +set use_stat_tables='preferably'; +set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; +set @save_histogram_size=@@histogram_size; +set @save_histogram_type=@@histogram_type; +set optimizer_use_condition_selectivity=3; +create table t1 (a int); +insert into t1 values +(9), (3), (2), (NULL), (NULL), (2), (NULL), (1), (5), (NULL); +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +select * from mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 1 9 0.4000 4.0000 1.2000 0 NULL NULL +flush table t1; +explain extended +select * from t1 where a is null; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 40.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where isnull(`test`.`t1`.`a`) +explain extended +select * from t1 where a is not null; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 60.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` is not null) +drop table t1; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP DATABASE IF EXISTS dbt3_s001; +CREATE DATABASE dbt3_s001; +use dbt3_s001; +=== Q2 === +set optimizer_use_condition_selectivity=5; +explain extended +select +s_acctbal, s_name, n_name, p_partkey, p_mfgr, s_address, s_phone, s_comment +from +part, supplier, partsupp, nation, region +where +p_partkey = ps_partkey +and s_suppkey = ps_suppkey +and p_size = 9 +and p_type like '%TIN' + and s_nationkey = n_nationkey +and n_regionkey = r_regionkey +and r_name = 'ASIA' + and ps_supplycost = ( +select +min(ps_supplycost) +from +partsupp, supplier, nation, region +where +p_partkey = ps_partkey +and s_suppkey = ps_suppkey +and s_nationkey = n_nationkey +and n_regionkey = r_regionkey +and r_name = 'ASIA' + ) +order by +s_acctbal desc, n_name, s_name, p_partkey; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY part ALL PRIMARY NULL NULL NULL 200 0.31 Using where; Using temporary; Using filesort +1 PRIMARY region ALL PRIMARY NULL NULL NULL 5 20.00 Using where; Using join buffer (flat, BNL join) +1 PRIMARY partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where +1 PRIMARY supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.partsupp.ps_suppkey 1 100.00 Using where +1 PRIMARY nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 100.00 Using where +2 DEPENDENT SUBQUERY region ALL PRIMARY NULL NULL NULL 5 20.00 Using where +2 DEPENDENT SUBQUERY partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 +2 DEPENDENT SUBQUERY supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.partsupp.ps_suppkey 1 100.00 Using where +2 DEPENDENT SUBQUERY nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 100.00 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.part.p_partkey' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `dbt3_s001`.`supplier`.`s_acctbal` AS `s_acctbal`,`dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`nation`.`n_name` AS `n_name`,`dbt3_s001`.`part`.`p_partkey` AS `p_partkey`,`dbt3_s001`.`part`.`p_mfgr` AS `p_mfgr`,`dbt3_s001`.`supplier`.`s_address` AS `s_address`,`dbt3_s001`.`supplier`.`s_phone` AS `s_phone`,`dbt3_s001`.`supplier`.`s_comment` AS `s_comment` from `dbt3_s001`.`part` join `dbt3_s001`.`supplier` join `dbt3_s001`.`partsupp` join `dbt3_s001`.`nation` join `dbt3_s001`.`region` where ((`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`supplier`.`s_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`part`.`p_size` = 9) and (`dbt3_s001`.`nation`.`n_nationkey` = `dbt3_s001`.`supplier`.`s_nationkey`) and (`dbt3_s001`.`nation`.`n_regionkey` = `dbt3_s001`.`region`.`r_regionkey`) and (`dbt3_s001`.`region`.`r_name` = 'ASIA') and (`dbt3_s001`.`part`.`p_type` like '%TIN') and (`dbt3_s001`.`partsupp`.`ps_supplycost` = <expr_cache><`dbt3_s001`.`part`.`p_partkey`>((select min(`dbt3_s001`.`partsupp`.`ps_supplycost`) from `dbt3_s001`.`partsupp` join `dbt3_s001`.`supplier` join `dbt3_s001`.`nation` join `dbt3_s001`.`region` where ((`dbt3_s001`.`supplier`.`s_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`nation`.`n_nationkey` = `dbt3_s001`.`supplier`.`s_nationkey`) and (`dbt3_s001`.`nation`.`n_regionkey` = `dbt3_s001`.`region`.`r_regionkey`) and (`dbt3_s001`.`region`.`r_name` = 'ASIA') and (`dbt3_s001`.`part`.`p_partkey` = `dbt3_s001`.`partsupp`.`ps_partkey`)))))) order by `dbt3_s001`.`supplier`.`s_acctbal` desc,`dbt3_s001`.`nation`.`n_name`,`dbt3_s001`.`supplier`.`s_name`,`dbt3_s001`.`part`.`p_partkey` +set optimizer_use_condition_selectivity=4; +explain extended +select +s_acctbal, s_name, n_name, p_partkey, p_mfgr, s_address, s_phone, s_comment +from +part, supplier, partsupp, nation, region +where +p_partkey = ps_partkey +and s_suppkey = ps_suppkey +and p_size = 9 +and p_type like '%TIN' + and s_nationkey = n_nationkey +and n_regionkey = r_regionkey +and r_name = 'ASIA' + and ps_supplycost = ( +select +min(ps_supplycost) +from +partsupp, supplier, nation, region +where +p_partkey = ps_partkey +and s_suppkey = ps_suppkey +and s_nationkey = n_nationkey +and n_regionkey = r_regionkey +and r_name = 'ASIA' + ) +order by +s_acctbal desc, n_name, s_name, p_partkey; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY region ALL PRIMARY NULL NULL NULL 5 20.00 Using where; Using temporary; Using filesort +1 PRIMARY part ALL PRIMARY NULL NULL NULL 200 2.08 Using where; Using join buffer (flat, BNL join) +1 PRIMARY partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where +1 PRIMARY supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.partsupp.ps_suppkey 1 100.00 Using where +1 PRIMARY nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 100.00 Using where +2 DEPENDENT SUBQUERY region ALL PRIMARY NULL NULL NULL 5 20.00 Using where +2 DEPENDENT SUBQUERY partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 +2 DEPENDENT SUBQUERY supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.partsupp.ps_suppkey 1 100.00 Using where +2 DEPENDENT SUBQUERY nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 100.00 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.part.p_partkey' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `dbt3_s001`.`supplier`.`s_acctbal` AS `s_acctbal`,`dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`nation`.`n_name` AS `n_name`,`dbt3_s001`.`part`.`p_partkey` AS `p_partkey`,`dbt3_s001`.`part`.`p_mfgr` AS `p_mfgr`,`dbt3_s001`.`supplier`.`s_address` AS `s_address`,`dbt3_s001`.`supplier`.`s_phone` AS `s_phone`,`dbt3_s001`.`supplier`.`s_comment` AS `s_comment` from `dbt3_s001`.`part` join `dbt3_s001`.`supplier` join `dbt3_s001`.`partsupp` join `dbt3_s001`.`nation` join `dbt3_s001`.`region` where ((`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`supplier`.`s_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`part`.`p_size` = 9) and (`dbt3_s001`.`nation`.`n_nationkey` = `dbt3_s001`.`supplier`.`s_nationkey`) and (`dbt3_s001`.`nation`.`n_regionkey` = `dbt3_s001`.`region`.`r_regionkey`) and (`dbt3_s001`.`region`.`r_name` = 'ASIA') and (`dbt3_s001`.`part`.`p_type` like '%TIN') and (`dbt3_s001`.`partsupp`.`ps_supplycost` = <expr_cache><`dbt3_s001`.`part`.`p_partkey`>((select min(`dbt3_s001`.`partsupp`.`ps_supplycost`) from `dbt3_s001`.`partsupp` join `dbt3_s001`.`supplier` join `dbt3_s001`.`nation` join `dbt3_s001`.`region` where ((`dbt3_s001`.`supplier`.`s_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`nation`.`n_nationkey` = `dbt3_s001`.`supplier`.`s_nationkey`) and (`dbt3_s001`.`nation`.`n_regionkey` = `dbt3_s001`.`region`.`r_regionkey`) and (`dbt3_s001`.`region`.`r_name` = 'ASIA') and (`dbt3_s001`.`part`.`p_partkey` = `dbt3_s001`.`partsupp`.`ps_partkey`)))))) order by `dbt3_s001`.`supplier`.`s_acctbal` desc,`dbt3_s001`.`nation`.`n_name`,`dbt3_s001`.`supplier`.`s_name`,`dbt3_s001`.`part`.`p_partkey` +=== Q15 === +create view revenue0 (supplier_no, total_revenue) as +select l_suppkey, sum(l_extendedprice * (1 - l_discount)) +from lineitem +where +l_shipdate >= '1995-08-01' + and l_shipdate < date_add('1995-08-01', interval 90 day) +group by l_suppkey; +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='index_condition_pushdown=off'; +set optimizer_use_condition_selectivity=1; +EXPLAIN EXTENDED select s_suppkey, s_name, s_address, s_phone, total_revenue +from supplier, revenue0 +where s_suppkey = supplier_no +and total_revenue = (select max(total_revenue) from revenue0) +order by s_suppkey; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY supplier index PRIMARY PRIMARY 4 NULL 10 100.00 +1 PRIMARY <derived3> ref key0 key0 5 dbt3_s001.supplier.s_suppkey 10 100.00 Using where +3 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 228 100.00 Using where; Using temporary; Using filesort +2 SUBQUERY <derived4> ALL NULL NULL NULL NULL 228 100.00 +4 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 228 100.00 Using where; Using temporary; Using filesort +Warnings: +Note 1003 select `dbt3_s001`.`supplier`.`s_suppkey` AS `s_suppkey`,`dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address`,`dbt3_s001`.`supplier`.`s_phone` AS `s_phone`,`revenue0`.`total_revenue` AS `total_revenue` from `dbt3_s001`.`supplier` join `dbt3_s001`.`revenue0` where ((`revenue0`.`supplier_no` = `dbt3_s001`.`supplier`.`s_suppkey`) and (`revenue0`.`total_revenue` = (select max(`revenue0`.`total_revenue`) from `dbt3_s001`.`revenue0`))) order by `dbt3_s001`.`supplier`.`s_suppkey` +select s_suppkey, s_name, s_address, s_phone, total_revenue +from supplier, revenue0 +where s_suppkey = supplier_no +and total_revenue = (select max(total_revenue) from revenue0) +order by s_suppkey; +s_suppkey s_name s_address s_phone total_revenue +1 Supplier#000000001 N kD4on9OM Ipw3,gf0JBoQDd7tgrzrddZ 27-918-335-1736 729084.7773 +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED select s_suppkey, s_name, s_address, s_phone, total_revenue +from supplier, revenue0 +where s_suppkey = supplier_no +and total_revenue = (select max(total_revenue) from revenue0) +order by s_suppkey; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY supplier index PRIMARY PRIMARY 4 NULL 10 100.00 +1 PRIMARY <derived3> ref key0 key0 5 dbt3_s001.supplier.s_suppkey 10 100.00 Using where +3 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 228 100.00 Using where; Using temporary; Using filesort +2 SUBQUERY <derived4> ALL NULL NULL NULL NULL 227 100.00 +4 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 228 100.00 Using where; Using temporary; Using filesort +Warnings: +Note 1003 select `dbt3_s001`.`supplier`.`s_suppkey` AS `s_suppkey`,`dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address`,`dbt3_s001`.`supplier`.`s_phone` AS `s_phone`,`revenue0`.`total_revenue` AS `total_revenue` from `dbt3_s001`.`supplier` join `dbt3_s001`.`revenue0` where ((`revenue0`.`supplier_no` = `dbt3_s001`.`supplier`.`s_suppkey`) and (`revenue0`.`total_revenue` = (select max(`revenue0`.`total_revenue`) from `dbt3_s001`.`revenue0`))) order by `dbt3_s001`.`supplier`.`s_suppkey` +select s_suppkey, s_name, s_address, s_phone, total_revenue +from supplier, revenue0 +where s_suppkey = supplier_no +and total_revenue = (select max(total_revenue) from revenue0) +order by s_suppkey; +s_suppkey s_name s_address s_phone total_revenue +1 Supplier#000000001 N kD4on9OM Ipw3,gf0JBoQDd7tgrzrddZ 27-918-335-1736 729084.7773 +set optimizer_switch=@save_optimizer_switch; +drop view revenue0; +=== Q16 === +set optimizer_use_condition_selectivity=1; +EXPLAIN EXTENDED select p_brand, p_type, p_size, count(distinct ps_suppkey) as supplier_cnt +from partsupp, part +where p_partkey = ps_partkey +and p_brand <> 'Brand#11' + and p_type not like 'SMALL POLISHED%' + and p_size in (49, 37, 27, 5, 40, 6, 22, 8) +and ps_suppkey not in (select s_suppkey from supplier +where s_comment like '%Customer%Complaints%') +group by p_brand, p_type, p_size +order by supplier_cnt desc, p_brand, p_type, p_size; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY part ALL PRIMARY NULL NULL NULL 200 100.00 Using where; Using temporary; Using filesort +1 PRIMARY partsupp ref PRIMARY,i_ps_partkey i_ps_partkey 4 dbt3_s001.part.p_partkey 3 100.00 Using where; Using index +2 MATERIALIZED supplier ALL PRIMARY NULL NULL NULL 10 100.00 Using where +Warnings: +Note 1003 select `dbt3_s001`.`part`.`p_brand` AS `p_brand`,`dbt3_s001`.`part`.`p_type` AS `p_type`,`dbt3_s001`.`part`.`p_size` AS `p_size`,count(distinct `dbt3_s001`.`partsupp`.`ps_suppkey`) AS `supplier_cnt` from `dbt3_s001`.`partsupp` join `dbt3_s001`.`part` where ((`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`part`.`p_brand` <> 'Brand#11') and (not((`dbt3_s001`.`part`.`p_type` like 'SMALL POLISHED%'))) and (`dbt3_s001`.`part`.`p_size` in (49,37,27,5,40,6,22,8)) and (not(<expr_cache><`dbt3_s001`.`partsupp`.`ps_suppkey`>(<in_optimizer>(`dbt3_s001`.`partsupp`.`ps_suppkey`,`dbt3_s001`.`partsupp`.`ps_suppkey` in ( <materialize> (select `dbt3_s001`.`supplier`.`s_suppkey` from `dbt3_s001`.`supplier` where (`dbt3_s001`.`supplier`.`s_comment` like '%Customer%Complaints%') ), <primary_index_lookup>(`dbt3_s001`.`partsupp`.`ps_suppkey` in <temporary table> on distinct_key where ((`dbt3_s001`.`partsupp`.`ps_suppkey` = `<subquery2>`.`s_suppkey`))))))))) group by `dbt3_s001`.`part`.`p_brand`,`dbt3_s001`.`part`.`p_type`,`dbt3_s001`.`part`.`p_size` order by count(distinct `dbt3_s001`.`partsupp`.`ps_suppkey`) desc,`dbt3_s001`.`part`.`p_brand`,`dbt3_s001`.`part`.`p_type`,`dbt3_s001`.`part`.`p_size` +select p_brand, p_type, p_size, count(distinct ps_suppkey) as supplier_cnt +from partsupp, part +where p_partkey = ps_partkey +and p_brand <> 'Brand#11' + and p_type not like 'SMALL POLISHED%' + and p_size in (49, 37, 27, 5, 40, 6, 22, 8) +and ps_suppkey not in (select s_suppkey from supplier +where s_comment like '%Customer%Complaints%') +group by p_brand, p_type, p_size +order by supplier_cnt desc, p_brand, p_type, p_size; +p_brand p_type p_size supplier_cnt +Brand#21 MEDIUM ANODIZED TIN 8 4 +Brand#22 PROMO PLATED TIN 5 4 +Brand#24 MEDIUM BURNISHED NICKEL 6 4 +Brand#24 SMALL ANODIZED STEEL 40 4 +Brand#32 MEDIUM BURNISHED BRASS 49 4 +Brand#33 MEDIUM POLISHED BRASS 49 4 +Brand#41 STANDARD BRUSHED NICKEL 40 4 +Brand#44 PROMO POLISHED STEEL 5 4 +Brand#45 PROMO ANODIZED BRASS 22 4 +Brand#53 STANDARD BRUSHED STEEL 27 4 +Brand#54 MEDIUM POLISHED BRASS 22 4 +Brand#54 STANDARD ANODIZED BRASS 22 4 +Brand#13 LARGE BRUSHED STEEL 8 2 +Brand#25 ECONOMY BURNISHED COPPER 27 2 +Brand#44 STANDARD PLATED TIN 37 1 +Brand#51 ECONOMY POLISHED STEEL 49 1 +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED select p_brand, p_type, p_size, count(distinct ps_suppkey) as supplier_cnt +from partsupp, part +where p_partkey = ps_partkey +and p_brand <> 'Brand#11' + and p_type not like 'SMALL POLISHED%' + and p_size in (49, 37, 27, 5, 40, 6, 22, 8) +and ps_suppkey not in (select s_suppkey from supplier +where s_comment like '%Customer%Complaints%') +group by p_brand, p_type, p_size +order by supplier_cnt desc, p_brand, p_type, p_size; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY part ALL PRIMARY NULL NULL NULL 200 16.67 Using where; Using temporary; Using filesort +1 PRIMARY partsupp ref PRIMARY,i_ps_partkey i_ps_partkey 4 dbt3_s001.part.p_partkey 3 100.00 Using where; Using index +2 MATERIALIZED supplier ALL PRIMARY NULL NULL NULL 10 100.00 Using where +Warnings: +Note 1003 select `dbt3_s001`.`part`.`p_brand` AS `p_brand`,`dbt3_s001`.`part`.`p_type` AS `p_type`,`dbt3_s001`.`part`.`p_size` AS `p_size`,count(distinct `dbt3_s001`.`partsupp`.`ps_suppkey`) AS `supplier_cnt` from `dbt3_s001`.`partsupp` join `dbt3_s001`.`part` where ((`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`part`.`p_brand` <> 'Brand#11') and (not((`dbt3_s001`.`part`.`p_type` like 'SMALL POLISHED%'))) and (`dbt3_s001`.`part`.`p_size` in (49,37,27,5,40,6,22,8)) and (not(<expr_cache><`dbt3_s001`.`partsupp`.`ps_suppkey`>(<in_optimizer>(`dbt3_s001`.`partsupp`.`ps_suppkey`,`dbt3_s001`.`partsupp`.`ps_suppkey` in ( <materialize> (select `dbt3_s001`.`supplier`.`s_suppkey` from `dbt3_s001`.`supplier` where (`dbt3_s001`.`supplier`.`s_comment` like '%Customer%Complaints%') ), <primary_index_lookup>(`dbt3_s001`.`partsupp`.`ps_suppkey` in <temporary table> on distinct_key where ((`dbt3_s001`.`partsupp`.`ps_suppkey` = `<subquery2>`.`s_suppkey`))))))))) group by `dbt3_s001`.`part`.`p_brand`,`dbt3_s001`.`part`.`p_type`,`dbt3_s001`.`part`.`p_size` order by count(distinct `dbt3_s001`.`partsupp`.`ps_suppkey`) desc,`dbt3_s001`.`part`.`p_brand`,`dbt3_s001`.`part`.`p_type`,`dbt3_s001`.`part`.`p_size` +select p_brand, p_type, p_size, count(distinct ps_suppkey) as supplier_cnt +from partsupp, part +where p_partkey = ps_partkey +and p_brand <> 'Brand#11' + and p_type not like 'SMALL POLISHED%' + and p_size in (49, 37, 27, 5, 40, 6, 22, 8) +and ps_suppkey not in (select s_suppkey from supplier +where s_comment like '%Customer%Complaints%') +group by p_brand, p_type, p_size +order by supplier_cnt desc, p_brand, p_type, p_size; +p_brand p_type p_size supplier_cnt +Brand#21 MEDIUM ANODIZED TIN 8 4 +Brand#22 PROMO PLATED TIN 5 4 +Brand#24 MEDIUM BURNISHED NICKEL 6 4 +Brand#24 SMALL ANODIZED STEEL 40 4 +Brand#32 MEDIUM BURNISHED BRASS 49 4 +Brand#33 MEDIUM POLISHED BRASS 49 4 +Brand#41 STANDARD BRUSHED NICKEL 40 4 +Brand#44 PROMO POLISHED STEEL 5 4 +Brand#45 PROMO ANODIZED BRASS 22 4 +Brand#53 STANDARD BRUSHED STEEL 27 4 +Brand#54 MEDIUM POLISHED BRASS 22 4 +Brand#54 STANDARD ANODIZED BRASS 22 4 +Brand#13 LARGE BRUSHED STEEL 8 2 +Brand#25 ECONOMY BURNISHED COPPER 27 2 +Brand#44 STANDARD PLATED TIN 37 1 +Brand#51 ECONOMY POLISHED STEEL 49 1 +set optimizer_use_condition_selectivity=4; +EXPLAIN EXTENDED select p_brand, p_type, p_size, count(distinct ps_suppkey) as supplier_cnt +from partsupp, part +where p_partkey = ps_partkey +and p_brand <> 'Brand#11' + and p_type not like 'SMALL POLISHED%' + and p_size in (49, 37, 27, 5, 40, 6, 22, 8) +and ps_suppkey not in (select s_suppkey from supplier +where s_comment like '%Customer%Complaints%') +group by p_brand, p_type, p_size +order by supplier_cnt desc, p_brand, p_type, p_size; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY part ALL PRIMARY NULL NULL NULL 200 16.67 Using where; Using temporary; Using filesort +1 PRIMARY partsupp ref PRIMARY,i_ps_partkey i_ps_partkey 4 dbt3_s001.part.p_partkey 3 100.00 Using where; Using index +2 MATERIALIZED supplier ALL PRIMARY NULL NULL NULL 10 100.00 Using where +Warnings: +Note 1003 select `dbt3_s001`.`part`.`p_brand` AS `p_brand`,`dbt3_s001`.`part`.`p_type` AS `p_type`,`dbt3_s001`.`part`.`p_size` AS `p_size`,count(distinct `dbt3_s001`.`partsupp`.`ps_suppkey`) AS `supplier_cnt` from `dbt3_s001`.`partsupp` join `dbt3_s001`.`part` where ((`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`part`.`p_brand` <> 'Brand#11') and (not((`dbt3_s001`.`part`.`p_type` like 'SMALL POLISHED%'))) and (`dbt3_s001`.`part`.`p_size` in (49,37,27,5,40,6,22,8)) and (not(<expr_cache><`dbt3_s001`.`partsupp`.`ps_suppkey`>(<in_optimizer>(`dbt3_s001`.`partsupp`.`ps_suppkey`,`dbt3_s001`.`partsupp`.`ps_suppkey` in ( <materialize> (select `dbt3_s001`.`supplier`.`s_suppkey` from `dbt3_s001`.`supplier` where (`dbt3_s001`.`supplier`.`s_comment` like '%Customer%Complaints%') ), <primary_index_lookup>(`dbt3_s001`.`partsupp`.`ps_suppkey` in <temporary table> on distinct_key where ((`dbt3_s001`.`partsupp`.`ps_suppkey` = `<subquery2>`.`s_suppkey`))))))))) group by `dbt3_s001`.`part`.`p_brand`,`dbt3_s001`.`part`.`p_type`,`dbt3_s001`.`part`.`p_size` order by count(distinct `dbt3_s001`.`partsupp`.`ps_suppkey`) desc,`dbt3_s001`.`part`.`p_brand`,`dbt3_s001`.`part`.`p_type`,`dbt3_s001`.`part`.`p_size` +select p_brand, p_type, p_size, count(distinct ps_suppkey) as supplier_cnt +from partsupp, part +where p_partkey = ps_partkey +and p_brand <> 'Brand#11' + and p_type not like 'SMALL POLISHED%' + and p_size in (49, 37, 27, 5, 40, 6, 22, 8) +and ps_suppkey not in (select s_suppkey from supplier +where s_comment like '%Customer%Complaints%') +group by p_brand, p_type, p_size +order by supplier_cnt desc, p_brand, p_type, p_size; +p_brand p_type p_size supplier_cnt +Brand#21 MEDIUM ANODIZED TIN 8 4 +Brand#22 PROMO PLATED TIN 5 4 +Brand#24 MEDIUM BURNISHED NICKEL 6 4 +Brand#24 SMALL ANODIZED STEEL 40 4 +Brand#32 MEDIUM BURNISHED BRASS 49 4 +Brand#33 MEDIUM POLISHED BRASS 49 4 +Brand#41 STANDARD BRUSHED NICKEL 40 4 +Brand#44 PROMO POLISHED STEEL 5 4 +Brand#45 PROMO ANODIZED BRASS 22 4 +Brand#53 STANDARD BRUSHED STEEL 27 4 +Brand#54 MEDIUM POLISHED BRASS 22 4 +Brand#54 STANDARD ANODIZED BRASS 22 4 +Brand#13 LARGE BRUSHED STEEL 8 2 +Brand#25 ECONOMY BURNISHED COPPER 27 2 +Brand#44 STANDARD PLATED TIN 37 1 +Brand#51 ECONOMY POLISHED STEEL 49 1 +=== Q18 === +set optimizer_use_condition_selectivity=1; +EXPLAIN EXTENDED select +c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity) +from customer, orders, lineitem +where +o_orderkey in (select l_orderkey from lineitem +group by l_orderkey having sum(l_quantity) > 250) +and c_custkey = o_custkey +and o_orderkey = l_orderkey +group by c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice +order by o_totalprice desc, o_orderdate; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY orders ALL PRIMARY,i_o_custkey NULL NULL NULL 1500 100.00 Using where; Using temporary; Using filesort +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 dbt3_s001.orders.o_orderkey 1 100.00 +1 PRIMARY customer eq_ref PRIMARY PRIMARY 4 dbt3_s001.orders.o_custkey 1 100.00 +1 PRIMARY lineitem ref PRIMARY,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey_quantity 4 dbt3_s001.orders.o_orderkey 4 100.00 Using index +2 MATERIALIZED lineitem index NULL PRIMARY 8 NULL 6005 100.00 +Warnings: +Note 1003 select `dbt3_s001`.`customer`.`c_name` AS `c_name`,`dbt3_s001`.`customer`.`c_custkey` AS `c_custkey`,`dbt3_s001`.`orders`.`o_orderkey` AS `o_orderkey`,`dbt3_s001`.`orders`.`o_orderDATE` AS `o_orderdate`,`dbt3_s001`.`orders`.`o_totalprice` AS `o_totalprice`,sum(`dbt3_s001`.`lineitem`.`l_quantity`) AS `sum(l_quantity)` from <materialize> (select `dbt3_s001`.`lineitem`.`l_orderkey` from `dbt3_s001`.`lineitem` group by `dbt3_s001`.`lineitem`.`l_orderkey` having (sum(`dbt3_s001`.`lineitem`.`l_quantity`) > 250)) join `dbt3_s001`.`customer` join `dbt3_s001`.`orders` join `dbt3_s001`.`lineitem` where ((`dbt3_s001`.`customer`.`c_custkey` = `dbt3_s001`.`orders`.`o_custkey`) and (`<subquery2>`.`l_orderkey` = `dbt3_s001`.`orders`.`o_orderkey`) and (`dbt3_s001`.`lineitem`.`l_orderkey` = `dbt3_s001`.`orders`.`o_orderkey`)) group by `dbt3_s001`.`customer`.`c_name`,`dbt3_s001`.`customer`.`c_custkey`,`dbt3_s001`.`orders`.`o_orderkey`,`dbt3_s001`.`orders`.`o_orderDATE`,`dbt3_s001`.`orders`.`o_totalprice` order by `dbt3_s001`.`orders`.`o_totalprice` desc,`dbt3_s001`.`orders`.`o_orderDATE` +select +c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity) +from customer, orders, lineitem +where +o_orderkey in (select l_orderkey from lineitem +group by l_orderkey having sum(l_quantity) > 250) +and c_custkey = o_custkey +and o_orderkey = l_orderkey +group by c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice +order by o_totalprice desc, o_orderdate; +c_name c_custkey o_orderkey o_orderdate o_totalprice sum(l_quantity) +Customer#000000070 70 2567 1998-02-27 263411.29 266 +Customer#000000010 10 4421 1997-04-04 258779.02 255 +Customer#000000082 82 3460 1995-10-03 245976.74 254 +Customer#000000068 68 2208 1995-05-01 245388.06 256 +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED select +c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity) +from customer, orders, lineitem +where +o_orderkey in (select l_orderkey from lineitem +group by l_orderkey having sum(l_quantity) > 250) +and c_custkey = o_custkey +and o_orderkey = l_orderkey +group by c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice +order by o_totalprice desc, o_orderdate; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 6005 0.00 Using temporary; Using filesort +1 PRIMARY orders eq_ref PRIMARY,i_o_custkey PRIMARY 4 <subquery2>.l_orderkey 1 100.00 Using where +1 PRIMARY customer eq_ref PRIMARY PRIMARY 4 dbt3_s001.orders.o_custkey 1 100.00 +1 PRIMARY lineitem ref PRIMARY,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 <subquery2>.l_orderkey 4 100.00 +2 MATERIALIZED lineitem index NULL PRIMARY 8 NULL 6005 100.00 +Warnings: +Note 1003 select `dbt3_s001`.`customer`.`c_name` AS `c_name`,`dbt3_s001`.`customer`.`c_custkey` AS `c_custkey`,`dbt3_s001`.`orders`.`o_orderkey` AS `o_orderkey`,`dbt3_s001`.`orders`.`o_orderDATE` AS `o_orderdate`,`dbt3_s001`.`orders`.`o_totalprice` AS `o_totalprice`,sum(`dbt3_s001`.`lineitem`.`l_quantity`) AS `sum(l_quantity)` from <materialize> (select `dbt3_s001`.`lineitem`.`l_orderkey` from `dbt3_s001`.`lineitem` group by `dbt3_s001`.`lineitem`.`l_orderkey` having (sum(`dbt3_s001`.`lineitem`.`l_quantity`) > 250)) join `dbt3_s001`.`customer` join `dbt3_s001`.`orders` join `dbt3_s001`.`lineitem` where ((`dbt3_s001`.`customer`.`c_custkey` = `dbt3_s001`.`orders`.`o_custkey`) and (`dbt3_s001`.`orders`.`o_orderkey` = `<subquery2>`.`l_orderkey`) and (`dbt3_s001`.`lineitem`.`l_orderkey` = `<subquery2>`.`l_orderkey`)) group by `dbt3_s001`.`customer`.`c_name`,`dbt3_s001`.`customer`.`c_custkey`,`dbt3_s001`.`orders`.`o_orderkey`,`dbt3_s001`.`orders`.`o_orderDATE`,`dbt3_s001`.`orders`.`o_totalprice` order by `dbt3_s001`.`orders`.`o_totalprice` desc,`dbt3_s001`.`orders`.`o_orderDATE` +select +c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity) +from customer, orders, lineitem +where +o_orderkey in (select l_orderkey from lineitem +group by l_orderkey having sum(l_quantity) > 250) +and c_custkey = o_custkey +and o_orderkey = l_orderkey +group by c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice +order by o_totalprice desc, o_orderdate; +c_name c_custkey o_orderkey o_orderdate o_totalprice sum(l_quantity) +Customer#000000070 70 2567 1998-02-27 263411.29 266 +Customer#000000010 10 4421 1997-04-04 258779.02 255 +Customer#000000082 82 3460 1995-10-03 245976.74 254 +Customer#000000068 68 2208 1995-05-01 245388.06 256 +=== Q22 === +set optimizer_use_condition_selectivity=1; +EXPLAIN EXTENDED select cntrycode, count(*) as numcust, sum(c_acctbal) as totacctbal +from ( +select substr(c_phone, 1, 2) as cntrycode, c_acctbal +from customer +where +substr(c_phone, 1, 2) in ('10', '20', '14', '19', '11', '28', '25') +and c_acctbal > (select avg(c_acctbal) from customer +where c_acctbal > 0.00 +and substr(c_phone, 1, 2) in +('10', '20', '14', '19', '11', '28', '25')) +and not exists (select * from orders where o_custkey = c_custkey) +) as vip +group by cntrycode +order by cntrycode; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY customer ALL NULL NULL NULL NULL 150 100.00 Using where; Using temporary; Using filesort +4 DEPENDENT SUBQUERY orders ref i_o_custkey i_o_custkey 5 dbt3_s001.customer.c_custkey 15 100.00 Using index +3 SUBQUERY customer ALL NULL NULL NULL NULL 150 100.00 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.customer.c_custkey' of SELECT #4 was resolved in SELECT #2 +Note 1003 select substr(`dbt3_s001`.`customer`.`c_phone`,1,2) AS `cntrycode`,count(0) AS `numcust`,sum(`dbt3_s001`.`customer`.`c_acctbal`) AS `totacctbal` from `dbt3_s001`.`customer` where ((substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25')) and (`dbt3_s001`.`customer`.`c_acctbal` > (select avg(`dbt3_s001`.`customer`.`c_acctbal`) from `dbt3_s001`.`customer` where ((`dbt3_s001`.`customer`.`c_acctbal` > 0.00) and (substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25'))))) and (not(<in_optimizer>(1,exists(select 1 from `dbt3_s001`.`orders` where (`dbt3_s001`.`orders`.`o_custkey` = `dbt3_s001`.`customer`.`c_custkey`)))))) group by substr(`dbt3_s001`.`customer`.`c_phone`,1,2) order by substr(`dbt3_s001`.`customer`.`c_phone`,1,2) +select cntrycode, count(*) as numcust, sum(c_acctbal) as totacctbal +from ( +select substr(c_phone, 1, 2) as cntrycode, c_acctbal +from customer +where +substr(c_phone, 1, 2) in ('10', '20', '14', '19', '11', '28', '25') +and c_acctbal > (select avg(c_acctbal) from customer +where c_acctbal > 0.00 +and substr(c_phone, 1, 2) in +('10', '20', '14', '19', '11', '28', '25')) +and not exists (select * from orders where o_custkey = c_custkey) +) as vip +group by cntrycode +order by cntrycode; +cntrycode numcust totacctbal +11 4 29942.58 +19 2 17120.35 +20 1 9091.82 +28 2 14755.5 +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED select cntrycode, count(*) as numcust, sum(c_acctbal) as totacctbal +from ( +select substr(c_phone, 1, 2) as cntrycode, c_acctbal +from customer +where +substr(c_phone, 1, 2) in ('10', '20', '14', '19', '11', '28', '25') +and c_acctbal > (select avg(c_acctbal) from customer +where c_acctbal > 0.00 +and substr(c_phone, 1, 2) in +('10', '20', '14', '19', '11', '28', '25')) +and not exists (select * from orders where o_custkey = c_custkey) +) as vip +group by cntrycode +order by cntrycode; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY customer ALL NULL NULL NULL NULL 150 100.00 Using where; Using temporary; Using filesort +4 DEPENDENT SUBQUERY orders ref i_o_custkey i_o_custkey 5 dbt3_s001.customer.c_custkey 15 100.00 Using index +3 SUBQUERY customer ALL NULL NULL NULL NULL 150 91.00 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.customer.c_custkey' of SELECT #4 was resolved in SELECT #2 +Note 1003 select substr(`dbt3_s001`.`customer`.`c_phone`,1,2) AS `cntrycode`,count(0) AS `numcust`,sum(`dbt3_s001`.`customer`.`c_acctbal`) AS `totacctbal` from `dbt3_s001`.`customer` where ((substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25')) and (`dbt3_s001`.`customer`.`c_acctbal` > (select avg(`dbt3_s001`.`customer`.`c_acctbal`) from `dbt3_s001`.`customer` where ((`dbt3_s001`.`customer`.`c_acctbal` > 0.00) and (substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25'))))) and (not(<in_optimizer>(1,exists(select 1 from `dbt3_s001`.`orders` where (`dbt3_s001`.`orders`.`o_custkey` = `dbt3_s001`.`customer`.`c_custkey`)))))) group by substr(`dbt3_s001`.`customer`.`c_phone`,1,2) order by substr(`dbt3_s001`.`customer`.`c_phone`,1,2) +select cntrycode, count(*) as numcust, sum(c_acctbal) as totacctbal +from ( +select substr(c_phone, 1, 2) as cntrycode, c_acctbal +from customer +where +substr(c_phone, 1, 2) in ('10', '20', '14', '19', '11', '28', '25') +and c_acctbal > (select avg(c_acctbal) from customer +where c_acctbal > 0.00 +and substr(c_phone, 1, 2) in +('10', '20', '14', '19', '11', '28', '25')) +and not exists (select * from orders where o_custkey = c_custkey) +) as vip +group by cntrycode +order by cntrycode; +cntrycode numcust totacctbal +11 4 29942.58 +19 2 17120.35 +20 1 9091.82 +28 2 14755.5 +=== Q20 === +set optimizer_use_condition_selectivity=1; +EXPLAIN EXTENDED select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY supplier ALL PRIMARY,i_s_nationkey NULL NULL NULL 10 100.00 Using where; Using filesort +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +1 PRIMARY nation eq_ref PRIMARY PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 100.00 Using where +2 MATERIALIZED part ALL PRIMARY NULL NULL NULL 200 100.00 Using where +2 MATERIALIZED partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where +4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 100.00 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2 +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2 +Note 1003 select sql_calc_found_rows `dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address` from `dbt3_s001`.`supplier` semi join (`dbt3_s001`.`part` join `dbt3_s001`.`partsupp`) join `dbt3_s001`.`nation` where ((`dbt3_s001`.`nation`.`n_nationkey` = `dbt3_s001`.`supplier`.`s_nationkey`) and (`dbt3_s001`.`nation`.`n_name` = 'UNITED STATES') and (`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`partsupp`.`ps_availqty` > <expr_cache><`dbt3_s001`.`partsupp`.`ps_partkey`,`dbt3_s001`.`partsupp`.`ps_suppkey`>((select (0.5 * sum(`dbt3_s001`.`lineitem`.`l_quantity`)) from `dbt3_s001`.`lineitem` where ((`dbt3_s001`.`lineitem`.`l_partkey` = `dbt3_s001`.`partsupp`.`ps_partkey`) and (`dbt3_s001`.`lineitem`.`l_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`lineitem`.`l_shipDATE` >= <cache>(cast('1993-01-01' as date))) and (`dbt3_s001`.`lineitem`.`l_shipDATE` < <cache>((cast('1993-01-01' as date) + interval '1' year))))))) and (`dbt3_s001`.`part`.`p_name` like 'g%')) order by `dbt3_s001`.`supplier`.`s_name` limit 10 +select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +s_name s_address +Supplier#000000010 Saygah3gYWMp72i PY +SELECT ((SELECT COUNT(*) FROM part WHERE p_name LIKE 'g%') / +(SELECT COUNT(*) FROM part)) AS sel; +sel +0.0600 +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY nation ALL PRIMARY NULL NULL NULL 25 4.00 Using where; Using temporary; Using filesort +1 PRIMARY supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +2 MATERIALIZED part ALL PRIMARY NULL NULL NULL 200 4.17 Using where +2 MATERIALIZED partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where +4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.37 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2 +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2 +Note 1003 select sql_calc_found_rows `dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address` from `dbt3_s001`.`supplier` semi join (`dbt3_s001`.`part` join `dbt3_s001`.`partsupp`) join `dbt3_s001`.`nation` where ((`dbt3_s001`.`supplier`.`s_nationkey` = `dbt3_s001`.`nation`.`n_nationkey`) and (`dbt3_s001`.`nation`.`n_name` = 'UNITED STATES') and (`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`partsupp`.`ps_availqty` > <expr_cache><`dbt3_s001`.`partsupp`.`ps_partkey`,`dbt3_s001`.`partsupp`.`ps_suppkey`>((select (0.5 * sum(`dbt3_s001`.`lineitem`.`l_quantity`)) from `dbt3_s001`.`lineitem` where ((`dbt3_s001`.`lineitem`.`l_partkey` = `dbt3_s001`.`partsupp`.`ps_partkey`) and (`dbt3_s001`.`lineitem`.`l_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`lineitem`.`l_shipDATE` >= <cache>(cast('1993-01-01' as date))) and (`dbt3_s001`.`lineitem`.`l_shipDATE` < <cache>((cast('1993-01-01' as date) + interval '1' year))))))) and (`dbt3_s001`.`part`.`p_name` like 'g%')) order by `dbt3_s001`.`supplier`.`s_name` limit 10 +select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +s_name s_address +Supplier#000000010 Saygah3gYWMp72i PY +set histogram_size=127; +ANALYZE TABLE part PERSISTENT FOR COLUMNS(p_name) INDEXES(); +Table Op Msg_type Msg_text +dbt3_s001.part analyze status Engine-independent statistics collected +dbt3_s001.part analyze status OK +flush table part; +set optimizer_use_condition_selectivity=4; +EXPLAIN EXTENDED select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY nation ALL PRIMARY NULL NULL NULL 25 4.00 Using where; Using temporary; Using filesort +1 PRIMARY supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +2 MATERIALIZED part ALL PRIMARY NULL NULL NULL 200 7.03 Using where +2 MATERIALIZED partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where +4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.37 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2 +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2 +Note 1003 select sql_calc_found_rows `dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address` from `dbt3_s001`.`supplier` semi join (`dbt3_s001`.`part` join `dbt3_s001`.`partsupp`) join `dbt3_s001`.`nation` where ((`dbt3_s001`.`supplier`.`s_nationkey` = `dbt3_s001`.`nation`.`n_nationkey`) and (`dbt3_s001`.`nation`.`n_name` = 'UNITED STATES') and (`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`partsupp`.`ps_availqty` > <expr_cache><`dbt3_s001`.`partsupp`.`ps_partkey`,`dbt3_s001`.`partsupp`.`ps_suppkey`>((select (0.5 * sum(`dbt3_s001`.`lineitem`.`l_quantity`)) from `dbt3_s001`.`lineitem` where ((`dbt3_s001`.`lineitem`.`l_partkey` = `dbt3_s001`.`partsupp`.`ps_partkey`) and (`dbt3_s001`.`lineitem`.`l_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`lineitem`.`l_shipDATE` >= <cache>(cast('1993-01-01' as date))) and (`dbt3_s001`.`lineitem`.`l_shipDATE` < <cache>((cast('1993-01-01' as date) + interval '1' year))))))) and (`dbt3_s001`.`part`.`p_name` like 'g%')) order by `dbt3_s001`.`supplier`.`s_name` limit 10 +select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +s_name s_address +Supplier#000000010 Saygah3gYWMp72i PY +set histogram_type='DOUBLE_PREC_HB'; +set histogram_size=126; +ANALYZE TABLE part PERSISTENT FOR COLUMNS(p_name) INDEXES(); +Table Op Msg_type Msg_text +dbt3_s001.part analyze status Engine-independent statistics collected +dbt3_s001.part analyze status OK +flush table part; +EXPLAIN EXTENDED select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY nation ALL PRIMARY NULL NULL NULL 25 4.00 Using where; Using temporary; Using filesort +1 PRIMARY supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +2 MATERIALIZED part ALL PRIMARY NULL NULL NULL 200 7.81 Using where +2 MATERIALIZED partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where +4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.37 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2 +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2 +Note 1003 select sql_calc_found_rows `dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address` from `dbt3_s001`.`supplier` semi join (`dbt3_s001`.`part` join `dbt3_s001`.`partsupp`) join `dbt3_s001`.`nation` where ((`dbt3_s001`.`supplier`.`s_nationkey` = `dbt3_s001`.`nation`.`n_nationkey`) and (`dbt3_s001`.`nation`.`n_name` = 'UNITED STATES') and (`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`partsupp`.`ps_availqty` > <expr_cache><`dbt3_s001`.`partsupp`.`ps_partkey`,`dbt3_s001`.`partsupp`.`ps_suppkey`>((select (0.5 * sum(`dbt3_s001`.`lineitem`.`l_quantity`)) from `dbt3_s001`.`lineitem` where ((`dbt3_s001`.`lineitem`.`l_partkey` = `dbt3_s001`.`partsupp`.`ps_partkey`) and (`dbt3_s001`.`lineitem`.`l_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`lineitem`.`l_shipDATE` >= <cache>(cast('1993-01-01' as date))) and (`dbt3_s001`.`lineitem`.`l_shipDATE` < <cache>((cast('1993-01-01' as date) + interval '1' year))))))) and (`dbt3_s001`.`part`.`p_name` like 'g%')) order by `dbt3_s001`.`supplier`.`s_name` limit 10 +select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +s_name s_address +Supplier#000000010 Saygah3gYWMp72i PY +set histogram_type='SINGLE_PREC_HB'; +set histogram_size=24; +ANALYZE TABLE nation PERSISTENT FOR COLUMNS(n_name) INDEXES(); +Table Op Msg_type Msg_text +dbt3_s001.nation analyze status Engine-independent statistics collected +dbt3_s001.nation analyze status OK +flush table nation; +EXPLAIN EXTENDED select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY nation ALL PRIMARY NULL NULL NULL 25 4.00 Using where; Using temporary; Using filesort +1 PRIMARY supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +2 MATERIALIZED part ALL PRIMARY NULL NULL NULL 200 7.81 Using where +2 MATERIALIZED partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where +4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.37 Using where +Warnings: +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2 +Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2 +Note 1003 select sql_calc_found_rows `dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address` from `dbt3_s001`.`supplier` semi join (`dbt3_s001`.`part` join `dbt3_s001`.`partsupp`) join `dbt3_s001`.`nation` where ((`dbt3_s001`.`supplier`.`s_nationkey` = `dbt3_s001`.`nation`.`n_nationkey`) and (`dbt3_s001`.`nation`.`n_name` = 'UNITED STATES') and (`dbt3_s001`.`partsupp`.`ps_partkey` = `dbt3_s001`.`part`.`p_partkey`) and (`dbt3_s001`.`partsupp`.`ps_availqty` > <expr_cache><`dbt3_s001`.`partsupp`.`ps_partkey`,`dbt3_s001`.`partsupp`.`ps_suppkey`>((select (0.5 * sum(`dbt3_s001`.`lineitem`.`l_quantity`)) from `dbt3_s001`.`lineitem` where ((`dbt3_s001`.`lineitem`.`l_partkey` = `dbt3_s001`.`partsupp`.`ps_partkey`) and (`dbt3_s001`.`lineitem`.`l_suppkey` = `dbt3_s001`.`partsupp`.`ps_suppkey`) and (`dbt3_s001`.`lineitem`.`l_shipDATE` >= <cache>(cast('1993-01-01' as date))) and (`dbt3_s001`.`lineitem`.`l_shipDATE` < <cache>((cast('1993-01-01' as date) + interval '1' year))))))) and (`dbt3_s001`.`part`.`p_name` like 'g%')) order by `dbt3_s001`.`supplier`.`s_name` limit 10 +select sql_calc_found_rows +s_name, s_address +from supplier, nation +where s_suppkey in (select ps_suppkey from partsupp +where ps_partkey in (select p_partkey from part +where p_name like 'g%') +and ps_availqty > +(select 0.5 * sum(l_quantity) +from lineitem +where l_partkey = ps_partkey +and l_suppkey = ps_suppkey +and l_shipdate >= date('1993-01-01') +and l_shipdate < date('1993-01-01') + +interval '1' year )) +and s_nationkey = n_nationkey +and n_name = 'UNITED STATES' +order by s_name +limit 10; +s_name s_address +Supplier#000000010 Saygah3gYWMp72i PY +DROP DATABASE dbt3_s001; +set histogram_type=@save_histogram_type; +set histogram_size=@save_histogram_size; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +use test; +# +# Bug mdev-4348: using view with use_condition_selectivity > 1 +# +set @tmp_use_stat_tables=@@use_stat_tables; +set use_stat_tables='never'; +set optimizer_use_condition_selectivity=3; +CREATE TABLE t1 (a int, b int); +INSERT t1 VALUES (7,1), (0,7); +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; +CREATE TABLE t2 (c int, d int, index idx(d)); +INSERT INTO t2 VALUES +(0,4), (8,6), (1,3), (8,5), (9,3), (2,2), (6,2), +(1,9), (6,3), (2,8), (4,1), (0,7), (4,8), (4,5); +EXPLAIN EXTENDED +SELECT * FROM v1 INNER JOIN t2 ON ( a = c AND b = d ); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where +1 SIMPLE t2 ref idx idx 5 test.t1.b 1 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`c` = `test`.`t1`.`a`) and (`test`.`t2`.`d` = `test`.`t1`.`b`)) +SELECT * FROM v1 INNER JOIN t2 ON ( a = c AND b = d ); +a b c d +0 7 0 7 +DROP VIEW v1; +DROP TABLE t1,t2; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set use_stat_tables=@tmp_use_stat_tables; +# +# Bug mdev-4349: impossible range for non-indexed column +# +set optimizer_use_condition_selectivity=3; +create table t1 (a int); +insert into t1 values +(3), (7), (2), (5), (7), (1), (2), (2); +set optimizer_use_condition_selectivity=1; +explain extended +select * from t1 where a < 1 and a > 7; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` < 1) and (`test`.`t1`.`a` > 7)) +select * from t1 where a < 1 and a > 7; +a +set optimizer_use_condition_selectivity=3; +explain extended +select * from t1 where a < 1 and a > 7; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 0 +select * from t1 where a < 1 and a > 7; +a +drop table t1; +create table t1 (a int); +insert into t1 values (1); +create table t2 (b int); +insert into t2 values (2),(3); +explain extended +select * from t1 where a in ( select b from t2 ) AND ( a > 3 ); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1 100.00 Using where +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 100.00 +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) where ((`test`.`t1`.`a` > 3)) +select * from t1 where a in ( select b from t2 ) AND ( a > 3 ); +a +drop table t1,t2; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +# +# Bug mdev-4350: erroneous negative selectivity +# +create table t1 (a int); +insert into t1 values (1), (1); +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 values (0); +select count(*) from t1; +count(*) +1025 +set use_stat_tables='preferably'; +set histogram_size=127; +set histogram_type='SINGLE_PREC_HB'; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +flush table t1; +set optimizer_use_condition_selectivity=4; +explain extended select * from t1 where a=0; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 1025 0.39 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = 0) +drop table t1; +set histogram_size=@save_histogram_size; +set histogram_type=@save_histogram_type; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +# +# Bug mdev-4367: 2-way join with an empty table +# when optimizer_use_condition_selectivity=3 +# +set optimizer_use_condition_selectivity=3; +CREATE TABLE t1 (a varchar(1)) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('j'),('k'); +CREATE TABLE t2 (b varchar(1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('x'),('y'); +CREATE TABLE t3 (c varchar(1), KEY(c)) ENGINE=MyISAM; +SELECT * FROM t1 STRAIGHT_JOIN (t2 JOIN t3 ON c = b AND b > 'z'); +a b c +DROP TABLE t1,t2,t3; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +# +# Bug mdev-4366: impossible condition on an indexed column discovered after +# substitution of constant tables +# with optimizer_use_condition_selectivity=3 +# +CREATE TABLE t1 (pk int PRIMARY KEY, a int); +INSERT INTO t1 VALUES +(1,4), (2,6), (3,3), (4,5); +CREATE TABLE t2 (b int); +INSERT INTO t2 VALUES (1), (7); +set optimizer_use_condition_selectivity=1; +EXPLAIN EXTENDED +SELECT 1 FROM t1, t2 WHERE pk = 6 AND a = 2 AND b = 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select 1 AS `1` from `test`.`t1` join `test`.`t2` where 0 +SELECT 1 FROM t1, t2 WHERE pk = 6 AND a = 2 AND b = 10; +1 +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED +SELECT 1 FROM t1, t2 WHERE pk = 6 AND a = 2 AND b = 10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select 1 AS `1` from `test`.`t1` join `test`.`t2` where 0 +SELECT 1 FROM t1, t2 WHERE pk = 6 AND a = 2 AND b = 10; +1 +DROP TABLE t1,t2; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +# +# Bug mdev-4370: Histograms have bean created, but the query is run after +# FLUSH TABLES with optimizer_use_condition_selectivity=3 +# +set use_stat_tables=PREFERABLY; +set histogram_size=10; +set histogram_type='SINGLE_PREC_HB'; +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (9), (1); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +FLUSH TABLES; +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED +SELECT * FROM t1 WHERE a > 3; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 75.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` > 3) +SELECT * FROM t1 WHERE a > 3; +a +9 +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1; +set histogram_size=@save_histogram_size; +set histogram_type=@save_histogram_type; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4371: Join with condition supported by index on an empty table +# with optimizer_use_condition_selectivity=3 +# +set use_stat_tables=PREFERABLY; +CREATE TABLE t1 (a int, b int, INDEX(a)); +CREATE TABLE t2 (c int); +INSERT INTO t2 VALUES (1),(2),(3),(4),(5),(6),(7),(8); +ANALYZE TABLE t1, t2; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +FLUSH TABLES; +set optimizer_use_condition_selectivity=3; +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='index_condition_pushdown=off'; +EXPLAIN EXTENDED +SELECT * FROM t1, t2 WHERE a > 9; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range a a 5 NULL 1 0.00 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 8 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t1` join `test`.`t2` where (`test`.`t1`.`a` > 9) +SELECT * FROM t1, t2 WHERE a > 9; +a b c +set optimizer_switch=@save_optimizer_switch; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4373: condition on a short varchar column +# with optimizer_use_condition_selectivity=3 +# +set use_stat_tables=PREFERABLY; +CREATE TABLE t1 (a varchar(1)); +INSERT INTO t1 VALUES ('x'), ('y'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +FLUSH TABLES; +set optimizer_use_condition_selectivity=3; +SELECT * FROM t1 WHERE a <= 'w'; +a +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4372: exists subquery in WHERE +# with optimizer_use_condition_selectivity=3 +# +set use_stat_tables = PREFERABLY; +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES +(1),(7),(4),(7),(0),(2),(9),(4),(0),(9),(1),(3),(8),(8); +CREATE TABLE t2 (b int); +INSERT INTO t2 VALUES (4),(5),(2),(5),(1),(1),(2); +ANALYZE TABLE t1, t2; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +FLUSH TABLES; +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED +SELECT * FROM t1, t2 WHERE EXISTS ( SELECT 1 FROM t1, t2 ) AND a != b OR a <= 4; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 7 100.00 +1 PRIMARY t1 ALL NULL NULL NULL NULL 14 100.00 Using where; Using join buffer (flat, BNL join) +2 SUBQUERY t2 ALL NULL NULL NULL NULL 7 100.00 +2 SUBQUERY t1 ALL NULL NULL NULL NULL 14 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where ((<cache>(<in_optimizer>(1,exists(select 1 from `test`.`t1` join `test`.`t2`))) and (`test`.`t1`.`a` <> `test`.`t2`.`b`)) or (`test`.`t1`.`a` <= 4)) +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4363: selectivity of the condition a IS NULL OR IS NOT NULL +# with optimizer_use_condition_selectivity=3 +# +set use_stat_tables = PREFERABLY; +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES +(1),(7),(4),(7),(NULL),(2),(NULL),(4),(NULL),(NULL),(1),(3),(8),(8); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +FLUSH TABLE t1; +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED +SELECT * FROM t1 WHERE a IS NULL; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 14 28.57 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where isnull(`test`.`t1`.`a`) +EXPLAIN EXTENDED +SELECT * FROM t1 WHERE a IS NOT NULL; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 14 71.43 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` is not null) +EXPLAIN EXTENDED +SELECT * FROM t1 WHERE a IS NULL OR a IS NOT NULL; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 14 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (isnull(`test`.`t1`.`a`) or (`test`.`t1`.`a` is not null)) +EXPLAIN EXTENDED +SELECT * FROM t1 WHERE a IS NULL OR a < 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 14 69.39 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (isnull(`test`.`t1`.`a`) or (`test`.`t1`.`a` < 5)) +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4378: 2-way join with a materialized IN subquery in WHERE +# when optimizer_use_condition_selectivity=4 +# +set use_stat_tables=PREFERABLY; +set histogram_size=50; +set histogram_type=SINGLE_PREC_HB; +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (8),(9),(6); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (8),(1),(8),(9),(24),(6),(1),(6),(2),(4); +CREATE TABLE t3 (ln VARCHAR(16)) ENGINE=MyISAM; +INSERT INTO t3 VALUES +('smith'),('black'),('white'),('jones'), +('brown'),('taylor'),('anderson'),('taylor'); +ANALYZE TABLE t1, t2, t3; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +test.t3 analyze status Engine-independent statistics collected +test.t3 analyze status OK +FLUSH TABLES; +set optimizer_use_condition_selectivity=4; +SELECT * FROM t1, t2 WHERE 'garcia' IN ( SELECT MIN( ln ) FROM t3 WHERE ln = 'sun' ); +a b +set histogram_size=@save_histogram_size; +set histogram_type=@save_histogram_type; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2,t3; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4380: 2-way join with a materialized IN subquery in WHERE +# when optimizer_use_condition_selectivity=3 +# +set use_stat_tables=PREFERABLY; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (5),(9); +CREATE TABLE t2 (b VARCHAR(8)); +INSERT INTO t2 VALUES ('red'),('blue'); +CREATE TABLE t3 (c VARCHAR(8), d VARCHAR(8)); +INSERT INTO t3 VALUES ('white','black'),('cyan','yellow'); +ANALYZE TABLE t1, t2, t3; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +test.t3 analyze status Engine-independent statistics collected +test.t3 analyze status OK +FLUSH TABLES; +set optimizer_use_condition_selectivity=3; +SELECT * FROM t1, t2 WHERE ( 'orange', 'green' ) IN ( +SELECT MAX(c), MAX(d) FROM t3, t2 WHERE c >= d AND b = c +); +a b +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2,t3; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4389: join with degenerated range condition in WHERE +# when optimizer_use_condition_selectivity=3 +# +set use_stat_tables=PREFERABLY; +CREATE TABLE t1 (f1 VARCHAR(1)); +INSERT t1 VALUES ('p'),('q'); +CREATE TABLE t2 (f2 VARCHAR(1)); +INSERT INTO t2 VALUES +('o'),('v'),('f'),('f'),('e'),('l'),('j'),('p'),('r'),('j'), +('j'),('u'),('i'),('r'),('x'),('a'),('x'),('s'); +ANALYZE TABLE t1, t2; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +FLUSH TABLES; +SET optimizer_use_condition_selectivity=3; +SELECT * FROM t1, t2 AS t2a, t2 AS t2b WHERE f1 <= 'a' AND t2a.f2 = f1; +f1 f2 f2 +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4406: range condition for non-nullable column +# when optimizer_use_condition_selectivity=3 +# +create table t1 (a int not null); +insert into t1 values +(7), (6), (4), (9), (1), (5), (2), (1), (3), (8); +set use_stat_tables='preferably'; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +flush table t1; +set optimizer_use_condition_selectivity=3; +select count(*) from t1 where a between 5 and 7; +count(*) +3 +explain extended select * from t1 where a between 5 and 7; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 25.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` between 5 and 7) +alter table t1 change column a a int; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +flush table t1; +explain extended select * from t1 where a between 5 and 7; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 25.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` between 5 and 7) +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t1; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-5200: impossible where with a semijoin subquery +# when optimizer_use_condition_selectivity=2 +# +set use_stat_tables = 'preferably'; +set optimizer_use_condition_selectivity = 2; +CREATE TABLE t1 (i1 int) ENGINE=MyISAM; +INSERT INTO t1 VALUES (0), (1); +CREATE TABLE t2 (pk2 int, i2 int, c2 char(1), PRIMARY KEY(pk2)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1,8,'m'), (2,9,'b'); +CREATE TABLE t3 (c3 char(1), INDEX(c3)) ENGINE=MyISAM; +INSERT INTO t3 VALUES ('v'), ('c'); +ANALYZE TABLE t1,t2,t3; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +test.t3 analyze status Engine-independent statistics collected +test.t3 analyze status OK +SELECT * FROM t1 +WHERE 2 IN ( SELECT pk2 FROM t2 LEFT JOIN t3 ON (c3 = c2 ) WHERE i2 = 3 ); +i1 +EXPLAIN EXTENDED +SELECT * FROM t1 +WHERE 2 IN ( SELECT pk2 FROM t2 LEFT JOIN t3 ON (c3 = c2 ) WHERE i2 = 3 ); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select `test`.`t1`.`i1` AS `i1` from `test`.`t1` semi join (`test`.`t2` left join `test`.`t3` on((`test`.`t3`.`c3` = 'b'))) where 0 +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2,t3; +# +# Bug mdev-5415: query over an information schema table +# when optimizer_use_condition_selectivity=3 +# +set optimizer_use_condition_selectivity = 3; +SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE SQL_MODE != ''; +TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +# +# Bug mdev-5630: always true conjunctive condition +# when optimizer_use_condition_selectivity=3 +# +set use_stat_tables = 'preferably'; +set optimizer_use_condition_selectivity = 3; +CREATE TABLE t1 (a int) ENGINE=MyISAM; +INSERT INTO t1 VALUES (10); +CREATE TABLE t2 (id int, flag char(1), INDEX(id)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (100,'0'),(101,'1'); +ANALYZE TABLE t1, t2; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +SELECT * FROM t1, t2 WHERE id = a AND ( a = 16 OR flag AND a != 6 ); +a id flag +DROP TABLE t1,t2; +# +# Bug mdev-4429: join with range condition whose selectivity == 0 +# when optimizer_use_condition_selectivity=3 +# +CREATE TABLE language (lang_group INT, lang VARCHAR(16) PRIMARY KEY); +INSERT INTO language VALUES +(1,'Chinese'),(6,'English'),(1,'French'), +(1,'German'),(1,'Italian'),(0,'Japanese'); +CREATE TABLE country (code varchar(3) PRIMARY KEY, +country_group INT DEFAULT NULL); +INSERT INTO country VALUES ('USA',3),('FRA',5); +CREATE TABLE continent (cont_group INT, cont varchar(16) PRIMARY KEY); +INSERT INTO continent VALUES +(1,'N.America'),(1,'S.America'),(3,'Australia'), +(4,'Africa'),(5,'Antarctica'),(6,'Eurasia'); +SET use_stat_tables=PREFERABLY; +ANALYZE TABLE country, language, continent; +Table Op Msg_type Msg_text +test.country analyze status Engine-independent statistics collected +test.country analyze status OK +test.language analyze status Engine-independent statistics collected +test.language analyze status OK +test.continent analyze status Engine-independent statistics collected +test.continent analyze status OK +FLUSH TABLES; +SET optimizer_use_condition_selectivity=3; +SELECT * FROM language, country, continent +WHERE country_group = lang_group AND lang_group IS NULL; +lang_group lang code country_group cont_group cont +EXPLAIN EXTENDED +SELECT * FROM language, country, continent +WHERE country_group = lang_group AND lang_group IS NULL; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE country ALL NULL NULL NULL NULL 2 0.00 Using where +1 SIMPLE language ALL NULL NULL NULL NULL 6 0.00 Using where; Using join buffer (flat, BNL join) +1 SIMPLE continent ALL NULL NULL NULL NULL 6 100.00 Using join buffer (incremental, BNL join) +Warnings: +Note 1003 select `test`.`language`.`lang_group` AS `lang_group`,`test`.`language`.`lang` AS `lang`,`test`.`country`.`code` AS `code`,`test`.`country`.`country_group` AS `country_group`,`test`.`continent`.`cont_group` AS `cont_group`,`test`.`continent`.`cont` AS `cont` from `test`.`language` join `test`.`country` join `test`.`continent` where ((`test`.`language`.`lang_group` = `test`.`country`.`country_group`) and isnull(`test`.`country`.`country_group`)) +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table language, country, continent; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-5191: performance degradation due to a suboptimal chosen plan +# when optimizer_use_condition_selectivity=3 +# +set use_stat_tables = 'preferably'; +set @@RAND_SEED1=810763568, @@RAND_SEED2=600681772; +set TIMESTAMP=1394806993; +create table t1 (a int, b int) engine=myisam; +insert t1 values (rand()*1e5, rand()*1e5); +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +insert t1 select rand()*1e5, rand()*1e5 from t1; +create table t2 (c int, d int, key(c), key(d)) engine=myisam; +insert t2 select floor(rand()*1e5/2)*2, floor(rand()*1e5/3)*3 from t1; +analyze table t1,t2; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status Table is already up to date +set optimizer_use_condition_selectivity=1; +explain extended +select * from t1, t2, t1 as t3 +where t1.b=t2.c and t2.d=t3.a and t3.b<5 and t1.a < 2000; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 262144 100.00 Using where +1 SIMPLE t2 ref c,d c 5 test.t1.b 5 100.00 +1 SIMPLE t3 ALL NULL NULL NULL NULL 262144 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` join `test`.`t2` join `test`.`t1` `t3` where ((`test`.`t2`.`c` = `test`.`t1`.`b`) and (`test`.`t3`.`a` = `test`.`t2`.`d`) and (`test`.`t3`.`b` < 5) and (`test`.`t1`.`a` < 2000)) +select * from t1, t2, t1 as t3 +where t1.b=t2.c and t2.d=t3.a and t3.b<5 and t1.a < 2000; +a b c d a b +1495 89366 89366 28296 28296 3 +961 24512 24512 85239 85239 4 +1063 89366 89366 28296 28296 3 +221 56120 56120 28296 28296 3 +set optimizer_use_condition_selectivity=3; +explain extended +select * from t1, t2, t1 as t3 +where t1.b=t2.c and t2.d=t3.a and t3.b<5 and t1.a < 2000; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 ALL NULL NULL NULL NULL 262144 0.00 Using where +1 SIMPLE t2 ref c,d d 5 test.t3.a 7 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 262144 2.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` join `test`.`t2` join `test`.`t1` `t3` where ((`test`.`t1`.`b` = `test`.`t2`.`c`) and (`test`.`t2`.`d` = `test`.`t3`.`a`) and (`test`.`t3`.`b` < 5) and (`test`.`t1`.`a` < 2000)) +select * from t1, t2, t1 as t3 +where t1.b=t2.c and t2.d=t3.a and t3.b<5 and t1.a < 2000; +a b c d a b +961 24512 24512 85239 85239 4 +1495 89366 89366 28296 28296 3 +1063 89366 89366 28296 28296 3 +221 56120 56120 28296 28296 3 +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t1,t2; +set histogram_type=@save_histogram_type; +set histogram_size=@save_histogram_size; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +# +# Bug mdev-5931: no where condition after constant table row substitution +# with optimizer_use_condition_selectivity=3 +# +CREATE TABLE t1 (a varchar(3), b varchar(3)) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('foo', 'foo'); +CREATE TABLE t2 (c INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1), (2); +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED +SELECT * FROM t1, t2 WHERE c >= 0 OR a = b ; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 +Warnings: +Note 1003 select 'foo' AS `a`,'foo' AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where 1 +SELECT * FROM t1, t2 WHERE c >= 0 OR a = b ; +a b c +foo foo 1 +foo foo 2 +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2; +# +# Bug mdev-6325: wrong selectivity of a column with ref access +# +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1(a int); +insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C; +create table t2 (a int, b int, key(a)); +insert into t2 select A.a + 10*B.a, 12345 from t0 A, t0 B, t0 C; +set use_stat_tables='preferably'; +set histogram_size=100; +set optimizer_use_condition_selectivity=4; +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +analyze table t2 persistent for all; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +explain extended +select * from t1 straight_join t2 where t1.a=t2.a and t1.a<10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 0.99 Using where +1 SIMPLE t2 ref a a 5 test.t1.a 10 100.00 +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` straight_join `test`.`t2` where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (`test`.`t1`.`a` < 10)) +explain extended +select * from t1 straight_join t2 where t1.a=t2.a and t2.a<10; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 0.99 Using where +1 SIMPLE t2 ref a a 5 test.t1.a 10 100.00 +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` straight_join `test`.`t2` where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (`test`.`t1`.`a` < 10)) +set histogram_size=@save_histogram_size; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t0,t1,t2; +# +# Bug mdev-6843: col IS NULL in where condition when col is always NULL +# +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1(a int); +insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C; +create table t2 (a int, b int); +insert into t2 select NULL, a from t1; +set use_stat_tables='preferably'; +set histogram_size=100; +set optimizer_use_condition_selectivity=4; +analyze table t2 persistent for all; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +explain extended +select * from t2 a straight_join t2 b where a.a is null; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE a ALL NULL NULL NULL NULL 1000 100.00 Using where +1 SIMPLE b ALL NULL NULL NULL NULL 1000 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`a`.`a` AS `a`,`test`.`a`.`b` AS `b`,`test`.`b`.`a` AS `a`,`test`.`b`.`b` AS `b` from `test`.`t2` `a` straight_join `test`.`t2` `b` where isnull(`test`.`a`.`a`) +set histogram_size=@save_histogram_size; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t0,t1,t2; +# +# Bug mdev-7316: a conjunct in WHERE with selectivity == 0 +# +CREATE TABLE t1 (a varchar(16), b int, PRIMARY KEY(a), KEY(b)) ENGINE=INNODB; +INSERT INTO t1 VALUES +('USAChinese',10), ('USAEnglish',20), ('USAFrench',30); +CREATE TABLE t2 (i int) ENGINE=INNODB; +INSERT INTO t2 VALUES +(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(1),(2),(3),(4); +ANALYZE TABLE t1, t2; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +set use_stat_tables='preferably'; +set optimizer_use_condition_selectivity=3; +EXPLAIN EXTENDED +SELECT * FROM t1, t2 +WHERE a <> 'USARussian' AND b IS NULL; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ref PRIMARY,b b 5 const 2 66.67 Using where; Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 14 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`i` AS `i` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a` <> 'USARussian') and isnull(`test`.`t1`.`b`)) +SELECT * FROM t1, t2 +WHERE a <> 'USARussian' AND b IS NULL; +a b i +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-11096: range condition over column without statistical data +# +set use_stat_tables='preferably'; +set optimizer_use_condition_selectivity=3; +create table t1(col1 char(32)); +insert into t1 values ('a'),('b'),('c'),('d'), ('e'),('f'),('g'),('h'); +analyze table t1 persistent for columns () indexes (); +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +explain extended +select * from t1 where col1 > 'b' and col1 < 'e'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`col1` AS `col1` from `test`.`t1` where ((`test`.`t1`.`col1` > 'b') and (`test`.`t1`.`col1` < 'e')) +select * from t1 where col1 > 'b' and col1 < 'e'; +col1 +c +d +drop table t1; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-9628: unindexed blob column without min-max statistics +# with optimizer_use_condition_selectivity=3 +# +set use_stat_tables='preferably'; +set optimizer_use_condition_selectivity=3; +create table t1(col1 char(32)); +insert into t1 values ('a'),('b'),('c'),('d'), ('e'),('f'),('g'),('h'); +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +create table t2(col1 text); +insert into t2 values ('a'),('b'),('c'),('d'), ('e'),('f'),('g'),('h'); +analyze table t2; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +select * from t1 where col1 > 'b' and col1 < 'd'; +col1 +c +explain extended +select * from t1 where col1 > 'b' and col1 < 'd'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 28.57 Using where +Warnings: +Note 1003 select `test`.`t1`.`col1` AS `col1` from `test`.`t1` where ((`test`.`t1`.`col1` > 'b') and (`test`.`t1`.`col1` < 'd')) +select * from t2 where col1 > 'b' and col1 < 'd'; +col1 +c +explain extended +select * from t2 where col1 > 'b' and col1 < 'd'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 8 100.00 Using where +Warnings: +Note 1003 select `test`.`t2`.`col1` AS `col1` from `test`.`t2` where ((`test`.`t2`.`col1` > 'b') and (`test`.`t2`.`col1` < 'd')) +select * from t2 where col1 < 'b' and col1 > 'd'; +col1 +explain extended +select * from t2 where col1 < 'b' and col1 > 'd'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select `test`.`t2`.`col1` AS `col1` from `test`.`t2` where 0 +drop table t1,t2; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-11364: IS NULL over not nullable datetime column +# in mergeable derived +# +set use_stat_tables='preferably'; +set optimizer_use_condition_selectivity=4; +set HISTOGRAM_SIZE = 255; +CREATE TABLE t1 (t TIME, d DATE NOT NULL); +INSERT INTO t1 VALUES ('10:00:00', '0000-00-00'),('11:00:00','0000-00-00'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SELECT * FROM (SELECT t FROM t1 WHERE d IS NULL) sq; +t +10:00:00 +11:00:00 +DROP TABLE t1; +set histogram_size=@save_histogram_size; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set use_stat_tables=@save_use_stat_tables; +set optimizer_switch=@save_optimizer_switch_for_selectivity_test; +set @tmp_ust= @@use_stat_tables; +set @tmp_oucs= @@optimizer_use_condition_selectivity; +# +# MDEV-6808: MariaDB 10.0.13 crash with optimizer_use_condition_selectivity > 1 +# +set @tmp_mdev6808= @@optimizer_use_condition_selectivity; +SET optimizer_use_condition_selectivity = 2; +CREATE TABLE t1 ( +event_id int(11) unsigned NOT NULL AUTO_INCREMENT, +PRIMARY KEY (event_id) +) ENGINE=InnoDB; +CREATE TABLE t2 ( +repost_id int(11) unsigned NOT NULL AUTO_INCREMENT, +subject_type varchar(24) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, +subject_id int(11) unsigned NOT NULL, +object_type varchar(24) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, +object_id int(11) unsigned NOT NULL, +is_private int(1) NOT NULL DEFAULT '0', +PRIMARY KEY (repost_id), +UNIQUE KEY `BETWEEN` (subject_type,subject_id,object_type,object_id,is_private), +KEY SUBJECT (subject_type,subject_id), +KEY OBJECT (object_type,object_id) +) ENGINE=InnoDB; +SELECT +* +FROM +t2, t1 +WHERE +t2.object_type = 'event' AND +t2.object_id = t1.event_id AND +t2.is_private = 0 AND +t2.subject_id = 127994 AND +t2.subject_type in ('user') +; +repost_id subject_type subject_id object_type object_id is_private event_id +DROP TABLE t1, t2; +set optimizer_use_condition_selectivity=@tmp_mdev6808; +# +# MDEV-6442: Assertion `join->best_read < double(...)' failed with optimizer_use_condition_selectivity >=3, ... +# +SET use_stat_tables = PREFERABLY; +SET optimizer_use_condition_selectivity = 3; +CREATE TABLE t1 ( a VARCHAR(3), b VARCHAR(8), KEY (a,b) ) ENGINE=InnoDB; +INSERT INTO t1 VALUES ('USA','Chinese'),('USA','English'); +CREATE TABLE t2 (i INT) ENGINE=InnoDB; +SELECT * FROM t1, t2 WHERE ( 't', 'o' ) IN ( +SELECT t1_2.b, t1_1.a FROM t1 AS t1_1 STRAIGHT_JOIN t1 AS t1_2 ON ( t1_2.a = t1_1.b ) +); +a b i +DROP TABLE t1,t2; +# +# MDEV-6738: use_stat_table + histograms crashing optimizer +# +set use_stat_tables='preferably'; +set optimizer_use_condition_selectivity=4; +# Need innodb because there is a special kind of field_bit for non-myisam tables +create table t1(col1 int, col2 bit(1) DEFAULT NULL) engine=innodb; +select * from t1 where col2 != true; +col1 col2 +drop table t1; +# +# MDEV-7413: optimizer_use_condition_selectivity > 2 crashes 10.0.15+maria-1~wheezy +# +CREATE TABLE t1 ( +parent_id int, +child_group_id int, +child_user_id int, +KEY (parent_id,child_group_id,child_user_id) +) ENGINE=InnoDB; +CREATE TABLE t2 ( +id int, +lower_group_name varchar(255), +directory_id int(20), +UNIQUE KEY (directory_id) +) ENGINE=InnoDB; +CREATE TABLE t3 (id int) ENGINE=InnoDB; +insert into t1 values (1,1,1),(2,2,2); +insert into t2 values (10,'foo',10),(20,'bar',20); +insert into t3 values (101),(102); +set use_stat_tables = PREFERABLY, optimizer_use_condition_selectivity = 3; +select * from t1, t2, t3 +where t1.child_user_id=t3.id and t1.child_group_id is null and t2.lower_group_name='foo' and t1.parent_id=t2.id and t2.directory_id=10; +parent_id child_group_id child_user_id id lower_group_name directory_id id +drop table t1,t2,t3; +# +# MDEV-9187: duplicate of bug mdev-9628 +# +set use_stat_tables = preferably; +set optimizer_use_condition_selectivity=3; +CREATE TABLE t1 (f1 char(32)) ENGINE=InnoDB; +INSERT INTO t1 VALUES ('foo'),('bar'),('qux'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SELECT * FROM t1 WHERE f1 < 'm'; +f1 +foo +bar +EXPLAIN EXTENDED +SELECT * FROM t1 WHERE f1 < 'm'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 72.09 Using where +Warnings: +Note 1003 select `test`.`t1`.`f1` AS `f1` from `test`.`t1` where (`test`.`t1`.`f1` < 'm') +CREATE TABLE t2 (f1 TEXT) ENGINE=InnoDB; +INSERT INTO t2 VALUES ('foo'),('bar'),('qux'); +ANALYZE TABLE t2; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +SELECT * FROM t2 WHERE f1 <> 'qux'; +f1 +foo +bar +EXPLAIN EXTENDED +SELECT * FROM t2 WHERE f1 <> 'qux'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1003 select `test`.`t2`.`f1` AS `f1` from `test`.`t2` where (`test`.`t2`.`f1` <> 'qux') +DROP TABLE t1,t2; +# +# End of 10.0 tests +# +set use_stat_tables= @tmp_ust; +set optimizer_use_condition_selectivity= @tmp_oucs; +SET SESSION STORAGE_ENGINE=DEFAULT; diff --git a/mysql-test/r/selectivity_no_engine.result b/mysql-test/r/selectivity_no_engine.result new file mode 100644 index 00000000000..31037e90a84 --- /dev/null +++ b/mysql-test/r/selectivity_no_engine.result @@ -0,0 +1,302 @@ +# +# Engine-agnostic tests for statistics-based selectivity calculations. +# - selectivity tests that depend on the engine should go into +# t/selectivity.test. That test is run with myisam/innodb/xtradb. +# - this file is for tests that don't depend on the engine. +# +drop table if exists t0,t1,t2,t3; +select @@global.use_stat_tables; +@@global.use_stat_tables +COMPLEMENTARY +select @@session.use_stat_tables; +@@session.use_stat_tables +COMPLEMENTARY +set @save_use_stat_tables=@@use_stat_tables; +set use_stat_tables='preferably'; +set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; +set @save_histogram_size=@@histogram_size; +set @save_histogram_type=@@histogram_type; +# +# MDEV-5917: EITS: different order of predicates in IN (...) causes different estimates +# +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2 (col1 int); +# one value in 1..100 range +insert into t2 select ta.a + tb.a*10 from t1 ta, t1 tb; +# ten values in 100...200 range +insert into t2 select 100 + ta.a + tb.a*10 from t1 ta, t1 tb, t1 tc; +set histogram_type='SINGLE_PREC_HB'; +set histogram_size=100; +set optimizer_use_condition_selectivity=4; +analyze table t2 persistent for all; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +# The following two must have the same in 'Extra' column: +explain extended select * from t2 where col1 IN (20, 180); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 1100 1.35 Using where +Warnings: +Note 1003 select `test`.`t2`.`col1` AS `col1` from `test`.`t2` where (`test`.`t2`.`col1` in (20,180)) +explain extended select * from t2 where col1 IN (180, 20); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 1100 1.35 Using where +Warnings: +Note 1003 select `test`.`t2`.`col1` AS `col1` from `test`.`t2` where (`test`.`t2`.`col1` in (180,20)) +drop table t1, t2; +# +# MDEV-5926: EITS: Histogram estimates for column=least_possible_value are wrong +# +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1(a int); +insert into t1 select ta.a from t0 ta, t0 tb, t0 tc; +set histogram_size=20; +set histogram_type='single_prec_hb'; +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +set use_stat_tables='preferably'; +set optimizer_use_condition_selectivity=4; +# Should select about 10%: +explain extended select * from t1 where a=2; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 9.52 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = 2) +# Should select about 10%: +explain extended select * from t1 where a=1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 9.52 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = 1) +# Must not have filtered=100%: +explain extended select * from t1 where a=0; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 9.52 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = 0) +# Again, must not have filtered=100%: +explain extended select * from t1 where a=-1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 9.52 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = <cache>(-(1))) +drop table t0, t1; +# +# MDEV-4362: Selectivity estimates for IN (...) do not depend on whether the values are in range +# +create table t1 (col1 int); +set @a=-1; +create table t2 (a int) select (@a:=@a+1) as a from information_schema.session_variables ta limit 100; +insert into t1 select ta.a from t2 ta, t2 tb where ta.a < 100 and tb.a < 100; +select min(col1), max(col1), count(*) from t1; +min(col1) max(col1) count(*) +0 99 10000 +set histogram_size=100; +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +explain extended select * from t1 where col1 in (1,2,3); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 3.37 Using where +Warnings: +Note 1003 select `test`.`t1`.`col1` AS `col1` from `test`.`t1` where (`test`.`t1`.`col1` in (1,2,3)) +# Must not cause fp division by zero, or produce nonsense numbers: +explain extended select * from t1 where col1 in (-1,-2,-3); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 5.94 Using where +Warnings: +Note 1003 select `test`.`t1`.`col1` AS `col1` from `test`.`t1` where (`test`.`t1`.`col1` in (<cache>(-(1)),<cache>(-(2)),<cache>(-(3)))) +explain extended select * from t1 where col1<=-1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 1.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`col1` AS `col1` from `test`.`t1` where (`test`.`t1`.`col1` <= <cache>(-(1))) +drop table t1, t2; +# +# MDEV-5984: EITS: Incorrect filtered% value for single-table select with range access +# +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2 (a int, b int, col1 varchar(64), col2 varchar(64), key(a,b)); +insert into t2 select ta.a+10*tb.a, tc.a+10*td.a, 'filler-data1', 'filler-data2' from t1 ta, t1 tb, t1 tc, t1 td; +set histogram_size=100; +set optimizer_use_condition_selectivity=4; +set use_stat_tables='preferably'; +analyze table t2 persistent for all; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status Table is already up to date +# This must show filtered=100%: +explain extended select * from t2 where a in (1,2,3) and b in (1,2,3); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range a a 10 NULL 9 100.00 Using index condition +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`col1` AS `col1`,`test`.`t2`.`col2` AS `col2` from `test`.`t2` where ((`test`.`t2`.`a` in (1,2,3)) and (`test`.`t2`.`b` in (1,2,3))) +drop table t2, t1; +# +# MDEV-5980: EITS: if condition is used for REF access, its selectivity is still in filtered% +# +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1(key1 int, col1 int, key(key1)); +insert into t1 select ta.a, ta.a from t0 ta, t0 tb, t0 tc; +set histogram_size=100; +set use_stat_tables='preferably'; +set optimizer_use_condition_selectivity=4; +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status Table is already up to date +# 10% is ok +explain extended select * from t1 where col1=2; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 9.90 Using where +Warnings: +Note 1003 select `test`.`t1`.`key1` AS `key1`,`test`.`t1`.`col1` AS `col1` from `test`.`t1` where (`test`.`t1`.`col1` = 2) +# Must show 100%, not 10% +explain extended select * from t1 where key1=2; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ref key1 key1 5 const 98 100.00 +Warnings: +Note 1003 select `test`.`t1`.`key1` AS `key1`,`test`.`t1`.`col1` AS `col1` from `test`.`t1` where (`test`.`t1`.`key1` = 2) +drop table t0, t1; +# MDEV-6003: EITS: ref access, keypart2=const vs keypart2=expr - inconsistent filtered% value +# +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 ( +kp1 int, kp2 int, +filler1 char(100), +filler2 char(100), +key(kp1, kp2) +); +insert into t1 +select +ta.a, +tb.a, +'filler-data-1', +'filler-data-2' +from t0 ta, t0 tb, t0 tc; +set histogram_size=100; +set use_stat_tables='preferably'; +set optimizer_use_condition_selectivity=4; +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status Table is already up to date +# NOTE: 10*100%, 10*100% rows is ok +explain extended select * from t0, t1 where t1.kp1=t0.a and t1.kp2=t0.a+1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 10 100.00 Using where +1 SIMPLE t1 ref kp1 kp1 10 test.t0.a,func 10 100.00 Using index condition +Warnings: +Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t1`.`kp1` AS `kp1`,`test`.`t1`.`kp2` AS `kp2`,`test`.`t1`.`filler1` AS `filler1`,`test`.`t1`.`filler2` AS `filler2` from `test`.`t0` join `test`.`t1` where ((`test`.`t1`.`kp1` = `test`.`t0`.`a`) and (`test`.`t1`.`kp2` = (`test`.`t0`.`a` + 1))) +# NOTE: t0: 10*100% is ok, t1: 10*9.90% is bad. t1 should have 10*100%. +explain extended select * from t0, t1 where t1.kp1=t0.a and t1.kp2=4; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 10 100.00 Using where +1 SIMPLE t1 ref kp1 kp1 10 test.t0.a,const 10 100.00 +Warnings: +Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t1`.`kp1` AS `kp1`,`test`.`t1`.`kp2` AS `kp2`,`test`.`t1`.`filler1` AS `filler1`,`test`.`t1`.`filler2` AS `filler2` from `test`.`t0` join `test`.`t1` where ((`test`.`t1`.`kp1` = `test`.`t0`.`a`) and (`test`.`t1`.`kp2` = 4)) +drop table t0, t1; +# +# MDEV-6209: Assertion `join->best_read < double(1.79769313486231570815e+308L)' +# failed in bool greedy_search with optimizer_use_condition_selectivity>1 +# +SET optimizer_use_condition_selectivity = 2; +CREATE TABLE t1 (a CHAR(6), b INT, PRIMARY KEY (a,b)) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('foo',1),('bar',2); +SELECT * FROM t1 AS t1_1, t1 AS t1_2 WHERE NOT ( t1_1.a <> 'baz'); +a b a b +DROP TABLE t1; +# +# MDEV-6308: Server crashes in table_multi_eq_cond_selectivity with ... +# +CREATE TABLE t1 ( +id varchar(40) COLLATE utf8_bin, +dt datetime, +PRIMARY KEY (id) +); +INSERT INTO t1 VALUES ('foo','2011-04-12 05:18:08'), +('bar','2013-09-19 11:37:03'); +CREATE TABLE t2 ( +t1_id varchar(40) COLLATE utf8_bin, +f1 varchar(64), +f2 varchar(1024), +KEY (f1,f2(255)) +); +INSERT INTO t2 VALUES ('foo','baz','qux'),('bar','baz','qux'); +set optimizer_use_condition_selectivity=2; +explain +select * from t1,t2 where t1.id = t2.t1_id and t2.f2='qux' and t2.f1='baz'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ref f1 f1 325 const,const 1 Using index condition; Using where +1 SIMPLE t1 eq_ref PRIMARY PRIMARY 122 test.t2.t1_id 1 +select * from t1,t2 where t1.id = t2.t1_id and t2.f2='qux' and t2.f1='baz'; +id dt t1_id f1 f2 +foo 2011-04-12 05:18:08 foo baz qux +bar 2013-09-19 11:37:03 bar baz qux +drop table t1,t2; +# +# MDEV-5985: EITS: selectivity estimates look illogical for join and non-key equalities +# +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1(a int); +insert into t1 select ta.a + tb.a* 10 + tc.a * 100 from t0 ta, t0 tb, t0 tc; +create table t2 as select * from t1; +set histogram_size=100; +set use_stat_tables='preferably'; +set optimizer_use_condition_selectivity=4; +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +analyze table t2 persistent for all; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +# Filtered will be 4.95, 9.90 +explain extended select * from t1 ta, t2 tb where ta.a < 40 and tb.a < 100; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE ta ALL NULL NULL NULL NULL 1000 4.95 Using where +1 SIMPLE tb ALL NULL NULL NULL NULL 1000 9.90 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`ta`.`a` AS `a`,`test`.`tb`.`a` AS `a` from `test`.`t1` `ta` join `test`.`t2` `tb` where ((`test`.`ta`.`a` < 40) and (`test`.`tb`.`a` < 100)) +# Here, tb.filtered should not become 100%: +explain extended select * from t1 ta, t2 tb where ta.a < 40 and tb.a < 100 and tb.a=ta.a; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE ta ALL NULL NULL NULL NULL 1000 4.95 Using where +1 SIMPLE tb ALL NULL NULL NULL NULL 1000 4.95 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`ta`.`a` AS `a`,`test`.`tb`.`a` AS `a` from `test`.`t1` `ta` join `test`.`t2` `tb` where ((`test`.`tb`.`a` = `test`.`ta`.`a`) and (`test`.`ta`.`a` < 40) and (`test`.`ta`.`a` < 100)) +drop table t0,t1,t2; +# +# MDEV-8779: mysqld got signal 11 in sql/opt_range_mrr.cc:100(step_down_to) +# +set @tmp_mdev8779=@@optimizer_use_condition_selectivity; +set optimizer_use_condition_selectivity=5; +CREATE TABLE t1 ( +i int(10) unsigned NOT NULL AUTO_INCREMENT, +n varchar(2048) NOT NULL, +d tinyint(1) unsigned NOT NULL, +p int(10) unsigned NOT NULL, +PRIMARY KEY (i) +) DEFAULT CHARSET=utf8; +insert into t1 values (1,'aaa',1,1), (2,'bbb',2,2); +SELECT * FROM t1 WHERE t1.d = 0 AND t1.p = '1' AND t1.i != '-1' AND t1.n = 'some text'; +i n d p +set optimizer_use_condition_selectivity= @tmp_mdev8779; +DROP TABLE t1; +# +# End of the test file +# +set use_stat_tables= @save_use_stat_tables; +set histogram_type=@save_histogram_type; +set histogram_size=@save_histogram_size; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; diff --git a/mysql-test/r/server_id.require b/mysql-test/r/server_id.require deleted file mode 100644 index adffcc483b1..00000000000 --- a/mysql-test/r/server_id.require +++ /dev/null @@ -1,2 +0,0 @@ -Variable_name Value -server_id 1 diff --git a/mysql-test/r/server_id1.require b/mysql-test/r/server_id1.require deleted file mode 100644 index 666c94ef633..00000000000 --- a/mysql-test/r/server_id1.require +++ /dev/null @@ -1,2 +0,0 @@ -Variable_name Value -server_id 102 diff --git a/mysql-test/r/servers.result b/mysql-test/r/servers.result new file mode 100644 index 00000000000..c9d82c9cfcc --- /dev/null +++ b/mysql-test/r/servers.result @@ -0,0 +1,8 @@ +# +# MDEV-4594 - CREATE SERVER crashes embedded +# +CREATE SERVER s1 FOREIGN DATA WRAPPER mysql OPTIONS(HOST 'localhost'); +SELECT * FROM mysql.servers; +Server_name Host Db Username Password Port Socket Wrapper Owner +s1 localhost 0 mysql +DROP SERVER s1; diff --git a/mysql-test/r/shm.result b/mysql-test/r/shm.result index d4298fb2d09..a2c38627e9d 100644 --- a/mysql-test/r/shm.result +++ b/mysql-test/r/shm.result @@ -508,7 +508,7 @@ insert into tmp select * from t3; insert into t3 select * from tmp; alter table t3 add t2nr int not null auto_increment primary key first; drop table tmp; -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10; namn Abraham Abraham @@ -521,7 +521,7 @@ ammonium ammonium analyzable analyzable animals animals animized animized -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10; concat(fld3," ",fld3) Abraham Abraham @@ -558,7 +558,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10; fld3 count(*) affixed 1 @@ -571,7 +571,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10; fld3 repeat("a",length(fld3)) count(*) circus aaaaaa 1 diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 8d4c3feb100..5669e0bcbde 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -1456,12 +1456,6 @@ GRANT PROCESS ON *.* TO test_u@localhost; SHOW ENGINE MYISAM MUTEX; SHOW ENGINE MYISAM STATUS; DROP USER test_u@localhost; -# -# Bug #48985: show create table crashes if previous access to the table -# was killed -# -SHOW CREATE TABLE non_existent; -ERROR 70100: Query execution was interrupted End of 5.1 tests # # Bug#52593 SHOW CREATE TABLE is blocked if table is locked @@ -1553,13 +1547,11 @@ RELEASE_LOCK('t') 1 SET NAMES latin1; # -# WL#6454: Deprecate SHOW AUTHORS and SHOW CONTRIBUTORS +# Test SHOW AUTHORS and SHOW CONTRIBUTORS # SHOW AUTHORS; SHOW WARNINGS; Level Code Message -Warning 1681 'SHOW AUTHORS' is deprecated and will be removed in a future release. SHOW CONTRIBUTORS; SHOW WARNINGS; Level Code Message -Warning 1681 'SHOW CONTRIBUTORS' is deprecated and will be removed in a future release. diff --git a/mysql-test/r/show_explain.result b/mysql-test/r/show_explain.result new file mode 100644 index 00000000000..a4d12ce05ce --- /dev/null +++ b/mysql-test/r/show_explain.result @@ -0,0 +1,1187 @@ +drop table if exists t0, t1, t2, t3, t4; +drop view if exists v1; +SET @old_debug= @@session.debug; +set debug_sync='RESET'; +create table t0 (a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 (a int); +insert into t1 select A.a + 10*B.a + 100*C.a from t0 A, t0 B, t0 C; +alter table t1 add b int, add c int, add filler char(32); +update t1 set b=a, c=a, filler='fooo'; +alter table t1 add key(a), add key(b); +show explain for 2000000000; +ERROR HY000: Unknown thread id: 2000000000 +show explain for (select max(a) from t0); +ERROR HY000: You may only use constant expressions in this statement +SET @old_debug= @@session.debug; +show explain for $thr2; +ERROR HY000: Target is not running an EXPLAINable command +show explain for $thr1; +ERROR HY000: Target is not running an EXPLAINable command +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +select count(*) from t1 where a < 100000; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index a a 5 NULL 1000 Using where; Using index +Warnings: +Note 1003 select count(*) from t1 where a < 100000 +count(*) +1000 +select max(c) from t1 where a < 10; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 5 NULL 10 Using index condition +Warnings: +Note 1003 select max(c) from t1 where a < 10 +max(c) +9 +# We can catch EXPLAIN, too. +set @show_expl_tmp= @@optimizer_switch; +set optimizer_switch='index_condition_pushdown=on,mrr=on,mrr_sort_keys=on'; +explain select max(c) from t1 where a < 10; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 5 NULL 10 Using index condition; Rowid-ordered scan +Warnings: +Note 1003 explain select max(c) from t1 where a < 10 +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 5 NULL 10 Using index condition; Rowid-ordered scan +set optimizer_switch= @show_expl_tmp; +set debug_dbug=@old_debug; +# UNION, first branch +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +explain select a from t0 A union select a+1 from t0 B; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY A ALL NULL NULL NULL NULL 10 +2 UNION B ALL NULL NULL NULL NULL 10 +NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL +Warnings: +Note 1003 explain select a from t0 A union select a+1 from t0 B +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY A ALL NULL NULL NULL NULL 10 +2 UNION B ALL NULL NULL NULL NULL 10 +NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL +set debug_dbug=@old_debug; +# UNION, second branch +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +explain select a from t0 A union select a+1 from t0 B; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY A ALL NULL NULL NULL NULL 10 +2 UNION B ALL NULL NULL NULL NULL 10 +NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL +Warnings: +Note 1003 explain select a from t0 A union select a+1 from t0 B +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY A ALL NULL NULL NULL NULL 10 +2 UNION B ALL NULL NULL NULL NULL 10 +NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL +set debug_dbug=@old_debug; +# Uncorrelated subquery, select +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +select a, (select max(a) from t0 B) from t0 A where a<1; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY A ALL NULL NULL NULL NULL 10 Using where +2 SUBQUERY B ALL NULL NULL NULL NULL 10 +Warnings: +Note 1003 select a, (select max(a) from t0 B) from t0 A where a<1 +a (select max(a) from t0 B) +0 9 +set debug_dbug=@old_debug; +# Uncorrelated subquery, explain +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +explain select a, (select max(a) from t0 B) from t0 A where a<1; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY A ALL NULL NULL NULL NULL 10 Using where +2 SUBQUERY B ALL NULL NULL NULL NULL 10 +Warnings: +Note 1003 explain select a, (select max(a) from t0 B) from t0 A where a<1 +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY A ALL NULL NULL NULL NULL 10 Using where +2 SUBQUERY B ALL NULL NULL NULL NULL 10 +set debug_dbug=@old_debug; +# correlated subquery, select +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY a ALL NULL NULL NULL NULL 10 Using where +2 DEPENDENT SUBQUERY b ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1 +a (select max(a) from t0 b where b.a+a.a<10) +0 9 +set debug_dbug=@old_debug; +# correlated subquery, explain +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY a ALL NULL NULL NULL NULL 10 Using where +2 DEPENDENT SUBQUERY b ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1 +a (select max(a) from t0 b where b.a+a.a<10) +0 9 +set debug_dbug=@old_debug; +# correlated subquery, select, while inside the subquery +set @show_explain_probe_select_id=2; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY a ALL NULL NULL NULL NULL 10 Using where +2 DEPENDENT SUBQUERY b ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1 +a (select max(a) from t0 b where b.a+a.a<10) +0 9 +set debug_dbug=@old_debug; +# correlated subquery, explain, while inside the subquery +set @show_explain_probe_select_id=2; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY a ALL NULL NULL NULL NULL 10 Using where +2 DEPENDENT SUBQUERY b ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1 +a (select max(a) from t0 b where b.a+a.a<10) +0 9 +set debug_dbug=@old_debug; +# correlated subquery, explain, while inside the subquery +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_end'; +select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY a ALL NULL NULL NULL NULL 10 Using where +2 DEPENDENT SUBQUERY b ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1 +a (select max(a) from t0 b where b.a+a.a<10) +0 9 +set debug_dbug=@old_debug; +# Try to do SHOW EXPLAIN for a query that runs a SET command: +# I've found experimentally that select_id==2 here... +# +set @show_explain_probe_select_id=2; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +set @foo= (select max(a) from t0 where sin(a) >0); +show explain for $thr2; +ERROR HY000: Target is not running an EXPLAINable command +kill query $thr2; +ERROR 70100: Query execution was interrupted +set debug_dbug=@old_debug; +# +# Attempt SHOW EXPLAIN for an UPDATE +# +create table t2 as select a as a, a as dummy from t0 limit 2; +set @show_explain_probe_select_id=2; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +update t2 set dummy=0 where (select max(a) from t0 where t2.a + t0.a <3) >3 ; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where +2 DEPENDENT SUBQUERY t0 ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 update t2 set dummy=0 where (select max(a) from t0 where t2.a + t0.a <3) >3 +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where +2 DEPENDENT SUBQUERY t0 ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 update t2 set dummy=0 where (select max(a) from t0 where t2.a + t0.a <3) >3 +drop table t2; +set debug_dbug=@old_debug; +# +# Attempt SHOW EXPLAIN for a DELETE (UPD: now works) +# +create table t2 as select a as a, a as dummy from t0 limit 2; +set @show_explain_probe_select_id=2; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +delete from t2 where (select max(a) from t0 where t2.a + t0.a <3) >3 ; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where +2 DEPENDENT SUBQUERY t0 ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 delete from t2 where (select max(a) from t0 where t2.a + t0.a <3) >3 +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where +2 DEPENDENT SUBQUERY t0 ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 delete from t2 where (select max(a) from t0 where t2.a + t0.a <3) >3 +drop table t2; +set debug_dbug=@old_debug; +# +# Multiple SHOW EXPLAIN calls for one select +# +create table t2 as select a as a, a as dummy from t0 limit 3; +set @show_explain_probe_select_id=2; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +select t2.a, ((select max(a) from t0 where t2.a + t0.a <3) >3) as SUBQ from t2; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 3 +2 DEPENDENT SUBQUERY t0 ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 select t2.a, ((select max(a) from t0 where t2.a + t0.a <3) >3) as SUBQ from t2 +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 3 +2 DEPENDENT SUBQUERY t0 ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 select t2.a, ((select max(a) from t0 where t2.a + t0.a <3) >3) as SUBQ from t2 +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 3 +2 DEPENDENT SUBQUERY t0 ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 select t2.a, ((select max(a) from t0 where t2.a + t0.a <3) >3) as SUBQ from t2 +a SUBQ +0 0 +1 0 +2 0 +drop table t2; +set debug_dbug=@old_debug; +# +# SHOW EXPLAIN for SELECT ... ORDER BY with "Using filesort" +# +explain select * from t0 order by a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using filesort +set debug_dbug='+d,show_explain_probe_join_exec_start'; +set @show_explain_probe_select_id=1; +select * from t0 order by a; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using filesort +Warnings: +Note 1003 select * from t0 order by a +a +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +set debug_dbug=@old_debug; +# +# SHOW EXPLAIN for SELECT ... with "Using temporary" +# +explain select distinct a from t0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using temporary +set debug_dbug='+d,show_explain_probe_join_exec_start'; +set @show_explain_probe_select_id=1; +select distinct a from t0; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using temporary +Warnings: +Note 1003 select distinct a from t0 +a +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +set debug_dbug=@old_debug; +# +# SHOW EXPLAIN for SELECT ... with "Using temporary; Using filesort" +# +explain select distinct a from t0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using temporary +set debug_dbug='+d,show_explain_probe_join_exec_start'; +set @show_explain_probe_select_id=1; +select distinct a from t0; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using temporary +Warnings: +Note 1003 select distinct a from t0 +a +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +set debug_dbug=@old_debug; +# +# MDEV-238: SHOW EXPLAIN: Server crashes in JOIN::print_explain with FROM subquery and GROUP BY +# +CREATE TABLE t2 ( a INT ); +INSERT INTO t2 VALUES (1),(2),(1),(4),(2); +explain SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) +set debug_dbug='+d,show_explain_in_find_all_keys'; +SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a; +# FIXED by "conservative assumptions about when QEP is available" fix: +# NOTE: current code will not show "Using join buffer": +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) +Warnings: +Note 1003 SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a +a +1 +2 +4 +set debug_dbug=@old_debug; +DROP TABLE t2; +# +# MDEV-239: Assertion `field_types == 0 ... ' failed in Protocol_text::store(double, uint32, String*) with +# SHOW EXPLAIN over EXPLAIN EXTENDED +# +CREATE TABLE t2 (a INT); +INSERT INTO t2 VALUES (1),(2),(1),(4),(2); +EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a ; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using temporary; Using filesort +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` join `test`.`t2` group by `test`.`t2`.`a` +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_end'; +EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a ; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) +Warnings: +Note 1003 EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using temporary; Using filesort +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` join `test`.`t2` group by `test`.`t2`.`a` +set debug_dbug=@old_debug; +DROP TABLE t2; +# +# MDEV-240: SHOW EXPLAIN: Assertion `this->optimized == 2' failed in +# JOIN::print_explain on query with a JOIN, TEMPTABLE view, +# +CREATE TABLE t3 (a INT); +CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t3; +INSERT INTO t3 VALUES (8); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (4),(5),(6),(7),(8),(9); +explain SELECT * FROM v1, t2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> system NULL NULL NULL NULL 1 +1 PRIMARY t2 ALL NULL NULL NULL NULL 6 +2 DERIVED t3 system NULL NULL NULL NULL 1 +set @show_explain_probe_select_id=2; +set debug_dbug='+d,show_explain_probe_join_exec_end'; +SELECT * FROM v1, t2; +show explain for $thr2; +ERROR HY000: Target is not running an EXPLAINable command +kill query $thr2; +ERROR 70100: Query execution was interrupted +set debug_dbug=@old_debug; +DROP VIEW v1; +DROP TABLE t2, t3; +# +# MDEV-267: SHOW EXPLAIN: Server crashes in JOIN::print_explain on most of queries +# +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_end'; +select sleep(1); +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select sleep(1) +sleep(1) +0 +set debug_dbug=@old_debug; +# +# Same as above, but try another reason for JOIN to be degenerate +# +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_end'; +select * from t0 where 1>10; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +Warnings: +Note 1003 select * from t0 where 1>10 +a +set debug_dbug=@old_debug; +# +# Same as above, but try another reason for JOIN to be degenerate (2) +# +create table t3(a int primary key); +insert into t3 select a from t0; +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_end'; +select * from t0,t3 where t3.a=112233; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL no matching row in const table +Warnings: +Note 1003 select * from t0,t3 where t3.a=112233 +a a +set debug_dbug=@old_debug; +drop table t3; +# +# MDEV-270: SHOW EXPLAIN: server crashes in JOIN::print_explain on a query with +# select tables optimized away +# +CREATE TABLE t2 (pk INT PRIMARY KEY, a INT ) ENGINE=MyISAM; +INSERT INTO t2 VALUES +(1,4),(2,62),(3,7),(4,1),(5,0),(6,7),(7,7),(8,1),(9,7),(10,1), +(11,5),(12,2),(13,0),(14,1),(15,8),(16,1),(17,1),(18,9),(19,1),(20,5) ; +explain SELECT * FROM t2 WHERE a = +(SELECT MAX(a) FROM t2 +WHERE pk= (SELECT MAX(pk) FROM t2 WHERE pk = 3) +); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 20 Using where +2 SUBQUERY t2 const PRIMARY PRIMARY 4 const 1 +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_do_select'; +SELECT * FROM t2 WHERE a = +(SELECT MAX(a) FROM t2 +WHERE pk= (SELECT MAX(pk) FROM t2 WHERE pk = 3) +); +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 20 Using where +2 SUBQUERY t2 const PRIMARY PRIMARY 4 const 1 +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +Warnings: +Note 1003 SELECT * FROM t2 WHERE a = +(SELECT MAX(a) FROM t2 +WHERE pk= (SELECT MAX(pk) FROM t2 WHERE pk = 3) +) +pk a +3 7 +6 7 +7 7 +9 7 +set debug_dbug=@old_debug; +drop table t2; +# +# MDEV-273: SHOW EXPLAIN: server crashes in JOIN::print_explain on a query with impossible WHERE +# +CREATE TABLE t2 (a1 INT, KEY(a1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES +(4),(6),(7),(1),(0),(7),(7),(1),(7),(1), +(5),(2),(0),(1),(8),(1),(1),(9),(1),(5); +CREATE TABLE t3 (b1 INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES +(4),(5),(8),(4),(8),(2),(9),(6),(4),(8), +(3),(5),(9),(6),(8),(3),(2),(6),(3),(1), +(4),(3),(1),(7),(0),(0),(9),(5),(9),(0), +(2),(2),(5),(9),(1),(4),(8),(6),(5),(5), +(1),(7),(2),(8),(9),(3),(2),(6),(6),(5), +(4),(3),(2),(7),(4),(6),(0),(8),(5),(8), +(2),(9),(7),(5),(7),(0),(4),(3),(1),(0), +(6),(2),(8),(3),(7),(3),(5),(5),(1),(2), +(1),(7),(1),(9),(9),(8),(3); +CREATE TABLE t4 (c1 INT) ENGINE=MyISAM; +EXPLAIN +SELECT count(*) FROM t2, t3 +WHERE a1 < ALL ( +SELECT a1 FROM t2 +WHERE a1 IN ( SELECT a1 FROM t2, t4 ) +); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 index NULL a1 5 NULL 20 Using where; Using index +1 PRIMARY t3 ALL NULL NULL NULL NULL 87 Using join buffer (flat, BNL join) +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_do_select'; +SELECT count(*) FROM t2, t3 +WHERE a1 < ALL ( +SELECT a1 FROM t2 +WHERE a1 IN ( SELECT a1 FROM t2, t4 ) +); +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 index NULL a1 5 NULL 20 Using where; Using index +1 PRIMARY t3 ALL NULL NULL NULL NULL 87 Using join buffer (flat, BNL join) +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table +Warnings: +Note 1003 SELECT count(*) FROM t2, t3 +WHERE a1 < ALL ( +SELECT a1 FROM t2 +WHERE a1 IN ( SELECT a1 FROM t2, t4 ) +) +count(*) +1740 +set debug_dbug=@old_debug; +drop table t2, t3, t4; +# +# MDEV-275: SHOW EXPLAIN: server crashes in JOIN::print_explain with IN subquery and aggregate function +# +CREATE TABLE t2 ( `pk` INT NOT NULL PRIMARY KEY, `a1` INT NOT NULL, KEY(`a1`)) ENGINE=MyISAM; +INSERT INTO t2 VALUES +(1,5),(2,4),(3,6),(4,9),(5,2),(6,8),(7,4),(8,8),(9,0),(10,43), +(11,23),(12,3),(13,45),(14,16),(15,2),(16,33),(17,2),(18,5),(19,9),(20,2); +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_end'; +SELECT * FROM t2 WHERE (5, 78) IN (SELECT `a1`, MAX(`a1`) FROM t2 GROUP BY `a1`); +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <subquery2> const distinct_key distinct_key 8 const,const 1 +1 PRIMARY t2 ALL NULL NULL NULL NULL 20 Using join buffer (flat, BNL join) +2 MATERIALIZED t2 index NULL a1 4 NULL 20 Using index +Warnings: +Note 1003 SELECT * FROM t2 WHERE (5, 78) IN (SELECT `a1`, MAX(`a1`) FROM t2 GROUP BY `a1`) +pk a1 +set debug_dbug=@old_debug; +DROP TABLE t2; +DROP TABLE t1; +# +# MDEV-305: SHOW EXPLAIN: ref returned by SHOW EXPLAIN is different from the normal EXPLAIN ('const' vs empty string) +# +CREATE TABLE t1(a INT, KEY(a)); +INSERT INTO t1 VALUES (3),(1),(5),(1); +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +SELECT 'test' FROM t1 WHERE a=1; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref a a 5 const 1 Using index +Warnings: +Note 1003 SELECT 'test' FROM t1 WHERE a=1 +test +test +test +set debug_dbug=@old_debug; +DROP TABLE t1; +# +# MDEV-299: SHOW EXPLAIN: Plan produced by SHOW EXPLAIN changes back and forth during query execution +# +create table t1 (key1 int, col1 int, col2 int, filler char(100), key(key1)); +insert into t1 select A.a+ 10 * B.a, 10, 10, 'filler-data' from t0 A, t0 B; +update t1 set col1=3, col2=10 where key1=1; +update t1 set col1=3, col2=1000 where key1=2; +update t1 set col1=3, col2=10 where key1=3; +update t1 set col1=3, col2=1000 where key1=4; +set @tmp_mdev299_jcl= @@join_cache_level; +set join_cache_level=0; +explain select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND B.col2 + 1 < 100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE A ALL NULL NULL NULL NULL 100 Using where +1 SIMPLE B ALL key1 NULL NULL NULL 100 Range checked for each record (index map: 0x1) +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_test_if_quick_select'; +select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND B.col2 + 1 < 100; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE A ALL NULL NULL NULL NULL 100 Using where +1 SIMPLE B ALL key1 NULL NULL NULL 100 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND B.col2 + 1 < 100 +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE A ALL NULL NULL NULL NULL 100 Using where +1 SIMPLE B ALL key1 NULL NULL NULL 100 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND B.col2 + 1 < 100 +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE A ALL NULL NULL NULL NULL 100 Using where +1 SIMPLE B ALL key1 NULL NULL NULL 100 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND B.col2 + 1 < 100 +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE A ALL NULL NULL NULL NULL 100 Using where +1 SIMPLE B ALL key1 NULL NULL NULL 100 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND B.col2 + 1 < 100 +count(*) +212 +set debug_dbug=@old_debug; +drop table t1; +# +# MDEV-297: SHOW EXPLAIN: Server gets stuck until timeout occurs while +# executing SHOW INDEX and SHOW EXPLAIN in parallel +# +CREATE TABLE t1(a INT, b INT, c INT, KEY(a), KEY(b), KEY(c)); +INSERT INTO t1 (a) VALUES (3),(1),(5),(1); +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +SHOW INDEX FROM t1; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE STATISTICS ALL NULL NULL NULL NULL NULL Skip_open_table; Scanned all databases +Warnings: +Note 1003 SHOW INDEX FROM t1 +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 1 a 1 a A NULL NULL NULL YES BTREE +t1 1 b 1 b A NULL NULL NULL YES BTREE +t1 1 c 1 c A NULL NULL NULL YES BTREE +set debug_dbug=@old_debug; +DROP TABLE t1; +# +# MDEV-324: SHOW EXPLAIN: Plan produced by SHOW EXPLAIN for a query with TEMPTABLE view +# loses 'DERIVED' line on the way without saying that the plan was already deleted +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2); +CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; +EXPLAIN SELECT a + 1 FROM v1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 +2 DERIVED t1 ALL NULL NULL NULL NULL 2 +set debug_dbug='+d,show_explain_probe_join_tab_preread'; +set @show_explain_probe_select_id=1; +SELECT a + 1 FROM v1; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 +2 DERIVED t1 ALL NULL NULL NULL NULL 2 +Warnings: +Note 1003 SELECT a + 1 FROM v1 +a + 1 +2 +3 +set debug_dbug=@old_debug; +DROP VIEW v1; +DROP TABLE t1; +# +# MDEV-323: SHOW EXPLAIN: Plan produced by SHOW EXPLAIN loses +# 'UNION RESULT' line on the way without saying that the plan was already deleted +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (4),(6); +EXPLAIN +SELECT a FROM t1 WHERE a IN ( SELECT 1+SLEEP(0.01) UNION SELECT 2 ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used +3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL +set debug_dbug='+d,show_explain_probe_union_read'; +SELECT a FROM t1 WHERE a IN ( SELECT 1+SLEEP(0.01) UNION SELECT 2 ); +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used +3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL +Warnings: +Note 1003 SELECT a FROM t1 WHERE a IN ( SELECT 1+SLEEP(0.01) UNION SELECT 2 ) +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used +3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL +Warnings: +Note 1003 SELECT a FROM t1 WHERE a IN ( SELECT 1+SLEEP(0.01) UNION SELECT 2 ) +a +set debug_dbug=@old_debug; +DROP TABLE t1; +# +# MDEV-327: SHOW EXPLAIN: Different select_type in plans produced by SHOW EXPLAIN +# and standard EXPLAIN: 'SUBQUERY' vs 'DEPENDENT SUBQUERY' +# +CREATE TABLE t1 (a INT) ENGINE=Aria; +INSERT INTO t1 VALUES +(4),(6),(3),(5),(3),(246),(2),(9),(3),(8), +(1),(8),(8),(5),(7),(5),(1),(6),(2),(9); +CREATE TABLE t2 (b INT) ENGINE=Aria; +INSERT INTO t2 VALUES +(1),(7),(4),(7),(0),(2),(9),(4),(0),(9), +(1),(3),(8),(8),(18),(84),(6),(3),(6),(6); +EXPLAIN +SELECT * FROM t1, ( SELECT * FROM t2 ) AS alias +WHERE a < ALL ( SELECT b FROM t1, t2 WHERE a = b ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 20 Using where +1 PRIMARY t2 ALL NULL NULL NULL NULL 20 +3 SUBQUERY t1 ALL NULL NULL NULL NULL 20 +3 SUBQUERY t2 ALL NULL NULL NULL NULL 20 Using where +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +SELECT * FROM t1, ( SELECT * FROM t2 ) AS alias +WHERE a < ALL ( SELECT b FROM t1, t2 WHERE a = b ); +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 20 Using where +1 PRIMARY t2 ALL NULL NULL NULL NULL 20 +3 SUBQUERY t1 ALL NULL NULL NULL NULL 20 +3 SUBQUERY t2 ALL NULL NULL NULL NULL 20 Using where +Warnings: +Note 1003 SELECT * FROM t1, ( SELECT * FROM t2 ) AS alias +WHERE a < ALL ( SELECT b FROM t1, t2 WHERE a = b ) +a b +set debug_dbug=@old_debug; +DROP TABLE t1, t2; +# +# Test that SHOW EXPLAIN will print 'Distinct'. +# +CREATE TABLE t1 (a int(10) unsigned not null primary key,b int(10) unsigned); +INSERT INTO t1 VALUES (1,1),(2,1),(3,1),(4,1); +CREATE TABLE t3 (a int(10) unsigned, key(A), b text); +INSERT INTO t3 VALUES (1,'1'),(2,'2'); +create temporary table t4 select * from t3; +insert into t3 select * from t4; +insert into t4 select * from t3; +insert into t3 select * from t4; +insert into t4 select * from t3; +insert into t3 select * from t4; +insert into t4 select * from t3; +insert into t3 select * from t4; +explain select distinct t1.a from t1,t3 where t1.a=t3.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 4 Using index; Using temporary +1 SIMPLE t3 ref a a 5 test.t1.a 7 Using index; Distinct +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +select distinct t1.a from t1,t3 where t1.a=t3.a; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 4 Using index; Using temporary +1 SIMPLE t3 ref a a 5 test.t1.a 7 Using index; Distinct +Warnings: +Note 1003 select distinct t1.a from t1,t3 where t1.a=t3.a +a +1 +2 +set debug_dbug=@old_debug; +drop table t1,t3,t4; +# +# ---------- SHOW EXPLAIN and permissions ----------------- +# +grant ALL on test.* to test2@localhost; +grant super on *.* to test2@localhost; +# +# First, make sure that user 'test2' cannot do SHOW EXPLAIN on us +# +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +select * from t0 where a < 3; +show explain for $thr2; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 select * from t0 where a < 3 +a +0 +1 +2 +set debug_dbug=@old_debug; +# +# Check that user test2 can do SHOW EXPLAIN on its own queries +# +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +select * from t0 where a < 3; +show explain for $thr_con2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 select * from t0 where a < 3 +a +0 +1 +2 +# +# Now, grant test2 a PROCESSLIST permission, and see that he's able to observe us +# +grant process on *.* to test2@localhost; +set debug_dbug=@old_debug; +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +select * from t0 where a < 3; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 select * from t0 where a < 3 +a +0 +1 +2 +set debug_dbug=@old_debug; +revoke all privileges on test.* from test2@localhost; +drop user test2@localhost; +# +# Test that it is possible to KILL a SHOW EXPLAIN command that's waiting +# on its target thread +# +create table t1 (pk int primary key, data char(64)) engine=innodb; +insert into t1 select A.a + 10 * B.a + 100 * C.a, 'data1' from t0 A, t0 B, t0 C; +# Lock two threads +set autocommit=0; +select * from t1 where pk between 10 and 20 for update; +pk data +10 data1 +11 data1 +12 data1 +13 data1 +14 data1 +15 data1 +16 data1 +17 data1 +18 data1 +19 data1 +20 data1 +set autocommit=0; +select * from t1 where pk between 10 and 20 for update; +# do: send_eval show explain for thr2; +kill query $thr_default; +ERROR 70100: Query execution was interrupted +rollback; +pk data +10 data1 +11 data1 +12 data1 +13 data1 +14 data1 +15 data1 +16 data1 +17 data1 +18 data1 +19 data1 +20 data1 +drop table t1; +# +# Check that the I_S table is invisible +# +select table_name from information_schema.tables where table_schema='information_schema' and table_name like '%explain%'; +table_name +# +# MDEV-325: SHOW EXPLAIN: Plan produced by SHOW EXPLAIN is different from standard EXPLAIN: type ALL vs 'index_merge'.. +# +CREATE TABLE t1 (a INT, b INT, KEY(a), KEY(b)) ENGINE=MyISAM; +INSERT INTO t1 VALUES +(8,0),(128,5050),(5372,8),(234,7596),(2,0),(2907,8930),(1,0), +(0,5224),(8,7638),(960,5),(9872,1534),(0,2295),(3408,9809), +(7,0),(1168,0),(2089,5570),(0,205),(88,1018),(0,26528), +(0,0),(4,5567),(1444,145),(6,0),(1,7535),(7793,534),(70,9), +(178,1),(44,5),(189,0),(3,0); +EXPLAIN +SELECT a+SLEEP(0.01) FROM t1 +WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129 +ORDER BY b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 8 Using sort_union(a,b); Using where; Using filesort +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +SELECT a+SLEEP(0.01) FROM t1 +WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129 +ORDER BY b; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 8 Using sort_union(a,b); Using where; Using filesort +Warnings: +Note 1003 SELECT a+SLEEP(0.01) FROM t1 +WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129 +ORDER BY b +a+SLEEP(0.01) +0 +5372 +70 +0 +0 +0 +0 +set debug_dbug=@old_debug; +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_do_select'; +SELECT a+SLEEP(0.01) FROM t1 +WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129 +ORDER BY b; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 8 Using sort_union(a,b); Using where; Using filesort +Warnings: +Note 1003 SELECT a+SLEEP(0.01) FROM t1 +WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129 +ORDER BY b +a+SLEEP(0.01) +0 +5372 +70 +0 +0 +0 +0 +set debug_dbug=@old_debug; +drop table t1; +# +# MDEV-298: SHOW EXPLAIN: Plan returned by SHOW EXPLAIN only contains +# 'Using temporary' while the standard EXPLAIN says 'Using temporary; Using filesort' +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9), +(10),(11),(12),(13),(14),(15),(16); +INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12, t1 t13; +EXPLAIN SELECT a FROM t1 GROUP BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4112 Using temporary; Using filesort +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +SELECT a FROM t1 GROUP BY a; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4112 Using temporary; Using filesort +Warnings: +Note 1003 SELECT a FROM t1 GROUP BY a +a +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +set debug_dbug=@old_debug; +drop table t1; +# +# MDEV-408: SHOW EXPLAIN: Some values are chopped off in SHOW EXPLAIN output +# +CREATE TABLE t1 (a INT, b VARCHAR(35)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (3989,'Abilene'),(3873,'Akron'); +CREATE TABLE t2 (c INT, d VARCHAR(52) PRIMARY KEY, KEY(c)) ENGINE=InnoDB; +INSERT INTO t2 VALUES (86,'English'),(87,'Russian'); +explain SELECT SUM(a + SLEEP(0.1)) FROM t1 WHERE a IN ( SELECT c FROM t2 WHERE d < b ) OR b < 's'; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where +2 DEPENDENT SUBQUERY t2 index_subquery PRIMARY,c c 5 func 1 Using index; Using where +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +SELECT SUM(a + SLEEP(0.1)) FROM t1 WHERE a IN ( SELECT c FROM t2 WHERE d < b ) OR b < 's'; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where +2 DEPENDENT SUBQUERY t2 index_subquery PRIMARY,c c 5 func 1 Using index; Using where +Warnings: +Note 1003 SELECT SUM(a + SLEEP(0.1)) FROM t1 WHERE a IN ( SELECT c FROM t2 WHERE d < b ) OR b < 's' +SUM(a + SLEEP(0.1)) +7862 +set debug_dbug=@old_debug; +drop table t1, t2; +# +# MDEV-412: SHOW EXPLAIN: Server crashes in JOIN::print_explain on a query with inner join and ORDER BY the same column twice +# +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(3), KEY(b)) ENGINE=MyISAM; +INSERT INTO t1 VALUES +(3795,'USA'),(3913,'USA'),(3846,'ITA'),(4021,'USA'),(4005,'RUS'),(4038,'USA'), +(3825,'USA'),(3840,'USA'),(3987,'USA'),(3807,'USA'),(3896,'USA'),(4052,'USA'), +(3973,'USA'),(3982,'ITA'),(3965,'USA'),(3852,'RUS'),(4006,'USA'),(3800,'USA'), +(4020,'USA'),(4040,'USA'),(3916,'USA'),(3817,'USA'),(3885,'USA'),(3802,'USA'), +(4009,'ITA'),(3895,'USA'),(3963,'RUS'),(4045,'USA'),(3988,'USA'),(3815,'USA'), +(4063,'USA'),(3978,'USA'),(4019,'USA'),(3954,'USA'),(3950,'USA'),(3974,'ITA'), +(4054,'USA'),(4061,'RUS'),(3976,'USA'),(3966,'USA'),(3957,'USA'),(3981,'USA'), +(3923,'USA'),(3876,'USA'),(3819,'USA'),(3877,'USA'),(3829,'ITA'),(3964,'USA'), +(4053,'RUS'),(3917,'USA'),(3874,'USA'),(4023,'USA'),(4001,'USA'),(3872,'USA'), +(3890,'USA'),(3962,'USA'),(3886,'USA'),(4026,'ITA'),(3869,'USA'),(3937,'RUS'), +(3975,'USA'),(3944,'USA'),(3908,'USA'),(3867,'USA'),(3947,'USA'),(3838,'USA'), +(3796,'USA'),(3893,'USA'),(3920,'ITA'),(3994,'USA'),(3875,'RUS'),(4011,'USA'), +(4013,'USA'),(3810,'USA'),(3834,'USA'),(3968,'USA'),(3931,'USA'),(3839,'USA'), +(4042,'USA'),(4039,'ITA'),(3811,'USA'),(3837,'RUS'),(4041,'USA'),(3884,'USA'), +(3894,'USA'),(3879,'USA'),(3942,'USA'),(3959,'USA'),(3814,'USA'),(4044,'USA'), +(3971,'ITA'),(3823,'USA'),(3793,'RUS'),(3855,'USA'),(3905,'USA'),(3865,'USA'), +(4046,'USA'),(3990,'USA'),(4022,'USA'),(3833,'USA'),(3918,'USA'),(4064,'ITA'), +(3821,'USA'),(3836,'RUS'),(3921,'USA'),(3914,'USA'),(3888,'USA'); +CREATE TABLE t2 (c VARCHAR(3) PRIMARY KEY) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('USA'); +CREATE TABLE t3 (d VARCHAR(3), e VARCHAR(52), PRIMARY KEY (d,e)) ENGINE=MyISAM; +INSERT INTO t3 VALUES +('JPN','Japanese'),('KOR','Korean'),('POL','Polish'),('PRT','Portuguese'), +('ESP','Spanish'),('FRA','French'),('VNM','Vietnamese'); +explain +SELECT b AS field1, b AS field2 FROM t1, t2, t3 WHERE d = b ORDER BY field1, field2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 system NULL NULL NULL NULL 1 +1 SIMPLE t1 index b b 6 NULL 107 Using where; Using index +1 SIMPLE t3 ref PRIMARY PRIMARY 5 test.t1.b 1 Using index +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_do_select'; +SELECT b AS field1, b AS field2 FROM t1, t2, t3 WHERE d = b ORDER BY field1, field2; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 system NULL NULL NULL NULL 1 Using filesort +1 SIMPLE t1 index b b 6 NULL 107 Using where; Using index +1 SIMPLE t3 ref PRIMARY PRIMARY 5 test.t1.b 1 Using index +Warnings: +Note 1003 SELECT b AS field1, b AS field2 FROM t1, t2, t3 WHERE d = b ORDER BY field1, field2 +field1 field2 +set debug_dbug=@old_debug; +DROP TABLE t1,t2,t3; +# +# MDEV-423: SHOW EXPLAIN: 'Using where' for a subquery is shown in EXPLAIN, but not in SHOW EXPLAIN output +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (7),(0),(9),(3),(4),(2),(5),(7),(0),(9),(3),(4),(2),(5); +CREATE TABLE t2 (b INT, c INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES +(0,4),(8,6),(1,3),(8,5),(9,3),(24,246),(6,2),(1,9),(6,3),(2,8), +(4,1),(8,8),(4,8),(4,5),(7,7),(4,5),(1,1),(9,6),(4,2),(8,9); +create table t3 like t2; +insert into t3 select * from t2; +explain +SELECT max(a+b+c) FROM t1 AS alias1, ( SELECT * FROM t2 ) AS alias +WHERE EXISTS ( SELECT * FROM t3 WHERE b = c ) OR a <= 10; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY alias1 ALL NULL NULL NULL NULL 14 +1 PRIMARY t2 ALL NULL NULL NULL NULL 20 +3 SUBQUERY t3 ALL NULL NULL NULL NULL 20 Using where +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +SELECT max(a+b+c) FROM t1 AS alias1, ( SELECT * FROM t2 ) AS alias +WHERE EXISTS ( SELECT * FROM t3 WHERE b = c ) OR a <= 10; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY alias1 ALL NULL NULL NULL NULL 14 +1 PRIMARY t2 ALL NULL NULL NULL NULL 20 +3 SUBQUERY t3 ALL NULL NULL NULL NULL 20 Using where +Warnings: +Note 1003 SELECT max(a+b+c) FROM t1 AS alias1, ( SELECT * FROM t2 ) AS alias +WHERE EXISTS ( SELECT * FROM t3 WHERE b = c ) OR a <= 10 +max(a+b+c) +279 +set debug_dbug=@old_debug; +DROP TABLE t1,t2,t3; +# +# MDEV-416: Server crashes in SQL_SELECT::cleanup on EXPLAIN with SUM ( DISTINCT ) in a non-correlated subquery (5.5-show-explain tree) +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (8),(9); +EXPLAIN SELECT * FROM t1 +WHERE ( 8, 89 ) IN ( SELECT b, SUM( DISTINCT b ) FROM t2 GROUP BY b ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using filesort +DROP TABLE t1,t2; +# +# Check if queries in non-default charsets work. +# +set names cp1251; +select charset('ãû'); +charset('ãû') +cp1251 +select hex('ãû'); +hex('ãû') +E3FB +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +select * from t0 where length('ãû') = a; +set names utf8; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 select * from t0 where length('гы') = a +set names default; +a +2 +set debug_dbug=@old_debug; +set names default; +# +# MDEV-462: SHOW EXPLAIN: Assertion `table_list->table' fails in find_field_in_table_ref if FOR contains a non-numeric value +# +show explain for foo; +ERROR HY000: You may only use constant expressions in this statement +# +# MDEV-411: SHOW EXPLAIN: For dependent subquery EXPLAIN produces type=index, key, 'Using where; Using index', +# while SHOW EXPLAIN says type=ALL, no key, 'Range checked for each record' +# +CREATE TABLE t1 (a INT NOT NULL, KEY(a)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (7),(0); +CREATE TABLE t2 (b INT NOT NULL) ENGINE=MyISAM; +INSERT INTO t2 VALUES (0),(8); +explain +SELECT SUM(b) FROM ( SELECT * FROM t1 ) AS alias1, t2 +WHERE b <= ANY ( +SELECT a FROM t1 +WHERE a = b + SLEEP(0.2) OR a >= ( SELECT SUM(b) FROM t2 )); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 index NULL a 4 NULL 2 Using index +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where +3 DEPENDENT SUBQUERY t1 ALL a NULL NULL NULL 2 Range checked for each record (index map: 0x1) +4 SUBQUERY t2 ALL NULL NULL NULL NULL 2 +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_join_exec_start'; +SELECT SUM(b) FROM ( SELECT * FROM t1 ) AS alias1, t2 +WHERE b <= ANY ( +SELECT a FROM t1 +WHERE a = b + SLEEP(0.2) OR a >= ( SELECT SUM(b) FROM t2 )); +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 index NULL a 4 NULL 2 Using index +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where +3 DEPENDENT SUBQUERY t1 ALL a NULL NULL NULL 2 Range checked for each record (index map: 0x1) +4 SUBQUERY t2 ALL NULL NULL NULL NULL 2 +Warnings: +Note 1003 SELECT SUM(b) FROM ( SELECT * FROM t1 ) AS alias1, t2 +WHERE b <= ANY ( +SELECT a FROM t1 +WHERE a = b + SLEEP(0.2) OR a >= ( SELECT SUM(b) FROM t2 )) +SUM(b) +0 +set debug_dbug=@old_debug; +DROP TABLE t1,t2; +drop table t0; +# +# MDEV-5148: Server crashes in print_explain on killing EXPLAIN EXTENDED +# +create table t0 (a int not null); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 (a int, b int); +insert into t1 select a,a from t0; +create table t2 as select * from t1; +set @show_explain_probe_select_id=2; +set debug_dbug='+d,show_explain_probe_best_ext_lim_search'; +explain +select * from t0 +where not exists ( select 1 from t1, t2 where t1.b=t2.b and t2.a=t0.a) and a is null; +kill query $thr2; +ERROR 70100: Query execution was interrupted +drop table t0,t1,t2; +# End +set debug_sync='RESET'; diff --git a/mysql-test/r/show_explain_non_select.result b/mysql-test/r/show_explain_non_select.result new file mode 100644 index 00000000000..0bd1e959405 --- /dev/null +++ b/mysql-test/r/show_explain_non_select.result @@ -0,0 +1,44 @@ +drop table if exists t0, t1; +SET @old_debug= @@session.debug; +set debug_sync='RESET'; +create table t0 (a int) engine=myisam; +insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8); +create table t1 (a int, b int, filler char(100), key(a), key(b)); +insert into t1 +select A.a+10*B.a + 10*C.a, A.a+10*B.a + 10*C.a, 'filler' +from t0 A, t0 B, t0 C; +# +# Test SHOW EXPLAIN for single-table DELETE +# +set debug_dbug='+d,show_explain_probe_delete_exec_start'; +delete from t1 where a<10 and b+1>1000; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 5 NULL 1 Using where +Warnings: +Note 1003 delete from t1 where a<10 and b+1>1000 +# +# Test SHOW EXPLAIN for multi-table DELETE +# +set @show_explain_probe_select_id=1; +set debug_dbug='+d,show_explain_probe_do_select'; +delete t1 from t1, t0 where t0.a=t1.a and t1.b +1 > 1000; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 8 Using where +1 SIMPLE t1 ref a a 5 test.t0.a 4 Using where +Warnings: +Note 1003 delete t1 from t1, t0 where t0.a=t1.a and t1.b +1 > 1000 +# +# Test SHOW EXPLAIN for single-table UPDATE +# +set debug_dbug='+d,show_explain_probe_update_exec_start'; +update t1 set filler='filler-data-2' where a<10 and b+1>1000; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 5 NULL 1 Using where +Warnings: +Note 1003 update t1 set filler='filler-data-2' where a<10 and b+1>1000 +drop table t0,t1; +set debug_dbug=@old_debug; +set debug_sync='RESET'; diff --git a/mysql-test/r/show_explain_ps.result b/mysql-test/r/show_explain_ps.result new file mode 100644 index 00000000000..f9b82c85f01 --- /dev/null +++ b/mysql-test/r/show_explain_ps.result @@ -0,0 +1,29 @@ +drop table if exists t0, t1; +select * from performance_schema.setup_instruments where name like '%show_explain%'; +NAME ENABLED TIMED +wait/synch/cond/sql/show_explain YES YES +stage/sql/show explain YES YES +statement/sql/show_explain YES YES +# We've got no instances +select * from performance_schema.cond_instances where name like '%show_explain%'; +NAME OBJECT_INSTANCE_BEGIN +# Check out if our cond is hit. +create table t0 (a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +set @show_explain_probe_select_id=1; +set debug_dbug='d,show_explain_probe_join_exec_start'; +select count(*) from t0 where a < 100000; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using where +Warnings: +Note 1003 select count(*) from t0 where a < 100000 +count(*) +10 +set debug_dbug=''; +select event_name +from performance_schema.events_waits_history_long +where event_name='wait/synch/cond/sql/show_explain'; +event_name +wait/synch/cond/sql/show_explain +drop table t0; diff --git a/mysql-test/r/show_grants_with_plugin-7985.result b/mysql-test/r/show_grants_with_plugin-7985.result new file mode 100644 index 00000000000..1898c316ac5 --- /dev/null +++ b/mysql-test/r/show_grants_with_plugin-7985.result @@ -0,0 +1,197 @@ +call mtr.add_suppression("password and an authentication plugin"); +# +# Create a user with mysql_native_password plugin. +# The user has no password or auth_string set. +# +create user u1; +GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password; +select user, host, password, plugin, authentication_string from mysql.user where user = 'u1'; +user host password plugin authentication_string +u1 % mysql_native_password +# +# The user's grants should show no password at all. +# +show grants for u1; +Grants for u1@% +GRANT USAGE ON *.* TO 'u1'@'%' +GRANT SELECT ON `mysql`.* TO 'u1'@'%' +# +# Test to see if connecting with no password is succesful. +# +connect con1, localhost, u1,,; +show grants; +Grants for u1@% +GRANT USAGE ON *.* TO 'u1'@'%' +GRANT SELECT ON `mysql`.* TO 'u1'@'%' +disconnect con1; +connection default; +# +# Test after flushing privileges. +# +flush privileges; +connect con1, localhost, u1,,; +show grants; +Grants for u1@% +GRANT USAGE ON *.* TO 'u1'@'%' +GRANT SELECT ON `mysql`.* TO 'u1'@'%' +disconnect con1; +connection default; +# +# Now add a mysql_native password string in authentication_string. +# +GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password +USING '*7AFEFD08B6B720E781FB000CAA418F54FA662626'; +select user, host, password, plugin, authentication_string from mysql.user where user = 'u1'; +user host password plugin authentication_string +u1 % mysql_native_password *7AFEFD08B6B720E781FB000CAA418F54FA662626 +# +# Test to see if connecting with password is succesful. +# +connect con1, localhost, u1,'SOMETHING',; +show grants; +Grants for u1@% +GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626' +GRANT SELECT ON `mysql`.* TO 'u1'@'%' +disconnect con1; +connection default; +# +# Test after flushing privileges. +# +flush privileges; +connect con1, localhost, u1,'SOMETHING',; +show grants; +Grants for u1@% +GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626' +GRANT SELECT ON `mysql`.* TO 'u1'@'%' +disconnect con1; +connection default; +# +# Now we also set a password for the user. +# +set password for u1 = PASSWORD('SOMETHINGELSE'); +select user, host, password, plugin, authentication_string from mysql.user where user = 'u1'; +user host password plugin authentication_string +u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6 +# +# Here we should use the password field, as that primes over +# the authentication_string field. +# +show grants for u1; +Grants for u1@% +GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6' +GRANT SELECT ON `mysql`.* TO 'u1'@'%' +# +# Logging in with the user's password should work. +# +connect con1, localhost, u1,'SOMETHINGELSE',; +show grants; +Grants for u1@% +GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6' +GRANT SELECT ON `mysql`.* TO 'u1'@'%' +disconnect con1; +connection default; +# +# Reload privileges and test logging in again. +# +flush privileges; +show grants for u1; +Grants for u1@% +GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6' +GRANT SELECT ON `mysql`.* TO 'u1'@'%' +# +# Here we connect via the user's password again. +# +connect con1, localhost, u1,'SOMETHINGELSE',; +show grants; +Grants for u1@% +GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6' +GRANT SELECT ON `mysql`.* TO 'u1'@'%' +disconnect con1; +connection default; +# +# Now we remove the authentication plugin password, flush privileges and +# try again. +# +update mysql.user set authentication_string = '' where user='u1'; +select user, host, password, plugin, authentication_string from mysql.user where user = 'u1'; +user host password plugin authentication_string +u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6 +flush privileges; +show grants for u1; +Grants for u1@% +GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6' +GRANT SELECT ON `mysql`.* TO 'u1'@'%' +# +# Here we connect via the user's password. +# +connect con1, localhost, u1,'SOMETHINGELSE',; +select user, host, password, plugin, authentication_string from mysql.user where user = 'u1'; +user host password plugin authentication_string +u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6 +disconnect con1; +connection default; +# +# Try and set a wrong auth_string password, with mysql_native_password. +# Make sure it fails. +# +GRANT USAGE ON *.* TO u1 IDENTIFIED VIA mysql_native_password USING 'asd'; +ERROR HY000: Password hash should be a 41-digit hexadecimal number +# +# Now set a correct password. +# +GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password +USING '*7AFEFD08B6B720E781FB000CAA418F54FA662626'; +show grants for u1; +Grants for u1@% +GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626' +GRANT SELECT ON `mysql`.* TO 'u1'@'%' +# +# Test if the user can now use that password instead. +# +connect con1, localhost, u1,'SOMETHING',; +show grants; +Grants for u1@% +GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626' +GRANT SELECT ON `mysql`.* TO 'u1'@'%' +disconnect con1; +# +# Test if the user can now use that password instead, after flushing privileges; +# +connection default; +flush privileges; +connect con1, localhost, u1,'SOMETHING',; +show grants; +Grants for u1@% +GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626' +GRANT SELECT ON `mysql`.* TO 'u1'@'%' +disconnect con1; +connection default; +# +# Clear all passwords from the user. +# +GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password; +select user, host, password, plugin, authentication_string from mysql.user where user = 'u1'; +user host password plugin authentication_string +u1 % mysql_native_password +# +# Test no password connect. +# +connect con1, localhost, u1,,; +show grants; +Grants for u1@% +GRANT USAGE ON *.* TO 'u1'@'%' +GRANT SELECT ON `mysql`.* TO 'u1'@'%' +disconnect con1; +connection default; +# +# Test no password connect, after flushing privileges. +# +flush privileges; +connect con1, localhost, u1,,; +show grants; +Grants for u1@% +GRANT USAGE ON *.* TO 'u1'@'%' +GRANT SELECT ON `mysql`.* TO 'u1'@'%' +disconnect con1; +connection default; +drop user u1; diff --git a/mysql-test/r/shutdown.result b/mysql-test/r/shutdown.result new file mode 100644 index 00000000000..7039afb129e --- /dev/null +++ b/mysql-test/r/shutdown.result @@ -0,0 +1,7 @@ +create user user1@localhost; +shutdown; +ERROR 42000: Access denied; you need (at least one of) the SHUTDOWN privilege(s) for this operation +create procedure try_shutdown() shutdown; +drop procedure try_shutdown; +shutdown; +drop user user1@localhost; diff --git a/mysql-test/r/sighup-6580.result b/mysql-test/r/sighup-6580.result new file mode 100644 index 00000000000..b77a7c6407f --- /dev/null +++ b/mysql-test/r/sighup-6580.result @@ -0,0 +1,3 @@ +select 'ok'; +ok +ok diff --git a/mysql-test/r/signal.result b/mysql-test/r/signal.result index 062b866475d..a5eb24442b4 100644 --- a/mysql-test/r/signal.result +++ b/mysql-test/r/signal.result @@ -1191,8 +1191,6 @@ end $$ call test_signal() $$ Caught by SQLSTATE Caught by SQLSTATE -Warnings: -Warning 1012 Raising a warning drop procedure test_signal $$ create procedure test_signal() begin @@ -1208,8 +1206,6 @@ end $$ call test_signal() $$ Caught by number Caught by number -Warnings: -Warning 1012 Raising a warning drop procedure test_signal $$ create procedure test_signal() begin @@ -1225,8 +1221,6 @@ end $$ call test_signal() $$ Caught by SQLWARNING Caught by SQLWARNING -Warnings: -Warning 1012 Raising a warning drop procedure test_signal $$ create procedure test_signal() begin @@ -1242,8 +1236,6 @@ end $$ call test_signal() $$ Caught by SQLSTATE Caught by SQLSTATE -Warnings: -Error 1012 Raising a not found drop procedure test_signal $$ create procedure test_signal() begin @@ -1259,8 +1251,6 @@ end $$ call test_signal() $$ Caught by number Caught by number -Warnings: -Error 1012 Raising a not found drop procedure test_signal $$ create procedure test_signal() begin @@ -1276,8 +1266,6 @@ end $$ call test_signal() $$ Caught by NOT FOUND Caught by NOT FOUND -Warnings: -Error 1012 Raising a not found drop procedure test_signal $$ create procedure test_signal() begin @@ -1293,8 +1281,6 @@ end $$ call test_signal() $$ Caught by SQLSTATE Caught by SQLSTATE -Warnings: -Error 1012 Raising an error drop procedure test_signal $$ create procedure test_signal() begin @@ -1310,8 +1296,6 @@ end $$ call test_signal() $$ Caught by number Caught by number -Warnings: -Error 1012 Raising an error drop procedure test_signal $$ create procedure test_signal() begin @@ -1327,25 +1311,29 @@ end $$ call test_signal() $$ Caught by SQLEXCEPTION Caught by SQLEXCEPTION -Warnings: -Error 1012 Raising an error drop procedure test_signal $$ # # Test where SIGNAL can be used # + +# RETURN statement clears Diagnostics Area, thus +# the warnings raised in a stored function are not +# visible outsidef the stored function. So, we're using +# @@warning_count variable to check that SIGNAL succeeded. + create function test_signal_func() returns integer begin +DECLARE v INT; DECLARE warn CONDITION FOR SQLSTATE "01XXX"; SIGNAL warn SET MESSAGE_TEXT = "This function SIGNAL a warning", MYSQL_ERRNO = 1012; -return 5; +SELECT @@warning_count INTO v; +return v; end $$ select test_signal_func() $$ test_signal_func() -5 -Warnings: -Warning 1012 This function SIGNAL a warning +1 drop function test_signal_func $$ create function test_signal_func() returns integer begin @@ -1468,7 +1456,6 @@ after RESIGNAL after RESIGNAL Warnings: Warning 1012 Raising a warning -Warning 1012 Raising a warning drop procedure test_resignal $$ create procedure test_resignal() begin @@ -1523,7 +1510,6 @@ after RESIGNAL after RESIGNAL Warnings: Warning 1264 Out of range value for column 'a' at row 1 -Warning 1264 Out of range value for column 'a' at row 1 drop procedure test_resignal $$ create procedure test_resignal() begin @@ -1557,7 +1543,7 @@ end $$ call test_resignal() $$ before RESIGNAL before RESIGNAL -ERROR 42S02: Unknown table 'no_such_table' +ERROR 42S02: Unknown table 'test.no_such_table' drop procedure test_resignal $$ create procedure test_resignal() begin @@ -1580,7 +1566,6 @@ before RESIGNAL after RESIGNAL after RESIGNAL Warnings: -Warning 1012 Raising a warning Warning 5555 RESIGNAL of a warning drop procedure test_resignal $$ create procedure test_resignal() @@ -1641,7 +1626,6 @@ before RESIGNAL after RESIGNAL after RESIGNAL Warnings: -Warning 1264 Out of range value for column 'a' at row 1 Warning 5555 RESIGNAL of a warning drop procedure test_resignal $$ create procedure test_resignal() @@ -2054,7 +2038,7 @@ before RESIGNAL after RESIGNAL after RESIGNAL Warnings: -Error 1051 Unknown table 'no_such_table' +Error 1051 Unknown table 'test.no_such_table' Warning 5555 RESIGNAL to a warning drop procedure test_resignal $$ create procedure test_resignal() @@ -2075,7 +2059,7 @@ before RESIGNAL ERROR 02444: RESIGNAL to a not found show warnings $$ Level Code Message -Error 1051 Unknown table 'no_such_table' +Error 1051 Unknown table 'test.no_such_table' Error 5555 RESIGNAL to a not found drop procedure test_resignal $$ create procedure test_resignal() @@ -2096,7 +2080,7 @@ before RESIGNAL ERROR 44444: RESIGNAL to an error show warnings $$ Level Code Message -Error 1051 Unknown table 'no_such_table' +Error 1051 Unknown table 'test.no_such_table' Error 5555 RESIGNAL to an error drop procedure test_resignal $$ # @@ -2143,9 +2127,6 @@ CALL peter_p2() $$ ERROR 42000: Hi, I am a useless error message show warnings $$ Level Code Message -Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL' -Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL' -Error 9999 Variable 'sql_mode' can't be set to the value of 'NULL' Error 9999 Hi, I am a useless error message drop procedure peter_p1 $$ drop procedure peter_p2 $$ diff --git a/mysql-test/r/signal_demo2.result b/mysql-test/r/signal_demo2.result index 223030b0624..5c8ac328a4a 100644 --- a/mysql-test/r/signal_demo2.result +++ b/mysql-test/r/signal_demo2.result @@ -74,7 +74,7 @@ In proc_bottom() In proc_bottom() Doing something that fail (simulate an error) ... Doing something that fail (simulate an error) ... -ERROR 42S02: Unknown table 'no_such_table' +ERROR 42S02: Unknown table 'demo.no_such_table' call proc_top_a(3); Starting ... Starting ... @@ -167,7 +167,7 @@ Doing something that fail (simulate an error) ... Doing something that fail (simulate an error) ... Doing cleanup ! Doing cleanup ! -ERROR 42S02: Unknown table 'no_such_table' +ERROR 42S02: Unknown table 'demo.no_such_table' call proc_top_b(3); Starting ... Starting ... diff --git a/mysql-test/r/signal_demo3.result b/mysql-test/r/signal_demo3.result index a89ce703d20..cc7042269bb 100644 --- a/mysql-test/r/signal_demo3.result +++ b/mysql-test/r/signal_demo3.result @@ -77,7 +77,7 @@ call proc_1(); ERROR 45000: Oops in proc_1 show warnings; Level Code Message -Error 1051 Unknown table 'oops_it_is_not_here' +Error 1051 Unknown table 'demo.oops_it_is_not_here' Error 1644 Oops in proc_9 Error 1644 Oops in proc_8 Error 1644 Oops in proc_7 @@ -95,11 +95,11 @@ call proc_1(); ERROR 45000: Oops in proc_1 show warnings; Level Code Message -Error 1051 Unknown table 'oops_it_is_not_here' -Error 1644 Oops in proc_9 -Error 1644 Oops in proc_8 -Error 1644 Oops in proc_7 -Error 1644 Oops in proc_6 +Error 1644 Oops in proc_5 +Error 1644 Oops in proc_4 +Error 1644 Oops in proc_3 +Error 1644 Oops in proc_2 +Error 1644 Oops in proc_1 SET @@session.max_error_count = 7; SELECT @@session.max_error_count; @@session.max_error_count @@ -108,13 +108,13 @@ call proc_1(); ERROR 45000: Oops in proc_1 show warnings; Level Code Message -Error 1051 Unknown table 'oops_it_is_not_here' -Error 1644 Oops in proc_9 -Error 1644 Oops in proc_8 Error 1644 Oops in proc_7 Error 1644 Oops in proc_6 Error 1644 Oops in proc_5 Error 1644 Oops in proc_4 +Error 1644 Oops in proc_3 +Error 1644 Oops in proc_2 +Error 1644 Oops in proc_1 SET @@session.max_error_count = 9; SELECT @@session.max_error_count; @@session.max_error_count @@ -123,7 +123,6 @@ call proc_1(); ERROR 45000: Oops in proc_1 show warnings; Level Code Message -Error 1051 Unknown table 'oops_it_is_not_here' Error 1644 Oops in proc_9 Error 1644 Oops in proc_8 Error 1644 Oops in proc_7 @@ -132,6 +131,7 @@ Error 1644 Oops in proc_5 Error 1644 Oops in proc_4 Error 1644 Oops in proc_3 Error 1644 Oops in proc_2 +Error 1644 Oops in proc_1 drop database demo; SET @@global.max_error_count = @start_global_value; SELECT @@global.max_error_count; diff --git a/mysql-test/r/single_delete_update.result b/mysql-test/r/single_delete_update.result index d4534a2c2d8..84380216b74 100644 --- a/mysql-test/r/single_delete_update.result +++ b/mysql-test/r/single_delete_update.result @@ -18,6 +18,7 @@ NULL 15 SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -28,6 +29,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -36,6 +38,7 @@ DELETE FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -46,6 +49,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -71,6 +75,7 @@ NULL 15 SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 1 Sort_range 0 Sort_rows 5 Sort_scan 1 @@ -81,6 +86,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -89,6 +95,7 @@ DELETE FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 8 Sort_scan 1 @@ -99,6 +106,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 5 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -121,6 +129,7 @@ a b c d SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 1 Sort_range 0 Sort_rows 1 Sort_scan 1 @@ -131,6 +140,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -139,6 +149,7 @@ DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 1 Sort_scan 1 @@ -149,6 +160,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 1 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -175,6 +187,7 @@ a b c d SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -185,6 +198,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -193,6 +207,7 @@ DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -203,6 +218,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -223,6 +239,7 @@ a b c d SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 1 Sort_range 0 Sort_rows 1 Sort_scan 1 @@ -233,6 +250,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -241,6 +259,7 @@ DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 1 Sort_scan 1 @@ -251,6 +270,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 1 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -269,6 +289,7 @@ a b c d SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 1 Sort_range 0 Sort_rows 1 Sort_scan 1 @@ -279,6 +300,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 1 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -287,6 +309,7 @@ DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 1 Sort_scan 1 @@ -297,6 +320,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 1 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -318,6 +342,7 @@ NULL 13 13 SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 1 Sort_rows 4 Sort_scan 0 @@ -328,6 +353,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 7 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 4 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -341,6 +367,7 @@ DELETE FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 1 Sort_rows 4 Sort_scan 0 @@ -351,6 +378,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 7 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 8 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -378,6 +406,7 @@ NULL 14 SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -388,6 +417,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 4 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -396,6 +426,7 @@ DELETE FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -406,6 +437,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 4 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -431,6 +463,7 @@ a b c SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 1 Sort_range 0 Sort_rows 5 Sort_scan 1 @@ -441,6 +474,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -449,6 +483,7 @@ DELETE FROM t2 ORDER BY a, b DESC LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 16 Sort_scan 1 @@ -459,6 +494,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 5 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -493,6 +529,7 @@ a b c SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -503,6 +540,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -517,6 +555,7 @@ a b c SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -527,6 +566,7 @@ Handler_read_key 0 Handler_read_last 1 Handler_read_next 0 Handler_read_prev 4 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -535,6 +575,7 @@ DELETE FROM t2 ORDER BY a DESC, b DESC LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -545,6 +586,7 @@ Handler_read_key 0 Handler_read_last 1 Handler_read_next 0 Handler_read_prev 4 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -571,6 +613,7 @@ NULL 15 SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -581,6 +624,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -589,6 +633,7 @@ UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -599,6 +644,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 5 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -629,6 +675,7 @@ NULL 15 SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 1 Sort_range 0 Sort_rows 5 Sort_scan 1 @@ -639,6 +686,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -647,6 +695,7 @@ UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 1 Sort_range 0 Sort_rows 5 Sort_scan 1 @@ -657,6 +706,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 5 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -684,6 +734,7 @@ a b c d SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 1 Sort_range 0 Sort_rows 1 Sort_scan 1 @@ -694,6 +745,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -702,6 +754,7 @@ UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 1 Sort_range 0 Sort_rows 1 Sort_scan 1 @@ -712,6 +765,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 1 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -738,6 +792,7 @@ a b c d SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -748,6 +803,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -756,6 +812,7 @@ UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -766,6 +823,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 5 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -786,6 +844,7 @@ a b c d SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 1 Sort_range 0 Sort_rows 1 Sort_scan 1 @@ -796,6 +855,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -804,6 +864,7 @@ UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 1 Sort_range 0 Sort_rows 1 Sort_scan 1 @@ -814,6 +875,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 1 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -833,6 +895,7 @@ a b c d SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 1 Sort_range 0 Sort_rows 1 Sort_scan 1 @@ -843,6 +906,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 1 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -851,6 +915,7 @@ UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 1 Sort_range 0 Sort_rows 1 Sort_scan 1 @@ -861,6 +926,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 1 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -883,6 +949,7 @@ NULL 13 13 SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 1 Sort_rows 4 Sort_scan 0 @@ -893,6 +960,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 7 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 4 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -906,6 +974,7 @@ UPDATE t2 SET i = 123 WHERE key1 < 13 or key2 < 14 ORDER BY key1; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 1 Sort_rows 4 Sort_scan 0 @@ -916,6 +985,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 7 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 8 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -947,6 +1017,7 @@ NULL 14 SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -957,6 +1028,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 4 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -965,6 +1037,7 @@ UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -975,6 +1048,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 4 +Handler_read_retry 0 Handler_read_rnd 5 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -1005,6 +1079,7 @@ a b c SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 1 Sort_range 0 Sort_rows 5 Sort_scan 1 @@ -1015,6 +1090,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -1023,6 +1099,7 @@ UPDATE t2 SET c = 10 ORDER BY a, b DESC LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 1 Sort_range 0 Sort_rows 5 Sort_scan 1 @@ -1033,6 +1110,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 5 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -1061,6 +1139,7 @@ a b c SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -1071,6 +1150,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -1085,6 +1165,7 @@ a b c SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -1095,6 +1176,7 @@ Handler_read_key 0 Handler_read_last 1 Handler_read_next 0 Handler_read_prev 4 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -1103,6 +1185,7 @@ UPDATE t2 SET c = 10 ORDER BY a DESC, b DESC LIMIT 5; SHOW SESSION STATUS LIKE 'Sort%'; Variable_name Value Sort_merge_passes 0 +Sort_priority_queue_sorts 0 Sort_range 0 Sort_rows 0 Sort_scan 0 @@ -1113,6 +1196,7 @@ Handler_read_key 0 Handler_read_last 1 Handler_read_next 0 Handler_read_prev 4 +Handler_read_retry 0 Handler_read_rnd 5 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 diff --git a/mysql-test/r/skip_grants.result b/mysql-test/r/skip_grants.result index cd691d882fa..75792a15afa 100644 --- a/mysql-test/r/skip_grants.result +++ b/mysql-test/r/skip_grants.result @@ -36,14 +36,14 @@ CREATE DEFINER=a@'' FUNCTION f3() RETURNS INT RETURN 3; SHOW CREATE VIEW v3; View Create View character_set_client collation_connection -v3 CREATE ALGORITHM=UNDEFINED DEFINER=`a`@`` SQL SECURITY DEFINER VIEW `v3` AS select `t1`.`c` AS `c` from `t1` latin1 latin1_swedish_ci +v3 CREATE ALGORITHM=UNDEFINED DEFINER=`a`@`%` SQL SECURITY DEFINER VIEW `v3` AS select `t1`.`c` AS `c` from `t1` latin1 latin1_swedish_ci SHOW CREATE PROCEDURE p3; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -p3 CREATE DEFINER=`a`@`` PROCEDURE `p3`() +p3 CREATE DEFINER=`a`@`%` PROCEDURE `p3`() SELECT 3 latin1 latin1_swedish_ci latin1_swedish_ci SHOW CREATE FUNCTION f3; Function sql_mode Create Function character_set_client collation_connection Database Collation -f3 CREATE DEFINER=`a`@`` FUNCTION `f3`() RETURNS int(11) +f3 CREATE DEFINER=`a`@`%` FUNCTION `f3`() RETURNS int(11) RETURN 3 latin1 latin1_swedish_ci latin1_swedish_ci DROP TRIGGER t1_bi; DROP TRIGGER ti_ai; @@ -59,7 +59,9 @@ DROP FUNCTION f1; DROP FUNCTION f2; DROP FUNCTION f3; set global event_scheduler=1; -ERROR HY000: The MariaDB server is running with the --event-scheduler=DISABLED or --skip-grant-tables option so it cannot execute this statement +Warnings: +Note 1408 Event Scheduler: Loaded 0 events +set global event_scheduler=0; select count(*) from information_schema.COLUMN_PRIVILEGES; count(*) 0 diff --git a/mysql-test/r/slave-running.result b/mysql-test/r/slave-running.result deleted file mode 100644 index 3699390a7d3..00000000000 --- a/mysql-test/r/slave-running.result +++ /dev/null @@ -1,3 +0,0 @@ -show status like 'Slave_running'; -Variable_name Value -Slave_running ON diff --git a/mysql-test/r/slave-stopped.result b/mysql-test/r/slave-stopped.result deleted file mode 100644 index 90b416b7bd7..00000000000 --- a/mysql-test/r/slave-stopped.result +++ /dev/null @@ -1,3 +0,0 @@ -show status like 'Slave_running'; -Variable_name Value -Slave_running OFF diff --git a/mysql-test/r/sp-big.result b/mysql-test/r/sp-big.result index d28b7004330..9765508859c 100644 --- a/mysql-test/r/sp-big.result +++ b/mysql-test/r/sp-big.result @@ -46,8 +46,6 @@ end while; close cur1; end| call p1(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed select count(*) from t1; count(*) 256 diff --git a/mysql-test/r/sp-bugs.result b/mysql-test/r/sp-bugs.result index c861a10d430..ccccacd09a5 100644 --- a/mysql-test/r/sp-bugs.result +++ b/mysql-test/r/sp-bugs.result @@ -43,8 +43,6 @@ END| SELECT f2 (); f2 () NULL -Warnings: -Error 1305 FUNCTION testdb.f_not_exists does not exist DROP SCHEMA testdb; USE test; # @@ -134,6 +132,15 @@ DROP DATABASE testdb; USE test; End of 5.1 tests # +# BUG#13489996 valgrind:conditional jump or move depends on +# uninitialised values-field_blob +# +CREATE FUNCTION sf() RETURNS BLOB RETURN ""; +SELECT sf(); +sf() + +DROP FUNCTION sf; +# # Bug#11763507 - 56224: FUNCTION NAME IS CASE-SENSITIVE # SET @@SQL_MODE = ''; diff --git a/mysql-test/r/sp-bugs2.result b/mysql-test/r/sp-bugs2.result new file mode 100644 index 00000000000..3e48f0fb5d2 --- /dev/null +++ b/mysql-test/r/sp-bugs2.result @@ -0,0 +1,23 @@ +CREATE TABLE t1 (i INT); +SET @a = 2; +CREATE TABLE IF NOT EXISTS t2 (i INT) ENGINE = MyISAM +AS SELECT * FROM t1; +CREATE TABLE IF NOT EXISTS t2 (i INT) ENGINE = MyISAM +AS SELECT * FROM t1; +Warnings: +Note 1050 Table 't2' already exists +DROP TABLE t2; +CREATE PROCEDURE sp() +BEGIN +REPEAT +CREATE TABLE IF NOT EXISTS t2 (i INT) ENGINE = MyISAM +AS SELECT * FROM t1; +SET @a = @a - 1; +UNTIL @a = 0 +END REPEAT ; +END | +CALL sp(); +Warnings: +Note 1050 Table 't2' already exists +DROP PROCEDURE sp; +DROP TABLE t1, t2; diff --git a/mysql-test/r/sp-code.result b/mysql-test/r/sp-code.result index 67651294498..c9d2f7b023a 100644 --- a/mysql-test/r/sp-code.result +++ b/mysql-test/r/sp-code.result @@ -711,8 +711,6 @@ looping i looping 1 looping i looping 0 -Warnings: -Error 1062 Duplicate entry '1' for key 'a' call proc_26977_works(2); do something do something @@ -732,8 +730,6 @@ looping i looping 0 optimizer: keep hreturn optimizer: keep hreturn -Warnings: -Error 1062 Duplicate entry '2' for key 'a' drop table t1; drop procedure proc_26977_broken; drop procedure proc_26977_works; @@ -851,7 +847,7 @@ drop procedure if exists p_20906_b; create procedure p_20906_a() SET @a=@a+1, @b=@b+1; show procedure code p_20906_a; Pos Instruction -0 stmt 31 "SET @a=@a+1" +0 stmt 31 "SET @a=@a+1" 1 stmt 31 "SET @b=@b+1" set @a=1; set @b=1; @@ -862,7 +858,7 @@ select @a, @b; create procedure p_20906_b() SET @a=@a+1, @b=@b+1, @c=@c+1; show procedure code p_20906_b; Pos Instruction -0 stmt 31 "SET @a=@a+1" +0 stmt 31 "SET @a=@a+1" 1 stmt 31 "SET @b=@b+1" 2 stmt 31 "SET @c=@c+1" set @a=1; diff --git a/mysql-test/r/sp-destruct.result b/mysql-test/r/sp-destruct.result index 2dac0270ce1..81c0adb36cc 100644 --- a/mysql-test/r/sp-destruct.result +++ b/mysql-test/r/sp-destruct.result @@ -149,7 +149,7 @@ alter table mysql.proc drop column type; # The below statement should not cause assertion failure. drop database mysqltest; Warnings: -Error 1547 Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted +Error 1805 Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted # Restore mysql.proc. drop table mysql.proc; # @@ -166,7 +166,7 @@ CREATE PROCEDURE db1.p1() SET @foo = 10; ALTER TABLE mysql.proc MODIFY comment CHAR (32); DROP DATABASE db1; Warnings: -Error 1548 Cannot load from mysql.proc. The table is probably corrupted +Error 1728 Cannot load from mysql.proc. The table is probably corrupted # Restore mysql.proc DROP TABLE mysql.proc; RENAME TABLE proc_backup TO mysql.proc; diff --git a/mysql-test/r/sp-dynamic.result b/mysql-test/r/sp-dynamic.result index cdfeb8ab020..7309ba4c765 100644 --- a/mysql-test/r/sp-dynamic.result +++ b/mysql-test/r/sp-dynamic.result @@ -249,7 +249,7 @@ drop procedure p1| drop table if exists t1| drop table if exists t2| Warnings: -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t2' create table t1 (id integer primary key auto_increment, stmt_text char(35), status varchar(20))| insert into t1 (stmt_text) values diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result index 24cbb945fd2..71fab8c9654 100644 --- a/mysql-test/r/sp-error.result +++ b/mysql-test/r/sp-error.result @@ -466,7 +466,7 @@ drop table t5; end| create table t5 (x int)| call bug3294()| -ERROR 42S02: Unknown table 't5' +ERROR 42S02: Unknown table 'test.t5' drop procedure bug3294| drop procedure if exists bug8776_1| drop procedure if exists bug8776_2| @@ -1344,8 +1344,6 @@ set @in_func := 0; select func_20713_a(); func_20713_a() NULL -Warnings: -Error 1146 Table 'test.bogus_table_20713' doesn't exist select @in_func; @in_func 2 @@ -1353,8 +1351,6 @@ set @in_func := 0; select func_20713_b(); func_20713_b() NULL -Warnings: -Error 1146 Table 'test.bogus_table_20713' doesn't exist select @in_func; @in_func 2 @@ -1567,7 +1563,7 @@ f2() 1 drop function f2; drop table t2; -ERROR 42S02: Unknown table 't2' +ERROR 42S02: Unknown table 'test.t2' End of 5.1 tests drop procedure if exists proc_33983_a; drop procedure if exists proc_33983_b; @@ -1821,11 +1817,8 @@ CAST('10 ' as unsigned integer) c 3 @@warning_count -1 +0 Level Code Message -Warning 1292 Truncated incorrect INTEGER value: '10 ' -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '10 ' CALL p6(); CAST('10 ' as unsigned integer) 10 @@ -1833,8 +1826,6 @@ Level Code Message Warning 1292 Truncated incorrect INTEGER value: '10 ' c 1 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '10 ' DROP PROCEDURE p1; DROP PROCEDURE p2; DROP PROCEDURE p3; @@ -1885,9 +1876,6 @@ END| CALL p1(); exception exception -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '10 ' -Error 1048 Column 'b' cannot be null DROP TABLE t1; DROP PROCEDURE p1; # @@ -1931,11 +1919,8 @@ CALL p1(); NULL warning caught (expected) warning caught (expected) -Warnings: -Warning 1365 Division by 0 SHOW WARNINGS; Level Code Message -Warning 1365 Division by 0 CALL p2(); 5 / 0 NULL @@ -2008,3 +1993,878 @@ Error 1048 Column 'c' cannot be null DROP TABLE t1; DROP TABLE t2; DROP PROCEDURE p1; + +################################################################### +# Tests for the following bugs: +# - Bug#11763171: 55852 - Possibly inappropriate handler activation. +# - Bug#11749343: 38806 - Wrong scope for SQL HANDLERS in SP. +################################################################### + + +# -- Check that SQL-conditions thrown by Statement-blocks are +# -- handled by Handler-decl blocks properly. + +CREATE PROCEDURE p1() +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +SELECT 'H1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'H2' AS HandlerId; +SIGNAL SQLSTATE '01000'; # Should be handled by H2. +END| + +CALL p1()| +HandlerId +H2 + +# -- Check that SQL-conditions thrown by Statement-blocks are +# -- handled by Handler-decl blocks properly in case of nested +# -- SQL-blocks. + +CREATE PROCEDURE p2() +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +SELECT 'H1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'H2' AS HandlerId; +BEGIN +SELECT 'B1' AS BlockId; +BEGIN +SELECT 'B2' AS BlockId; +BEGIN +SELECT 'B3' AS BlockId; +SIGNAL SQLSTATE '01000'; # Should be handled by H2. +END; +END; +END; +END| + +CALL p2()| +BlockId +B1 +BlockId +B2 +BlockId +B3 +HandlerId +H2 + +# -- Check SQL-handler resolution rules. + +CREATE PROCEDURE p3() +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +SELECT 'H1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'H2' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000' + SELECT 'H3' AS HandlerId; +SIGNAL SQLSTATE '01000'; # Should be handled by H3. +END| + +CALL p3()| +HandlerId +H3 + +CREATE PROCEDURE p4() +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +SELECT 'H1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000' + SELECT 'H2' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'H3' AS HandlerId; +SIGNAL SQLSTATE '01000'; # Should be handled by H2. +END| + +CALL p4()| +HandlerId +H2 + +CREATE PROCEDURE p5() +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +SELECT 'H1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000' + SELECT 'H2' AS HandlerId; +BEGIN +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'H3' AS HandlerId; +SIGNAL SQLSTATE '01000'; # Should be handled by H3. +END; +END| + +CALL p5()| +HandlerId +H3 + +# -- Check that handlers don't handle its own exceptions. + +CREATE PROCEDURE p6() +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +SELECT 'H1' AS HandlerId; +SIGNAL SQLSTATE 'HY000'; # Should *not* be handled by H1. +END; +SELECT 'S1' AS SignalId; +SIGNAL SQLSTATE 'HY000'; # Should be handled by H1. +END| + +CALL p6()| +SignalId +S1 +HandlerId +H1 +ERROR HY000: Unhandled user-defined exception condition + +# -- Check that handlers don't handle its own warnings. + +CREATE PROCEDURE p7() +BEGIN +DECLARE CONTINUE HANDLER FOR SQLWARNING +BEGIN +SELECT 'H1' AS HandlerId; +SIGNAL SQLSTATE '01000'; # Should *not* be handled by H1. +END; +SELECT 'S1' AS SignalId; +SIGNAL SQLSTATE '01000'; # Should be handled by H1. +END| + +CALL p7()| +SignalId +S1 +HandlerId +H1 +Warnings: +Warning 1642 Unhandled user-defined warning condition + +# -- Check that conditions for handlers are not handled by the handlers +# -- from the same block. + +CREATE PROCEDURE p8() +BEGIN +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'H1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +SELECT 'H2' AS HandlerId; +SIGNAL SQLSTATE '01000'; # Should *not* be handled by H1. +END; +SELECT 'S1' AS SignalId; +SIGNAL SQLSTATE 'HY000'; # Should be handled by H2. +END| + +CALL p8()| +SignalId +S1 +HandlerId +H2 +Warnings: +Warning 1642 Unhandled user-defined warning condition + +# -- Check that conditions for handlers are not handled by the handlers +# -- from the same block even if they are thrown deep down the stack. + +CREATE PROCEDURE p9() +BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000' + SELECT 'Wrong:H1:1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'Wrong:H1:2' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000' + SELECT 'Wrong:H2:1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'Wrong:H2:2' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000' + SELECT 'Wrong:H3:1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'Wrong:H3:2' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000' + SELECT 'Wrong:H4:1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'Wrong:H4:2' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000' + SELECT 'Wrong:H5:1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'Wrong:H5:2' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000' + SELECT 'Wrong:H6:1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'Wrong:H6:2' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +SELECT 'H2' AS HandlerId; +SIGNAL SQLSTATE '01000'; # Should *not* be handled by H1. +END; +SELECT 'S6' AS SignalId; +SIGNAL SQLSTATE 'HY000'; +END; +SELECT 'S5' AS SignalId; +SIGNAL SQLSTATE 'HY000'; +END; +SELECT 'S4' AS SignalId; +SIGNAL SQLSTATE 'HY000'; +END; +SELECT 'S3' AS SignalId; +SIGNAL SQLSTATE 'HY000'; +END; +SELECT 'S2' AS SignalId; +SIGNAL SQLSTATE 'HY000'; +END; +SELECT 'S1' AS SignalId; +SIGNAL SQLSTATE 'HY000'; # Should be handled by H2. +END| + +CALL p9()| +SignalId +S1 +SignalId +S2 +SignalId +S3 +SignalId +S4 +SignalId +S5 +SignalId +S6 +HandlerId +H2 +Warnings: +Warning 1642 Unhandled user-defined warning condition + +# -- Check that handlers are choosen properly in case of deep stack and +# -- nested SQL-blocks. + +CREATE PROCEDURE p10() +BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000' + SELECT 'H1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'H2' AS HandlerId; +BEGIN +BEGIN +BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000' + SELECT 'Wrong:H1:1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'Wrong:H1:2' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000' + SELECT 'Wrong:H2:1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'Wrong:H2:2' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000' + SELECT 'Wrong:H3:1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'Wrong:H3:2' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000' + SELECT 'Wrong:H4:1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'Wrong:H4:2' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000' + SELECT 'Wrong:H5:1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'Wrong:H5:2' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000' + SELECT 'Wrong:H6:1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'Wrong:H6:2' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +SELECT 'H2' AS HandlerId; +SIGNAL SQLSTATE '01000'; # Should be handled by H1. +END; +SELECT 'S6' AS SignalId; +SIGNAL SQLSTATE 'HY000'; +END; +SELECT 'S5' AS SignalId; +SIGNAL SQLSTATE 'HY000'; +END; +SELECT 'S4' AS SignalId; +SIGNAL SQLSTATE 'HY000'; +END; +SELECT 'S3' AS SignalId; +SIGNAL SQLSTATE 'HY000'; +END; +SELECT 'S2' AS SignalId; +SIGNAL SQLSTATE 'HY000'; +END; +SELECT 'S1' AS SignalId; +SIGNAL SQLSTATE 'HY000'; # Should be handled by H2. +END; +END; +END; +END| + +CALL p10()| +SignalId +S1 +SignalId +S2 +SignalId +S3 +SignalId +S4 +SignalId +S5 +SignalId +S6 +HandlerId +H2 +HandlerId +H1 + +# -- Test stored procedure from Peter's mail. + +CREATE PROCEDURE p11() +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +SELECT 'H1' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'H2' AS HandlerId; +BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01000', 1249 +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +SELECT 'H3' AS HandlerId; +DECLARE CONTINUE HANDLER FOR SQLWARNING +SELECT 'H4' AS HandlerId; +BEGIN +SELECT 'H5' AS HandlerId; +SELECT 'S3' AS SignalId; +SIGNAL SQLSTATE 'HY000'; # H3 +SELECT 'S4' AS SignalId; +SIGNAL SQLSTATE '22003'; # H3 +SELECT 'S5' AS SignalId; +SIGNAL SQLSTATE '01000' SET MYSQL_ERRNO = 1249; # H4 +END; +END; +SELECT 'S6' AS SignalId; +SIGNAL SQLSTATE 'HY000'; # H1 +SELECT 'S7' AS SignalId; +SIGNAL SQLSTATE '22003'; # H1 +SELECT 'S8' AS SignalId; +SIGNAL SQLSTATE '01000' SET MYSQL_ERRNO = 1249; # H5 +END; +SELECT 'S1' AS SignalId; +SIGNAL SQLSTATE 'HY000'; # H1 +SELECT 'S2' AS SignalId; +SIGNAL SQLSTATE '01000' SET MYSQL_ERRNO = 1249; # H2 +END| + +CALL p11()| +SignalId +S6 +HandlerId +H1 +SignalId +S7 +HandlerId +H1 +SignalId +S8 +HandlerId +H5 +SignalId +S3 +HandlerId +H3 +SignalId +S4 +HandlerId +H3 +SignalId +S5 +HandlerId +H4 +SignalId +S1 +HandlerId +H1 +SignalId +S2 +HandlerId +H2 + +# -- Check that runtime stack-trace can be deeper than parsing-time one. + +CREATE PROCEDURE p12() +BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01001' + BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01001' + BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01001' + BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01001' + BEGIN +DECLARE CONTINUE HANDLER FOR SQLSTATE '01001' + BEGIN +SELECT 'H1:5' AS HandlerId; +SIGNAL SQLSTATE '01002'; +END; +SELECT 'H1:4' AS HandlerId; +SIGNAL SQLSTATE '01001'; +END; +SELECT 'H1:3' AS HandlerId; +SIGNAL SQLSTATE '01001'; +END; +SELECT 'H1:2' AS HandlerId; +SIGNAL SQLSTATE '01001'; +END; +SELECT 'H1:1' AS HandlerId; +SIGNAL SQLSTATE '01001'; +END; +######################################################### +DECLARE CONTINUE HANDLER FOR SQLSTATE '01002' + SELECT 'OK' AS Msg; +######################################################### +BEGIN +DECLARE CONTINUE HANDLER FOR SQLWARNING +BEGIN +DECLARE CONTINUE HANDLER FOR SQLWARNING +BEGIN +DECLARE CONTINUE HANDLER FOR SQLWARNING +BEGIN +DECLARE CONTINUE HANDLER FOR SQLWARNING +BEGIN +DECLARE CONTINUE HANDLER FOR SQLWARNING +BEGIN +SELECT 'H2:5' AS HandlerId; +SIGNAL SQLSTATE '01001'; +END; +SELECT 'H2:4' AS HandlerId; +SIGNAL SQLSTATE '01000'; +END; +SELECT 'H2:3' AS HandlerId; +SIGNAL SQLSTATE '01000'; +END; +SELECT 'H2:2' AS HandlerId; +SIGNAL SQLSTATE '01000'; +END; +SELECT 'H2:1' AS HandlerId; +SIGNAL SQLSTATE '01000'; +END; +####################################################### +SELECT 'Throw 01000' AS Msg; +SIGNAL SQLSTATE '01000'; +END; +END| + +CALL p12()| +Msg +Throw 01000 +HandlerId +H2:1 +HandlerId +H2:2 +HandlerId +H2:3 +HandlerId +H2:4 +HandlerId +H2:5 +HandlerId +H1:1 +HandlerId +H1:2 +HandlerId +H1:3 +HandlerId +H1:4 +HandlerId +H1:5 +Warnings: +Warning 1642 Unhandled user-defined warning condition + +# -- Check that handler-call-frames are removed properly for EXIT +# -- handlers. + +CREATE PROCEDURE p13() +BEGIN +DECLARE CONTINUE HANDLER FOR SQLWARNING +BEGIN +DECLARE CONTINUE HANDLER FOR SQLWARNING +BEGIN +DECLARE EXIT HANDLER FOR SQLWARNING +BEGIN +SELECT 'EXIT handler 3' AS Msg; +END; +SELECT 'CONTINUE handler 2: 1' AS Msg; +SIGNAL SQLSTATE '01000'; +SELECT 'CONTINUE handler 2: 2' AS Msg; +END; +SELECT 'CONTINUE handler 1: 1' AS Msg; +SIGNAL SQLSTATE '01000'; +SELECT 'CONTINUE handler 1: 2' AS Msg; +END; +SELECT 'Throw 01000' AS Msg; +SIGNAL SQLSTATE '01000'; +END| + +CALL p13()| +Msg +Throw 01000 +Msg +CONTINUE handler 1: 1 +Msg +CONTINUE handler 2: 1 +Msg +EXIT handler 3 +Msg +CONTINUE handler 1: 2 + +# That's it. Cleanup. + +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP PROCEDURE p3; +DROP PROCEDURE p4; +DROP PROCEDURE p5; +DROP PROCEDURE p6; +DROP PROCEDURE p7; +DROP PROCEDURE p8; +DROP PROCEDURE p9; +DROP PROCEDURE p10; +DROP PROCEDURE p11; +DROP PROCEDURE p12; +DROP PROCEDURE p13; + +# Bug#12731619: NESTED SP HANDLERS CAN TRIGGER ASSERTION + +DROP FUNCTION IF EXISTS f1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1(msg VARCHAR(255)); +CREATE FUNCTION f1() RETURNS INT +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION # handler 1 +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION # handler 2 +BEGIN +INSERT INTO t1 VALUE('WRONG: Inside H2'); +RETURN 2; +END; +INSERT INTO t1 VALUE('CORRECT: Inside H1'); +RETURN 1; +END; +BEGIN +DECLARE CONTINUE HANDLER FOR SQLWARNING # handler 3 +BEGIN +INSERT INTO t1 VALUE('WRONG: Inside H3'); +RETURN 3; +END; +INSERT INTO t1 VALUE('CORRECT: Calling f1()'); +RETURN f1(); # -- exception here +END; +INSERT INTO t1 VALUE('WRONG: Returning 10'); +RETURN 10; +END| + +SELECT f1(); +f1() +1 + +SELECT * FROM t1; +msg +CORRECT: Calling f1() +CORRECT: Inside H1 + +DROP FUNCTION f1; +DROP TABLE t1; + +# Check that handled SQL-conditions are properly cleared from DA. + +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p2; +DROP PROCEDURE IF EXISTS p3; +DROP PROCEDURE IF EXISTS p4; +DROP PROCEDURE IF EXISTS p5; +CREATE TABLE t1(a CHAR, b CHAR, c CHAR); +CREATE TABLE t2(a SMALLINT, b SMALLINT, c SMALLINT); + +# Check that SQL-conditions for which SQL-handler has been invoked, +# are cleared from the Diagnostics Area. Note, there might be several +# SQL-conditions, but SQL-handler must be invoked only once. + +CREATE PROCEDURE p1() +BEGIN +DECLARE EXIT HANDLER FOR SQLWARNING +SELECT 'Warning caught' AS msg; +# The INSERT below raises 3 SQL-conditions (warnings). The EXIT HANDLER +# above must be invoked once (for one condition), but all three conditions +# must be cleared from the Diagnostics Area. +INSERT INTO t1 VALUES('qqqq', 'ww', 'eee'); +# The following INSERT will not be executed, because of the EXIT HANDLER. +INSERT INTO t1 VALUES('zzz', 'xx', 'yyyy'); +END| + +CALL p1()| +msg +Warning caught + +SELECT * FROM t1| +a b c +q w e + +# Check that SQL-conditions for which SQL-handler has *not* been +# invoked, are *still* cleared from the Diagnostics Area. + +CREATE PROCEDURE p2() +BEGIN +DECLARE CONTINUE HANDLER FOR 1292 +SELECT 'Warning 1292 caught' AS msg; +# The following INSERT raises 6 SQL-warnings with code 1292, +# and 3 SQL-warnings with code 1264. The CONTINUE HANDLER above must be +# invoked once, and all nine SQL-warnings must be cleared from +# the Diagnostics Area. +INSERT INTO t2 +SELECT +CAST(CONCAT(CAST('1 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), +CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), +CAST(CONCAT(CAST('3 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER); +END| + +CALL p2()| +msg +Warning 1292 caught + +# Check that if there are two equally ranked SQL-handlers to handle +# SQL-conditions from SQL-statement, only one of them will be invoked. + +CREATE PROCEDURE p3() +BEGIN +DECLARE CONTINUE HANDLER FOR 1292 +SELECT 'Warning 1292 caught' AS msg; +DECLARE CONTINUE HANDLER FOR 1264 +SELECT 'Warning 1264 caught' AS msg; +# The following INSERT raises 6 SQL-warnings with code 1292, +# and 3 SQL-warnings with code 1264. Only one of the CONTINUE HANDLERs above +# must be called, and only once. The SQL Standard does not define, which one +# should be invoked. +INSERT INTO t2 +SELECT +CAST(CONCAT(CAST('1 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), +CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), +CAST(CONCAT(CAST('3 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER); +END| + +CALL p3()| +msg +Warning 1264 caught + +# The same as p3, but 1264 comes first. + +CREATE PROCEDURE p4() +BEGIN +DECLARE CONTINUE HANDLER FOR 1292 +SELECT 'Warning 1292 caught' AS msg; +DECLARE CONTINUE HANDLER FOR 1264 +SELECT 'Warning 1264 caught' AS msg; +# The following INSERT raises 4 SQL-warnings with code 1292, +# and 3 SQL-warnings with code 1264. Only one of the CONTINUE HANDLERs above +# must be called, and only once. The SQL Standard does not define, which one +# should be invoked. +INSERT INTO t2 +SELECT +CAST(999999 AS SIGNED INTEGER), +CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), +CAST(CONCAT(CAST('3 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER); +END| + +CALL p4()| +msg +Warning 1264 caught + +# Check that if a SQL-handler raised its own SQL-conditions, there are +# preserved after handler exit. + +CREATE PROCEDURE p5() +BEGIN +DECLARE EXIT HANDLER FOR 1292 +BEGIN +SELECT 'Handler for 1292 (1)' AS Msg; +SIGNAL SQLSTATE '01000' SET MYSQL_ERRNO = 1234; +SHOW WARNINGS; +SELECT 'Handler for 1292 (2)' AS Msg; +END; +INSERT INTO t2 +SELECT +CAST(999999 AS SIGNED INTEGER), +CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), +CAST(CONCAT(CAST('3 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER); +END| + +CALL p5()| +Msg +Handler for 1292 (1) +Level Code Message +Warning 1234 Unhandled user-defined warning condition +Msg +Handler for 1292 (2) +Warnings: +Warning 1234 Unhandled user-defined warning condition + +# Check that SQL-conditions are available inside the handler, but +# cleared after the handler exits. + +CREATE PROCEDURE p6() +BEGIN +DECLARE CONTINUE HANDLER FOR 1292 +BEGIN +SHOW WARNINGS; +SELECT 'Handler for 1292' Msg; +END; +INSERT INTO t2 +SELECT +CAST(CONCAT(CAST('1 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), +CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), +CAST(CONCAT(CAST('3 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER); +END| + +CALL p6()| +Level Code Message +Warning 1292 Truncated incorrect INTEGER value: '1 ' +Warning 1292 Truncated incorrect INTEGER value: '1999999 ' +Warning 1264 Out of range value for column 'a' at row 1 +Warning 1292 Truncated incorrect INTEGER value: '2 ' +Warning 1292 Truncated incorrect INTEGER value: '2999999 ' +Warning 1264 Out of range value for column 'b' at row 1 +Warning 1292 Truncated incorrect INTEGER value: '3 ' +Warning 1292 Truncated incorrect INTEGER value: '3999999 ' +Warning 1264 Out of range value for column 'c' at row 1 +Msg +Handler for 1292 + +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP PROCEDURE p3; +DROP PROCEDURE p4; +DROP PROCEDURE p5; +DROP PROCEDURE p6; +DROP TABLE t1; +DROP TABLE t2; + +# Bug#13059316: ASSERTION FAILURE IN SP_RCONTEXT.CC +# Check DECLARE statements that raise conditions before handlers +# are declared. + +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p2; +CREATE PROCEDURE p1() +BEGIN +DECLARE var1 INTEGER DEFAULT 'string'; +DECLARE EXIT HANDLER FOR SQLWARNING SELECT 'H1'; +END| + +CALL p1()| +Warnings: +Warning 1366 Incorrect integer value: 'string' for column 'var1' at row 1 + +CREATE PROCEDURE p2() +BEGIN +DECLARE EXIT HANDLER FOR SQLWARNING SELECT 'H2'; +CALL p1(); +END| + +CALL p2()| +H2 +H2 + +DROP PROCEDURE p1; +DROP PROCEDURE p2; +# +# Bug#13113222 RQG_SIGNAL_RESIGNAL FAILED WITH ASSERTION. +# +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p2; +CREATE PROCEDURE p1() +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SELECT 'triggered p1'; +# This will trigger an error. +SIGNAL SQLSTATE 'HY000'; +END| +CREATE PROCEDURE p2() +BEGIN +DECLARE CONTINUE HANDLER FOR SQLWARNING SELECT 'triggered p2'; +# This will trigger a warning. +SIGNAL SQLSTATE '01000'; +END| +SET @old_max_error_count= @@session.max_error_count; +SET SESSION max_error_count= 0; +CALL p1(); +triggered p1 +triggered p1 +CALL p2(); +SET SESSION max_error_count= @old_max_error_count; +DROP PROCEDURE p1; +DROP PROCEDURE p2; + +# Bug#12652873: 61392: Continue handler for NOT FOUND being triggered +# from internal stored function. + +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +DROP TABLE IF EXISTS t1; + +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1, 2); + +# f1() raises NOT_FOUND condition. +# Raising NOT_FOUND can not be simulated by SIGNAL, +# because SIGNAL would raise SQL-error in that case. + +CREATE FUNCTION f1() RETURNS INTEGER +BEGIN +DECLARE v VARCHAR(5) DEFAULT -1; +SELECT b FROM t1 WHERE a = 2 INTO v; +RETURN v; +END| + +# Here we check that the NOT_FOUND condition raised in f1() +# is not visible in the outer function (f2), i.e. the continue +# handler in f2() will not be called. + +CREATE FUNCTION f2() RETURNS INTEGER +BEGIN +DECLARE v INTEGER; +DECLARE CONTINUE HANDLER FOR NOT FOUND +SET @msg = 'Handler activated.'; +SELECT f1() INTO v; +RETURN v; +END| +SET @msg = ''; + +SELECT f2(); +f2() +-1 + +SELECT @msg; +@msg + + +DROP FUNCTION f1; +DROP FUNCTION f2; +DROP TABLE t1; diff --git a/mysql-test/r/sp-group.result b/mysql-test/r/sp-group.result index 9744bbee6b6..2e30b697103 100644 --- a/mysql-test/r/sp-group.result +++ b/mysql-test/r/sp-group.result @@ -1,6 +1,6 @@ drop table if exists t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' drop view if exists view_t1; Warnings: Note 1051 Unknown table 'test.view_t1' diff --git a/mysql-test/r/sp-innodb.result b/mysql-test/r/sp-innodb.result index b5fe920c675..b3405705698 100644 --- a/mysql-test/r/sp-innodb.result +++ b/mysql-test/r/sp-innodb.result @@ -85,8 +85,6 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction SELECT f1() AS 'f1():'; f1(): No such table -Warnings: -Error 1146 Table 'test.no_such_table' doesn't exist # Provoke another deadlock, then call the function with # handler indirectly. This case fails without the patch @@ -96,8 +94,6 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction SELECT f2() AS 'f2():'; f2(): No such table -Warnings: -Error 1146 Table 'test.no_such_table' doesn't exist # Provoke yet another deadlock, but now from within a function, # then call the function with handler. This succeeds even @@ -109,8 +105,6 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction SELECT f1() AS 'f1():'; f1(): No such table -Warnings: -Error 1146 Table 'test.no_such_table' doesn't exist # Provoke yet another deadlock, but now from within a function, # calling another function, then call the function with handler. # This succeeds even without the patch because @@ -122,8 +116,6 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction SELECT f1() AS 'f1():'; f1(): No such table -Warnings: -Error 1146 Table 'test.no_such_table' doesn't exist # Disconnect, drop functions and table: DROP FUNCTION f4; diff --git a/mysql-test/r/sp-prelocking.result b/mysql-test/r/sp-prelocking.result index ac48459b0f2..eb47cc21f41 100644 --- a/mysql-test/r/sp-prelocking.result +++ b/mysql-test/r/sp-prelocking.result @@ -22,7 +22,7 @@ call sp1(); my-col 1 Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'mysqltest.t1' select database(); database() mysqltest @@ -34,7 +34,7 @@ call mysqltest.sp1(); my-col 1 Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'mysqltest.t1' select database(); database() test @@ -340,3 +340,26 @@ f1() DROP FUNCTION f1; DROP VIEW v1; DROP TABLE t1,t2; +# +# Bug #16672723 "CAN'T FIND TEMPORARY TABLE". +# +CREATE FUNCTION f1() RETURNS INT RETURN 1; +CREATE TEMPORARY TABLE tmp1(a INT); +PREPARE stmt1 FROM "CREATE TEMPORARY TABLE tmp2 AS SELECT b FROM (SELECT f1() AS b FROM tmp1) AS t"; +# The below statement failed before the fix. +EXECUTE stmt1; +DROP TEMPORARY TABLES tmp1, tmp2; +DEALLOCATE PREPARE stmt1; +DROP FUNCTION f1; +create procedure sp1() +begin +drop table if exists t1, t2; +create temporary table t1 select 1 v; +create table t2 (col varchar(45)) select distinct col from (select sf1() as col from t1) t; +end$$ +create function sf1() returns text return 'blah'; +call test.sp1(); +call test.sp1(); +drop procedure sp1; +drop function sf1; +drop table t2; diff --git a/mysql-test/r/sp-security.result b/mysql-test/r/sp-security.result index 88908b05f46..e8c3fbff0e3 100644 --- a/mysql-test/r/sp-security.result +++ b/mysql-test/r/sp-security.result @@ -617,3 +617,33 @@ SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci # Connection default DROP USER user2@localhost; DROP DATABASE db1; +# +# Test for bug#12602983 - User without privilege on routine can discover +# its existence by executing "select non_existing_func();" or by +# "call non_existing_proc()"; +# +drop database if exists mysqltest_db; +create database mysqltest_db; +create function mysqltest_db.f1() returns int return 0; +create procedure mysqltest_db.p1() begin end; +# Create user with no privileges on mysqltest_db database. +create user bug12602983_user@localhost; +# Connect as user 'bug12602983_user@localhost' +# Attempt to execute routine on which user doesn't have privileges +# should result in the same 'access denied' error whether +# routine exists or not. +select mysqltest_db.f_does_not_exist(); +ERROR 42000: execute command denied to user 'bug12602983_user'@'localhost' for routine 'mysqltest_db.f_does_not_exist' +call mysqltest_db.p_does_not_exist(); +ERROR 42000: execute command denied to user 'bug12602983_user'@'localhost' for routine 'mysqltest_db.p_does_not_exist' +select mysqltest_db.f1(); +ERROR 42000: execute command denied to user 'bug12602983_user'@'localhost' for routine 'mysqltest_db.f1' +call mysqltest_db.p1(); +ERROR 42000: execute command denied to user 'bug12602983_user'@'localhost' for routine 'mysqltest_db.p1' +create view bug12602983_v1 as select mysqltest_db.f_does_not_exist(); +ERROR 42000: execute command denied to user 'bug12602983_user'@'localhost' for routine 'mysqltest_db.f_does_not_exist' +create view bug12602983_v1 as select mysqltest_db.f1(); +ERROR 42000: execute command denied to user 'bug12602983_user'@'localhost' for routine 'mysqltest_db.f1' +# Connection 'default'. +drop user bug12602983_user@localhost; +drop database mysqltest_db; diff --git a/mysql-test/r/sp-vars.result b/mysql-test/r/sp-vars.result index a465a29ee4f..0a7ea0d68c5 100644 --- a/mysql-test/r/sp-vars.result +++ b/mysql-test/r/sp-vars.result @@ -400,7 +400,7 @@ Warnings: Note 1305 PROCEDURE test.p2 does not exist DROP TABLE IF EXISTS t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE t1(log_msg VARCHAR(1024)); CREATE PROCEDURE p1(arg VARCHAR(255)) BEGIN diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 823c6f78cee..2cb1b701e2d 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -737,8 +737,6 @@ close c; end| insert into t2 values ("foo", 42, -1.9), ("bar", 3, 12.1), ("zap", 666, -3.14)| call cur1()| -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed select * from t1| id data foo 40 @@ -774,8 +772,6 @@ close c1; close c2; end| call cur2()| -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed select * from t3 order by i,s| s i bar 3 @@ -865,8 +861,6 @@ end$ set @@sql_mode = ''| set sql_select_limit = 1| call modes(@c1, @c2)| -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed set sql_select_limit = default| select @c1, @c2| @c1 @c2 @@ -1688,64 +1682,42 @@ end| call h_ee()| h_ee Inner (good) -Warnings: -Error 1062 Duplicate entry '1' for key 'PRIMARY' call h_es()| h_es -Outer (good) -Warnings: -Error 1062 Duplicate entry '1' for key 'PRIMARY' +Inner (bad) call h_en()| h_en -Outer (good) -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed +Inner (bad) call h_ew()| h_ew -Outer (good) +Inner (bad) call h_ex()| h_ex -Outer (good) -Warnings: -Error 1062 Duplicate entry '1' for key 'PRIMARY' +Inner (bad) call h_se()| h_se Inner (good) -Warnings: -Error 1062 Duplicate entry '1' for key 'PRIMARY' call h_ss()| h_ss Inner (good) -Warnings: -Error 1062 Duplicate entry '1' for key 'PRIMARY' call h_sn()| h_sn -Outer (good) -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed +Inner (bad) call h_sw()| h_sw -Outer (good) +Inner (bad) call h_sx()| h_sx -Outer (good) -Warnings: -Error 1062 Duplicate entry '1' for key 'PRIMARY' +Inner (bad) call h_ne()| h_ne Inner (good) -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed call h_ns()| h_ns Inner (good) -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed call h_nn()| h_nn Inner (good) -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed call h_we()| h_we Inner (good) @@ -1758,18 +1730,12 @@ Inner (good) call h_xe()| h_xe Inner (good) -Warnings: -Error 1062 Duplicate entry '1' for key 'PRIMARY' call h_xs()| h_xs Inner (good) -Warnings: -Error 1062 Duplicate entry '1' for key 'PRIMARY' call h_xx()| h_xx Inner (good) -Warnings: -Error 1062 Duplicate entry '1' for key 'PRIMARY' drop table t3| drop procedure h_ee| drop procedure h_es| @@ -1918,8 +1884,6 @@ set @x2 = 2; close c1; end| call bug2260()| -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed select @x2| @x2 2 @@ -2063,8 +2027,6 @@ insert into t3 values (123456789012); insert into t3 values (0); end| call bug2780()| -Warnings: -Warning 1264 Out of range value for column 's1' at row 1 select @x| @x 1 @@ -2487,8 +2449,6 @@ declare continue handler for sqlstate 'HY000' begin end; select s1 from t3 union select s2 from t3; end| call bug4904()| -Warnings: -Error 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin2_general_ci,IMPLICIT) for operation 'UNION' drop procedure bug4904| drop table t3| drop procedure if exists bug336| @@ -2628,17 +2588,13 @@ select row_count()| row_count() 1 call bug4905()| -Warnings: -Error 1062 Duplicate entry '1' for key 'PRIMARY' select row_count()| row_count() --1 +0 call bug4905()| -Warnings: -Error 1062 Duplicate entry '1' for key 'PRIMARY' select row_count()| row_count() --1 +0 select * from t3| s1 1 @@ -2659,14 +2615,10 @@ insert into t3 values (1)| call bug6029()| sqlstate 23000 sqlstate 23000 -Warnings: -Error 1062 Duplicate entry '1' for key 'PRIMARY' delete from t3| call bug6029()| 1136 1136 -Warnings: -Error 1136 Column count doesn't match value count at row 1 drop procedure bug6029| drop table t3| drop procedure if exists bug8540| @@ -2961,23 +2913,15 @@ end| call bug6900()| 2 2 -Warnings: -Error 1136 Column count doesn't match value count at row 1 call bug9074()| x1 x2 x3 x4 x5 x6 1 1 1 1 1 1 -Warnings: -Error 1062 Duplicate entry 'a' for key 'w' call bug6900_9074(0)| sqlexception sqlexception -Warnings: -Error 1136 Column count doesn't match value count at row 1 call bug6900_9074(1)| -23000 -23000 -Warnings: -Error 1062 Duplicate entry 'a' for key 'w' +sqlexception +sqlexception drop procedure bug6900| drop procedure bug9074| drop procedure bug6900_9074| @@ -3020,13 +2964,9 @@ delete from t1| call bug9856()| 16 16 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed call bug9856()| 16 16 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed drop procedure bug9856| drop procedure if exists bug9674_1| drop procedure if exists bug9674_2| @@ -3256,8 +3196,6 @@ x 2 x 3 -Warnings: -Error 1326 Cursor is not open call bug10961()| x 1 @@ -3265,8 +3203,6 @@ x 2 x 3 -Warnings: -Error 1326 Cursor is not open drop procedure bug10961| DROP PROCEDURE IF EXISTS bug6866| DROP VIEW IF EXISTS tv| @@ -3274,9 +3210,9 @@ Warnings: Note 1051 Unknown table 'test.tv' DROP TABLE IF EXISTS tt1,tt2,tt3| Warnings: -Note 1051 Unknown table 'tt1' -Note 1051 Unknown table 'tt2' -Note 1051 Unknown table 'tt3' +Note 1051 Unknown table 'test.tt1' +Note 1051 Unknown table 'test.tt2' +Note 1051 Unknown table 'test.tt3' CREATE TABLE tt1 (a1 int, a2 int, a3 int, data varchar(10))| CREATE TABLE tt2 (a2 int, data2 varchar(10))| CREATE TABLE tt3 (a3 int, data3 varchar(10))| @@ -3382,11 +3318,7 @@ insert into t1 values ('Name4', 13), ('Name5', 14)| call bug11529()| -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed call bug11529()| -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed delete from t1| drop procedure bug11529| set character set utf8| @@ -3560,32 +3492,24 @@ end; end if; end| call bug12168('a')| -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed select * from t4| a 1 3 truncate t4| call bug12168('b')| -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed select * from t4| a 2 4 truncate t4| call bug12168('a')| -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed select * from t4| a 1 3 truncate t4| call bug12168('b')| -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed select * from t4| a 2 @@ -3885,8 +3809,6 @@ end| call bug7049_2()| Result Caught it -Warnings: -Error 1062 Duplicate entry '42' for key 'x' select * from t3| x 42 @@ -3894,16 +3816,12 @@ delete from t3| call bug7049_4()| Result Caught it -Warnings: -Error 1062 Duplicate entry '42' for key 'x' select * from t3| x 42 select bug7049_2()| bug7049_2() 1 -Warnings: -Error 1062 Duplicate entry '42' for key 'x' drop table t3| drop procedure bug7049_1| drop procedure bug7049_2| @@ -4031,8 +3949,6 @@ end| call bug14845()| a 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed drop procedure bug14845| drop procedure if exists bug13549_1| drop procedure if exists bug13549_2| @@ -4236,8 +4152,6 @@ end| call bug13729()| 55 55 -Warnings: -Error 1062 Duplicate entry '1' for key 'PRIMARY' select * from t3| s1 1 @@ -4274,15 +4188,11 @@ Handler boo v isnull(v) NULL 1 -Warnings: -Error 1054 Unknown column 'undefined_var' in 'field list' call bug14643_2()| Handler boo Handler boo -Warnings: -Error 1054 Unknown column 'undefined_var' in 'field list' drop procedure bug14643_1| drop procedure bug14643_2| drop procedure if exists bug14304| @@ -4606,15 +4516,11 @@ Handler error End done -Warnings: -Error 1054 Unknown column 'v' in 'field list' call bug14498_2()| Handler error End done -Warnings: -Error 1054 Unknown column 'v' in 'field list' call bug14498_3()| v maybe @@ -4622,22 +4528,16 @@ Handler error End done -Warnings: -Error 1054 Unknown column 'v' in 'field list' call bug14498_4()| Handler error End done -Warnings: -Error 1054 Unknown column 'v' in 'field list' call bug14498_5()| Handler error End done -Warnings: -Error 1054 Unknown column 'v' in 'field list' drop procedure bug14498_1| drop procedure bug14498_2| drop procedure bug14498_3| @@ -4702,8 +4602,6 @@ Before NOT FOUND condition is triggered After NOT FOUND condtition is triggered xid xdone 1 1 -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed call bug15231_3()| Result Missed it (correct) @@ -4711,8 +4609,6 @@ Level Code Message Warning 1366 Incorrect decimal value: 'zap' for column 'x' at row 1 Result Caught it (correct) -Warnings: -Warning 1366 Incorrect decimal value: 'zap' for column 'x' at row 1 call bug15231_5()| Result Missed it (correct) @@ -4741,8 +4637,6 @@ end| call bug15011()| Handler Inner -Warnings: -Error 1062 Duplicate entry '1' for key 'PRIMARY' drop procedure bug15011| drop table t3| drop procedure if exists bug17476| @@ -4818,8 +4712,6 @@ i 1 i 0 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed drop table t3| drop procedure bug16887| drop procedure if exists bug16474_1| @@ -4892,8 +4784,6 @@ declare continue handler for sqlexception begin end; select no_such_function(); end| call bug18787()| -Warnings: -Error 1305 FUNCTION test.no_such_function does not exist drop procedure bug18787| create database bug18344_012345678901| use bug18344_012345678901| @@ -5267,8 +5157,6 @@ statement failed statement failed statement after update statement after update -Warnings: -Error 1242 Subquery returns more than 1 row select * from t3| a 1 @@ -5280,8 +5168,6 @@ statement failed statement failed statement after update statement after update -Warnings: -Error 1242 Subquery returns more than 1 row select * from t3| a 1 @@ -5314,8 +5200,6 @@ in continue handler in continue handler reachable code a2 reachable code a2 -Warnings: -Error 1242 Subquery returns more than 1 row select * from t3| a 1 @@ -5331,8 +5215,6 @@ in continue handler in continue handler reachable code a2 reachable code a2 -Warnings: -Error 1242 Subquery returns more than 1 row select * from t3| a 1 @@ -5366,8 +5248,6 @@ in continue handler in continue handler reachable code a2 reachable code a2 -Warnings: -Error 1305 FUNCTION test.no_such_function does not exist drop procedure bug8153_proc_a| drop procedure bug8153_proc_b| drop table t3| @@ -5408,11 +5288,11 @@ use test| drop table t3| DROP PROCEDURE IF EXISTS bug16899_p1| DROP FUNCTION IF EXISTS bug16899_f1| -CREATE DEFINER=1234567890abcdefGHIKL@localhost PROCEDURE bug16899_p1() +CREATE DEFINER=longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost PROCEDURE bug16899_p1() BEGIN SET @a = 1; END| -ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY FUNCTION bug16899_f1() RETURNS INT BEGIN @@ -5547,13 +5427,9 @@ end| select func_20028_a()| func_20028_a() 0 -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed select func_20028_b()| func_20028_b() 0 -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed select func_20028_c()| ERROR 22012: Division by 0 call proc_20028_a()| @@ -5606,13 +5482,9 @@ end| select func_20028_a()| func_20028_a() 0 -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed select func_20028_b()| func_20028_b() 0 -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed select func_20028_c()| func_20028_c() NULL @@ -5936,13 +5808,9 @@ end| select func_8407_a()| func_8407_a() NULL -Warnings: -Error 1146 Table 'test.no_such_view' doesn't exist select func_8407_b()| func_8407_b() 1500 -Warnings: -Error 1146 Table 'test.no_such_view' doesn't exist drop function func_8407_a| drop function func_8407_b| drop table if exists table_26503| @@ -6064,8 +5932,6 @@ looping i looping 0 leaving handler leaving handler -Warnings: -Error 1062 Duplicate entry '1' for key 'a' call proc_26503_ok_2(2)| do something do something @@ -6077,8 +5943,6 @@ looping i looping 4 leaving handler leaving handler -Warnings: -Error 1062 Duplicate entry '2' for key 'a' call proc_26503_ok_3(3)| do something do something @@ -6098,8 +5962,6 @@ looping i looping 0 leaving handler leaving handler -Warnings: -Error 1062 Duplicate entry '3' for key 'a' call proc_26503_ok_4(4)| do something do something @@ -6111,8 +5973,6 @@ looping i looping 4 leaving handler leaving handler -Warnings: -Error 1062 Duplicate entry '4' for key 'a' drop table table_26503| drop procedure proc_26503_ok_1| drop procedure proc_26503_ok_2| @@ -6244,8 +6104,6 @@ END| SELECT bug5274_f2()| bug5274_f2() x -Warnings: -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 DROP FUNCTION bug5274_f1| DROP FUNCTION bug5274_f2| drop procedure if exists proc_21513| @@ -6338,19 +6196,13 @@ c1 SELECT f1(2); f1(2) 0 -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed PREPARE s1 FROM 'SELECT f1(2)'; EXECUTE s1; f1(2) 0 -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed EXECUTE s1; f1(2) 0 -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed DROP PROCEDURE p1; DROP PROCEDURE p2; DROP FUNCTION f1; @@ -6403,14 +6255,14 @@ select 1; /*! select 2; */ select 3; /*!00000 select 4; */ -/*!99999 select 5; */ +/*!999999 select 5; */ end $$ create procedure proc_25411_b( /* real comment */ /*! p1 int, */ /*!00000 p2 int */ -/*!99999 ,p3 int */ +/*!999999 ,p3 int */ ) begin select p1, p2; @@ -6418,11 +6270,11 @@ end $$ create procedure proc_25411_c() begin -select 1/*!,2*//*!00000,3*//*!99999,4*/; -select 1/*! ,2*//*!00000 ,3*//*!99999 ,4*/; -select 1/*!,2 *//*!00000,3 *//*!99999,4 */; -select 1/*! ,2 *//*!00000 ,3 *//*!99999 ,4 */; -select 1 /*!,2*/ /*!00000,3*/ /*!99999,4*/ ; +select 1/*!,2*//*!00000,3*//*!999999,4*/; +select 1/*! ,2*//*!00000 ,3*//*!999999 ,4*/; +select 1/*!,2 *//*!00000,3 *//*!999999,4 */; +select 1/*! ,2 *//*!00000 ,3 *//*!999999 ,4 */; +select 1 /*!,2*/ /*!00000,3*/ /*!999999,4*/ ; end $$ show create procedure proc_25411_a; @@ -6826,8 +6678,6 @@ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET @exception:= 'run'; SELECT x FROM t1; END| CALL bug29770(); -Warnings: -Error 1054 Unknown column 'x' in 'field list' SELECT @state, @exception; @state @exception run NULL @@ -6866,8 +6716,6 @@ end; end while; end// call proc_33618(20); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed drop table t_33618; drop procedure proc_33618; # @@ -7803,9 +7651,6 @@ END $ SELECT f1(); f1() 1 -Warnings: -Error 1424 Recursive stored functions and triggers are not allowed. -Error 1305 FUNCTION test.f1 does not exist DROP FUNCTION f1; # ------------------------------------------------------------------ # -- End of 5.1 tests @@ -7868,6 +7713,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -7879,6 +7725,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 4097 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -7943,8 +7790,6 @@ message You should see this message and the warning that generated this Level Code Message Warning 1329 No data - zero rows fetched, selected, or processed -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed drop procedure p1; drop procedure p0; drop table t1; @@ -8012,8 +7857,6 @@ v1 5 v1 6 -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed DROP PROCEDURE p1; DROP TABLE t1; # @@ -8056,3 +7899,94 @@ where 1=1; drop function if exists f1; drop table t1,t2; # End of 5.5 test +# +# MDEV-7040: Crash in field_conv, memcpy_field_possible, part#2 +# +create table t1 ( +col1 bigint(20), +col2 char(1), +col3 char(2) +); +insert into t1 values (1,'a','a'), (2,'b','b'); +create table t2 as select * from t1; +create table t3 as select * from t1; +create table t4 as select * from t1; +create table t5 as select * from t1; +create table t6 as select * from t1; +flush tables; +CREATE PROCEDURE p1() +begin +DECLARE _var1 bigint(20) UNSIGNED; +DECLARE _var2 CHAR(1) DEFAULT NULL; +DECLARE _var3 CHAR(1) DEFAULT NULL; +DECLARE _done BOOLEAN DEFAULT 0; +declare cur1 cursor for +select col1, col2, col3 +from t1 +where +col1 in (select t2.col1 from t2 where t2.col2=t1.col2) or +col2 in (select t3.col3 from t3 where t3.col3=t1.col2) ; +DECLARE CONTINUE HANDLER FOR NOT FOUND SET _done = 1; +OPEN cur1; +set _var1 = (select _var1 from t4 limit 1); +set _var1 = (select _var1 from t5 limit 1); +set _var1 = (select _var1 from t6 limit 1); +label1: +LOOP +SET _done = 0; +FETCH cur1 INTO _var1, _var2, _var3; +IF _done THEN +LEAVE label1; +END IF; +END LOOP label1; +CLOSE cur1; +end| +set @tmp_toc= @@table_open_cache; +set @tmp_tdc= @@table_definition_cache; +set global table_open_cache=1; +set global table_definition_cache=1; +Warnings: +Warning 1292 Truncated incorrect table_definition_cache value: '1' +call p1(); +set global table_open_cache= @tmp_toc; +set global table_definition_cache= @tmp_tdc; +drop procedure p1; +drop table t1,t2,t3,t4,t5,t6; +# +# MDEV-11935: Queries in stored procedures with and +# EXISTS(SELECT * FROM VIEW) crashes and closes hte conneciton. +# +CREATE TABLE ANY_TABLE ( +ENTITY_UID BIGINT NOT NULL +); +CREATE TABLE SECURITY_PATH( +origid BIGINT UNSIGNED NOT NULL, +destid BIGINT UNSIGNED NOT NULL, +KEY (destid) +); +CREATE VIEW ENTITY_ACCESS ( +ENTITY_UID, +OWNER_UID +) AS +SELECT SP1.origid, +SP2.destid +FROM SECURITY_PATH SP1 +JOIN SECURITY_PATH SP2 ON SP1.destid = SP2.origid +; +CREATE PROCEDURE SP_EXAMPLE_SELECT () +BEGIN +SELECT * +FROM ANY_TABLE AT1 +WHERE EXISTS ( SELECT * +FROM ENTITY_ACCESS EA +WHERE AT1.ENTITY_UID = EA.ENTITY_UID +AND EA.OWNER_UID IS NULL ); +END +// +CALL SP_EXAMPLE_SELECT (); +ENTITY_UID +CALL SP_EXAMPLE_SELECT (); +ENTITY_UID +drop procedure SP_EXAMPLE_SELECT; +drop view ENTITY_ACCESS; +drop table ANY_TABLE, SECURITY_PATH; diff --git a/mysql-test/r/sp_notembedded.result b/mysql-test/r/sp_notembedded.result index 540a66e7508..3cc4ff4238b 100644 --- a/mysql-test/r/sp_notembedded.result +++ b/mysql-test/r/sp_notembedded.result @@ -9,11 +9,11 @@ end| call bug4902()| Grants for root@localhost GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION +GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION call bug4902()| Grants for root@localhost GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION +GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION drop procedure bug4902| drop procedure if exists bug4902_2| create procedure bug4902_2() @@ -32,9 +32,9 @@ drop procedure bug4902_2| drop procedure if exists bug6807| create procedure bug6807() begin -declare id int; -set id = connection_id(); -kill query id; +declare a int; +set a = connection_id(); +kill query a; select 'Not reached'; end| call bug6807()| @@ -156,11 +156,11 @@ create procedure 15298_2 () sql security definer show grants; call 15298_1(); Grants for root@localhost GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION +GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION call 15298_2(); Grants for root@localhost GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION +GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION drop user mysqltest_1@localhost; drop procedure 15298_1; drop procedure 15298_2; @@ -169,7 +169,7 @@ drop procedure if exists p1; create table t1 (value varchar(15)); create procedure p1() update t1 set value='updated' where value='old'; call p1(); -insert into t1 (value) values ("old"); +insert into t1 (value) values ("old"),("irrelevant"); select get_lock('b26162',120); get_lock('b26162',120) 1 @@ -179,11 +179,13 @@ call p1();; select 'rl_contender', value from t1; rl_contender value rl_contender old +rl_contender irrelevant select release_lock('b26162'); release_lock('b26162') 1 rl_acquirer value rl_acquirer old +rl_acquirer irrelevant drop procedure p1; drop table t1; set session low_priority_updates=default; @@ -282,4 +284,23 @@ DROP EVENT teste_bug11763507; # ------------------------------------------------------------------ # -- End of 5.1 tests # ------------------------------------------------------------------ +grant create routine on test.* to foo1@localhost identified by 'foo'; +update mysql.user set password = replace(password, '*', '-') where user='foo1'; +show grants; +Grants for foo1@localhost +GRANT USAGE ON *.* TO 'foo1'@'localhost' IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' +GRANT CREATE ROUTINE ON `test`.* TO 'foo1'@'localhost' +flush privileges; +show grants; +Grants for foo1@localhost +GRANT USAGE ON *.* TO 'foo1'@'localhost' IDENTIFIED BY PASSWORD '-F3A2A51A9B0F2BE2468926B4132313728C250DBF' +GRANT CREATE ROUTINE ON `test`.* TO 'foo1'@'localhost' +create procedure spfoo() select 1; +show grants; +Grants for foo1@localhost +GRANT USAGE ON *.* TO 'foo1'@'localhost' IDENTIFIED BY PASSWORD '-F3A2A51A9B0F2BE2468926B4132313728C250DBF' +GRANT CREATE ROUTINE ON `test`.* TO 'foo1'@'localhost' +GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`spfoo` TO 'foo1'@'localhost' +drop procedure spfoo; +drop user foo1@localhost; set @@global.concurrent_insert= @old_concurrent_insert; diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result index b91dc898f12..5526fc19aae 100644 --- a/mysql-test/r/sp_trans.result +++ b/mysql-test/r/sp_trans.result @@ -99,8 +99,6 @@ return i; end| set @error_in_func:= 0| insert into t1 values (bug10015_6(5)), (bug10015_6(6))| -Warnings: -Error 1062 Duplicate entry '1' for key 'PRIMARY' select @error_in_func| @error_in_func 1 @@ -526,8 +524,6 @@ until done end repeat; close c; end| call bug14210()| -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed select count(*) from t4| count(*) 256 diff --git a/mysql-test/r/sp_trans_log.result b/mysql-test/r/sp_trans_log.result index e3463dec571..b72e8332fad 100644 --- a/mysql-test/r/sp_trans_log.result +++ b/mysql-test/r/sp_trans_log.result @@ -11,16 +11,16 @@ insert into t1 values (null); select count(*) from t1 into @a; return @a; end| -reset master| -insert into t2 values (bug23333(),1)| +reset master; +insert into t2 values (bug23333(),1); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -show binlog events from <binlog_start> limit 0, 4| +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -select count(*),@a from t1 /* must be 1,1 */| +select count(*),@a from t1 /* must be 1,1 */; count(*) @a 1 1 drop table t1,t2; diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result index 6736ca7f541..4fdac6b9cea 100644 --- a/mysql-test/r/sql_mode.result +++ b/mysql-test/r/sql_mode.result @@ -71,7 +71,7 @@ t1 CREATE TABLE `t1` ( `email` varchar(60) NOT NULL DEFAULT '', PRIMARY KEY (`a`), UNIQUE KEY `email` (`email`) -) TYPE=HEAP ROW_FORMAT=DYNAMIC +) TYPE=MEMORY ROW_FORMAT=DYNAMIC set sql_mode="postgresql,oracle,mssql,db2,maxdb"; select @@sql_mode; @@sql_mode diff --git a/mysql-test/r/ssl-crl-revoked-crl.result b/mysql-test/r/ssl-crl-revoked-crl.result new file mode 100644 index 00000000000..8ecc6a509d3 --- /dev/null +++ b/mysql-test/r/ssl-crl-revoked-crl.result @@ -0,0 +1 @@ +# try logging in with a certificate in the server's --ssl-crl : should fail diff --git a/mysql-test/r/ssl.result b/mysql-test/r/ssl.result index 53fbb1988e7..4bae442459a 100644 --- a/mysql-test/r/ssl.result +++ b/mysql-test/r/ssl.result @@ -1,6 +1,12 @@ -SHOW STATUS LIKE 'Ssl_cipher'; +SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'; +have_ssl +1 +SHOW STATUS LIKE 'Ssl_server_not_before'; +Variable_name Value +Ssl_server_not_before Apr 25 14:55:05 2015 GMT +SHOW STATUS LIKE 'Ssl_server_not_after'; Variable_name Value -Ssl_cipher DHE-RSA-AES256-SHA +Ssl_server_not_after Apr 20 14:55:05 2035 GMT drop table if exists t1,t2,t3,t4; CREATE TABLE t1 ( Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, @@ -511,7 +517,7 @@ insert into tmp select * from t3; insert into t3 select * from tmp; alter table t3 add t2nr int not null auto_increment primary key first; drop table tmp; -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10; namn Abraham Abraham @@ -524,7 +530,7 @@ ammonium ammonium analyzable analyzable animals animals animized animized -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10; concat(fld3," ",fld3) Abraham Abraham @@ -561,7 +567,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10; fld3 count(*) affixed 1 @@ -574,7 +580,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10; fld3 repeat("a",length(fld3)) count(*) circus aaaaaa 1 @@ -2157,6 +2163,12 @@ Privat (Private Nutzung) Mobilfunk Warnings: Warning 1052 Column 'kundentyp' in group statement is ambiguous drop table t1; -SHOW STATUS LIKE 'Ssl_cipher'; -Variable_name Value -Ssl_cipher DHE-RSA-AES256-SHA +SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'; +have_ssl +1 +select aes_decrypt('MySQL','adf'); +aes_decrypt('MySQL','adf') +NULL +select 'still connected?'; +still connected? +still connected? diff --git a/mysql-test/r/ssl_ca.result b/mysql-test/r/ssl_ca.result index ffc5671f85f..83a98902581 100644 --- a/mysql-test/r/ssl_ca.result +++ b/mysql-test/r/ssl_ca.result @@ -4,21 +4,21 @@ # try to connect with wrong '--ssl-ca' path : should fail ERROR 2026 (HY000): SSL connection error: SSL_CTX_set_default_verify_paths failed # try to connect with correct '--ssl-ca' path : should connect -Variable_name Value -Ssl_cipher DHE-RSA-AES256-SHA +have_ssl +1 # # Bug#21920678: SSL-CA DOES NOT ACCEPT ~USER TILDE HOME DIRECTORY # PATH SUBSTITUTION # # try to connect with '--ssl-ca' option using tilde home directoy # path substitution : should connect -Variable_name Value -Ssl_cipher DHE-RSA-AES256-SHA +have_ssl +1 # try to connect with '--ssl-key' option using tilde home directoy # path substitution : should connect -Variable_name Value -Ssl_cipher DHE-RSA-AES256-SHA +have_ssl +1 # try to connect with '--ssl-cert' option using tilde home directoy # path substitution : should connect -Variable_name Value -Ssl_cipher DHE-RSA-AES256-SHA +have_ssl +1 diff --git a/mysql-test/r/ssl_compress.result b/mysql-test/r/ssl_compress.result index e7ae7885059..d6a65c2b06d 100644 --- a/mysql-test/r/ssl_compress.result +++ b/mysql-test/r/ssl_compress.result @@ -1,6 +1,6 @@ -SHOW STATUS LIKE 'Ssl_cipher'; -Variable_name Value -Ssl_cipher DHE-RSA-AES256-SHA +SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'; +have_ssl +1 SHOW STATUS LIKE 'Compression'; Variable_name Value Compression ON @@ -514,7 +514,7 @@ insert into tmp select * from t3; insert into t3 select * from tmp; alter table t3 add t2nr int not null auto_increment primary key first; drop table tmp; -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10; namn Abraham Abraham @@ -527,7 +527,7 @@ ammonium ammonium analyzable analyzable animals animals animized animized -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10; concat(fld3," ",fld3) Abraham Abraham @@ -564,7 +564,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10; fld3 count(*) affixed 1 @@ -577,7 +577,7 @@ attendants 1 bedlam 1 bedpost 1 boasted 1 -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10; fld3 repeat("a",length(fld3)) count(*) circus aaaaaa 1 @@ -2160,9 +2160,9 @@ Privat (Private Nutzung) Mobilfunk Warnings: Warning 1052 Column 'kundentyp' in group statement is ambiguous drop table t1; -SHOW STATUS LIKE 'Ssl_cipher'; -Variable_name Value -Ssl_cipher DHE-RSA-AES256-SHA +SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'; +have_ssl +1 SHOW STATUS LIKE 'Compression'; Variable_name Value Compression ON diff --git a/mysql-test/r/ssl_crl.result b/mysql-test/r/ssl_crl.result new file mode 100644 index 00000000000..570dd9cab06 --- /dev/null +++ b/mysql-test/r/ssl_crl.result @@ -0,0 +1,23 @@ +# test --crl for the client : should connect +Variable_name Value +have_openssl YES +have_ssl YES +ssl_ca MYSQL_TEST_DIR/std_data/crl-ca-cert.pem +ssl_capath +ssl_cert MYSQL_TEST_DIR/std_data/crl-server-cert.pem +ssl_cipher +ssl_crl MYSQL_TEST_DIR/std_data/crl-client-revoked.crl +ssl_crlpath +ssl_key MYSQL_TEST_DIR/std_data/crl-server-key.pem +# test --crlpath for the client : should connect +Variable_name Value +have_openssl YES +have_ssl YES +ssl_ca MYSQL_TEST_DIR/std_data/crl-ca-cert.pem +ssl_capath +ssl_cert MYSQL_TEST_DIR/std_data/crl-server-cert.pem +ssl_cipher +ssl_crl MYSQL_TEST_DIR/std_data/crl-client-revoked.crl +ssl_crlpath +ssl_key MYSQL_TEST_DIR/std_data/crl-server-key.pem +# try logging in with a certificate in the server's --ssl-crl : should fail diff --git a/mysql-test/r/ssl_crl_clients-valid.result b/mysql-test/r/ssl_crl_clients-valid.result new file mode 100644 index 00000000000..f3f47d51846 --- /dev/null +++ b/mysql-test/r/ssl_crl_clients-valid.result @@ -0,0 +1,24 @@ +# Test clients with and without CRL lists +############ Test mysql ############## +# Test mysql connecting to a server with an empty crl +Variable_name Value +have_openssl YES +have_ssl YES +ssl_ca MYSQL_TEST_DIR/std_data/crl-ca-cert.pem +ssl_capath +ssl_cert MYSQL_TEST_DIR/std_data/crl-client-cert.pem +ssl_cipher +ssl_crl +ssl_crlpath +ssl_key MYSQL_TEST_DIR/std_data/crl-client-key.pem +# Test mysql connecting to a server with a certificate revoked by -crl +# Test mysql connecting to a server with a certificate revoked by -crlpath +############ Test mysqladmin ############## +# Test mysqladmin connecting to a server with an empty crl +mysqld is alive +# Test mysqladmin connecting to a server with a certificate revoked by -crl +mysqladmin: connect to server at 'localhost' failed +error: 'SSL connection error: Failed to set ciphers to use' +# Test mysqladmin connecting to a server with a certificate revoked by -crlpath +mysqladmin: connect to server at 'localhost' failed +error: 'SSL connection error: error:00000005:lib(0):func(0):DH lib' diff --git a/mysql-test/r/ssl_crl_clients.result b/mysql-test/r/ssl_crl_clients.result new file mode 100644 index 00000000000..3bb9b4ee7e2 --- /dev/null +++ b/mysql-test/r/ssl_crl_clients.result @@ -0,0 +1,7 @@ +# Test clients with and without CRL lists +############ Test mysql ############## +# Test mysql connecting to a server with a certificate revoked by -crl +# Test mysql connecting to a server with a certificate revoked by -crlpath +############ Test mysqladmin ############## +# Test mysqladmin connecting to a server with a certificate revoked by -crl +# Test mysqladmin connecting to a server with a certificate revoked by -crlpath diff --git a/mysql-test/r/ssl_crl_clients_valid.result b/mysql-test/r/ssl_crl_clients_valid.result new file mode 100644 index 00000000000..32ee72d5c39 --- /dev/null +++ b/mysql-test/r/ssl_crl_clients_valid.result @@ -0,0 +1,16 @@ +# Test clients with and without CRL lists +############ Test mysql ############## +# Test mysql connecting to a server with an empty crl +Variable_name Value +have_openssl YES +have_ssl YES +ssl_ca MYSQL_TEST_DIR/std_data/crl-ca-cert.pem +ssl_capath +ssl_cert MYSQL_TEST_DIR/std_data/crl-client-valid-cert.pem +ssl_cipher +ssl_crl MYSQL_TEST_DIR/std_data/crl-client-revoked.crl +ssl_crlpath +ssl_key MYSQL_TEST_DIR/std_data/crl-client-valid-key.pem +############ Test mysqladmin ############## +# Test mysqladmin connecting to a server with an empty crl +mysqld is alive diff --git a/mysql-test/r/ssl_crl_clrpath.result b/mysql-test/r/ssl_crl_clrpath.result new file mode 100644 index 00000000000..b4b4d13eca1 --- /dev/null +++ b/mysql-test/r/ssl_crl_clrpath.result @@ -0,0 +1,23 @@ +# test --crl for the client : should connect +Variable_name Value +have_openssl YES +have_ssl YES +ssl_ca MYSQL_TEST_DIR/std_data/crl-ca-cert.pem +ssl_capath +ssl_cert MYSQL_TEST_DIR/std_data/crl-server-cert.pem +ssl_cipher +ssl_crl +ssl_crlpath MYSQL_TEST_DIR/std_data/crldir +ssl_key MYSQL_TEST_DIR/std_data/crl-server-key.pem +# test --crlpath for the client : should connect +Variable_name Value +have_openssl YES +have_ssl YES +ssl_ca MYSQL_TEST_DIR/std_data/crl-ca-cert.pem +ssl_capath +ssl_cert MYSQL_TEST_DIR/std_data/crl-server-cert.pem +ssl_cipher +ssl_crl +ssl_crlpath MYSQL_TEST_DIR/std_data/crldir +ssl_key MYSQL_TEST_DIR/std_data/crl-server-key.pem +# try logging in with a certificate in the server's --ssl-crlpath : should fail diff --git a/mysql-test/r/ssl_timeout.result b/mysql-test/r/ssl_timeout.result new file mode 100644 index 00000000000..d9ef0f7a16f --- /dev/null +++ b/mysql-test/r/ssl_timeout.result @@ -0,0 +1,7 @@ +# connect with read timeout so SLEEP() should timeout +# Check ssl turned on +SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'; +have_ssl +1 +SELECT SLEEP(600); +ERROR HY000: Lost connection to MySQL server during query diff --git a/mysql-test/r/stack-crash.result b/mysql-test/r/stack-crash.result index d0a25837675..be5b6464b9a 100644 --- a/mysql-test/r/stack-crash.result +++ b/mysql-test/r/stack-crash.result @@ -1,7 +1,7 @@ drop table if exists t1,t2; Warnings: -Note 1051 Unknown table 't1' -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t1' +Note 1051 Unknown table 'test.t2' CREATE TABLE t1 ( `sspo_id` int(11) NOT NULL AUTO_INCREMENT, `sspo_uid` int(11) NOT NULL DEFAULT '0', diff --git a/mysql-test/r/stat_tables-enospc.result b/mysql-test/r/stat_tables-enospc.result new file mode 100644 index 00000000000..f0d76f04eee --- /dev/null +++ b/mysql-test/r/stat_tables-enospc.result @@ -0,0 +1,10 @@ +call mtr.add_suppression("No space left on device"); +create table t1 (a varchar(255), b varchar(255), c varchar(255)); +set use_stat_tables=PREFERABLY, optimizer_use_condition_selectivity=3; +set debug_dbug='+d,simulate_file_write_error'; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze Error Error writing file 'tmp-file' (Errcode: 28 "No space left on device") +test.t1 analyze status Operation failed +set debug_dbug=''; +drop table t1; diff --git a/mysql-test/r/stat_tables.result b/mysql-test/r/stat_tables.result new file mode 100644 index 00000000000..fcced761283 --- /dev/null +++ b/mysql-test/r/stat_tables.result @@ -0,0 +1,519 @@ +select @@global.use_stat_tables; +@@global.use_stat_tables +COMPLEMENTARY +select @@session.use_stat_tables; +@@session.use_stat_tables +COMPLEMENTARY +set @save_use_stat_tables=@@use_stat_tables; +set use_stat_tables='preferably'; +DROP DATABASE IF EXISTS dbt3_s001; +CREATE DATABASE dbt3_s001; +use dbt3_s001; +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='extended_keys=off'; +select * from mysql.table_stats; +db_name table_name cardinality +dbt3_s001 customer 150 +dbt3_s001 lineitem 6005 +dbt3_s001 nation 25 +dbt3_s001 orders 1500 +dbt3_s001 part 200 +dbt3_s001 partsupp 700 +dbt3_s001 region 5 +dbt3_s001 supplier 10 +select * from mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 customer PRIMARY 1 1.0000 +dbt3_s001 customer i_c_nationkey 1 6.0000 +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_receiptdate 1 2.6477 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 nation PRIMARY 1 1.0000 +dbt3_s001 nation i_n_regionkey 1 5.0000 +dbt3_s001 orders PRIMARY 1 1.0000 +dbt3_s001 orders i_o_orderdate 1 1.3321 +dbt3_s001 orders i_o_custkey 1 15.0000 +dbt3_s001 part PRIMARY 1 1.0000 +dbt3_s001 part i_p_retailprice 1 1.0000 +dbt3_s001 partsupp PRIMARY 1 3.5000 +dbt3_s001 partsupp PRIMARY 2 1.0000 +dbt3_s001 partsupp i_ps_partkey 1 3.5000 +dbt3_s001 partsupp i_ps_suppkey 1 70.0000 +dbt3_s001 region PRIMARY 1 1.0000 +dbt3_s001 supplier PRIMARY 1 1.0000 +dbt3_s001 supplier i_s_nationkey 1 1.1111 +set optimizer_switch=@save_optimizer_switch; +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='index_condition_pushdown=off'; +EXPLAIN select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue +from customer, orders, lineitem, supplier, nation, region +where c_custkey = o_custkey and l_orderkey = o_orderkey +and l_suppkey = s_suppkey and c_nationkey = s_nationkey +and s_nationkey = n_nationkey and n_regionkey = r_regionkey +and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01' + and o_orderdate < date '1995-01-01' + interval '1' year +group by n_name +order by revenue desc; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 179 Using where; Using temporary; Using filesort +1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where +1 SIMPLE nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1 +1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join) +1 SIMPLE lineitem ref PRIMARY,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where +1 SIMPLE supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.lineitem.l_suppkey 1 Using where +select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue +from customer, orders, lineitem, supplier, nation, region +where c_custkey = o_custkey and l_orderkey = o_orderkey +and l_suppkey = s_suppkey and c_nationkey = s_nationkey +and s_nationkey = n_nationkey and n_regionkey = r_regionkey +and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01' + and o_orderdate < date '1995-01-01' + interval '1' year +group by n_name +order by revenue desc; +n_name revenue +PERU 321915.8715 +ARGENTINA 69817.1451 +set optimizer_switch=@save_optimizer_switch; +delete from mysql.index_stats; +select * from mysql.table_stats; +db_name table_name cardinality +dbt3_s001 customer 150 +dbt3_s001 lineitem 6005 +dbt3_s001 nation 25 +dbt3_s001 orders 1500 +dbt3_s001 part 200 +dbt3_s001 partsupp 700 +dbt3_s001 region 5 +dbt3_s001 supplier 10 +select * from mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 customer PRIMARY 1 1.0000 +dbt3_s001 customer i_c_nationkey 1 6.0000 +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_receiptdate 1 2.6477 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 nation PRIMARY 1 1.0000 +dbt3_s001 nation i_n_regionkey 1 5.0000 +dbt3_s001 orders PRIMARY 1 1.0000 +dbt3_s001 orders i_o_orderdate 1 1.3321 +dbt3_s001 orders i_o_custkey 1 15.0000 +dbt3_s001 part PRIMARY 1 1.0000 +dbt3_s001 part i_p_retailprice 1 1.0000 +dbt3_s001 partsupp PRIMARY 1 3.5000 +dbt3_s001 partsupp PRIMARY 2 1.0000 +dbt3_s001 partsupp i_ps_partkey 1 3.5000 +dbt3_s001 partsupp i_ps_suppkey 1 70.0000 +dbt3_s001 region PRIMARY 1 1.0000 +dbt3_s001 supplier PRIMARY 1 1.0000 +dbt3_s001 supplier i_s_nationkey 1 1.1111 +select * from mysql.table_stats where table_name='orders'; +db_name table_name cardinality +dbt3_s001 orders 1500 +select * from mysql.index_stats where table_name='orders'; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 orders PRIMARY 1 1.0000 +dbt3_s001 orders i_o_orderdate 1 1.3321 +dbt3_s001 orders i_o_custkey 1 15.0000 +select (select cardinality from mysql.table_stats where table_name='orders') / +(select avg_frequency from mysql.index_stats +where index_name='i_o_orderdate' and prefix_arity=1) as n_distinct; +n_distinct +1126.0416 +select count(distinct o_orderdate) from orders; +count(distinct o_orderdate) +1126 +select (select cardinality from mysql.table_stats where table_name='orders') / +(select avg_frequency from mysql.index_stats +where index_name='i_o_custkey' and prefix_arity=1) as n_distinct; +n_distinct +100.0000 +select count(distinct o_custkey) from orders; +count(distinct o_custkey) +100 +show index from orders; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +orders 0 PRIMARY 1 o_orderkey A 1500 NULL NULL BTREE +orders 1 i_o_orderdate 1 o_orderDATE A 1126 NULL NULL YES BTREE +orders 1 i_o_custkey 1 o_custkey A 100 NULL NULL YES BTREE +select index_name, column_name, cardinality from information_schema.statistics +where table_name='orders'; +index_name column_name cardinality +PRIMARY o_orderkey 1500 +i_o_orderdate o_orderDATE 1126 +i_o_custkey o_custkey 100 +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='index_condition_pushdown=off'; +EXPLAIN select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue +from customer, orders, lineitem, supplier, nation, region +where c_custkey = o_custkey and l_orderkey = o_orderkey +and l_suppkey = s_suppkey and c_nationkey = s_nationkey +and s_nationkey = n_nationkey and n_regionkey = r_regionkey +and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01' + and o_orderdate < date '1995-01-01' + interval '1' year +group by n_name +order by revenue desc; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 179 Using where; Using temporary; Using filesort +1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where +1 SIMPLE nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1 +1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join) +1 SIMPLE lineitem ref PRIMARY,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where +1 SIMPLE supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.lineitem.l_suppkey 1 Using where +select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue +from customer, orders, lineitem, supplier, nation, region +where c_custkey = o_custkey and l_orderkey = o_orderkey +and l_suppkey = s_suppkey and c_nationkey = s_nationkey +and s_nationkey = n_nationkey and n_regionkey = r_regionkey +and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01' + and o_orderdate < date '1995-01-01' + interval '1' year +group by n_name +order by revenue desc; +n_name revenue +PERU 321915.8715 +ARGENTINA 69817.1451 +set optimizer_switch=@save_optimizer_switch; +EXPLAIN select o_year, +sum(case when nation = 'UNITED STATES' then volume else 0 end) / +sum(volume) as mkt_share +from (select extract(year from o_orderdate) as o_year, +l_extendedprice * (1-l_discount) as volume, +n2.n_name as nation +from part, supplier, lineitem, orders, customer, +nation n1, nation n2, region +where p_partkey = l_partkey and s_suppkey = l_suppkey +and l_orderkey = o_orderkey and o_custkey = c_custkey +and c_nationkey = n1.n_nationkey and n1.n_regionkey = r_regionkey +and r_name = 'AMERICA' and s_nationkey = n2.n_nationkey +and o_orderdate between date '1995-01-01' and date '1996-12-31' + and p_type = 'STANDARD BRUSHED STEEL' ) as all_nations +group by o_year +order by o_year; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE orders ALL PRIMARY,i_o_orderdate,i_o_custkey NULL NULL NULL 1500 Using where; Using temporary; Using filesort +1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where +1 SIMPLE n1 eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1 +1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join) +1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where +1 SIMPLE part eq_ref PRIMARY PRIMARY 4 dbt3_s001.lineitem.l_partkey 1 Using where +1 SIMPLE supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.lineitem.l_suppkey 1 Using where +1 SIMPLE n2 eq_ref PRIMARY PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 +select o_year, +sum(case when nation = 'UNITED STATES' then volume else 0 end) / +sum(volume) as mkt_share +from (select extract(year from o_orderdate) as o_year, +l_extendedprice * (1-l_discount) as volume, +n2.n_name as nation +from part, supplier, lineitem, orders, customer, +nation n1, nation n2, region +where p_partkey = l_partkey and s_suppkey = l_suppkey +and l_orderkey = o_orderkey and o_custkey = c_custkey +and c_nationkey = n1.n_nationkey and n1.n_regionkey = r_regionkey +and r_name = 'AMERICA' and s_nationkey = n2.n_nationkey +and o_orderdate between date '1995-01-01' and date '1996-12-31' + and p_type = 'STANDARD BRUSHED STEEL' ) as all_nations +group by o_year +order by o_year; +o_year mkt_share +1995 0.4495521838895718 +1996 0.024585468215352495 +EXPLAIN select nation, o_year, sum(amount) as sum_profit +from (select n_name as nation, +extract(year from o_orderdate) as o_year, +l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity as amount +from part, supplier, lineitem, partsupp, orders, nation +where s_suppkey = l_suppkey and ps_suppkey = l_suppkey +and ps_partkey = l_partkey and p_partkey = l_partkey +and o_orderkey = l_orderkey and s_nationkey = n_nationkey +and p_name like '%green%') as profit +group by nation, o_year +order by nation, o_year desc; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE supplier ALL PRIMARY,i_s_nationkey NULL NULL NULL 10 Using where; Using temporary; Using filesort +1 SIMPLE nation eq_ref PRIMARY PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 +1 SIMPLE partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey i_ps_suppkey 4 dbt3_s001.supplier.s_suppkey 70 +1 SIMPLE part eq_ref PRIMARY PRIMARY 4 dbt3_s001.partsupp.ps_partkey 1 Using where +1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.supplier.s_suppkey 8 +1 SIMPLE orders eq_ref PRIMARY PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 +select nation, o_year, sum(amount) as sum_profit +from (select n_name as nation, +extract(year from o_orderdate) as o_year, +l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity as amount +from part, supplier, lineitem, partsupp, orders, nation +where s_suppkey = l_suppkey and ps_suppkey = l_suppkey +and ps_partkey = l_partkey and p_partkey = l_partkey +and o_orderkey = l_orderkey and s_nationkey = n_nationkey +and p_name like '%green%') as profit +group by nation, o_year +order by nation, o_year desc; +nation o_year sum_profit +ARGENTINA 1997 18247.873399999993 +ARGENTINA 1996 7731.089399999995 +ARGENTINA 1995 134490.5697 +ARGENTINA 1994 36767.101500000004 +ARGENTINA 1993 35857.08 +ARGENTINA 1992 35740 +ETHIOPIA 1998 2758.7801999999992 +ETHIOPIA 1997 19419.294599999997 +ETHIOPIA 1995 51231.87439999999 +ETHIOPIA 1994 3578.9478999999974 +ETHIOPIA 1992 1525.8234999999986 +IRAN 1998 37817.229600000006 +IRAN 1997 52643.77359999999 +IRAN 1996 70143.7761 +IRAN 1995 84094.58260000001 +IRAN 1994 18140.925599999995 +IRAN 1993 78655.1676 +IRAN 1992 87142.23960000002 +IRAQ 1998 22860.8082 +IRAQ 1997 93676.24359999999 +IRAQ 1996 45103.3242 +IRAQ 1994 36010.728599999995 +IRAQ 1993 33221.9399 +IRAQ 1992 47755.05900000001 +KENYA 1998 44194.831999999995 +KENYA 1997 57578.36259999999 +KENYA 1996 59195.90210000001 +KENYA 1995 79262.6278 +KENYA 1994 102360.66609999999 +KENYA 1993 128422.0196 +KENYA 1992 181517.2089 +MOROCCO 1998 41797.823199999984 +MOROCCO 1997 23685.801799999994 +MOROCCO 1996 62115.19579999998 +MOROCCO 1995 42442.64300000001 +MOROCCO 1994 48655.878000000004 +MOROCCO 1993 22926.744400000003 +MOROCCO 1992 32239.8088 +PERU 1998 86999.36459999997 +PERU 1997 121110.41070000001 +PERU 1996 177040.40759999995 +PERU 1995 122247.94520000002 +PERU 1994 88046.25329999998 +PERU 1993 49379.813799999996 +PERU 1992 80646.86050000001 +UNITED KINGDOM 1998 50577.25560000001 +UNITED KINGDOM 1997 114288.8605 +UNITED KINGDOM 1996 147684.46480000002 +UNITED KINGDOM 1995 225267.65759999998 +UNITED KINGDOM 1994 140595.5864 +UNITED KINGDOM 1993 322548.49210000003 +UNITED KINGDOM 1992 67747.88279999999 +UNITED STATES 1998 3957.0431999999996 +UNITED STATES 1997 94729.5704 +UNITED STATES 1996 79297.85670000002 +UNITED STATES 1995 62201.23360000001 +UNITED STATES 1994 43075.629899999985 +UNITED STATES 1993 27168.486199999996 +UNITED STATES 1992 34092.366 +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='extended_keys=on'; +EXPLAIN select o_orderkey, p_partkey +from part, lineitem, orders +where p_retailprice > 1100 and o_orderdate='1997-01-01' +and o_orderkey=l_orderkey and p_partkey=l_partkey; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE orders ref PRIMARY,i_o_orderdate i_o_orderdate 4 const 1 +1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where +1 SIMPLE part eq_ref PRIMARY,i_p_retailprice PRIMARY 4 dbt3_s001.lineitem.l_partkey 1 Using where +select o_orderkey, p_partkey +from part, lineitem, orders +where p_retailprice > 1100 and o_orderdate='1997-01-01' +and o_orderkey=l_orderkey and p_partkey=l_partkey; +o_orderkey p_partkey +5895 200 +set optimizer_switch=@save_optimizer_switch; +DROP DATABASE dbt3_s001; +use test; +# +# Bug mdev-473: ANALYZE table locked for write +# +set use_stat_tables='complementary'; +create table t1 (i int); +lock table t1 write; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status Table is already up to date +alter table t1 add column a varchar(8); +drop table t1; +# +# Bug mdev-487: memory leak in ANALYZE with stat tables +# +SET use_stat_tables = 'preferably'; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2); +DELETE FROM t1 WHERE a=1; +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +DROP TABLE t1; +# +# Bug mdev-518: corrupted/missing statistical tables +# +CREATE TABLE t1 (i int) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +FLUSH TABLE t1; +SET use_stat_tables='never'; +EXPLAIN SELECT * FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 +FLUSH TABLES; +SET use_stat_tables='preferably'; +EXPLAIN SELECT * FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 +DROP TABLE t1; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-5204: invalid impossible where after reading const tables +# when use_stat_tables = 'preferably' +# +set use_stat_tables = 'preferably'; +CREATE TABLE t1 (id int PRIMARY KEY) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +CREATE TABLE t2 (name char(3)) ENGINE=MyISAM; +ANALYZE TABLE t2; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status Table is already up to date +INSERT INTO t2 VALUES ('USA'),('AUS'); +SELECT * FROM t1 STRAIGHT_JOIN t2 WHERE name IN ( 'AUS','YEM' ) AND id = 1; +id name +1 AUS +EXPLAIN +SELECT * FROM t1 STRAIGHT_JOIN t2 WHERE name IN ( 'AUS','YEM' ) AND id = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 0 Using where +ANALYZE TABLE t2; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +SELECT * FROM t1 STRAIGHT_JOIN t2 WHERE name IN ( 'AUS','YEM' ) AND id = 1; +id name +1 AUS +EXPLAIN +SELECT * FROM t1 STRAIGHT_JOIN t2 WHERE name IN ( 'AUS','YEM' ) AND id = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where +DROP TABLE t1,t2; +# +# MDEV-7370: Server deadlocks on renaming a table for which persistent statistics exists +# +drop database if exists db1; +drop database if exists db1; +create database db1; +create database db2; +use db1; +# +# First, run the original testcase: +# +create table t1 (i int); +insert into t1 values (10),(20); +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +db1.t1 analyze status Engine-independent statistics collected +db1.t1 analyze status OK +rename table t1 to db2.t1; +# Verify that stats in the old database are gone: +select * from mysql.column_stats where db_name='db1' and table_name='t1'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +select * from mysql.table_stats where db_name='db1' and table_name='t1'; +db_name table_name cardinality +# Verify that stats are present in the new database: +select * from mysql.column_stats where db_name='db2' and table_name='t1'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +db2 t1 i 10 20 0.0000 4.0000 1.0000 0 NULL NULL +select * from mysql.table_stats where db_name='db2' and table_name='t1'; +db_name table_name cardinality +db2 t1 2 +# +# Now, try with more than one column and with indexes: +# +use test; +create table t1(a int primary key); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +use db1; +create table t2 (a int, b int, c int, key IDX1(a), key IDX2(a,b)); +insert into t2 select a/10, a/2, a from test.t1; +analyze table t2 persistent for all; +Table Op Msg_type Msg_text +db1.t2 analyze status Engine-independent statistics collected +db1.t2 analyze status Table is already up to date +alter table t2 rename db2.t2; +# Verify that stats in the old database are gone: +select * from mysql.table_stats where db_name='db1' and table_name='t2'; +db_name table_name cardinality +select * from mysql.column_stats where db_name='db1' and table_name='t2'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +select * from mysql.index_stats where db_name='db1' and table_name='t2'; +db_name table_name index_name prefix_arity avg_frequency +# Verify that stats are present in the new database: +select * from mysql.table_stats where db_name='db2' and table_name='t2'; +db_name table_name cardinality +db2 t2 10 +select * from mysql.column_stats where db_name='db2' and table_name='t2'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +db2 t2 a 0 1 0.0000 4.0000 5.0000 0 NULL NULL +db2 t2 b 0 5 0.0000 4.0000 1.6667 0 NULL NULL +db2 t2 c 0 9 0.0000 4.0000 1.0000 0 NULL NULL +select * from mysql.index_stats where db_name='db2' and table_name='t2'; +db_name table_name index_name prefix_arity avg_frequency +db2 t2 IDX1 1 5.0000 +db2 t2 IDX2 1 5.0000 +db2 t2 IDX2 2 1.6667 +use db2; +# +# Now, rename within the same database and verify: +# +rename table t2 to t3; +# No stats under old name: +select * from mysql.table_stats where db_name='db2' and table_name='t2'; +db_name table_name cardinality +select * from mysql.column_stats where db_name='db2' and table_name='t2'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +select * from mysql.index_stats where db_name='db2' and table_name='t2'; +db_name table_name index_name prefix_arity avg_frequency +# Stats under the new name: +select * from mysql.table_stats where db_name='db2' and table_name='t3'; +db_name table_name cardinality +db2 t3 10 +select * from mysql.column_stats where db_name='db2' and table_name='t3'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +db2 t3 a 0 1 0.0000 4.0000 5.0000 0 NULL NULL +db2 t3 b 0 5 0.0000 4.0000 1.6667 0 NULL NULL +db2 t3 c 0 9 0.0000 4.0000 1.0000 0 NULL NULL +select * from mysql.index_stats where db_name='db2' and table_name='t3'; +db_name table_name index_name prefix_arity avg_frequency +db2 t3 IDX1 1 5.0000 +db2 t3 IDX2 1 5.0000 +db2 t3 IDX2 2 1.6667 +use test; +drop database db1; +drop database db2; +drop table t1; +set use_stat_tables=@save_use_stat_tables; diff --git a/mysql-test/r/stat_tables_disabled.result b/mysql-test/r/stat_tables_disabled.result new file mode 100644 index 00000000000..f57abc34e0c --- /dev/null +++ b/mysql-test/r/stat_tables_disabled.result @@ -0,0 +1,70 @@ +SET SESSION STORAGE_ENGINE='InnoDB'; +select @@global.use_stat_tables; +@@global.use_stat_tables +NEVER +select @@session.use_stat_tables; +@@session.use_stat_tables +NEVER +set @save_use_stat_tables=@@use_stat_tables; +set use_stat_tables='preferably'; +DROP DATABASE IF EXISTS dbt3_s001; +CREATE DATABASE dbt3_s001; +use dbt3_s001; +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='extended_keys=off'; +# +# Bug mdev-503: optimizer ignores setting use_stat_tables='preferably' +# +flush tables +customer, lineitem, nation, orders, part, partsupp, region, supplier; +set use_stat_tables='never'; +EXPLAIN select sql_calc_found_rows straight_join +l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, +o_orderdate, o_shippriority +from orders, customer, lineitem +where c_mktsegment = 'BUILDING' and c_custkey = o_custkey +and l_orderkey = o_orderkey and o_orderdate < date '1995-03-15' + and l_shipdate > date '1995-03-15' +group by l_orderkey, o_orderdate, o_shippriority +order by revenue desc, o_orderdate +limit 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE orders ALL PRIMARY,i_o_orderdate,i_o_custkey NULL NULL NULL # Using where; Using temporary; Using filesort +1 SIMPLE customer eq_ref PRIMARY PRIMARY 4 dbt3_s001.orders.o_custkey # Using where +1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey # Using where +set use_stat_tables='preferably'; +EXPLAIN select sql_calc_found_rows straight_join +l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, +o_orderdate, o_shippriority +from orders, customer, lineitem +where c_mktsegment = 'BUILDING' and c_custkey = o_custkey +and l_orderkey = o_orderkey and o_orderdate < date '1995-03-15' + and l_shipdate > date '1995-03-15' +group by l_orderkey, o_orderdate, o_shippriority +order by revenue desc, o_orderdate +limit 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE orders ALL PRIMARY,i_o_orderdate,i_o_custkey NULL NULL NULL 1500 Using where; Using temporary; Using filesort +1 SIMPLE customer eq_ref PRIMARY PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where +1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where +flush tables customer, orders, lineitem; +EXPLAIN select sql_calc_found_rows straight_join +l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, +o_orderdate, o_shippriority +from orders, customer, lineitem +where c_mktsegment = 'BUILDING' and c_custkey = o_custkey +and l_orderkey = o_orderkey and o_orderdate < date '1995-03-15' + and l_shipdate > date '1995-03-15' +group by l_orderkey, o_orderdate, o_shippriority +order by revenue desc, o_orderdate +limit 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE orders ALL PRIMARY,i_o_orderdate,i_o_custkey NULL NULL NULL 1500 Using where; Using temporary; Using filesort +1 SIMPLE customer eq_ref PRIMARY PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where +1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where +# End of the test case for mdev-503 +set optimizer_switch=@save_optimizer_switch; +DROP DATABASE dbt3_s001; +use test; +set use_stat_tables=@save_use_stat_tables; +SET SESSION STORAGE_ENGINE=DEFAULT; diff --git a/mysql-test/r/stat_tables_innodb.result b/mysql-test/r/stat_tables_innodb.result new file mode 100644 index 00000000000..0e866755532 --- /dev/null +++ b/mysql-test/r/stat_tables_innodb.result @@ -0,0 +1,548 @@ +SET SESSION STORAGE_ENGINE='InnoDB'; +set @save_optimizer_switch_for_stat_tables_test=@@optimizer_switch; +set optimizer_switch='extended_keys=on'; +select @@global.use_stat_tables; +@@global.use_stat_tables +COMPLEMENTARY +select @@session.use_stat_tables; +@@session.use_stat_tables +COMPLEMENTARY +set @save_use_stat_tables=@@use_stat_tables; +set use_stat_tables='preferably'; +DROP DATABASE IF EXISTS dbt3_s001; +CREATE DATABASE dbt3_s001; +use dbt3_s001; +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='extended_keys=off'; +select * from mysql.table_stats; +db_name table_name cardinality +dbt3_s001 customer 150 +dbt3_s001 lineitem 6005 +dbt3_s001 nation 25 +dbt3_s001 orders 1500 +dbt3_s001 part 200 +dbt3_s001 partsupp 700 +dbt3_s001 region 5 +dbt3_s001 supplier 10 +select * from mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 customer PRIMARY 1 1.0000 +dbt3_s001 customer i_c_nationkey 1 6.0000 +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_receiptdate 1 2.6477 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 nation PRIMARY 1 1.0000 +dbt3_s001 nation i_n_regionkey 1 5.0000 +dbt3_s001 orders PRIMARY 1 1.0000 +dbt3_s001 orders i_o_orderdate 1 1.3321 +dbt3_s001 orders i_o_custkey 1 15.0000 +dbt3_s001 part PRIMARY 1 1.0000 +dbt3_s001 part i_p_retailprice 1 1.0000 +dbt3_s001 partsupp PRIMARY 1 3.5000 +dbt3_s001 partsupp PRIMARY 2 1.0000 +dbt3_s001 partsupp i_ps_partkey 1 3.5000 +dbt3_s001 partsupp i_ps_suppkey 1 70.0000 +dbt3_s001 region PRIMARY 1 1.0000 +dbt3_s001 supplier PRIMARY 1 1.0000 +dbt3_s001 supplier i_s_nationkey 1 1.1111 +set optimizer_switch=@save_optimizer_switch; +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='index_condition_pushdown=off'; +EXPLAIN select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue +from customer, orders, lineitem, supplier, nation, region +where c_custkey = o_custkey and l_orderkey = o_orderkey +and l_suppkey = s_suppkey and c_nationkey = s_nationkey +and s_nationkey = n_nationkey and n_regionkey = r_regionkey +and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01' + and o_orderdate < date '1995-01-01' + interval '1' year +group by n_name +order by revenue desc; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 211 Using where; Using temporary; Using filesort +1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where +1 SIMPLE nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1 +1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.customer.c_nationkey 1 Using index +1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join) +1 SIMPLE lineitem ref PRIMARY,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where +select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue +from customer, orders, lineitem, supplier, nation, region +where c_custkey = o_custkey and l_orderkey = o_orderkey +and l_suppkey = s_suppkey and c_nationkey = s_nationkey +and s_nationkey = n_nationkey and n_regionkey = r_regionkey +and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01' + and o_orderdate < date '1995-01-01' + interval '1' year +group by n_name +order by revenue desc; +n_name revenue +PERU 321915.8715 +ARGENTINA 69817.1451 +set optimizer_switch=@save_optimizer_switch; +delete from mysql.index_stats; +select * from mysql.table_stats; +db_name table_name cardinality +dbt3_s001 customer 150 +dbt3_s001 lineitem 6005 +dbt3_s001 nation 25 +dbt3_s001 orders 1500 +dbt3_s001 part 200 +dbt3_s001 partsupp 700 +dbt3_s001 region 5 +dbt3_s001 supplier 10 +select * from mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 customer PRIMARY 1 1.0000 +dbt3_s001 customer i_c_nationkey 1 6.0000 +dbt3_s001 customer i_c_nationkey 2 1.0000 +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_shipdate 2 1.0149 +dbt3_s001 lineitem i_l_shipdate 3 1.0000 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +dbt3_s001 lineitem i_l_suppkey_partkey 3 1.0030 +dbt3_s001 lineitem i_l_suppkey_partkey 4 1.0000 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_partkey 2 1.0089 +dbt3_s001 lineitem i_l_partkey 3 1.0000 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_suppkey 2 1.2073 +dbt3_s001 lineitem i_l_suppkey 3 1.0000 +dbt3_s001 lineitem i_l_receiptdate 1 2.6477 +dbt3_s001 lineitem i_l_receiptdate 2 1.0152 +dbt3_s001 lineitem i_l_receiptdate 3 1.0000 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey 2 1.0000 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_orderkey_quantity 3 1.0000 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 lineitem i_l_commitdate 2 1.0364 +dbt3_s001 lineitem i_l_commitdate 3 1.0000 +dbt3_s001 nation PRIMARY 1 1.0000 +dbt3_s001 nation i_n_regionkey 1 5.0000 +dbt3_s001 nation i_n_regionkey 2 1.0000 +dbt3_s001 orders PRIMARY 1 1.0000 +dbt3_s001 orders i_o_orderdate 1 1.3321 +dbt3_s001 orders i_o_orderdate 2 1.0000 +dbt3_s001 orders i_o_custkey 1 15.0000 +dbt3_s001 orders i_o_custkey 2 1.0000 +dbt3_s001 part PRIMARY 1 1.0000 +dbt3_s001 part i_p_retailprice 1 1.0000 +dbt3_s001 part i_p_retailprice 2 1.0000 +dbt3_s001 partsupp PRIMARY 1 3.5000 +dbt3_s001 partsupp PRIMARY 2 1.0000 +dbt3_s001 partsupp i_ps_partkey 1 3.5000 +dbt3_s001 partsupp i_ps_partkey 2 1.0000 +dbt3_s001 partsupp i_ps_suppkey 1 70.0000 +dbt3_s001 partsupp i_ps_suppkey 2 1.0000 +dbt3_s001 region PRIMARY 1 1.0000 +dbt3_s001 supplier PRIMARY 1 1.0000 +dbt3_s001 supplier i_s_nationkey 1 1.1111 +dbt3_s001 supplier i_s_nationkey 2 1.0000 +select * from mysql.table_stats where table_name='orders'; +db_name table_name cardinality +dbt3_s001 orders 1500 +select * from mysql.index_stats where table_name='orders'; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 orders PRIMARY 1 1.0000 +dbt3_s001 orders i_o_orderdate 1 1.3321 +dbt3_s001 orders i_o_orderdate 2 1.0000 +dbt3_s001 orders i_o_custkey 1 15.0000 +dbt3_s001 orders i_o_custkey 2 1.0000 +select (select cardinality from mysql.table_stats where table_name='orders') / +(select avg_frequency from mysql.index_stats +where index_name='i_o_orderdate' and prefix_arity=1) as n_distinct; +n_distinct +1126.0416 +select count(distinct o_orderdate) from orders; +count(distinct o_orderdate) +1126 +select (select cardinality from mysql.table_stats where table_name='orders') / +(select avg_frequency from mysql.index_stats +where index_name='i_o_custkey' and prefix_arity=1) as n_distinct; +n_distinct +100.0000 +select count(distinct o_custkey) from orders; +count(distinct o_custkey) +100 +show index from orders; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +orders 0 PRIMARY 1 o_orderkey A 1500 NULL NULL BTREE +orders 1 i_o_orderdate 1 o_orderDATE A 1126 NULL NULL YES BTREE +orders 1 i_o_custkey 1 o_custkey A 100 NULL NULL YES BTREE +select index_name, column_name, cardinality from information_schema.statistics +where table_name='orders'; +index_name column_name cardinality +PRIMARY o_orderkey 1500 +i_o_orderdate o_orderDATE 1126 +i_o_custkey o_custkey 100 +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='index_condition_pushdown=off'; +EXPLAIN select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue +from customer, orders, lineitem, supplier, nation, region +where c_custkey = o_custkey and l_orderkey = o_orderkey +and l_suppkey = s_suppkey and c_nationkey = s_nationkey +and s_nationkey = n_nationkey and n_regionkey = r_regionkey +and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01' + and o_orderdate < date '1995-01-01' + interval '1' year +group by n_name +order by revenue desc; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 211 Using where; Using temporary; Using filesort +1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where +1 SIMPLE nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1 +1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.customer.c_nationkey 1 Using index +1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join) +1 SIMPLE lineitem ref PRIMARY,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where +select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue +from customer, orders, lineitem, supplier, nation, region +where c_custkey = o_custkey and l_orderkey = o_orderkey +and l_suppkey = s_suppkey and c_nationkey = s_nationkey +and s_nationkey = n_nationkey and n_regionkey = r_regionkey +and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01' + and o_orderdate < date '1995-01-01' + interval '1' year +group by n_name +order by revenue desc; +n_name revenue +PERU 321915.8715 +ARGENTINA 69817.1451 +set optimizer_switch=@save_optimizer_switch; +EXPLAIN select o_year, +sum(case when nation = 'UNITED STATES' then volume else 0 end) / +sum(volume) as mkt_share +from (select extract(year from o_orderdate) as o_year, +l_extendedprice * (1-l_discount) as volume, +n2.n_name as nation +from part, supplier, lineitem, orders, customer, +nation n1, nation n2, region +where p_partkey = l_partkey and s_suppkey = l_suppkey +and l_orderkey = o_orderkey and o_custkey = c_custkey +and c_nationkey = n1.n_nationkey and n1.n_regionkey = r_regionkey +and r_name = 'AMERICA' and s_nationkey = n2.n_nationkey +and o_orderdate between date '1995-01-01' and date '1996-12-31' + and p_type = 'STANDARD BRUSHED STEEL' ) as all_nations +group by o_year +order by o_year; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE orders ALL PRIMARY,i_o_orderdate,i_o_custkey NULL NULL NULL 1500 Using where; Using temporary; Using filesort +1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where +1 SIMPLE n1 eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1 +1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join) +1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where +1 SIMPLE part eq_ref PRIMARY PRIMARY 4 dbt3_s001.lineitem.l_partkey 1 Using where +1 SIMPLE supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.lineitem.l_suppkey 1 Using where +1 SIMPLE n2 eq_ref PRIMARY PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 +select o_year, +sum(case when nation = 'UNITED STATES' then volume else 0 end) / +sum(volume) as mkt_share +from (select extract(year from o_orderdate) as o_year, +l_extendedprice * (1-l_discount) as volume, +n2.n_name as nation +from part, supplier, lineitem, orders, customer, +nation n1, nation n2, region +where p_partkey = l_partkey and s_suppkey = l_suppkey +and l_orderkey = o_orderkey and o_custkey = c_custkey +and c_nationkey = n1.n_nationkey and n1.n_regionkey = r_regionkey +and r_name = 'AMERICA' and s_nationkey = n2.n_nationkey +and o_orderdate between date '1995-01-01' and date '1996-12-31' + and p_type = 'STANDARD BRUSHED STEEL' ) as all_nations +group by o_year +order by o_year; +o_year mkt_share +1995 0.4495521838895718 +1996 0.024585468215352495 +EXPLAIN select nation, o_year, sum(amount) as sum_profit +from (select n_name as nation, +extract(year from o_orderdate) as o_year, +l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity as amount +from part, supplier, lineitem, partsupp, orders, nation +where s_suppkey = l_suppkey and ps_suppkey = l_suppkey +and ps_partkey = l_partkey and p_partkey = l_partkey +and o_orderkey = l_orderkey and s_nationkey = n_nationkey +and p_name like '%green%') as profit +group by nation, o_year +order by nation, o_year desc; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE supplier index PRIMARY,i_s_nationkey i_s_nationkey 5 NULL 10 Using where; Using index; Using temporary; Using filesort +1 SIMPLE nation eq_ref PRIMARY PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 +1 SIMPLE partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey i_ps_suppkey 4 dbt3_s001.supplier.s_suppkey 70 +1 SIMPLE part eq_ref PRIMARY PRIMARY 4 dbt3_s001.partsupp.ps_partkey 1 Using where +1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.supplier.s_suppkey 8 +1 SIMPLE orders eq_ref PRIMARY PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 +select nation, o_year, sum(amount) as sum_profit +from (select n_name as nation, +extract(year from o_orderdate) as o_year, +l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity as amount +from part, supplier, lineitem, partsupp, orders, nation +where s_suppkey = l_suppkey and ps_suppkey = l_suppkey +and ps_partkey = l_partkey and p_partkey = l_partkey +and o_orderkey = l_orderkey and s_nationkey = n_nationkey +and p_name like '%green%') as profit +group by nation, o_year +order by nation, o_year desc; +nation o_year sum_profit +ARGENTINA 1997 18247.873399999993 +ARGENTINA 1996 7731.089399999995 +ARGENTINA 1995 134490.5697 +ARGENTINA 1994 36767.101500000004 +ARGENTINA 1993 35857.08 +ARGENTINA 1992 35740 +ETHIOPIA 1998 2758.7801999999992 +ETHIOPIA 1997 19419.294599999997 +ETHIOPIA 1995 51231.87439999999 +ETHIOPIA 1994 3578.9478999999974 +ETHIOPIA 1992 1525.8234999999986 +IRAN 1998 37817.229600000006 +IRAN 1997 52643.77359999999 +IRAN 1996 70143.7761 +IRAN 1995 84094.58260000001 +IRAN 1994 18140.925599999995 +IRAN 1993 78655.1676 +IRAN 1992 87142.23960000002 +IRAQ 1998 22860.8082 +IRAQ 1997 93676.24359999999 +IRAQ 1996 45103.3242 +IRAQ 1994 36010.728599999995 +IRAQ 1993 33221.9399 +IRAQ 1992 47755.05900000001 +KENYA 1998 44194.831999999995 +KENYA 1997 57578.36259999999 +KENYA 1996 59195.90210000001 +KENYA 1995 79262.6278 +KENYA 1994 102360.66609999999 +KENYA 1993 128422.0196 +KENYA 1992 181517.2089 +MOROCCO 1998 41797.823199999984 +MOROCCO 1997 23685.801799999994 +MOROCCO 1996 62115.19579999998 +MOROCCO 1995 42442.64300000001 +MOROCCO 1994 48655.878000000004 +MOROCCO 1993 22926.744400000003 +MOROCCO 1992 32239.8088 +PERU 1998 86999.36459999997 +PERU 1997 121110.41070000001 +PERU 1996 177040.40759999995 +PERU 1995 122247.94520000002 +PERU 1994 88046.25329999998 +PERU 1993 49379.813799999996 +PERU 1992 80646.86050000001 +UNITED KINGDOM 1998 50577.25560000001 +UNITED KINGDOM 1997 114288.8605 +UNITED KINGDOM 1996 147684.46480000002 +UNITED KINGDOM 1995 225267.65759999998 +UNITED KINGDOM 1994 140595.5864 +UNITED KINGDOM 1993 322548.49210000003 +UNITED KINGDOM 1992 67747.88279999999 +UNITED STATES 1998 3957.0431999999996 +UNITED STATES 1997 94729.5704 +UNITED STATES 1996 79297.85670000002 +UNITED STATES 1995 62201.23360000001 +UNITED STATES 1994 43075.629899999985 +UNITED STATES 1993 27168.486199999996 +UNITED STATES 1992 34092.366 +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='extended_keys=on'; +EXPLAIN select o_orderkey, p_partkey +from part, lineitem, orders +where p_retailprice > 1100 and o_orderdate='1997-01-01' +and o_orderkey=l_orderkey and p_partkey=l_partkey; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE part range PRIMARY,i_p_retailprice i_p_retailprice 9 NULL 1 Using where; Using index +1 SIMPLE orders ref PRIMARY,i_o_orderdate i_o_orderdate 4 const 1 Using index +1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_orderkey,i_l_orderkey_quantity i_l_partkey 9 dbt3_s001.part.p_partkey,dbt3_s001.orders.o_orderkey 1 Using index +select o_orderkey, p_partkey +from part, lineitem, orders +where p_retailprice > 1100 and o_orderdate='1997-01-01' +and o_orderkey=l_orderkey and p_partkey=l_partkey; +o_orderkey p_partkey +5895 200 +set optimizer_switch=@save_optimizer_switch; +DROP DATABASE dbt3_s001; +use test; +# +# Bug mdev-473: ANALYZE table locked for write +# +set use_stat_tables='complementary'; +create table t1 (i int); +lock table t1 write; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +alter table t1 add column a varchar(8); +drop table t1; +# +# Bug mdev-487: memory leak in ANALYZE with stat tables +# +SET use_stat_tables = 'preferably'; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2); +DELETE FROM t1 WHERE a=1; +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +DROP TABLE t1; +# +# Bug mdev-518: corrupted/missing statistical tables +# +CREATE TABLE t1 (i int) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +FLUSH TABLE t1; +SET use_stat_tables='never'; +EXPLAIN SELECT * FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 +FLUSH TABLES; +SET use_stat_tables='preferably'; +EXPLAIN SELECT * FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 +DROP TABLE t1; +set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-5204: invalid impossible where after reading const tables +# when use_stat_tables = 'preferably' +# +set use_stat_tables = 'preferably'; +CREATE TABLE t1 (id int PRIMARY KEY) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +CREATE TABLE t2 (name char(3)) ENGINE=MyISAM; +ANALYZE TABLE t2; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status Table is already up to date +INSERT INTO t2 VALUES ('USA'),('AUS'); +SELECT * FROM t1 STRAIGHT_JOIN t2 WHERE name IN ( 'AUS','YEM' ) AND id = 1; +id name +1 AUS +EXPLAIN +SELECT * FROM t1 STRAIGHT_JOIN t2 WHERE name IN ( 'AUS','YEM' ) AND id = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 0 Using where +ANALYZE TABLE t2; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +SELECT * FROM t1 STRAIGHT_JOIN t2 WHERE name IN ( 'AUS','YEM' ) AND id = 1; +id name +1 AUS +EXPLAIN +SELECT * FROM t1 STRAIGHT_JOIN t2 WHERE name IN ( 'AUS','YEM' ) AND id = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where +DROP TABLE t1,t2; +# +# MDEV-7370: Server deadlocks on renaming a table for which persistent statistics exists +# +drop database if exists db1; +drop database if exists db1; +create database db1; +create database db2; +use db1; +# +# First, run the original testcase: +# +create table t1 (i int); +insert into t1 values (10),(20); +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +db1.t1 analyze status Engine-independent statistics collected +db1.t1 analyze status OK +rename table t1 to db2.t1; +# Verify that stats in the old database are gone: +select * from mysql.column_stats where db_name='db1' and table_name='t1'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +select * from mysql.table_stats where db_name='db1' and table_name='t1'; +db_name table_name cardinality +# Verify that stats are present in the new database: +select * from mysql.column_stats where db_name='db2' and table_name='t1'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +db2 t1 i 10 20 0.0000 4.0000 1.0000 0 NULL NULL +select * from mysql.table_stats where db_name='db2' and table_name='t1'; +db_name table_name cardinality +db2 t1 2 +# +# Now, try with more than one column and with indexes: +# +use test; +create table t1(a int primary key); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +use db1; +create table t2 (a int, b int, c int, key IDX1(a), key IDX2(a,b)); +insert into t2 select a/10, a/2, a from test.t1; +analyze table t2 persistent for all; +Table Op Msg_type Msg_text +db1.t2 analyze status Engine-independent statistics collected +db1.t2 analyze status OK +alter table t2 rename db2.t2; +# Verify that stats in the old database are gone: +select * from mysql.table_stats where db_name='db1' and table_name='t2'; +db_name table_name cardinality +select * from mysql.column_stats where db_name='db1' and table_name='t2'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +select * from mysql.index_stats where db_name='db1' and table_name='t2'; +db_name table_name index_name prefix_arity avg_frequency +# Verify that stats are present in the new database: +select * from mysql.table_stats where db_name='db2' and table_name='t2'; +db_name table_name cardinality +db2 t2 10 +select * from mysql.column_stats where db_name='db2' and table_name='t2'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +db2 t2 a 0 1 0.0000 4.0000 5.0000 0 NULL NULL +db2 t2 b 0 5 0.0000 4.0000 1.6667 0 NULL NULL +db2 t2 c 0 9 0.0000 4.0000 1.0000 0 NULL NULL +select * from mysql.index_stats where db_name='db2' and table_name='t2'; +db_name table_name index_name prefix_arity avg_frequency +db2 t2 IDX1 1 5.0000 +db2 t2 IDX2 1 5.0000 +db2 t2 IDX2 2 1.6667 +use db2; +# +# Now, rename within the same database and verify: +# +rename table t2 to t3; +# No stats under old name: +select * from mysql.table_stats where db_name='db2' and table_name='t2'; +db_name table_name cardinality +select * from mysql.column_stats where db_name='db2' and table_name='t2'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +select * from mysql.index_stats where db_name='db2' and table_name='t2'; +db_name table_name index_name prefix_arity avg_frequency +# Stats under the new name: +select * from mysql.table_stats where db_name='db2' and table_name='t3'; +db_name table_name cardinality +db2 t3 10 +select * from mysql.column_stats where db_name='db2' and table_name='t3'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +db2 t3 a 0 1 0.0000 4.0000 5.0000 0 NULL NULL +db2 t3 b 0 5 0.0000 4.0000 1.6667 0 NULL NULL +db2 t3 c 0 9 0.0000 4.0000 1.0000 0 NULL NULL +select * from mysql.index_stats where db_name='db2' and table_name='t3'; +db_name table_name index_name prefix_arity avg_frequency +db2 t3 IDX1 1 5.0000 +db2 t3 IDX2 1 5.0000 +db2 t3 IDX2 2 1.6667 +use test; +drop database db1; +drop database db2; +drop table t1; +set use_stat_tables=@save_use_stat_tables; +set optimizer_switch=@save_optimizer_switch_for_stat_tables_test; +SET SESSION STORAGE_ENGINE=DEFAULT; diff --git a/mysql-test/r/stat_tables_par.result b/mysql-test/r/stat_tables_par.result new file mode 100644 index 00000000000..ed39b7af9a9 --- /dev/null +++ b/mysql-test/r/stat_tables_par.result @@ -0,0 +1,243 @@ +set @save_use_stat_tables=@@use_stat_tables; +set use_stat_tables='preferably'; +DROP DATABASE IF EXISTS dbt3_s001; +CREATE DATABASE dbt3_s001; +use dbt3_s001; +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='extended_keys=off'; +select * from mysql.table_stats; +db_name table_name cardinality +dbt3_s001 customer 150 +dbt3_s001 lineitem 6005 +dbt3_s001 nation 25 +dbt3_s001 orders 1500 +dbt3_s001 part 200 +dbt3_s001 partsupp 700 +dbt3_s001 region 5 +dbt3_s001 supplier 10 +select * from mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 customer PRIMARY 1 1.0000 +dbt3_s001 customer i_c_nationkey 1 6.0000 +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_receiptdate 1 2.6477 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 nation PRIMARY 1 1.0000 +dbt3_s001 nation i_n_regionkey 1 5.0000 +dbt3_s001 orders PRIMARY 1 1.0000 +dbt3_s001 orders i_o_orderdate 1 1.3321 +dbt3_s001 orders i_o_custkey 1 15.0000 +dbt3_s001 part PRIMARY 1 1.0000 +dbt3_s001 partsupp PRIMARY 1 3.5000 +dbt3_s001 partsupp PRIMARY 2 1.0000 +dbt3_s001 partsupp i_ps_partkey 1 3.5000 +dbt3_s001 partsupp i_ps_suppkey 1 70.0000 +dbt3_s001 region PRIMARY 1 1.0000 +dbt3_s001 supplier PRIMARY 1 1.0000 +dbt3_s001 supplier i_s_nationkey 1 1.1111 +flush table lineitem; +set use_stat_tables='never'; +select sum(l_extendedprice*l_discount) as revenue +from lineitem +where l_shipdate >= date '1994-01-01' +and l_shipdate < date '1994-01-01' + interval '1' year +and l_discount between 0.06 - 0.01 and 0.06 + 0.01 +and l_quantity < 24; +revenue +77949.91860000002 +set debug_sync='statistics_mem_alloc_start1 WAIT_FOR second_thread_started_too'; +set debug_sync='statistics_mem_alloc_start2 SIGNAL first_thread_working'; +use dbt3_s001; +set use_stat_tables='preferably'; +select sum(l_extendedprice*l_discount) as revenue +from lineitem +where l_shipdate >= date '1994-01-01' +and l_shipdate < date '1994-01-01' + interval '1' year +and l_discount between 0.06 - 0.01 and 0.06 + 0.01 +and l_quantity < 24 ; +set debug_sync='statistics_mem_alloc_start1 SIGNAL second_thread_started_too'; +set debug_sync='statistics_mem_alloc_start2 WAIT_FOR first_thread_working'; +use dbt3_s001; +set use_stat_tables='preferably'; +select sum(l_extendedprice*l_discount) as revenue +from lineitem +where l_shipdate >= date '1994-01-01' +and l_shipdate < date '1994-01-01' + interval '1' year +and l_discount between 0.06 - 0.01 and 0.06 + 0.01 +and l_quantity < 24; +revenue +77949.91860000002 +revenue +77949.91860000002 +set use_stat_tables='preferably'; +set debug_sync='RESET'; +select * from mysql.index_stats where table_name='lineitem' order by index_name; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_receiptdate 1 2.6477 +dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +delete from mysql.index_stats +where table_name='lineitem' and +index_name in ('i_l_shipdate', 'i_l_receiptdate'); +select * from mysql.index_stats where table_name='lineitem' order by index_name; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +analyze table lineitem persistent for columns() indexes (i_l_shipdate); +select * from mysql.index_stats where table_name='lineitem' order by index_name; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +delete from mysql.index_stats +where table_name='lineitem' and index_name= 'i_l_shipdate'; +select * from mysql.index_stats where table_name='lineitem' order by index_name; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +set debug_sync='statistics_collection_start1 WAIT_FOR second_thread_started_too'; +set debug_sync='statistics_collection_start2 SIGNAL first_thread_working'; +use dbt3_s001; +set use_stat_tables='preferably'; +analyze table lineitem persistent for columns() indexes (i_l_shipdate); +set debug_sync='statistics_collection_start1 SIGNAL second_thread_started_too'; +set debug_sync='statistics_collection_start2 WAIT_FOR first_thread_working'; +use dbt3_s001; +set use_stat_tables='preferably'; +analyze table lineitem persistent for columns() indexes (i_l_receiptdate); +set debug_sync='RESET'; +select * from mysql.index_stats where table_name='lineitem' order by index_name, prefix_arity; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_receiptdate 1 2.6477 +dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +select * from mysql.index_stats where table_name='lineitem' + order by index_name, prefix_arity; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_receiptdate 1 2.6477 +dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +set debug_sync='RESET'; +set debug_sync='statistics_collection_start SIGNAL parked WAIT_FOR finish'; +use dbt3_s001; +set use_stat_tables='preferably'; +analyze table lineitem persistent for all; +set debug_sync='now WAIT_FOR parked'; +use dbt3_s001; +set use_stat_tables='never'; +set debug_sync='now SIGNAL finish'; +set debug_sync='RESET'; +select * from mysql.index_stats where table_name='lineitem' + order by index_name, prefix_arity; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_receiptdate 1 2.6477 +dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +set @save_global_use_stat_tables=@@global.use_stat_tables; +set global use_stat_tables='preferably'; +set debug_sync='RESET'; +set debug_sync='statistics_update_start SIGNAL parker WAIT_FOR go1 EXECUTE 1'; +set debug_sync='thr_multi_lock_after_thr_lock SIGNAL go2 EXECUTE 2'; +use dbt3_s001; +analyze table lineitem persistent for all; +set debug_sync='open_and_process_table WAIT_FOR parker'; +set debug_sync='statistics_read_start SIGNAL go1 WAIT_FOR go2'; +use dbt3_s001; +select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68 order by prefix_arity;; +db_name table_name index_name prefix_arity avg_frequency l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment +dbt3_s001 lineitem i_l_shipdate 1 2.6500 1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +set debug_sync='RESET'; +set global use_stat_tables=@save_global_use_stat_tables; +DROP DATABASE dbt3_s001; +use test; +set @save_global_use_stat_tables=@@global.use_stat_tables; +set global use_stat_tables='preferably'; +set debug_sync='RESET'; +create table t1 (a int, b int, key(a)); +insert t1 values (1,1),(2,2); +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SET debug_sync='after_open_table_ignore_flush WAIT_FOR go'; +select * from information_schema.statistics where table_schema='test'; +select * from t1; +a b +1 1 +2 2 +SET DEBUG_SYNC= "now SIGNAL go"; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT +def test t1 1 test a 1 a A 2 NULL NULL YES BTREE +set debug_sync='RESET'; +drop table t1; +set global use_stat_tables=@save_global_use_stat_tables; +set use_stat_tables=@save_use_stat_tables; diff --git a/mysql-test/r/stat_tables_par_innodb.result b/mysql-test/r/stat_tables_par_innodb.result new file mode 100644 index 00000000000..cb4e4b09827 --- /dev/null +++ b/mysql-test/r/stat_tables_par_innodb.result @@ -0,0 +1,278 @@ +SET SESSION STORAGE_ENGINE='InnoDB'; +set @save_optimizer_switch_for_stat_tables_test=@@optimizer_switch; +set optimizer_switch='extended_keys=on'; +set @save_use_stat_tables=@@use_stat_tables; +set use_stat_tables='preferably'; +DROP DATABASE IF EXISTS dbt3_s001; +CREATE DATABASE dbt3_s001; +use dbt3_s001; +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='extended_keys=off'; +select * from mysql.table_stats; +db_name table_name cardinality +dbt3_s001 customer 150 +dbt3_s001 lineitem 6005 +dbt3_s001 nation 25 +dbt3_s001 orders 1500 +dbt3_s001 part 200 +dbt3_s001 partsupp 700 +dbt3_s001 region 5 +dbt3_s001 supplier 10 +select * from mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 customer PRIMARY 1 1.0000 +dbt3_s001 customer i_c_nationkey 1 6.0000 +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_receiptdate 1 2.6477 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 nation PRIMARY 1 1.0000 +dbt3_s001 nation i_n_regionkey 1 5.0000 +dbt3_s001 orders PRIMARY 1 1.0000 +dbt3_s001 orders i_o_orderdate 1 1.3321 +dbt3_s001 orders i_o_custkey 1 15.0000 +dbt3_s001 part PRIMARY 1 1.0000 +dbt3_s001 partsupp PRIMARY 1 3.5000 +dbt3_s001 partsupp PRIMARY 2 1.0000 +dbt3_s001 partsupp i_ps_partkey 1 3.5000 +dbt3_s001 partsupp i_ps_suppkey 1 70.0000 +dbt3_s001 region PRIMARY 1 1.0000 +dbt3_s001 supplier PRIMARY 1 1.0000 +dbt3_s001 supplier i_s_nationkey 1 1.1111 +flush table lineitem; +set use_stat_tables='never'; +select sum(l_extendedprice*l_discount) as revenue +from lineitem +where l_shipdate >= date '1994-01-01' +and l_shipdate < date '1994-01-01' + interval '1' year +and l_discount between 0.06 - 0.01 and 0.06 + 0.01 +and l_quantity < 24; +revenue +77949.91860000002 +set debug_sync='statistics_mem_alloc_start1 WAIT_FOR second_thread_started_too'; +set debug_sync='statistics_mem_alloc_start2 SIGNAL first_thread_working'; +use dbt3_s001; +set use_stat_tables='preferably'; +select sum(l_extendedprice*l_discount) as revenue +from lineitem +where l_shipdate >= date '1994-01-01' +and l_shipdate < date '1994-01-01' + interval '1' year +and l_discount between 0.06 - 0.01 and 0.06 + 0.01 +and l_quantity < 24 ; +set debug_sync='statistics_mem_alloc_start1 SIGNAL second_thread_started_too'; +set debug_sync='statistics_mem_alloc_start2 WAIT_FOR first_thread_working'; +use dbt3_s001; +set use_stat_tables='preferably'; +select sum(l_extendedprice*l_discount) as revenue +from lineitem +where l_shipdate >= date '1994-01-01' +and l_shipdate < date '1994-01-01' + interval '1' year +and l_discount between 0.06 - 0.01 and 0.06 + 0.01 +and l_quantity < 24; +revenue +77949.91860000002 +revenue +77949.91860000002 +set use_stat_tables='preferably'; +set debug_sync='RESET'; +select * from mysql.index_stats where table_name='lineitem' order by index_name; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_receiptdate 1 2.6477 +dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +delete from mysql.index_stats +where table_name='lineitem' and +index_name in ('i_l_shipdate', 'i_l_receiptdate'); +select * from mysql.index_stats where table_name='lineitem' order by index_name; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +analyze table lineitem persistent for columns() indexes (i_l_shipdate); +select * from mysql.index_stats where table_name='lineitem' order by index_name; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +delete from mysql.index_stats +where table_name='lineitem' and index_name= 'i_l_shipdate'; +select * from mysql.index_stats where table_name='lineitem' order by index_name; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +set debug_sync='statistics_collection_start1 WAIT_FOR second_thread_started_too'; +set debug_sync='statistics_collection_start2 SIGNAL first_thread_working'; +use dbt3_s001; +set use_stat_tables='preferably'; +analyze table lineitem persistent for columns() indexes (i_l_shipdate); +set debug_sync='statistics_collection_start1 SIGNAL second_thread_started_too'; +set debug_sync='statistics_collection_start2 WAIT_FOR first_thread_working'; +use dbt3_s001; +set use_stat_tables='preferably'; +analyze table lineitem persistent for columns() indexes (i_l_receiptdate); +set debug_sync='RESET'; +select * from mysql.index_stats where table_name='lineitem' order by index_name, prefix_arity; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_receiptdate 1 2.6477 +dbt3_s001 lineitem i_l_receiptdate 2 1.0152 +dbt3_s001 lineitem i_l_receiptdate 3 1.0000 +dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_shipdate 2 1.0149 +dbt3_s001 lineitem i_l_shipdate 3 1.0000 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +select * from mysql.index_stats where table_name='lineitem' + order by index_name, prefix_arity; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 lineitem PRIMARY 1 4.0033 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_commitdate 1 2.7160 +dbt3_s001 lineitem i_l_orderkey 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_partkey 1 30.0250 +dbt3_s001 lineitem i_l_receiptdate 1 2.6477 +dbt3_s001 lineitem i_l_receiptdate 2 1.0152 +dbt3_s001 lineitem i_l_receiptdate 3 1.0000 +dbt3_s001 lineitem i_l_shipdate 1 2.6500 +dbt3_s001 lineitem i_l_shipdate 2 1.0149 +dbt3_s001 lineitem i_l_shipdate 3 1.0000 +dbt3_s001 lineitem i_l_suppkey 1 600.5000 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 +set debug_sync='RESET'; +set debug_sync='statistics_collection_start SIGNAL parked WAIT_FOR finish'; +use dbt3_s001; +set use_stat_tables='preferably'; +analyze table lineitem persistent for all; +set debug_sync='now WAIT_FOR parked'; +use dbt3_s001; +set use_stat_tables='never'; +select * from lineitem where l_orderkey=1 and l_partkey=156; +l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment +1 156 4 1 17 17954.55 0.04 0.02 N O 1996-03-13 1996-02-12 1996-03-22 DELIVER IN PERSON TRUCK blithely regular ideas caj +delete from lineitem where l_orderkey=1 and l_partkey=156; +select * from lineitem where l_orderkey=1 and l_partkey=156; +l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment +set debug_sync='now SIGNAL finish'; +set debug_sync='RESET'; +select * from mysql.index_stats where table_name='lineitem' + order by index_name, prefix_arity; +db_name table_name index_name prefix_arity avg_frequency +dbt3_s001 lineitem PRIMARY 1 4.0027 +dbt3_s001 lineitem PRIMARY 2 1.0000 +dbt3_s001 lineitem i_l_commitdate 1 2.7155 +dbt3_s001 lineitem i_l_commitdate 2 1.0364 +dbt3_s001 lineitem i_l_commitdate 3 1.0000 +dbt3_s001 lineitem i_l_orderkey 1 4.0027 +dbt3_s001 lineitem i_l_orderkey 2 1.0000 +dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0027 +dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404 +dbt3_s001 lineitem i_l_orderkey_quantity 3 1.0000 +dbt3_s001 lineitem i_l_partkey 1 30.0200 +dbt3_s001 lineitem i_l_partkey 2 1.0089 +dbt3_s001 lineitem i_l_partkey 3 1.0000 +dbt3_s001 lineitem i_l_receiptdate 1 2.6473 +dbt3_s001 lineitem i_l_receiptdate 2 1.0152 +dbt3_s001 lineitem i_l_receiptdate 3 1.0000 +dbt3_s001 lineitem i_l_shipdate 1 2.6496 +dbt3_s001 lineitem i_l_shipdate 2 1.0149 +dbt3_s001 lineitem i_l_shipdate 3 1.0000 +dbt3_s001 lineitem i_l_suppkey 1 600.4000 +dbt3_s001 lineitem i_l_suppkey 2 1.2073 +dbt3_s001 lineitem i_l_suppkey 3 1.0000 +dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0200 +dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5771 +dbt3_s001 lineitem i_l_suppkey_partkey 3 1.0030 +dbt3_s001 lineitem i_l_suppkey_partkey 4 1.0000 +set @save_global_use_stat_tables=@@global.use_stat_tables; +set global use_stat_tables='preferably'; +set debug_sync='RESET'; +set debug_sync='statistics_update_start SIGNAL parker WAIT_FOR go1 EXECUTE 1'; +set debug_sync='thr_multi_lock_after_thr_lock SIGNAL go2 EXECUTE 2'; +use dbt3_s001; +analyze table lineitem persistent for all; +set debug_sync='open_and_process_table WAIT_FOR parker'; +set debug_sync='statistics_read_start SIGNAL go1 WAIT_FOR go2'; +use dbt3_s001; +select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68 order by prefix_arity;; +db_name table_name index_name prefix_arity avg_frequency l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment +dbt3_s001 lineitem i_l_shipdate 1 2.6496 1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +dbt3_s001 lineitem i_l_shipdate 2 1.0149 1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +dbt3_s001 lineitem i_l_shipdate 3 1.0000 1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +set debug_sync='RESET'; +set global use_stat_tables=@save_global_use_stat_tables; +DROP DATABASE dbt3_s001; +use test; +set @save_global_use_stat_tables=@@global.use_stat_tables; +set global use_stat_tables='preferably'; +set debug_sync='RESET'; +create table t1 (a int, b int, key(a)); +insert t1 values (1,1),(2,2); +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SET debug_sync='after_open_table_ignore_flush WAIT_FOR go'; +select * from information_schema.statistics where table_schema='test'; +select * from t1; +a b +1 1 +2 2 +SET DEBUG_SYNC= "now SIGNAL go"; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT +def test t1 1 test a 1 a A 2 NULL NULL YES BTREE +set debug_sync='RESET'; +drop table t1; +set global use_stat_tables=@save_global_use_stat_tables; +set use_stat_tables=@save_use_stat_tables; +set optimizer_switch=@save_optimizer_switch_for_stat_tables_test; +SET SESSION STORAGE_ENGINE=DEFAULT; diff --git a/mysql-test/r/stat_tables_partition.result b/mysql-test/r/stat_tables_partition.result new file mode 100644 index 00000000000..12ae2570272 --- /dev/null +++ b/mysql-test/r/stat_tables_partition.result @@ -0,0 +1,13 @@ +# +# Bug mdev-3866: valgrind complain from ANALYZE on a table with BIT field +# +SET use_stat_tables = 'preferably'; +CREATE TABLE t1 (pk int PRIMARY KEY, a bit(1), INDEX idx(a) +) ENGINE=MyISAM PARTITION BY KEY(pk) PARTITIONS 2; +INSERT INTO t1 VALUES (1,1),(2,0),(3,0),(4,1); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SET use_stat_tables = DEFAULT; +DROP TABLE t1; diff --git a/mysql-test/r/stat_tables_rbr.result b/mysql-test/r/stat_tables_rbr.result new file mode 100644 index 00000000000..119801bf7d4 --- /dev/null +++ b/mysql-test/r/stat_tables_rbr.result @@ -0,0 +1,34 @@ +# +# Bug mdev-463: assertion failure when running ANALYZE with RBR on +# +SET GLOBAL use_stat_tables = PREFERABLY; +CREATE TABLE t1 (i INT) ENGINE=InnoDB; +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +DROP TABLE t1; +SET GLOBAL use_stat_tables = DEFAULT; +SET use_stat_tables = PREFERABLY; +CREATE TABLE t1 ( a INT ) ENGINE=MyISAM PARTITION BY HASH(a) PARTITIONS 2; +ALTER TABLE t1 ANALYZE PARTITION p1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 248 Server ver: #, Binlog ver: # +master-bin.000001 248 Gtid_list 1 273 [] +master-bin.000001 273 Binlog_checkpoint 1 313 master-bin.000001 +master-bin.000001 313 Gtid 1 351 GTID 0-1-1 +master-bin.000001 351 Query 1 451 use `test`; CREATE TABLE t1 (i INT) ENGINE=InnoDB +master-bin.000001 451 Gtid 1 489 GTID 0-1-2 +master-bin.000001 489 Query 1 568 use `test`; ANALYZE TABLE t1 +master-bin.000001 568 Gtid 1 606 GTID 0-1-3 +master-bin.000001 606 Query 1 710 use `test`; DROP TABLE `t1` /* generated by server */ +master-bin.000001 710 Gtid 1 748 GTID 0-1-4 +master-bin.000001 748 Query 1 884 use `test`; CREATE TABLE t1 ( a INT ) ENGINE=MyISAM PARTITION BY HASH(a) PARTITIONS 2 +master-bin.000001 884 Gtid 1 922 GTID 0-1-5 +master-bin.000001 922 Query 1 1020 use `test`; ALTER TABLE t1 ANALYZE PARTITION p1 +SET use_stat_tables = DEFAULT; +DROP TABLE t1; diff --git a/mysql-test/r/stat_tables_repl.result b/mysql-test/r/stat_tables_repl.result new file mode 100644 index 00000000000..132e5f7beae --- /dev/null +++ b/mysql-test/r/stat_tables_repl.result @@ -0,0 +1,46 @@ +include/master-slave.inc +[connection master] +# +# Bug mdev-485: unexpected failure with replication of DROP/ALTER table +# when RBR is on +# +CREATE TABLE t1 ( a int, b int ) ENGINE=MyISAM; +INSERT INTO t1 VALUES (2,20), (1,20), (3,30); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +DROP TABLE t1; +CREATE TABLE t1 ( a int, b int, INDEX idx1(b) ) ENGINE=MyISAM; +INSERT INTO t1 VALUES (2,20), (1,20), (3,30); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +DROP INDEX idx1 ON t1; +DROP TABLE t1; +CREATE TABLE t1 ( a int, b int, INDEX idx1(b) ) ENGINE=MyISAM; +INSERT INTO t1 VALUES (2,20), (1,20), (3,30); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +ALTER TABLE t1 DROP COLUMN b; +DROP TABLE t1; +CREATE TABLE t1 ( a int, b int, INDEX idx1(b) ) ENGINE=MyISAM; +INSERT INTO t1 VALUES (2,20), (1,20), (3,30); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +ALTER TABLE t1 RENAME to s; +DROP TABLE s; +CREATE TABLE t1 ( a int, b int, INDEX idx1(b) ) ENGINE=MyISAM; +INSERT INTO t1 VALUES (2,20), (1,20), (3,30); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +ALTER TABLE t1 CHANGE COLUMN b c int ; +DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/r/statistics.result b/mysql-test/r/statistics.result new file mode 100644 index 00000000000..bd6a0849e3d --- /dev/null +++ b/mysql-test/r/statistics.result @@ -0,0 +1,1643 @@ +drop table if exists t1,t2; +set @save_use_stat_tables=@@use_stat_tables; +DELETE FROM mysql.table_stats; +DELETE FROM mysql.column_stats; +DELETE FROM mysql.index_stats; +set use_stat_tables='preferably'; +CREATE TABLE t1 ( +a int NOT NULL PRIMARY KEY, +b varchar(32), +c char(16), +d date, +e double, +f bit(3), +INDEX idx1 (b, e), +INDEX idx2 (c, d), +INDEX idx3 (d), +INDEX idx4 (e, b, d) +) ENGINE= MYISAM; +INSERT INTO t1 VALUES +(0, NULL, NULL, NULL, NULL, NULL), +(7, 'xxxxxxxxxxxxxxxxxxxxxxxxxx', 'dddddddd', '1990-05-15', 0.1, b'100'), +(17, 'vvvvvvvvvvvvv', 'aaaa', '1989-03-12', 0.01, b'101'), +(1, 'vvvvvvvvvvvvv', NULL, '1989-03-12', 0.01, b'100'), +(12, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'dddddddd', '1999-07-23', 0.112, b'001'), +(23, 'vvvvvvvvvvvvv', 'dddddddd', '1999-07-23', 0.1, b'100'), +(8, 'vvvvvvvvvvvvv', 'aaaa', '1999-07-23', 0.1, b'100'), +(22, 'xxxxxxxxxxxxxxxxxxxxxxxxxx', 'aaaa', '1989-03-12', 0.112, b'001'), +(31, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'aaaa', '1999-07-23', 0.01, b'001'), +(10, NULL, 'aaaa', NULL, 0.01, b'010'), +(5, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'dddddddd', '1999-07-23', 0.1, b'100'), +(15, 'vvvvvvvvvvvvv', 'ccccccccc', '1990-05-15', 0.1, b'010'), +(30, NULL, 'bbbbbb', NULL, NULL, b'100'), +(38, 'zzzzzzzzzzzzzzzzzz', 'bbbbbb', NULL, NULL, NULL), +(18, 'zzzzzzzzzzzzzzzzzz', 'ccccccccc', '1990-05-15', 0.01, b'010'), +(9, 'yyy', 'bbbbbb', '1998-08-28', 0.01, NULL), +(29, 'vvvvvvvvvvvvv', 'dddddddd', '1999-07-23', 0.012, b'010'), +(3, 'yyy', 'dddddddd', '1990-05-15', 0.112, b'010'), +(39, 'zzzzzzzzzzzzzzzzzz', 'bbbbbb', NULL, 0.01, b'100'), +(14, 'xxxxxxxxxxxxxxxxxxxxxxxxxx', 'ccccccccc', '1990-05-15', 0.1, b'100'), +(40, 'zzzzzzzzzzzzzzzzzz', 'bbbbbb', '1989-03-12', NULL, NULL), +(44, NULL, 'aaaa', '1989-03-12', NULL, b'010'), +(19, 'vvvvvvvvvvvvv', 'ccccccccc', '1990-05-15', 0.012, b'011'), +(21, 'zzzzzzzzzzzzzzzzzz', 'dddddddd', '1989-03-12', 0.112, b'100'), +(45, NULL, NULL, '1989-03-12', NULL, b'011'), +(2, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'ccccccccc', '1990-05-15', 0.1, b'001'), +(35, 'yyy', 'aaaa', '1990-05-15', 0.05, b'011'), +(4, 'vvvvvvvvvvvvv', 'dddddddd', '1999-07-23', 0.01, b'101'), +(47, NULL, 'aaaa', '1990-05-15', 0.05, b'010'), +(42, NULL, 'ccccccccc', '1989-03-12', 0.01, b'010'), +(32, NULL, 'bbbbbb', '1990-05-15', 0.01, b'011'), +(49, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'aaaa', '1990-05-15', NULL, NULL), +(43, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'bbbbbb', '1990-05-15', NULL, b'100'), +(37, 'yyy', NULL, '1989-03-12', 0.05, b'011'), +(41, 'xxxxxxxxxxxxxxxxxxxxxxxxxx', 'ccccccccc', '1990-05-15', 0.05, NULL), +(34, 'yyy', NULL, NULL, NULL, NULL), +(33, 'zzzzzzzzzzzzzzzzzz', 'dddddddd', '1989-03-12', 0.05, b'011'), +(24, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'dddddddd', '1990-05-15', 0.01, b'101'), +(11, 'yyy', 'ccccccccc', '1999-07-23', 0.1, NULL), +(25, 'zzzzzzzzzzzzzzzzzz', 'bbb', '1989-03-12', 0.01, b'101'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SELECT * FROM mysql.table_stats; +db_name table_name cardinality +test t1 40 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx1 1 6.4000 +test t1 idx1 2 1.6875 +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 +test t1 idx4 1 6.2000 +test t1 idx4 2 1.6875 +test t1 idx4 3 1.1304 +SELECT COUNT(*) FROM t1; +COUNT(*) +40 +SELECT * FROM mysql.column_stats +WHERE db_name='test' AND table_name='t1' AND column_name='a'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +SELECT MIN(t1.a), MAX(t1.a), +(SELECT COUNT(*) FROM t1 WHERE t1.b IS NULL) / +(SELECT COUNT(*) FROM t1) AS "NULLS_RATIO(t1.a)", +(SELECT COUNT(t1.a) FROM t1) / +(SELECT COUNT(DISTINCT t1.a) FROM t1) AS "AVG_FREQUENCY(t1.a)" +FROM t1; +MIN(t1.a) MAX(t1.a) NULLS_RATIO(t1.a) AVG_FREQUENCY(t1.a) +0 49 0.2000 1.0000 +SELECT * FROM mysql.column_stats +WHERE db_name='test' AND table_name='t1' AND column_name='b'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +SELECT MIN(t1.b), MAX(t1.b), +(SELECT COUNT(*) FROM t1 WHERE t1.b IS NULL) / +(SELECT COUNT(*) FROM t1) AS "NULLS_RATIO(t1.b)", +(SELECT COUNT(t1.b) FROM t1) / +(SELECT COUNT(DISTINCT t1.b) FROM t1) AS "AVG_FREQUENCY(t1.b)" +FROM t1; +MIN(t1.b) MAX(t1.b) NULLS_RATIO(t1.b) AVG_FREQUENCY(t1.b) +vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 6.4000 +SELECT * FROM mysql.column_stats +WHERE db_name='test' AND table_name='t1' AND column_name='c'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +SELECT MIN(t1.c), MAX(t1.c), +(SELECT COUNT(*) FROM t1 WHERE t1.c IS NULL) / +(SELECT COUNT(*) FROM t1) AS "NULLS_RATIO(t1.c)", +(SELECT COUNT(t1.c) FROM t1) / +(SELECT COUNT(DISTINCT t1.c) FROM t1) AS "AVG_FREQUENCY(t1.c)" +FROM t1; +MIN(t1.c) MAX(t1.c) NULLS_RATIO(t1.c) AVG_FREQUENCY(t1.c) +aaaa dddddddd 0.1250 7.0000 +SELECT * FROM mysql.column_stats +WHERE db_name='test' AND table_name='t1' AND column_name='d'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +SELECT MIN(t1.d), MAX(t1.d), +(SELECT COUNT(*) FROM t1 WHERE t1.d IS NULL) / +(SELECT COUNT(*) FROM t1) AS "NULLS_RATIO(t1.d)", +(SELECT COUNT(t1.d) FROM t1) / +(SELECT COUNT(DISTINCT t1.d) FROM t1) AS "AVG_FREQUENCY(t1.d)" +FROM t1; +MIN(t1.d) MAX(t1.d) NULLS_RATIO(t1.d) AVG_FREQUENCY(t1.d) +1989-03-12 1999-07-23 0.1500 8.5000 +SELECT * FROM mysql.column_stats +WHERE db_name='test' AND table_name='t1' AND column_name='e'; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +SELECT MIN(t1.e), MAX(t1.e), +(SELECT COUNT(*) FROM t1 WHERE t1.e IS NULL) / +(SELECT COUNT(*) FROM t1) AS "NULLS_RATIO(t1.e)", +(SELECT COUNT(t1.e) FROM t1) / +(SELECT COUNT(DISTINCT t1.e) FROM t1) AS "AVG_FREQUENCY(t1.e)" +FROM t1; +MIN(t1.e) MAX(t1.e) NULLS_RATIO(t1.e) AVG_FREQUENCY(t1.e) +0.01 0.112 0.2250 6.2000 +SELECT * FROM mysql.index_stats +WHERE db_name='test' AND table_name='t1' AND index_name='idx1'; +db_name table_name index_name prefix_arity avg_frequency +test t1 idx1 1 6.4000 +test t1 idx1 2 1.6875 +SELECT +(SELECT COUNT(*) FROM t1 WHERE t1.b IS NOT NULL) / +(SELECT COUNT(DISTINCT t1.b) FROM t1 WHERE t1.b IS NOT NULL) +AS 'ARITY 1', +(SELECT COUNT(*) FROM t1 WHERE t1.b IS NOT NULL AND t1.e IS NOT NULL) / +(SELECT COUNT(DISTINCT t1.b, t1.e) FROM t1 +WHERE t1.b IS NOT NULL AND t1.e IS NOT NULL) +AS 'ARITY 2'; +ARITY 1 ARITY 2 +6.4000 1.6875 +SELECT * FROM mysql.index_stats +WHERE db_name='test' AND table_name='t1' AND index_name='idx2'; +db_name table_name index_name prefix_arity avg_frequency +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +SELECT +(SELECT COUNT(*) FROM t1 WHERE t1.c IS NOT NULL) / +(SELECT COUNT(DISTINCT t1.c) FROM t1 WHERE t1.c IS NOT NULL) +AS 'ARITY 1', +(SELECT COUNT(*) FROM t1 WHERE t1.c IS NOT NULL AND t1.d IS NOT NULL) / +(SELECT COUNT(DISTINCT t1.c, t1.d) FROM t1 +WHERE t1.c IS NOT NULL AND t1.d IS NOT NULL) +AS 'ARITY 2'; +ARITY 1 ARITY 2 +7.0000 2.3846 +SELECT * FROM mysql.index_stats +WHERE db_name='test' AND table_name='t1' AND index_name='idx3'; +db_name table_name index_name prefix_arity avg_frequency +test t1 idx3 1 8.5000 +SELECT +(SELECT COUNT(*) FROM t1 WHERE t1.d IS NOT NULL) / +(SELECT COUNT(DISTINCT t1.d) FROM t1 WHERE t1.d IS NOT NULL) +AS 'ARITY 1'; +ARITY 1 +8.5000 +SELECT * FROM mysql.index_stats +WHERE db_name='test' AND table_name='t1' AND index_name='idx4'; +db_name table_name index_name prefix_arity avg_frequency +test t1 idx4 1 6.2000 +test t1 idx4 2 1.6875 +test t1 idx4 3 1.1304 +SELECT +(SELECT COUNT(*) FROM t1 WHERE t1.e IS NOT NULL) / +(SELECT COUNT(DISTINCT t1.e) FROM t1 WHERE t1.e IS NOT NULL) +AS 'ARITY 1', +(SELECT COUNT(*) FROM t1 WHERE t1.e IS NOT NULL AND t1.b IS NOT NULL) / +(SELECT COUNT(DISTINCT t1.e, t1.b) FROM t1 +WHERE t1.e IS NOT NULL AND t1.b IS NOT NULL) +AS 'ARITY 2', +(SELECT COUNT(*) FROM t1 +WHERE t1.e IS NOT NULL AND t1.b IS NOT NULL AND t1.d IS NOT NULL) / +(SELECT COUNT(DISTINCT t1.e, t1.b, t1.d) FROM t1 +WHERE t1.e IS NOT NULL AND t1.b IS NOT NULL AND t1.d IS NOT NULL) +AS 'ARITY 3'; +ARITY 1 ARITY 2 ARITY 3 +6.2000 1.6875 1.1304 +DELETE FROM mysql.column_stats; +set histogram_size=4; +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status Table is already up to date +SELECT db_name, table_name, column_name, +min_value, max_value, +nulls_ratio, avg_frequency, +hist_size, hist_type, HEX(histogram) +FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type HEX(histogram) +test t1 a 0 49 0.0000 1.0000 4 SINGLE_PREC_HB 2E62A1D0 +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 6.4000 4 SINGLE_PREC_HB 003FBFFF +test t1 c aaaa dddddddd 0.1250 7.0000 4 SINGLE_PREC_HB 0055AAFF +test t1 d 1989-03-12 1999-07-23 0.1500 8.5000 4 SINGLE_PREC_HB 001919FF +test t1 e 0.01 0.112 0.2250 6.2000 4 SINGLE_PREC_HB 000564E1 +test t1 f 1 5 0.2000 6.4000 4 SINGLE_PREC_HB 3F7FBFBF +DELETE FROM mysql.column_stats; +set histogram_size=8; +set histogram_type='DOUBLE_PREC_HB'; +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status Table is already up to date +SELECT db_name, table_name, column_name, +min_value, max_value, +nulls_ratio, avg_frequency, +hist_size, hist_type, HEX(histogram) +FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type HEX(histogram) +test t1 a 0 49 0.0000 1.0000 8 DOUBLE_PREC_HB 052F4363F4A1F9D0 +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 6.4000 8 DOUBLE_PREC_HB 0000FF3FFFBFFFFF +test t1 c aaaa dddddddd 0.1250 7.0000 8 DOUBLE_PREC_HB 00005555AAAAFFFF +test t1 d 1989-03-12 1999-07-23 0.1500 8.5000 8 DOUBLE_PREC_HB 0000031A031AFFFF +test t1 e 0.01 0.112 0.2250 6.2000 8 DOUBLE_PREC_HB 000005056464E1E1 +test t1 f 1 5 0.2000 6.4000 8 DOUBLE_PREC_HB FF3FFF7FFFBFFFBF +DELETE FROM mysql.column_stats; +set histogram_size= 0; +set histogram_type=default; +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status Table is already up to date +CREATE TABLE t3 ( +a int NOT NULL PRIMARY KEY, +b varchar(32), +c char(16), +INDEX idx (c) +) ENGINE=MYISAM; +INSERT INTO t3 VALUES +(0, NULL, NULL), +(7, 'xxxxxxxxxxxxxxxxxxxxxxxxxx', 'dddddddd'), +(17, 'vvvvvvvvvvvvv', 'aaaa'), +(1, 'vvvvvvvvvvvvv', NULL), +(12, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'dddddddd'), +(23, 'vvvvvvvvvvvvv', 'dddddddd'), +(8, 'vvvvvvvvvvvvv', 'aaaa'), +(22, 'xxxxxxxxxxxxxxxxxxxxxxxxxx', 'aaaa'), +(31, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'aaaa'), +(10, NULL, 'aaaa'), +(5, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'dddddddd'), +(15, 'vvvvvvvvvvvvv', 'ccccccccc'), +(30, NULL, 'bbbbbb'), +(38, 'zzzzzzzzzzzzzzzzzz', 'bbbbbb'), +(18, 'zzzzzzzzzzzzzzzzzz', 'ccccccccc'), +(9, 'yyy', 'bbbbbb'), +(29, 'vvvvvvvvvvvvv', 'dddddddd'); +ANALYZE TABLE t3; +Table Op Msg_type Msg_text +test.t3 analyze status Engine-independent statistics collected +test.t3 analyze status OK +SELECT * FROM mysql.table_stats; +db_name table_name cardinality +test t1 40 +test t3 17 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +test t3 a 0 38 0.0000 4.0000 1.0000 0 NULL NULL +test t3 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.1765 18.0714 2.8000 0 NULL NULL +test t3 c aaaa dddddddd 0.1176 6.4000 3.7500 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx1 1 6.4000 +test t1 idx1 2 1.6875 +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 +test t1 idx4 1 6.2000 +test t1 idx4 2 1.6875 +test t1 idx4 3 1.1304 +test t3 PRIMARY 1 1.0000 +test t3 idx 1 3.7500 +ALTER TABLE t1 RENAME TO s1; +SELECT * FROM mysql.table_stats; +db_name table_name cardinality +test s1 40 +test t3 17 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test s1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test s1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test s1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test s1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test s1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test s1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +test t3 a 0 38 0.0000 4.0000 1.0000 0 NULL NULL +test t3 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.1765 18.0714 2.8000 0 NULL NULL +test t3 c aaaa dddddddd 0.1176 6.4000 3.7500 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test s1 PRIMARY 1 1.0000 +test s1 idx1 1 6.4000 +test s1 idx1 2 1.6875 +test s1 idx2 1 7.0000 +test s1 idx2 2 2.3846 +test s1 idx3 1 8.5000 +test s1 idx4 1 6.2000 +test s1 idx4 2 1.6875 +test s1 idx4 3 1.1304 +test t3 PRIMARY 1 1.0000 +test t3 idx 1 3.7500 +RENAME TABLE s1 TO t1; +SELECT * FROM mysql.table_stats; +db_name table_name cardinality +test t1 40 +test t3 17 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +test t3 a 0 38 0.0000 4.0000 1.0000 0 NULL NULL +test t3 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.1765 18.0714 2.8000 0 NULL NULL +test t3 c aaaa dddddddd 0.1176 6.4000 3.7500 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx1 1 6.4000 +test t1 idx1 2 1.6875 +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 +test t1 idx4 1 6.2000 +test t1 idx4 2 1.6875 +test t1 idx4 3 1.1304 +test t3 PRIMARY 1 1.0000 +test t3 idx 1 3.7500 +DROP TABLE t3; +SELECT * FROM mysql.table_stats; +db_name table_name cardinality +test t1 40 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx1 1 6.4000 +test t1 idx1 2 1.6875 +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 +test t1 idx4 1 6.2000 +test t1 idx4 2 1.6875 +test t1 idx4 3 1.1304 +CREATE TEMPORARY TABLE t0 ( +a int NOT NULL PRIMARY KEY, +b varchar(32) +); +INSERT INTO t0 SELECT a,b FROM t1; +ALTER TABLE t1 CHANGE COLUMN b x varchar(32), +CHANGE COLUMN e y double; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `x` varchar(32) DEFAULT NULL, + `c` char(16) DEFAULT NULL, + `d` date DEFAULT NULL, + `y` double DEFAULT NULL, + `f` bit(3) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `idx1` (`x`,`y`), + KEY `idx2` (`c`,`d`), + KEY `idx3` (`d`), + KEY `idx4` (`y`,`x`,`d`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 x vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 y 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +ALTER TABLE t1 CHANGE COLUMN x b varchar(32), +CHANGE COLUMN y e double; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(32) DEFAULT NULL, + `c` char(16) DEFAULT NULL, + `d` date DEFAULT NULL, + `e` double DEFAULT NULL, + `f` bit(3) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `idx1` (`b`,`e`), + KEY `idx2` (`c`,`d`), + KEY `idx3` (`d`), + KEY `idx4` (`e`,`b`,`d`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +ALTER TABLE t1 RENAME TO s1, CHANGE COLUMN b x varchar(32); +SHOW CREATE TABLE s1; +Table Create Table +s1 CREATE TABLE `s1` ( + `a` int(11) NOT NULL, + `x` varchar(32) DEFAULT NULL, + `c` char(16) DEFAULT NULL, + `d` date DEFAULT NULL, + `e` double DEFAULT NULL, + `f` bit(3) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `idx1` (`x`,`e`), + KEY `idx2` (`c`,`d`), + KEY `idx3` (`d`), + KEY `idx4` (`e`,`x`,`d`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM mysql.table_stats; +db_name table_name cardinality +test s1 40 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test s1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test s1 x vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test s1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test s1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test s1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test s1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test s1 PRIMARY 1 1.0000 +test s1 idx1 1 6.4000 +test s1 idx1 2 1.6875 +test s1 idx2 1 7.0000 +test s1 idx2 2 2.3846 +test s1 idx3 1 8.5000 +test s1 idx4 1 6.2000 +test s1 idx4 2 1.6875 +test s1 idx4 3 1.1304 +ALTER TABLE s1 RENAME TO t1, CHANGE COLUMN x b varchar(32); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(32) DEFAULT NULL, + `c` char(16) DEFAULT NULL, + `d` date DEFAULT NULL, + `e` double DEFAULT NULL, + `f` bit(3) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `idx1` (`b`,`e`), + KEY `idx2` (`c`,`d`), + KEY `idx3` (`d`), + KEY `idx4` (`e`,`b`,`d`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM mysql.table_stats; +db_name table_name cardinality +test t1 40 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx1 1 6.4000 +test t1 idx1 2 1.6875 +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 +test t1 idx4 1 6.2000 +test t1 idx4 2 1.6875 +test t1 idx4 3 1.1304 +ALTER TABLE t1 CHANGE COLUMN b x varchar(30); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `x` varchar(30) DEFAULT NULL, + `c` char(16) DEFAULT NULL, + `d` date DEFAULT NULL, + `e` double DEFAULT NULL, + `f` bit(3) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `idx1` (`x`,`e`), + KEY `idx2` (`c`,`d`), + KEY `idx3` (`d`), + KEY `idx4` (`e`,`x`,`d`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 +ALTER TABLE t1 CHANGE COLUMN x b varchar(32); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(32) DEFAULT NULL, + `c` char(16) DEFAULT NULL, + `d` date DEFAULT NULL, + `e` double DEFAULT NULL, + `f` bit(3) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `idx1` (`b`,`e`), + KEY `idx2` (`c`,`d`), + KEY `idx3` (`d`), + KEY `idx4` (`e`,`b`,`d`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 +ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx4); +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx4 3 1.1304 +test t1 idx4 2 1.6875 +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 +test t1 idx4 1 6.2000 +test t1 idx1 2 1.6875 +test t1 idx1 1 6.4000 +SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/save_column_stats' + FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' + FROM mysql.column_stats WHERE column_name='b'; +SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/save_index_stats' + FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' + FROM mysql.index_stats WHERE index_name IN ('idx1', 'idx4'); +ALTER TABLE t1 CHANGE COLUMN b x varchar(30); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `x` varchar(30) DEFAULT NULL, + `c` char(16) DEFAULT NULL, + `d` date DEFAULT NULL, + `e` double DEFAULT NULL, + `f` bit(3) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `idx1` (`x`,`e`), + KEY `idx2` (`c`,`d`), + KEY `idx3` (`d`), + KEY `idx4` (`e`,`x`,`d`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 +ALTER TABLE t1 CHANGE COLUMN x b varchar(32); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(32) DEFAULT NULL, + `c` char(16) DEFAULT NULL, + `d` date DEFAULT NULL, + `e` double DEFAULT NULL, + `f` bit(3) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `idx1` (`b`,`e`), + KEY `idx2` (`c`,`d`), + KEY `idx3` (`d`), + KEY `idx4` (`e`,`b`,`d`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/save_column_stats' + INTO TABLE mysql.column_stats +FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n'; +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/save_index_stats' + INTO TABLE mysql.index_stats +FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n'; +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx4 3 1.1304 +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 +test t1 idx4 2 1.6875 +test t1 idx4 1 6.2000 +test t1 idx1 2 1.6875 +test t1 idx1 1 6.4000 +ALTER TABLE t1 DROP COLUMN b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `c` char(16) DEFAULT NULL, + `d` date DEFAULT NULL, + `e` double DEFAULT NULL, + `f` bit(3) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `idx1` (`e`), + KEY `idx2` (`c`,`d`), + KEY `idx3` (`d`), + KEY `idx4` (`e`,`d`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 +DROP INDEX idx2 ON t1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `c` char(16) DEFAULT NULL, + `d` date DEFAULT NULL, + `e` double DEFAULT NULL, + `f` bit(3) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `idx1` (`e`), + KEY `idx3` (`d`), + KEY `idx4` (`e`,`d`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx3 1 8.5000 +DROP INDEX idx1 ON t1; +DROP INDEX idx4 ON t1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `c` char(16) DEFAULT NULL, + `d` date DEFAULT NULL, + `e` double DEFAULT NULL, + `f` bit(3) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `idx3` (`d`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +ALTER TABLE t1 ADD COLUMN b varchar(32); +CREATE INDEX idx1 ON t1(b, e); +CREATE INDEX idx2 ON t1(c, d); +CREATE INDEX idx4 ON t1(e, b, d); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `c` char(16) DEFAULT NULL, + `d` date DEFAULT NULL, + `e` double DEFAULT NULL, + `f` bit(3) DEFAULT NULL, + `b` varchar(32) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `idx3` (`d`), + KEY `idx1` (`b`,`e`), + KEY `idx2` (`c`,`d`), + KEY `idx4` (`e`,`b`,`d`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx3 1 8.5000 +ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4); +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 b NULL NULL 1.0000 NULL NULL 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx2 1 7.0000 +test t1 idx1 2 NULL +test t1 idx1 1 NULL +test t1 idx3 1 8.5000 +test t1 idx2 2 2.3846 +test t1 idx4 1 6.2000 +test t1 idx4 2 NULL +test t1 idx4 3 NULL +UPDATE t1 SET b=(SELECT b FROM t0 WHERE t0.a= t1.a); +ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4); +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx2 1 7.0000 +test t1 idx1 2 1.6875 +test t1 idx1 1 6.4000 +test t1 idx3 1 8.5000 +test t1 idx2 2 2.3846 +test t1 idx4 1 6.2000 +test t1 idx4 2 1.6875 +test t1 idx4 3 1.1304 +ALTER TABLE t1 DROP COLUMN b, +DROP INDEX idx1, DROP INDEX idx2, DROP INDEX idx4; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `c` char(16) DEFAULT NULL, + `d` date DEFAULT NULL, + `e` double DEFAULT NULL, + `f` bit(3) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `idx3` (`d`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx3 1 8.5000 +ALTER TABLE t1 ADD COLUMN b varchar(32); +ALTER TABLE t1 +ADD INDEX idx1 (b, e), ADD INDEX idx2 (c, d), ADD INDEX idx4 (e, b, d); +UPDATE t1 SET b=(SELECT b FROM t0 WHERE t0.a= t1.a); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `c` char(16) DEFAULT NULL, + `d` date DEFAULT NULL, + `e` double DEFAULT NULL, + `f` bit(3) DEFAULT NULL, + `b` varchar(32) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `idx3` (`d`), + KEY `idx1` (`b`,`e`), + KEY `idx2` (`c`,`d`), + KEY `idx4` (`e`,`b`,`d`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx3 1 8.5000 +ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4); +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx4 1 6.2000 +test t1 idx4 2 1.6875 +test t1 idx3 1 8.5000 +test t1 idx2 2 2.3846 +test t1 idx2 1 7.0000 +test t1 idx1 2 1.6875 +test t1 idx1 1 6.4000 +test t1 idx4 3 1.1304 +DELETE FROM mysql.table_stats; +DELETE FROM mysql.column_stats; +DELETE FROM mysql.index_stats; +ANALYZE TABLE t1 PERSISTENT FOR COLUMNS() INDEXES(); +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status Table is already up to date +SELECT * FROM mysql.table_stats; +db_name table_name cardinality +test t1 40 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(c,e,b) INDEXES(idx2,idx4); +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status Table is already up to date +SELECT * FROM mysql.table_stats; +db_name table_name cardinality +test t1 40 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx4 1 6.2000 +test t1 idx4 2 1.6875 +test t1 idx4 3 1.1304 +DELETE FROM mysql.index_stats WHERE table_name='t1' AND index_name='primary'; +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx4 1 6.2000 +test t1 idx4 2 1.6875 +test t1 idx4 3 1.1304 +ANALYZE TABLE t1 PERSISTENT FOR COLUMNS() INDEXES(primary); +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status Table is already up to date +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx4 1 6.2000 +test t1 idx4 2 1.6875 +test t1 idx4 3 1.1304 +test t1 PRIMARY 1 1.0000 +DELETE FROM mysql.table_stats; +DELETE FROM mysql.column_stats; +DELETE FROM mysql.index_stats; +ANALYZE TABLE t1 PERSISTENT FOR COLUMNS ALL INDEXES ALL; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status Table is already up to date +SELECT * FROM mysql.table_stats; +db_name table_name cardinality +test t1 40 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx3 1 8.5000 +test t1 idx1 1 6.4000 +test t1 idx1 2 1.6875 +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx4 1 6.2000 +test t1 idx4 2 1.6875 +test t1 idx4 3 1.1304 +CREATE TABLE t2 LIKE t1; +ALTER TABLE t2 ENGINE=InnoDB; +INSERT INTO t2 SELECT * FROM t1; +set optimizer_switch='extended_keys=off'; +ANALYZE TABLE t2; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +SELECT * FROM mysql.table_stats; +db_name table_name cardinality +test t1 40 +test t2 40 +SELECT * FROM mysql.column_stats ORDER BY column_name; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t2 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test t2 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t2 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t2 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t2 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +test t2 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t2 PRIMARY 1 1.0000 +test t1 idx1 1 6.4000 +test t2 idx1 1 6.4000 +test t1 idx1 2 1.6875 +test t2 idx1 2 1.6875 +test t1 idx2 1 7.0000 +test t2 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t2 idx2 2 2.3846 +test t1 idx3 1 8.5000 +test t2 idx3 1 8.5000 +test t1 idx4 1 6.2000 +test t2 idx4 1 6.2000 +test t1 idx4 2 1.6875 +test t2 idx4 2 1.6875 +test t1 idx4 3 1.1304 +test t2 idx4 3 1.1304 +DELETE FROM mysql.table_stats; +DELETE FROM mysql.column_stats; +DELETE FROM mysql.index_stats; +set optimizer_switch='extended_keys=on'; +ANALYZE TABLE t2; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +SELECT * FROM mysql.table_stats; +db_name table_name cardinality +test t2 40 +SELECT * FROM mysql.column_stats ORDER BY column_name; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t2 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t2 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test t2 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t2 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t2 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t2 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name; +db_name table_name index_name prefix_arity avg_frequency +test t2 PRIMARY 1 1.0000 +test t2 idx1 1 6.4000 +test t2 idx1 2 1.6875 +test t2 idx1 3 1.0000 +test t2 idx2 1 7.0000 +test t2 idx2 2 2.3846 +test t2 idx2 3 1.0000 +test t2 idx3 1 8.5000 +test t2 idx3 2 1.0000 +test t2 idx4 1 6.2000 +test t2 idx4 2 1.6875 +test t2 idx4 3 1.1304 +test t2 idx4 4 1.0000 +ALTER TABLE t2 DROP PRIMARY KEY, DROP INDEX idx1; +SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name; +db_name table_name index_name prefix_arity avg_frequency +test t2 idx2 1 7.0000 +test t2 idx2 2 2.3846 +test t2 idx3 1 8.5000 +test t2 idx4 1 6.2000 +test t2 idx4 2 1.6875 +test t2 idx4 3 1.1304 +UPDATE t2 SET b=0 WHERE b IS NULL; +ALTER TABLE t2 ADD PRIMARY KEY (a,b); +SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name; +db_name table_name index_name prefix_arity avg_frequency +test t2 idx2 1 7.0000 +test t2 idx2 2 2.3846 +test t2 idx3 1 8.5000 +test t2 idx4 1 6.2000 +test t2 idx4 2 1.6875 +test t2 idx4 3 1.1304 +ANALYZE TABLE t2 PERSISTENT FOR COLUMNS() INDEXES ALL; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name; +db_name table_name index_name prefix_arity avg_frequency +test t2 PRIMARY 1 1.0000 +test t2 PRIMARY 2 1.0000 +test t2 idx2 1 7.0000 +test t2 idx2 2 2.3846 +test t2 idx2 3 1.0000 +test t2 idx2 4 1.0000 +test t2 idx3 1 8.5000 +test t2 idx3 2 1.0000 +test t2 idx3 3 1.0000 +test t2 idx4 1 6.2000 +test t2 idx4 2 1.7222 +test t2 idx4 3 1.1154 +test t2 idx4 4 1.0000 +ALTER TABLE t2 CHANGE COLUMN b b varchar(30); +SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name; +db_name table_name index_name prefix_arity avg_frequency +test t2 idx2 1 7.0000 +test t2 idx2 2 2.3846 +test t2 idx3 1 8.5000 +ANALYZE TABLE t2 PERSISTENT FOR COLUMNS ALL INDEXES ALL; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name; +db_name table_name index_name prefix_arity avg_frequency +test t2 PRIMARY 1 1.0000 +test t2 PRIMARY 2 1.0000 +test t2 idx2 1 7.0000 +test t2 idx2 2 2.3846 +test t2 idx2 3 1.0000 +test t2 idx2 4 1.0000 +test t2 idx3 1 8.5000 +test t2 idx3 2 1.0000 +test t2 idx3 3 1.0000 +test t2 idx4 1 6.2000 +test t2 idx4 2 1.7222 +test t2 idx4 3 1.1154 +test t2 idx4 4 1.0000 +ALTER TABLE t2 CHANGE COLUMN b b varchar(32); +SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name; +db_name table_name index_name prefix_arity avg_frequency +test t2 PRIMARY 1 1.0000 +test t2 PRIMARY 2 1.0000 +test t2 idx2 1 7.0000 +test t2 idx2 2 2.3846 +test t2 idx2 3 1.0000 +test t2 idx2 4 1.0000 +test t2 idx3 1 8.5000 +test t2 idx3 2 1.0000 +test t2 idx3 3 1.0000 +test t2 idx4 1 6.2000 +test t2 idx4 2 1.7222 +test t2 idx4 3 1.1154 +test t2 idx4 4 1.0000 +ANALYZE TABLE t2 PERSISTENT FOR COLUMNS ALL INDEXES ALL; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name; +db_name table_name index_name prefix_arity avg_frequency +test t2 PRIMARY 1 1.0000 +test t2 PRIMARY 2 1.0000 +test t2 idx2 1 7.0000 +test t2 idx2 2 2.3846 +test t2 idx2 3 1.0000 +test t2 idx2 4 1.0000 +test t2 idx3 1 8.5000 +test t2 idx3 2 1.0000 +test t2 idx3 3 1.0000 +test t2 idx4 1 6.2000 +test t2 idx4 2 1.7222 +test t2 idx4 3 1.1154 +test t2 idx4 4 1.0000 +ALTER TABLE t2 DROP COLUMN b; +SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name; +db_name table_name index_name prefix_arity avg_frequency +test t2 idx2 1 7.0000 +test t2 idx2 2 2.3846 +test t2 idx3 1 8.5000 +ANALYZE TABLE t2 PERSISTENT FOR COLUMNS() INDEXES ALL; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name; +db_name table_name index_name prefix_arity avg_frequency +test t2 PRIMARY 1 1.0000 +test t2 idx2 1 7.0000 +test t2 idx2 2 2.3846 +test t2 idx2 3 1.0000 +test t2 idx3 1 8.5000 +test t2 idx3 2 1.0000 +test t2 idx4 1 6.2000 +test t2 idx4 2 2.2308 +test t2 idx4 3 1.0000 +set optimizer_switch='extended_keys=off'; +ALTER TABLE t1 +DROP INDEX idx1, +DROP INDEX idx4; +ALTER TABLE t1 +MODIFY COLUMN b text, +ADD INDEX idx1 (b(4), e), +ADD INDEX idx4 (e, b(4), d); +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t2 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t2 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t2 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t2 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t2 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t2 idx3 1 8.5000 +test t2 idx2 1 7.0000 +test t2 idx2 2 2.3846 +test t2 idx2 3 1.0000 +test t2 idx4 1 6.2000 +test t2 idx4 2 2.2308 +test t2 idx4 3 1.0000 +test t2 idx3 2 1.0000 +test t2 PRIMARY 1 1.0000 +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t2 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t2 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t2 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t2 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t2 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +test t1 b NULL NULL 0.2000 17.1250 NULL NULL NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 idx2 1 7.0000 +test t2 idx3 1 8.5000 +test t1 idx3 1 8.5000 +test t1 PRIMARY 1 1.0000 +test t2 idx2 1 7.0000 +test t2 idx2 2 2.3846 +test t2 idx2 3 1.0000 +test t2 idx4 1 6.2000 +test t2 idx4 2 2.2308 +test t2 idx4 3 1.0000 +test t2 idx3 2 1.0000 +test t2 PRIMARY 1 1.0000 +test t1 idx2 2 2.3846 +test t1 idx1 1 NULL +test t1 idx1 2 NULL +test t1 idx4 1 6.2000 +test t1 idx4 2 NULL +test t1 idx4 3 NULL +DELETE FROM mysql.table_stats; +DELETE FROM mysql.column_stats; +DELETE FROM mysql.index_stats; +ANALYZE TABLE mysql.column_stats PERSISTENT FOR ALL; +Table Op Msg_type Msg_text +mysql.column_stats analyze error Invalid argument +ANALYZE TABLE mysql.column_stats; +Table Op Msg_type Msg_text +mysql.column_stats analyze status OK +SELECT * FROM mysql.table_stats; +db_name table_name cardinality +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +set use_stat_tables='never'; +ANALYZE TABLE t1 PERSISTENT FOR ALL; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status Table is already up to date +SELECT * FROM mysql.table_stats; +db_name table_name cardinality +test t1 40 +SELECT * FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +test t1 b NULL NULL 0.2000 17.1250 NULL NULL NULL NULL +SELECT * FROM mysql.index_stats; +db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 +test t1 idx3 1 8.5000 +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx1 1 NULL +test t1 idx1 2 NULL +test t1 idx4 1 6.2000 +test t1 idx4 2 NULL +test t1 idx4 3 NULL +DELETE FROM mysql.table_stats; +DELETE FROM mysql.column_stats; +DELETE FROM mysql.index_stats; +DROP TABLE t1,t2; +set names utf8; +CREATE DATABASE world; +use world; +CREATE TABLE Country ( +Code char(3) NOT NULL default '', +Name char(52) NOT NULL default '', +SurfaceArea float(10,2) NOT NULL default '0.00', +Population int(11) NOT NULL default '0', +Capital int(11) default NULL, +PRIMARY KEY (Code), +UNIQUE INDEX (Name) +) CHARACTER SET utf8 COLLATE utf8_bin; +CREATE TABLE City ( +ID int(11) NOT NULL auto_increment, +Name char(35) NOT NULL default '', +Country char(3) NOT NULL default '', +Population int(11) NOT NULL default '0', +PRIMARY KEY (ID), +INDEX (Population), +INDEX (Country) +) CHARACTER SET utf8 COLLATE utf8_bin; +CREATE TABLE CountryLanguage ( +Country char(3) NOT NULL default '', +Language char(30) NOT NULL default '', +Percentage float(3,1) NOT NULL default '0.0', +PRIMARY KEY (Country, Language), +INDEX (Percentage) +) CHARACTER SET utf8 COLLATE utf8_bin; +set use_stat_tables='preferably'; +ANALYZE TABLE Country, City, CountryLanguage; +SELECT UPPER(db_name), UPPER(table_name), cardinality +FROM mysql.table_stats; +UPPER(db_name) UPPER(table_name) cardinality +WORLD COUNTRY 239 +WORLD CITY 4079 +WORLD COUNTRYLANGUAGE 984 +SELECT UPPER(db_name), UPPER(table_name), +column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency +FROM mysql.column_stats; +UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency +WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000 +WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000 +WORLD COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042 +WORLD COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575 +WORLD COUNTRY Capital 1 4074 0.0293 4.0000 1.0000 +WORLD CITY ID 1 4079 0.0000 4.0000 1.0000 +WORLD CITY Name A Coruña (La Coruña) Ürgenc 0.0000 8.6416 1.0195 +WORLD CITY Country ABW ZWE 0.0000 3.0000 17.5819 +WORLD CITY Population 42 10500000 0.0000 4.0000 1.0467 +WORLD COUNTRYLANGUAGE Country ABW ZWE 0.0000 3.0000 4.2232 +WORLD COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532 +WORLD COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640 +SELECT UPPER(db_name), UPPER(table_name), +index_name, prefix_arity, avg_frequency +FROM mysql.index_stats; +UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency +WORLD COUNTRY PRIMARY 1 1.0000 +WORLD COUNTRY Name 1 1.0000 +WORLD CITY PRIMARY 1 1.0000 +WORLD CITY Population 1 1.0467 +WORLD CITY Country 1 17.5819 +WORLD COUNTRYLANGUAGE PRIMARY 1 4.2232 +WORLD COUNTRYLANGUAGE PRIMARY 2 1.0000 +WORLD COUNTRYLANGUAGE Percentage 1 2.7640 +use test; +set use_stat_tables='never'; +CREATE DATABASE world_innodb; +use world_innodb; +CREATE TABLE Country ( +Code char(3) NOT NULL default '', +Name char(52) NOT NULL default '', +SurfaceArea float(10,2) NOT NULL default '0.00', +Population int(11) NOT NULL default '0', +Capital int(11) default NULL, +PRIMARY KEY (Code), +UNIQUE INDEX (Name) +) CHARACTER SET utf8 COLLATE utf8_bin; +CREATE TABLE City ( +ID int(11) NOT NULL auto_increment, +Name char(35) NOT NULL default '', +Country char(3) NOT NULL default '', +Population int(11) NOT NULL default '0', +PRIMARY KEY (ID), +INDEX (Population), +INDEX (Country) +) CHARACTER SET utf8 COLLATE utf8_bin; +CREATE TABLE CountryLanguage ( +Country char(3) NOT NULL default '', +Language char(30) NOT NULL default '', +Percentage float(3,1) NOT NULL default '0.0', +PRIMARY KEY (Country, Language), +INDEX (Percentage) +) CHARACTER SET utf8 COLLATE utf8_bin; +ALTER TABLE Country ENGINE=InnoDB; +ALTER TABLE City ENGINE=InnoDB; +ALTER TABLE CountryLanguage ENGINE=InnoDB; +set use_stat_tables='preferably'; +ANALYZE TABLE Country, City, CountryLanguage; +SELECT UPPER(db_name), UPPER(table_name), cardinality +FROM mysql.table_stats; +UPPER(db_name) UPPER(table_name) cardinality +WORLD COUNTRY 239 +WORLD CITY 4079 +WORLD COUNTRYLANGUAGE 984 +WORLD_INNODB COUNTRY 239 +WORLD_INNODB CITY 4079 +WORLD_INNODB COUNTRYLANGUAGE 984 +SELECT UPPER(db_name), UPPER(table_name), +column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency +FROM mysql.column_stats; +UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency +WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000 +WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000 +WORLD COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042 +WORLD COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575 +WORLD COUNTRY Capital 1 4074 0.0293 4.0000 1.0000 +WORLD CITY ID 1 4079 0.0000 4.0000 1.0000 +WORLD CITY Name A Coruña (La Coruña) Ürgenc 0.0000 8.6416 1.0195 +WORLD CITY Country ABW ZWE 0.0000 3.0000 17.5819 +WORLD CITY Population 42 10500000 0.0000 4.0000 1.0467 +WORLD COUNTRYLANGUAGE Country ABW ZWE 0.0000 3.0000 4.2232 +WORLD COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532 +WORLD COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640 +WORLD_INNODB COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000 +WORLD_INNODB COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000 +WORLD_INNODB COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042 +WORLD_INNODB COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575 +WORLD_INNODB COUNTRY Capital 1 4074 0.0293 4.0000 1.0000 +WORLD_INNODB CITY ID 1 4079 0.0000 4.0000 1.0000 +WORLD_INNODB CITY Name A Coruña (La Coruña) Ürgenc 0.0000 8.6416 1.0195 +WORLD_INNODB CITY Country ABW ZWE 0.0000 3.0000 17.5819 +WORLD_INNODB CITY Population 42 10500000 0.0000 4.0000 1.0467 +WORLD_INNODB COUNTRYLANGUAGE Country ABW ZWE 0.0000 3.0000 4.2232 +WORLD_INNODB COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532 +WORLD_INNODB COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640 +SELECT UPPER(db_name), UPPER(table_name), +index_name, prefix_arity, avg_frequency +FROM mysql.index_stats; +UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency +WORLD COUNTRY PRIMARY 1 1.0000 +WORLD COUNTRY Name 1 1.0000 +WORLD CITY PRIMARY 1 1.0000 +WORLD CITY Population 1 1.0467 +WORLD CITY Country 1 17.5819 +WORLD COUNTRYLANGUAGE PRIMARY 1 4.2232 +WORLD COUNTRYLANGUAGE PRIMARY 2 1.0000 +WORLD COUNTRYLANGUAGE Percentage 1 2.7640 +WORLD_INNODB COUNTRY PRIMARY 1 1.0000 +WORLD_INNODB COUNTRY Name 1 1.0000 +WORLD_INNODB CITY PRIMARY 1 1.0000 +WORLD_INNODB CITY Population 1 1.0467 +WORLD_INNODB CITY Country 1 17.5819 +WORLD_INNODB COUNTRYLANGUAGE PRIMARY 1 4.2232 +WORLD_INNODB COUNTRYLANGUAGE PRIMARY 2 1.0000 +WORLD_INNODB COUNTRYLANGUAGE Percentage 1 2.7640 +use world; +set use_stat_tables='preferably'; +set histogram_size=100; +set histogram_type='SINGLE_PREC_HB'; +ANALYZE TABLE CountryLanguage; +set histogram_size=254; +set histogram_type='DOUBLE_PREC_HB'; +ANALYZE TABLE City; +FLUSH TABLES; +select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='COUNTRYLANGUAGE' and UPPER(column_name) = 'PERCENTAGE';; +UPPER(db_name) WORLD +UPPER(table_name) COUNTRYLANGUAGE +UPPER(column_name) PERCENTAGE +min_value 0.0 +max_value 99.9 +nulls_ratio 0.0000 +avg_length 4.0000 +avg_frequency 2.7640 +hist_size 100 +hist_type SINGLE_PREC_HB +hex(histogram) 0000000000000000000000000101010101010101010202020303030304040404050505050606070707080809090A0A0B0C0D0D0E0E0F10111213131415161718191B1C1E202224292A2E33373B4850575F6A76818C9AA7B9C4CFDADFE5EBF0F4F8FAFCFF +decode_histogram(hist_type,histogram) 0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.004,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.004,0.000,0.000,0.004,0.000,0.000,0.000,0.004,0.000,0.000,0.000,0.004,0.000,0.000,0.000,0.004,0.000,0.004,0.000,0.000,0.004,0.000,0.004,0.000,0.004,0.000,0.004,0.004,0.004,0.000,0.004,0.000,0.004,0.004,0.004,0.004,0.004,0.000,0.004,0.004,0.004,0.004,0.004,0.004,0.008,0.004,0.008,0.008,0.008,0.008,0.020,0.004,0.016,0.020,0.016,0.016,0.051,0.031,0.027,0.031,0.043,0.047,0.043,0.043,0.055,0.051,0.071,0.043,0.043,0.043,0.020,0.024,0.024,0.020,0.016,0.016,0.008,0.008,0.012,0.000 +select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='CITY' and UPPER(column_name) = 'POPULATION';; +UPPER(db_name) WORLD +UPPER(table_name) CITY +UPPER(column_name) POPULATION +min_value 42 +max_value 10500000 +nulls_ratio 0.0000 +avg_length 4.0000 +avg_frequency 1.0467 +hist_size 254 +hist_type DOUBLE_PREC_HB +hex(histogram) 1F00A1002B023002350238023F02430249024E02520258025D02630268026E02720276027B02800285028C02920297029D02A102A802AC02B402BC02C402CC02D302DA02E302EA02F102F802010305030C03120319031F03290333033D0343034F03590363036D037803840390039A03A603B303C303D103E003F203020412042404330440045304600472047F049104A204B804C804DE04F2040A0526053F0558056F058E05B305D905F4051306380667068406AB06DA06020731075C079407C507F8072E085E08A508DF0824096909CC092E0A760AD50A400BA90B150CAD0C310D240E130F0E103B11B9126B14F0166B192F1CB71FFF240630483FC567 +decode_histogram(hist_type,histogram) 0.00047,0.00198,0.00601,0.00008,0.00008,0.00005,0.00011,0.00006,0.00009,0.00008,0.00006,0.00009,0.00008,0.00009,0.00008,0.00009,0.00006,0.00006,0.00008,0.00008,0.00008,0.00011,0.00009,0.00008,0.00009,0.00006,0.00011,0.00006,0.00012,0.00012,0.00012,0.00012,0.00011,0.00011,0.00014,0.00011,0.00011,0.00011,0.00014,0.00006,0.00011,0.00009,0.00011,0.00009,0.00015,0.00015,0.00015,0.00009,0.00018,0.00015,0.00015,0.00015,0.00017,0.00018,0.00018,0.00015,0.00018,0.00020,0.00024,0.00021,0.00023,0.00027,0.00024,0.00024,0.00027,0.00023,0.00020,0.00029,0.00020,0.00027,0.00020,0.00027,0.00026,0.00034,0.00024,0.00034,0.00031,0.00037,0.00043,0.00038,0.00038,0.00035,0.00047,0.00056,0.00058,0.00041,0.00047,0.00056,0.00072,0.00044,0.00060,0.00072,0.00061,0.00072,0.00066,0.00085,0.00075,0.00078,0.00082,0.00073,0.00108,0.00089,0.00105,0.00105,0.00151,0.00150,0.00110,0.00145,0.00163,0.00160,0.00165,0.00232,0.00201,0.00371,0.00365,0.00383,0.00459,0.00583,0.00662,0.00984,0.00969,0.01080,0.01379,0.02063,0.04308,0.05960,0.15816,0.59464 +set histogram_type=default; +set histogram_size=default; +use test; +DROP DATABASE world; +SELECT UPPER(db_name), UPPER(table_name), cardinality +FROM mysql.table_stats; +UPPER(db_name) UPPER(table_name) cardinality +WORLD_INNODB COUNTRY 239 +WORLD_INNODB CITY 4079 +WORLD_INNODB COUNTRYLANGUAGE 984 +SELECT UPPER(db_name), UPPER(table_name), +column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency +FROM mysql.column_stats; +UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency +WORLD_INNODB COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000 +WORLD_INNODB COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000 +WORLD_INNODB COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042 +WORLD_INNODB COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575 +WORLD_INNODB COUNTRY Capital 1 4074 0.0293 4.0000 1.0000 +WORLD_INNODB CITY ID 1 4079 0.0000 4.0000 1.0000 +WORLD_INNODB CITY Name A Coruña (La Coruña) Ürgenc 0.0000 8.6416 1.0195 +WORLD_INNODB CITY Country ABW ZWE 0.0000 3.0000 17.5819 +WORLD_INNODB CITY Population 42 10500000 0.0000 4.0000 1.0467 +WORLD_INNODB COUNTRYLANGUAGE Country ABW ZWE 0.0000 3.0000 4.2232 +WORLD_INNODB COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532 +WORLD_INNODB COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640 +SELECT UPPER(db_name), UPPER(table_name), +index_name, prefix_arity, avg_frequency +FROM mysql.index_stats; +UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency +WORLD_INNODB COUNTRY PRIMARY 1 1.0000 +WORLD_INNODB COUNTRY Name 1 1.0000 +WORLD_INNODB CITY PRIMARY 1 1.0000 +WORLD_INNODB CITY Population 1 1.0467 +WORLD_INNODB CITY Country 1 17.5819 +WORLD_INNODB COUNTRYLANGUAGE PRIMARY 1 4.2232 +WORLD_INNODB COUNTRYLANGUAGE PRIMARY 2 1.0000 +WORLD_INNODB COUNTRYLANGUAGE Percentage 1 2.7640 +DROP DATABASE world_innodb; +SELECT UPPER(db_name), UPPER(table_name), cardinality +FROM mysql.table_stats; +UPPER(db_name) UPPER(table_name) cardinality +SELECT UPPER(db_name), UPPER(table_name), +column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency +FROM mysql.column_stats; +UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency +SELECT UPPER(db_name), UPPER(table_name), +index_name, prefix_arity, avg_frequency +FROM mysql.index_stats; +UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency +DELETE FROM mysql.table_stats; +DELETE FROM mysql.column_stats; +DELETE FROM mysql.index_stats; +# +# Bug mdev-4357: empty string as a value of the HIST_SIZE column +# from mysql.column_stats +# +create table t1 (a int); +insert into t1 values (1),(2),(3); +set histogram_size=10; +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +select db_name, table_name, column_name, +min_value, max_value, +nulls_ratio, avg_frequency, +hist_size, hist_type, HEX(histogram) +FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type HEX(histogram) +test t1 a 1 3 0.0000 1.0000 10 SINGLE_PREC_HB 0000007F7F7F7FFFFFFF +set histogram_size=default; +drop table t1; +# +# Bug mdev-4359: wrong setting of the HIST_SIZE column +# (see also mdev-4357) from mysql.column_stats +# +create table t1 ( a int); +insert into t1 values (1),(2),(3),(4),(5); +set histogram_size=10; +set histogram_type='double_prec_hb'; +show variables like 'histogram%'; +Variable_name Value +histogram_size 10 +histogram_type DOUBLE_PREC_HB +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +select db_name, table_name, column_name, +min_value, max_value, +nulls_ratio, avg_frequency, +hist_size, hist_type, HEX(histogram) +FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type HEX(histogram) +test t1 a 1 5 0.0000 1.0000 10 DOUBLE_PREC_HB 0000FF3FFF7FFFBFFFFF +set histogram_size=default; +set histogram_type=default; +drop table t1; +# +# Bug mdev-4369: histogram for a column with many distinct values +# +CREATE TABLE t1 (id int); +CREATE TABLE t2 (id int); +INSERT INTO t1 (id) VALUES (1), (1), (1),(1); +INSERT INTO t1 (id) SELECT id FROM t1; +INSERT INTO t1 SELECT id+1 FROM t1; +INSERT INTO t1 SELECT id+2 FROM t1; +INSERT INTO t1 SELECT id+4 FROM t1; +INSERT INTO t1 SELECT id+8 FROM t1; +INSERT INTO t1 SELECT id+16 FROM t1; +INSERT INTO t1 SELECT id+32 FROM t1; +INSERT INTO t1 SELECT id+64 FROM t1; +INSERT INTO t1 SELECT id+128 FROM t1; +INSERT INTO t1 SELECT id+256 FROM t1; +INSERT INTO t1 SELECT id+512 FROM t1; +INSERT INTO t2 SELECT id FROM t1 ORDER BY id*rand(); +SELECT COUNT(*) FROM t2; +COUNT(*) +8192 +SELECT COUNT(DISTINCT id) FROM t2; +COUNT(DISTINCT id) +1024 +set @@tmp_table_size=1024*16; +set @@max_heap_table_size=1024*16; +set histogram_size=63; +analyze table t2 persistent for all; +Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +select db_name, table_name, column_name, +min_value, max_value, +nulls_ratio, avg_frequency, +hist_size, hist_type, HEX(histogram) +FROM mysql.column_stats; +db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type HEX(histogram) +test t2 id 1 1024 0.0000 8.0000 63 SINGLE_PREC_HB 03070B0F13171B1F23272B2F33373B3F43474B4F53575B5F63676B6F73777B7F83878B8F93979B9FA3A7ABAFB3B7BBBFC3C7CBCFD3D7DBDFE3E7EBEFF3F7FB +set histogram_size=default; +drop table t1, t2; +set use_stat_tables=@save_use_stat_tables; +# +# Bug MDEV-7383: min/max value for a column not utf8 compatible +# +create table t1 (a varchar(100)) engine=MyISAM; +insert into t1 values(unhex('D879626AF872675F73E662F8')); +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +show warnings; +Level Code Message +select db_name, table_name, column_name, +HEX(min_value), HEX(max_value), +nulls_ratio, avg_frequency, +hist_size, hist_type, HEX(histogram) +FROM mysql.column_stats; +db_name table_name column_name HEX(min_value) HEX(max_value) nulls_ratio avg_frequency hist_size hist_type HEX(histogram) +test t1 a D879626AF872675F73E662F8 D879626AF872675F73E662F8 0.0000 1.0000 0 NULL NULL +drop table t1; diff --git a/mysql-test/r/statistics_index_crash-7362.result b/mysql-test/r/statistics_index_crash-7362.result new file mode 100644 index 00000000000..99f65d7e1b7 --- /dev/null +++ b/mysql-test/r/statistics_index_crash-7362.result @@ -0,0 +1,33 @@ +CREATE TABLE t1 (a longtext, FULLTEXT KEY (`a`)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (unhex('3E0D0A4141414142334E7A6143317963324541414141424977414141674541726D')); +ANALYZE TABLE t1 PERSISTENT FOR ALL; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SELECT * FROM mysql.index_stats WHERE index_name='a' AND table_name='t1'; +db_name table_name index_name prefix_arity avg_frequency +test t1 a 1 NULL +DROP TABLE t1; +CREATE TABLE t1 (a longtext, FULLTEXT KEY (`a`)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (unhex('3E0D0A4141414142334E7A6143317963324541414141424977414141674541726D')); +ANALYZE TABLE t1 PERSISTENT FOR ALL; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SELECT * FROM mysql.index_stats WHERE index_name='a' AND table_name='t1'; +db_name table_name index_name prefix_arity avg_frequency +test t1 a 1 NULL +DROP TABLE t1; +CREATE TABLE geom (g GEOMETRY NOT NULL, SPATIAL INDEX(g)) ENGINE=MyISAM; +INSERT INTO geom VALUES +(MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), +(MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), +(MPolyFromWKB(AsWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3))))))); +ANALYZE TABLE geom PERSISTENT FOR ALL; +Table Op Msg_type Msg_text +test.geom analyze status Engine-independent statistics collected +test.geom analyze status OK +SELECT * FROM mysql.index_stats WHERE index_name='g' AND table_name='geom'; +db_name table_name index_name prefix_arity avg_frequency +test geom g 1 NULL +DROP TABLE geom; diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result index 0da65a5ab51..600a4fbd59f 100644 --- a/mysql-test/r/status.result +++ b/mysql-test/r/status.result @@ -275,6 +275,7 @@ Variable_name Value Handler_commit 0 Handler_delete 0 Handler_discover 0 +Handler_external_lock 0 Handler_icp_attempts 0 Handler_icp_match 0 Handler_mrr_init 0 @@ -286,6 +287,7 @@ Handler_read_key 4 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 7 Handler_read_rnd_deleted 0 Handler_read_rnd_next 23 @@ -303,7 +305,7 @@ Created_tmp_files 0 Created_tmp_tables 2 Handler_tmp_update 2 Handler_tmp_write 7 -Rows_tmp_read 41 +Rows_tmp_read 43 drop table t1; CREATE TABLE t1 (i int(11) DEFAULT NULL, KEY i (i) ) ENGINE=MyISAM; insert into t1 values (1),(2),(3),(4),(5); @@ -316,6 +318,7 @@ Variable_name Value Handler_commit 0 Handler_delete 0 Handler_discover 0 +Handler_external_lock 0 Handler_icp_attempts 0 Handler_icp_match 0 Handler_mrr_init 0 @@ -327,6 +330,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 2 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 1 Handler_read_rnd_next 2 diff --git a/mysql-test/r/status_user.result b/mysql-test/r/status_user.result index 39579799431..d00a7d3047f 100644 --- a/mysql-test/r/status_user.result +++ b/mysql-test/r/status_user.result @@ -100,6 +100,7 @@ Variable_name Value Handler_commit 19 Handler_delete 1 Handler_discover 0 +Handler_external_lock 0 Handler_icp_attempts 0 Handler_icp_match 0 Handler_mrr_init 0 @@ -107,10 +108,11 @@ Handler_mrr_key_refills 0 Handler_mrr_rowid_refills 0 Handler_prepare 18 Handler_read_first 0 -Handler_read_key 3 +Handler_read_key 9 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 5 @@ -123,20 +125,16 @@ Handler_update 5 Handler_write 7 select variable_value - @global_read_key as "handler_read_key" from information_schema.global_status where variable_name="handler_read_key"; handler_read_key -3 +9 set @@global.userstat=0; select * from information_schema.index_statistics; TABLE_SCHEMA TABLE_NAME INDEX_NAME ROWS_READ -test t1 PRIMARY 2 select * from information_schema.table_statistics; TABLE_SCHEMA TABLE_NAME ROWS_READ ROWS_CHANGED ROWS_CHANGED_X_INDEXES -test t1 6 13 13 show table_statistics; Table_schema Table_name Rows_read Rows_changed Rows_changed_x_#indexes -test t1 6 13 13 show index_statistics; Table_schema Table_name Index_name Rows_read -test t1 PRIMARY 2 select TOTAL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, OTHER_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.client_statistics;; TOTAL_CONNECTIONS 1 CONCURRENT_CONNECTIONS 0 diff --git a/mysql-test/r/str_to_datetime_457.result b/mysql-test/r/str_to_datetime_457.result new file mode 100644 index 00000000000..4fd0d00691c --- /dev/null +++ b/mysql-test/r/str_to_datetime_457.result @@ -0,0 +1,51 @@ +select cast('01:02:03 ' as time), cast('01:02:03 ' as time); +cast('01:02:03 ' as time) cast('01:02:03 ' as time) +01:02:03 00:00:00 +select cast('2002-011-012' as date), cast('2002.11.12' as date), cast('2002.011.012' as date); +cast('2002-011-012' as date) cast('2002.11.12' as date) cast('2002.011.012' as date) +2002-11-12 2002-11-12 2002-11-12 +select cast('2012103123595912' as datetime(6)), cast('20121031235959123' as datetime(6)); +cast('2012103123595912' as datetime(6)) cast('20121031235959123' as datetime(6)) +2012-10-31 23:59:59.000000 2012-10-31 23:59:59.000000 +Warnings: +Warning 1292 Truncated incorrect datetime value: '2012103123595912' +Warning 1292 Truncated incorrect datetime value: '20121031235959123' +select cast(0 as date), cast('0000-00-00' as date), cast('0' as date); +cast(0 as date) cast('0000-00-00' as date) cast('0' as date) +0000-00-00 0000-00-00 NULL +Warnings: +Warning 1292 Incorrect datetime value: '0' +select extract(hour from '100000:02:03'), extract(hour from '100000:02:03 '); +extract(hour from '100000:02:03') extract(hour from '100000:02:03 ') +NULL NULL +Warnings: +Warning 1292 Truncated incorrect time value: '100000:02:03' +Warning 1292 Truncated incorrect time value: '100000:02:03 ' +# +# backward compatibility craziness +# +select cast('12:00:00.12.34.56' as time); +cast('12:00:00.12.34.56' as time) +12:00:00 +Warnings: +Warning 1292 Truncated incorrect time value: '12:00:00.12.34.56' +select cast('12:00:00 12.34.56' as time); +cast('12:00:00 12.34.56' as time) +12:34:56 +select cast('12:00:00-12.34.56' as time); +cast('12:00:00-12.34.56' as time) +12:00:00 +Warnings: +Warning 1292 Truncated incorrect time value: '12:00:00-12.34.56' +select cast('12:00:00.12.34.56' as datetime); +cast('12:00:00.12.34.56' as datetime) +2012-00-00 12:34:56 +select cast('12:00:00-12.34.56' as datetime); +cast('12:00:00-12.34.56' as datetime) +2012-00-00 12:34:56 +select cast('12:00:00 12.34.56' as datetime); +cast('12:00:00 12.34.56' as datetime) +2012-00-00 12:34:56 +select cast('12:00:00.123456' as time); +cast('12:00:00.123456' as time) +12:00:00 diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index a3262ca5caa..2cedb32ad87 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -1135,7 +1135,7 @@ create table t1 (col1 date, col2 datetime, col3 timestamp); insert into t1 values (0,0,0); ERROR 22007: Incorrect date value: '0' for column 'col1' at row 1 insert into t1 values (0.0,0.0,0.0); -ERROR 22007: Incorrect date value: '0' for column 'col1' at row 1 +ERROR 22007: Incorrect date value: '0.0' for column 'col1' at row 1 insert into t1 (col1) values (convert('0000-00-00',date)); ERROR 22007: Incorrect datetime value: '0000-00-00' insert into t1 (col1) values (cast('0000-00-00' as date)); @@ -1190,8 +1190,6 @@ select'a'; insert into t1 values (200); end;| call t1(); a a -Warnings: -Error 1264 Out of range value for column 'col1' at row 1 select * from t1; col1 drop procedure t1; @@ -1501,3 +1499,29 @@ count(*) 0 drop table t1; End of 5.0 tests +# +# Start of 5.6 tests +# +# +# WL#946 TIME/TIMESTAMP/DATETIME with fractional seconds: CAST to DATETIME +# +# +# STR_TO_DATE with NO_ZERO_DATE did not return NULL (with warning) +# in get_date(). Only did in val_str() and val_int(). +SET sql_mode='NO_ZERO_DATE'; +SELECT STR_TO_DATE('2001','%Y'),CONCAT(STR_TO_DATE('2001','%Y')), STR_TO_DATE('2001','%Y')+1, STR_TO_DATE('0','%Y')+1, STR_TO_DATE('0000','%Y')+1; +STR_TO_DATE('2001','%Y') CONCAT(STR_TO_DATE('2001','%Y')) STR_TO_DATE('2001','%Y')+1 STR_TO_DATE('0','%Y')+1 STR_TO_DATE('0000','%Y')+1 +2001-00-00 2001-00-00 20010001 20000001 NULL +Warnings: +Warning 1411 Incorrect datetime value: '0000' for function str_to_date +SET sql_mode='NO_ZERO_IN_DATE'; +SELECT STR_TO_DATE('2001','%Y'),CONCAT(STR_TO_DATE('2001','%Y')), STR_TO_DATE('2001','%Y')+1, STR_TO_DATE('0000','%Y')+1; +STR_TO_DATE('2001','%Y') CONCAT(STR_TO_DATE('2001','%Y')) STR_TO_DATE('2001','%Y')+1 STR_TO_DATE('0000','%Y')+1 +NULL NULL NULL 1 +Warnings: +Warning 1411 Incorrect datetime value: '2001' for function str_to_date +Warning 1411 Incorrect datetime value: '2001' for function str_to_date +Warning 1411 Incorrect datetime value: '2001' for function str_to_date +# +# End of 5.6 tests +# diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 8fc9cd38728..3fa7fef89b2 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -10,7 +10,7 @@ select (select 2); 2 explain extended select (select 2); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1249 Select 2 was reduced during optimization Note 1003 select 2 AS `(select 2)` @@ -337,11 +337,11 @@ patient_uq clinic_uq 2 2 explain extended select * from t6 where exists (select * from t7 where uq = clinic_uq); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t6 ALL NULL NULL NULL NULL 4 100.00 Using where -2 DEPENDENT SUBQUERY t7 eq_ref PRIMARY PRIMARY 4 test.t6.clinic_uq 1 100.00 Using index +1 PRIMARY t7 index PRIMARY PRIMARY 4 NULL 2 100.00 Using index +1 PRIMARY t6 ALL i1 NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join) Warnings: Note 1276 Field or reference 'test.t6.clinic_uq' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t6` where <expr_cache><`test`.`t6`.`clinic_uq`>(exists(select 1 from `test`.`t7` where (`test`.`t7`.`uq` = `test`.`t6`.`clinic_uq`))) +Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t7` join `test`.`t6` where (`test`.`t6`.`clinic_uq` = `test`.`t7`.`uq`) select * from t1 where a= (select a from t2,t4 where t2.b=t4.b); ERROR 23000: Column 'a' in field list is ambiguous drop table t1,t2,t3; @@ -579,7 +579,7 @@ a b 1 11 2 12 update t1 set b= (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t1 set b= (select b from t2); ERROR 21000: Subquery returns more than 1 row update t1 set b= (select b from t2 where t1.a = t2.a); @@ -602,7 +602,7 @@ select * from t1 where b = (select b from t2 where t1.a = t2.a); a b 2 12 delete from t1 where b in (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from t1 where b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete from t1 where b = (select b from t2 where t1.a = t2.a); @@ -628,7 +628,7 @@ a b 22 11 2 12 delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t12 where t11.a = t12.a); -ERROR HY000: You can't specify target table 't12' for update in FROM clause +ERROR HY000: Table 't12' is specified twice, both as a target for 'DELETE' and as a separate source for data delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2 where t11.a = t2.a); @@ -647,7 +647,7 @@ create table t3 (b int); insert into t2 values (1); insert into t3 values (1),(2); INSERT INTO t1 (x) VALUES ((SELECT x FROM t1)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t1 (x) VALUES ((SELECT b FROM t3)); ERROR 21000: Subquery returns more than 1 row INSERT INTO t1 (x) VALUES ((SELECT a FROM t2)); @@ -697,7 +697,7 @@ insert into t3 values (1),(2); select * from t1; x y replace into t1 (x, y) VALUES ((SELECT x FROM t1), (SELECT a+1 FROM t2)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data replace into t1 (x, y) VALUES ((SELECT a FROM t3), (SELECT a+1 FROM t2)); ERROR 21000: Subquery returns more than 1 row replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2)); @@ -734,7 +734,7 @@ id 1 EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t2 ref id id 5 const 1 100.00 Using index +1 SIMPLE t2 ref id id 5 const 1 100.00 Using index Warnings: Note 1249 Select 2 was reduced during optimization Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = 1) @@ -746,7 +746,7 @@ id 2 EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1)); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t2 ref id id 5 const 1 100.00 Using where; Using index +1 SIMPLE t2 ref id id 5 const 1 100.00 Using where; Using index Warnings: Note 1249 Select 3 was reduced during optimization Note 1249 Select 2 was reduced during optimization @@ -765,9 +765,9 @@ SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 2); id 2 INSERT INTO t2 VALUES ((SELECT * FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t2 VALUES ((SELECT id FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data SELECT * FROM t2; id 1 @@ -880,7 +880,7 @@ select 10.5 > ANY (SELECT * from t1); 1 explain extended select (select a+1) from t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 Note 1249 Select 2 was reduced during optimization @@ -1887,7 +1887,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 DEPENDENT SUBQUERY t1 eq_ref PRIMARY PRIMARY 4 test.tt.id 1 100.00 Using where; Using index Warnings: Note 1276 Field or reference 'test.tt.id' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`tt`.`id` AS `id`,`test`.`tt`.`text` AS `text` from `test`.`t1` `tt` where (not(<expr_cache><`test`.`tt`.`id`>(exists(select `test`.`t1`.`id` from `test`.`t1` where ((`test`.`t1`.`id` < 8) and (`test`.`t1`.`id` = `test`.`tt`.`id`)) having (`test`.`t1`.`id` is not null))))) +Note 1003 select `test`.`tt`.`id` AS `id`,`test`.`tt`.`text` AS `text` from `test`.`t1` `tt` where (not(<in_optimizer>(1,<expr_cache><`test`.`tt`.`id`>(exists(select `test`.`t1`.`id` from `test`.`t1` where ((`test`.`t1`.`id` < 8) and (`test`.`t1`.`id` = `test`.`tt`.`id`)) having (`test`.`t1`.`id` is not null)))))) insert into t1 (id, text) values (1000, 'text1000'), (1001, 'text1001'); create table t2 (id int not null, text varchar(20) not null default '', primary key (id)); insert into t2 (id, text) values (1, 'text1'), (2, 'text2'), (3, 'text3'), (4, 'text4'), (5, 'text5'), (6, 'text6'), (7, 'text7'), (8, 'text8'), (9, 'text9'), (10, 'text10'), (11, 'text1'), (12, 'text2'), (13, 'text3'), (14, 'text4'), (15, 'text5'), (16, 'text6'), (17, 'text7'), (18, 'text8'), (19, 'text9'), (20, 'text10'),(21, 'text1'), (22, 'text2'), (23, 'text3'), (24, 'text4'), (25, 'text5'), (26, 'text6'), (27, 'text7'), (28, 'text8'), (29, 'text9'), (30, 'text10'), (31, 'text1'), (32, 'text2'), (33, 'text3'), (34, 'text4'), (35, 'text5'), (36, 'text6'), (37, 'text7'), (38, 'text8'), (39, 'text9'), (40, 'text10'), (41, 'text1'), (42, 'text2'), (43, 'text3'), (44, 'text4'), (45, 'text5'), (46, 'text6'), (47, 'text7'), (48, 'text8'), (49, 'text9'), (50, 'text10'); @@ -2419,11 +2419,12 @@ a b 3 4 explain extended select * from t1 up where exists (select * from t1 where t1.a=up.a); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY up ALL NULL NULL NULL NULL 2 100.00 Using where -2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where +1 PRIMARY up ALL NULL NULL NULL NULL 2 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +2 MATERIALIZED t1 ALL NULL NULL NULL NULL 2 100.00 Warnings: Note 1276 Field or reference 'test.up.a' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`up`.`a` AS `a`,`test`.`up`.`b` AS `b` from `test`.`t1` `up` where <expr_cache><`test`.`up`.`a`>(exists(select 1 from `test`.`t1` where (`test`.`t1`.`a` = `test`.`up`.`a`))) +Note 1003 select `test`.`up`.`a` AS `a`,`test`.`up`.`b` AS `b` from `test`.`t1` `up` semi join (`test`.`t1`) where 1 drop table t1; CREATE TABLE t1 (t1_a int); INSERT INTO t1 VALUES (1); @@ -2966,7 +2967,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00 2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 9 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<expr_cache><`test`.`t1`.`one`,`test`.`t1`.`two`>(<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`))) and trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`)))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`)))))) AS `test` from `test`.`t1` +Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<expr_cache><`test`.`t1`.`one`,`test`.`t1`.`two`>(<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`)))) and trigcond(trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`))))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`)))))) AS `test` from `test`.`t1` explain extended SELECT one,two from t1 where ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N'); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00 @@ -2979,7 +2980,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00 2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 9 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<expr_cache><`test`.`t1`.`one`,`test`.`t1`.`two`>(<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`))) and trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`)))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`)))))) AS `test` from `test`.`t1` +Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<expr_cache><`test`.`t1`.`one`,`test`.`t1`.`two`>(<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`)))) and trigcond(trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`))))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`)))))) AS `test` from `test`.`t1` DROP TABLE t1,t2; set optimizer_switch=@tmp11867_optimizer_switch; CREATE TABLE t1 (a char(5), b char(5)); @@ -4428,11 +4429,12 @@ SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a)); EXPLAIN EXTENDED SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a)); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where -2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 100.00 Warnings: Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 -Note 1003 select 2 AS `2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a`>(exists(select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`))) +Note 1003 select 2 AS `2` from `test`.`t1` semi join (`test`.`t2`) where 1 EXPLAIN EXTENDED SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a) UNION (SELECT 1 FROM t2 WHERE t1.a = t2.a)); @@ -4554,7 +4556,7 @@ int_nokey int_key 0 0 EXPLAIN EXTENDED SELECT * FROM C WHERE `int_key` IN (SELECT `int_nokey`); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY C ALL NULL NULL NULL NULL 20 100.00 Using where +1 SIMPLE C ALL NULL NULL NULL NULL 20 100.00 Using where DROP TABLE C; # End of test for bug#45061. # @@ -4968,7 +4970,7 @@ SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 Using index 1 PRIMARY t3 ref b,b_2 b 5 test.t1.a 1 Using index -2 DEPENDENT SUBQUERY t2 ref b,b_2,c b 10 test.t3.c,test.t1.a 1 Using where; Using index; Using filesort +2 DEPENDENT SUBQUERY t2 ref b,b_2,c b 10 test.t3.c,test.t1.a 1 Using where; Using index SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a; a incorrect 1 1 @@ -5670,8 +5672,9 @@ EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT a FROM t2 USE INDEX() WHERE t2.a = t1.a); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where -2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 3 Using where +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3 +1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join) +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 SELECT * FROM t1 WHERE EXISTS (SELECT a FROM t2 WHERE t2.a = t1.a); a @@ -5680,8 +5683,9 @@ EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT a FROM t2 WHERE t2.a = t1.a); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where -2 DEPENDENT SUBQUERY t2 ref idx idx 5 test.t1.a 2 Using index +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3 +1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join) +2 MATERIALIZED t2 index idx idx 5 NULL 3 Using index DROP TABLE t1,t2; # # BUG#752992: Wrong results for a subquery with 'semijoin=on' @@ -5898,7 +5902,7 @@ CREATE TABLE t2 ( f3 int, f10 int, KEY (f10,f3)) ; INSERT IGNORE INTO t2 VALUES (NULL,NULL),(5,0); DROP TABLE IF EXISTS t3; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' CREATE TABLE t3 ( f3 int) ; INSERT INTO t3 VALUES (0),(0); SELECT a1.f3 AS r FROM t2 AS a1 , t1 WHERE a1.f3 < ALL ( SELECT f3 FROM t3 WHERE f3 = 1 ) ; @@ -6112,7 +6116,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3 ) AS alias3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE <derived2> system NULL NULL NULL NULL 0 const row not found +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM ( SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 @@ -6157,7 +6161,7 @@ FROM t2 AS c_sq1_alias1 WHERE (c_sq1_alias1.col_int_nokey != @var2 OR c_sq1_alias1.pk != @var3)) ) AS alias3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables 3 DEPENDENT SUBQUERY c_sq1_alias1 system PRIMARY NULL NULL NULL 1 SELECT * FROM ( SELECT sq4_alias1.* FROM t1 AS sq4_alias1 @@ -6864,6 +6868,7 @@ Handler_read_key 8 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 22 @@ -6901,6 +6906,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 16 @@ -7081,6 +7087,7 @@ sq NULL deallocate prepare stmt; drop table t1,t2,t3,t4; +# # MDEV-7122 # Assertion `0' failed in subselect_hash_sj_engine::init # @@ -7106,6 +7113,32 @@ round((select 1 from t1 limit 1)) 1 drop table t1; # +# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE || +# m_lock_type != 2' failed in handler::ha_index_read_map +# +CREATE TABLE t1 (f1 INT); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (f2 INT, KEY(f2)); +INSERT INTO t2 VALUES (3); +CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM t2; +SELECT ( SELECT MIN(t2.f2) FROM t1 ) AS sq FROM t2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT ( SELECT MIN(v2.f2) FROM t1 ) AS sq FROM v2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT * FROM v2 where ( SELECT MIN(v2.f2) FROM t1 ) > 0; +f2 +3 +SELECT count(*) FROM v2 group by ( SELECT MIN(v2.f2) FROM t1 ); +count(*) +1 +delete from t1; +SELECT ( SELECT MIN(t2.f2) FROM t1 ) AS sq FROM t2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT ( SELECT MIN(v2.f2) FROM t1 ) AS sq FROM v2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +drop view v2; +drop table t1,t2; +# # MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*) # CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL); @@ -7141,8 +7174,15 @@ drop table t1,t2; CREATE TABLE t1 (f1 INT, KEY(f1)) ENGINE=MyISAM; INSERT t1 VALUES (4),(8); CREATE TABLE t2 (f2 INT, KEY(f2)) ENGINE=MyISAM; -INSERT t2 VALUES (6),(9); +INSERT t2 VALUES (6); SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2; (SELECT MAX(sq.f2) FROM t1) NULL +# +# Disable this query till MDEV-13399 is resolved +# +# INSERT t2 VALUES (9); +# --error ER_SUBQUERY_NO_1_ROW +# SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2; +# drop table t1, t2; diff --git a/mysql-test/r/subselect2.result b/mysql-test/r/subselect2.result index 64bd86707cc..401d333ccfb 100644 --- a/mysql-test/r/subselect2.result +++ b/mysql-test/r/subselect2.result @@ -163,7 +163,7 @@ SELECT * FROM t2,t3 WHERE (2,9) IN (SELECT DISTINCT a,pk FROM t1) OR a = b; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 index a a 5 NULL 2 Using where; Using index 1 PRIMARY t3 ref b b 5 test.t2.a 2 Using index -2 SUBQUERY t1 index_subquery PRIMARY,a a 5 const 0 Using index; Using where +2 SUBQUERY t1 const PRIMARY,a PRIMARY 4 const 1 Using where SELECT * FROM t2,t3 WHERE (2,9) IN (SELECT DISTINCT a,pk FROM t1) OR a = b; pk a b 0 4 4 @@ -172,7 +172,7 @@ SELECT * FROM t2,t3 WHERE (2,9) IN (SELECT DISTINCT a,pk FROM v1) OR a = b; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 index a a 5 NULL 2 Using where; Using index 1 PRIMARY t3 ref b b 5 test.t2.a 2 Using index -2 SUBQUERY t1 index_subquery PRIMARY,a a 5 const 0 Using index; Using where +2 SUBQUERY t1 const PRIMARY,a PRIMARY 4 const 1 Using where SELECT * FROM t2,t3 WHERE (2,9) IN (SELECT DISTINCT a,pk FROM v1) OR a = b; pk a b 0 4 4 @@ -184,7 +184,7 @@ DROP TABLE t1,t2,t3; # DROP TABLE IF EXISTS `t1`; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' CREATE TABLE `t1` ( `node_uid` bigint(20) unsigned DEFAULT NULL, `date` datetime DEFAULT NULL, @@ -286,7 +286,7 @@ WHERE date < '2012-12-12 12:12:12' ORDER BY mirror_date ASC ) AS calculated_result; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE <derived2> ALL NULL NULL NULL NULL 2 +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 2 DERIVED t1 range date date 9 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using filesort SELECT * FROM ( SELECT node_uid, date, mirror_date, @result := 0 AS result @@ -309,7 +309,7 @@ WHERE date < '2012-12-12 12:12:12' ORDER BY mirror_date ASC ) AS calculated_result; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE <derived2> ALL NULL NULL NULL NULL 2 +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 2 DERIVED t1 range date date 9 NULL 2 Using index condition; Using where; Using filesort SELECT * FROM ( SELECT node_uid, date, mirror_date, @result := 0 AS result diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result index 796f4a6f872..9d88d0da778 100644 --- a/mysql-test/r/subselect3.result +++ b/mysql-test/r/subselect3.result @@ -124,6 +124,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 41 @@ -252,7 +253,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 2 100.00 Using where; Full scan on NULL key Warnings: Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`oref` AS `oref`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a checking NULL where ((`test`.`t1`.`c` = `test`.`t2`.`oref`) and trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`))) and trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`b`) or isnull(`test`.`t1`.`b`)))) having (trigcond(<is_not_null_test>(`test`.`t1`.`a`)) and trigcond(<is_not_null_test>(`test`.`t1`.`b`))))))) AS `Z` from `test`.`t2` +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`oref` AS `oref`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a checking NULL where ((`test`.`t1`.`c` = `test`.`t2`.`oref`) and trigcond(trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`)))) and trigcond(trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`b`) or isnull(`test`.`t1`.`b`))))) having (trigcond(<is_not_null_test>(`test`.`t1`.`a`)) and trigcond(<is_not_null_test>(`test`.`t1`.`b`))))))) AS `Z` from `test`.`t2` select a,b, oref, (a,b) in (select a,b from t1 where c=t2.oref) Z from t2; a b oref Z NULL 1 100 0 @@ -269,7 +270,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 100 100.00 Using join buffer (flat, BNL join) Warnings: Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`oref` AS `oref`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(select `test`.`t1`.`a`,`test`.`t1`.`b` from `test`.`t1` join `test`.`t4` where ((`test`.`t1`.`c` = `test`.`t2`.`oref`) and trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`))) and trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`b`) or isnull(`test`.`t1`.`b`)))) having (trigcond(<is_not_null_test>(`test`.`t1`.`a`)) and trigcond(<is_not_null_test>(`test`.`t1`.`b`)))))) AS `Z` from `test`.`t2` +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`oref` AS `oref`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(select `test`.`t1`.`a`,`test`.`t1`.`b` from `test`.`t1` join `test`.`t4` where ((`test`.`t1`.`c` = `test`.`t2`.`oref`) and trigcond(trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`)))) and trigcond(trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`b`) or isnull(`test`.`t1`.`b`))))) having (trigcond(<is_not_null_test>(`test`.`t1`.`a`)) and trigcond(<is_not_null_test>(`test`.`t1`.`b`)))))) AS `Z` from `test`.`t2` select a,b, oref, (a,b) in (select a,b from t1,t4 where c=t2.oref) Z from t2; @@ -314,7 +315,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 DEPENDENT SUBQUERY t1 index_subquery idx idx 5 func 4 100.00 Using where; Full scan on NULL key Warnings: Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`t2`.`oref` AS `oref`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on idx checking NULL where ((`test`.`t1`.`oref` = `test`.`t2`.`oref`) and trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`ie1`) or isnull(`test`.`t1`.`ie1`))) and trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`ie2`) or isnull(`test`.`t1`.`ie2`)))) having (trigcond(<is_not_null_test>(`test`.`t1`.`ie1`)) and trigcond(<is_not_null_test>(`test`.`t1`.`ie2`))))))) AS `Z` from `test`.`t2` where ((`test`.`t2`.`a` = 10) and (`test`.`t2`.`b` = 10)) +Note 1003 select `test`.`t2`.`oref` AS `oref`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on idx checking NULL where ((`test`.`t1`.`oref` = `test`.`t2`.`oref`) and trigcond(trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`ie1`) or isnull(`test`.`t1`.`ie1`)))) and trigcond(trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`ie2`) or isnull(`test`.`t1`.`ie2`))))) having (trigcond(<is_not_null_test>(`test`.`t1`.`ie1`)) and trigcond(<is_not_null_test>(`test`.`t1`.`ie2`))))))) AS `Z` from `test`.`t2` where ((`test`.`t2`.`a` = 10) and (`test`.`t2`.`b` = 10)) drop table t1, t2; create table t1 (oref char(4), grp int, ie int); insert into t1 (oref, grp, ie) values @@ -584,7 +585,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 DEPENDENT SUBQUERY t1 index_subquery idx idx 5 func 4 100.00 Using where; Full scan on NULL key Warnings: Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`t2`.`oref` AS `oref`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on idx checking NULL where ((`test`.`t1`.`oref` = `test`.`t2`.`oref`) and trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`ie1`) or isnull(`test`.`t1`.`ie1`))) and trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`ie2`) or isnull(`test`.`t1`.`ie2`)))) having (trigcond(<is_not_null_test>(`test`.`t1`.`ie1`)) and trigcond(<is_not_null_test>(`test`.`t1`.`ie2`))))))) AS `Z` from `test`.`t2` +Note 1003 select `test`.`t2`.`oref` AS `oref`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on idx checking NULL where ((`test`.`t1`.`oref` = `test`.`t2`.`oref`) and trigcond(trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`ie1`) or isnull(`test`.`t1`.`ie1`)))) and trigcond(trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`ie2`) or isnull(`test`.`t1`.`ie2`))))) having (trigcond(<is_not_null_test>(`test`.`t1`.`ie1`)) and trigcond(<is_not_null_test>(`test`.`t1`.`ie2`))))))) AS `Z` from `test`.`t2` drop table t1,t2; create table t1 (oref char(4), grp int, ie int primary key); insert into t1 (oref, grp, ie) values @@ -1031,7 +1032,7 @@ update t22 set c = '2005-12-08 15:58:27' where a = 255; explain select t21.* from t21,t22 where t21.a = t22.a and t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t11 ALL NULL NULL NULL NULL 8 Using where; Using temporary; Using filesort; Start temporary +1 PRIMARY t11 ALL NULL NULL NULL NULL 8 Using where; Start temporary; Using temporary; Using filesort 1 PRIMARY t12 ALL NULL NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join) 1 PRIMARY t22 ALL NULL NULL NULL NULL 26 Using where; End temporary; Using join buffer (flat, BNL join) 1 PRIMARY t21 ALL NULL NULL NULL NULL 26 Using where; Using join buffer (flat, BNL join) diff --git a/mysql-test/r/subselect3_jcl6.result b/mysql-test/r/subselect3_jcl6.result index f3f1ee546ff..069b9a32ae5 100644 --- a/mysql-test/r/subselect3_jcl6.result +++ b/mysql-test/r/subselect3_jcl6.result @@ -134,6 +134,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 41 @@ -262,7 +263,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 2 100.00 Using where; Full scan on NULL key Warnings: Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`oref` AS `oref`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a checking NULL where ((`test`.`t1`.`c` = `test`.`t2`.`oref`) and trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`))) and trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`b`) or isnull(`test`.`t1`.`b`)))) having (trigcond(<is_not_null_test>(`test`.`t1`.`a`)) and trigcond(<is_not_null_test>(`test`.`t1`.`b`))))))) AS `Z` from `test`.`t2` +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`oref` AS `oref`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a checking NULL where ((`test`.`t1`.`c` = `test`.`t2`.`oref`) and trigcond(trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`)))) and trigcond(trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`b`) or isnull(`test`.`t1`.`b`))))) having (trigcond(<is_not_null_test>(`test`.`t1`.`a`)) and trigcond(<is_not_null_test>(`test`.`t1`.`b`))))))) AS `Z` from `test`.`t2` select a,b, oref, (a,b) in (select a,b from t1 where c=t2.oref) Z from t2; a b oref Z NULL 1 100 0 @@ -279,7 +280,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 100 100.00 Using join buffer (flat, BNL join) Warnings: Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`oref` AS `oref`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(select `test`.`t1`.`a`,`test`.`t1`.`b` from `test`.`t1` join `test`.`t4` where ((`test`.`t1`.`c` = `test`.`t2`.`oref`) and trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`))) and trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`b`) or isnull(`test`.`t1`.`b`)))) having (trigcond(<is_not_null_test>(`test`.`t1`.`a`)) and trigcond(<is_not_null_test>(`test`.`t1`.`b`)))))) AS `Z` from `test`.`t2` +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`oref` AS `oref`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(select `test`.`t1`.`a`,`test`.`t1`.`b` from `test`.`t1` join `test`.`t4` where ((`test`.`t1`.`c` = `test`.`t2`.`oref`) and trigcond(trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`)))) and trigcond(trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`b`) or isnull(`test`.`t1`.`b`))))) having (trigcond(<is_not_null_test>(`test`.`t1`.`a`)) and trigcond(<is_not_null_test>(`test`.`t1`.`b`)))))) AS `Z` from `test`.`t2` select a,b, oref, (a,b) in (select a,b from t1,t4 where c=t2.oref) Z from t2; @@ -324,7 +325,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 DEPENDENT SUBQUERY t1 index_subquery idx idx 5 func 4 100.00 Using where; Full scan on NULL key Warnings: Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`t2`.`oref` AS `oref`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on idx checking NULL where ((`test`.`t1`.`oref` = `test`.`t2`.`oref`) and trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`ie1`) or isnull(`test`.`t1`.`ie1`))) and trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`ie2`) or isnull(`test`.`t1`.`ie2`)))) having (trigcond(<is_not_null_test>(`test`.`t1`.`ie1`)) and trigcond(<is_not_null_test>(`test`.`t1`.`ie2`))))))) AS `Z` from `test`.`t2` where ((`test`.`t2`.`a` = 10) and (`test`.`t2`.`b` = 10)) +Note 1003 select `test`.`t2`.`oref` AS `oref`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on idx checking NULL where ((`test`.`t1`.`oref` = `test`.`t2`.`oref`) and trigcond(trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`ie1`) or isnull(`test`.`t1`.`ie1`)))) and trigcond(trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`ie2`) or isnull(`test`.`t1`.`ie2`))))) having (trigcond(<is_not_null_test>(`test`.`t1`.`ie1`)) and trigcond(<is_not_null_test>(`test`.`t1`.`ie2`))))))) AS `Z` from `test`.`t2` where ((`test`.`t2`.`a` = 10) and (`test`.`t2`.`b` = 10)) drop table t1, t2; create table t1 (oref char(4), grp int, ie int); insert into t1 (oref, grp, ie) values @@ -594,7 +595,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 DEPENDENT SUBQUERY t1 index_subquery idx idx 5 func 4 100.00 Using where; Full scan on NULL key Warnings: Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`t2`.`oref` AS `oref`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on idx checking NULL where ((`test`.`t1`.`oref` = `test`.`t2`.`oref`) and trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`ie1`) or isnull(`test`.`t1`.`ie1`))) and trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`ie2`) or isnull(`test`.`t1`.`ie2`)))) having (trigcond(<is_not_null_test>(`test`.`t1`.`ie1`)) and trigcond(<is_not_null_test>(`test`.`t1`.`ie2`))))))) AS `Z` from `test`.`t2` +Note 1003 select `test`.`t2`.`oref` AS `oref`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on idx checking NULL where ((`test`.`t1`.`oref` = `test`.`t2`.`oref`) and trigcond(trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`ie1`) or isnull(`test`.`t1`.`ie1`)))) and trigcond(trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`ie2`) or isnull(`test`.`t1`.`ie2`))))) having (trigcond(<is_not_null_test>(`test`.`t1`.`ie1`)) and trigcond(<is_not_null_test>(`test`.`t1`.`ie2`))))))) AS `Z` from `test`.`t2` drop table t1,t2; create table t1 (oref char(4), grp int, ie int primary key); insert into t1 (oref, grp, ie) values @@ -1041,7 +1042,7 @@ update t22 set c = '2005-12-08 15:58:27' where a = 255; explain select t21.* from t21,t22 where t21.a = t22.a and t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t11 ALL NULL NULL NULL NULL 8 Using where; Using temporary; Using filesort; Start temporary +1 PRIMARY t11 ALL NULL NULL NULL NULL 8 Using where; Start temporary; Using temporary; Using filesort 1 PRIMARY t12 hash_ALL NULL #hash#$hj 4 test.t11.a 8 Using where; Using join buffer (flat, BNLH join) 1 PRIMARY t22 hash_ALL NULL #hash#$hj 4 test.t11.a 26 Using where; End temporary; Using join buffer (incremental, BNLH join) 1 PRIMARY t21 hash_ALL NULL #hash#$hj 4 test.t11.a 26 Using where; Using join buffer (incremental, BNLH join) diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result index d3c63ff9a2f..2b9e952652e 100644 --- a/mysql-test/r/subselect4.result +++ b/mysql-test/r/subselect4.result @@ -93,12 +93,12 @@ DROP TABLE t1,t2; # EXPLAIN SELECT 1 LIKE ( 1 IN ( SELECT 1 ) ); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1249 Select 2 was reduced during optimization DESCRIBE SELECT 1 LIKE ( 1 IN ( SELECT 1 ) ); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1249 Select 2 was reduced during optimization # None of the below should crash @@ -303,7 +303,7 @@ EXPLAIN SELECT * FROM t1 WHERE (NULL, 1) NOT IN (SELECT t2a.i, t2a.pk FROM t2a WHERE t2a.pk = t1.pk); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where -2 DEPENDENT SUBQUERY t2a eq_ref PRIMARY PRIMARY 8 const,test.t1.pk 1 Using where; Using index; Full scan on NULL key +2 DEPENDENT SUBQUERY t2a unique_subquery PRIMARY PRIMARY 8 const,test.t1.pk 1 Using index; Using where; Full scan on NULL key SELECT * FROM t1 WHERE (NULL, 1) NOT IN (SELECT t2a.i, t2a.pk FROM t2a WHERE t2a.pk = t1.pk); pk i 0 10 @@ -335,7 +335,7 @@ EXPLAIN SELECT * FROM t1 WHERE (NULL, 1) NOT IN (SELECT t2c.i, t2c.pk FROM t2c WHERE t2c.pk = t1.pk); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where -2 DEPENDENT SUBQUERY t2c ref it2c it2c 8 const,test.t1.pk 2 Using where; Using index; Full scan on NULL key +2 DEPENDENT SUBQUERY t2c index_subquery it2c it2c 8 const,test.t1.pk 2 Using index; Using where; Full scan on NULL key SELECT * FROM t1 WHERE (NULL, 1) NOT IN (SELECT t2c.i, t2c.pk FROM t2c WHERE t2c.pk = t1.pk); pk i 0 10 @@ -425,20 +425,13 @@ PRIMARY KEY (`pk`), KEY `varchar_key` (`varchar_key`) ) AUTO_INCREMENT=12 DEFAULT CHARSET=latin1; INSERT INTO `t1` VALUES (10,'00:00:00','i','i'),(11,'00:00:00','',''); -set @old_optimizer_switch = @@session.optimizer_switch, -@old_engine_condition_pushdown = @@session.engine_condition_pushdown; -SET SESSION OPTIMIZER_SWITCH = 'materialization=off,semijoin=off,loosescan=off,firstmatch=off,mrr=on'; -SET SESSION engine_condition_pushdown = 1; -Warnings: -Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead +set @old_optimizer_switch = @@session.optimizer_switch; +SET SESSION OPTIMIZER_SWITCH = 'materialization=off,semijoin=off,loosescan=off,firstmatch=off,mrr=on,engine_condition_pushdown=on'; SELECT `time_nokey` G1 FROM t1 WHERE ( `varchar_nokey` , `varchar_key` ) IN ( SELECT `varchar_nokey` , `varchar_nokey` ) AND `varchar_key` >= 'c' HAVING G1 ORDER BY `pk` ; G1 -set @@session.optimizer_switch = @old_optimizer_switch, -@@session.engine_condition_pushdown = @old_engine_condition_pushdown; -Warnings: -Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead +set @@session.optimizer_switch = @old_optimizer_switch; DROP TABLE t1; # # During work with BUG#45863 I had problems with a query that was @@ -520,8 +513,8 @@ id select_type table type possible_keys key key_len ref rows Extra 2 MATERIALIZED t3 ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join) EXECUTE stmt; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL t1_IDX NULL NULL NULL 5 -1 SIMPLE <subquery2> eq_ref distinct_key distinct_key 3 func 1 +1 PRIMARY t1 ALL t1_IDX NULL NULL NULL 5 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 3 func 1 2 MATERIALIZED t2 ALL NULL NULL NULL NULL 6 Using where 2 MATERIALIZED t3 ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join) DEALLOCATE PREPARE stmt; @@ -558,8 +551,8 @@ id select_type table type possible_keys key key_len ref rows Extra 2 MATERIALIZED t3 ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join) EXECUTE stmt; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL t1_IDX NULL NULL NULL 5 -1 SIMPLE <subquery2> eq_ref distinct_key distinct_key 3 func 1 +1 PRIMARY t1 ALL t1_IDX NULL NULL NULL 5 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 3 func 1 2 MATERIALIZED t2 ALL NULL NULL NULL NULL 6 Using where 2 MATERIALIZED t3 ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join) DEALLOCATE PREPARE stmt; @@ -595,8 +588,8 @@ id select_type table type possible_keys key key_len ref rows Extra 2 MATERIALIZED t3 ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join) EXECUTE stmt; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 -1 SIMPLE <subquery2> eq_ref distinct_key distinct_key 3 func 1 +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 3 func 1 2 MATERIALIZED t2 ALL NULL NULL NULL NULL 6 Using where 2 MATERIALIZED t3 ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join) DEALLOCATE PREPARE stmt; @@ -620,12 +613,8 @@ PRIMARY KEY (pk) ); INSERT INTO t2 VALUES (9,1); # Enable Index condition pushdown -SELECT @old_icp:=@@engine_condition_pushdown; -@old_icp:=@@engine_condition_pushdown -# -SET SESSION engine_condition_pushdown = 'ON'; -Warnings: -Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead +set @old_icp=@@optimizer_switch; +SET SESSION optimizer_switch="engine_condition_pushdown=on"; SELECT pk FROM t2 @@ -638,9 +627,7 @@ ORDER BY t1.i2 desc); pk 9 # Restore old value for Index condition pushdown -SET SESSION engine_condition_pushdown=@old_icp; -Warnings: -Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead +SET SESSION optimizer_switch=@old_icp; DROP TABLE t1,t2; # # End of 5.3 tests. @@ -2174,7 +2161,7 @@ FROM t1 AS alias1 ) IS NOT NULL; ERROR 21000: Subquery returns more than 1 row DROP TABLE t2; -ERROR 42S02: Unknown table 't2' +ERROR 42S02: Unknown table 'test.t2' DROP TABLE t1; # # LP BUG#1000649 EXPLAIN shows incorrectly a non-correlated constant IN subquery is correlated diff --git a/mysql-test/r/subselect_cache.result b/mysql-test/r/subselect_cache.result index 95f935981c2..03d683de0d8 100644 --- a/mysql-test/r/subselect_cache.result +++ b/mysql-test/r/subselect_cache.result @@ -36,6 +36,7 @@ Handler_read_key 7 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 31 @@ -64,6 +65,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 61 @@ -91,6 +93,7 @@ Handler_read_key 7 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 31 @@ -117,6 +120,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 61 @@ -144,6 +148,7 @@ Handler_read_key 7 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 31 @@ -170,6 +175,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 61 @@ -269,6 +275,7 @@ Handler_read_key 7 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 442 @@ -367,6 +374,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 472 @@ -390,6 +398,7 @@ Handler_read_key 17 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 4 Handler_read_rnd_deleted 0 Handler_read_rnd_next 36 @@ -412,6 +421,7 @@ Handler_read_key 10 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 4 Handler_read_rnd_deleted 0 Handler_read_rnd_next 86 @@ -435,6 +445,7 @@ Handler_read_key 17 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 4 Handler_read_rnd_deleted 0 Handler_read_rnd_next 41 @@ -457,6 +468,7 @@ Handler_read_key 10 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 4 Handler_read_rnd_deleted 0 Handler_read_rnd_next 91 @@ -486,6 +498,7 @@ Handler_read_key 7 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 31 @@ -514,6 +527,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 61 @@ -537,6 +551,7 @@ Handler_read_key 7 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 4 Handler_read_rnd_deleted 1 Handler_read_rnd_next 36 @@ -559,6 +574,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 4 Handler_read_rnd_deleted 1 Handler_read_rnd_next 66 @@ -658,6 +674,7 @@ Handler_read_key 70 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 141 @@ -756,6 +773,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 671 @@ -1381,6 +1399,7 @@ Handler_read_key 11 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 145 @@ -1411,6 +1430,7 @@ Handler_read_key 32 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 84 @@ -1444,6 +1464,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 127 @@ -1474,6 +1495,7 @@ Handler_read_key 13 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 69 @@ -1612,7 +1634,7 @@ Subquery_cache_hit 0 Subquery_cache_miss 4 drop table t1; #test of sql_big_tables switch and outer table reference in subquery with grouping -set option sql_big_tables=1; +set big_tables=1; CREATE TABLE t1 (a INT PRIMARY KEY, b INT); INSERT INTO t1 VALUES (1,1),(2,1),(3,2),(4,2),(5,3),(6,3); SELECT (SELECT t1_outer.a FROM t1 AS t1_inner GROUP BY b LIMIT 1) FROM t1 AS t1_outer; @@ -1624,7 +1646,7 @@ SELECT (SELECT t1_outer.a FROM t1 AS t1_inner GROUP BY b LIMIT 1) FROM t1 AS t1_ 5 6 drop table t1; -set option sql_big_tables=0; +set big_tables=0; #test of function reference to outer query set local group_concat_max_len=400; create table t2 (a int, b int); @@ -1665,6 +1687,7 @@ Handler_read_key 15 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 8 Handler_read_rnd_deleted 0 Handler_read_rnd_next 57 @@ -1691,6 +1714,7 @@ Handler_read_key 21 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 8 Handler_read_rnd_deleted 0 Handler_read_rnd_next 37 @@ -1718,6 +1742,7 @@ Handler_read_key 15 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 8 Handler_read_rnd_deleted 0 Handler_read_rnd_next 57 @@ -1744,6 +1769,7 @@ Handler_read_key 22 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 8 Handler_read_rnd_deleted 0 Handler_read_rnd_next 41 @@ -1786,6 +1812,7 @@ Handler_read_key 15 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 16 @@ -1824,6 +1851,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 151 @@ -1861,6 +1889,7 @@ Handler_read_key 15 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 43 @@ -1898,6 +1927,7 @@ Handler_read_key 18 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 27 diff --git a/mysql-test/r/subselect_exists2in.result b/mysql-test/r/subselect_exists2in.result new file mode 100644 index 00000000000..d47e446fe8f --- /dev/null +++ b/mysql-test/r/subselect_exists2in.result @@ -0,0 +1,975 @@ +drop table if exists t1,t2,t3; +set optimizer_switch='exists_to_in=on'; +# +# LP BUG#884644 exists2in broke name resolution +# +CREATE TABLE t1 (f1 integer); +SELECT * FROM t1 WHERE EXISTS (SELECT NO_SUCH_TABLE.NO_SUCH_FIELD FROM t1); +ERROR 42S22: Unknown column 'NO_SUCH_TABLE.NO_SUCH_FIELD' in 'field list' +drop table t1; +# +# LP BUG#884657 Wrong result with exists2in , correlated subquery +# +CREATE TABLE t1 ( a varchar(1)) ; +INSERT INTO t1 VALUES ('c'),('b'); +CREATE TABLE t2 ( b varchar(1)) ; +INSERT INTO t2 VALUES ('v'),('v'),('c'),(NULL),('x'),('i'),('e'),('p'),('s'),('j'),('z'),('c'),('a'),('q'),('y'),(NULL),('r'),('v'),(NULL),('r'); +CREATE TABLE t3 ( a int NOT NULL , b varchar(1)) ; +INSERT INTO t3 VALUES (29,'c'); +SELECT * +FROM t1, t2 +WHERE EXISTS ( +SELECT a +FROM t3 +WHERE t3.b = t1.a +AND t3.b <> t2.b +); +a b +c v +c v +c x +c i +c e +c p +c s +c j +c z +c a +c q +c y +c r +c v +c r +INSERT INTO t3 VALUES (2,'c'); +alter table t1 add index aa (a); +alter table t3 add index bb (b); +-- EXIST to IN then semijoin (has priority over IN to EXISTS) +set optimizer_switch='exists_to_in=on,in_to_exists=on,semijoin=on,materialization=off,subquery_cache=off'; +SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t3 WHERE t3.b = t1.a); +a +c +explain extended +SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t3 WHERE t3.b = t1.a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 index aa aa 4 NULL 2 100.00 Using index +1 PRIMARY t3 ALL bb NULL NULL NULL 2 100.00 Using where; FirstMatch(t1); Using join buffer (flat, BNL join) +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join (`test`.`t3`) where (`test`.`t3`.`b` = `test`.`t1`.`a`) +-- EXIST to IN then IN to EXISTS +set optimizer_switch='exists_to_in=on,in_to_exists=on,semijoin=off,materialization=off,subquery_cache=off'; +SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t3 WHERE t3.b = t1.a); +a +c +explain extended +SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t3 WHERE t3.b = t1.a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 index NULL aa 4 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t3 ALL bb NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where <in_optimizer>(`test`.`t1`.`a`,<exists>(select `test`.`t3`.`b` from `test`.`t3` where (<cache>(`test`.`t1`.`a`) = `test`.`t3`.`b`))) +-- EXIST2IN then MATERIALIZATION +set optimizer_switch='exists_to_in=on,in_to_exists=off,semijoin=off,materialization=on,subquery_cache=off'; +SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t3 WHERE t3.b = t1.a); +a +c +explain extended +SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t3 WHERE t3.b = t1.a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 index NULL aa 4 NULL 2 100.00 Using where; Using index +2 MATERIALIZED t3 ALL NULL NULL NULL NULL 2 100.00 +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where <in_optimizer>(`test`.`t1`.`a`,`test`.`t1`.`a` in ( <materialize> (select `test`.`t3`.`b` from `test`.`t3` where 1 ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where ((`test`.`t1`.`a` = `<subquery2>`.`b`))))) +-- NO EXIST2IN +set optimizer_switch='exists_to_in=off,subquery_cache=off'; +SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t3 WHERE t3.b = t1.a); +a +c +explain extended +SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t3 WHERE t3.b = t1.a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 index NULL aa 4 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t3 ALL bb NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where exists(select `test`.`t3`.`a` from `test`.`t3` where (`test`.`t3`.`b` = `test`.`t1`.`a`)) +set optimizer_switch=default; +set optimizer_switch='exists_to_in=on'; +drop table t1,t2,t3; +# +# From group_min_max.test +# +create table t1 ( +a1 char(64), a2 char(64), b char(16), c char(16) not null, d char(16), dummy char(64) default ' ' +); +insert into t1 (a1, a2, b, c, d) values +('a','a','a','a111','xy1'),('a','a','a','b111','xy2'),('a','a','a','c111','xy3'),('a','a','a','d111','xy4'), +('a','a','b','e112','xy1'),('a','a','b','f112','xy2'),('a','a','b','g112','xy3'),('a','a','b','h112','xy4'), +('a','b','a','i121','xy1'),('a','b','a','j121','xy2'),('a','b','a','k121','xy3'),('a','b','a','l121','xy4'), +('a','b','b','m122','xy1'),('a','b','b','n122','xy2'),('a','b','b','o122','xy3'),('a','b','b','p122','xy4'), +('b','a','a','a211','xy1'),('b','a','a','b211','xy2'),('b','a','a','c211','xy3'),('b','a','a','d211','xy4'), +('b','a','b','e212','xy1'),('b','a','b','f212','xy2'),('b','a','b','g212','xy3'),('b','a','b','h212','xy4'), +('b','b','a','i221','xy1'),('b','b','a','j221','xy2'),('b','b','a','k221','xy3'),('b','b','a','l221','xy4'), +('b','b','b','m222','xy1'),('b','b','b','n222','xy2'),('b','b','b','o222','xy3'),('b','b','b','p222','xy4'), +('c','a','a','a311','xy1'),('c','a','a','b311','xy2'),('c','a','a','c311','xy3'),('c','a','a','d311','xy4'), +('c','a','b','e312','xy1'),('c','a','b','f312','xy2'),('c','a','b','g312','xy3'),('c','a','b','h312','xy4'), +('c','b','a','i321','xy1'),('c','b','a','j321','xy2'),('c','b','a','k321','xy3'),('c','b','a','l321','xy4'), +('c','b','b','m322','xy1'),('c','b','b','n322','xy2'),('c','b','b','o322','xy3'),('c','b','b','p322','xy4'), +('d','a','a','a411','xy1'),('d','a','a','b411','xy2'),('d','a','a','c411','xy3'),('d','a','a','d411','xy4'), +('d','a','b','e412','xy1'),('d','a','b','f412','xy2'),('d','a','b','g412','xy3'),('d','a','b','h412','xy4'), +('d','b','a','i421','xy1'),('d','b','a','j421','xy2'),('d','b','a','k421','xy3'),('d','b','a','l421','xy4'), +('d','b','b','m422','xy1'),('d','b','b','n422','xy2'),('d','b','b','o422','xy3'),('d','b','b','p422','xy4'), +('a','a','a','a111','xy1'),('a','a','a','b111','xy2'),('a','a','a','c111','xy3'),('a','a','a','d111','xy4'), +('a','a','b','e112','xy1'),('a','a','b','f112','xy2'),('a','a','b','g112','xy3'),('a','a','b','h112','xy4'), +('a','b','a','i121','xy1'),('a','b','a','j121','xy2'),('a','b','a','k121','xy3'),('a','b','a','l121','xy4'), +('a','b','b','m122','xy1'),('a','b','b','n122','xy2'),('a','b','b','o122','xy3'),('a','b','b','p122','xy4'), +('b','a','a','a211','xy1'),('b','a','a','b211','xy2'),('b','a','a','c211','xy3'),('b','a','a','d211','xy4'), +('b','a','b','e212','xy1'),('b','a','b','f212','xy2'),('b','a','b','g212','xy3'),('b','a','b','h212','xy4'), +('b','b','a','i221','xy1'),('b','b','a','j221','xy2'),('b','b','a','k221','xy3'),('b','b','a','l221','xy4'), +('b','b','b','m222','xy1'),('b','b','b','n222','xy2'),('b','b','b','o222','xy3'),('b','b','b','p222','xy4'), +('c','a','a','a311','xy1'),('c','a','a','b311','xy2'),('c','a','a','c311','xy3'),('c','a','a','d311','xy4'), +('c','a','b','e312','xy1'),('c','a','b','f312','xy2'),('c','a','b','g312','xy3'),('c','a','b','h312','xy4'), +('c','b','a','i321','xy1'),('c','b','a','j321','xy2'),('c','b','a','k321','xy3'),('c','b','a','l321','xy4'), +('c','b','b','m322','xy1'),('c','b','b','n322','xy2'),('c','b','b','o322','xy3'),('c','b','b','p322','xy4'), +('d','a','a','a411','xy1'),('d','a','a','b411','xy2'),('d','a','a','c411','xy3'),('d','a','a','d411','xy4'), +('d','a','b','e412','xy1'),('d','a','b','f412','xy2'),('d','a','b','g412','xy3'),('d','a','b','h412','xy4'), +('d','b','a','i421','xy1'),('d','b','a','j421','xy2'),('d','b','a','k421','xy3'),('d','b','a','l421','xy4'), +('d','b','b','m422','xy1'),('d','b','b','n422','xy2'),('d','b','b','o422','xy3'),('d','b','b','p422','xy4'); +create index idx_t1_0 on t1 (a1); +create index idx_t1_1 on t1 (a1,a2,b,c); +create index idx_t1_2 on t1 (a1,a2,b); +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Table is already up to date +create table t2 ( +a1 char(64), a2 char(64) not null, b char(16), c char(16), d char(16), dummy char(64) default ' ' +); +insert into t2 select * from t1; +insert into t2 (a1, a2, b, c, d) values +('a','a',NULL,'a777','xyz'),('a','a',NULL,'a888','xyz'),('a','a',NULL,'a999','xyz'), +('a','a','a',NULL,'xyz'), +('a','a','b',NULL,'xyz'), +('a','b','a',NULL,'xyz'), +('c','a',NULL,'c777','xyz'),('c','a',NULL,'c888','xyz'),('c','a',NULL,'c999','xyz'), +('d','b','b',NULL,'xyz'), +('e','a','a',NULL,'xyz'),('e','a','a',NULL,'xyz'),('e','a','a',NULL,'xyz'),('e','a','a',NULL,'xyz'), +('e','a','b',NULL,'xyz'),('e','a','b',NULL,'xyz'),('e','a','b',NULL,'xyz'),('e','a','b',NULL,'xyz'), +('a','a',NULL,'a777','xyz'),('a','a',NULL,'a888','xyz'),('a','a',NULL,'a999','xyz'), +('a','a','a',NULL,'xyz'), +('a','a','b',NULL,'xyz'), +('a','b','a',NULL,'xyz'), +('c','a',NULL,'c777','xyz'),('c','a',NULL,'c888','xyz'),('c','a',NULL,'c999','xyz'), +('d','b','b',NULL,'xyz'), +('e','a','a',NULL,'xyz'),('e','a','a',NULL,'xyz'),('e','a','a',NULL,'xyz'),('e','a','a',NULL,'xyz'), +('e','a','b',NULL,'xyz'),('e','a','b',NULL,'xyz'),('e','a','b',NULL,'xyz'),('e','a','b',NULL,'xyz'); +create index idx_t2_0 on t2 (a1); +create index idx_t2_1 on t2 (a1,a2,b,c); +create index idx_t2_2 on t2 (a1,a2,b); +analyze table t2; +Table Op Msg_type Msg_text +test.t2 analyze status Table is already up to date +create table t3 ( +a1 char(1), a2 char(1), b char(1), c char(4) not null, d char(3), dummy char(1) default ' ' +); +insert into t3 (a1, a2, b, c, d) values +('a','a','a','a111','xy1'),('a','a','a','b111','xy2'),('a','a','a','c111','xy3'),('a','a','a','d111','xy4'), +('a','a','b','e112','xy1'),('a','a','b','f112','xy2'),('a','a','b','g112','xy3'),('a','a','b','h112','xy4'), +('a','b','a','i121','xy1'),('a','b','a','j121','xy2'),('a','b','a','k121','xy3'),('a','b','a','l121','xy4'), +('a','b','b','m122','xy1'),('a','b','b','n122','xy2'),('a','b','b','o122','xy3'),('a','b','b','p122','xy4'), +('b','a','a','a211','xy1'),('b','a','a','b211','xy2'),('b','a','a','c211','xy3'),('b','a','a','d211','xy4'), +('b','a','b','e212','xy1'),('b','a','b','f212','xy2'),('b','a','b','g212','xy3'),('b','a','b','h212','xy4'), +('b','b','a','i221','xy1'),('b','b','a','j221','xy2'),('b','b','a','k221','xy3'),('b','b','a','l221','xy4'), +('b','b','b','m222','xy1'),('b','b','b','n222','xy2'),('b','b','b','o222','xy3'),('b','b','b','p222','xy4'), +('c','a','a','a311','xy1'),('c','a','a','b311','xy2'),('c','a','a','c311','xy3'),('c','a','a','d311','xy4'), +('c','a','b','e312','xy1'),('c','a','b','f312','xy2'),('c','a','b','g312','xy3'),('c','a','b','h312','xy4'), +('c','b','a','i321','xy1'),('c','b','a','j321','xy2'),('c','b','a','k321','xy3'),('c','b','a','l321','xy4'), +('c','b','b','m322','xy1'),('c','b','b','n322','xy2'),('c','b','b','o322','xy3'),('c','b','b','p322','xy4'); +insert into t3 (a1, a2, b, c, d) values +('a','a','a','a111','xy1'),('a','a','a','b111','xy2'),('a','a','a','c111','xy3'),('a','a','a','d111','xy4'), +('a','a','b','e112','xy1'),('a','a','b','f112','xy2'),('a','a','b','g112','xy3'),('a','a','b','h112','xy4'), +('a','b','a','i121','xy1'),('a','b','a','j121','xy2'),('a','b','a','k121','xy3'),('a','b','a','l121','xy4'), +('a','b','b','m122','xy1'),('a','b','b','n122','xy2'),('a','b','b','o122','xy3'),('a','b','b','p122','xy4'), +('b','a','a','a211','xy1'),('b','a','a','b211','xy2'),('b','a','a','c211','xy3'),('b','a','a','d211','xy4'), +('b','a','b','e212','xy1'),('b','a','b','f212','xy2'),('b','a','b','g212','xy3'),('b','a','b','h212','xy4'), +('b','b','a','i221','xy1'),('b','b','a','j221','xy2'),('b','b','a','k221','xy3'),('b','b','a','l221','xy4'), +('b','b','b','m222','xy1'),('b','b','b','n222','xy2'),('b','b','b','o222','xy3'),('b','b','b','p222','xy4'), +('c','a','a','a311','xy1'),('c','a','a','b311','xy2'),('c','a','a','c311','xy3'),('c','a','a','d311','xy4'), +('c','a','b','e312','xy1'),('c','a','b','f312','xy2'),('c','a','b','g312','xy3'),('c','a','b','h312','xy4'), +('c','b','a','i321','xy1'),('c','b','a','j321','xy2'),('c','b','a','k321','xy3'),('c','b','a','l321','xy4'), +('c','b','b','m322','xy1'),('c','b','b','n322','xy2'),('c','b','b','o322','xy3'),('c','b','b','p322','xy4'); +insert into t3 (a1, a2, b, c, d) values +('a','a','a','a111','xy1'),('a','a','a','b111','xy2'),('a','a','a','c111','xy3'),('a','a','a','d111','xy4'), +('a','a','b','e112','xy1'),('a','a','b','f112','xy2'),('a','a','b','g112','xy3'),('a','a','b','h112','xy4'), +('a','b','a','i121','xy1'),('a','b','a','j121','xy2'),('a','b','a','k121','xy3'),('a','b','a','l121','xy4'), +('a','b','b','m122','xy1'),('a','b','b','n122','xy2'),('a','b','b','o122','xy3'),('a','b','b','p122','xy4'), +('b','a','a','a211','xy1'),('b','a','a','b211','xy2'),('b','a','a','c211','xy3'),('b','a','a','d211','xy4'), +('b','a','b','e212','xy1'),('b','a','b','f212','xy2'),('b','a','b','g212','xy3'),('b','a','b','h212','xy4'), +('b','b','a','i221','xy1'),('b','b','a','j221','xy2'),('b','b','a','k221','xy3'),('b','b','a','l221','xy4'), +('b','b','b','m222','xy1'),('b','b','b','n222','xy2'),('b','b','b','o222','xy3'),('b','b','b','p222','xy4'), +('c','a','a','a311','xy1'),('c','a','a','b311','xy2'),('c','a','a','c311','xy3'),('c','a','a','d311','xy4'), +('c','a','b','e312','xy1'),('c','a','b','f312','xy2'),('c','a','b','g312','xy3'),('c','a','b','h312','xy4'), +('c','b','a','i321','xy1'),('c','b','a','j321','xy2'),('c','b','a','k321','xy3'),('c','b','a','l321','xy4'), +('c','b','b','m322','xy1'),('c','b','b','n322','xy2'),('c','b','b','o322','xy3'),('c','b','b','p322','xy4'); +insert into t3 (a1, a2, b, c, d) values +('a','a','a','a111','xy1'),('a','a','a','b111','xy2'),('a','a','a','c111','xy3'),('a','a','a','d111','xy4'), +('a','a','b','e112','xy1'),('a','a','b','f112','xy2'),('a','a','b','g112','xy3'),('a','a','b','h112','xy4'), +('a','b','a','i121','xy1'),('a','b','a','j121','xy2'),('a','b','a','k121','xy3'),('a','b','a','l121','xy4'), +('a','b','b','m122','xy1'),('a','b','b','n122','xy2'),('a','b','b','o122','xy3'),('a','b','b','p122','xy4'), +('b','a','a','a211','xy1'),('b','a','a','b211','xy2'),('b','a','a','c211','xy3'),('b','a','a','d211','xy4'), +('b','a','b','e212','xy1'),('b','a','b','f212','xy2'),('b','a','b','g212','xy3'),('b','a','b','h212','xy4'), +('b','b','a','i221','xy1'),('b','b','a','j221','xy2'),('b','b','a','k221','xy3'),('b','b','a','l221','xy4'), +('b','b','b','m222','xy1'),('b','b','b','n222','xy2'),('b','b','b','o222','xy3'),('b','b','b','p222','xy4'), +('c','a','a','a311','xy1'),('c','a','a','b311','xy2'),('c','a','a','c311','xy3'),('c','a','a','d311','xy4'), +('c','a','b','e312','xy1'),('c','a','b','f312','xy2'),('c','a','b','g312','xy3'),('c','a','b','h312','xy4'), +('c','b','a','i321','xy1'),('c','b','a','j321','xy2'),('c','b','a','k321','xy3'),('c','b','a','l321','xy4'), +('c','b','b','m322','xy1'),('c','b','b','n322','xy2'),('c','b','b','o322','xy3'),('c','b','b','p322','xy4'); +create index idx_t3_0 on t3 (a1); +create index idx_t3_1 on t3 (a1,a2,b,c); +create index idx_t3_2 on t3 (a1,a2,b); +analyze table t3; +Table Op Msg_type Msg_text +test.t3 analyze status Table is already up to date +explain select a1,a2,b,c,min(c), max(c) from t1 +where exists ( select * from t2 +where t2.c in (select c from t3 where t3.c > t1.b) and +t2.c > 'b1' ) +group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index +2 DEPENDENT SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index +2 DEPENDENT SUBQUERY t3 index NULL idx_t3_1 10 NULL 192 Using where; Using index; FirstMatch(t2); Using join buffer (flat, BNL join) +select a1,a2,b,c,min(c), max(c) from t1 +where exists ( select * from t2 +where t2.c in (select c from t3 where t3.c > t1.b) and +t2.c > 'b1' ) +group by a1,a2,b; +a1 a2 b c min(c) max(c) +a a a a111 a111 d111 +a a b e112 e112 h112 +a b a i121 i121 l121 +a b b m122 m122 p122 +b a a a211 a211 d211 +b a b e212 e212 h212 +b b a i221 i221 l221 +b b b m222 m222 p222 +c a a a311 a311 d311 +c a b e312 e312 h312 +c b a i321 i321 l321 +c b b m322 m322 p322 +d a a a411 a411 d411 +d a b e412 e412 h412 +d b a i421 i421 l421 +d b b m422 m422 p422 +explain select a1,a2,b,c,min(c), max(c) from t1 +where exists ( select * from t2 +where t2.c in (select c from t3 where t3.c > t1.c) and +t2.c > 'b1' ) +group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index +2 DEPENDENT SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index +2 DEPENDENT SUBQUERY t3 index NULL idx_t3_1 10 NULL 192 Using where; Using index; FirstMatch(t2); Using join buffer (flat, BNL join) +select a1,a2,b,c,min(c), max(c) from t1 +where exists ( select * from t2 +where t2.c in (select c from t3 where t3.c > t1.c) and +t2.c > 'b1' ) +group by a1,a2,b; +a1 a2 b c min(c) max(c) +a a a a111 a111 d111 +a a b e112 e112 h112 +a b a i121 i121 l121 +a b b m122 m122 p122 +b a a a211 a211 d211 +b a b e212 e212 h212 +b b a i221 i221 l221 +b b b m222 m222 p222 +c a a a311 a311 d311 +c a b e312 e312 h312 +c b a i321 i321 l321 +c b b m322 m322 o322 +d a a a411 a411 d411 +d a b e412 e412 h412 +d b a i421 i421 l421 +d b b m422 m422 o422 +drop table t1, t2, t3; +CREATE TABLE t1 ( a INT ); +INSERT INTO t1 VALUES (7),(0); +CREATE TABLE t2 ( b INT ); +INSERT INTO t2 VALUES (0),(8); +SELECT * FROM t1 WHERE +EXISTS ( SELECT * FROM t2 WHERE b = a ) +OR a > 0; +a +7 +0 +explain extended +SELECT * FROM t1 WHERE +EXISTS ( SELECT * FROM t2 WHERE b = a ) +OR a > 0; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 100.00 +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (<expr_cache><`test`.`t1`.`a`>(<in_optimizer>(`test`.`t1`.`a`,`test`.`t1`.`a` in ( <materialize> (select `test`.`t2`.`b` from `test`.`t2` where 1 ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where ((`test`.`t1`.`a` = `<subquery2>`.`b`)))))) or (`test`.`t1`.`a` > 0)) +drop tables t1,t2; +CREATE TABLE t1 ( a INT ); +INSERT INTO t1 VALUES (1),(5); +CREATE TABLE t2 ( b INT ) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1); +CREATE TABLE t3 ( c INT ); +INSERT INTO t3 VALUES (4),(5); +SET optimizer_switch='exists_to_in=on,subquery_cache=off,materialization=on,in_to_exists=off,semijoin=off'; +explain extended +SELECT ( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) ) FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 +2 SUBQUERY t2 system NULL NULL NULL NULL 1 100.00 +3 MATERIALIZED t3 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.t2.b' of SELECT #3 was resolved in SELECT #2 +Note 1003 select (select 1 from dual where (not(((1 is not null) and <in_optimizer>(1,1 in ( <materialize> (select `test`.`t3`.`c` from `test`.`t3` where (`test`.`t3`.`c` is not null) ), <primary_index_lookup>(1 in <temporary table> on distinct_key where ((1 = `<subquery3>`.`c`))))))))) AS `( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) )` from `test`.`t1` +SELECT ( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) ) FROM t1; +( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) ) +1 +1 +SET optimizer_switch='exists_to_in=on,subquery_cache=off'; +explain extended +SELECT ( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) ) FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 +2 SUBQUERY t2 system NULL NULL NULL NULL 1 100.00 +3 MATERIALIZED t3 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.t2.b' of SELECT #3 was resolved in SELECT #2 +Note 1003 select (select 1 from dual where (not(((1 is not null) and <in_optimizer>(1,1 in ( <materialize> (select `test`.`t3`.`c` from `test`.`t3` where (`test`.`t3`.`c` is not null) ), <primary_index_lookup>(1 in <temporary table> on distinct_key where ((1 = `<subquery3>`.`c`))))))))) AS `( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) )` from `test`.`t1` +SELECT ( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) ) FROM t1; +( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) ) +1 +1 +SET optimizer_switch='exists_to_in=off,subquery_cache=off'; +explain extended +SELECT ( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) ) FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 +2 SUBQUERY t2 system NULL NULL NULL NULL 1 100.00 +3 SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.t2.b' of SELECT #3 was resolved in SELECT #2 +Note 1003 select (select 1 from dual where (not(exists(select `test`.`t3`.`c` from `test`.`t3` where (`test`.`t3`.`c` = 1))))) AS `( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) )` from `test`.`t1` +SELECT ( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) ) FROM t1; +( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) ) +1 +1 +set optimizer_switch=default; +set optimizer_switch='exists_to_in=on'; +drop table t1,t2,t3; +# multi condition test +CREATE TABLE t1 ( a varchar(1), a1 varchar(1)) ; +INSERT INTO t1 VALUES ('c', 'c'), ('b', 'b'); +CREATE TABLE t3 ( a int NOT NULL , b varchar(1), b1 varchar(1)) ; +INSERT INTO t3 VALUES (29,'c','c'); +INSERT INTO t3 VALUES (2,'c','c'); +alter table t1 add index aa (a,a1); +alter table t3 add index bb (b,b1); +-- EXIST to IN then semijoin (has priority over IN to EXISTS) +set optimizer_switch='exists_to_in=on,in_to_exists=on,semijoin=on,materialization=off,subquery_cache=off'; +SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM t3 WHERE t3.b = t1.a and t3.b1 = t1.a1); +a a1 +c c +explain extended +SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM t3 WHERE t3.b = t1.a and t3.b1 = t1.a1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 index bb bb 8 NULL 2 100.00 Using where; Using index; LooseScan +1 PRIMARY t1 ref aa aa 8 test.t3.b,test.t3.b1 2 100.00 Using index +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 +Note 1276 Field or reference 'test.t1.a1' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`a1` AS `a1` from `test`.`t1` semi join (`test`.`t3`) where ((`test`.`t1`.`a` = `test`.`t3`.`b`) and (`test`.`t1`.`a1` = `test`.`t3`.`b1`)) +-- EXIST to IN then IN to EXISTS +set optimizer_switch='exists_to_in=on,in_to_exists=on,semijoin=off,materialization=off,subquery_cache=off'; +SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM t3 WHERE t3.b = t1.a and t3.b1 = t1.a1); +a a1 +c c +explain extended +SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM t3 WHERE t3.b = t1.a and t3.b1 = t1.a1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 index NULL aa 8 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t3 index_subquery bb bb 8 func,func 2 100.00 Using index; Using where +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 +Note 1276 Field or reference 'test.t1.a1' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`a1` AS `a1` from `test`.`t1` where <in_optimizer>((`test`.`t1`.`a`,`test`.`t1`.`a1`),<exists>(<index_lookup>(<cache>(`test`.`t1`.`a`) in t3 on bb where ((<cache>(`test`.`t1`.`a`) = `test`.`t3`.`b`) and (<cache>(`test`.`t1`.`a1`) = `test`.`t3`.`b1`))))) +-- EXIST2IN then MATERIALIZATION +set optimizer_switch='exists_to_in=on,in_to_exists=off,semijoin=off,materialization=on,subquery_cache=off'; +SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM t3 WHERE t3.b = t1.a and t3.b1 = t1.a1); +a a1 +c c +explain extended +SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM t3 WHERE t3.b = t1.a and t3.b1 = t1.a1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 index NULL aa 8 NULL 2 100.00 Using where; Using index +2 MATERIALIZED t3 index NULL bb 8 NULL 2 100.00 Using index +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 +Note 1276 Field or reference 'test.t1.a1' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`a1` AS `a1` from `test`.`t1` where <in_optimizer>((`test`.`t1`.`a`,`test`.`t1`.`a1`),(`test`.`t1`.`a`,`test`.`t1`.`a1`) in ( <materialize> (select `test`.`t3`.`b`,`test`.`t3`.`b1` from `test`.`t3` where 1 ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where ((`test`.`t1`.`a` = `<subquery2>`.`b`) and (`test`.`t1`.`a1` = `<subquery2>`.`b1`))))) +-- NO EXIST2IN +set optimizer_switch='exists_to_in=off,subquery_cache=off'; +SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM t3 WHERE t3.b = t1.a and t3.b1 = t1.a1); +a a1 +c c +explain extended +SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM t3 WHERE t3.b = t1.a and t3.b1 = t1.a1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 index NULL aa 8 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t3 ref bb bb 8 test.t1.a,test.t1.a1 2 100.00 Using index +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 +Note 1276 Field or reference 'test.t1.a1' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`a1` AS `a1` from `test`.`t1` where exists(select 1 from `test`.`t3` where ((`test`.`t3`.`b` = `test`.`t1`.`a`) and (`test`.`t3`.`b1` = `test`.`t1`.`a1`))) +set optimizer_switch=default; +set optimizer_switch='exists_to_in=on'; +drop table t1,t3; +# +# MDEV-159 Assertion about not marked for read failed in +# String* Field_varstring::val_str(String*, String*) +# +SET optimizer_switch = REPLACE( @@optimizer_switch, '=on', '=off' ); +SET optimizer_switch='in_to_exists=on,exists_to_in=on'; +CREATE TABLE t1 ( a VARCHAR(1) ); +INSERT INTO t1 VALUES ('k'),('m'); +CREATE TABLE t2 ( b INT, +c VARCHAR(1), +d VARCHAR(1) NOT NULL ); +INSERT INTO t2 VALUES +(4,'j','j'),(6,'v','v'); +CREATE ALGORITHM=MERGE VIEW v AS SELECT * FROM t2 WHERE b < 1; +SELECT c FROM v +WHERE EXISTS ( +SELECT * FROM t1, t2 +WHERE a <= v.d AND b = v.b +); +c +explain extended +SELECT c FROM v +WHERE EXISTS ( +SELECT * FROM t1, t2 +WHERE a <= v.d AND b = v.b +); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where +2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1276 Field or reference 'v.d' of SELECT #2 was resolved in SELECT #1 +Note 1276 Field or reference 'v.b' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`t2`.`c` AS `c` from `test`.`t2` where (<in_optimizer>(`test`.`t2`.`b`,<exists>(select `test`.`t2`.`b` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a` <= `test`.`t2`.`d`) and (<cache>(`test`.`t2`.`b`) = `test`.`t2`.`b`)))) and (`test`.`t2`.`b` < 1)) +set optimizer_switch=default; +set optimizer_switch='exists_to_in=on'; +drop view v; +drop table t1,t2; +# +# MDEV-160 Exists2In: Crash in in hp_movelink with subquery_cache=ON +# +SET optimizer_switch = 'in_to_exists=on,subquery_cache=on,exists_to_in=on'; +CREATE TABLE t1 ( +a VARCHAR(3) NOT NULL, +b VARCHAR(50) +); +INSERT INTO t1 VALUES +('USA','Chinese'),('USA','English'), +('FRA','French'),('ITA','Italian'); +CREATE TABLE t2 ( c VARCHAR(3) ); +INSERT INTO t2 VALUES ('USA'),('FRA'); +SELECT * FROM t1 AS alias1, t1 AS alias2 +WHERE EXISTS ( +SELECT * FROM t1, t2 +WHERE a <= alias2.a AND c = alias1.b +) OR alias1 .a = 'foo'; +a b a b +SELECT * FROM t1 AS alias1, t1 AS alias2 +WHERE EXISTS ( +SELECT * FROM t1, t2 +WHERE a <= alias2.a AND c = alias1.a +) OR alias1 .a = 'foo'; +a b a b +USA Chinese USA Chinese +USA English USA Chinese +FRA French USA Chinese +USA Chinese USA English +USA English USA English +FRA French USA English +USA Chinese FRA French +USA English FRA French +FRA French FRA French +USA Chinese ITA Italian +USA English ITA Italian +FRA French ITA Italian +drop table t1,t2; +set optimizer_switch=default; +set optimizer_switch='exists_to_in=on'; +# +# MDEV-160 Exists2In: Crash in in hp_movelink with subquery_cache=ON +# +SET optimizer_switch = 'in_to_exists=on,subquery_cache=on,exists_to_in=on'; +CREATE TABLE t1 ( +a VARCHAR(3) NOT NULL, +b VARCHAR(50) +); +INSERT INTO t1 VALUES +('USA','Chinese'),('USA','English'), +('FRA','French'),('ITA','Italian'); +CREATE TABLE t2 ( c VARCHAR(3) ); +INSERT INTO t2 VALUES ('USA'),('FRA'); +SELECT * FROM t1 AS alias1, t1 AS alias2 +WHERE EXISTS ( +SELECT * FROM t1, t2 +WHERE a <= alias2.a AND c = alias1.b +) OR alias1 .a = 'foo'; +a b a b +explain extended +SELECT * FROM t1 AS alias1, t1 AS alias2 +WHERE EXISTS ( +SELECT * FROM t1, t2 +WHERE a <= alias2.a AND c = alias1.b +) OR alias1 .a = 'foo'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY alias1 ALL NULL NULL NULL NULL 4 100.00 +1 PRIMARY alias2 ALL NULL NULL NULL NULL 4 100.00 Using where; Using join buffer (flat, BNL join) +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where +2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 4 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1276 Field or reference 'test.alias2.a' of SELECT #2 was resolved in SELECT #1 +Note 1276 Field or reference 'test.alias1.b' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`alias1`.`a` AS `a`,`test`.`alias1`.`b` AS `b`,`test`.`alias2`.`a` AS `a`,`test`.`alias2`.`b` AS `b` from `test`.`t1` `alias1` join `test`.`t1` `alias2` where (<expr_cache><`test`.`alias1`.`b`,`test`.`alias2`.`a`>(<in_optimizer>(`test`.`alias1`.`b`,<exists>(select `test`.`t2`.`c` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a` <= `test`.`alias2`.`a`) and (<cache>(`test`.`alias1`.`b`) = `test`.`t2`.`c`))))) or (`test`.`alias1`.`a` = 'foo')) +drop table t1,t2; +set optimizer_switch=default; +set optimizer_switch='exists_to_in=on'; +# +# MDEV-245 Exists2In: Wrong result (extra rows) with +# exists_to_in=ON, materialization=OFF, NOT EXISTS subquery +# +SET optimizer_switch='materialization=off,exists_to_in=on'; +CREATE TABLE t1 ( a INT ) ; +INSERT INTO t1 VALUES (0),(8),(1); +CREATE TABLE t2 ( b INT ) ; +INSERT INTO t2 VALUES (1),(2),(3); +SELECT * FROM t1 WHERE NOT EXISTS ( SELECT * FROM t2 WHERE b = a ); +a +0 +8 +explain extended +SELECT * FROM t1 WHERE NOT EXISTS ( SELECT * FROM t2 WHERE b = a ); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (not(((`test`.`t1`.`a` is not null) and <expr_cache><`test`.`t1`.`a`>(<in_optimizer>(`test`.`t1`.`a`,<exists>(select `test`.`t2`.`b` from `test`.`t2` where ((`test`.`t2`.`b` is not null) and (<cache>(`test`.`t1`.`a`) = `test`.`t2`.`b`)))))))) +drop table t1,t2; +set optimizer_switch=default; +set optimizer_switch='exists_to_in=on'; +# +# MDEV-243 Wrong result (extra or missing rows) with +# exists_to_in + materialization, EXISTS subquery +# +SET optimizer_switch='index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=on'; +CREATE TABLE t1 ( a VARCHAR(1), b VARCHAR(1) ); +INSERT INTO t1 VALUES ('v','v'),('s','v'); +SELECT * FROM t1 AS alias +WHERE EXISTS ( SELECT * FROM t1 WHERE a > alias.a AND a = alias.b ); +a b +s v +explain extended +SELECT * FROM t1 AS alias +WHERE EXISTS ( SELECT * FROM t1 WHERE a > alias.a AND a = alias.b ); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY alias ALL NULL NULL NULL NULL 2 100.00 Using where +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where; FirstMatch(alias); Using join buffer (flat, BNL join) +Warnings: +Note 1276 Field or reference 'test.alias.a' of SELECT #2 was resolved in SELECT #1 +Note 1276 Field or reference 'test.alias.b' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`alias`.`a` AS `a`,`test`.`alias`.`b` AS `b` from `test`.`t1` `alias` semi join (`test`.`t1`) where ((`test`.`t1`.`a` = `test`.`alias`.`b`) and (`test`.`alias`.`b` > `test`.`alias`.`a`)) +SET optimizer_switch = REPLACE( @@optimizer_switch, '=on', '=off' ); +SET optimizer_switch = 'exists_to_in=on,materialization=on,semijoin=off'; +SELECT * FROM t1 AS alias +WHERE EXISTS ( SELECT * FROM t1 WHERE a > alias.a AND a = alias.b ); +a b +s v +explain extended +SELECT * FROM t1 AS alias +WHERE EXISTS ( SELECT * FROM t1 WHERE a > alias.a AND a = alias.b ); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY alias ALL NULL NULL NULL NULL 2 100.00 Using where +2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.alias.a' of SELECT #2 was resolved in SELECT #1 +Note 1276 Field or reference 'test.alias.b' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`alias`.`a` AS `a`,`test`.`alias`.`b` AS `b` from `test`.`t1` `alias` where <in_optimizer>(`test`.`alias`.`b`,<exists>(select `test`.`t1`.`a` from `test`.`t1` where ((`test`.`t1`.`a` > `test`.`alias`.`a`) and (<cache>(`test`.`alias`.`b`) = `test`.`t1`.`a`)))) +SET optimizer_switch = 'exists_to_in=on,materialization=on,semijoin=on'; +SELECT * FROM t1 AS alias +WHERE EXISTS ( SELECT * FROM t1 WHERE a > alias.a AND a = alias.b ); +a b +s v +explain extended +SELECT * FROM t1 AS alias +WHERE EXISTS ( SELECT * FROM t1 WHERE a > alias.a AND a = alias.b ); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY alias ALL NULL NULL NULL NULL 2 100.00 Using where +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where; Start temporary; End temporary +Warnings: +Note 1276 Field or reference 'test.alias.a' of SELECT #2 was resolved in SELECT #1 +Note 1276 Field or reference 'test.alias.b' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`alias`.`a` AS `a`,`test`.`alias`.`b` AS `b` from `test`.`t1` `alias` semi join (`test`.`t1`) where ((`test`.`t1`.`a` = `test`.`alias`.`b`) and (`test`.`alias`.`b` > `test`.`alias`.`a`)) +drop table t1; +set optimizer_switch=default; +set optimizer_switch='exists_to_in=on'; +# +# MDEV-403 Wrong result (missing rows) with subquery in +# EXISTS and an OR condition outside +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (2),(3); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1),(3); +SET optimizer_switch = 'exists_to_in=off,in_to_exists=on'; +SELECT * FROM t1 AS alias1, t2 AS alias2 +WHERE EXISTS ( +SELECT 1 FROM t2 WHERE b = alias1.a AND b > alias2.b +) OR a = 5; +a b +3 1 +SET optimizer_switch = 'exists_to_in=on,in_to_exists=on'; +SELECT * FROM t1 AS alias1, t2 AS alias2 +WHERE EXISTS ( +SELECT 1 FROM t2 WHERE b = alias1.a AND b > alias2.b +) OR a = 5; +a b +3 1 +explain extended +SELECT * FROM t1 AS alias1, t2 AS alias2 +WHERE EXISTS ( +SELECT 1 FROM t2 WHERE b = alias1.a AND b > alias2.b +) OR a = 5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY alias1 ALL NULL NULL NULL NULL 2 100.00 +1 PRIMARY alias2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join) +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.alias1.a' of SELECT #2 was resolved in SELECT #1 +Note 1276 Field or reference 'test.alias2.b' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`alias1`.`a` AS `a`,`test`.`alias2`.`b` AS `b` from `test`.`t1` `alias1` join `test`.`t2` `alias2` where (<expr_cache><`test`.`alias1`.`a`,`test`.`alias2`.`b`>(<in_optimizer>(`test`.`alias1`.`a`,<exists>(select `test`.`t2`.`b` from `test`.`t2` where ((`test`.`t2`.`b` > `test`.`alias2`.`b`) and (<cache>(`test`.`alias1`.`a`) = `test`.`t2`.`b`))))) or (`test`.`alias1`.`a` = 5)) +drop table t1, t2; +set optimizer_switch=default; +set optimizer_switch='exists_to_in=on'; +# +# MDEV-404: Wrong result (extra rows) with STRAIGHT_JOIN, +# EXISTS subquery, NOT NULL column +# (same as above) +# +SET optimizer_switch = 'exists_to_in=on,in_to_exists=on'; +CREATE TABLE t1 (a INT, b VARCHAR(1) NOT NULL); +INSERT INTO t1 VALUES (1,'s'),(2,'e'); +SELECT STRAIGHT_JOIN * FROM t1 AS alias1, t1 AS alias2 +WHERE EXISTS ( SELECT 1 FROM t1 WHERE b < alias2.b AND a = alias1.a ); +a b a b +2 e 1 s +drop table t1; +set optimizer_switch=default; +set optimizer_switch='exists_to_in=on'; +# +# MDEV-3800: ORDER BY doesn't work with exists_to_in=ON on +# a query with EXISTS subquery and OR condition +# +SET optimizer_switch = 'in_to_exists=on,exists_to_in=on'; +CREATE TABLE t1 (a INT, b VARCHAR(1)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (4,'j'),(6,'v'),(3,'c'); +CREATE TABLE t2 (c VARCHAR(1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('b'),('y'); +SELECT a FROM t1 +WHERE EXISTS ( +SELECT 1 FROM t2 WHERE c = b +) OR b NOT IN ('U') +ORDER BY a; +a +3 +4 +6 +select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`b` in (select `test`.`t2`.`c` from `test`.`t2` where 1 ) or (`test`.`t1`.`b` <> 'U') order by `test`.`t1`.`a`; +a +3 +4 +6 +drop table t1,t2; +set optimizer_switch=default; +set optimizer_switch='exists_to_in=on'; +# +# correct calculation of reserved items (postreview-fix) +# +create table t1 (col1 int, col2 int, col3 int); +insert into t1 values (1,2,3),(2,3,4),(4,5,6); +create table t2 as select * from t1; +explain extended +select * from t1 where exists (select col2 from t2 where t2.col1=t1.col1 and t2.col2=t1.col2); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func,func 1 100.00 +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00 +Warnings: +Note 1276 Field or reference 'test.t1.col1' of SELECT #2 was resolved in SELECT #1 +Note 1276 Field or reference 'test.t1.col2' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`t1`.`col1` AS `col1`,`test`.`t1`.`col2` AS `col2`,`test`.`t1`.`col3` AS `col3` from `test`.`t1` semi join (`test`.`t2`) where 1 +select * from t1 where exists (select col2 from t2 where t2.col1=t1.col1 and t2.col2=t1.col2); +col1 col2 col3 +1 2 3 +2 3 4 +4 5 6 +drop table t1,t2; +# +# MDEV-3879: Exists2In: Wrong result (extra row) and unexpected +# warning with exists_to_in=on and a NOT EXISTS subquery +# +SET optimizer_switch = 'exists_to_in=on'; +CREATE TABLE t1 (a1 INT, b1 CHAR(1)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (3,'y'),(6,'w'); +CREATE TABLE t2 (a2 INT, b2 CHAR(1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (3,'y'),(6,'d'); +SELECT * FROM t1 +WHERE NOT EXISTS ( SELECT * FROM t2 WHERE b2 = b1 AND a2 = a1 ); +a1 b1 +6 w +drop table t1, t2; +# +# MDEV-3880: Wrong result (missing rows) with exists_to_in=on, +# LEFT JOIN and NOT EXISTS subquery. +# (Duplicate of above MDEV-3879). +# +SET optimizer_switch = 'exists_to_in=on'; +CREATE TABLE t1 (a1 INT, b1 CHAR(1)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (4,'b'),(5,'y'); +CREATE TABLE t2 (b2 CHAR(1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('z'),('b'); +CREATE TABLE t3 (a3 INT, b3 CHAR(1)) ENGINE=MyISAM; +INSERT INTO t3 VALUES (4,'j'),(6,'v'); +SELECT * FROM t1 LEFT JOIN t2 ON ( b2 = b1 ) +WHERE NOT EXISTS ( SELECT * FROM t3 WHERE b3 = b2 AND a3 = a1 ) ; +a1 b1 b2 +4 b b +5 y NULL +drop table t1, t2, t3; +# +# MDEV-3881: Endless loop and crash in Item_ref::real_item with +# exists_to_in=on, NOT EXISTS subquery, merge view or from subquery, +# constant table +# +SET optimizer_switch = 'exists_to_in=on'; +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(7); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (8); +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t2; +CREATE TABLE t3 (c INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES (4),(6); +SELECT * FROM t1, v1 WHERE NOT EXISTS ( SELECT * FROM t3 WHERE c = b ) AND a = b; +a b +drop view v1; +drop table t1, t2, t3; +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(7); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (8); +CREATE TABLE t3 (c INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES (4),(6); +SELECT * FROM t1, ( SELECT * FROM t2 ) alias WHERE NOT EXISTS ( SELECT * FROM t3 WHERE c = b ) AND a = b; +a b +drop table t1, t2, t3; +# +# MDEV-3906: Server crashes in Dependency_marker::visit_field +# on 2nd execution of PS with exists_to_in and NOT EXISTS subquery +# +SET optimizer_switch='exists_to_in=on'; +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(7); +PREPARE stmt FROM ' +SELECT * FROM t1 AS alias +WHERE NOT EXISTS ( SELECT * FROM t1 WHERE t1.a = alias.a ) +'; +EXECUTE stmt; +a +EXECUTE stmt; +a +drop table t1; +# +# MDEV-3904: Assertion `in_subs->has_strategy()' failed in +# JOIN::choose_subquery_plan on 2nd execution of PS with +# exists_to_in+semijoin, EXISTS subquery, MERGE view or FROM subquery +# +SET optimizer_switch='in_to_exists=on,semijoin=on,exists_to_in=on'; +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (4),(6); +CREATE ALGORITHM=MERGE VIEW v AS +SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM t2 WHERE b = a ); +PREPARE stmt FROM ' SELECT * FROM v '; +EXECUTE stmt; +a +EXECUTE stmt; +a +drop view v; +drop table t1,t2; +set optimizer_switch=default; +set optimizer_switch='exists_to_in=on'; +# +# MDEV-3903: Server crashes in Item_cond::fix_fields on 2nd execution +# of a prepared stmt with exists_to_in+materialization+semijoin, +# EXISTS subquery, STRAIGHT_JOIN +# +SET optimizer_switch='materialization=on,semijoin=on,exists_to_in=on'; +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (3),(4); +PREPARE stmt FROM +'SELECT STRAIGHT_JOIN * FROM t1 +WHERE EXISTS ( SELECT * FROM t2 WHERE b = a )'; +EXECUTE stmt; +a +EXECUTE stmt; +a +drop table t1,t2; +set optimizer_switch=default; +set optimizer_switch='exists_to_in=on'; +# +# MDEV-4152: Wrong result (missing rows) with exists_to_in=on, +# inner joins +# +SET optimizer_switch='materialization=on,semijoin=on,exists_to_in=on'; +CREATE TABLE t1 (i INT, c1 CHAR(5), c2 CHAR(5), t1_field VARCHAR(1)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,'test1','test2','f'), (2,'test3','test4','d'); +CREATE TABLE t2 (t2_field VARCHAR(1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('m'), ('b'); +CREATE TABLE t3 (t3_field VARCHAR(1)) ENGINE=MyISAM; +INSERT INTO t3 VALUES ('b'),('c'); +SELECT * FROM t1, t2 outer_t2 +WHERE EXISTS ( SELECT 1 FROM t2, t3 WHERE t3_field = outer_t2.t2_field AND t2_field <= t1_field ); +i c1 c2 t1_field t2_field +1 test1 test2 f b +2 test3 test4 d b +drop table t1,t2,t3; +set optimizer_switch=default; +set optimizer_switch='exists_to_in=on'; +# +#MDEV-5401: Wrong result (missing row) on a 2nd execution of PS with +#exists_to_in=on, MERGE view or a SELECT SQ +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (2),(3); +SELECT * FROM v1 WHERE EXISTS ( SELECT * FROM t2 t2x, t2 t2y WHERE t2y.b = a ); +a +2 +PREPARE stmt FROM "SELECT * FROM v1 WHERE EXISTS ( SELECT * FROM t2 t2x, t2 t2y WHERE t2y.b = a )"; +EXECUTE stmt; +a +2 +EXECUTE stmt; +a +2 +deallocate prepare stmt; +drop view v1; +drop table t1,t2; +# +#MDEV-10053: EXIST to IN transformation turned down +# +CREATE TABLE t1 ( +pk INT, f1 INT NOT NULL, f2 VARCHAR(3), f3 INT NULL, PRIMARY KEY(pk)) +ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,1,'foo',8), (2,5,'bar',7); +set @optimizer_switch_save=@@optimizer_switch; +set optimizer_switch='exists_to_in=off'; +explain extended SELECT STRAIGHT_JOIN sq1.f2 +FROM ( SELECT * FROM t1 ) AS sq1 +WHERE EXISTS ( SELECT * FROM t1 AS sq2 +WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 ); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where +3 DEPENDENT SUBQUERY <subquery4> eq_ref distinct_key distinct_key 4 func 1 100.00 +3 DEPENDENT SUBQUERY sq2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join) +4 MATERIALIZED t1 ALL NULL NULL NULL NULL 2 100.00 +Warnings: +Note 1276 Field or reference 'sq1.pk' of SELECT #3 was resolved in SELECT #1 +Note 1276 Field or reference 'sq1.f1' of SELECT #3 was resolved in SELECT #1 +Note 1003 select straight_join `test`.`t1`.`f2` AS `f2` from `test`.`t1` where <expr_cache><`test`.`t1`.`f1`,`test`.`t1`.`pk`>(exists(select 1 from `test`.`t1` `sq2` semi join (`test`.`t1`) where ((`test`.`sq2`.`f1` = `test`.`t1`.`f1`) and (`test`.`t1`.`pk` = `test`.`t1`.`f1`)))) +SELECT STRAIGHT_JOIN sq1.f2 +FROM ( SELECT * FROM t1 ) AS sq1 +WHERE EXISTS ( SELECT * FROM t1 AS sq2 +WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 ); +f2 +foo +set optimizer_switch='exists_to_in=on'; +explain extended SELECT STRAIGHT_JOIN sq1.f2 +FROM ( SELECT * FROM t1 ) AS sq1 +WHERE EXISTS ( SELECT * FROM t1 AS sq2 +WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 ); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where +3 DEPENDENT SUBQUERY <subquery4> eq_ref distinct_key distinct_key 4 func 1 100.00 +3 DEPENDENT SUBQUERY sq2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join) +4 MATERIALIZED t1 ALL NULL NULL NULL NULL 2 100.00 +Warnings: +Note 1276 Field or reference 'sq1.pk' of SELECT #3 was resolved in SELECT #1 +Note 1276 Field or reference 'sq1.f1' of SELECT #3 was resolved in SELECT #1 +Note 1003 select straight_join `test`.`t1`.`f2` AS `f2` from `test`.`t1` where <expr_cache><`test`.`t1`.`f1`,`test`.`t1`.`pk`>(<in_optimizer>(`test`.`t1`.`f1`,<exists>(select `test`.`sq2`.`f1` from `test`.`t1` `sq2` semi join (`test`.`t1`) where ((`test`.`t1`.`pk` = `test`.`t1`.`f1`) and (<cache>(`test`.`t1`.`f1`) = `test`.`sq2`.`f1`))))) +SELECT STRAIGHT_JOIN sq1.f2 +FROM ( SELECT * FROM t1 ) AS sq1 +WHERE EXISTS ( SELECT * FROM t1 AS sq2 +WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 ); +f2 +foo +set optimizer_switch= @optimizer_switch_save; +DROP TABLE t1; +# +# MDEV-14164: Unknown column error when adding aggregate to function +# in oracle style procedure FOR loop +# +CREATE TABLE t1(id INT, val INT); +CREATE PROCEDURE p1() +BEGIN +DECLARE cur1 CURSOR FOR SELECT * FROM ( +SELECT DISTINCT id FROM t1) a +WHERE NOT EXISTS (SELECT * FROM ( SELECT id FROM t1) b +WHERE a.id=b.id); +OPEN cur1; +CLOSE cur1; +OPEN cur1; +CLOSE cur1; +END; +// +CALL p1(); +DROP PROCEDURE p1; +DROP TABLE t1; +CREATE TABLE t1(id INT, val INT); +CREATE PROCEDURE p1() +BEGIN +SELECT * FROM (SELECT DISTINCT id FROM t1) a +WHERE NOT a.id IN (SELECT b.id FROM t1 b); +SELECT * FROM (SELECT DISTINCT id FROM t1) a +WHERE NOT EXISTS (SELECT * FROM t1 b WHERE a.id=b.id); +END; +// +CALL p1(); +id +id +CALL p1(); +id +id +DROP PROCEDURE p1; +DROP TABLE t1; +# End of 10.0 tests +set optimizer_switch=default; diff --git a/mysql-test/r/subselect_exists2in_costmat.result b/mysql-test/r/subselect_exists2in_costmat.result new file mode 100644 index 00000000000..a46996d9bad --- /dev/null +++ b/mysql-test/r/subselect_exists2in_costmat.result @@ -0,0 +1,103 @@ +set @subselect_mat_cost=@@optimizer_switch; +set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on'; +set long_query_time=0.1; +drop database if exists world; +set names utf8; +create database world; +use world; +CREATE TABLE Country ( +Code char(3) NOT NULL default '', +Name char(52) NOT NULL default '', +SurfaceArea float(10,2) NOT NULL default '0.00', +Population int(11) NOT NULL default '0', +Capital int(11) default NULL, +PRIMARY KEY (Code), +UNIQUE INDEX (Name) +); +CREATE TABLE City ( +ID int(11) NOT NULL auto_increment, +Name char(35) NOT NULL default '', +Country char(3) NOT NULL default '', +Population int(11) NOT NULL default '0', +PRIMARY KEY (ID), +INDEX (Population), +INDEX (Country) +); +CREATE TABLE CountryLanguage ( +Country char(3) NOT NULL default '', +Language char(30) NOT NULL default '', +Percentage float(3,1) NOT NULL default '0.0', +PRIMARY KEY (Country, Language), +INDEX (Percentage) +); +Make the schema and data more diverse by adding more indexes, nullable +columns, and NULL data. +create index SurfaceArea on Country(SurfaceArea); +create index Language on CountryLanguage(Language); +create index CityName on City(Name); +alter table City change population population int(11) null default 0; +select max(id) from City into @max_city_id; +insert into City values (@max_city_id + 1,'Kilifarevo','BGR',NULL); +SELECT COUNT(*) FROM Country; +COUNT(*) +239 +SELECT COUNT(*) FROM City; +COUNT(*) +4080 +SELECT COUNT(*) FROM CountryLanguage; +COUNT(*) +984 +set @@optimizer_switch = 'exists_to_in=on,in_to_exists=on,semijoin=on,materialization=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on'; + +1. Subquery in a disjunctive WHERE clause of the outer query. + + +Q1.1m: +MATERIALIZATION: there are too many rows in the outer query +to be looked up in the inner table. +EXPLAIN +SELECT Name FROM Country +WHERE (EXISTS (select 1 from City where City.Population > 100000 and +Code = Country) OR +Name LIKE 'L%') AND +surfacearea > 1000000; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY Country ALL Name,SurfaceArea NULL NULL NULL 239 Using where +2 MATERIALIZED City ALL Population,Country NULL NULL NULL 4080 Using where +SELECT Name FROM Country +WHERE (EXISTS (select 1 from City where City.Population > 100000 and +Code = Country) OR +Name LIKE 'L%') AND +surfacearea > 1000000; +Name +Algeria +Angola +Argentina +Australia +Bolivia +Brazil +Egypt +South Africa +Ethiopia +Indonesia +India +Iran +Canada +Kazakstan +China +Colombia +Congo, The Democratic Republic of the +Libyan Arab Jamahiriya +Mali +Mauritania +Mexico +Mongolia +Niger +Peru +Saudi Arabia +Sudan +Chad +Russian Federation +United States +drop database world; +set optimizer_switch=@subselect_mat_cost; diff --git a/mysql-test/r/subselect_extra.result b/mysql-test/r/subselect_extra.result index ee62a7295cc..48b80e02e1a 100644 --- a/mysql-test/r/subselect_extra.result +++ b/mysql-test/r/subselect_extra.result @@ -227,7 +227,7 @@ where t2.c in (select c from t3 where t3.c > t1.b) and t2.c > 'b1' ) group by a1,a2,b; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by +1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index 2 DEPENDENT SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index 2 DEPENDENT SUBQUERY t3 index NULL idx_t3_1 10 NULL 192 Using where; Using index; FirstMatch(t2); Using join buffer (flat, BNL join) select a1,a2,b,c,min(c), max(c) from t1 @@ -236,22 +236,22 @@ where t2.c in (select c from t3 where t3.c > t1.b) and t2.c > 'b1' ) group by a1,a2,b; a1 a2 b c min(c) max(c) -a a a d111 a111 d111 -a a b h112 e112 h112 -a b a l121 i121 l121 -a b b p122 m122 p122 -b a a d211 a211 d211 -b a b h212 e212 h212 -b b a l221 i221 l221 -b b b p222 m222 p222 -c a a d311 a311 d311 -c a b h312 e312 h312 -c b a l321 i321 l321 -c b b p322 m322 p322 -d a a d411 a411 d411 -d a b h412 e412 h412 -d b a l421 i421 l421 -d b b p422 m422 p422 +a a a a111 a111 d111 +a a b e112 e112 h112 +a b a i121 i121 l121 +a b b m122 m122 p122 +b a a a211 a211 d211 +b a b e212 e212 h212 +b b a i221 i221 l221 +b b b m222 m222 p222 +c a a a311 a311 d311 +c a b e312 e312 h312 +c b a i321 i321 l321 +c b b m322 m322 p322 +d a a a411 a411 d411 +d a b e412 e412 h412 +d b a i421 i421 l421 +d b b m422 m422 p422 explain select a1,a2,b,c,min(c), max(c) from t1 where exists ( select * from t2 where t2.c in (select c from t3 where t3.c > t1.c) and diff --git a/mysql-test/r/subselect_extra_no_semijoin.result b/mysql-test/r/subselect_extra_no_semijoin.result index b8f1ba7cc5e..79bca388181 100644 --- a/mysql-test/r/subselect_extra_no_semijoin.result +++ b/mysql-test/r/subselect_extra_no_semijoin.result @@ -231,7 +231,7 @@ where t2.c in (select c from t3 where t3.c > t1.b) and t2.c > 'b1' ) group by a1,a2,b; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by +1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index 2 DEPENDENT SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index 3 DEPENDENT SUBQUERY t3 index NULL idx_t3_1 10 NULL 192 Using where; Using index select a1,a2,b,c,min(c), max(c) from t1 @@ -240,22 +240,22 @@ where t2.c in (select c from t3 where t3.c > t1.b) and t2.c > 'b1' ) group by a1,a2,b; a1 a2 b c min(c) max(c) -a a a d111 a111 d111 -a a b h112 e112 h112 -a b a l121 i121 l121 -a b b p122 m122 p122 -b a a d211 a211 d211 -b a b h212 e212 h212 -b b a l221 i221 l221 -b b b p222 m222 p222 -c a a d311 a311 d311 -c a b h312 e312 h312 -c b a l321 i321 l321 -c b b p322 m322 p322 -d a a d411 a411 d411 -d a b h412 e412 h412 -d b a l421 i421 l421 -d b b p422 m422 p422 +a a a a111 a111 d111 +a a b e112 e112 h112 +a b a i121 i121 l121 +a b b m122 m122 p122 +b a a a211 a211 d211 +b a b e212 e212 h212 +b b a i221 i221 l221 +b b b m222 m222 p222 +c a a a311 a311 d311 +c a b e312 e312 h312 +c b a i321 i321 l321 +c b b m322 m322 p322 +d a a a411 a411 d411 +d a b e412 e412 h412 +d b a i421 i421 l421 +d b b m422 m422 p422 explain select a1,a2,b,c,min(c), max(c) from t1 where exists ( select * from t2 where t2.c in (select c from t3 where t3.c > t1.c) and diff --git a/mysql-test/r/subselect_innodb.result b/mysql-test/r/subselect_innodb.result index f92615f22cf..15f1d6377e3 100644 --- a/mysql-test/r/subselect_innodb.result +++ b/mysql-test/r/subselect_innodb.result @@ -248,6 +248,47 @@ NULL drop procedure p1; drop tables t1,t2,t3; # +# Bug #58756 +# Crash in heap_rrnd on query with HAVING ... IN (subquery) + LIMIT +# +CREATE TABLE t1 ( +col_time_key time DEFAULT NULL, +col_datetime_key datetime DEFAULT NULL, +col_varchar_nokey varchar(1) DEFAULT NULL, +KEY col_time_key (col_time_key), +KEY col_datetime_key (col_datetime_key) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +INSERT INTO t1 VALUES ('17:53:30','2005-11-10 12:40:29','h'); +INSERT INTO t1 VALUES ('11:35:49','2009-04-25 00:00:00','b'); +INSERT INTO t1 VALUES (NULL,'2002-11-27 00:00:00','s'); +INSERT INTO t1 VALUES ('06:01:40','2004-01-26 20:32:32','e'); +INSERT INTO t1 VALUES ('05:45:11','2007-10-26 11:41:40','j'); +INSERT INTO t1 VALUES ('00:00:00','2005-10-07 00:00:00','e'); +INSERT INTO t1 VALUES ('00:00:00','2000-07-15 05:00:34','f'); +INSERT INTO t1 VALUES ('06:11:01','2000-04-03 16:33:32','v'); +INSERT INTO t1 VALUES ('13:02:46',NULL,'x'); +INSERT INTO t1 VALUES ('21:44:25','2001-04-25 01:26:12','m'); +INSERT INTO t1 VALUES ('22:43:58','2000-12-27 00:00:00','c'); +CREATE TABLE t2 ( +col_time_key time DEFAULT NULL, +col_datetime_key datetime DEFAULT NULL, +col_varchar_nokey varchar(1) DEFAULT NULL, +KEY col_time_key (col_time_key), +KEY col_datetime_key (col_datetime_key) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +INSERT INTO t2 VALUES ('11:28:45','2004-10-11 18:13:16','w'); +SELECT col_time_key, col_datetime_key +FROM +( SELECT * FROM t1 ) AS table1 +HAVING ( 'r' , 'e' ) IN +( SELECT col_varchar_nokey , col_varchar_nokey FROM t2 ) +ORDER BY col_datetime_key +LIMIT 10; +col_time_key col_datetime_key +DROP TABLE t1; +DROP TABLE t2; +# End of Bug #58756 +# # Bug#60085 crash in Item::save_in_field() with time data type # CREATE TABLE t1(a date, b int, unique(b), unique(a), key(b)) engine=innodb; @@ -272,7 +313,7 @@ EXPLAIN SELECT 1 FROM t1 WHERE NOT EXISTS (SELECT 1 FROM t2 WHERE d = (SELECT d FROM t2 WHERE a >= 1) ORDER BY d); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 1 Using where -2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY,d d 2 func 1 Using where +2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY,d PRIMARY 1 func 1 Using where 3 DEPENDENT SUBQUERY t2 index NULL d 2 NULL 1 Using index DROP TABLE t2; CREATE TABLE t2 (b INT, c INT, UNIQUE KEY (b), UNIQUE KEY (b, c )) ENGINE=INNODB; @@ -396,8 +437,8 @@ drop table t1; # drop table if exists `t1`,`t2`; Warnings: -Note 1051 Unknown table 't1' -Note 1051 Unknown table 't2' +Note 1051 Unknown table 'test.t1' +Note 1051 Unknown table 'test.t2' create table `t1`(`a` char(1) character set utf8)engine=innodb; create table `t2`(`b` char(1) character set utf8)engine=memory; select distinct (select 1 from `t2` where `a`) `d2` from `t1`; @@ -483,3 +524,57 @@ WHERE NULL IN ( SELECT i2 FROM t2 WHERE i1 IN ( i2 IN ( SELECT i3 FROM t3 ) ) AND i2 = 2 ); i1 DROP TABLE t1,t2,t3; +# +# MDEV-6041: ORDER BY+subqueries: subquery_table.key=outer_table.col is not recongized as binding +# +create table t1(a int) engine=innodb; +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2( +id int primary key, +key1 int, +col1 int, +key(key1) +) engine=innodb; +insert into t2 +select +A.a + B.a*10 + C.a*100 + D.a* 1000, +A.a + 10*B.a, +123456 +from t1 A, t1 B, t1 C, t1 D; +# Table tsubq: +# - must use 'ref' (not 'index'), and must not use 'Using filesort' +# - shows a bad estimate for 'rows' (but I'm not sure if one can do better w/o histograms) +explain select +(SELECT +concat(id, '-', key1, '-', col1) +FROM t2 +WHERE t2.key1 = t1.a +ORDER BY t2.id ASC LIMIT 1) +from +t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 10 +2 DEPENDENT SUBQUERY t2 ref key1 key1 5 test.t1.a 1 Using where +# +# MDEV-6081: ORDER BY+ref(const): selectivity is very incorrect (MySQL Bug#14338686) +# +alter table t2 add key2 int; +update t2 set key2=key1; +alter table t2 add key(key2); +analyze table t2; +Table Op Msg_type Msg_text +test.t2 analyze status OK +flush tables; +# Table tsubq must use 'ref' + Using filesort (not 'index' w/o filesort) +explain select +(SELECT +concat(id, '-', key1, '-', col1) +FROM t2 +WHERE t2.key1 = t1.a +ORDER BY t2.key2 ASC LIMIT 1) +from +t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL # +2 DEPENDENT SUBQUERY t2 ref key1 key1 5 test.t1.a # Using where; Using filesort +drop table t1,t2; diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result index d4dc519227b..db51bbb8186 100644 --- a/mysql-test/r/subselect_mat.result +++ b/mysql-test/r/subselect_mat.result @@ -1474,7 +1474,7 @@ EXPLAIN SELECT pk FROM t1 WHERE (a) IN (SELECT a FROM t2 WHERE pk > 0); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 -2 MATERIALIZED t2 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Rowid-ordered scan +2 MATERIALIZED t2 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where; Rowid-ordered scan SELECT pk FROM t1 WHERE (a) IN (SELECT a FROM t2 WHERE pk > 0); pk 2 @@ -2169,14 +2169,16 @@ drop table t1; CREATE TABLE t1 ( pk INT, f1 INT NOT NULL, f2 VARCHAR(3), f3 INT NULL, PRIMARY KEY(pk)) ENGINE=MyISAM; INSERT INTO t1 VALUES (1,1,'foo',8), (2,5,'bar',7); -SELECT sq1.f2 FROM t1 AS sq1 -WHERE EXISTS ( SELECT * FROM t1 AS sq2 +SELECT sq1.f2 FROM t1 AS sq1 +WHERE EXISTS ( SELECT * FROM t1 AS sq2 WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 ); f2 foo +set @save_optimizer_switch= @@optimizer_switch; +set optimizer_switch='exists_to_in=off'; EXPLAIN -SELECT sq1.f2 FROM t1 AS sq1 -WHERE EXISTS ( SELECT * FROM t1 AS sq2 +SELECT sq1.f2 FROM t1 AS sq1 +WHERE EXISTS ( SELECT * FROM t1 AS sq2 WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 ); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY sq1 ALL NULL NULL NULL NULL 2 Using where @@ -2184,10 +2186,9 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DEPENDENT SUBQUERY sq2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) 3 MATERIALIZED t1 ALL NULL NULL NULL NULL 2 # this checks the result set above -set @save_optimizer_switch= @@optimizer_switch; set optimizer_switch= 'materialization=off,semijoin=off'; -SELECT sq1.f2 FROM t1 AS sq1 -WHERE EXISTS ( SELECT * FROM t1 AS sq2 +SELECT sq1.f2 FROM t1 AS sq1 +WHERE EXISTS ( SELECT * FROM t1 AS sq2 WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 ); f2 foo @@ -2202,13 +2203,15 @@ CREATE TABLE t2 (i2 INT, KEY(i2)) ENGINE=MyISAM; INSERT INTO t2 VALUES (8),(7),(1); CREATE TABLE t3 (f3 INT, i3 INT, KEY(i3)) ENGINE=MyISAM; INSERT INTO t3 VALUES (8,0),(6,3),(2,8),(3,8),(1,6),(0,0),(1,0),(1,5); -SELECT * FROM t1 +set @save_optimizer_switch= @@optimizer_switch; +set optimizer_switch='exists_to_in=off'; +SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM t2, t3 WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) ); f1 6 EXPLAIN EXTENDED -SELECT * FROM t1 +SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM t2, t3 WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) ); id select_type table type possible_keys key key_len ref rows filtered Extra @@ -2221,9 +2224,8 @@ Warnings: Note 1276 Field or reference 'test.t1.f1' of SELECT #2 was resolved in SELECT #1 Note 1003 select `test`.`t1`.`f1` AS `f1` from `test`.`t1` where <expr_cache><`test`.`t1`.`f1`>(exists(select 1 from `test`.`t2` semi join (`test`.`t3`) join `test`.`t3` where ((`test`.`t3`.`i3` = `test`.`t2`.`i2`) and (`test`.`t1`.`f1` = `test`.`t3`.`f3`)))) # this checks the result set above -set @save_optimizer_switch= @@optimizer_switch; set optimizer_switch= 'materialization=off,semijoin=off'; -SELECT * FROM t1 +SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM t2, t3 WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) ); f1 @@ -2237,10 +2239,10 @@ CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT); INSERT INTO t1 VALUES (1, 4),(2, 3),(3, 3),(4, 6),(5, 3); CREATE TABLE t2 (f2 INT); INSERT INTO t2 VALUES (1),(2),(3),(4),(5); -# t1.pk is always IN ( SELECT f2 FROM t2 ), -# so the IN condition should be true for every row, +# t1.pk is always IN ( SELECT f2 FROM t2 ), +# so the IN condition should be true for every row, # and thus COUNT(*) should always return 5 -SELECT pk, f1, ( SELECT COUNT(*) FROM t2 +SELECT pk, f1, ( SELECT COUNT(*) FROM t2 WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1; pk f1 sq 1 4 5 @@ -2249,7 +2251,7 @@ pk f1 sq 4 6 5 5 3 5 EXPLAIN EXTENDED -SELECT pk, f1, ( SELECT COUNT(*) FROM t2 +SELECT pk, f1, ( SELECT COUNT(*) FROM t2 WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 @@ -2262,7 +2264,7 @@ Note 1003 select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`f1` AS `f1`,<expr_cache>< # this checks the result set above set @save_optimizer_switch= @@optimizer_switch; set optimizer_switch= 'materialization=off,semijoin=off'; -SELECT pk, f1, ( SELECT COUNT(*) FROM t2 +SELECT pk, f1, ( SELECT COUNT(*) FROM t2 WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1; pk f1 sq 1 4 5 @@ -2361,6 +2363,76 @@ ebb4620037332000158bbfc8bcbe5d89 DROP TABLE t1,t2,t3; set optimizer_switch=@save_optimizer_switch; # End of 5.5 tests +# +# MDEV-7220: Materialization strategy is not used for REPLACE ... SELECT +# +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 (a int, b int, c int); +insert into t1 +select A.a+B.a*10+C.a*100, A.a+B.a*10+C.a*100, A.a+B.a*10+C.a*100 +from t0 A, t0 B, t0 C; +create table t2 (a int, b int, c int); +insert into t2 select A.a, A.a, A.a from t1 A; +insert into t2 select * from t2; +insert into t2 select * from t2; +create table t3 as select * from t2 limit 1; +# The testcase only makes sense if the following uses Materialization: +explain +select * from t1 where (a,b) in (select max(a),b from t2 group by b); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1000 Using where +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.b 1 +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 4000 Using temporary +flush status; +replace into t3 +select * from t1 where (a,b) in (select max(a),b from t2 group by b); +# Sequential reads: +# 1K is read from t1 +# 4K is read from t2 +# 1K groups is read from the tmp. table +# +# Lookups: +# 4K lookups in group by table +# 1K lookups in temp.table +# +# Writes: +# 2x 1K writes to temporary tables (grouping table and subquery materialization table +# +# The point is that neither counter should be in the millions (this +# will happen if Materialization is not used +show status where Variable_name like 'Handler_read%' or Variable_name like 'Handler_%write%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 5000 +Handler_read_last 0 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_retry 0 +Handler_read_rnd 0 +Handler_read_rnd_deleted 0 +Handler_read_rnd_next 6003 +Handler_tmp_write 2000 +Handler_write 1000 +drop table t0,t1,t2,t3; +# +# MDEV-7971: Assertion `name != __null' failed in ACL_internal_schema_registry::lookup +# on 2nd execution os PS with multi-table update +# +CREATE TABLE t1 (f1 INT); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (f2 INT); +INSERT INTO t2 VALUES (3),(4); +CREATE TABLE t3 (f3 INT); +INSERT INTO t3 VALUES (5),(6); +PREPARE stmt FROM ' + UPDATE t1, t2 + SET f1 = 5 + WHERE 8 IN ( SELECT MIN(f3) FROM t3 ) +'; +EXECUTE stmt; +EXECUTE stmt; +DROP TABLE t1,t2,t3; set @subselect_mat_test_optimizer_switch_value=null; set @@optimizer_switch='materialization=on,in_to_exists=off,semijoin=off'; set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on'; @@ -2481,7 +2553,7 @@ EXPLAIN SELECT pk FROM t1 WHERE (a) IN (SELECT a FROM t2 WHERE pk > 0); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 -2 MATERIALIZED t2 range PRIMARY PRIMARY 4 NULL 2 Using index condition +2 MATERIALIZED t2 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where SELECT pk FROM t1 WHERE (a) IN (SELECT a FROM t2 WHERE pk > 0); pk 2 diff --git a/mysql-test/r/subselect_mat_cost.result b/mysql-test/r/subselect_mat_cost.result index 081196a227b..a9f980fff5d 100644 --- a/mysql-test/r/subselect_mat_cost.result +++ b/mysql-test/r/subselect_mat_cost.result @@ -348,7 +348,7 @@ FROM City LEFT JOIN Country ON (Country = Code and City.Population < 10000)) AND Language IN ('English','Spanish'); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY CountryLanguage range Language Language 30 NULL 72 Using index condition; Using where; Rowid-ordered scan -2 DEPENDENT SUBQUERY City ref CityName CityName 35 func 1 Using index condition; Using where +2 DEPENDENT SUBQUERY City ref CityName CityName 35 func 1 Using index condition 2 DEPENDENT SUBQUERY Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using index select count(*) from CountryLanguage @@ -399,10 +399,10 @@ WHERE Code = Country GROUP BY Code) order by Country; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY CountryLanguage index NULL PRIMARY 33 NULL 984 Using where; Using index -3 MATERIALIZED CountryLanguage index PRIMARY PRIMARY 33 NULL 984 Using index; Using temporary -3 MATERIALIZED Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using index -2 MATERIALIZED CountryLanguage index PRIMARY PRIMARY 33 NULL 984 Using index; Using temporary -2 MATERIALIZED Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using index +3 MATERIALIZED Country index PRIMARY PRIMARY 3 NULL 239 Using index +3 MATERIALIZED CountryLanguage ref PRIMARY PRIMARY 3 world.Country.Code 4 Using index +2 MATERIALIZED Country index PRIMARY PRIMARY 3 NULL 239 Using index +2 MATERIALIZED CountryLanguage ref PRIMARY PRIMARY 3 world.Country.Code 4 Using index select count(*) from CountryLanguage where diff --git a/mysql-test/r/subselect_no_exists_to_in.result b/mysql-test/r/subselect_no_exists_to_in.result new file mode 100644 index 00000000000..818fdf6c335 --- /dev/null +++ b/mysql-test/r/subselect_no_exists_to_in.result @@ -0,0 +1,7192 @@ +select @@optimizer_switch like '%exists_to_in=off%'; +@@optimizer_switch like '%exists_to_in=off%' +0 +set optimizer_switch='exists_to_in=off'; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12; +drop view if exists v2; +set @subselect_tmp=@@optimizer_switch; +set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test, +"semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off"); +set join_cache_level=1; +set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on'; +select (select 2); +(select 2) +2 +explain extended select (select 2); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1249 Select 2 was reduced during optimization +Note 1003 select 2 AS `(select 2)` +SELECT (SELECT 1) UNION SELECT (SELECT 2); +(SELECT 1) +1 +2 +explain extended SELECT (SELECT 1) UNION SELECT (SELECT 2); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL NULL +Warnings: +Note 1249 Select 2 was reduced during optimization +Note 1249 Select 4 was reduced during optimization +Note 1003 select 1 AS `(SELECT 1)` union select 2 AS `(SELECT 2)` +SELECT (SELECT (SELECT 0 UNION SELECT 0)); +(SELECT (SELECT 0 UNION SELECT 0)) +0 +explain extended SELECT (SELECT (SELECT 0 UNION SELECT 0)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union3,4> ALL NULL NULL NULL NULL NULL NULL +Warnings: +Note 1249 Select 2 was reduced during optimization +Note 1003 select (select 0 union select 0) AS `(SELECT (SELECT 0 UNION SELECT 0))` +SELECT (SELECT 1 FROM (SELECT 1) as b HAVING a=1) as a; +ERROR 42S22: Reference 'a' not supported (forward reference in item list) +SELECT (SELECT 1 FROM (SELECT 1) as b HAVING b=1) as a,(SELECT 1 FROM (SELECT 1) as c HAVING a=1) as b; +ERROR 42S22: Reference 'b' not supported (forward reference in item list) +SELECT (SELECT 1),MAX(1) FROM (SELECT 1) as a; +(SELECT 1) MAX(1) +1 1 +SELECT (SELECT a) as a; +ERROR 42S22: Reference 'a' not supported (forward reference in item list) +EXPLAIN EXTENDED SELECT 1 FROM (SELECT 1 as a) as b HAVING (SELECT a)=1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived2> system NULL NULL NULL NULL 1 100.00 +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1276 Field or reference 'b.a' of SELECT #3 was resolved in SELECT #1 +Note 1276 Field or reference 'b.a' of SELECT #3 was resolved in SELECT #1 +Note 1003 select 1 AS `1` from dual having ((select 1) = 1) +SELECT 1 FROM (SELECT 1 as a) as b HAVING (SELECT a)=1; +1 +1 +SELECT (SELECT 1), a; +ERROR 42S22: Unknown column 'a' in 'field list' +SELECT 1 as a FROM (SELECT 1) as b HAVING (SELECT a)=1; +a +1 +SELECT 1 FROM (SELECT (SELECT a) b) c; +ERROR 42S22: Unknown column 'a' in 'field list' +SELECT * FROM (SELECT 1 as id) b WHERE id IN (SELECT * FROM (SELECT 1 as id) c ORDER BY id); +id +1 +SELECT * FROM (SELECT 1) a WHERE 1 IN (SELECT 1,1); +ERROR 21000: Operand should contain 1 column(s) +SELECT 1 IN (SELECT 1); +1 IN (SELECT 1) +1 +SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a)); +1 +1 +select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1)); +ERROR HY000: Incorrect usage of PROCEDURE and subquery +SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1 +SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL; +ERROR 42S22: Unknown column 'a' in 'field list' +SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL; +ERROR 42S22: Unknown column 'a' in 'field list' +SELECT (SELECT 1,2,3) = ROW(1,2,3); +(SELECT 1,2,3) = ROW(1,2,3) +1 +SELECT (SELECT 1,2,3) = ROW(1,2,1); +(SELECT 1,2,3) = ROW(1,2,1) +0 +SELECT (SELECT 1,2,3) < ROW(1,2,1); +(SELECT 1,2,3) < ROW(1,2,1) +0 +SELECT (SELECT 1,2,3) > ROW(1,2,1); +(SELECT 1,2,3) > ROW(1,2,1) +1 +SELECT (SELECT 1,2,3) = ROW(1,2,NULL); +(SELECT 1,2,3) = ROW(1,2,NULL) +NULL +SELECT ROW(1,2,3) = (SELECT 1,2,3); +ROW(1,2,3) = (SELECT 1,2,3) +1 +SELECT ROW(1,2,3) = (SELECT 1,2,1); +ROW(1,2,3) = (SELECT 1,2,1) +0 +SELECT ROW(1,2,3) < (SELECT 1,2,1); +ROW(1,2,3) < (SELECT 1,2,1) +0 +SELECT ROW(1,2,3) > (SELECT 1,2,1); +ROW(1,2,3) > (SELECT 1,2,1) +1 +SELECT ROW(1,2,3) = (SELECT 1,2,NULL); +ROW(1,2,3) = (SELECT 1,2,NULL) +NULL +SELECT (SELECT 1.5,2,'a') = ROW(1.5,2,'a'); +(SELECT 1.5,2,'a') = ROW(1.5,2,'a') +1 +SELECT (SELECT 1.5,2,'a') = ROW(1.5,2,'b'); +(SELECT 1.5,2,'a') = ROW(1.5,2,'b') +0 +SELECT (SELECT 1.5,2,'a') = ROW('1.5b',2,'b'); +(SELECT 1.5,2,'a') = ROW('1.5b',2,'b') +0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: '1.5b' +SELECT (SELECT 'b',2,'a') = ROW(1.5,2,'a'); +(SELECT 'b',2,'a') = ROW(1.5,2,'a') +0 +SELECT (SELECT 1.5,2,'a') = ROW(1.5,'2','a'); +(SELECT 1.5,2,'a') = ROW(1.5,'2','a') +1 +SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a'); +(SELECT 1.5,'c','a') = ROW(1.5,2,'a') +0 +SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a); +ERROR 21000: Operand should contain 1 column(s) +SELECT 1 as a,(SELECT a+a) b,(SELECT b); +a b (SELECT b) +1 2 2 +create table t1 (a int); +create table t2 (a int, b int); +create table t3 (a int); +create table t4 (a int not null, b int not null); +insert into t1 values (2); +insert into t2 values (1,7),(2,7); +insert into t4 values (4,8),(3,8),(5,9); +select (select a from t1 where t1.a = a1) as a2, (select b from t2 where t2.b=a2) as a1; +ERROR 42S22: Reference 'a1' not supported (forward reference in item list) +select (select a from t1 where t1.a=t2.a), a from t2; +(select a from t1 where t1.a=t2.a) a +NULL 1 +2 2 +select (select a from t1 where t1.a=t2.b), a from t2; +(select a from t1 where t1.a=t2.b) a +NULL 1 +NULL 2 +select (select a from t1), a, (select 1 union select 2 limit 1) from t2; +(select a from t1) a (select 1 union select 2 limit 1) +2 1 1 +2 2 1 +select (select a from t3), a from t2; +(select a from t3) a +NULL 1 +NULL 2 +select * from t2 where t2.a=(select a from t1); +a b +2 7 +insert into t3 values (6),(7),(3); +select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1); +a b +1 7 +2 7 +(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)) union (select * from t4 order by a limit 2) limit 3; +a b +1 7 +2 7 +3 8 +(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)) union (select * from t4 where t4.b=(select max(t2.a)*4 from t2) order by a); +a b +1 7 +2 7 +4 8 +3 8 +explain extended (select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)) union (select * from t4 where t4.b=(select max(t2.a)*4 from t2) order by a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where +2 SUBQUERY t3 ALL NULL NULL NULL NULL 3 100.00 Using filesort +3 UNION t4 ALL NULL NULL NULL NULL 3 100.00 Using where +4 SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 +NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL NULL +Warnings: +Note 1003 (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where (`test`.`t2`.`b` = (select `test`.`t3`.`a` from `test`.`t3` order by 1 desc limit 1))) union (select `test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t4` where (`test`.`t4`.`b` = (select (max(`test`.`t2`.`a`) * 4) from `test`.`t2`))) +select (select a from t3 where a<t2.a*4 order by 1 desc limit 1), a from t2; +(select a from t3 where a<t2.a*4 order by 1 desc limit 1) a +3 1 +7 2 +select (select t3.a from t3 where a<8 order by 1 desc limit 1), a from +(select * from t2 where a>1) as tt; +(select t3.a from t3 where a<8 order by 1 desc limit 1) a +7 2 +set @tmp_optimizer_switch=@@optimizer_switch; +set optimizer_switch='derived_merge=off,derived_with_keys=off'; +explain extended select (select t3.a from t3 where a<8 order by 1 desc limit 1), a from +(select * from t2 where a>1) as tt; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived3> ALL NULL NULL NULL NULL 2 100.00 +3 DERIVED t2 ALL NULL NULL NULL NULL 2 100.00 Using where +2 SUBQUERY t3 ALL NULL NULL NULL NULL 3 100.00 Using where; Using filesort +Warnings: +Note 1003 select (select `test`.`t3`.`a` from `test`.`t3` where (`test`.`t3`.`a` < 8) order by 1 desc limit 1) AS `(select t3.a from t3 where a<8 order by 1 desc limit 1)`,`tt`.`a` AS `a` from (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where (`test`.`t2`.`a` > 1)) `tt` +set optimizer_switch=@tmp_optimizer_switch; +select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3) order by 1 desc limit 1); +a +2 +select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3 where t3.a > t1.a) order by 1 desc limit 1); +a +2 +select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3 where t3.a < t1.a) order by 1 desc limit 1); +a +select b,(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2) from t4; +b (select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2) +8 7.5000 +8 4.5000 +9 7.5000 +explain extended select b,(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2) from t4; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 ALL NULL NULL NULL NULL 3 100.00 +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 +3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.t4.a' of SELECT #3 was resolved in SELECT #1 +Note 1003 select `test`.`t4`.`b` AS `b`,<expr_cache><`test`.`t4`.`a`>((select avg((`test`.`t2`.`a` + (select min(`test`.`t3`.`a`) from `test`.`t3` where (`test`.`t3`.`a` >= `test`.`t4`.`a`)))) from `test`.`t2`)) AS `(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2)` from `test`.`t4` +select * from t3 where exists (select * from t2 where t2.b=t3.a); +a +7 +select * from t3 where not exists (select * from t2 where t2.b=t3.a); +a +6 +3 +select * from t3 where a in (select b from t2); +a +7 +select * from t3 where a not in (select b from t2); +a +6 +3 +select * from t3 where a = some (select b from t2); +a +7 +select * from t3 where a <> any (select b from t2); +a +6 +3 +select * from t3 where a = all (select b from t2); +a +7 +select * from t3 where a <> all (select b from t2); +a +6 +3 +insert into t2 values (100, 5); +select * from t3 where a < any (select b from t2); +a +6 +3 +select * from t3 where a < all (select b from t2); +a +3 +select * from t3 where a >= any (select b from t2); +a +6 +7 +explain extended select * from t3 where a >= any (select b from t2); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where +2 SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00 +Warnings: +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`)))) +select * from t3 where a >= all (select b from t2); +a +7 +delete from t2 where a=100; +select * from t3 where a in (select a,b from t2); +ERROR 21000: Operand should contain 1 column(s) +select * from t3 where a in (select * from t2); +ERROR 21000: Operand should contain 1 column(s) +insert into t4 values (12,7),(1,7),(10,9),(9,6),(7,6),(3,9),(1,10); +select b,max(a) as ma from t4 group by b having b < (select max(t2.a) from t2 where t2.b=t4.b); +b ma +insert into t2 values (2,10); +select b,max(a) as ma from t4 group by b having ma < (select max(t2.a) from t2 where t2.b=t4.b); +b ma +10 1 +delete from t2 where a=2 and b=10; +select b,max(a) as ma from t4 group by b having b >= (select max(t2.a) from t2 where t2.b=t4.b); +b ma +7 12 +create table t5 (a int); +select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2; +(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a) a +NULL 1 +2 2 +insert into t5 values (5); +select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2; +(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a) a +NULL 1 +2 2 +insert into t5 values (2); +select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2; +(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a) a +NULL 1 +2 2 +explain extended select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 +2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 1 100.00 +3 DEPENDENT UNION t5 ALL NULL NULL NULL NULL 2 100.00 Using where +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL +Warnings: +Note 1276 Field or reference 'test.t2.a' of SELECT #2 was resolved in SELECT #1 +Note 1276 Field or reference 'test.t2.a' of SELECT #3 was resolved in SELECT #1 +Note 1003 select <expr_cache><`test`.`t2`.`a`>((select 2 from dual where (2 = `test`.`t2`.`a`) union select `test`.`t5`.`a` from `test`.`t5` where (`test`.`t5`.`a` = `test`.`t2`.`a`))) AS `(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a)`,`test`.`t2`.`a` AS `a` from `test`.`t2` +select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2; +ERROR 21000: Subquery returns more than 1 row +create table t6 (patient_uq int, clinic_uq int, index i1 (clinic_uq)); +create table t7( uq int primary key, name char(25)); +insert into t7 values(1,"Oblastnaia bolnitsa"),(2,"Bolnitsa Krasnogo Kresta"); +insert into t6 values (1,1),(1,2),(2,2),(1,3); +select * from t6 where exists (select * from t7 where uq = clinic_uq); +patient_uq clinic_uq +1 1 +1 2 +2 2 +explain extended select * from t6 where exists (select * from t7 where uq = clinic_uq); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 ALL NULL NULL NULL NULL 4 100.00 Using where +2 DEPENDENT SUBQUERY t7 eq_ref PRIMARY PRIMARY 4 test.t6.clinic_uq 1 100.00 Using index +Warnings: +Note 1276 Field or reference 'test.t6.clinic_uq' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t6` where <expr_cache><`test`.`t6`.`clinic_uq`>(exists(select 1 from `test`.`t7` where (`test`.`t7`.`uq` = `test`.`t6`.`clinic_uq`))) +select * from t1 where a= (select a from t2,t4 where t2.b=t4.b); +ERROR 23000: Column 'a' in field list is ambiguous +drop table t1,t2,t3; +CREATE TABLE t3 (a varchar(20),b char(1) NOT NULL default '0'); +INSERT INTO t3 VALUES ('W','a'),('A','c'),('J','b'); +CREATE TABLE t2 (a varchar(20),b int NOT NULL default '0'); +INSERT INTO t2 VALUES ('W','1'),('A','3'),('J','2'); +CREATE TABLE t1 (a varchar(20),b date NOT NULL default '0000-00-00'); +INSERT INTO t1 VALUES ('W','1732-02-22'),('A','1735-10-30'),('J','1743-04-13'); +SELECT * FROM t1 WHERE b = (SELECT MIN(b) FROM t1); +a b +W 1732-02-22 +SELECT * FROM t2 WHERE b = (SELECT MIN(b) FROM t2); +a b +W 1 +SELECT * FROM t3 WHERE b = (SELECT MIN(b) FROM t3); +a b +W a +CREATE TABLE `t8` ( +`pseudo` varchar(35) character set latin1 NOT NULL default '', +`email` varchar(60) character set latin1 NOT NULL default '', +PRIMARY KEY (`pseudo`), +UNIQUE KEY `email` (`email`) +) ENGINE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC; +INSERT INTO t8 (pseudo,email) VALUES ('joce','test'); +INSERT INTO t8 (pseudo,email) VALUES ('joce1','test1'); +INSERT INTO t8 (pseudo,email) VALUES ('2joce1','2test1'); +EXPLAIN EXTENDED SELECT pseudo,(SELECT email FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce')) FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce'); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 const PRIMARY PRIMARY 37 const 1 100.00 Using index +4 SUBQUERY t8 const PRIMARY PRIMARY 37 const 1 100.00 Using index +2 SUBQUERY t8 const PRIMARY PRIMARY 37 const 1 100.00 +3 SUBQUERY t8 const PRIMARY PRIMARY 37 const 1 100.00 Using index +Warnings: +Note 1003 select 'joce' AS `pseudo`,(select 'test' from `test`.`t8` where 1) AS `(SELECT email FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce'))` from `test`.`t8` where 1 +SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo,email FROM +t8 WHERE pseudo='joce'); +ERROR 21000: Operand should contain 1 column(s) +SELECT pseudo FROM t8 WHERE pseudo=(SELECT * FROM t8 WHERE +pseudo='joce'); +ERROR 21000: Operand should contain 1 column(s) +SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce'); +pseudo +joce +SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo LIKE '%joce%'); +ERROR 21000: Subquery returns more than 1 row +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8; +CREATE TABLE `t1` ( +`topic` mediumint(8) unsigned NOT NULL default '0', +`date` date NOT NULL default '0000-00-00', +`pseudo` varchar(35) character set latin1 NOT NULL default '', +PRIMARY KEY (`pseudo`,`date`,`topic`), +KEY `topic` (`topic`) +) ENGINE=MyISAM ROW_FORMAT=DYNAMIC; +INSERT INTO t1 (topic,date,pseudo) VALUES +('43506','2002-10-02','joce'),('40143','2002-08-03','joce'); +EXPLAIN EXTENDED SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index NULL PRIMARY 43 NULL 2 100.00 Using where; Using index +Warnings: +Note 1003 select distinct `test`.`t1`.`date` AS `date` from `test`.`t1` where (`test`.`t1`.`date` = '2002-08-03') +EXPLAIN EXTENDED SELECT (SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 SUBQUERY t1 index NULL PRIMARY 43 NULL 2 100.00 Using where; Using index +Warnings: +Note 1003 select (select distinct `test`.`t1`.`date` from `test`.`t1` where (`test`.`t1`.`date` = '2002-08-03')) AS `(SELECT DISTINCT date FROM t1 WHERE date='2002-08-03')` +SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'; +date +2002-08-03 +SELECT (SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'); +(SELECT DISTINCT date FROM t1 WHERE date='2002-08-03') +2002-08-03 +SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION SELECT 1) UNION ALL SELECT 1; +1 +1 +1 +1 +SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION ALL SELECT 1) UNION SELECT 1; +ERROR 21000: Subquery returns more than 1 row +EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION SELECT 1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 index NULL topic 3 NULL 2 100.00 Using index +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL +Warnings: +Note 1003 select 1 AS `1` from `test`.`t1` where 1 +drop table t1; +CREATE TABLE `t1` ( +`numeropost` mediumint(8) unsigned NOT NULL auto_increment, +`maxnumrep` int(10) unsigned NOT NULL default '0', +PRIMARY KEY (`numeropost`), +UNIQUE KEY `maxnumrep` (`maxnumrep`) +) ENGINE=MyISAM ROW_FORMAT=FIXED; +INSERT INTO t1 (numeropost,maxnumrep) VALUES (40143,1),(43506,2); +CREATE TABLE `t2` ( +`mot` varchar(30) NOT NULL default '', +`topic` mediumint(8) unsigned NOT NULL default '0', +`date` date NOT NULL default '0000-00-00', +`pseudo` varchar(35) NOT NULL default '', +PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`) +) ENGINE=MyISAM ROW_FORMAT=DYNAMIC; +INSERT INTO t2 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce'); +select numeropost as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1); +a +40143 +SELECT numeropost,maxnumrep FROM t1 WHERE exists (SELECT 1 FROM t2 WHERE (mot='joce') AND date >= '2002-10-21' AND t1.numeropost = t2.topic) ORDER BY maxnumrep DESC LIMIT 0, 20; +numeropost maxnumrep +43506 2 +40143 1 +SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1 HAVING a=1) b; +ERROR 42S22: Unknown column 'a' in 'having clause' +SELECT 1 IN (SELECT 1 FROM t2 HAVING a); +ERROR 42S22: Unknown column 'a' in 'having clause' +SELECT * from t2 where topic IN (SELECT topic FROM t2 GROUP BY topic); +mot topic date pseudo +joce 40143 2002-10-22 joce +joce 43506 2002-10-22 joce +SELECT * from t2 where topic IN (SELECT topic FROM t2 GROUP BY topic HAVING topic < 4100); +mot topic date pseudo +SELECT * from t2 where topic IN (SELECT SUM(topic) FROM t1); +mot topic date pseudo +SELECT * from t2 where topic = any (SELECT topic FROM t2 GROUP BY topic); +mot topic date pseudo +joce 40143 2002-10-22 joce +joce 43506 2002-10-22 joce +SELECT * from t2 where topic = any (SELECT topic FROM t2 GROUP BY topic HAVING topic < 4100); +mot topic date pseudo +SELECT * from t2 where topic = any (SELECT SUM(topic) FROM t1); +mot topic date pseudo +SELECT * from t2 where topic = all (SELECT topic FROM t2 GROUP BY topic); +mot topic date pseudo +SELECT * from t2 where topic = all (SELECT topic FROM t2 GROUP BY topic HAVING topic < 4100); +mot topic date pseudo +joce 40143 2002-10-22 joce +joce 43506 2002-10-22 joce +SELECT *, topic = all (SELECT topic FROM t2 GROUP BY topic HAVING topic < 4100) from t2; +mot topic date pseudo topic = all (SELECT topic FROM t2 GROUP BY topic HAVING topic < 4100) +joce 40143 2002-10-22 joce 1 +joce 43506 2002-10-22 joce 1 +SELECT * from t2 where topic = all (SELECT SUM(topic) FROM t2); +mot topic date pseudo +SELECT * from t2 where topic <> any (SELECT SUM(topic) FROM t2); +mot topic date pseudo +joce 40143 2002-10-22 joce +joce 43506 2002-10-22 joce +SELECT * from t2 where topic IN (SELECT topic FROM t2 GROUP BY topic HAVING topic < 41000); +mot topic date pseudo +joce 40143 2002-10-22 joce +SELECT * from t2 where topic = any (SELECT topic FROM t2 GROUP BY topic HAVING topic < 41000); +mot topic date pseudo +joce 40143 2002-10-22 joce +SELECT * from t2 where topic = all (SELECT topic FROM t2 GROUP BY topic HAVING topic < 41000); +mot topic date pseudo +joce 40143 2002-10-22 joce +SELECT *, topic = all (SELECT topic FROM t2 GROUP BY topic HAVING topic < 41000) from t2; +mot topic date pseudo topic = all (SELECT topic FROM t2 GROUP BY topic HAVING topic < 41000) +joce 40143 2002-10-22 joce 1 +joce 43506 2002-10-22 joce 0 +drop table t1,t2; +CREATE TABLE `t1` ( +`numeropost` mediumint(8) unsigned NOT NULL auto_increment, +`maxnumrep` int(10) unsigned NOT NULL default '0', +PRIMARY KEY (`numeropost`), +UNIQUE KEY `maxnumrep` (`maxnumrep`) +) ENGINE=MyISAM ROW_FORMAT=FIXED; +INSERT INTO t1 (numeropost,maxnumrep) VALUES (1,0),(2,1); +select numeropost as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1); +ERROR 21000: Subquery returns more than 1 row +select numeropost as a FROM t1 ORDER BY (SELECT 1 FROM t1 HAVING a=1); +ERROR 21000: Subquery returns more than 1 row +show warnings; +Level Code Message +Error 1242 Subquery returns more than 1 row +Error 1028 Sort aborted: Subquery returns more than 1 row +drop table t1; +create table t1 (a int); +insert into t1 values (1),(2),(3); +(select * from t1) union (select * from t1) order by (select a from t1 limit 1); +a +1 +2 +3 +drop table t1; +CREATE TABLE t1 (field char(1) NOT NULL DEFAULT 'b'); +INSERT INTO t1 VALUES (); +SELECT field FROM t1 WHERE 1=(SELECT 1 UNION ALL SELECT 1 FROM (SELECT 1) a HAVING field='b'); +ERROR 21000: Subquery returns more than 1 row +drop table t1; +CREATE TABLE `t1` ( +`numeropost` mediumint(8) unsigned NOT NULL default '0', +`numreponse` int(10) unsigned NOT NULL auto_increment, +`pseudo` varchar(35) NOT NULL default '', +PRIMARY KEY (`numeropost`,`numreponse`), +UNIQUE KEY `numreponse` (`numreponse`), +KEY `pseudo` (`pseudo`,`numeropost`) +) ENGINE=MyISAM; +SELECT (SELECT numeropost FROM t1 HAVING numreponse=a),numreponse FROM (SELECT * FROM t1) as a; +ERROR 42S22: Reference 'numreponse' not supported (forward reference in item list) +SELECT numreponse, (SELECT numeropost FROM t1 HAVING numreponse=a) FROM (SELECT * FROM t1) as a; +ERROR 42S22: Unknown column 'a' in 'having clause' +SELECT numreponse, (SELECT numeropost FROM t1 HAVING numreponse=1) FROM (SELECT * FROM t1) as a; +numreponse (SELECT numeropost FROM t1 HAVING numreponse=1) +INSERT INTO t1 (numeropost,numreponse,pseudo) VALUES (1,1,'joce'),(1,2,'joce'),(1,3,'test'); +EXPLAIN EXTENDED SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM t1 WHERE numeropost='1'); +ERROR 21000: Subquery returns more than 1 row +SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM t1 WHERE numeropost='1'); +ERROR 21000: Subquery returns more than 1 row +EXPLAIN EXTENDED SELECT MAX(numreponse) FROM t1 WHERE numeropost='1'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +Warnings: +Note 1003 select max(`test`.`t1`.`numreponse`) AS `MAX(numreponse)` from `test`.`t1` where (`test`.`t1`.`numeropost` = '1') +EXPLAIN EXTENDED SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT MAX(numreponse) FROM t1 WHERE numeropost='1'); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +Warnings: +Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1 +drop table t1; +CREATE TABLE t1 (a int(1)); +INSERT INTO t1 VALUES (1); +SELECT 1 FROM (SELECT a FROM t1) b HAVING (SELECT b.a)=1; +1 +1 +drop table t1; +create table t1 (a int NOT NULL, b int, primary key (a)); +create table t2 (a int NOT NULL, b int, primary key (a)); +insert into t1 values (0, 10),(1, 11),(2, 12); +insert into t2 values (1, 21),(2, 22),(3, 23); +select * from t1; +a b +0 10 +1 11 +2 12 +update t1 set b= (select b from t1); +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data +update t1 set b= (select b from t2); +ERROR 21000: Subquery returns more than 1 row +update t1 set b= (select b from t2 where t1.a = t2.a); +select * from t1; +a b +0 NULL +1 21 +2 22 +drop table t1, t2; +create table t1 (a int NOT NULL, b int, primary key (a)); +create table t2 (a int NOT NULL, b int, primary key (a)); +insert into t1 values (0, 10),(1, 11),(2, 12); +insert into t2 values (1, 21),(2, 12),(3, 23); +select * from t1; +a b +0 10 +1 11 +2 12 +select * from t1 where b = (select b from t2 where t1.a = t2.a); +a b +2 12 +delete from t1 where b in (select b from t1); +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data +delete from t1 where b = (select b from t2); +ERROR 21000: Subquery returns more than 1 row +delete from t1 where b = (select b from t2 where t1.a = t2.a); +select * from t1; +a b +0 10 +1 11 +drop table t1, t2; +create table t11 (a int NOT NULL, b int, primary key (a)); +create table t12 (a int NOT NULL, b int, primary key (a)); +create table t2 (a int NOT NULL, b int, primary key (a)); +insert into t11 values (0, 10),(1, 11),(2, 12); +insert into t12 values (33, 10),(22, 11),(2, 12); +insert into t2 values (1, 21),(2, 12),(3, 23); +select * from t11; +a b +0 10 +1 11 +2 12 +select * from t12; +a b +33 10 +22 11 +2 12 +delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t12 where t11.a = t12.a); +ERROR HY000: Table 't12' is specified twice, both as a target for 'DELETE' and as a separate source for data +delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2); +ERROR 21000: Subquery returns more than 1 row +delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2 where t11.a = t2.a); +select * from t11; +a b +0 10 +1 11 +select * from t12; +a b +33 10 +22 11 +drop table t11, t12, t2; +CREATE TABLE t1 (x int) ENGINE=MyISAM; +create table t2 (a int) ENGINE=MyISAM; +create table t3 (b int); +insert into t2 values (1); +insert into t3 values (1),(2); +INSERT INTO t1 (x) VALUES ((SELECT x FROM t1)); +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data +INSERT INTO t1 (x) VALUES ((SELECT b FROM t3)); +ERROR 21000: Subquery returns more than 1 row +INSERT INTO t1 (x) VALUES ((SELECT a FROM t2)); +select * from t1; +x +1 +insert into t2 values (1); +INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2)); +select * from t1; +x +1 +2 +INSERT INTO t1 (x) select (SELECT SUM(a)+1 FROM t2) FROM t2; +select * from t1; +x +1 +2 +3 +3 +INSERT INTO t1 (x) select (SELECT SUM(x)+2 FROM t1) FROM t2; +select * from t1; +x +1 +2 +3 +3 +11 +11 +INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t2)); +ERROR 42S22: Unknown column 'x' in 'field list' +INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2)); +select * from t1; +x +1 +2 +3 +3 +11 +11 +2 +drop table t1, t2, t3; +CREATE TABLE t1 (x int not null, y int, primary key (x)) ENGINE=MyISAM; +create table t2 (a int); +create table t3 (a int); +insert into t2 values (1); +insert into t3 values (1),(2); +select * from t1; +x y +replace into t1 (x, y) VALUES ((SELECT x FROM t1), (SELECT a+1 FROM t2)); +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data +replace into t1 (x, y) VALUES ((SELECT a FROM t3), (SELECT a+1 FROM t2)); +ERROR 21000: Subquery returns more than 1 row +replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2)); +select * from t1; +x y +1 2 +replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+2 FROM t2)); +select * from t1; +x y +1 3 +replace DELAYED into t1 (x, y) VALUES ((SELECT a+3 FROM t2), (SELECT a FROM t2)); +select * from t1; +x y +1 3 +4 1 +replace DELAYED into t1 (x, y) VALUES ((SELECT a+3 FROM t2), (SELECT a+1 FROM t2)); +select * from t1; +x y +1 3 +4 2 +replace LOW_PRIORITY into t1 (x, y) VALUES ((SELECT a+1 FROM t2), (SELECT a FROM t2)); +select * from t1; +x y +1 3 +4 2 +2 1 +drop table t1, t2, t3; +SELECT * FROM (SELECT 1) b WHERE 1 IN (SELECT *); +ERROR HY000: No tables used +CREATE TABLE t2 (id int(11) default NULL, KEY id (id)) ENGINE=MyISAM CHARSET=latin1; +INSERT INTO t2 VALUES (1),(2); +SELECT * FROM t2 WHERE id IN (SELECT 1); +id +1 +EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ref id id 5 const 1 100.00 Using index +Warnings: +Note 1249 Select 2 was reduced during optimization +Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = 1) +SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3); +id +1 +SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1)); +id +2 +EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ref id id 5 const 1 100.00 Using where; Using index +Warnings: +Note 1249 Select 3 was reduced during optimization +Note 1249 Select 2 was reduced during optimization +Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = <cache>((1 + 1))) +EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 index NULL id 5 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL +Warnings: +Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where <expr_cache><`test`.`t2`.`id`>(<in_optimizer>(`test`.`t2`.`id`,<exists>(select 1 having (<cache>(`test`.`t2`.`id`) = <ref_null_helper>(1)) union select 3 having (<cache>(`test`.`t2`.`id`) = <ref_null_helper>(3))))) +SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 3); +id +SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 2); +id +2 +INSERT INTO t2 VALUES ((SELECT * FROM t2)); +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data +INSERT INTO t2 VALUES ((SELECT id FROM t2)); +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data +SELECT * FROM t2; +id +1 +2 +CREATE TABLE t1 (id int(11) default NULL, KEY id (id)) ENGINE=MyISAM CHARSET=latin1; +INSERT INTO t1 values (1),(1); +UPDATE t2 SET id=(SELECT * FROM t1); +ERROR 21000: Subquery returns more than 1 row +drop table t2, t1; +create table t1 (a int); +insert into t1 values (1),(2),(3); +select 1 IN (SELECT * from t1); +1 IN (SELECT * from t1) +1 +select 10 IN (SELECT * from t1); +10 IN (SELECT * from t1) +0 +select NULL IN (SELECT * from t1); +NULL IN (SELECT * from t1) +NULL +update t1 set a=NULL where a=2; +select 1 IN (SELECT * from t1); +1 IN (SELECT * from t1) +1 +select 3 IN (SELECT * from t1); +3 IN (SELECT * from t1) +1 +select 10 IN (SELECT * from t1); +10 IN (SELECT * from t1) +NULL +select 1 > ALL (SELECT * from t1); +1 > ALL (SELECT * from t1) +0 +select 10 > ALL (SELECT * from t1); +10 > ALL (SELECT * from t1) +NULL +select 1 > ANY (SELECT * from t1); +1 > ANY (SELECT * from t1) +NULL +select 10 > ANY (SELECT * from t1); +10 > ANY (SELECT * from t1) +1 +drop table t1; +create table t1 (a varchar(20)); +insert into t1 values ('A'),('BC'),('DEF'); +select 'A' IN (SELECT * from t1); +'A' IN (SELECT * from t1) +1 +select 'XYZS' IN (SELECT * from t1); +'XYZS' IN (SELECT * from t1) +0 +select NULL IN (SELECT * from t1); +NULL IN (SELECT * from t1) +NULL +update t1 set a=NULL where a='BC'; +select 'A' IN (SELECT * from t1); +'A' IN (SELECT * from t1) +1 +select 'DEF' IN (SELECT * from t1); +'DEF' IN (SELECT * from t1) +1 +select 'XYZS' IN (SELECT * from t1); +'XYZS' IN (SELECT * from t1) +NULL +select 'A' > ALL (SELECT * from t1); +'A' > ALL (SELECT * from t1) +0 +select 'XYZS' > ALL (SELECT * from t1); +'XYZS' > ALL (SELECT * from t1) +NULL +select 'A' > ANY (SELECT * from t1); +'A' > ANY (SELECT * from t1) +NULL +select 'XYZS' > ANY (SELECT * from t1); +'XYZS' > ANY (SELECT * from t1) +1 +drop table t1; +create table t1 (a float); +insert into t1 values (1.5),(2.5),(3.5); +select 1.5 IN (SELECT * from t1); +1.5 IN (SELECT * from t1) +1 +select 10.5 IN (SELECT * from t1); +10.5 IN (SELECT * from t1) +0 +select NULL IN (SELECT * from t1); +NULL IN (SELECT * from t1) +NULL +update t1 set a=NULL where a=2.5; +select 1.5 IN (SELECT * from t1); +1.5 IN (SELECT * from t1) +1 +select 3.5 IN (SELECT * from t1); +3.5 IN (SELECT * from t1) +1 +select 10.5 IN (SELECT * from t1); +10.5 IN (SELECT * from t1) +NULL +select 1.5 > ALL (SELECT * from t1); +1.5 > ALL (SELECT * from t1) +0 +select 10.5 > ALL (SELECT * from t1); +10.5 > ALL (SELECT * from t1) +NULL +select 1.5 > ANY (SELECT * from t1); +1.5 > ANY (SELECT * from t1) +NULL +select 10.5 > ANY (SELECT * from t1); +10.5 > ANY (SELECT * from t1) +1 +explain extended select (select a+1) from t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 +Note 1249 Select 2 was reduced during optimization +Note 1003 select (`test`.`t1`.`a` + 1) AS `(select a+1)` from `test`.`t1` +select (select a+1) from t1; +(select a+1) +2.5 +NULL +4.5 +drop table t1; +CREATE TABLE t1 (a int(11) NOT NULL default '0', PRIMARY KEY (a)); +CREATE TABLE t2 (a int(11) default '0', INDEX (a)); +INSERT INTO t1 VALUES (1),(2),(3),(4); +INSERT INTO t2 VALUES (1),(2),(3); +SELECT t1.a, t1.a in (select t2.a from t2) FROM t1; +a t1.a in (select t2.a from t2) +1 1 +2 1 +3 1 +4 0 +explain extended SELECT t1.a, t1.a in (select t2.a from t2) FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 index NULL PRIMARY 4 NULL 4 100.00 Using index +2 SUBQUERY t2 index_subquery a a 5 func 2 100.00 Using index +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,<expr_cache><`test`.`t1`.`a`>(<in_optimizer>(`test`.`t1`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`a`) in t2 on a checking NULL having <is_not_null_test>(`test`.`t2`.`a`))))) AS `t1.a in (select t2.a from t2)` from `test`.`t1` +CREATE TABLE t3 (a int(11) default '0'); +INSERT INTO t3 VALUES (1),(2),(3); +SELECT t1.a, t1.a in (select t2.a from t2,t3 where t3.a=t2.a) FROM t1; +a t1.a in (select t2.a from t2,t3 where t3.a=t2.a) +1 1 +2 1 +3 1 +4 0 +explain extended SELECT t1.a, t1.a in (select t2.a from t2,t3 where t3.a=t2.a) FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 index NULL PRIMARY 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t2 ref_or_null a a 5 func 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,<expr_cache><`test`.`t1`.`a`>(<in_optimizer>(`test`.`t1`.`a`,<exists>(select `test`.`t2`.`a` from `test`.`t2` join `test`.`t3` where ((`test`.`t3`.`a` = `test`.`t2`.`a`) and ((<cache>(`test`.`t1`.`a`) = `test`.`t2`.`a`) or isnull(`test`.`t2`.`a`))) having <is_not_null_test>(`test`.`t2`.`a`)))) AS `t1.a in (select t2.a from t2,t3 where t3.a=t2.a)` from `test`.`t1` +drop table t1,t2,t3; +# check correct NULL Processing for normal IN/ALL/ANY +# and 2 ways of max/min optimization +create table t1 (a int); +insert into t1 values (1), (100), (NULL), (1000); +create table t2 (a int not null); +# subselect returns empty set (for NULL and non-NULL left part) +select a, a in (select * from t2) from t1; +a a in (select * from t2) +1 0 +100 0 +NULL 0 +1000 0 +select a, a > any (select * from t2) from t1; +a a > any (select * from t2) +1 0 +100 0 +NULL 0 +1000 0 +select a, a > all (select * from t2) from t1; +a a > all (select * from t2) +1 1 +100 1 +NULL 1 +1000 1 +select a from t1 where a in (select * from t2); +a +select a from t1 where a > any (select * from t2); +a +select a from t1 where a > all (select * from t2); +a +1 +100 +NULL +1000 +select a from t1 where a in (select * from t2 group by a); +a +select a from t1 where a > any (select * from t2 group by a); +a +select a from t1 where a > all (select * from t2 group by a); +a +1 +100 +NULL +1000 +insert into t2 values (1),(200); +# sebselect returns non-empty set without NULLs +select a, a in (select * from t2) from t1; +a a in (select * from t2) +1 1 +100 0 +NULL NULL +1000 0 +select a, a > any (select * from t2) from t1; +a a > any (select * from t2) +1 0 +100 1 +NULL NULL +1000 1 +select a, a > all (select * from t2) from t1; +a a > all (select * from t2) +1 0 +100 0 +NULL NULL +1000 1 +select a from t1 where a in (select * from t2); +a +1 +select a from t1 where a > any (select * from t2); +a +100 +1000 +select a from t1 where a > all (select * from t2); +a +1000 +select a from t1 where a in (select * from t2 group by a); +a +1 +select a from t1 where a > any (select * from t2 group by a); +a +100 +1000 +select a from t1 where a > all (select * from t2 group by a); +a +1000 +drop table t2; +create table t2 (a int); +insert into t2 values (1),(NULL),(200); +# sebselect returns non-empty set with NULLs +select a, a in (select * from t2) from t1; +a a in (select * from t2) +1 1 +100 NULL +NULL NULL +1000 NULL +select a, a > any (select * from t2) from t1; +a a > any (select * from t2) +1 NULL +100 1 +NULL NULL +1000 1 +select a, a > all (select * from t2) from t1; +a a > all (select * from t2) +1 0 +100 0 +NULL NULL +1000 NULL +select a from t1 where a in (select * from t2); +a +1 +select a from t1 where a > any (select * from t2); +a +100 +1000 +select a from t1 where a > all (select * from t2); +a +select a from t1 where a in (select * from t2 group by a); +a +1 +select a from t1 where a > any (select * from t2 group by a); +a +100 +1000 +select a from t1 where a > all (select * from t2 group by a); +a +drop table t1, t2; +create table t1 (a float); +select 10.5 IN (SELECT * from t1 LIMIT 1); +ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' +select 10.5 IN (SELECT * from t1 LIMIT 1 UNION SELECT 1.5); +ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' +drop table t1; +create table t1 (a int, b int, c varchar(10)); +create table t2 (a int); +insert into t1 values (1,2,'a'),(2,3,'b'),(3,4,'c'); +insert into t2 values (1),(2),(NULL); +select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a'),(select c from t1 where a=t2.a) from t2; +a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a') (select c from t1 where a=t2.a) +1 1 a +2 0 b +NULL NULL NULL +select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b'),(select c from t1 where a=t2.a) from t2; +a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b') (select c from t1 where a=t2.a) +1 0 a +2 1 b +NULL NULL NULL +select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c'),(select c from t1 where a=t2.a) from t2; +a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c') (select c from t1 where a=t2.a) +1 0 a +2 0 b +NULL NULL NULL +drop table t1,t2; +create table t1 (a int, b real, c varchar(10)); +insert into t1 values (1, 1, 'a'), (2,2,'b'), (NULL, 2, 'b'); +select ROW(1, 1, 'a') IN (select a,b,c from t1); +ROW(1, 1, 'a') IN (select a,b,c from t1) +1 +select ROW(1, 2, 'a') IN (select a,b,c from t1); +ROW(1, 2, 'a') IN (select a,b,c from t1) +0 +select ROW(1, 1, 'a') IN (select b,a,c from t1); +ROW(1, 1, 'a') IN (select b,a,c from t1) +1 +select ROW(1, 1, 'a') IN (select a,b,c from t1 where a is not null); +ROW(1, 1, 'a') IN (select a,b,c from t1 where a is not null) +1 +select ROW(1, 2, 'a') IN (select a,b,c from t1 where a is not null); +ROW(1, 2, 'a') IN (select a,b,c from t1 where a is not null) +0 +select ROW(1, 1, 'a') IN (select b,a,c from t1 where a is not null); +ROW(1, 1, 'a') IN (select b,a,c from t1 where a is not null) +1 +select ROW(1, 1, 'a') IN (select a,b,c from t1 where c='b' or c='a'); +ROW(1, 1, 'a') IN (select a,b,c from t1 where c='b' or c='a') +1 +select ROW(1, 2, 'a') IN (select a,b,c from t1 where c='b' or c='a'); +ROW(1, 2, 'a') IN (select a,b,c from t1 where c='b' or c='a') +0 +select ROW(1, 1, 'a') IN (select b,a,c from t1 where c='b' or c='a'); +ROW(1, 1, 'a') IN (select b,a,c from t1 where c='b' or c='a') +1 +select ROW(1, 1, 'a') IN (select b,a,c from t1 limit 2); +ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' +drop table t1; +create table t1 (a int); +insert into t1 values (1); +do @a:=(SELECT a from t1); +select @a; +@a +1 +set @a:=2; +set @a:=(SELECT a from t1); +select @a; +@a +1 +drop table t1; +do (SELECT a from t1); +ERROR 42S02: Table 'test.t1' doesn't exist +set @a:=(SELECT a from t1); +ERROR 42S02: Table 'test.t1' doesn't exist +CREATE TABLE t1 (a int, KEY(a)); +HANDLER t1 OPEN; +HANDLER t1 READ a=((SELECT 1)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1 +HANDLER t1 CLOSE; +drop table t1; +create table t1 (a int); +create table t2 (b int); +insert into t1 values (1),(2); +insert into t2 values (1); +select a from t1 where a in (select a from t1 where a in (select b from t2)); +a +1 +drop table t1, t2; +create table t1 (a int, b int); +create table t2 like t1; +insert into t1 values (1,2),(1,3),(1,4),(1,5); +insert into t2 values (1,2),(1,3); +select * from t1 where row(a,b) in (select a,b from t2); +a b +1 2 +1 3 +drop table t1, t2; +CREATE TABLE `t1` (`i` int(11) NOT NULL default '0',PRIMARY KEY (`i`)) ENGINE=MyISAM CHARSET=latin1; +INSERT INTO t1 VALUES (1); +UPDATE t1 SET i=i+1 WHERE i=(SELECT MAX(i)); +select * from t1; +i +2 +drop table t1; +CREATE TABLE t1 (a int(1)); +EXPLAIN EXTENDED SELECT (SELECT RAND() FROM t1) FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +Warnings: +Note 1003 select (select rand() from `test`.`t1`) AS `(SELECT RAND() FROM t1)` from `test`.`t1` +EXPLAIN EXTENDED SELECT (SELECT ENCRYPT('test') FROM t1) FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +Warnings: +Note 1003 select (select encrypt('test') from `test`.`t1`) AS `(SELECT ENCRYPT('test') FROM t1)` from `test`.`t1` +EXPLAIN EXTENDED SELECT (SELECT BENCHMARK(1,1) FROM t1) FROM t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +Warnings: +Note 1003 select (select benchmark(1,1) from `test`.`t1`) AS `(SELECT BENCHMARK(1,1) FROM t1)` from `test`.`t1` +drop table t1; +CREATE TABLE `t1` ( +`mot` varchar(30) character set latin1 NOT NULL default '', +`topic` mediumint(8) unsigned NOT NULL default '0', +`date` date NOT NULL default '0000-00-00', +`pseudo` varchar(35) character set latin1 NOT NULL default '', +PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`), +KEY `pseudo` (`pseudo`,`date`,`topic`), +KEY `topic` (`topic`) +) ENGINE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC; +CREATE TABLE `t2` ( +`mot` varchar(30) character set latin1 NOT NULL default '', +`topic` mediumint(8) unsigned NOT NULL default '0', +`date` date NOT NULL default '0000-00-00', +`pseudo` varchar(35) character set latin1 NOT NULL default '', +PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`), +KEY `pseudo` (`pseudo`,`date`,`topic`), +KEY `topic` (`topic`) +) ENGINE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC; +CREATE TABLE `t3` ( +`numeropost` mediumint(8) unsigned NOT NULL auto_increment, +`maxnumrep` int(10) unsigned NOT NULL default '0', +PRIMARY KEY (`numeropost`), +UNIQUE KEY `maxnumrep` (`maxnumrep`) +) ENGINE=MyISAM CHARSET=latin1; +INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test'); +Warnings: +Warning 1265 Data truncated for column 'date' at row 1 +Warning 1265 Data truncated for column 'date' at row 2 +INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test'); +Warnings: +Warning 1265 Data truncated for column 'date' at row 1 +Warning 1265 Data truncated for column 'date' at row 2 +INSERT INTO t3 VALUES (1,1); +SELECT DISTINCT topic FROM t2 WHERE NOT EXISTS(SELECT * FROM t3 WHERE +numeropost=topic); +topic +2 +select * from t1; +mot topic date pseudo +joce 1 0000-00-00 joce +test 2 0000-00-00 test +DELETE FROM t1 WHERE topic IN (SELECT DISTINCT topic FROM t2 WHERE NOT +EXISTS(SELECT * FROM t3 WHERE numeropost=topic)); +select * from t1; +mot topic date pseudo +joce 1 0000-00-00 joce +drop table t1, t2, t3; +SELECT * FROM (SELECT 1 as a,(SELECT a)) a; +a (SELECT a) +1 1 +CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT 1)) a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(1) NOT NULL DEFAULT '0', + `(SELECT 1)` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a)) a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(1) NOT NULL DEFAULT '0', + `(SELECT a)` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a+0)) a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(1) NOT NULL DEFAULT '0', + `(SELECT a+0)` int(3) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +CREATE TABLE t1 SELECT (SELECT 1 as a UNION SELECT 1+1 limit 1,1) as a; +select * from t1; +a +2 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bigint(20) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (a int); +insert into t1 values (1), (2), (3); +explain extended select a,(select (select rand() from t1 limit 1) from t1 limit 1) +from t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 +2 UNCACHEABLE SUBQUERY t1 ALL NULL NULL NULL NULL 3 100.00 +3 UNCACHEABLE SUBQUERY t1 ALL NULL NULL NULL NULL 3 100.00 +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,(select (select rand() from `test`.`t1` limit 1) from `test`.`t1` limit 1) AS `(select (select rand() from t1 limit 1) from t1 limit 1)` from `test`.`t1` +drop table t1; +select t1.Continent, t2.Name, t2.Population from t1 LEFT JOIN t2 ON t1.Code = t2.Country where t2.Population IN (select max(t2.Population) AS Population from t2, t1 where t2.Country = t1.Code group by Continent); +ERROR 42S02: Table 'test.t1' doesn't exist +CREATE TABLE t1 ( +ID int(11) NOT NULL auto_increment, +name char(35) NOT NULL default '', +t2 char(3) NOT NULL default '', +District char(20) NOT NULL default '', +Population int(11) NOT NULL default '0', +PRIMARY KEY (ID) +) ENGINE=MyISAM; +INSERT INTO t1 VALUES (130,'Sydney','AUS','New South Wales',3276207); +INSERT INTO t1 VALUES (131,'Melbourne','AUS','Victoria',2865329); +INSERT INTO t1 VALUES (132,'Brisbane','AUS','Queensland',1291117); +CREATE TABLE t2 ( +Code char(3) NOT NULL default '', +Name char(52) NOT NULL default '', +Continent enum('Asia','Europe','North America','Africa','Oceania','Antarctica','South America') NOT NULL default 'Asia', +Region char(26) NOT NULL default '', +SurfaceArea float(10,2) NOT NULL default '0.00', +IndepYear smallint(6) default NULL, +Population int(11) NOT NULL default '0', +LifeExpectancy float(3,1) default NULL, +GNP float(10,2) default NULL, +GNPOld float(10,2) default NULL, +LocalName char(45) NOT NULL default '', +GovernmentForm char(45) NOT NULL default '', +HeadOfState char(60) default NULL, +Capital int(11) default NULL, +Code2 char(2) NOT NULL default '', +PRIMARY KEY (Code) +) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('AUS','Australia','Oceania','Australia and New Zealand',7741220.00,1901,18886000,79.8,351182.00,392911.00,'Australia','Constitutional Monarchy, Federation','Elisabeth II',135,'AU'); +INSERT INTO t2 VALUES ('AZE','Azerbaijan','Asia','Middle East',86600.00,1991,7734000,62.9,4127.00,4100.00,'Azärbaycan','Federal Republic','Heydär Äliyev',144,'AZ'); +select t2.Continent, t1.Name, t1.Population from t2 LEFT JOIN t1 ON t2.Code = t1.t2 where t1.Population IN (select max(t1.Population) AS Population from t1, t2 where t1.t2 = t2.Code group by Continent); +Continent Name Population +Oceania Sydney 3276207 +drop table t1, t2; +CREATE TABLE `t1` ( +`id` mediumint(8) unsigned NOT NULL auto_increment, +`pseudo` varchar(35) character set latin1 NOT NULL default '', +PRIMARY KEY (`id`), +UNIQUE KEY `pseudo` (`pseudo`) +) ENGINE=MyISAM PACK_KEYS=1 ROW_FORMAT=DYNAMIC; +INSERT INTO t1 (pseudo) VALUES ('test'); +SELECT 0 IN (SELECT 1 FROM t1 a); +0 IN (SELECT 1 FROM t1 a) +0 +EXPLAIN EXTENDED SELECT 0 IN (SELECT 1 FROM t1 a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select <in_optimizer>(0,<exists>(select 1 from dual where (0 = 1))) AS `0 IN (SELECT 1 FROM t1 a)` +INSERT INTO t1 (pseudo) VALUES ('test1'); +SELECT 0 IN (SELECT 1 FROM t1 a); +0 IN (SELECT 1 FROM t1 a) +0 +EXPLAIN EXTENDED SELECT 0 IN (SELECT 1 FROM t1 a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select <in_optimizer>(0,<exists>(select 1 from `test`.`t1` `a` where (0 = 1))) AS `0 IN (SELECT 1 FROM t1 a)` +drop table t1; +CREATE TABLE `t1` ( +`i` int(11) NOT NULL default '0', +PRIMARY KEY (`i`) +) ENGINE=MyISAM CHARSET=latin1; +INSERT INTO t1 VALUES (1); +UPDATE t1 SET i=i+(SELECT MAX(i) FROM (SELECT 1) t) WHERE i=(SELECT MAX(i)); +UPDATE t1 SET i=i+1 WHERE i=(SELECT MAX(i)); +UPDATE t1 SET t.i=i+(SELECT MAX(i) FROM (SELECT 1) t); +ERROR 42S22: Unknown column 't.i' in 'field list' +select * from t1; +i +3 +drop table t1; +CREATE TABLE t1 ( +id int(11) default NULL +) ENGINE=MyISAM CHARSET=latin1; +INSERT INTO t1 VALUES (1),(1),(2),(2),(1),(3); +CREATE TABLE t2 ( +id int(11) default NULL, +name varchar(15) default NULL +) ENGINE=MyISAM CHARSET=latin1; +INSERT INTO t2 VALUES (4,'vita'), (1,'vita'), (2,'vita'), (1,'vita'); +update t1, t2 set t2.name='lenka' where t2.id in (select id from t1); +select * from t2; +id name +4 vita +1 lenka +2 lenka +1 lenka +drop table t1,t2; +create table t1 (a int, unique index indexa (a)); +insert into t1 values (-1), (-4), (-2), (NULL); +select -10 IN (select a from t1 FORCE INDEX (indexa)); +-10 IN (select a from t1 FORCE INDEX (indexa)) +NULL +drop table t1; +create table t1 (id int not null auto_increment primary key, salary int, key(salary)); +insert into t1 (salary) values (100),(1000),(10000),(10),(500),(5000),(50000); +explain extended SELECT id FROM t1 where salary = (SELECT MAX(salary) FROM t1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ref salary salary 5 const 1 100.00 Using where +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +Warnings: +Note 1003 select `test`.`t1`.`id` AS `id` from `test`.`t1` where (`test`.`t1`.`salary` = (select max(`test`.`t1`.`salary`) from `test`.`t1`)) +drop table t1; +CREATE TABLE t1 ( +ID int(10) unsigned NOT NULL auto_increment, +SUB_ID int(3) unsigned NOT NULL default '0', +REF_ID int(10) unsigned default NULL, +REF_SUB int(3) unsigned default '0', +PRIMARY KEY (ID,SUB_ID), +UNIQUE KEY t1_PK (ID,SUB_ID), +KEY t1_FK (REF_ID,REF_SUB), +KEY t1_REFID (REF_ID) +) ENGINE=MyISAM CHARSET=cp1251; +INSERT INTO t1 VALUES (1,0,NULL,NULL),(2,0,NULL,NULL); +SELECT DISTINCT REF_ID FROM t1 WHERE ID= (SELECT DISTINCT REF_ID FROM t1 WHERE ID=2); +REF_ID +DROP TABLE t1; +create table t1 (a int, b int); +create table t2 (a int, b int); +insert into t1 values (1,0), (2,0), (3,0); +insert into t2 values (1,1), (2,1), (3,1), (2,2); +update ignore t1 set b=(select b from t2 where t1.a=t2.a); +Warnings: +Warning 1242 Subquery returns more than 1 row +select * from t1; +a b +1 1 +2 NULL +3 1 +drop table t1, t2; +CREATE TABLE `t1` ( +`id` mediumint(8) unsigned NOT NULL auto_increment, +`pseudo` varchar(35) NOT NULL default '', +`email` varchar(60) NOT NULL default '', +PRIMARY KEY (`id`), +UNIQUE KEY `email` (`email`), +UNIQUE KEY `pseudo` (`pseudo`) +) ENGINE=MyISAM CHARSET=latin1 PACK_KEYS=1 ROW_FORMAT=DYNAMIC; +INSERT INTO t1 (id,pseudo,email) VALUES (1,'test','test'),(2,'test1','test1'); +SELECT pseudo as a, pseudo as b FROM t1 GROUP BY (SELECT a) ORDER BY (SELECT id*1); +a b +test test +test1 test1 +drop table if exists t1; +(SELECT 1 as a) UNION (SELECT 1) ORDER BY (SELECT a+0); +a +1 +create table t1 (a int not null, b int, primary key (a)); +create table t2 (a int not null, primary key (a)); +create table t3 (a int not null, b int, primary key (a)); +insert into t1 values (1,10), (2,20), (3,30), (4,40); +insert into t2 values (2), (3), (4), (5); +insert into t3 values (10,3), (20,4), (30,5); +select * from t2 where t2.a in (select a from t1); +a +2 +3 +4 +explain extended select * from t2 where t2.a in (select a from t1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index +1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 4 75.00 Using where; Using index; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`) +select * from t2 where t2.a in (select a from t1 where t1.b <> 30); +a +2 +4 +explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index +1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a` = `test`.`t2`.`a`) and (`test`.`t1`.`b` <> 30)) +select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a); +a +2 +3 +explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index +1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join) +1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Using index +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t3` join `test`.`t2` where ((`test`.`t3`.`a` = `test`.`t1`.`b`) and (`test`.`t1`.`a` = `test`.`t2`.`a`)) +drop table t1, t2, t3; +create table t1 (a int, b int, index a (a,b)); +create table t2 (a int, index a (a)); +create table t3 (a int, b int, index a (a)); +insert into t1 values (1,10), (2,20), (3,30), (4,40); +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +insert into t1 +select rand()*100000+200,rand()*100000 from t0 A, t0 B, t0 C, t0 D; +insert into t2 values (2), (3), (4), (5); +insert into t3 values (10,3), (20,4), (30,5); +select * from t2 where t2.a in (select a from t1); +a +2 +3 +4 +explain extended select * from t2 where t2.a in (select a from t1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 index a a 5 NULL 4 100.00 Using where; Using index +1 PRIMARY t1 ref a a 5 test.t2.a 101 100.00 Using index; FirstMatch(t2) +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1`) where (`test`.`t1`.`a` = `test`.`t2`.`a`) +select * from t2 where t2.a in (select a from t1 where t1.b <> 30); +a +2 +4 +explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 index a a 5 NULL 4 100.00 Using where; Using index +1 PRIMARY t1 ref a a 5 test.t2.a 101 100.00 Using where; Using index; FirstMatch(t2) +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1`) where ((`test`.`t1`.`a` = `test`.`t2`.`a`) and (`test`.`t1`.`b` <> 30)) +select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a); +a +2 +3 +explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 index a a 5 NULL 4 100.00 Using where; Using index +1 PRIMARY t3 index a a 5 NULL 3 100.00 Using where; Using index +1 PRIMARY t1 ref a a 10 test.t2.a,test.t3.a 116 100.00 Using index; FirstMatch(t2) +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1` join `test`.`t3`) where ((`test`.`t1`.`b` = `test`.`t3`.`a`) and (`test`.`t1`.`a` = `test`.`t2`.`a`)) +insert into t1 values (3,31); +select * from t2 where t2.a in (select a from t1 where t1.b <> 30); +a +2 +3 +4 +select * from t2 where t2.a in (select a from t1 where t1.b <> 30 and t1.b <> 31); +a +2 +4 +explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 index a a 5 NULL 4 100.00 Using where; Using index +1 PRIMARY t1 ref a a 5 test.t2.a 101 100.00 Using where; Using index; FirstMatch(t2) +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1`) where ((`test`.`t1`.`a` = `test`.`t2`.`a`) and (`test`.`t1`.`b` <> 30)) +drop table t0, t1, t2, t3; +create table t1 (a int, b int); +create table t2 (a int, b int); +create table t3 (a int, b int); +insert into t1 values (0,100),(1,2), (1,3), (2,2), (2,7), (2,-1), (3,10); +insert into t2 values (0,0), (1,1), (2,1), (3,1), (4,1); +insert into t3 values (3,3), (2,2), (1,1); +select a,(select count(distinct t1.b) as sum from t1,t2 where t1.a=t2.a and t2.b > 0 and t1.a <= t3.b group by t1.a order by sum limit 1) from t3; +a (select count(distinct t1.b) as sum from t1,t2 where t1.a=t2.a and t2.b > 0 and t1.a <= t3.b group by t1.a order by sum limit 1) +3 1 +2 2 +1 2 +drop table t1,t2,t3; +create table t1 (s1 int); +create table t2 (s1 int); +insert into t1 values (1); +insert into t2 values (1); +select * from t1 where exists (select s1 from t2 having max(t2.s1)=t1.s1); +s1 +1 +drop table t1,t2; +create table t1 (s1 int); +create table t2 (s1 int); +insert into t1 values (1); +insert into t2 values (1); +update t1 set s1 = s1 + 1 where 1 = (select x.s1 as A from t2 WHERE t2.s1 > t1.s1 order by A); +ERROR 42S22: Unknown column 'x.s1' in 'field list' +DROP TABLE t1, t2; +CREATE TABLE t1 (s1 CHAR(5) COLLATE latin1_german1_ci, +s2 CHAR(5) COLLATE latin1_swedish_ci); +INSERT INTO t1 VALUES ('z','?'); +select * from t1 where s1 > (select max(s2) from t1); +ERROR HY000: Illegal mix of collations (latin1_german1_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '>' +select * from t1 where s1 > any (select max(s2) from t1); +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin1_german1_ci,IMPLICIT) for operation '<' +drop table t1; +create table t1(toid int,rd int); +create table t2(userid int,pmnew int,pmtotal int); +insert into t2 values(1,0,0),(2,0,0); +insert into t1 values(1,0),(1,0),(1,0),(1,12),(1,15),(1,123),(1,12312),(1,12312),(1,123),(2,0),(2,0),(2,1),(2,2); +select userid,pmtotal,pmnew, (select count(rd) from t1 where toid=t2.userid) calc_total, (select count(rd) from t1 where rd=0 and toid=t2.userid) calc_new from t2 where userid in (select distinct toid from t1); +userid pmtotal pmnew calc_total calc_new +1 0 0 9 3 +2 0 0 4 2 +drop table t1, t2; +create table t1 (s1 char(5)); +select (select 'a','b' from t1 union select 'a','b' from t1) from t1; +ERROR 21000: Operand should contain 1 column(s) +insert into t1 values ('tttt'); +select * from t1 where ('a','b')=(select 'a','b' from t1 union select 'a','b' from t1); +s1 +tttt +explain extended (select * from t1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 +Warnings: +Note 1003 (select 'tttt' AS `s1` from dual) +(select * from t1); +s1 +tttt +drop table t1; +create table t1 (s1 char(5), index s1(s1)); +create table t2 (s1 char(5), index s1(s1)); +insert into t1 values ('a1'),('a2'),('a3'); +insert into t2 values ('a1'),('a2'); +select s1, s1 NOT IN (SELECT s1 FROM t2) from t1; +s1 s1 NOT IN (SELECT s1 FROM t2) +a1 0 +a2 0 +a3 1 +select s1, s1 = ANY (SELECT s1 FROM t2) from t1; +s1 s1 = ANY (SELECT s1 FROM t2) +a1 1 +a2 1 +a3 0 +select s1, s1 <> ALL (SELECT s1 FROM t2) from t1; +s1 s1 <> ALL (SELECT s1 FROM t2) +a1 0 +a2 0 +a3 1 +select s1, s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2') from t1; +s1 s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2') +a1 0 +a2 1 +a3 1 +explain extended select s1, s1 NOT IN (SELECT s1 FROM t2) from t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 index NULL s1 6 NULL 3 100.00 Using index +2 SUBQUERY t2 index_subquery s1 s1 6 func 2 100.00 Using index; Full scan on NULL key +Warnings: +Note 1003 select `test`.`t1`.`s1` AS `s1`,(not(<expr_cache><`test`.`t1`.`s1`>(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL having trigcond(<is_not_null_test>(`test`.`t2`.`s1`)))))))) AS `s1 NOT IN (SELECT s1 FROM t2)` from `test`.`t1` +explain extended select s1, s1 = ANY (SELECT s1 FROM t2) from t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 index NULL s1 6 NULL 3 100.00 Using index +2 SUBQUERY t2 index_subquery s1 s1 6 func 2 100.00 Using index; Full scan on NULL key +Warnings: +Note 1003 select `test`.`t1`.`s1` AS `s1`,<expr_cache><`test`.`t1`.`s1`>(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL having trigcond(<is_not_null_test>(`test`.`t2`.`s1`)))))) AS `s1 = ANY (SELECT s1 FROM t2)` from `test`.`t1` +explain extended select s1, s1 <> ALL (SELECT s1 FROM t2) from t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 index NULL s1 6 NULL 3 100.00 Using index +2 SUBQUERY t2 index_subquery s1 s1 6 func 2 100.00 Using index; Full scan on NULL key +Warnings: +Note 1003 select `test`.`t1`.`s1` AS `s1`,(not(<expr_cache><`test`.`t1`.`s1`>(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL having trigcond(<is_not_null_test>(`test`.`t2`.`s1`)))))))) AS `s1 <> ALL (SELECT s1 FROM t2)` from `test`.`t1` +explain extended select s1, s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2') from t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 index NULL s1 6 NULL 3 100.00 Using index +2 SUBQUERY t2 index_subquery s1 s1 6 func 2 100.00 Using index; Using where; Full scan on NULL key +Warnings: +Note 1003 select `test`.`t1`.`s1` AS `s1`,(not(<expr_cache><`test`.`t1`.`s1`>(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL where (`test`.`t2`.`s1` < 'a2') having trigcond(<is_not_null_test>(`test`.`t2`.`s1`)))))))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1` +drop table t1,t2; +create table t2 (a int, b int not null); +create table t3 (a int); +insert into t3 values (6),(7),(3); +select * from t3 where a >= all (select b from t2); +a +6 +7 +3 +explain extended select * from t3 where a >= all (select b from t2); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +Warnings: +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,((select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`)))) +select * from t3 where a >= some (select b from t2); +a +explain extended select * from t3 where a >= some (select b from t2); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +Warnings: +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`)))) +select * from t3 where a >= all (select b from t2 group by 1); +a +6 +7 +3 +explain extended select * from t3 where a >= all (select b from t2 group by 1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +Warnings: +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,((select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`)))) +select * from t3 where a >= some (select b from t2 group by 1); +a +explain extended select * from t3 where a >= some (select b from t2 group by 1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +Warnings: +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`)))) +select * from t3 where NULL >= any (select b from t2); +a +explain extended select * from t3 where NULL >= any (select b from t2); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const table +Warnings: +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where 0 +select * from t3 where NULL >= any (select b from t2 group by 1); +a +explain extended select * from t3 where NULL >= any (select b from t2 group by 1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const table +Warnings: +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where 0 +select * from t3 where NULL >= some (select b from t2); +a +explain extended select * from t3 where NULL >= some (select b from t2); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const table +Warnings: +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where 0 +select * from t3 where NULL >= some (select b from t2 group by 1); +a +explain extended select * from t3 where NULL >= some (select b from t2 group by 1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const table +Warnings: +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where 0 +insert into t2 values (2,2), (2,1), (3,3), (3,1); +select * from t3 where a > all (select max(b) from t2 group by a); +a +6 +7 +explain extended select * from t3 where a > all (select max(b) from t2 group by a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where +2 SUBQUERY t2 ALL NULL NULL NULL NULL 4 100.00 Using temporary +Warnings: +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= <cache>(`test`.`t3`.`a`)))) +drop table t2, t3; +CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL auto_increment, `taskid` bigint(20) NOT NULL default '0', `dbid` int(11) NOT NULL default '0', `create_date` datetime NOT NULL default '0000-00-00 00:00:00', `last_update` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=3 ; +INSERT INTO `t1` (`id`, `taskid`, `dbid`, `create_date`,`last_update`) VALUES (1, 1, 15, '2003-09-29 10:31:36', '2003-09-29 10:31:36'), (2, 1, 21, now(), now()); +CREATE TABLE `t2` (`db_id` int(11) NOT NULL auto_increment,`name` varchar(200) NOT NULL default '',`primary_uid` smallint(6) NOT NULL default '0',`secondary_uid` smallint(6) NOT NULL default '0',PRIMARY KEY (`db_id`),UNIQUE KEY `name_2` (`name`),FULLTEXT KEY `name` (`name`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=2147483647; +INSERT INTO `t2` (`db_id`, `name`, `primary_uid`, `secondary_uid`) VALUES (18, 'Not Set 1', 0, 0),(19, 'Valid', 1, 2),(20, 'Valid 2', 1, 2),(21, 'Should Not Return', 1, 2),(26, 'Not Set 2', 0, 0),(-1, 'ALL DB\'S', 0, 0); +CREATE TABLE `t3` (`taskgenid` mediumint(9) NOT NULL auto_increment,`dbid` int(11) NOT NULL default '0',`taskid` int(11) NOT NULL default '0',`mon` tinyint(4) NOT NULL default '1',`tues` tinyint(4) NOT NULL default '1',`wed` tinyint(4) NOT NULL default '1',`thur` tinyint(4) NOT NULL default '1',`fri` tinyint(4) NOT NULL default '1',`sat` tinyint(4) NOT NULL default '0',`sun` tinyint(4) NOT NULL default '0',`how_often` smallint(6) NOT NULL default '1',`userid` smallint(6) NOT NULL default '0',`active` tinyint(4) NOT NULL default '1',PRIMARY KEY (`taskgenid`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=2 ; +INSERT INTO `t3` (`taskgenid`, `dbid`, `taskid`, `mon`, `tues`,`wed`, `thur`, `fri`, `sat`, `sun`, `how_often`, `userid`, `active`) VALUES (1,-1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1); +CREATE TABLE `t4` (`task_id` smallint(6) NOT NULL default '0',`description` varchar(200) NOT NULL default '') ENGINE=MyISAM CHARSET=latin1; +INSERT INTO `t4` (`task_id`, `description`) VALUES (1, 'Daily Check List'),(2, 'Weekly Status'); +select dbid, name, (date_format(now() , '%Y-%m-%d') - INTERVAL how_often DAY) >= ifnull((SELECT date_format(max(create_date),'%Y-%m-%d') FROM t1 WHERE dbid = b.db_id AND taskid = a.taskgenid), '1950-01-01') from t3 a, t2 b, t4 WHERE dbid = - 1 AND primary_uid = '1' AND t4.task_id = taskid; +dbid name (date_format(now() , '%Y-%m-%d') - INTERVAL how_often DAY) >= ifnull((SELECT date_format(max(create_date),'%Y-%m-%d') FROM t1 WHERE dbid = b.db_id AND taskid = a.taskgenid), '1950-01-01') +-1 Valid 1 +-1 Valid 2 1 +-1 Should Not Return 0 +SELECT dbid, name FROM t3 a, t2 b, t4 WHERE dbid = - 1 AND primary_uid = '1' AND ((date_format(now() , '%Y-%m-%d') - INTERVAL how_often DAY) >= ifnull((SELECT date_format(max(create_date),'%Y-%m-%d') FROM t1 WHERE dbid = b.db_id AND taskid = a.taskgenid), '1950-01-01')) AND t4.task_id = taskid; +dbid name +-1 Valid +-1 Valid 2 +drop table t1,t2,t3,t4; +CREATE TABLE t1 (id int(11) default NULL) ENGINE=MyISAM CHARSET=latin1; +INSERT INTO t1 VALUES (1),(5); +CREATE TABLE t2 (id int(11) default NULL) ENGINE=MyISAM CHARSET=latin1; +INSERT INTO t2 VALUES (2),(6); +select * from t1 where (1,2,6) in (select * from t2); +ERROR 21000: Operand should contain 3 column(s) +DROP TABLE t1,t2; +create table t1 (s1 int); +insert into t1 values (1); +insert into t1 values (2); +set sort_buffer_size = (select s1 from t1); +ERROR 21000: Subquery returns more than 1 row +do (select * from t1); +Warnings: +Error 1242 Subquery returns more than 1 row +drop table t1; +create table t1 (s1 char); +insert into t1 values ('e'); +select * from t1 where 'f' > any (select s1 from t1); +s1 +e +select * from t1 where 'f' > any (select s1 from t1 union select s1 from t1); +s1 +e +explain extended select * from t1 where 'f' > any (select s1 from t1 union select s1 from t1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 system NULL NULL NULL NULL 1 100.00 +2 SUBQUERY t1 system NULL NULL NULL NULL 1 100.00 +3 UNION t1 system NULL NULL NULL NULL 1 100.00 +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL +Warnings: +Note 1003 select 'e' AS `s1` from dual where 1 +drop table t1; +CREATE TABLE t1 (number char(11) NOT NULL default '') ENGINE=MyISAM CHARSET=latin1; +INSERT INTO t1 VALUES ('69294728265'),('18621828126'),('89356874041'),('95895001874'); +CREATE TABLE t2 (code char(5) NOT NULL default '',UNIQUE KEY code (code)) ENGINE=MyISAM CHARSET=latin1; +INSERT INTO t2 VALUES ('1'),('1226'),('1245'),('1862'),('18623'),('1874'),('1967'),('6'); +select c.number as phone,(select p.code from t2 p where c.number like concat(p.code, '%') order by length(p.code) desc limit 1) as code from t1 c; +phone code +69294728265 6 +18621828126 1862 +89356874041 NULL +95895001874 NULL +drop table t1, t2; +create table t1 (s1 int); +create table t2 (s1 int); +select * from t1 where (select count(*) from t2 where t1.s2) = 1; +ERROR 42S22: Unknown column 't1.s2' in 'where clause' +select * from t1 where (select count(*) from t2 group by t1.s2) = 1; +ERROR 42S22: Unknown column 't1.s2' in 'group statement' +select count(*) from t2 group by t1.s2; +ERROR 42S22: Unknown column 't1.s2' in 'group statement' +drop table t1, t2; +CREATE TABLE t1(COLA FLOAT NOT NULL,COLB FLOAT NOT NULL,COLC VARCHAR(20) DEFAULT NULL,PRIMARY KEY (COLA, COLB)); +CREATE TABLE t2(COLA FLOAT NOT NULL,COLB FLOAT NOT NULL,COLC CHAR(1) NOT NULL,PRIMARY KEY (COLA)); +INSERT INTO t1 VALUES (1,1,'1A3240'), (1,2,'4W2365'); +INSERT INTO t2 VALUES (100, 200, 'C'); +SELECT DISTINCT COLC FROM t1 WHERE COLA = (SELECT COLA FROM t2 WHERE COLB = 200 AND COLC ='C' LIMIT 1); +COLC +DROP TABLE t1, t2; +CREATE TABLE t1 (a int(1)); +INSERT INTO t1 VALUES (1),(1),(1),(1),(1),(2),(3),(4),(5); +SELECT DISTINCT (SELECT a) FROM t1 LIMIT 100; +(SELECT a) +1 +2 +3 +4 +5 +DROP TABLE t1; +create table t1 (a int, b decimal(13, 3)); +insert into t1 values (1, 0.123); +select a, (select max(b) from t1) into outfile "../../tmp/subselect.out.file.1" from t1; +delete from t1; +load data infile "../../tmp/subselect.out.file.1" into table t1; +select * from t1; +a b +1 0.123 +drop table t1; +CREATE TABLE `t1` ( +`id` int(11) NOT NULL auto_increment, +`id_cns` tinyint(3) unsigned NOT NULL default '0', +`tipo` enum('','UNO','DUE') NOT NULL default '', +`anno_dep` smallint(4) unsigned zerofill NOT NULL default '0000', +`particolare` mediumint(8) unsigned NOT NULL default '0', +`generale` mediumint(8) unsigned NOT NULL default '0', +`bis` tinyint(3) unsigned NOT NULL default '0', +PRIMARY KEY (`id`), +UNIQUE KEY `idx_cns_gen_anno` (`anno_dep`,`id_cns`,`generale`,`particolare`), +UNIQUE KEY `idx_cns_par_anno` (`id_cns`,`anno_dep`,`tipo`,`particolare`,`bis`) +); +INSERT INTO `t1` VALUES (1,16,'UNO',1987,2048,9681,0),(2,50,'UNO',1987,1536,13987,0),(3,16,'UNO',1987,2432,14594,0),(4,16,'UNO',1987,1792,13422,0),(5,16,'UNO',1987,1025,10240,0),(6,16,'UNO',1987,1026,7089,0); +CREATE TABLE `t2` ( +`id` tinyint(3) unsigned NOT NULL auto_increment, +`max_anno_dep` smallint(6) unsigned NOT NULL default '0', +PRIMARY KEY (`id`) +); +INSERT INTO `t2` VALUES (16,1987),(50,1990),(51,1990); +SELECT cns.id, cns.max_anno_dep, cns.max_anno_dep = (SELECT s.anno_dep FROM t1 AS s WHERE s.id_cns = cns.id ORDER BY s.anno_dep DESC LIMIT 1) AS PIPPO FROM t2 AS cns; +id max_anno_dep PIPPO +16 1987 1 +50 1990 0 +51 1990 NULL +DROP TABLE t1, t2; +create table t1 (a int); +insert into t1 values (1), (2), (3); +SET SQL_SELECT_LIMIT=1; +select sum(a) from (select * from t1) as a; +sum(a) +6 +select 2 in (select * from t1); +2 in (select * from t1) +1 +SET SQL_SELECT_LIMIT=default; +drop table t1; +CREATE TABLE t1 (a int, b int, INDEX (a)); +INSERT INTO t1 VALUES (1, 1), (1, 2), (1, 3); +SELECT * FROM t1 WHERE a = (SELECT MAX(a) FROM t1 WHERE a = 1) ORDER BY b; +a b +1 1 +1 2 +1 3 +DROP TABLE t1; +create table t1(val varchar(10)); +insert into t1 values ('aaa'), ('bbb'),('eee'),('mmm'),('ppp'); +select count(*) from t1 as w1 where w1.val in (select w2.val from t1 as w2 where w2.val like 'm%') and w1.val in (select w3.val from t1 as w3 where w3.val like 'e%'); +count(*) +0 +drop table t1; +create table t1 (id int not null, text varchar(20) not null default '', primary key (id)); +insert into t1 (id, text) values (1, 'text1'), (2, 'text2'), (3, 'text3'), (4, 'text4'), (5, 'text5'), (6, 'text6'), (7, 'text7'), (8, 'text8'), (9, 'text9'), (10, 'text10'), (11, 'text11'), (12, 'text12'); +select * from t1 where id not in (select id from t1 where id < 8); +id text +8 text8 +9 text9 +10 text10 +11 text11 +12 text12 +select * from t1 as tt where not exists (select id from t1 where id < 8 and (id = tt.id or id is null) having id is not null); +id text +8 text8 +9 text9 +10 text10 +11 text11 +12 text12 +explain extended select * from t1 where id not in (select id from t1 where id < 8); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 12 100.00 Using where +2 DEPENDENT SUBQUERY t1 unique_subquery PRIMARY PRIMARY 4 func 1 100.00 Using index; Using where +Warnings: +Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`text` AS `text` from `test`.`t1` where (not(<expr_cache><`test`.`t1`.`id`>(<in_optimizer>(`test`.`t1`.`id`,<exists>(<primary_index_lookup>(<cache>(`test`.`t1`.`id`) in t1 on PRIMARY where ((`test`.`t1`.`id` < 8) and (<cache>(`test`.`t1`.`id`) = `test`.`t1`.`id`)))))))) +explain extended select * from t1 as tt where not exists (select id from t1 where id < 8 and (id = tt.id or id is null) having id is not null); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY tt ALL NULL NULL NULL NULL 12 100.00 Using where +2 DEPENDENT SUBQUERY t1 eq_ref PRIMARY PRIMARY 4 test.tt.id 1 100.00 Using where; Using index +Warnings: +Note 1276 Field or reference 'test.tt.id' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`tt`.`id` AS `id`,`test`.`tt`.`text` AS `text` from `test`.`t1` `tt` where (not(<expr_cache><`test`.`tt`.`id`>(exists(select `test`.`t1`.`id` from `test`.`t1` where ((`test`.`t1`.`id` < 8) and (`test`.`t1`.`id` = `test`.`tt`.`id`)) having (`test`.`t1`.`id` is not null))))) +insert into t1 (id, text) values (1000, 'text1000'), (1001, 'text1001'); +create table t2 (id int not null, text varchar(20) not null default '', primary key (id)); +insert into t2 (id, text) values (1, 'text1'), (2, 'text2'), (3, 'text3'), (4, 'text4'), (5, 'text5'), (6, 'text6'), (7, 'text7'), (8, 'text8'), (9, 'text9'), (10, 'text10'), (11, 'text1'), (12, 'text2'), (13, 'text3'), (14, 'text4'), (15, 'text5'), (16, 'text6'), (17, 'text7'), (18, 'text8'), (19, 'text9'), (20, 'text10'),(21, 'text1'), (22, 'text2'), (23, 'text3'), (24, 'text4'), (25, 'text5'), (26, 'text6'), (27, 'text7'), (28, 'text8'), (29, 'text9'), (30, 'text10'), (31, 'text1'), (32, 'text2'), (33, 'text3'), (34, 'text4'), (35, 'text5'), (36, 'text6'), (37, 'text7'), (38, 'text8'), (39, 'text9'), (40, 'text10'), (41, 'text1'), (42, 'text2'), (43, 'text3'), (44, 'text4'), (45, 'text5'), (46, 'text6'), (47, 'text7'), (48, 'text8'), (49, 'text9'), (50, 'text10'); +select * from t1 a left join t2 b on (a.id=b.id or b.id is null) join t1 c on (if(isnull(b.id), 1000, b.id)=c.id); +id text id text id text +1 text1 1 text1 1 text1 +2 text2 2 text2 2 text2 +3 text3 3 text3 3 text3 +4 text4 4 text4 4 text4 +5 text5 5 text5 5 text5 +6 text6 6 text6 6 text6 +7 text7 7 text7 7 text7 +8 text8 8 text8 8 text8 +9 text9 9 text9 9 text9 +10 text10 10 text10 10 text10 +11 text11 11 text1 11 text11 +12 text12 12 text2 12 text12 +1000 text1000 NULL NULL 1000 text1000 +1001 text1001 NULL NULL 1000 text1000 +explain extended select * from t1 a left join t2 b on (a.id=b.id or b.id is null) join t1 c on (if(isnull(b.id), 1000, b.id)=c.id); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE a ALL NULL NULL NULL NULL 14 100.00 +1 SIMPLE b eq_ref PRIMARY PRIMARY 4 test.a.id 2 100.00 +1 SIMPLE c eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using index condition +Warnings: +Note 1003 select `test`.`a`.`id` AS `id`,`test`.`a`.`text` AS `text`,`test`.`b`.`id` AS `id`,`test`.`b`.`text` AS `text`,`test`.`c`.`id` AS `id`,`test`.`c`.`text` AS `text` from `test`.`t1` `a` left join `test`.`t2` `b` on(((`test`.`b`.`id` = `test`.`a`.`id`) or isnull(`test`.`b`.`id`))) join `test`.`t1` `c` where (if(isnull(`test`.`b`.`id`),1000,`test`.`b`.`id`) = `test`.`c`.`id`) +drop table t1,t2; +create table t1 (a int); +insert into t1 values (1); +explain select benchmark(1000, (select a from t1 where a=sha(rand()))); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 1 +drop table t1; +create table t1(id int); +create table t2(id int); +create table t3(flag int); +select (select * from t3 where id not null) from t1, t2; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'null) from t1, t2' at line 1 +drop table t1,t2,t3; +CREATE TABLE t1 (id INT); +CREATE TABLE t2 (id INT); +INSERT INTO t1 VALUES (1), (2); +INSERT INTO t2 VALUES (1); +SELECT t1.id, ( SELECT COUNT(t.id) FROM t2 AS t WHERE t.id = t1.id ) AS c FROM t1 LEFT JOIN t2 USING (id); +id c +1 1 +2 0 +SELECT id, ( SELECT COUNT(t.id) FROM t2 AS t WHERE t.id = t1.id ) AS c FROM t1 LEFT JOIN t2 USING (id); +id c +1 1 +2 0 +SELECT t1.id, ( SELECT COUNT(t.id) FROM t2 AS t WHERE t.id = t1.id ) AS c FROM t1 LEFT JOIN t2 USING (id) ORDER BY t1.id; +id c +1 1 +2 0 +SELECT id, ( SELECT COUNT(t.id) FROM t2 AS t WHERE t.id = t1.id ) AS c FROM t1 LEFT JOIN t2 USING (id) ORDER BY id; +id c +1 1 +2 0 +DROP TABLE t1,t2; +CREATE TABLE t1 ( a int, b int ); +INSERT INTO t1 VALUES (1,1),(2,2),(3,3); +SELECT a FROM t1 WHERE a > ANY ( SELECT a FROM t1 WHERE b = 2 ); +a +3 +SELECT a FROM t1 WHERE a < ANY ( SELECT a FROM t1 WHERE b = 2 ); +a +1 +SELECT a FROM t1 WHERE a = ANY ( SELECT a FROM t1 WHERE b = 2 ); +a +2 +SELECT a FROM t1 WHERE a >= ANY ( SELECT a FROM t1 WHERE b = 2 ); +a +2 +3 +SELECT a FROM t1 WHERE a <= ANY ( SELECT a FROM t1 WHERE b = 2 ); +a +1 +2 +SELECT a FROM t1 WHERE a <> ANY ( SELECT a FROM t1 WHERE b = 2 ); +a +1 +3 +SELECT a FROM t1 WHERE a > ALL ( SELECT a FROM t1 WHERE b = 2 ); +a +3 +SELECT a FROM t1 WHERE a < ALL ( SELECT a FROM t1 WHERE b = 2 ); +a +1 +SELECT a FROM t1 WHERE a = ALL ( SELECT a FROM t1 WHERE b = 2 ); +a +2 +SELECT a FROM t1 WHERE a >= ALL ( SELECT a FROM t1 WHERE b = 2 ); +a +2 +3 +SELECT a FROM t1 WHERE a <= ALL ( SELECT a FROM t1 WHERE b = 2 ); +a +1 +2 +SELECT a FROM t1 WHERE a <> ALL ( SELECT a FROM t1 WHERE b = 2 ); +a +1 +3 +ALTER TABLE t1 ADD INDEX (a); +SELECT a FROM t1 WHERE a > ANY ( SELECT a FROM t1 WHERE b = 2 ); +a +3 +SELECT a FROM t1 WHERE a < ANY ( SELECT a FROM t1 WHERE b = 2 ); +a +1 +SELECT a FROM t1 WHERE a = ANY ( SELECT a FROM t1 WHERE b = 2 ); +a +2 +SELECT a FROM t1 WHERE a >= ANY ( SELECT a FROM t1 WHERE b = 2 ); +a +2 +3 +SELECT a FROM t1 WHERE a <= ANY ( SELECT a FROM t1 WHERE b = 2 ); +a +1 +2 +SELECT a FROM t1 WHERE a <> ANY ( SELECT a FROM t1 WHERE b = 2 ); +a +1 +3 +SELECT a FROM t1 WHERE a > ALL ( SELECT a FROM t1 WHERE b = 2 ); +a +3 +SELECT a FROM t1 WHERE a < ALL ( SELECT a FROM t1 WHERE b = 2 ); +a +1 +SELECT a FROM t1 WHERE a = ALL ( SELECT a FROM t1 WHERE b = 2 ); +a +2 +SELECT a FROM t1 WHERE a >= ALL ( SELECT a FROM t1 WHERE b = 2 ); +a +2 +3 +SELECT a FROM t1 WHERE a <= ALL ( SELECT a FROM t1 WHERE b = 2 ); +a +1 +2 +SELECT a FROM t1 WHERE a <> ALL ( SELECT a FROM t1 WHERE b = 2 ); +a +1 +3 +SELECT a FROM t1 WHERE a > ANY (SELECT a FROM t1 HAVING a = 2); +a +3 +SELECT a FROM t1 WHERE a < ANY (SELECT a FROM t1 HAVING a = 2); +a +1 +SELECT a FROM t1 WHERE a = ANY (SELECT a FROM t1 HAVING a = 2); +a +2 +SELECT a FROM t1 WHERE a >= ANY (SELECT a FROM t1 HAVING a = 2); +a +2 +3 +SELECT a FROM t1 WHERE a <= ANY (SELECT a FROM t1 HAVING a = 2); +a +1 +2 +SELECT a FROM t1 WHERE a <> ANY (SELECT a FROM t1 HAVING a = 2); +a +1 +3 +SELECT a FROM t1 WHERE a > ALL (SELECT a FROM t1 HAVING a = 2); +a +3 +SELECT a FROM t1 WHERE a < ALL (SELECT a FROM t1 HAVING a = 2); +a +1 +SELECT a FROM t1 WHERE a = ALL (SELECT a FROM t1 HAVING a = 2); +a +2 +SELECT a FROM t1 WHERE a >= ALL (SELECT a FROM t1 HAVING a = 2); +a +2 +3 +SELECT a FROM t1 WHERE a <= ALL (SELECT a FROM t1 HAVING a = 2); +a +1 +2 +SELECT a FROM t1 WHERE a <> ALL (SELECT a FROM t1 HAVING a = 2); +a +1 +3 +SELECT a FROM t1 WHERE a > ANY (SELECT a FROM t1 WHERE b = 2 UNION SELECT a FROM t1 WHERE b = 2); +a +3 +SELECT a FROM t1 WHERE a < ANY (SELECT a FROM t1 WHERE b = 2 UNION SELECT a FROM t1 WHERE b = 2); +a +1 +SELECT a FROM t1 WHERE a = ANY (SELECT a FROM t1 WHERE b = 2 UNION SELECT a FROM t1 WHERE b = 2); +a +2 +SELECT a FROM t1 WHERE a >= ANY (SELECT a FROM t1 WHERE b = 2 UNION SELECT a FROM t1 WHERE b = 2); +a +2 +3 +SELECT a FROM t1 WHERE a <= ANY (SELECT a FROM t1 WHERE b = 2 UNION SELECT a FROM t1 WHERE b = 2); +a +1 +2 +SELECT a FROM t1 WHERE a <> ANY (SELECT a FROM t1 WHERE b = 2 UNION SELECT a FROM t1 WHERE b = 2); +a +1 +3 +SELECT a FROM t1 WHERE a > ALL (SELECT a FROM t1 WHERE b = 2 UNION SELECT a FROM t1 WHERE b = 2); +a +3 +SELECT a FROM t1 WHERE a < ALL (SELECT a FROM t1 WHERE b = 2 UNION SELECT a FROM t1 WHERE b = 2); +a +1 +SELECT a FROM t1 WHERE a = ALL (SELECT a FROM t1 WHERE b = 2 UNION SELECT a FROM t1 WHERE b = 2); +a +2 +SELECT a FROM t1 WHERE a >= ALL (SELECT a FROM t1 WHERE b = 2 UNION SELECT a FROM t1 WHERE b = 2); +a +2 +3 +SELECT a FROM t1 WHERE a <= ALL (SELECT a FROM t1 WHERE b = 2 UNION SELECT a FROM t1 WHERE b = 2); +a +1 +2 +SELECT a FROM t1 WHERE a <> ALL (SELECT a FROM t1 WHERE b = 2 UNION SELECT a FROM t1 WHERE b = 2); +a +1 +3 +SELECT a FROM t1 WHERE a > ANY (SELECT a FROM t1 HAVING a = 2 UNION SELECT a FROM t1 HAVING a = 2); +a +3 +SELECT a FROM t1 WHERE a < ANY (SELECT a FROM t1 HAVING a = 2 UNION SELECT a FROM t1 HAVING a = 2); +a +1 +SELECT a FROM t1 WHERE a = ANY (SELECT a FROM t1 HAVING a = 2 UNION SELECT a FROM t1 HAVING a = 2); +a +2 +SELECT a FROM t1 WHERE a >= ANY (SELECT a FROM t1 HAVING a = 2 UNION SELECT a FROM t1 HAVING a = 2); +a +2 +3 +SELECT a FROM t1 WHERE a <= ANY (SELECT a FROM t1 HAVING a = 2 UNION SELECT a FROM t1 HAVING a = 2); +a +1 +2 +SELECT a FROM t1 WHERE a <> ANY (SELECT a FROM t1 HAVING a = 2 UNION SELECT a FROM t1 HAVING a = 2); +a +1 +3 +SELECT a FROM t1 WHERE a > ALL (SELECT a FROM t1 HAVING a = 2 UNION SELECT a FROM t1 HAVING a = 2); +a +3 +SELECT a FROM t1 WHERE a < ALL (SELECT a FROM t1 HAVING a = 2 UNION SELECT a FROM t1 HAVING a = 2); +a +1 +SELECT a FROM t1 WHERE a = ALL (SELECT a FROM t1 HAVING a = 2 UNION SELECT a FROM t1 HAVING a = 2); +a +2 +SELECT a FROM t1 WHERE a >= ALL (SELECT a FROM t1 HAVING a = 2 UNION SELECT a FROM t1 HAVING a = 2); +a +2 +3 +SELECT a FROM t1 WHERE a <= ALL (SELECT a FROM t1 HAVING a = 2 UNION SELECT a FROM t1 HAVING a = 2); +a +1 +2 +SELECT a FROM t1 WHERE a <> ALL (SELECT a FROM t1 HAVING a = 2 UNION SELECT a FROM t1 HAVING a = 2); +a +1 +3 +SELECT a FROM t1 WHERE (1,2) > ANY (SELECT a FROM t1 WHERE b = 2); +ERROR 21000: Operand should contain 1 column(s) +SELECT a FROM t1 WHERE a > ANY (SELECT a,2 FROM t1 WHERE b = 2); +ERROR 21000: Operand should contain 1 column(s) +SELECT a FROM t1 WHERE (1,2) > ANY (SELECT a,2 FROM t1 WHERE b = 2); +ERROR 21000: Operand should contain 1 column(s) +SELECT a FROM t1 WHERE (1,2) > ALL (SELECT a FROM t1 WHERE b = 2); +ERROR 21000: Operand should contain 1 column(s) +SELECT a FROM t1 WHERE a > ALL (SELECT a,2 FROM t1 WHERE b = 2); +ERROR 21000: Operand should contain 1 column(s) +SELECT a FROM t1 WHERE (1,2) > ALL (SELECT a,2 FROM t1 WHERE b = 2); +ERROR 21000: Operand should contain 1 column(s) +SELECT a FROM t1 WHERE (1,2) = ALL (SELECT a,2 FROM t1 WHERE b = 2); +ERROR 21000: Operand should contain 1 column(s) +SELECT a FROM t1 WHERE (1,2) <> ANY (SELECT a,2 FROM t1 WHERE b = 2); +ERROR 21000: Operand should contain 1 column(s) +SELECT a FROM t1 WHERE (1,2) = ANY (SELECT a FROM t1 WHERE b = 2); +ERROR 21000: Operand should contain 2 column(s) +SELECT a FROM t1 WHERE a = ANY (SELECT a,2 FROM t1 WHERE b = 2); +ERROR 21000: Operand should contain 1 column(s) +SELECT a FROM t1 WHERE (1,2) = ANY (SELECT a,2 FROM t1 WHERE b = 2); +a +SELECT a FROM t1 WHERE (1,2) <> ALL (SELECT a FROM t1 WHERE b = 2); +ERROR 21000: Operand should contain 2 column(s) +SELECT a FROM t1 WHERE a <> ALL (SELECT a,2 FROM t1 WHERE b = 2); +ERROR 21000: Operand should contain 1 column(s) +SELECT a FROM t1 WHERE (1,2) <> ALL (SELECT a,2 FROM t1 WHERE b = 2); +a +1 +2 +3 +SELECT a FROM t1 WHERE (a,1) = ANY (SELECT a,1 FROM t1 WHERE b = 2); +a +2 +SELECT a FROM t1 WHERE (a,1) <> ALL (SELECT a,1 FROM t1 WHERE b = 2); +a +1 +3 +SELECT a FROM t1 WHERE (a,1) = ANY (SELECT a,1 FROM t1 HAVING a = 2); +a +2 +SELECT a FROM t1 WHERE (a,1) <> ALL (SELECT a,1 FROM t1 HAVING a = 2); +a +1 +3 +SELECT a FROM t1 WHERE (a,1) = ANY (SELECT a,1 FROM t1 WHERE b = 2 UNION SELECT a,1 FROM t1 WHERE b = 2); +a +2 +SELECT a FROM t1 WHERE (a,1) <> ALL (SELECT a,1 FROM t1 WHERE b = 2 UNION SELECT a,1 FROM t1 WHERE b = 2); +a +1 +3 +SELECT a FROM t1 WHERE (a,1) = ANY (SELECT a,1 FROM t1 HAVING a = 2 UNION SELECT a,1 FROM t1 HAVING a = 2); +a +2 +SELECT a FROM t1 WHERE (a,1) <> ALL (SELECT a,1 FROM t1 HAVING a = 2 UNION SELECT a,1 FROM t1 HAVING a = 2); +a +1 +3 +SELECT a FROM t1 WHERE a > ANY (SELECT a FROM t1 WHERE b = 2 group by a); +a +3 +SELECT a FROM t1 WHERE a < ANY (SELECT a FROM t1 WHERE b = 2 group by a); +a +1 +SELECT a FROM t1 WHERE a = ANY (SELECT a FROM t1 WHERE b = 2 group by a); +a +2 +SELECT a FROM t1 WHERE a >= ANY (SELECT a FROM t1 WHERE b = 2 group by a); +a +2 +3 +SELECT a FROM t1 WHERE a <= ANY (SELECT a FROM t1 WHERE b = 2 group by a); +a +1 +2 +SELECT a FROM t1 WHERE a <> ANY (SELECT a FROM t1 WHERE b = 2 group by a); +a +1 +3 +SELECT a FROM t1 WHERE a > ALL (SELECT a FROM t1 WHERE b = 2 group by a); +a +3 +SELECT a FROM t1 WHERE a < ALL (SELECT a FROM t1 WHERE b = 2 group by a); +a +1 +SELECT a FROM t1 WHERE a = ALL (SELECT a FROM t1 WHERE b = 2 group by a); +a +2 +SELECT a FROM t1 WHERE a >= ALL (SELECT a FROM t1 WHERE b = 2 group by a); +a +2 +3 +SELECT a FROM t1 WHERE a <= ALL (SELECT a FROM t1 WHERE b = 2 group by a); +a +1 +2 +SELECT a FROM t1 WHERE a <> ALL (SELECT a FROM t1 WHERE b = 2 group by a); +a +1 +3 +SELECT a FROM t1 WHERE a > ANY (SELECT a FROM t1 group by a HAVING a = 2); +a +3 +SELECT a FROM t1 WHERE a < ANY (SELECT a FROM t1 group by a HAVING a = 2); +a +1 +SELECT a FROM t1 WHERE a = ANY (SELECT a FROM t1 group by a HAVING a = 2); +a +2 +SELECT a FROM t1 WHERE a >= ANY (SELECT a FROM t1 group by a HAVING a = 2); +a +2 +3 +SELECT a FROM t1 WHERE a <= ANY (SELECT a FROM t1 group by a HAVING a = 2); +a +1 +2 +SELECT a FROM t1 WHERE a <> ANY (SELECT a FROM t1 group by a HAVING a = 2); +a +1 +3 +SELECT a FROM t1 WHERE a > ALL (SELECT a FROM t1 group by a HAVING a = 2); +a +3 +SELECT a FROM t1 WHERE a < ALL (SELECT a FROM t1 group by a HAVING a = 2); +a +1 +SELECT a FROM t1 WHERE a = ALL (SELECT a FROM t1 group by a HAVING a = 2); +a +2 +SELECT a FROM t1 WHERE a >= ALL (SELECT a FROM t1 group by a HAVING a = 2); +a +2 +3 +SELECT a FROM t1 WHERE a <= ALL (SELECT a FROM t1 group by a HAVING a = 2); +a +1 +2 +SELECT a FROM t1 WHERE a <> ALL (SELECT a FROM t1 group by a HAVING a = 2); +a +1 +3 +SELECT concat(EXISTS(SELECT a FROM t1 WHERE b = 2 and a.a > t1.a), '-') from t1 a; +concat(EXISTS(SELECT a FROM t1 WHERE b = 2 and a.a > t1.a), '-') +0- +0- +1- +SELECT concat(EXISTS(SELECT a FROM t1 WHERE b = 2 and a.a < t1.a), '-') from t1 a; +concat(EXISTS(SELECT a FROM t1 WHERE b = 2 and a.a < t1.a), '-') +1- +0- +0- +SELECT concat(EXISTS(SELECT a FROM t1 WHERE b = 2 and a.a = t1.a), '-') from t1 a; +concat(EXISTS(SELECT a FROM t1 WHERE b = 2 and a.a = t1.a), '-') +0- +1- +0- +DROP TABLE t1; +CREATE TABLE t1 ( a double, b double ); +INSERT INTO t1 VALUES (1,1),(2,2),(3,3); +SELECT a FROM t1 WHERE a > ANY (SELECT a FROM t1 WHERE b = 2e0); +a +3 +SELECT a FROM t1 WHERE a < ANY (SELECT a FROM t1 WHERE b = 2e0); +a +1 +SELECT a FROM t1 WHERE a = ANY (SELECT a FROM t1 WHERE b = 2e0); +a +2 +SELECT a FROM t1 WHERE a >= ANY (SELECT a FROM t1 WHERE b = 2e0); +a +2 +3 +SELECT a FROM t1 WHERE a <= ANY (SELECT a FROM t1 WHERE b = 2e0); +a +1 +2 +SELECT a FROM t1 WHERE a <> ANY (SELECT a FROM t1 WHERE b = 2e0); +a +1 +3 +SELECT a FROM t1 WHERE a > ALL (SELECT a FROM t1 WHERE b = 2e0); +a +3 +SELECT a FROM t1 WHERE a < ALL (SELECT a FROM t1 WHERE b = 2e0); +a +1 +SELECT a FROM t1 WHERE a = ALL (SELECT a FROM t1 WHERE b = 2e0); +a +2 +SELECT a FROM t1 WHERE a >= ALL (SELECT a FROM t1 WHERE b = 2e0); +a +2 +3 +SELECT a FROM t1 WHERE a <= ALL (SELECT a FROM t1 WHERE b = 2e0); +a +1 +2 +SELECT a FROM t1 WHERE a <> ALL (SELECT a FROM t1 WHERE b = 2e0); +a +1 +3 +DROP TABLE t1; +CREATE TABLE t1 ( a char(1), b char(1)); +INSERT INTO t1 VALUES ('1','1'),('2','2'),('3','3'); +SELECT a FROM t1 WHERE a > ANY (SELECT a FROM t1 WHERE b = '2'); +a +3 +SELECT a FROM t1 WHERE a < ANY (SELECT a FROM t1 WHERE b = '2'); +a +1 +SELECT a FROM t1 WHERE a = ANY (SELECT a FROM t1 WHERE b = '2'); +a +2 +SELECT a FROM t1 WHERE a >= ANY (SELECT a FROM t1 WHERE b = '2'); +a +2 +3 +SELECT a FROM t1 WHERE a <= ANY (SELECT a FROM t1 WHERE b = '2'); +a +1 +2 +SELECT a FROM t1 WHERE a <> ANY (SELECT a FROM t1 WHERE b = '2'); +a +1 +3 +SELECT a FROM t1 WHERE a > ALL (SELECT a FROM t1 WHERE b = '2'); +a +3 +SELECT a FROM t1 WHERE a < ALL (SELECT a FROM t1 WHERE b = '2'); +a +1 +SELECT a FROM t1 WHERE a = ALL (SELECT a FROM t1 WHERE b = '2'); +a +2 +SELECT a FROM t1 WHERE a >= ALL (SELECT a FROM t1 WHERE b = '2'); +a +2 +3 +SELECT a FROM t1 WHERE a <= ALL (SELECT a FROM t1 WHERE b = '2'); +a +1 +2 +SELECT a FROM t1 WHERE a <> ALL (SELECT a FROM t1 WHERE b = '2'); +a +1 +3 +DROP TABLE t1; +create table t1 (a int, b int); +insert into t1 values (1,2),(3,4); +select * from t1 up where exists (select * from t1 where t1.a=up.a); +a b +1 2 +3 4 +explain extended select * from t1 up where exists (select * from t1 where t1.a=up.a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY up ALL NULL NULL NULL NULL 2 100.00 Using where +2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.up.a' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`up`.`a` AS `a`,`test`.`up`.`b` AS `b` from `test`.`t1` `up` where <expr_cache><`test`.`up`.`a`>(exists(select 1 from `test`.`t1` where (`test`.`t1`.`a` = `test`.`up`.`a`))) +drop table t1; +CREATE TABLE t1 (t1_a int); +INSERT INTO t1 VALUES (1); +CREATE TABLE t2 (t2_a int, t2_b int, PRIMARY KEY (t2_a, t2_b)); +INSERT INTO t2 VALUES (1, 1), (1, 2); +SELECT * FROM t1, t2 table2 WHERE t1_a = 1 AND table2.t2_a = 1 +HAVING table2.t2_b = (SELECT MAX(t2_b) FROM t2 WHERE t2_a = table2.t2_a); +t1_a t2_a t2_b +1 1 2 +DROP TABLE t1, t2; +CREATE TABLE t1 (id int(11) default NULL,name varchar(10) default NULL); +INSERT INTO t1 VALUES (1,'Tim'),(2,'Rebecca'),(3,NULL); +CREATE TABLE t2 (id int(11) default NULL, pet varchar(10) default NULL); +INSERT INTO t2 VALUES (1,'Fido'),(2,'Spot'),(3,'Felix'); +SELECT a.*, b.* FROM (SELECT * FROM t1) AS a JOIN t2 as b on a.id=b.id; +id name id pet +1 Tim 1 Fido +2 Rebecca 2 Spot +3 NULL 3 Felix +drop table t1,t2; +CREATE TABLE t1 ( a int, b int ); +CREATE TABLE t2 ( c int, d int ); +INSERT INTO t1 VALUES (1,2), (2,3), (3,4); +SELECT a AS abc, b FROM t1 outr WHERE b = +(SELECT MIN(b) FROM t1 WHERE a=outr.a); +abc b +1 2 +2 3 +3 4 +INSERT INTO t2 SELECT a AS abc, b FROM t1 outr WHERE b = +(SELECT MIN(b) FROM t1 WHERE a=outr.a); +select * from t2; +c d +1 2 +2 3 +3 4 +CREATE TABLE t3 SELECT a AS abc, b FROM t1 outr WHERE b = +(SELECT MIN(b) FROM t1 WHERE a=outr.a); +select * from t3; +abc b +1 2 +2 3 +3 4 +prepare stmt1 from "INSERT INTO t2 SELECT a AS abc, b FROM t1 outr WHERE b = (SELECT MIN(b) FROM t1 WHERE a=outr.a);"; +execute stmt1; +deallocate prepare stmt1; +select * from t2; +c d +1 2 +2 3 +3 4 +1 2 +2 3 +3 4 +drop table t3; +prepare stmt1 from "CREATE TABLE t3 SELECT a AS abc, b FROM t1 outr WHERE b = (SELECT MIN(b) FROM t1 WHERE a=outr.a);"; +execute stmt1; +select * from t3; +abc b +1 2 +2 3 +3 4 +deallocate prepare stmt1; +DROP TABLE t1, t2, t3; +CREATE TABLE `t1` ( `a` int(11) default NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1; +insert into t1 values (1); +CREATE TABLE `t2` ( `b` int(11) default NULL, `a` int(11) default NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1; +insert into t2 values (1,2); +select t000.a, count(*) `C` FROM t1 t000 GROUP BY t000.a HAVING count(*) > ALL (SELECT count(*) FROM t2 t001 WHERE t001.a=1); +a C +1 1 +drop table t1,t2; +create table t1 (a int not null auto_increment primary key, b varchar(40), fulltext(b)); +insert into t1 (b) values ('ball'),('ball games'), ('games'), ('foo'), ('foobar'), ('Serg'), ('Sergei'),('Georg'), ('Patrik'),('Hakan'); +create table t2 (a int); +insert into t2 values (1),(3),(2),(7); +select a,b from t1 where match(b) against ('Ball') > 0; +a b +1 ball +2 ball games +select a from t2 where a in (select a from t1 where match(b) against ('Ball') > 0); +a +1 +2 +drop table t1,t2; +CREATE TABLE t1(`IZAVORGANG_ID` VARCHAR(11) CHARACTER SET latin1 COLLATE latin1_bin,`KUERZEL` VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_bin,`IZAANALYSEART_ID` VARCHAR(11) CHARACTER SET latin1 COLLATE latin1_bin,`IZAPMKZ_ID` VARCHAR(11) CHARACTER SET latin1 COLLATE latin1_bin); +CREATE INDEX AK01IZAVORGANG ON t1(izaAnalyseart_id,Kuerzel); +INSERT INTO t1(`IZAVORGANG_ID`,`KUERZEL`,`IZAANALYSEART_ID`,`IZAPMKZ_ID`)VALUES('D0000000001','601','D0000000001','I0000000001'); +INSERT INTO t1(`IZAVORGANG_ID`,`KUERZEL`,`IZAANALYSEART_ID`,`IZAPMKZ_ID`)VALUES('D0000000002','602','D0000000001','I0000000001'); +INSERT INTO t1(`IZAVORGANG_ID`,`KUERZEL`,`IZAANALYSEART_ID`,`IZAPMKZ_ID`)VALUES('D0000000003','603','D0000000001','I0000000001'); +INSERT INTO t1(`IZAVORGANG_ID`,`KUERZEL`,`IZAANALYSEART_ID`,`IZAPMKZ_ID`)VALUES('D0000000004','101','D0000000001','I0000000001'); +SELECT `IZAVORGANG_ID` FROM t1 WHERE `KUERZEL` IN(SELECT MIN(`KUERZEL`)`Feld1` FROM t1 WHERE `KUERZEL` LIKE'601%'And`IZAANALYSEART_ID`='D0000000001'); +IZAVORGANG_ID +D0000000001 +drop table t1; +CREATE TABLE `t1` ( `aid` int(11) NOT NULL default '0', `bid` int(11) NOT NULL default '0', PRIMARY KEY (`aid`,`bid`)); +CREATE TABLE `t2` ( `aid` int(11) NOT NULL default '0', `bid` int(11) NOT NULL default '0', PRIMARY KEY (`aid`,`bid`)); +insert into t1 values (1,1),(1,2),(2,1),(2,2); +insert into t2 values (1,2),(2,2); +select * from t1 where t1.aid not in (select aid from t2 where bid=t1.bid); +aid bid +1 1 +2 1 +alter table t2 drop primary key; +alter table t2 add key KEY1 (aid, bid); +select * from t1 where t1.aid not in (select aid from t2 where bid=t1.bid); +aid bid +1 1 +2 1 +alter table t2 drop key KEY1; +alter table t2 add primary key (bid, aid); +select * from t1 where t1.aid not in (select aid from t2 where bid=t1.bid); +aid bid +1 1 +2 1 +drop table t1,t2; +CREATE TABLE t1 (howmanyvalues bigint, avalue int); +INSERT INTO t1 VALUES (1, 1),(2, 1),(2, 2),(3, 1),(3, 2),(3, 3),(4, 1),(4, 2),(4, 3),(4, 4); +SELECT howmanyvalues, count(*) from t1 group by howmanyvalues; +howmanyvalues count(*) +1 1 +2 2 +3 3 +4 4 +SELECT a.howmanyvalues, (SELECT count(*) from t1 b where b.howmanyvalues = a.howmanyvalues) as mycount from t1 a group by a.howmanyvalues; +howmanyvalues mycount +1 1 +2 2 +3 3 +4 4 +CREATE INDEX t1_howmanyvalues_idx ON t1 (howmanyvalues); +SELECT a.howmanyvalues, (SELECT count(*) from t1 b where b.howmanyvalues+1 = a.howmanyvalues+1) as mycount from t1 a group by a.howmanyvalues; +howmanyvalues mycount +1 1 +2 2 +3 3 +4 4 +SELECT a.howmanyvalues, (SELECT count(*) from t1 b where b.howmanyvalues = a.howmanyvalues) as mycount from t1 a group by a.howmanyvalues; +howmanyvalues mycount +1 1 +2 2 +3 3 +4 4 +SELECT a.howmanyvalues, (SELECT count(*) from t1 b where b.howmanyvalues = a.avalue) as mycount from t1 a group by a.howmanyvalues; +howmanyvalues mycount +1 1 +2 1 +3 1 +4 1 +drop table t1; +create table t1 (x int); +select (select b.x from t1 as b where b.x=a.x) from t1 as a where a.x=2 group by a.x; +(select b.x from t1 as b where b.x=a.x) +drop table t1; +CREATE TABLE `t1` ( `master` int(10) unsigned NOT NULL default '0', `map` smallint(6) unsigned NOT NULL default '0', `slave` int(10) unsigned NOT NULL default '0', `access` int(10) unsigned NOT NULL default '0', UNIQUE KEY `access_u` (`master`,`map`,`slave`)); +INSERT INTO `t1` VALUES (1,0,0,700),(1,1,1,400),(1,5,5,400),(1,12,12,400),(1,12,32,400),(4,12,32,400); +CREATE TABLE `t2` ( `id` int(10) unsigned NOT NULL default '0', `pid` int(10) unsigned NOT NULL default '0', `map` smallint(6) unsigned NOT NULL default '0', `level` tinyint(4) unsigned NOT NULL default '0', `title` varchar(255) default NULL, PRIMARY KEY (`id`,`pid`,`map`), KEY `level` (`level`), KEY `id` (`id`,`map`)) ; +INSERT INTO `t2` VALUES (6,5,12,7,'a'),(12,0,0,7,'a'),(12,1,0,7,'a'),(12,5,5,7,'a'),(12,5,12,7,'a'); +SELECT b.sc FROM (SELECT (SELECT a.access FROM t1 a WHERE a.map = op.map AND a.slave = op.pid AND a.master = 1) ac FROM t2 op WHERE op.id = 12 AND op.map = 0) b; +ERROR 42S22: Unknown column 'b.sc' in 'field list' +SELECT b.ac FROM (SELECT (SELECT a.access FROM t1 a WHERE a.map = op.map AND a.slave = op.pid AND a.master = 1) ac FROM t2 op WHERE op.id = 12 AND op.map = 0) b; +ac +700 +NULL +drop tables t1,t2; +create table t1 (a int not null, b int not null, c int, primary key (a,b)); +insert into t1 values (1,1,1), (2,2,2), (3,3,3); +set @b:= 0; +explain select sum(a) from t1 where b > @b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL PRIMARY 8 NULL 3 Using where; Using index +set @a:= (select sum(a) from t1 where b > @b); +explain select a from t1 where c=2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +do @a:= (select sum(a) from t1 where b > @b); +explain select a from t1 where c=2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +drop table t1; +set @got_val= (SELECT 1 FROM (SELECT 'A' as my_col) as T1 ) ; +create table t1 (a int, b int); +create table t2 (a int, b int); +insert into t1 values (1,1),(1,2),(1,3),(2,4),(2,5); +insert into t2 values (1,3),(2,1); +select distinct a,b, (select max(b) from t2 where t1.b=t2.a) from t1 order by t1.b; +a b (select max(b) from t2 where t1.b=t2.a) +1 1 3 +1 2 1 +1 3 NULL +2 4 NULL +2 5 NULL +drop table t1, t2; +create table t1 (id int); +create table t2 (id int, body text, fulltext (body)); +insert into t1 values(1),(2),(3); +insert into t2 values (1,'test'), (2,'mysql'), (3,'test'), (4,'test'); +select count(distinct id) from t1 where id in (select id from t2 where match(body) against ('mysql' in boolean mode)); +count(distinct id) +1 +drop table t2,t1; +create table t1 (s1 int,s2 int); +insert into t1 values (20,15); +select * from t1 where (('a',null) <=> (select 'a',s2 from t1 where s1 = 0)); +s1 s2 +drop table t1; +create table t1 (s1 int); +insert into t1 values (1),(null); +select * from t1 where s1 < all (select s1 from t1); +s1 +select s1, s1 < all (select s1 from t1) from t1; +s1 s1 < all (select s1 from t1) +1 0 +NULL NULL +drop table t1; +CREATE TABLE t1 ( +Code char(3) NOT NULL default '', +Name char(52) NOT NULL default '', +Continent enum('Asia','Europe','North America','Africa','Oceania','Antarctica','South America') NOT NULL default 'Asia', +Region char(26) NOT NULL default '', +SurfaceArea float(10,2) NOT NULL default '0.00', +IndepYear smallint(6) default NULL, +Population int(11) NOT NULL default '0', +LifeExpectancy float(3,1) default NULL, +GNP float(10,2) default NULL, +GNPOld float(10,2) default NULL, +LocalName char(45) NOT NULL default '', +GovernmentForm char(45) NOT NULL default '', +HeadOfState char(60) default NULL, +Capital int(11) default NULL, +Code2 char(2) NOT NULL default '' +) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('XXX','Xxxxx','Oceania','Xxxxxx',26.00,0,0,0,0,0,'Xxxxx','Xxxxx','Xxxxx',NULL,'XX'); +INSERT INTO t1 VALUES ('ASM','American Samoa','Oceania','Polynesia',199.00,0,68000,75.1,334.00,NULL,'Amerika Samoa','US Territory','George W. Bush',54,'AS'); +INSERT INTO t1 VALUES ('ATF','French Southern territories','Antarctica','Antarctica',7780.00,0,0,NULL,0.00,NULL,'Terres australes françaises','Nonmetropolitan Territory of France','Jacques Chirac',NULL,'TF'); +INSERT INTO t1 VALUES ('UMI','United States Minor Outlying Islands','Oceania','Micronesia/Caribbean',16.00,0,0,NULL,0.00,NULL,'United States Minor Outlying Islands','Dependent Territory of the US','George W. Bush',NULL,'UM'); +/*!40000 ALTER TABLE t1 ENABLE KEYS */; +SELECT DISTINCT Continent AS c FROM t1 outr WHERE +Code <> SOME ( SELECT Code FROM t1 WHERE Continent = outr.Continent AND +Population < 200); +c +Oceania +drop table t1; +create table t1 (a1 int); +create table t2 (b1 int); +select * from t1 where a2 > any(select b1 from t2); +ERROR 42S22: Unknown column 'a2' in 'IN/ALL/ANY subquery' +select * from t1 where a1 > any(select b1 from t2); +a1 +drop table t1,t2; +create table t1 (a integer, b integer); +select (select * from t1) = (select 1,2); +(select * from t1) = (select 1,2) +NULL +select (select 1,2) = (select * from t1); +(select 1,2) = (select * from t1) +NULL +select row(1,2) = ANY (select * from t1); +row(1,2) = ANY (select * from t1) +0 +select row(1,2) != ALL (select * from t1); +row(1,2) != ALL (select * from t1) +1 +drop table t1; +create table t1 (a integer, b integer); +select row(1,(2,2)) in (select * from t1 ); +ERROR 21000: Operand should contain 2 column(s) +select row(1,(2,2)) = (select * from t1 ); +ERROR 21000: Operand should contain 2 column(s) +select (select * from t1) = row(1,(2,2)); +ERROR 21000: Operand should contain 1 column(s) +drop table t1; +create table t1 (a integer); +insert into t1 values (1); +select 1 = ALL (select 1 from t1 where 1 = xx ), 1 as xx ; +ERROR 42S22: Reference 'xx' not supported (forward reference in item list) +select 1 = ALL (select 1 from t1 where 1 = xx ), 1 as xx; +ERROR 42S22: Reference 'xx' not supported (forward reference in item list) +select 1 as xx, 1 = ALL ( select 1 from t1 where 1 = xx ); +xx 1 = ALL ( select 1 from t1 where 1 = xx ) +1 1 +select 1 = ALL (select 1 from t1 where 1 = xx ), 1 as xx; +ERROR 42S22: Reference 'xx' not supported (forward reference in item list) +select 1 = ALL (select 1 from t1 where 1 = xx ), 1 as xx from DUAL; +ERROR 42S22: Reference 'xx' not supported (forward reference in item list) +drop table t1; +CREATE TABLE t1 ( +categoryId int(11) NOT NULL, +courseId int(11) NOT NULL, +startDate datetime NOT NULL, +endDate datetime NOT NULL, +createDate datetime NOT NULL, +modifyDate timestamp NOT NULL, +attributes text NOT NULL +); +INSERT INTO t1 VALUES (1,41,'2004-02-09','2010-01-01','2004-02-09','2004-02-09',''), +(1,86,'2004-08-16','2004-08-16','2004-08-16','2004-08-16',''), +(1,87,'2004-08-16','2004-08-16','2004-08-16','2004-08-16',''), +(2,52,'2004-03-15','2004-10-01','2004-03-15','2004-09-17',''), +(2,53,'2004-03-16','2004-10-01','2004-03-16','2004-09-17',''), +(2,88,'2004-08-16','2004-08-16','2004-08-16','2004-08-16',''), +(2,89,'2004-08-16','2004-08-16','2004-08-16','2004-08-16',''), +(3,51,'2004-02-09','2010-01-01','2004-02-09','2004-02-09',''), +(5,12,'2004-02-18','2010-01-01','2004-02-18','2004-02-18',''); +CREATE TABLE t2 ( +userId int(11) NOT NULL, +courseId int(11) NOT NULL, +date datetime NOT NULL +); +INSERT INTO t2 VALUES (5141,71,'2003-11-18'), +(5141,72,'2003-11-25'),(5141,41,'2004-08-06'), +(5141,52,'2004-08-06'),(5141,53,'2004-08-06'), +(5141,12,'2004-08-06'),(5141,86,'2004-10-21'), +(5141,87,'2004-10-21'),(5141,88,'2004-10-21'), +(5141,89,'2004-10-22'),(5141,51,'2004-10-26'); +CREATE TABLE t3 ( +groupId int(11) NOT NULL, +parentId int(11) NOT NULL, +startDate datetime NOT NULL, +endDate datetime NOT NULL, +createDate datetime NOT NULL, +modifyDate timestamp NOT NULL, +ordering int(11) +); +INSERT INTO t3 VALUES (12,9,'1000-01-01','3999-12-31','2004-01-29','2004-01-29',NULL); +CREATE TABLE t4 ( +id int(11) NOT NULL, +groupTypeId int(11) NOT NULL, +groupKey varchar(50) NOT NULL, +name text, +ordering int(11), +description text, +createDate datetime NOT NULL, +modifyDate timestamp NOT NULL +); +INSERT INTO t4 VALUES (9,5,'stationer','stationer',0,'Stationer','2004-01-29','2004-01-29'), +(12,5,'group2','group2',0,'group2','2004-01-29','2004-01-29'); +CREATE TABLE t5 ( +userId int(11) NOT NULL, +groupId int(11) NOT NULL, +createDate datetime NOT NULL, +modifyDate timestamp NOT NULL +); +INSERT INTO t5 VALUES (5141,12,'2004-08-06','2004-08-06'); +select +count(distinct t2.userid) pass, +groupstuff.*, +count(t2.courseid) crse, +t1.categoryid, +t2.courseid, +date_format(date, '%b%y') as colhead +from t2 +join t1 on t2.courseid=t1.courseid +join +( +select +t5.userid, +parentid, +parentgroup, +childid, +groupname, +grouptypeid +from t5 +join +( +select t4.id as parentid, +t4.name as parentgroup, +t4.id as childid, +t4.name as groupname, +t4.grouptypeid +from t4 +) as gin on t5.groupid=gin.childid +) as groupstuff on t2.userid = groupstuff.userid +group by +groupstuff.groupname, colhead , t2.courseid; +pass userid parentid parentgroup childid groupname grouptypeid crse categoryid courseid colhead +1 5141 12 group2 12 group2 5 1 5 12 Aug04 +1 5141 12 group2 12 group2 5 1 1 41 Aug04 +1 5141 12 group2 12 group2 5 1 2 52 Aug04 +1 5141 12 group2 12 group2 5 1 2 53 Aug04 +1 5141 12 group2 12 group2 5 1 3 51 Oct04 +1 5141 12 group2 12 group2 5 1 1 86 Oct04 +1 5141 12 group2 12 group2 5 1 1 87 Oct04 +1 5141 12 group2 12 group2 5 1 2 88 Oct04 +1 5141 12 group2 12 group2 5 1 2 89 Oct04 +drop table t1, t2, t3, t4, t5; +create table t1 (a int); +insert into t1 values (1), (2), (3); +SELECT 1 FROM t1 WHERE (SELECT 1) in (SELECT 1); +1 +1 +1 +1 +drop table t1; +create table t1 (a int); +create table t2 (a int); +insert into t1 values (1),(2); +insert into t2 values (0),(1),(2),(3); +select a from t2 where a in (select a from t1); +a +1 +2 +select a from t2 having a in (select a from t1); +a +1 +2 +prepare stmt1 from "select a from t2 where a in (select a from t1)"; +execute stmt1; +a +1 +2 +execute stmt1; +a +1 +2 +deallocate prepare stmt1; +prepare stmt1 from "select a from t2 having a in (select a from t1)"; +execute stmt1; +a +1 +2 +execute stmt1; +a +1 +2 +deallocate prepare stmt1; +drop table t1, t2; +create table t1 (a int, b int); +insert into t1 values (1,2); +select 1 = (select * from t1); +ERROR 21000: Operand should contain 1 column(s) +select (select * from t1) = 1; +ERROR 21000: Operand should contain 2 column(s) +select (1,2) = (select a from t1); +ERROR 21000: Operand should contain 2 column(s) +select (select a from t1) = (1,2); +ERROR 21000: Operand should contain 1 column(s) +select (1,2,3) = (select * from t1); +ERROR 21000: Operand should contain 3 column(s) +select (select * from t1) = (1,2,3); +ERROR 21000: Operand should contain 2 column(s) +drop table t1; +CREATE TABLE `t1` ( +`itemid` bigint(20) unsigned NOT NULL auto_increment, +`sessionid` bigint(20) unsigned default NULL, +`time` int(10) unsigned NOT NULL default '0', +`type` set('A','D','E','F','G','I','L','N','U') collate latin1_general_ci NOT +NULL default '', +`data` text collate latin1_general_ci NOT NULL, +PRIMARY KEY (`itemid`) +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +INSERT INTO `t1` VALUES (1, 1, 1, 'D', ''); +CREATE TABLE `t2` ( +`sessionid` bigint(20) unsigned NOT NULL auto_increment, +`pid` int(10) unsigned NOT NULL default '0', +`date` int(10) unsigned NOT NULL default '0', +`ip` varchar(15) collate latin1_general_ci NOT NULL default '', +PRIMARY KEY (`sessionid`) +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +INSERT INTO `t2` VALUES (1, 1, 1, '10.10.10.1'); +SELECT s.ip, count( e.itemid ) FROM `t1` e JOIN t2 s ON s.sessionid = e.sessionid WHERE e.sessionid = ( SELECT sessionid FROM t2 ORDER BY sessionid DESC LIMIT 1 ) GROUP BY s.ip HAVING count( e.itemid ) >0 LIMIT 0 , 30; +ip count( e.itemid ) +10.10.10.1 1 +drop tables t1,t2; +create table t1 (fld enum('0','1')); +insert into t1 values ('1'); +select * from (select max(fld) from t1) as foo; +max(fld) +1 +drop table t1; +set @tmp11867_optimizer_switch=@@optimizer_switch; +set optimizer_switch='semijoin_with_cache=off'; +CREATE TABLE t1 (one int, two int, flag char(1)); +CREATE TABLE t2 (one int, two int, flag char(1)); +INSERT INTO t1 VALUES(1,2,'Y'),(2,3,'Y'),(3,4,'Y'),(5,6,'N'),(7,8,'N'); +INSERT INTO t2 VALUES(1,2,'Y'),(2,3,'Y'),(3,4,'Y'),(5,6,'N'),(7,8,'N'); +SELECT * FROM t1 +WHERE ROW(one,two) IN (SELECT DISTINCT one,two FROM t2 WHERE flag = 'N'); +one two flag +5 6 N +7 8 N +SELECT * FROM t1 +WHERE ROW(one,two) IN (SELECT DISTINCT one,two FROM t1 WHERE flag = 'N'); +one two flag +5 6 N +7 8 N +insert into t2 values (null,null,'N'); +insert into t2 values (null,3,'0'); +insert into t2 values (null,5,'0'); +insert into t2 values (10,null,'0'); +insert into t1 values (10,3,'0'); +insert into t1 values (10,5,'0'); +insert into t1 values (10,10,'0'); +SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N') as 'test' from t1; +one two test +1 2 NULL +2 3 NULL +3 4 NULL +5 6 1 +7 8 1 +10 3 NULL +10 5 NULL +10 10 NULL +SELECT one,two from t1 where ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N'); +one two +5 6 +7 8 +SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N' group by one,two) as 'test' from t1; +one two test +1 2 NULL +2 3 NULL +3 4 NULL +5 6 1 +7 8 1 +10 3 NULL +10 5 NULL +10 10 NULL +SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = '0') as 'test' from t1; +one two test +1 2 0 +2 3 NULL +3 4 0 +5 6 0 +7 8 0 +10 3 NULL +10 5 NULL +10 10 NULL +SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = '0' group by one,two) as 'test' from t1; +one two test +1 2 0 +2 3 NULL +3 4 0 +5 6 0 +7 8 0 +10 3 NULL +10 5 NULL +10 10 NULL +explain extended SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = '0') as 'test' from t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00 +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 9 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<expr_cache><`test`.`t1`.`one`,`test`.`t1`.`two`>(<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`)))) and trigcond(trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`))))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`)))))) AS `test` from `test`.`t1` +explain extended SELECT one,two from t1 where ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N'); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func,func 1 100.00 +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 9 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two` from `test`.`t1` semi join (`test`.`t2`) where (`test`.`t2`.`flag` = 'N') +explain extended SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = '0' group by one,two) as 'test' from t1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00 +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 9 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<expr_cache><`test`.`t1`.`one`,`test`.`t1`.`two`>(<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`)))) and trigcond(trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`))))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`)))))) AS `test` from `test`.`t1` +DROP TABLE t1,t2; +set optimizer_switch=@tmp11867_optimizer_switch; +CREATE TABLE t1 (a char(5), b char(5)); +INSERT INTO t1 VALUES (NULL,'aaa'), ('aaa','aaa'); +SELECT * FROM t1 WHERE (a,b) IN (('aaa','aaa'), ('aaa','bbb')); +a b +aaa aaa +DROP TABLE t1; +CREATE TABLE t1 (a int); +CREATE TABLE t2 (a int, b int); +CREATE TABLE t3 (b int NOT NULL); +INSERT INTO t1 VALUES (1), (2), (3), (4); +INSERT INTO t2 VALUES (1,10), (3,30); +SELECT * FROM t2 LEFT JOIN t3 ON t2.b=t3.b +WHERE t3.b IS NOT NULL OR t2.a > 10; +a b b +SELECT * FROM t1 +WHERE t1.a NOT IN (SELECT a FROM t2 LEFT JOIN t3 ON t2.b=t3.b +WHERE t3.b IS NOT NULL OR t2.a > 10); +a +1 +2 +3 +4 +DROP TABLE t1,t2,t3; +CREATE TABLE t1 (f1 INT); +CREATE TABLE t2 (f2 INT); +INSERT INTO t1 VALUES (1); +SELECT * FROM t1 WHERE f1 > ALL (SELECT f2 FROM t2); +f1 +1 +SELECT * FROM t1 WHERE f1 > ALL (SELECT f2 FROM t2 WHERE 1=0); +f1 +1 +INSERT INTO t2 VALUES (1); +INSERT INTO t2 VALUES (2); +SELECT * FROM t1 WHERE f1 > ALL (SELECT f2 FROM t2 WHERE f2=0); +f1 +1 +DROP TABLE t1, t2; +select 1 from dual where 1 < any (select 2); +1 +1 +select 1 from dual where 1 < all (select 2); +1 +1 +select 1 from dual where 2 > any (select 1); +1 +1 +select 1 from dual where 2 > all (select 1); +1 +1 +select 1 from dual where 1 < any (select 2 from dual); +1 +1 +select 1 from dual where 1 < all (select 2 from dual where 1!=1); +1 +1 +create table t1 (s1 char); +insert into t1 values (1),(2); +select * from t1 where (s1 < any (select s1 from t1)); +s1 +1 +select * from t1 where not (s1 < any (select s1 from t1)); +s1 +2 +select * from t1 where (s1 < ALL (select s1+1 from t1)); +s1 +1 +select * from t1 where not(s1 < ALL (select s1+1 from t1)); +s1 +2 +select * from t1 where (s1+1 = ANY (select s1 from t1)); +s1 +1 +select * from t1 where NOT(s1+1 = ANY (select s1 from t1)); +s1 +2 +select * from t1 where (s1 = ALL (select s1/s1 from t1)); +s1 +1 +select * from t1 where NOT(s1 = ALL (select s1/s1 from t1)); +s1 +2 +drop table t1; +create table t1 ( +retailerID varchar(8) NOT NULL, +statusID int(10) unsigned NOT NULL, +changed datetime NOT NULL, +UNIQUE KEY retailerID (retailerID, statusID, changed) +); +INSERT INTO t1 VALUES("0026", "1", "2005-12-06 12:18:56"); +INSERT INTO t1 VALUES("0026", "2", "2006-01-06 12:25:53"); +INSERT INTO t1 VALUES("0037", "1", "2005-12-06 12:18:56"); +INSERT INTO t1 VALUES("0037", "2", "2006-01-06 12:25:53"); +INSERT INTO t1 VALUES("0048", "1", "2006-01-06 12:37:50"); +INSERT INTO t1 VALUES("0059", "1", "2006-01-06 12:37:50"); +select * from t1 r1 +where (r1.retailerID,(r1.changed)) in +(SELECT r2.retailerId,(max(changed)) from t1 r2 +group by r2.retailerId); +retailerID statusID changed +0026 2 2006-01-06 12:25:53 +0037 2 2006-01-06 12:25:53 +0048 1 2006-01-06 12:37:50 +0059 1 2006-01-06 12:37:50 +drop table t1; +create table t1(a int, primary key (a)); +insert into t1 values (10); +create table t2 (a int primary key, b varchar(32), c int, unique key b(c, b)); +insert into t2(a, c, b) values (1,10,'359'), (2,10,'35988'), (3,10,'35989'); +explain SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r +ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899' + ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system PRIMARY NULL NULL NULL 1 +1 PRIMARY r const PRIMARY PRIMARY 4 const 1 +2 SUBQUERY t2 range b b 40 NULL 2 Using where +SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r +ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899' + ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10; +a a b +10 3 35989 +explain SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r +ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899' + ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system PRIMARY NULL NULL NULL 1 +1 PRIMARY r const PRIMARY PRIMARY 4 const 1 +2 SUBQUERY t2 range b b 40 NULL 2 Using index condition +SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r +ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899' + ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10; +a a b +10 1 359 +drop table t1,t2; +CREATE TABLE t1 ( +field1 int NOT NULL, +field2 int NOT NULL, +field3 int NOT NULL, +PRIMARY KEY (field1,field2,field3) +); +CREATE TABLE t2 ( +fieldA int NOT NULL, +fieldB int NOT NULL, +PRIMARY KEY (fieldA,fieldB) +); +INSERT INTO t1 VALUES +(1,1,1), (1,1,2), (1,2,1), (1,2,2), (1,2,3), (1,3,1); +INSERT INTO t2 VALUES (1,1), (1,2), (1,3); +SELECT field1, field2, COUNT(*) +FROM t1 GROUP BY field1, field2; +field1 field2 COUNT(*) +1 1 2 +1 2 3 +1 3 1 +SELECT field1, field2 +FROM t1 +GROUP BY field1, field2 +HAVING COUNT(*) >= ALL (SELECT fieldB +FROM t2 WHERE fieldA = field1); +field1 field2 +1 2 +SELECT field1, field2 +FROM t1 +GROUP BY field1, field2 +HAVING COUNT(*) < ANY (SELECT fieldB +FROM t2 WHERE fieldA = field1); +field1 field2 +1 1 +1 3 +DROP TABLE t1, t2; +CREATE TABLE t1(a int, INDEX (a)); +INSERT INTO t1 VALUES (1), (3), (5), (7); +INSERT INTO t1 VALUES (NULL); +CREATE TABLE t2(a int); +INSERT INTO t2 VALUES (1),(2),(3); +EXPLAIN SELECT a, a IN (SELECT a FROM t1) FROM t2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 3 +2 SUBQUERY t1 index_subquery a a 5 func 2 Using index; Full scan on NULL key +SELECT a, a IN (SELECT a FROM t1) FROM t2; +a a IN (SELECT a FROM t1) +1 1 +2 NULL +3 1 +DROP TABLE t1,t2; +CREATE TABLE t1 (a DATETIME); +INSERT INTO t1 VALUES ('1998-09-23'), ('2003-03-25'); +CREATE TABLE t2 AS SELECT +(SELECT a FROM t1 WHERE a < '2000-01-01') AS sub_a +FROM t1 WHERE a > '2000-01-01'; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `sub_a` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE TABLE t3 AS (SELECT a FROM t1 WHERE a < '2000-01-01') UNION (SELECT a FROM t1 WHERE a > '2000-01-01'); +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `a` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1,t2,t3; +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (1), (2); +SELECT a FROM t1 WHERE (SELECT 1 FROM DUAL WHERE 1=0) > 0; +a +SELECT a FROM t1 WHERE (SELECT 1 FROM DUAL WHERE 1=0) IS NULL; +a +1 +2 +EXPLAIN SELECT a FROM t1 WHERE (SELECT 1 FROM DUAL WHERE 1=0) IS NULL; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +DROP TABLE t1; +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (2), (4), (1), (3); +CREATE TABLE t2 (b int, c int); +INSERT INTO t2 VALUES +(2,1), (1,3), (2,1), (4,4), (2,2), (1,4); +SELECT a FROM t1 ORDER BY (SELECT c FROM t2 WHERE b > 2 ); +a +2 +4 +1 +3 +SELECT a FROM t1 ORDER BY (SELECT c FROM t2 WHERE b > 1); +ERROR 21000: Subquery returns more than 1 row +SELECT a FROM t1 ORDER BY (SELECT c FROM t2 WHERE b > 2), a; +a +1 +2 +3 +4 +SELECT a FROM t1 ORDER BY (SELECT c FROM t2 WHERE b > 1), a; +ERROR 21000: Subquery returns more than 1 row +SELECT b, MAX(c) FROM t2 GROUP BY b, (SELECT c FROM t2 WHERE b > 2); +b MAX(c) +1 4 +2 2 +4 4 +SELECT b, MAX(c) FROM t2 GROUP BY b, (SELECT c FROM t2 WHERE b > 1); +ERROR 21000: Subquery returns more than 1 row +SELECT a FROM t1 GROUP BY a +HAVING IFNULL((SELECT b FROM t2 WHERE b > 2), +(SELECT c FROM t2 WHERE c=a AND b > 2 ORDER BY b)) > 3; +a +1 +2 +3 +4 +SELECT a FROM t1 GROUP BY a +HAVING IFNULL((SELECT b FROM t2 WHERE b > 1), +(SELECT c FROM t2 WHERE c=a AND b > 2 ORDER BY b)) > 3; +ERROR 21000: Subquery returns more than 1 row +SELECT a FROM t1 GROUP BY a +HAVING IFNULL((SELECT b FROM t2 WHERE b > 4), +(SELECT c FROM t2 WHERE c=a AND b > 2 ORDER BY b)) > 3; +a +4 +SELECT a FROM t1 GROUP BY a +HAVING IFNULL((SELECT b FROM t2 WHERE b > 4), +(SELECT c FROM t2 WHERE c=a AND b > 1 ORDER BY b)) > 3; +ERROR 21000: Subquery returns more than 1 row +SELECT a FROM t1 +ORDER BY IFNULL((SELECT b FROM t2 WHERE b > 2), +(SELECT c FROM t2 WHERE c=a AND b > 2 ORDER BY b)); +a +1 +2 +3 +4 +SELECT a FROM t1 +ORDER BY IFNULL((SELECT b FROM t2 WHERE b > 1), +(SELECT c FROM t2 WHERE c=a AND b > 1 ORDER BY b)); +ERROR 21000: Subquery returns more than 1 row +SELECT a FROM t1 +ORDER BY IFNULL((SELECT b FROM t2 WHERE b > 4), +(SELECT c FROM t2 WHERE c=a AND b > 2 ORDER BY b)); +a +1 +2 +3 +4 +SELECT a FROM t1 +ORDER BY IFNULL((SELECT b FROM t2 WHERE b > 4), +(SELECT c FROM t2 WHERE c=a AND b > 1 ORDER BY b)); +ERROR 21000: Subquery returns more than 1 row +DROP TABLE t1,t2; +create table t1 (df decimal(5,1)); +insert into t1 values(1.1); +insert into t1 values(2.2); +select * from t1 where df <= all (select avg(df) from t1 group by df); +df +1.1 +select * from t1 where df >= all (select avg(df) from t1 group by df); +df +2.2 +drop table t1; +create table t1 (df decimal(5,1)); +insert into t1 values(1.1); +select 1.1 * exists(select * from t1); +1.1 * exists(select * from t1) +1.1 +drop table t1; +CREATE TABLE t1 ( +grp int(11) default NULL, +a decimal(10,2) default NULL); +insert into t1 values (1, 1), (2, 2), (2, 3), (3, 4), (3, 5), (3, 6), (NULL, NULL); +select * from t1; +grp a +1 1.00 +2 2.00 +2 3.00 +3 4.00 +3 5.00 +3 6.00 +NULL NULL +select min(a) from t1 group by grp; +min(a) +NULL +1.00 +2.00 +4.00 +drop table t1; +CREATE table t1 ( c1 integer ); +INSERT INTO t1 VALUES ( 1 ); +INSERT INTO t1 VALUES ( 2 ); +INSERT INTO t1 VALUES ( 3 ); +CREATE TABLE t2 ( c2 integer ); +INSERT INTO t2 VALUES ( 1 ); +INSERT INTO t2 VALUES ( 4 ); +INSERT INTO t2 VALUES ( 5 ); +SELECT * FROM t1 LEFT JOIN t2 ON c1 = c2 WHERE c2 IN (1); +c1 c2 +1 1 +SELECT * FROM t1 LEFT JOIN t2 ON c1 = c2 +WHERE c2 IN ( SELECT c2 FROM t2 WHERE c2 IN ( 1 ) ); +c1 c2 +1 1 +DROP TABLE t1,t2; +CREATE TABLE t1 ( c1 integer ); +INSERT INTO t1 VALUES ( 1 ); +INSERT INTO t1 VALUES ( 2 ); +INSERT INTO t1 VALUES ( 3 ); +INSERT INTO t1 VALUES ( 6 ); +CREATE TABLE t2 ( c2 integer ); +INSERT INTO t2 VALUES ( 1 ); +INSERT INTO t2 VALUES ( 4 ); +INSERT INTO t2 VALUES ( 5 ); +INSERT INTO t2 VALUES ( 6 ); +CREATE TABLE t3 ( c3 integer ); +INSERT INTO t3 VALUES ( 7 ); +INSERT INTO t3 VALUES ( 8 ); +SELECT c1,c2 FROM t1 LEFT JOIN t2 ON c1 = c2 +WHERE EXISTS (SELECT c3 FROM t3 WHERE c2 IS NULL ); +c1 c2 +2 NULL +3 NULL +DROP TABLE t1,t2,t3; +CREATE TABLE `t1` ( +`itemid` bigint(20) unsigned NOT NULL auto_increment, +`sessionid` bigint(20) unsigned default NULL, +`time` int(10) unsigned NOT NULL default '0', +`type` set('A','D','E','F','G','I','L','N','U') collate latin1_general_ci NOT +NULL default '', +`data` text collate latin1_general_ci NOT NULL, +PRIMARY KEY (`itemid`) +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +INSERT INTO `t1` VALUES (1, 1, 1, 'D', ''); +CREATE TABLE `t2` ( +`sessionid` bigint(20) unsigned NOT NULL auto_increment, +`pid` int(10) unsigned NOT NULL default '0', +`date` int(10) unsigned NOT NULL default '0', +`ip` varchar(15) collate latin1_general_ci NOT NULL default '', +PRIMARY KEY (`sessionid`) +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +INSERT INTO `t2` VALUES (1, 1, 1, '10.10.10.1'); +SELECT s.ip, count( e.itemid ) FROM `t1` e JOIN t2 s ON s.sessionid = e.sessionid WHERE e.sessionid = ( SELECT sessionid FROM t2 ORDER BY sessionid DESC LIMIT 1 ) GROUP BY s.ip HAVING count( e.itemid ) >0 LIMIT 0 , 30; +ip count( e.itemid ) +10.10.10.1 1 +drop tables t1,t2; +CREATE TABLE t1 (EMPNUM CHAR(3)); +CREATE TABLE t2 (EMPNUM CHAR(3) ); +INSERT INTO t1 VALUES ('E1'),('E2'); +INSERT INTO t2 VALUES ('E1'); +DELETE FROM t1 +WHERE t1.EMPNUM NOT IN +(SELECT t2.EMPNUM +FROM t2 +WHERE t1.EMPNUM = t2.EMPNUM); +select * from t1; +EMPNUM +E1 +DROP TABLE t1,t2; +CREATE TABLE t1(select_id BIGINT, values_id BIGINT); +INSERT INTO t1 VALUES (1, 1); +CREATE TABLE t2 (select_id BIGINT, values_id BIGINT, +PRIMARY KEY(select_id,values_id)); +INSERT INTO t2 VALUES (0, 1), (0, 2), (0, 3), (1, 5); +SELECT values_id FROM t1 +WHERE values_id IN (SELECT values_id FROM t2 +WHERE select_id IN (1, 0)); +values_id +1 +SELECT values_id FROM t1 +WHERE values_id IN (SELECT values_id FROM t2 +WHERE select_id BETWEEN 0 AND 1); +values_id +1 +SELECT values_id FROM t1 +WHERE values_id IN (SELECT values_id FROM t2 +WHERE select_id = 0 OR select_id = 1); +values_id +1 +DROP TABLE t1, t2; +create table t1 (fld enum('0','1')); +insert into t1 values ('1'); +select * from (select max(fld) from t1) as foo; +max(fld) +1 +drop table t1; +CREATE TABLE t1 (a int, b int); +CREATE TABLE t2 (c int, d int); +CREATE TABLE t3 (e int); +INSERT INTO t1 VALUES +(1,10), (2,10), (1,20), (2,20), (3,20), (2,30), (4,40); +INSERT INTO t2 VALUES +(2,10), (2,20), (4,10), (5,10), (3,20), (2,40); +INSERT INTO t3 VALUES (10), (30), (10), (20) ; +SELECT a, MAX(b), MIN(b) FROM t1 GROUP BY a; +a MAX(b) MIN(b) +1 20 10 +2 30 10 +3 20 20 +4 40 40 +SELECT * FROM t2; +c d +2 10 +2 20 +4 10 +5 10 +3 20 +2 40 +SELECT * FROM t3; +e +10 +30 +10 +20 +SELECT a FROM t1 GROUP BY a +HAVING a IN (SELECT c FROM t2 WHERE MAX(b)>20); +a +2 +4 +SELECT a FROM t1 GROUP BY a +HAVING a IN (SELECT c FROM t2 WHERE MAX(b)<d); +a +2 +SELECT a FROM t1 GROUP BY a +HAVING a IN (SELECT c FROM t2 WHERE MAX(b)>d); +a +2 +4 +SELECT a FROM t1 GROUP BY a +HAVING a IN (SELECT c FROM t2 +WHERE d >= SOME(SELECT e FROM t3 WHERE MAX(b)=e)); +a +2 +3 +SELECT a FROM t1 GROUP BY a +HAVING a IN (SELECT c FROM t2 +WHERE EXISTS(SELECT e FROM t3 WHERE MAX(b)=e AND e <= d)); +a +2 +3 +SELECT a FROM t1 GROUP BY a +HAVING a IN (SELECT c FROM t2 +WHERE d > SOME(SELECT e FROM t3 WHERE MAX(b)=e)); +a +2 +SELECT a FROM t1 GROUP BY a +HAVING a IN (SELECT c FROM t2 +WHERE EXISTS(SELECT e FROM t3 WHERE MAX(b)=e AND e < d)); +a +2 +SELECT a FROM t1 GROUP BY a +HAVING a IN (SELECT c FROM t2 +WHERE MIN(b) < d AND +EXISTS(SELECT e FROM t3 WHERE MAX(b)=e AND e <= d)); +a +2 +SELECT a, SUM(a) FROM t1 GROUP BY a; +a SUM(a) +1 2 +2 6 +3 3 +4 4 +SELECT a FROM t1 +WHERE EXISTS(SELECT c FROM t2 GROUP BY c HAVING SUM(a) = c) GROUP BY a; +a +3 +4 +SELECT a FROM t1 GROUP BY a +HAVING EXISTS(SELECT c FROM t2 GROUP BY c HAVING SUM(a) = c); +a +1 +3 +4 +SELECT a FROM t1 +WHERE a < 3 AND +EXISTS(SELECT c FROM t2 GROUP BY c HAVING SUM(a) != c) GROUP BY a; +a +1 +2 +SELECT a FROM t1 +WHERE a < 3 AND +EXISTS(SELECT c FROM t2 GROUP BY c HAVING SUM(a) != c); +a +1 +2 +1 +2 +2 +SELECT t1.a FROM t1 GROUP BY t1.a +HAVING t1.a < ALL(SELECT t2.c FROM t2 GROUP BY t2.c +HAVING EXISTS(SELECT t3.e FROM t3 GROUP BY t3.e +HAVING SUM(t1.a+t2.c) < t3.e/4)); +a +1 +2 +SELECT t1.a FROM t1 GROUP BY t1.a +HAVING t1.a > ALL(SELECT t2.c FROM t2 +WHERE EXISTS(SELECT t3.e FROM t3 GROUP BY t3.e +HAVING SUM(t1.a+t2.c) < t3.e/4)); +a +4 +SELECT t1.a FROM t1 GROUP BY t1.a +HAVING t1.a > ALL(SELECT t2.c FROM t2 +WHERE EXISTS(SELECT t3.e FROM t3 +WHERE SUM(t1.a+t2.c) < t3.e/4)); +ERROR HY000: Invalid use of group function +SELECT t1.a from t1 GROUP BY t1.a HAVING AVG(SUM(t1.b)) > 20; +ERROR HY000: Invalid use of group function +SELECT t1.a FROM t1 GROUP BY t1.a +HAVING t1.a IN (SELECT t2.c FROM t2 GROUP BY t2.c +HAVING AVG(t2.c+SUM(t1.b)) > 20); +a +2 +3 +4 +SELECT t1.a FROM t1 GROUP BY t1.a +HAVING t1.a IN (SELECT t2.c FROM t2 GROUP BY t2.c +HAVING AVG(SUM(t1.b)) > 20); +a +2 +4 +SELECT t1.a, SUM(b) AS sum FROM t1 GROUP BY t1.a +HAVING t1.a IN (SELECT t2.c FROM t2 GROUP BY t2.c +HAVING t2.c+sum > 20); +a sum +2 60 +3 20 +4 40 +DROP TABLE t1,t2,t3; +CREATE TABLE t1 (a varchar(5), b varchar(10)); +INSERT INTO t1 VALUES +('AAA', 5), ('BBB', 4), ('BBB', 1), ('CCC', 2), +('CCC', 7), ('AAA', 2), ('AAA', 4), ('BBB', 3), ('AAA', 8); +SELECT * FROM t1 WHERE (a,b) = ANY (SELECT a, max(b) FROM t1 GROUP BY a); +a b +BBB 4 +CCC 7 +AAA 8 +EXPLAIN +SELECT * FROM t1 WHERE (a,b) = ANY (SELECT a, max(b) FROM t1 GROUP BY a); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 9 Using where +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 21 test.t1.a,test.t1.b 1 +2 MATERIALIZED t1 ALL NULL NULL NULL NULL 9 Using temporary +ALTER TABLE t1 ADD INDEX(a); +SELECT * FROM t1 WHERE (a,b) = ANY (SELECT a, max(b) FROM t1 GROUP BY a); +a b +BBB 4 +CCC 7 +AAA 8 +EXPLAIN +SELECT * FROM t1 WHERE (a,b) = ANY (SELECT a, max(b) FROM t1 GROUP BY a); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL a NULL NULL NULL 9 Using where +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 21 test.t1.a,test.t1.b 1 +2 MATERIALIZED t1 ALL NULL NULL NULL NULL 9 Using temporary +DROP TABLE t1; +create table t1( f1 int,f2 int); +insert into t1 values (1,1),(2,2); +select tt.t from (select 'crash1' as t, f2 from t1) as tt left join t1 on tt.t = 'crash2' and tt.f2 = t1.f2 where tt.t = 'crash1'; +t +crash1 +crash1 +drop table t1; +create table t1 (c int, key(c)); +insert into t1 values (1142477582), (1142455969); +create table t2 (a int, b int); +insert into t2 values (2, 1), (1, 0); +delete from t1 where c <= 1140006215 and (select b from t2 where a = 2) = 1; +drop table t1, t2; +CREATE TABLE t1 (a INT); +CREATE VIEW v1 AS SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1); +ERROR 42S22: Unknown column 'no_such_column' in 'IN/ALL/ANY subquery' +CREATE VIEW v2 AS SELECT * FROM t1 WHERE no_such_column = (SELECT 1); +ERROR 42S22: Unknown column 'no_such_column' in 'where clause' +SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1); +ERROR 42S22: Unknown column 'no_such_column' in 'IN/ALL/ANY subquery' +DROP TABLE t1; +create table t1 (i int, j bigint); +insert into t1 values (1, 2), (2, 2), (3, 2); +select * from (select min(i) from t1 where j=(select * from (select min(j) from t1) t2)) t3; +min(i) +1 +drop table t1; +CREATE TABLE t1 (i BIGINT UNSIGNED); +INSERT INTO t1 VALUES (10000000000000000000); +INSERT INTO t1 VALUES (1); +CREATE TABLE t2 (i BIGINT UNSIGNED); +INSERT INTO t2 VALUES (10000000000000000000); +INSERT INTO t2 VALUES (1); +/* simple test */ +SELECT t1.i FROM t1 JOIN t2 ON t1.i = t2.i; +i +10000000000000000000 +1 +/* subquery test */ +SELECT t1.i FROM t1 WHERE t1.i = (SELECT MAX(i) FROM t2); +i +10000000000000000000 +/* subquery test with cast*/ +SELECT t1.i FROM t1 WHERE t1.i = CAST((SELECT MAX(i) FROM t2) AS UNSIGNED); +i +10000000000000000000 +DROP TABLE t1; +DROP TABLE t2; +CREATE TABLE t1 ( +id bigint(20) unsigned NOT NULL auto_increment, +name varchar(255) NOT NULL, +PRIMARY KEY (id) +); +INSERT INTO t1 VALUES +(1, 'Balazs'), (2, 'Joe'), (3, 'Frank'); +CREATE TABLE t2 ( +id bigint(20) unsigned NOT NULL auto_increment, +mid bigint(20) unsigned NOT NULL, +date date NOT NULL, +PRIMARY KEY (id) +); +INSERT INTO t2 VALUES +(1, 1, '2006-03-30'), (2, 2, '2006-04-06'), (3, 3, '2006-04-13'), +(4, 2, '2006-04-20'), (5, 1, '2006-05-01'); +SELECT *, +(SELECT date FROM t2 WHERE mid = t1.id +ORDER BY date DESC LIMIT 0, 1) AS date_last, +(SELECT date FROM t2 WHERE mid = t1.id +ORDER BY date DESC LIMIT 3, 1) AS date_next_to_last +FROM t1; +id name date_last date_next_to_last +1 Balazs 2006-05-01 NULL +2 Joe 2006-04-20 NULL +3 Frank 2006-04-13 NULL +SELECT *, +(SELECT COUNT(*) FROM t2 WHERE mid = t1.id +ORDER BY date DESC LIMIT 1, 1) AS date_count +FROM t1; +id name date_count +1 Balazs NULL +2 Joe NULL +3 Frank NULL +SELECT *, +(SELECT date FROM t2 WHERE mid = t1.id +ORDER BY date DESC LIMIT 0, 1) AS date_last, +(SELECT date FROM t2 WHERE mid = t1.id +ORDER BY date DESC LIMIT 1, 1) AS date_next_to_last +FROM t1; +id name date_last date_next_to_last +1 Balazs 2006-05-01 2006-03-30 +2 Joe 2006-04-20 2006-04-06 +3 Frank 2006-04-13 NULL +DROP TABLE t1,t2; +CREATE TABLE t1 ( +i1 int(11) NOT NULL default '0', +i2 int(11) NOT NULL default '0', +t datetime NOT NULL default '0000-00-00 00:00:00', +PRIMARY KEY (i1,i2,t) +); +INSERT INTO t1 VALUES +(24,1,'2005-03-03 16:31:31'),(24,1,'2005-05-27 12:40:07'), +(24,1,'2005-05-27 12:40:08'),(24,1,'2005-05-27 12:40:10'), +(24,1,'2005-05-27 12:40:25'),(24,1,'2005-05-27 12:40:30'), +(24,2,'2005-03-03 13:43:05'),(24,2,'2005-03-03 16:23:31'), +(24,2,'2005-03-03 16:31:30'),(24,2,'2005-05-27 12:37:02'), +(24,2,'2005-05-27 12:40:06'); +CREATE TABLE t2 ( +i1 int(11) NOT NULL default '0', +i2 int(11) NOT NULL default '0', +t datetime default NULL, +PRIMARY KEY (i1) +); +INSERT INTO t2 VALUES (24,1,'2006-06-20 12:29:40'); +EXPLAIN +SELECT * FROM t1,t2 +WHERE t1.t = (SELECT t1.t FROM t1 +WHERE t1.t < t2.t AND t1.i2=1 AND t2.i1=t1.i1 +ORDER BY t1.t DESC LIMIT 1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 system NULL NULL NULL NULL 1 +1 PRIMARY t1 index NULL PRIMARY 16 NULL 11 Using where; Using index +2 SUBQUERY t1 range PRIMARY PRIMARY 16 NULL 5 Using where; Using index +SELECT * FROM t1,t2 +WHERE t1.t = (SELECT t1.t FROM t1 +WHERE t1.t < t2.t AND t1.i2=1 AND t2.i1=t1.i1 +ORDER BY t1.t DESC LIMIT 1); +i1 i2 t i1 i2 t +24 1 2005-05-27 12:40:30 24 1 2006-06-20 12:29:40 +DROP TABLE t1, t2; +CREATE TABLE t1 (i INT); +(SELECT i FROM t1) UNION (SELECT i FROM t1); +i +SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS +( +(SELECT i FROM t1) UNION +(SELECT i FROM t1) +); +i +SELECT * FROM t1 +WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1))); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION (SELECT i FROM t1)))' at line 2 +explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12)) +from t1; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'union (select t12.i from t1 t12)) +from t1' at line 1 +explain select * from t1 where not exists +((select t11.i from t1 t11) union (select t12.i from t1 t12)); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table +3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(250), b INT auto_increment, PRIMARY KEY (b)); +insert into t1 (a) values (FLOOR(rand() * 100)); +insert into t1 (a) select FLOOR(rand() * 100) from t1; +insert into t1 (a) select FLOOR(rand() * 100) from t1; +insert into t1 (a) select FLOOR(rand() * 100) from t1; +insert into t1 (a) select FLOOR(rand() * 100) from t1; +insert into t1 (a) select FLOOR(rand() * 100) from t1; +insert into t1 (a) select FLOOR(rand() * 100) from t1; +insert into t1 (a) select FLOOR(rand() * 100) from t1; +insert into t1 (a) select FLOOR(rand() * 100) from t1; +insert into t1 (a) select FLOOR(rand() * 100) from t1; +insert into t1 (a) select FLOOR(rand() * 100) from t1; +insert into t1 (a) select FLOOR(rand() * 100) from t1; +insert into t1 (a) select FLOOR(rand() * 100) from t1; +insert into t1 (a) select FLOOR(rand() * 100) from t1; +SELECT a, +(SELECT REPEAT(' ',250) FROM t1 i1 +WHERE i1.b=t1.a ORDER BY RAND() LIMIT 1) AS a +FROM t1 ORDER BY a LIMIT 5; +a a +0 NULL +0 NULL +0 NULL +0 NULL +0 NULL +DROP TABLE t1; +CREATE TABLE t1 (a INT, b INT); +CREATE TABLE t2 (a INT); +INSERT INTO t2 values (1); +INSERT INTO t1 VALUES (1,1),(1,2),(2,3),(3,4); +SELECT (SELECT COUNT(DISTINCT t1.b) from t2) FROM t1 GROUP BY t1.a; +(SELECT COUNT(DISTINCT t1.b) from t2) +2 +1 +1 +SELECT (SELECT COUNT(DISTINCT t1.b) from t2 union select 1 from t2 where 12 < 3) +FROM t1 GROUP BY t1.a; +(SELECT COUNT(DISTINCT t1.b) from t2 union select 1 from t2 where 12 < 3) +2 +1 +1 +SELECT COUNT(DISTINCT t1.b), (SELECT COUNT(DISTINCT t1.b)) FROM t1 GROUP BY t1.a; +COUNT(DISTINCT t1.b) (SELECT COUNT(DISTINCT t1.b)) +2 2 +1 1 +1 1 +SELECT COUNT(DISTINCT t1.b), +(SELECT COUNT(DISTINCT t1.b) union select 1 from DUAL where 12 < 3) +FROM t1 GROUP BY t1.a; +COUNT(DISTINCT t1.b) (SELECT COUNT(DISTINCT t1.b) union select 1 from DUAL where 12 < 3) +2 2 +1 1 +1 1 +SELECT ( +SELECT ( +SELECT COUNT(DISTINCT t1.b) +) +) +FROM t1 GROUP BY t1.a; +( +SELECT ( +SELECT COUNT(DISTINCT t1.b) +) +) +2 +1 +1 +SELECT ( +SELECT ( +SELECT ( +SELECT COUNT(DISTINCT t1.b) +) +) +FROM t1 GROUP BY t1.a LIMIT 1) +FROM t1 t2 +GROUP BY t2.a; +( +SELECT ( +SELECT ( +SELECT COUNT(DISTINCT t1.b) +) +) +FROM t1 GROUP BY t1.a LIMIT 1) +2 +2 +2 +DROP TABLE t1,t2; +CREATE TABLE t1 (a int, b int, PRIMARY KEY (b)); +CREATE TABLE t2 (x int auto_increment, y int, z int, +PRIMARY KEY (x), FOREIGN KEY (y) REFERENCES t1 (b)); +create table t3 (a int); +insert into t3 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +insert into t1 select RAND()*1000, A.a + 10*(B.a+10*(C.a+10*D.a)) +from t3 A, t3 B, t3 C, t3 D where D.a<3; +insert into t2(y,z) select t1.b, RAND()*1000 from t1, t3; +SET SESSION sort_buffer_size = 32 * 1024; +SELECT SQL_NO_CACHE COUNT(*) +FROM (SELECT a, b, (SELECT x FROM t2 WHERE y=b ORDER BY z DESC LIMIT 1) c +FROM t1) t; +COUNT(*) +3000 +SET SESSION sort_buffer_size = 8 * 1024 * 1024; +SELECT SQL_NO_CACHE COUNT(*) +FROM (SELECT a, b, (SELECT x FROM t2 WHERE y=b ORDER BY z DESC LIMIT 1) c +FROM t1) t; +COUNT(*) +3000 +DROP TABLE t1,t2,t3; +CREATE TABLE t1 (id char(4) PRIMARY KEY, c int); +CREATE TABLE t2 (c int); +INSERT INTO t1 VALUES ('aa', 1); +INSERT INTO t2 VALUES (1); +SELECT * FROM t1 +WHERE EXISTS (SELECT c FROM t2 WHERE c=1 +UNION +SELECT c from t2 WHERE c=t1.c); +id c +aa 1 +INSERT INTO t1 VALUES ('bb', 2), ('cc', 3), ('dd',1); +SELECT * FROM t1 +WHERE EXISTS (SELECT c FROM t2 WHERE c=1 +UNION +SELECT c from t2 WHERE c=t1.c); +id c +aa 1 +bb 2 +cc 3 +dd 1 +INSERT INTO t2 VALUES (2); +CREATE TABLE t3 (c int); +INSERT INTO t3 VALUES (1); +SELECT * FROM t1 +WHERE EXISTS (SELECT t2.c FROM t2 JOIN t3 ON t2.c=t3.c WHERE t2.c=1 +UNION +SELECT c from t2 WHERE c=t1.c); +id c +aa 1 +bb 2 +cc 3 +dd 1 +DROP TABLE t1,t2,t3; +CREATE TABLE t1(f1 int); +CREATE TABLE t2(f2 int, f21 int, f3 timestamp); +INSERT INTO t1 VALUES (1),(1),(2),(2); +INSERT INTO t2 VALUES (1,1,"2004-02-29 11:11:11"), (2,2,"2004-02-29 11:11:11"); +SELECT ((SELECT f2 FROM t2 WHERE f21=f1 LIMIT 1) * COUNT(f1)) AS sq FROM t1 GROUP BY f1; +sq +2 +4 +SELECT (SELECT SUM(1) FROM t2 ttt GROUP BY t2.f3 LIMIT 1) AS tt FROM t2; +tt +2 +2 +PREPARE stmt1 FROM 'SELECT ((SELECT f2 FROM t2 WHERE f21=f1 LIMIT 1) * COUNT(f1)) AS sq FROM t1 GROUP BY f1'; +EXECUTE stmt1; +sq +2 +4 +EXECUTE stmt1; +sq +2 +4 +DEALLOCATE PREPARE stmt1; +SELECT f2, AVG(f21), +(SELECT t.f3 FROM t2 AS t WHERE t2.f2=t.f2 AND t.f3=MAX(t2.f3)) AS test +FROM t2 GROUP BY f2; +f2 AVG(f21) test +1 1.0000 2004-02-29 11:11:11 +2 2.0000 2004-02-29 11:11:11 +DROP TABLE t1,t2; +CREATE TABLE t1 (a int, b INT, c CHAR(10) NOT NULL); +INSERT INTO t1 VALUES +(1,1,'a'), (1,2,'b'), (1,3,'c'), (1,4,'d'), (1,5,'e'), +(2,1,'f'), (2,2,'g'), (2,3,'h'), (3,4,'i'), (3,3,'j'), +(3,2,'k'), (3,1,'l'), (1,9,'m'); +SELECT a, MAX(b), +(SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b)) AS test +FROM t1 GROUP BY a; +a MAX(b) test +1 9 m +2 3 h +3 4 i +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP TABLE IF EXISTS t1xt2; +CREATE TABLE t1 ( +id_1 int(5) NOT NULL, +t varchar(4) DEFAULT NULL +); +CREATE TABLE t2 ( +id_2 int(5) NOT NULL, +t varchar(4) DEFAULT NULL +); +CREATE TABLE t1xt2 ( +id_1 int(5) NOT NULL, +id_2 int(5) NOT NULL +); +INSERT INTO t1 VALUES (1, 'a'), (2, 'b'), (3, 'c'), (4, 'd'); +INSERT INTO t2 VALUES (2, 'bb'), (3, 'cc'), (4, 'dd'), (12, 'aa'); +INSERT INTO t1xt2 VALUES (2, 2), (3, 3), (4, 4); +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 IN (SELECT t1xt2.id_2 FROM t1xt2 WHERE t1.id_1 = t1xt2.id_1)); +id_1 +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 IN ((SELECT t1xt2.id_2 FROM t1xt2 WHERE t1.id_1 = t1xt2.id_1))); +id_1 +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 IN (((SELECT t1xt2.id_2 FROM t1xt2 WHERE t1.id_1 = t1xt2.id_1)))); +id_1 +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 NOT IN (SELECT t1xt2.id_2 FROM t1xt2 WHERE t1.id_1 = t1xt2.id_1)); +id_1 +1 +2 +3 +4 +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 NOT IN ((SELECT t1xt2.id_2 FROM t1xt2 where t1.id_1 = t1xt2.id_1))); +id_1 +1 +2 +3 +4 +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 NOT IN (((SELECT t1xt2.id_2 FROM t1xt2 where t1.id_1 = t1xt2.id_1)))); +id_1 +1 +2 +3 +4 +insert INTO t1xt2 VALUES (1, 12); +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 IN (SELECT t1xt2.id_2 FROM t1xt2 WHERE t1.id_1 = t1xt2.id_1)); +id_1 +1 +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 IN ((SELECT t1xt2.id_2 FROM t1xt2 WHERE t1.id_1 = t1xt2.id_1))); +id_1 +1 +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 IN (((SELECT t1xt2.id_2 FROM t1xt2 WHERE t1.id_1 = t1xt2.id_1)))); +id_1 +1 +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 NOT IN (SELECT t1xt2.id_2 FROM t1xt2 WHERE t1.id_1 = t1xt2.id_1)); +id_1 +2 +3 +4 +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 NOT IN ((SELECT t1xt2.id_2 FROM t1xt2 WHERE t1.id_1 = t1xt2.id_1))); +id_1 +2 +3 +4 +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 NOT IN (((SELECT t1xt2.id_2 FROM t1xt2 WHERE t1.id_1 = t1xt2.id_1)))); +id_1 +2 +3 +4 +insert INTO t1xt2 VALUES (2, 12); +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 IN (SELECT t1xt2.id_2 FROM t1xt2 WHERE t1.id_1 = t1xt2.id_1)); +id_1 +1 +2 +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 IN ((SELECT t1xt2.id_2 FROM t1xt2 WHERE t1.id_1 = t1xt2.id_1))); +id_1 +1 +2 +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 IN (((SELECT t1xt2.id_2 FROM t1xt2 WHERE t1.id_1 = t1xt2.id_1)))); +id_1 +1 +2 +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 NOT IN (SELECT t1xt2.id_2 FROM t1xt2 WHERE t1.id_1 = t1xt2.id_1)); +id_1 +3 +4 +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 NOT IN ((SELECT t1xt2.id_2 FROM t1xt2 WHERE t1.id_1 = t1xt2.id_1))); +id_1 +3 +4 +SELECT DISTINCT t1.id_1 FROM t1 WHERE +(12 NOT IN (((SELECT t1xt2.id_2 FROM t1xt2 WHERE t1.id_1 = t1xt2.id_1)))); +id_1 +3 +4 +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t1xt2; +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (3), (1), (2); +SELECT 'this is ' 'a test.' AS col1, a AS col2 FROM t1; +col1 col2 +this is a test. 3 +this is a test. 1 +this is a test. 2 +SELECT * FROM (SELECT 'this is ' 'a test.' AS col1, a AS t2 FROM t1) t; +col1 t2 +this is a test. 3 +this is a test. 1 +this is a test. 2 +DROP table t1; +CREATE TABLE t1 (a int, b int); +CREATE TABLE t2 (m int, n int); +INSERT INTO t1 VALUES (2,2), (2,2), (3,3), (3,3), (3,3), (4,4); +INSERT INTO t2 VALUES (1,11), (2,22), (3,32), (4,44), (4,44); +SELECT COUNT(*), a, +(SELECT m FROM t2 WHERE m = count(*) LIMIT 1) +FROM t1 GROUP BY a; +COUNT(*) a (SELECT m FROM t2 WHERE m = count(*) LIMIT 1) +2 2 2 +3 3 3 +1 4 1 +SELECT COUNT(*), a, +(SELECT MIN(m) FROM t2 WHERE m = count(*)) +FROM t1 GROUP BY a; +COUNT(*) a (SELECT MIN(m) FROM t2 WHERE m = count(*)) +2 2 2 +3 3 3 +1 4 1 +SELECT COUNT(*), a +FROM t1 GROUP BY a +HAVING (SELECT MIN(m) FROM t2 WHERE m = count(*)) > 1; +COUNT(*) a +2 2 +3 3 +DROP TABLE t1,t2; +CREATE TABLE t1 (a int, b int); +CREATE TABLE t2 (m int, n int); +INSERT INTO t1 VALUES (2,2), (2,2), (3,3), (3,3), (3,3), (4,4); +INSERT INTO t2 VALUES (1,11), (2,22), (3,32), (4,44), (4,44); +SELECT COUNT(*) c, a, +(SELECT GROUP_CONCAT(COUNT(a)) FROM t2 WHERE m = a) +FROM t1 GROUP BY a; +c a (SELECT GROUP_CONCAT(COUNT(a)) FROM t2 WHERE m = a) +2 2 2 +3 3 3 +1 4 1,1 +SELECT COUNT(*) c, a, +(SELECT GROUP_CONCAT(COUNT(a)+1) FROM t2 WHERE m = a) +FROM t1 GROUP BY a; +c a (SELECT GROUP_CONCAT(COUNT(a)+1) FROM t2 WHERE m = a) +2 2 3 +3 3 4 +1 4 2,2 +DROP table t1,t2; +CREATE TABLE t1 (a int, b INT, d INT, c CHAR(10) NOT NULL, PRIMARY KEY (a, b)); +INSERT INTO t1 VALUES (1,1,0,'a'), (1,2,0,'b'), (1,3,0,'c'), (1,4,0,'d'), +(1,5,0,'e'), (2,1,0,'f'), (2,2,0,'g'), (2,3,0,'h'), (3,4,0,'i'), (3,3,0,'j'), +(3,2,0,'k'), (3,1,0,'l'), (1,9,0,'m'), (1,0,10,'n'), (2,0,5,'o'), (3,0,7,'p'); +SELECT a, MAX(b), +(SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b + 0)) as test +FROM t1 GROUP BY a; +a MAX(b) test +1 9 m +2 3 h +3 4 i +SELECT a x, MAX(b), +(SELECT t.c FROM t1 AS t WHERE x=t.a AND t.b=MAX(t1.b + 0)) as test +FROM t1 GROUP BY a; +x MAX(b) test +1 9 m +2 3 h +3 4 i +SELECT a, AVG(b), +(SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.b=AVG(t1.b)) AS test +FROM t1 WHERE t1.d=0 GROUP BY a; +a AVG(b) test +1 4.0000 d +2 2.0000 g +3 2.5000 NULL +SELECT tt.a, +(SELECT (SELECT c FROM t1 as t WHERE t1.a=t.a AND t.d=MAX(t1.b + tt.a) +LIMIT 1) FROM t1 WHERE t1.a=tt.a GROUP BY a LIMIT 1) as test +FROM t1 as tt; +a test +1 n +1 n +1 n +1 n +1 n +1 n +1 n +2 o +2 o +2 o +2 o +3 p +3 p +3 p +3 p +3 p +SELECT tt.a, +(SELECT (SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.d=MAX(t1.b + tt.a) +LIMIT 1) +FROM t1 WHERE t1.a=tt.a GROUP BY a LIMIT 1) as test +FROM t1 as tt GROUP BY tt.a; +a test +1 n +2 o +3 p +SELECT tt.a, MAX( +(SELECT (SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.d=MAX(t1.b + tt.a) +LIMIT 1) +FROM t1 WHERE t1.a=tt.a GROUP BY a LIMIT 1)) as test +FROM t1 as tt GROUP BY tt.a; +a test +1 n +2 o +3 p +DROP TABLE t1; +CREATE TABLE t1 (a int, b int); +INSERT INTO t1 VALUES (2,22),(1,11),(2,22); +SELECT a FROM t1 WHERE (SELECT COUNT(b) FROM DUAL) > 0 GROUP BY a; +a +1 +2 +SELECT a FROM t1 WHERE (SELECT COUNT(b) FROM DUAL) > 1 GROUP BY a; +a +SELECT a FROM t1 t0 +WHERE (SELECT COUNT(t0.b) FROM t1 t WHERE t.b>20) GROUP BY a; +a +1 +2 +SET @@sql_mode='ansi'; +SELECT a FROM t1 WHERE (SELECT COUNT(b) FROM DUAL) > 0 GROUP BY a; +ERROR HY000: Invalid use of group function +SELECT a FROM t1 WHERE (SELECT COUNT(b) FROM DUAL) > 1 GROUP BY a; +ERROR HY000: Invalid use of group function +SELECT a FROM t1 t0 +WHERE (SELECT COUNT(t0.b) FROM t1 t WHERE t.b>20) GROUP BY a; +ERROR HY000: Invalid use of group function +SET @@sql_mode=default; +DROP TABLE t1; +CREATE TABLE t1 (a INT); +INSERT INTO t1 values (1),(1),(1),(1); +CREATE TABLE t2 (x INT); +INSERT INTO t1 values (1000),(1001),(1002); +SELECT SUM( (SELECT COUNT(a) FROM t2) ) FROM t1; +ERROR HY000: Invalid use of group function +SELECT SUM( (SELECT SUM(COUNT(a)) FROM t2) ) FROM t1; +ERROR HY000: Invalid use of group function +SELECT COUNT(1) FROM DUAL; +COUNT(1) +1 +SELECT SUM( (SELECT AVG( (SELECT t1.a FROM t2) ) FROM DUAL) ) FROM t1; +ERROR HY000: Invalid use of group function +SELECT +SUM( (SELECT AVG( (SELECT COUNT(*) FROM t1 t HAVING t1.a < 12) ) FROM t2) ) +FROM t1; +ERROR HY000: Invalid use of group function +SELECT t1.a as XXA, +SUM( (SELECT AVG( (SELECT COUNT(*) FROM t1 t HAVING XXA < 12) ) FROM t2) ) +FROM t1; +ERROR HY000: Invalid use of group function +DROP TABLE t1,t2; +CREATE TABLE t1 (a int, b int, KEY (a)); +INSERT INTO t1 VALUES (1,1),(2,1); +EXPLAIN SELECT 1 FROM t1 WHERE a = (SELECT COUNT(*) FROM t1 GROUP BY b); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ref a a 5 const 1 Using where; Using index +2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort +DROP TABLE t1; +CREATE TABLE t1 (id int NOT NULL, st CHAR(2), INDEX idx(id)); +INSERT INTO t1 VALUES +(3,'FL'), (2,'GA'), (4,'FL'), (1,'GA'), (5,'NY'), (7,'FL'), (6,'NY'); +CREATE TABLE t2 (id int NOT NULL, INDEX idx(id)); +INSERT INTO t2 VALUES (7), (5), (1), (3); +SELECT id, st FROM t1 +WHERE st IN ('GA','FL') AND EXISTS(SELECT 1 FROM t2 WHERE t2.id=t1.id); +id st +3 FL +1 GA +7 FL +SELECT id, st FROM t1 +WHERE st IN ('GA','FL') AND EXISTS(SELECT 1 FROM t2 WHERE t2.id=t1.id) +GROUP BY id; +id st +1 GA +3 FL +7 FL +SELECT id, st FROM t1 +WHERE st IN ('GA','FL') AND NOT EXISTS(SELECT 1 FROM t2 WHERE t2.id=t1.id); +id st +2 GA +4 FL +SELECT id, st FROM t1 +WHERE st IN ('GA','FL') AND NOT EXISTS(SELECT 1 FROM t2 WHERE t2.id=t1.id) +GROUP BY id; +id st +2 GA +4 FL +DROP TABLE t1,t2; +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (1), (2); +EXPLAIN EXTENDED +SELECT * FROM (SELECT count(*) FROM t1 GROUP BY a) as res; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 100.00 +2 DERIVED t1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort +Warnings: +Note 1003 select `res`.`count(*)` AS `count(*)` from (select count(0) AS `count(*)` from `test`.`t1` group by `test`.`t1`.`a`) `res` +DROP TABLE t1; +CREATE TABLE t1 ( +a varchar(255) default NULL, +b timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, +INDEX idx(a,b) +); +CREATE TABLE t2 ( +a varchar(255) default NULL +); +INSERT INTO t1 VALUES ('abcdefghijk','2007-05-07 06:00:24'); +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO `t1` VALUES ('asdf','2007-02-08 01:11:26'); +INSERT INTO `t2` VALUES ('abcdefghijk'); +INSERT INTO `t2` VALUES ('asdf'); +SET session sort_buffer_size=8192; +SELECT (SELECT 1 FROM t1 WHERE t1.a=t2.a ORDER BY t1.b LIMIT 1) AS d1 FROM t2; +d1 +1 +1 +DROP TABLE t1,t2; +CREATE TABLE t1 (a INTEGER, b INTEGER); +CREATE TABLE t2 (x INTEGER); +INSERT INTO t1 VALUES (1,11), (2,22), (2,22); +INSERT INTO t2 VALUES (1), (2); +SELECT a, COUNT(b), (SELECT COUNT(b) FROM t2) FROM t1 GROUP BY a; +ERROR 21000: Subquery returns more than 1 row +SELECT a, COUNT(b), (SELECT COUNT(b)+0 FROM t2) FROM t1 GROUP BY a; +ERROR 21000: Subquery returns more than 1 row +SELECT (SELECT SUM(t1.a)/AVG(t2.x) FROM t2) FROM t1; +(SELECT SUM(t1.a)/AVG(t2.x) FROM t2) +3.3333 +DROP TABLE t1,t2; +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1, 2), (1,3), (1,4), (2,1), (2,2); +SELECT a1.a, COUNT(*) FROM t1 a1 WHERE a1.a = 1 +AND EXISTS( SELECT a2.a FROM t1 a2 WHERE a2.a = a1.a) +GROUP BY a1.a; +a COUNT(*) +1 3 +DROP TABLE t1; +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (a INT); +INSERT INTO t1 VALUES (1),(2); +INSERT INTO t2 VALUES (1),(2); +SELECT (SELECT SUM(t1.a) FROM t2 WHERE a=0) FROM t1; +(SELECT SUM(t1.a) FROM t2 WHERE a=0) +NULL +SELECT (SELECT SUM(t1.a) FROM t2 WHERE a!=0) FROM t1; +ERROR 21000: Subquery returns more than 1 row +SELECT (SELECT SUM(t1.a) FROM t2 WHERE a=1) FROM t1; +(SELECT SUM(t1.a) FROM t2 WHERE a=1) +3 +DROP TABLE t1,t2; +CREATE TABLE t1 (a1 INT, a2 INT); +CREATE TABLE t2 (b1 INT, b2 INT); +INSERT INTO t1 VALUES (100, 200); +INSERT INTO t1 VALUES (101, 201); +INSERT INTO t2 VALUES (101, 201); +INSERT INTO t2 VALUES (103, 203); +SELECT ((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL FROM t1; +((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL +0 +0 +DROP TABLE t1, t2; +CREATE TABLE t1 (s1 BINARY(5), s2 VARBINARY(5)); +INSERT INTO t1 VALUES (0x41,0x41), (0x42,0x42), (0x43,0x43); +SELECT s1, s2 FROM t1 WHERE s2 IN (SELECT s1 FROM t1); +s1 s2 +SELECT s1, s2 FROM t1 WHERE (s2, 10) IN (SELECT s1, 10 FROM t1); +s1 s2 +CREATE INDEX I1 ON t1 (s1); +CREATE INDEX I2 ON t1 (s2); +SELECT s1, s2 FROM t1 WHERE s2 IN (SELECT s1 FROM t1); +s1 s2 +SELECT s1, s2 FROM t1 WHERE (s2, 10) IN (SELECT s1, 10 FROM t1); +s1 s2 +TRUNCATE t1; +INSERT INTO t1 VALUES (0x41,0x41); +SELECT * FROM t1 WHERE s1 = (SELECT s2 FROM t1); +s1 s2 +DROP TABLE t1; +CREATE TABLE t1 (a1 VARBINARY(2) NOT NULL DEFAULT '0', PRIMARY KEY (a1)); +CREATE TABLE t2 (a2 BINARY(2) default '0', INDEX (a2)); +CREATE TABLE t3 (a3 BINARY(2) default '0'); +INSERT INTO t1 VALUES (1),(2),(3),(4); +INSERT INTO t2 VALUES (1),(2),(3); +INSERT INTO t3 VALUES (1),(2),(3); +SELECT LEFT(t2.a2, 1) FROM t2,t3 WHERE t3.a3=t2.a2; +LEFT(t2.a2, 1) +1 +2 +3 +SELECT t1.a1, t1.a1 in (SELECT t2.a2 FROM t2,t3 WHERE t3.a3=t2.a2) FROM t1; +a1 t1.a1 in (SELECT t2.a2 FROM t2,t3 WHERE t3.a3=t2.a2) +1 0 +2 0 +3 0 +4 0 +DROP TABLE t1,t2,t3; +CREATE TABLE t1 (a1 BINARY(3) PRIMARY KEY, b1 VARBINARY(3)); +CREATE TABLE t2 (a2 VARBINARY(3) PRIMARY KEY); +CREATE TABLE t3 (a3 VARBINARY(3) PRIMARY KEY); +INSERT INTO t1 VALUES (1,10), (2,20), (3,30), (4,40); +INSERT INTO t2 VALUES (2), (3), (4), (5); +INSERT INTO t3 VALUES (10), (20), (30); +SELECT LEFT(t1.a1,1) FROM t1,t3 WHERE t1.b1=t3.a3; +LEFT(t1.a1,1) +1 +2 +3 +SELECT a2 FROM t2 WHERE t2.a2 IN (SELECT t1.a1 FROM t1,t3 WHERE t1.b1=t3.a3); +a2 +DROP TABLE t1, t2, t3; +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch='semijoin_with_cache=off'; +SET optimizer_switch='materialization=off'; +CREATE TABLE t1 (a CHAR(1), b VARCHAR(10)); +INSERT INTO t1 VALUES ('a', 'aa'); +INSERT INTO t1 VALUES ('a', 'aaa'); +SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1); +a b +CREATE INDEX I1 ON t1 (a); +CREATE INDEX I2 ON t1 (b); +EXPLAIN SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL I2 NULL NULL NULL 2 Using where +1 PRIMARY t1 ref I1 I1 2 test.t1.b 2 Using where; Using index; FirstMatch(t1) +SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1); +a b +CREATE TABLE t2 (a VARCHAR(1), b VARCHAR(10)); +INSERT INTO t2 SELECT * FROM t1; +CREATE INDEX I1 ON t2 (a); +CREATE INDEX I2 ON t2 (b); +EXPLAIN SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL I2 NULL NULL NULL 2 Using where +1 PRIMARY t2 ref I1 I1 4 test.t2.b 2 Using where; Using index; FirstMatch(t2) +SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2); +a b +EXPLAIN +SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL I2 NULL NULL NULL 2 Using where +1 PRIMARY t1 ref I1 I1 2 test.t1.b 2 Using where; Using index; FirstMatch(t1) +SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500); +a b +DROP TABLE t1,t2; +SET optimizer_switch= @save_optimizer_switch; +CREATE TABLE t1(a INT, b INT); +INSERT INTO t1 VALUES (1,1), (1,2), (2,3), (2,4); +EXPLAIN +SELECT a AS out_a, MIN(b) FROM t1 +WHERE b > (SELECT MIN(b) FROM t1 WHERE a = out_a) +GROUP BY a; +ERROR 42S22: Unknown column 'out_a' in 'where clause' +SELECT a AS out_a, MIN(b) FROM t1 +WHERE b > (SELECT MIN(b) FROM t1 WHERE a = out_a) +GROUP BY a; +ERROR 42S22: Unknown column 'out_a' in 'where clause' +EXPLAIN +SELECT a AS out_a, MIN(b) FROM t1 t1_outer +WHERE b > (SELECT MIN(b) FROM t1 WHERE a = t1_outer.a) +GROUP BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1_outer ALL NULL NULL NULL NULL 4 Using where; Using temporary; Using filesort +2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 4 Using where +SELECT a AS out_a, MIN(b) FROM t1 t1_outer +WHERE b > (SELECT MIN(b) FROM t1 WHERE a = t1_outer.a) +GROUP BY a; +out_a MIN(b) +1 2 +2 4 +DROP TABLE t1; +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (a INT); +INSERT INTO t1 VALUES (1),(2); +INSERT INTO t2 VALUES (1),(2); +SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a)); +2 +2 +2 +EXPLAIN EXTENDED +SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 +Note 1003 select 2 AS `2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a`>(exists(select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`))) +EXPLAIN EXTENDED +SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a) UNION +(SELECT 1 FROM t2 WHERE t1.a = t2.a)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where +3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 2 100.00 Using where +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 +Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1 +Note 1003 select 2 AS `2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a`>(exists((select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)) union (select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)))) +DROP TABLE t1,t2; +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1(f11 int, f12 int); +create table t2(f21 int unsigned not null, f22 int, f23 varchar(10)); +insert into t1 values(1,1),(2,2), (3, 3); +insert into t2 +select -1 , (@a:=(A.a + 10 * (B.a + 10 * (C.a+10*D.a))))/5000 + 1, @a +from t0 A, t0 B, t0 C, t0 D; +set session sort_buffer_size= 33*1024; +select count(*) from t1 where f12 = +(select f22 from t2 where f22 = f12 order by f21 desc, f22, f23 limit 1); +count(*) +3 +drop table t0,t1,t2; +CREATE TABLE t4 ( +f7 varchar(32) collate utf8_bin NOT NULL default '', +f10 varchar(32) collate utf8_bin default NULL, +PRIMARY KEY (f7) +); +INSERT INTO t4 VALUES(1,1), (2,null); +CREATE TABLE t2 ( +f4 varchar(32) collate utf8_bin NOT NULL default '', +f2 varchar(50) collate utf8_bin default NULL, +f3 varchar(10) collate utf8_bin default NULL, +PRIMARY KEY (f4), +UNIQUE KEY uk1 (f2) +); +INSERT INTO t2 VALUES(1,1,null), (2,2,null); +CREATE TABLE t1 ( +f8 varchar(32) collate utf8_bin NOT NULL default '', +f1 varchar(10) collate utf8_bin default NULL, +f9 varchar(32) collate utf8_bin default NULL, +PRIMARY KEY (f8) +); +INSERT INTO t1 VALUES (1,'P',1), (2,'P',1), (3,'R',2); +CREATE TABLE t3 ( +f6 varchar(32) collate utf8_bin NOT NULL default '', +f5 varchar(50) collate utf8_bin default NULL, +PRIMARY KEY (f6) +); +INSERT INTO t3 VALUES (1,null), (2,null); +SELECT +IF(t1.f1 = 'R', a1.f2, t2.f2) AS a4, +IF(t1.f1 = 'R', a1.f3, t2.f3) AS f3, +SUM( +IF( +(SELECT VPC.f2 +FROM t2 VPC, t4 a2, t2 a3 +WHERE +VPC.f4 = a2.f10 AND a3.f2 = a4 +LIMIT 1) IS NULL, +0, +t3.f5 +) +) AS a6 +FROM +t2, t3, t1 JOIN t2 a1 ON t1.f9 = a1.f4 +GROUP BY a4; +a4 f3 a6 +1 NULL NULL +2 NULL NULL +DROP TABLE t1, t2, t3, t4; +create table t1 (a float(5,4) zerofill); +create table t2 (a float(5,4),b float(2,0)); +select t1.a from t1 where +t1.a= (select b from t2 limit 1) and not +t1.a= (select a from t2 limit 1) ; +a +drop table t1, t2; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2); +SET @save_join_cache_level=@@join_cache_level; +SET join_cache_level=0; +EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE 1 IN (SELECT min(a) FROM t1 GROUP BY a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <subquery2> const distinct_key distinct_key 4 const 1 100.00 +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 +2 MATERIALIZED t1 ALL NULL NULL NULL NULL 2 100.00 Using temporary +Warnings: +Note 1003 select 1 AS `1` from <materialize> (select min(`test`.`t1`.`a`) from `test`.`t1` group by `test`.`t1`.`a`) join `test`.`t1` where (`<subquery2>`.`min(a)` = 1) +EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE 1 IN (SELECT min(a) FROM t1 WHERE a > 3 GROUP BY a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <subquery2> const distinct_key distinct_key 4 const 1 100.00 +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 +2 MATERIALIZED t1 ALL NULL NULL NULL NULL 2 100.00 Using where; Using temporary +Warnings: +Note 1003 select 1 AS `1` from <materialize> (select min(`test`.`t1`.`a`) from `test`.`t1` where (`test`.`t1`.`a` > 3) group by `test`.`t1`.`a`) join `test`.`t1` where (`<subquery2>`.`min(a)` = 1) +SET join_cache_level=@save_join_cache_level; +DROP TABLE t1; +# +# Bug#45061: Incorrectly market field caused wrong result. +# +CREATE TABLE `C` ( +`int_nokey` int(11) NOT NULL, +`int_key` int(11) NOT NULL, +KEY `int_key` (`int_key`) +); +INSERT INTO `C` VALUES (9,9), (0,0), (8,6), (3,6), (7,6), (0,4), +(1,7), (9,4), (0,8), (9,4), (0,7), (5,5), (0,0), (8,5), (8,7), +(5,2), (1,8), (7,0), (0,9), (9,5); +SELECT * FROM C WHERE `int_key` IN (SELECT `int_nokey`); +int_nokey int_key +9 9 +0 0 +5 5 +0 0 +EXPLAIN EXTENDED SELECT * FROM C WHERE `int_key` IN (SELECT `int_nokey`); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE C ALL NULL NULL NULL NULL 20 100.00 Using where +DROP TABLE C; +# End of test for bug#45061. +# +# Bug #46749: Segfault in add_key_fields() with outer subquery level +# field references +# +CREATE TABLE t1 ( +a int, +b int, +UNIQUE (a), KEY (b) +); +INSERT INTO t1 VALUES (1,1), (2,1); +CREATE TABLE st1 like t1; +INSERT INTO st1 VALUES (1,1), (2,1); +CREATE TABLE st2 like t1; +INSERT INTO st2 VALUES (1,1), (2,1); +EXPLAIN +SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b) +FROM t1 +WHERE a = 230; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b) +FROM t1 +WHERE a = 230; +MAX(b) (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b) +NULL NULL +DROP TABLE t1, st1, st2; +# +# Bug #48709: Assertion failed in sql_select.cc:11782: +# int join_read_key(JOIN_TAB*) +# +CREATE TABLE t1 (pk int PRIMARY KEY, int_key int); +INSERT INTO t1 VALUES (10,1), (14,1); +CREATE TABLE t2 (pk int PRIMARY KEY, int_key int); +INSERT INTO t2 VALUES (3,3), (5,NULL), (7,3); +# should have eq_ref for t1 +EXPLAIN +SELECT * FROM t2 outr +WHERE outr.int_key NOT IN (SELECT t1.pk FROM t1, t2) +ORDER BY outr.pk; +id select_type table type possible_keys key key_len ref rows Extra +x x outr ALL x x x x x x +x x t1 eq_ref x x x x x x +x x t2 index x x x x x x +# should not crash on debug binaries +SELECT * FROM t2 outr +WHERE outr.int_key NOT IN (SELECT t1.pk FROM t1, t2) +ORDER BY outr.pk; +pk int_key +3 3 +7 3 +DROP TABLE t1,t2; +# +# Bug#12329653 +# EXPLAIN, UNION, PREPARED STATEMENT, CRASH, SQL_FULL_GROUP_BY +# +CREATE TABLE t1(a1 int); +INSERT INTO t1 VALUES (1),(2); +SELECT @@session.sql_mode INTO @old_sql_mode; +SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; +EXPLAIN EXTENDED +SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 +2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 +Warnings: +Note 1003 select 1 AS `1` from `test`.`t1` where 1 +SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t1); +1 +1 +1 +PREPARE stmt FROM +'SELECT 1 UNION ALL +SELECT 1 FROM t1 +ORDER BY +(SELECT 1 FROM t1 AS t1_0 + WHERE 1 < SOME (SELECT a1 FROM t1) +)' ; +EXECUTE stmt ; +ERROR 21000: Subquery returns more than 1 row +EXECUTE stmt ; +ERROR 21000: Subquery returns more than 1 row +SET SESSION sql_mode=@old_sql_mode; +DEALLOCATE PREPARE stmt; +DROP TABLE t1; +# +# Bug#12763207 - ASSERT IN SUBSELECT::SINGLE_VALUE_TRANSFORMER +# +CREATE TABLE t1(a1 int); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2(a1 int); +INSERT INTO t2 VALUES (3); +SELECT @@session.sql_mode INTO @old_sql_mode; +SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; +SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2 FROM t2); +1 +1 +1 +SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2); +1 +1 +1 +SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2); +1 +SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2); +1 +1 +1 +SET SESSION sql_mode=@old_sql_mode; +DROP TABLE t1, t2; +# +# Bug#12763207 - ASSERT IN SUBSELECT::SINGLE_VALUE_TRANSFORMER +# +create table t2(i int); +insert into t2 values(0); +SELECT @@session.sql_mode INTO @old_sql_mode; +SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; +CREATE VIEW v1 AS +SELECT 'f' FROM t2 UNION SELECT 'x' FROM t2 +; +CREATE TABLE t1 ( +pk int NOT NULL, +col_varchar_key varchar(1) DEFAULT NULL, +PRIMARY KEY (pk), +KEY col_varchar_key (col_varchar_key) +); +SELECT t1.pk +FROM t1 +WHERE t1.col_varchar_key < ALL ( SELECT * FROM v1 ) +; +pk +SET SESSION sql_mode=@old_sql_mode; +drop table t2, t1; +drop view v1; +End of 5.0 tests. +create table t_out (subcase char(3), +a1 char(2), b1 char(2), c1 char(2)); +create table t_in (a2 char(2), b2 char(2), c2 char(2)); +insert into t_out values ('A.1','2a', NULL, '2a'); +insert into t_out values ('A.3', '2a', NULL, '2a'); +insert into t_out values ('A.4', '2a', NULL, 'xx'); +insert into t_out values ('B.1', '2a', '2a', '2a'); +insert into t_out values ('B.2', '2a', '2a', '2a'); +insert into t_out values ('B.3', '3a', 'xx', '3a'); +insert into t_out values ('B.4', 'xx', '3a', '3a'); +insert into t_in values ('1a', '1a', '1a'); +insert into t_in values ('2a', '2a', '2a'); +insert into t_in values (NULL, '2a', '2a'); +insert into t_in values ('3a', NULL, '3a'); + +Test general IN semantics (not top-level) + +case A.1 +select subcase, +(a1, b1, c1) IN (select * from t_in where a2 = 'no_match') pred_in, +(a1, b1, c1) NOT IN (select * from t_in where a2 = 'no_match') pred_not_in +from t_out where subcase = 'A.1'; +subcase pred_in pred_not_in +A.1 0 1 +case A.2 - impossible +case A.3 +select subcase, +(a1, b1, c1) IN (select * from t_in) pred_in, +(a1, b1, c1) NOT IN (select * from t_in) pred_not_in +from t_out where subcase = 'A.3'; +subcase pred_in pred_not_in +A.3 NULL NULL +case A.4 +select subcase, +(a1, b1, c1) IN (select * from t_in) pred_in, +(a1, b1, c1) NOT IN (select * from t_in) pred_not_in +from t_out where subcase = 'A.4'; +subcase pred_in pred_not_in +A.4 0 1 +case B.1 +select subcase, +(a1, b1, c1) IN (select * from t_in where a2 = 'no_match') pred_in, +(a1, b1, c1) NOT IN (select * from t_in where a2 = 'no_match') pred_not_in +from t_out where subcase = 'B.1'; +subcase pred_in pred_not_in +B.1 0 1 +case B.2 +select subcase, +(a1, b1, c1) IN (select * from t_in) pred_in, +(a1, b1, c1) NOT IN (select * from t_in) pred_not_in +from t_out where subcase = 'B.2'; +subcase pred_in pred_not_in +B.2 1 0 +case B.3 +select subcase, +(a1, b1, c1) IN (select * from t_in) pred_in, +(a1, b1, c1) NOT IN (select * from t_in) pred_not_in +from t_out where subcase = 'B.3'; +subcase pred_in pred_not_in +B.3 NULL NULL +case B.4 +select subcase, +(a1, b1, c1) IN (select * from t_in) pred_in, +(a1, b1, c1) NOT IN (select * from t_in) pred_not_in +from t_out where subcase = 'B.4'; +subcase pred_in pred_not_in +B.4 0 1 + +Test IN as top-level predicate, and +as non-top level for cases A.3, B.3 (the only cases with NULL result). + +case A.1 +select case when count(*) > 0 then 'T' else 'F' end as pred_in from t_out +where subcase = 'A.1' and +(a1, b1, c1) IN (select * from t_in where a1 = 'no_match'); +pred_in +F +select case when count(*) > 0 then 'T' else 'F' end as pred_not_in from t_out +where subcase = 'A.1' and +(a1, b1, c1) NOT IN (select * from t_in where a1 = 'no_match'); +pred_not_in +T +select case when count(*) > 0 then 'T' else 'F' end as not_pred_in from t_out +where subcase = 'A.1' and +NOT((a1, b1, c1) IN (select * from t_in where a1 = 'no_match')); +not_pred_in +T +case A.3 +select case when count(*) > 0 then 'T' else 'F' end as pred_in from t_out +where subcase = 'A.3' and +(a1, b1, c1) IN (select * from t_in); +pred_in +F +select case when count(*) > 0 then 'T' else 'F' end as pred_not_in from t_out +where subcase = 'A.3' and +(a1, b1, c1) NOT IN (select * from t_in); +pred_not_in +F +select case when count(*) > 0 then 'T' else 'F' end as not_pred_in from t_out +where subcase = 'A.3' and +NOT((a1, b1, c1) IN (select * from t_in)); +not_pred_in +F +select case when count(*) > 0 then 'N' else 'wrong result' end as pred_in from t_out +where subcase = 'A.3' and +((a1, b1, c1) IN (select * from t_in)) is NULL and +((a1, b1, c1) NOT IN (select * from t_in)) is NULL; +pred_in +N +case A.4 +select case when count(*) > 0 then 'T' else 'F' end as pred_in from t_out +where subcase = 'A.4' and +(a1, b1, c1) IN (select * from t_in); +pred_in +F +select case when count(*) > 0 then 'T' else 'F' end as pred_not_in from t_out +where subcase = 'A.4' and +(a1, b1, c1) NOT IN (select * from t_in); +pred_not_in +T +select case when count(*) > 0 then 'T' else 'F' end as not_pred_in from t_out +where subcase = 'A.4' and +NOT((a1, b1, c1) IN (select * from t_in)); +not_pred_in +T +case B.1 +select case when count(*) > 0 then 'T' else 'F' end as pred_in from t_out +where subcase = 'B.1' and +(a1, b1, c1) IN (select * from t_in where a1 = 'no_match'); +pred_in +F +select case when count(*) > 0 then 'T' else 'F' end as pred_not_in from t_out +where subcase = 'B.1' and +(a1, b1, c1) NOT IN (select * from t_in where a1 = 'no_match'); +pred_not_in +T +select case when count(*) > 0 then 'T' else 'F' end as not_pred_in from t_out +where subcase = 'B.1' and +NOT((a1, b1, c1) IN (select * from t_in where a1 = 'no_match')); +not_pred_in +T +case B.2 +select case when count(*) > 0 then 'T' else 'F' end as pred_in from t_out +where subcase = 'B.2' and +(a1, b1, c1) IN (select * from t_in); +pred_in +T +select case when count(*) > 0 then 'T' else 'F' end as pred_not_in from t_out +where subcase = 'B.2' and +(a1, b1, c1) NOT IN (select * from t_in); +pred_not_in +F +select case when count(*) > 0 then 'T' else 'F' end as not_pred_in from t_out +where subcase = 'B.2' and +NOT((a1, b1, c1) IN (select * from t_in)); +not_pred_in +F +case B.3 +select case when count(*) > 0 then 'T' else 'F' end as pred_in from t_out +where subcase = 'B.3' and +(a1, b1, c1) IN (select * from t_in); +pred_in +F +select case when count(*) > 0 then 'T' else 'F' end as pred_not_in from t_out +where subcase = 'B.3' and +(a1, b1, c1) NOT IN (select * from t_in); +pred_not_in +F +select case when count(*) > 0 then 'T' else 'F' end as not_pred_in from t_out +where subcase = 'B.3' and +NOT((a1, b1, c1) IN (select * from t_in)); +not_pred_in +F +select case when count(*) > 0 then 'N' else 'wrong result' end as pred_in from t_out +where subcase = 'B.3' and +((a1, b1, c1) IN (select * from t_in)) is NULL and +((a1, b1, c1) NOT IN (select * from t_in)) is NULL; +pred_in +N +case B.4 +select case when count(*) > 0 then 'T' else 'F' end as pred_in from t_out +where subcase = 'B.4' and +(a1, b1, c1) IN (select * from t_in); +pred_in +F +select case when count(*) > 0 then 'T' else 'F' end as pred_not_in from t_out +where subcase = 'B.4' and +(a1, b1, c1) NOT IN (select * from t_in); +pred_not_in +T +select case when count(*) > 0 then 'T' else 'F' end as not_pred_in from t_out +where subcase = 'B.4' and +NOT((a1, b1, c1) IN (select * from t_in)); +not_pred_in +T +drop table t_out; +drop table t_in; +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (2,22),(1,11),(2,22); +SELECT a FROM t1 WHERE (SELECT COUNT(b) FROM DUAL) > 0 GROUP BY a; +a +1 +2 +SELECT a FROM t1 WHERE (SELECT COUNT(b) FROM DUAL) > 1 GROUP BY a; +a +SELECT a FROM t1 t0 +WHERE (SELECT COUNT(t0.b) FROM t1 t WHERE t.b>20) GROUP BY a; +a +1 +2 +SET @@sql_mode='ansi'; +SELECT a FROM t1 WHERE (SELECT COUNT(b) FROM DUAL) > 0 GROUP BY a; +ERROR HY000: Invalid use of group function +SELECT a FROM t1 WHERE (SELECT COUNT(b) FROM DUAL) > 1 GROUP BY a; +ERROR HY000: Invalid use of group function +SELECT a FROM t1 t0 +WHERE (SELECT COUNT(t0.b) FROM t1 t WHERE t.b>20) GROUP BY a; +ERROR HY000: Invalid use of group function +SET @@sql_mode=default; +DROP TABLE t1; +CREATE TABLE t1 (s1 CHAR(1)); +INSERT INTO t1 VALUES ('a'); +SELECT * FROM t1 WHERE _utf8'a' = ANY (SELECT s1 FROM t1); +s1 +a +DROP TABLE t1; +CREATE TABLE t1(c INT, KEY(c)); +CREATE TABLE t2(a INT, b INT); +INSERT INTO t2 VALUES (1, 10), (2, NULL); +INSERT INTO t1 VALUES (1), (3); +SELECT * FROM t2 WHERE b NOT IN (SELECT max(t.c) FROM t1, t1 t WHERE t.c>10); +a b +DROP TABLE t1,t2; +CREATE TABLE t1(pk INT PRIMARY KEY, a INT, INDEX idx(a)); +INSERT INTO t1 VALUES (1, 10), (3, 30), (2, 20); +CREATE TABLE t2(pk INT PRIMARY KEY, a INT, b INT, INDEX idxa(a)); +INSERT INTO t2 VALUES (2, 20, 700), (1, 10, 200), (4, 10, 100); +SELECT * FROM t1 +WHERE EXISTS (SELECT DISTINCT a FROM t2 WHERE t1.a < t2.a ORDER BY b); +pk a +1 10 +DROP TABLE t1,t2; +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), KEY b (b)); +INSERT INTO t1 VALUES (1,NULL), (9,NULL); +CREATE TABLE t2 ( +a INT, +b INT, +c INT, +d INT, +PRIMARY KEY (a), +UNIQUE KEY b (b,c,d), +KEY b_2 (b), +KEY c (c), +KEY d (d) +); +INSERT INTO t2 VALUES +(43, 2, 11 ,30), +(44, 2, 12 ,30), +(45, 1, 1 ,10000), +(46, 1, 2 ,10000), +(556,1, 32 ,10000); +CREATE TABLE t3 ( +a INT, +b INT, +c INT, +PRIMARY KEY (a), +UNIQUE KEY b (b,c), +KEY c (c), +KEY b_2 (b) +); +INSERT INTO t3 VALUES (1,1,1), (2,32,1); +explain +SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 Using index +1 PRIMARY t3 ref b,b_2 b 5 test.t1.a 1 Using index +2 DEPENDENT SUBQUERY t2 ref b,b_2,c b 10 test.t3.c,test.t1.a 1 Using where; Using index +SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a; +a incorrect +1 1 +DROP TABLE t1,t2,t3; +CREATE TABLE t1 (id int); +CREATE TABLE t2 (id int, c int); +INSERT INTO t1 (id) VALUES (1); +INSERT INTO t2 (id) VALUES (1); +INSERT INTO t1 (id) VALUES (1); +INSERT INTO t2 (id) VALUES (1); +CREATE VIEW v1 AS +SELECT t2.c AS c FROM t1, t2 +WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; +UPDATE v1 SET c=1; +CREATE VIEW v2 (a,b) AS +SELECT t2.id, t2.c AS c FROM t1, t2 +WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; +INSERT INTO v2(a,b) VALUES (2,2); +ERROR HY000: CHECK OPTION failed 'test.v2' +SELECT * FROM v1; +c +1 +1 +1 +1 +CREATE VIEW v3 AS +SELECT t2.c AS c FROM t2 +WHERE 1 IN (SELECT id FROM t1) WITH CHECK OPTION; +DELETE FROM v3; +DROP VIEW v1,v2,v3; +DROP TABLE t1,t2; +# +# BUG#37822 Correlated subquery with IN and IS UNKNOWN provides wrong result +# +create table t1(id integer primary key, g integer, v integer, s char(1)); +create table t2(id integer primary key, g integer, v integer, s char(1)); +insert into t1 values +(10, 10, 10, 'l'), +(20, 20, 20, 'l'), +(40, 40, 40, 'l'), +(41, 40, null, 'l'), +(50, 50, 50, 'l'), +(51, 50, null, 'l'), +(60, 60, 60, 'l'), +(61, 60, null, 'l'), +(70, 70, 70, 'l'), +(90, 90, null, 'l'); +insert into t2 values +(10, 10, 10, 'r'), +(30, 30, 30, 'r'), +(50, 50, 50, 'r'), +(60, 60, 60, 'r'), +(61, 60, null, 'r'), +(70, 70, 70, 'r'), +(71, 70, null, 'r'), +(80, 80, 80, 'r'), +(81, 80, null, 'r'), +(100,100,null, 'r'); +select * +from t1 +where v in(select v +from t2 +where t1.g=t2.g) is unknown; +id g v s +51 50 NULL l +61 60 NULL l +drop table t1, t2; +# +# Bug#37822 Correlated subquery with IN and IS UNKNOWN provides wrong result +# +create table t1(id integer primary key, g integer, v integer, s char(1)); +create table t2(id integer primary key, g integer, v integer, s char(1)); +insert into t1 values +(10, 10, 10, 'l'), +(20, 20, 20, 'l'), +(40, 40, 40, 'l'), +(41, 40, null, 'l'), +(50, 50, 50, 'l'), +(51, 50, null, 'l'), +(60, 60, 60, 'l'), +(61, 60, null, 'l'), +(70, 70, 70, 'l'), +(90, 90, null, 'l'); +insert into t2 values +(10, 10, 10, 'r'), +(30, 30, 30, 'r'), +(50, 50, 50, 'r'), +(60, 60, 60, 'r'), +(61, 60, null, 'r'), +(70, 70, 70, 'r'), +(71, 70, null, 'r'), +(80, 80, 80, 'r'), +(81, 80, null, 'r'), +(100,100,null, 'r'); +select * +from t1 +where v in(select v +from t2 +where t1.g=t2.g) is unknown; +id g v s +51 50 NULL l +61 60 NULL l +drop table t1, t2; +# +# Bug#33204: INTO is allowed in subselect, causing inconsistent results +# +CREATE TABLE t1( a INT ); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2( a INT, b INT ); +SELECT * +FROM (SELECT a INTO @var FROM t1 WHERE a = 2) t1a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @var FROM t1 WHERE a = 2) t1a' at line 2 +SELECT * +FROM (SELECT a INTO OUTFILE 'file' FROM t1 WHERE a = 2) t1a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO OUTFILE 'file' FROM t1 WHERE a = 2) t1a' at line 2 +SELECT * +FROM (SELECT a INTO DUMPFILE 'file' FROM t1 WHERE a = 2) t1a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO DUMPFILE 'file' FROM t1 WHERE a = 2) t1a' at line 2 +SELECT * FROM ( +SELECT 1 a +UNION +SELECT a INTO @var FROM t1 WHERE a = 2 +) t1a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @var FROM t1 WHERE a = 2 +) t1a' at line 4 +SELECT * FROM ( +SELECT 1 a +UNION +SELECT a INTO OUTFILE 'file' FROM t1 WHERE a = 2 +) t1a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO OUTFILE 'file' FROM t1 WHERE a = 2 +) t1a' at line 4 +SELECT * FROM ( +SELECT 1 a +UNION +SELECT a INTO DUMPFILE 'file' FROM t1 WHERE a = 2 +) t1a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO DUMPFILE 'file' FROM t1 WHERE a = 2 +) t1a' at line 4 +SELECT * FROM (SELECT a FROM t1 WHERE a = 2) t1a; +a +2 +SELECT * FROM ( +SELECT a FROM t1 WHERE a = 2 +UNION +SELECT a FROM t1 WHERE a = 2 +) t1a; +a +2 +SELECT * FROM ( +SELECT 1 a +UNION +SELECT a FROM t1 WHERE a = 2 +UNION +SELECT a FROM t1 WHERE a = 2 +) t1a; +a +1 +2 +SELECT * FROM ((SELECT 1 a) UNION SELECT 1 a); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1 +SELECT * FROM (SELECT 1 a UNION (SELECT 1 a)) alias; +a +1 +SELECT * FROM (SELECT 1 UNION SELECT 1) t1a; +1 +1 +SELECT * FROM ((SELECT 1 a INTO @a)) t1a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @a)) t1a' at line 1 +SELECT * FROM ((SELECT 1 a INTO OUTFILE 'file' )) t1a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO OUTFILE 'file' )) t1a' at line 1 +SELECT * FROM ((SELECT 1 a INTO DUMPFILE 'file' )) t1a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO DUMPFILE 'file' )) t1a' at line 1 +SELECT * FROM (SELECT 1 a UNION (SELECT 1 a INTO @a)) t1a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @a)) t1a' at line 1 +SELECT * FROM (SELECT 1 a UNION (SELECT 1 a INTO DUMPFILE 'file' )) t1a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO DUMPFILE 'file' )) t1a' at line 1 +SELECT * FROM (SELECT 1 a UNION (SELECT 1 a INTO OUTFILE 'file' )) t1a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO OUTFILE 'file' )) t1a' at line 1 +SELECT * FROM (SELECT 1 a UNION ((SELECT 1 a INTO @a))) t1a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @a))) t1a' at line 1 +SELECT * FROM (SELECT 1 a UNION ((SELECT 1 a INTO DUMPFILE 'file' ))) t1a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO DUMPFILE 'file' ))) t1a' at line 1 +SELECT * FROM (SELECT 1 a UNION ((SELECT 1 a INTO OUTFILE 'file' ))) t1a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO OUTFILE 'file' ))) t1a' at line 1 +SELECT * FROM (SELECT 1 a ORDER BY a) t1a; +a +1 +SELECT * FROM (SELECT 1 a UNION SELECT 1 a ORDER BY a) t1a; +a +1 +SELECT * FROM (SELECT 1 a UNION SELECT 1 a LIMIT 1) t1a; +a +1 +SELECT * FROM (SELECT 1 a UNION SELECT 1 a ORDER BY a LIMIT 1) t1a; +a +1 +SELECT * FROM t1 JOIN (SELECT 1 UNION SELECT 1) alias ON 1; +a 1 +1 1 +2 1 +SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1 +SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1 +SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1 +SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1 +SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1 +SELECT * FROM t1 JOIN (t1 t1a) ON 1; +a a +1 1 +2 1 +1 2 +2 2 +SELECT * FROM t1 JOIN ((t1 t1a)) ON 1; +a a +1 1 +2 1 +1 2 +2 2 +SELECT * FROM (t1 t1a); +a +1 +2 +SELECT * FROM ((t1 t1a)); +a +1 +2 +SELECT * FROM t1 JOIN (SELECT 1 t1a) alias ON 1; +a t1a +1 1 +2 1 +SELECT * FROM t1 JOIN ((SELECT 1 t1a)) alias ON 1; +a t1a +1 1 +2 1 +SELECT * FROM t1 JOIN (SELECT 1 a) a ON 1; +a a +1 1 +2 1 +SELECT * FROM t1 JOIN ((SELECT 1 a)) a ON 1; +a a +1 1 +2 1 +SELECT * FROM (t1 JOIN (SELECT 1) t1a1 ON 1) t1a2; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a2' at line 1 +SELECT * FROM t1 WHERE a = ALL ( SELECT 1 ); +a +1 +SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION SELECT 1 ); +a +1 +SELECT * FROM t1 WHERE a = ANY ( SELECT 3 UNION SELECT 1 ); +a +1 +SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION SELECT 1 INTO @a); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @a)' at line 1 +SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION SELECT 1 INTO OUTFILE 'file' ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1 +SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION SELECT 1 INTO DUMPFILE 'file' ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1 +SELECT * FROM t1 WHERE a = ( SELECT 1 ); +a +1 +SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 ); +a +1 +SELECT * FROM t1 WHERE a = ( SELECT 1 INTO @a); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @a)' at line 1 +SELECT * FROM t1 WHERE a = ( SELECT 1 INTO OUTFILE 'file' ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1 +SELECT * FROM t1 WHERE a = ( SELECT 1 INTO DUMPFILE 'file' ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1 +SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 INTO @a); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @a)' at line 1 +SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 INTO OUTFILE 'file' ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1 +SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 INTO DUMPFILE 'file' ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1 +SELECT ( SELECT 1 INTO @v ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @v )' at line 1 +SELECT ( SELECT 1 INTO OUTFILE 'file' ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1 +SELECT ( SELECT 1 INTO DUMPFILE 'file' ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1 +SELECT ( SELECT 1 UNION SELECT 1 INTO @v ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @v )' at line 1 +SELECT ( SELECT 1 UNION SELECT 1 INTO OUTFILE 'file' ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1 +SELECT ( SELECT 1 UNION SELECT 1 INTO DUMPFILE 'file' ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1 +SELECT ( SELECT a FROM t1 WHERE a = 1 ), a FROM t1; +( SELECT a FROM t1 WHERE a = 1 ) a +1 1 +1 2 +SELECT ( SELECT a FROM t1 WHERE a = 1 UNION SELECT 1 ), a FROM t1; +( SELECT a FROM t1 WHERE a = 1 UNION SELECT 1 ) a +1 1 +1 2 +SELECT * FROM t2 WHERE (a, b) IN (SELECT a, b FROM t2); +a b +SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1 +( SELECT 1 UNION SELECT 1 ) UNION SELECT 1; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1' at line 1 +SELECT ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1 +SELECT ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1' at line 1 +SELECT ( SELECT 1 UNION SELECT 1 UNION SELECT 1 ); +( SELECT 1 UNION SELECT 1 UNION SELECT 1 ) +1 +SELECT ((SELECT 1 UNION SELECT 1 UNION SELECT 1)); +((SELECT 1 UNION SELECT 1 UNION SELECT 1)) +1 +SELECT * FROM ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1 +SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') UNION SELECT 1 )' at line 1 +SELECT * FROM ( SELECT 1 UNION SELECT 1 UNION SELECT 1 ) a; +1 +1 +SELECT * FROM t1 WHERE a = ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1 +SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1 +SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1 +SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1 +SELECT * FROM t1 WHERE a = ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1 +SELECT * FROM t1 WHERE a = ALL ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1 +SELECT * FROM t1 WHERE a = ANY ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1 +SELECT * FROM t1 WHERE a IN ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1 +SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 UNION SELECT 1 ); +a +1 +SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION SELECT 1 UNION SELECT 1 ); +a +1 +SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION SELECT 1 UNION SELECT 1 ); +a +1 +SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION SELECT 1 UNION SELECT 1 ); +a +1 +SELECT * FROM t1 WHERE EXISTS ( SELECT 1 UNION SELECT 1 INTO @v ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @v )' at line 1 +SELECT EXISTS(SELECT 1+1); +EXISTS(SELECT 1+1) +1 +SELECT EXISTS(SELECT 1+1 INTO @test); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @test)' at line 1 +SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION SELECT 1 INTO @v ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @v )' at line 1 +SELECT * FROM t1 WHERE EXISTS ( SELECT 1 INTO @v ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @v )' at line 1 +SELECT * FROM t1 WHERE a IN ( SELECT 1 INTO @v ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @v )' at line 1 +DROP TABLE t1, t2; +CREATE TABLE t1 (a ENUM('rainbow')); +INSERT INTO t1 VALUES (),(),(),(),(); +SELECT 1 FROM t1 GROUP BY (SELECT 1 FROM t1 ORDER BY AVG(LAST_INSERT_ID())); +1 +1 +DROP TABLE t1; +CREATE TABLE t1 (a LONGBLOB); +INSERT INTO t1 SET a = 'aaaa'; +INSERT INTO t1 SET a = 'aaaa'; +SELECT 1 FROM t1 GROUP BY +(SELECT LAST_INSERT_ID() FROM t1 ORDER BY MIN(a) ASC LIMIT 1); +1 +1 +DROP TABLE t1; +# +# Bug #49512 : subquery with aggregate function crash +# subselect_single_select_engine::exec() +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(); +# should not crash +SELECT 1 FROM t1 WHERE a <> SOME +( +SELECT MAX((SELECT a FROM t1 LIMIT 1)) AS d +FROM t1,t1 a +); +1 +DROP TABLE t1; +# +# Bug #45989 take 2 : memory leak after explain encounters an +# error in the query +# +CREATE TABLE t1(a LONGTEXT); +INSERT INTO t1 VALUES (repeat('a',@@global.max_allowed_packet)); +INSERT INTO t1 VALUES (repeat('b',@@global.max_allowed_packet)); +EXPLAIN EXTENDED SELECT DISTINCT 1 FROM t1, +(SELECT DISTINCTROW a AS away FROM t1 GROUP BY a WITH ROLLUP) AS d1 +WHERE t1.a = d1.a; +ERROR 42S22: Unknown column 'd1.a' in 'where clause' +DROP TABLE t1; +Set up test tables. +CREATE TABLE t1 ( +t1_id INT UNSIGNED, +PRIMARY KEY(t1_id) +) Engine=MyISAM; +INSERT INTO t1 (t1_id) VALUES (1), (2), (3), (4), (5); +CREATE TABLE t2 SELECT * FROM t1; +CREATE TABLE t3 ( +t3_id INT UNSIGNED AUTO_INCREMENT, +t1_id INT UNSIGNED, +amount DECIMAL(16,2), +PRIMARY KEY(t3_id), +KEY(t1_id) +) Engine=MyISAM; +INSERT INTO t3 (t1_id, t3_id, amount) +VALUES (1, 1, 100.00), (2, 2, 200.00), (4, 4, 400.00); +This is the 'inner query' running by itself. +Produces correct results. +SELECT +t1.t1_id, +IFNULL((SELECT SUM(amount) FROM t3 WHERE t3.t1_id=t1.t1_id), 0) AS total_amount +FROM +t1 +LEFT JOIN t2 ON t2.t1_id=t1.t1_id +GROUP BY +t1.t1_id +; +t1_id total_amount +1 100.00 +2 200.00 +3 0.00 +4 400.00 +5 0.00 +SELECT * FROM (the same inner query) +Produces correct results. +SELECT * FROM ( +SELECT +t1.t1_id, +IFNULL((SELECT SUM(amount) FROM t3 WHERE t3.t1_id=t1.t1_id), 0) AS total_amount +FROM +t1 +LEFT JOIN t2 ON t2.t1_id=t1.t1_id +GROUP BY +t1.t1_id +) AS t; +t1_id total_amount +1 100.00 +2 200.00 +3 0.00 +4 400.00 +5 0.00 +Now make t2.t1_id part of a key. +ALTER TABLE t2 ADD PRIMARY KEY(t1_id); +Same inner query by itself. +Still correct results. +SELECT +t1.t1_id, +IFNULL((SELECT SUM(amount) FROM t3 WHERE t3.t1_id=t1.t1_id), 0) AS total_amount +FROM +t1 +LEFT JOIN t2 ON t2.t1_id=t1.t1_id +GROUP BY +t1.t1_id; +t1_id total_amount +1 100.00 +2 200.00 +3 0.00 +4 400.00 +5 0.00 +SELECT * FROM (the same inner query), now with indexes on the LEFT JOIN +SELECT * FROM ( +SELECT +t1.t1_id, +IFNULL((SELECT SUM(amount) FROM t3 WHERE t3.t1_id=t1.t1_id), 0) AS total_amount +FROM +t1 +LEFT JOIN t2 ON t2.t1_id=t1.t1_id +GROUP BY +t1.t1_id +) AS t; +t1_id total_amount +1 100.00 +2 200.00 +3 0.00 +4 400.00 +5 0.00 +DROP TABLE t3; +DROP TABLE t2; +DROP TABLE t1; +# +# Bug #52711: Segfault when doing EXPLAIN SELECT with +# union...order by (select... where...) +# +CREATE TABLE t1 (a VARCHAR(10), FULLTEXT KEY a (a)); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1),(2); +# Should not crash +EXPLAIN +SELECT * FROM t2 UNION SELECT * FROM t2 +ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE)); +# Should not crash +SELECT * FROM t2 UNION SELECT * FROM t2 +ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE)); +DROP TABLE t1,t2; +# +# Bug #58818: Incorrect result for IN/ANY subquery +# with HAVING condition +# +CREATE TABLE t1(i INT); +INSERT INTO t1 VALUES (1), (2), (3); +CREATE TABLE t1s(i INT); +INSERT INTO t1s VALUES (10), (20), (30); +CREATE TABLE t2s(i INT); +INSERT INTO t2s VALUES (100), (200), (300); +SELECT * FROM t1 +WHERE t1.i NOT IN +( +SELECT STRAIGHT_JOIN t2s.i +FROM +t1s LEFT OUTER JOIN t2s ON t2s.i = t1s.i +HAVING t2s.i = 999 +); +i +1 +2 +3 +SELECT * FROM t1 +WHERE t1.I IN +( +SELECT STRAIGHT_JOIN t2s.i +FROM +t1s LEFT OUTER JOIN t2s ON t2s.i = t1s.i +HAVING t2s.i = 999 +) IS UNKNOWN; +i +SELECT * FROM t1 +WHERE NOT t1.I = ANY +( +SELECT STRAIGHT_JOIN t2s.i +FROM +t1s LEFT OUTER JOIN t2s ON t2s.i = t1s.i +HAVING t2s.i = 999 +); +i +1 +2 +3 +SELECT * FROM t1 +WHERE t1.i = ANY ( +SELECT STRAIGHT_JOIN t2s.i +FROM +t1s LEFT OUTER JOIN t2s ON t2s.i = t1s.i +HAVING t2s.i = 999 +) IS UNKNOWN; +i +DROP TABLE t1,t1s,t2s; +# LP BUG#675248 - select->prep_where references on freed memory +CREATE TABLE t1 (a int, b int); +insert into t1 values (1,1),(0,0); +CREATE TABLE t2 (c int); +insert into t2 values (1),(2); +prepare stmt1 from "select sum(a),(select sum(c) from t2 where table1.b) as sub +from t1 as table1 group by sub"; +execute stmt1; +sum(a) sub +0 NULL +1 3 +deallocate prepare stmt1; +prepare stmt1 from "select sum(a),(select sum(c) from t2 having table1.b) as sub +from t1 as table1"; +execute stmt1; +sum(a) sub +1 3 +deallocate prepare stmt1; +drop table t1,t2; +# +# Bug LP#693935/#58727: Assertion failure with +# a single row subquery returning more than one row +# +create table t1 (a char(1) charset utf8); +insert into t1 values ('a'), ('b'); +create table t2 (a binary(1)); +insert into t2 values ('x'), ('y'); +select * from t2 where a=(select a from t1) and a='x'; +ERROR 21000: Subquery returns more than 1 row +drop table t1,t2; +End of 5.1 tests +# +# Bug #11765713 58705: +# OPTIMIZER LET ENGINE DEPEND ON UNINITIALIZED VALUES +# CREATED BY OPT_SUM_QUERY +# +CREATE TABLE t1(a INT NOT NULL, KEY (a)); +INSERT INTO t1 VALUES (0), (1); +SELECT 1 as foo FROM t1 WHERE a < SOME +(SELECT a FROM t1 WHERE a <=> +(SELECT a FROM t1) +); +ERROR 21000: Subquery returns more than 1 row +SELECT 1 as foo FROM t1 WHERE a < SOME +(SELECT a FROM t1 WHERE a <=> +(SELECT a FROM t1 where a is null) +); +foo +DROP TABLE t1; +# +# Bug #57704: Cleanup code dies with void TABLE::set_keyread(bool): +# Assertion `file' failed. +# +CREATE TABLE t1 (a INT); +SELECT 1 FROM +(SELECT ROW( +(SELECT 1 FROM t1 RIGHT JOIN +(SELECT 1 FROM t1, t1 t2) AS d ON 1), +1) FROM t1) AS e; +ERROR 21000: Operand should contain 1 column(s) +DROP TABLE t1; +# +# Bug#13721076 CRASH WITH TIME TYPE/TIMESTAMP() AND WARNINGS IN SUBQUERY +# +CREATE TABLE t1(a TIME NOT NULL); +INSERT INTO t1 VALUES ('00:00:32'); +SELECT 1 FROM t1 WHERE a > +(SELECT timestamp(a) AS a FROM t1); +1 +DROP TABLE t1; +# +# No BUG#, a case brought from 5.2's innodb_mysql_lock.test +# +create table t1 (i int not null primary key); +insert into t1 values (1),(2),(3),(4),(5); +create table t2 (j int not null primary key); +insert into t2 values (1),(2),(3),(4),(5); +create table t3 (k int not null primary key); +insert into t3 values (1),(2),(3); +create view v2 as select t2.j as j from t2 where t2.j in (select t1.i from t1); +select * from t3 where k in (select j from v2); +k +1 +2 +3 +drop table t1,t2,t3; +drop view v2; +# +# Bug#52068: Optimizer generates invalid semijoin materialization plan +# +drop table if exists ot1, ot2, it1, it2; +CREATE TABLE ot1(a INTEGER); +INSERT INTO ot1 VALUES(5), (8); +CREATE TABLE it2(a INTEGER); +INSERT INTO it2 VALUES(9), (5), (1), (8); +CREATE TABLE it3(a INTEGER); +INSERT INTO it3 VALUES(7), (1), (0), (5), (1), (4); +CREATE TABLE ot4(a INTEGER); +INSERT INTO ot4 VALUES(1), (3), (5), (7), (9), (7), (3), (1); +SELECT * FROM ot1,ot4 +WHERE (ot1.a,ot4.a) IN (SELECT it2.a,it3.a +FROM it2,it3); +a a +5 1 +8 1 +5 5 +8 5 +5 7 +8 7 +5 7 +8 7 +5 1 +8 1 +explain SELECT * FROM ot1,ot4 +WHERE (ot1.a,ot4.a) IN (SELECT it2.a,it3.a +FROM it2,it3); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ot1 ALL NULL NULL NULL NULL 2 +1 PRIMARY ot4 ALL NULL NULL NULL NULL 8 Using join buffer (flat, BNL join) +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func,func 1 +2 MATERIALIZED it2 ALL NULL NULL NULL NULL 4 +2 MATERIALIZED it3 ALL NULL NULL NULL NULL 6 Using join buffer (flat, BNL join) +DROP TABLE IF EXISTS ot1, ot4, it2, it3; +# +# Bug#729039: NULL keys used to evaluate subquery +# +CREATE TABLE t1 (a int) ; +INSERT INTO t1 VALUES (NULL), (1), (NULL), (2); +CREATE TABLE t2 (a int, INDEX idx(a)) ; +INSERT INTO t2 VALUES (NULL), (1), (NULL); +SELECT * FROM t1 +WHERE EXISTS (SELECT a FROM t2 USE INDEX () WHERE t2.a = t1.a); +a +1 +EXPLAIN +SELECT * FROM t1 +WHERE EXISTS (SELECT a FROM t2 USE INDEX() WHERE t2.a = t1.a); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 3 Using where +SELECT * FROM t1 +WHERE EXISTS (SELECT a FROM t2 WHERE t2.a = t1.a); +a +1 +EXPLAIN +SELECT * FROM t1 +WHERE EXISTS (SELECT a FROM t2 WHERE t2.a = t1.a); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where +2 DEPENDENT SUBQUERY t2 ref idx idx 5 test.t1.a 2 Using index +DROP TABLE t1,t2; +# +# BUG#752992: Wrong results for a subquery with 'semijoin=on' +# +CREATE TABLE t1 (pk INTEGER PRIMARY KEY, i INTEGER NOT NULL); +INSERT INTO t1 VALUES (11,0); +INSERT INTO t1 VALUES (12,5); +INSERT INTO t1 VALUES (15,0); +CREATE TABLE t2 (pk INTEGER PRIMARY KEY, i INTEGER NOT NULL); +INSERT INTO t2 VALUES (11,1); +INSERT INTO t2 VALUES (12,2); +INSERT INTO t2 VALUES (15,4); +SET @save_join_cache_level=@@join_cache_level; +SET join_cache_level=0; +EXPLAIN SELECT * FROM t1 WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON 1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 3 +1 PRIMARY it eq_ref PRIMARY PRIMARY 4 test.t1.pk 1 Using index +1 PRIMARY t2 index NULL PRIMARY 4 NULL 3 Using index; FirstMatch(it) +SELECT * FROM t1 WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON 1); +pk i +11 0 +12 5 +15 0 +SET join_cache_level=@save_join_cache_level; +DROP table t1,t2; +# +# Bug#751350: crash with pushed condition for outer references when +# there should be none of such conditions +# +CREATE TABLE t1 (a int, b int) ; +INSERT INTO t1 VALUES (0,0),(0,0); +set @optimizer_switch_save=@@optimizer_switch; +set @@optimizer_switch='semijoin=off,materialization=on,in_to_exists=on'; +EXPLAIN +SELECT b FROM t1 +WHERE ('0') IN ( SELECT a FROM t1 GROUP BY a ) +GROUP BY b; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort +2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where +SELECT b FROM t1 +WHERE ('0') IN ( SELECT a FROM t1 GROUP BY a ) +GROUP BY b; +b +0 +set @@optimizer_switch=@optimizer_switch_save; +DROP TABLE t1; +# +# Bug #11765713 58705: +# OPTIMIZER LET ENGINE DEPEND ON UNINITIALIZED VALUES +# CREATED BY OPT_SUM_QUERY +# +CREATE TABLE t1(a INT NOT NULL, KEY (a)); +INSERT INTO t1 VALUES (0), (1); +SELECT 1 as foo FROM t1 WHERE a < SOME +(SELECT a FROM t1 WHERE a <=> +(SELECT a FROM t1) +); +ERROR 21000: Subquery returns more than 1 row +SELECT 1 as foo FROM t1 WHERE a < SOME +(SELECT a FROM t1 WHERE a <=> +(SELECT a FROM t1 where a is null) +); +foo +DROP TABLE t1; +CREATE TABLE t1 (a int(11), b varchar(1)); +INSERT INTO t1 VALUES (2,NULL),(5,'d'),(7,'g'); +SELECT a FROM t1 WHERE b < ANY ( SELECT b FROM t1 GROUP BY b ); +a +5 +SELECT a FROM t1 WHERE b < ANY ( SELECT b FROM t1 ); +a +5 +SELECT a FROM t1 WHERE b > ANY ( SELECT b FROM t1 GROUP BY b ); +a +7 +SELECT a FROM t1 WHERE b > ANY ( SELECT b FROM t1 ); +a +7 +SELECT a FROM t1 WHERE b <= ANY ( SELECT b FROM t1 GROUP BY b ); +a +5 +7 +SELECT a FROM t1 WHERE b <= ANY ( SELECT b FROM t1 ); +a +5 +7 +SELECT a FROM t1 WHERE b >= ANY ( SELECT b FROM t1 GROUP BY b ); +a +5 +7 +SELECT a FROM t1 WHERE b >= ANY ( SELECT b FROM t1 ); +a +5 +7 +SELECT a FROM t1 WHERE b = ANY ( SELECT b FROM t1 ); +a +5 +7 +SELECT a FROM t1 WHERE b = ANY ( SELECT b FROM t1 GROUP BY b ); +a +5 +7 +SELECT a FROM t1 WHERE b <> ANY ( SELECT b FROM t1 ); +a +5 +7 +SELECT a FROM t1 WHERE b <> ANY ( SELECT b FROM t1 GROUP BY b ); +a +5 +7 +SELECT a FROM t1 WHERE b < ALL ( SELECT b FROM t1 GROUP BY b ); +a +SELECT a FROM t1 WHERE b < ALL ( SELECT b FROM t1 ); +a +SELECT a FROM t1 WHERE b > ALL ( SELECT b FROM t1 GROUP BY b ); +a +SELECT a FROM t1 WHERE b > ALL ( SELECT b FROM t1 ); +a +SELECT a FROM t1 WHERE b <= ALL ( SELECT b FROM t1 GROUP BY b ); +a +SELECT a FROM t1 WHERE b <= ALL ( SELECT b FROM t1 ); +a +SELECT a FROM t1 WHERE b >= ALL ( SELECT b FROM t1 GROUP BY b ); +a +SELECT a FROM t1 WHERE b >= ALL ( SELECT b FROM t1 ); +a +SELECT a FROM t1 WHERE b = ALL ( SELECT b FROM t1 ); +a +SELECT a FROM t1 WHERE b = ALL ( SELECT b FROM t1 GROUP BY b ); +a +SELECT a FROM t1 WHERE b <> ALL ( SELECT b FROM t1 ); +a +SELECT a FROM t1 WHERE b <> ALL ( SELECT b FROM t1 GROUP BY b ); +a +delete from t1; +INSERT INTO t1 VALUES (2,NULL),(5,'d'),(7,'g'); +SELECT a FROM t1 WHERE b < ANY ( SELECT b FROM t1 GROUP BY b ); +a +5 +SELECT a FROM t1 WHERE b < ANY ( SELECT b FROM t1 ); +a +5 +SELECT a FROM t1 WHERE b > ANY ( SELECT b FROM t1 GROUP BY b ); +a +7 +SELECT a FROM t1 WHERE b > ANY ( SELECT b FROM t1 ); +a +7 +SELECT a FROM t1 WHERE b <= ANY ( SELECT b FROM t1 GROUP BY b ); +a +5 +7 +SELECT a FROM t1 WHERE b <= ANY ( SELECT b FROM t1 ); +a +5 +7 +SELECT a FROM t1 WHERE b >= ANY ( SELECT b FROM t1 GROUP BY b ); +a +5 +7 +SELECT a FROM t1 WHERE b >= ANY ( SELECT b FROM t1 ); +a +5 +7 +SELECT a FROM t1 WHERE b = ANY ( SELECT b FROM t1 ); +a +5 +7 +SELECT a FROM t1 WHERE b = ANY ( SELECT b FROM t1 GROUP BY b ); +a +5 +7 +SELECT a FROM t1 WHERE b <> ANY ( SELECT b FROM t1 ); +a +5 +7 +SELECT a FROM t1 WHERE b <> ANY ( SELECT b FROM t1 GROUP BY b ); +a +5 +7 +SELECT a FROM t1 WHERE b < ALL ( SELECT b FROM t1 GROUP BY b ); +a +SELECT a FROM t1 WHERE b < ALL ( SELECT b FROM t1 ); +a +SELECT a FROM t1 WHERE b > ALL ( SELECT b FROM t1 GROUP BY b ); +a +SELECT a FROM t1 WHERE b > ALL ( SELECT b FROM t1 ); +a +SELECT a FROM t1 WHERE b <= ALL ( SELECT b FROM t1 GROUP BY b ); +a +SELECT a FROM t1 WHERE b <= ALL ( SELECT b FROM t1 ); +a +SELECT a FROM t1 WHERE b >= ALL ( SELECT b FROM t1 GROUP BY b ); +a +SELECT a FROM t1 WHERE b >= ALL ( SELECT b FROM t1 ); +a +SELECT a FROM t1 WHERE b = ALL ( SELECT b FROM t1 ); +a +SELECT a FROM t1 WHERE b = ALL ( SELECT b FROM t1 GROUP BY b ); +a +SELECT a FROM t1 WHERE b <> ALL ( SELECT b FROM t1 ); +a +SELECT a FROM t1 WHERE b <> ALL ( SELECT b FROM t1 GROUP BY b ); +a +drop table t1; +# +# Fix of lp:780386 (NULL left part with empty ALL subquery). +# +CREATE TABLE t1 ( f11 int) ; +INSERT IGNORE INTO t1 VALUES (0),(0); +CREATE TABLE t2 ( f3 int, f10 int, KEY (f10,f3)) ; +INSERT IGNORE INTO t2 VALUES (NULL,NULL),(5,0); +DROP TABLE IF EXISTS t3; +Warnings: +Note 1051 Unknown table 'test.t3' +CREATE TABLE t3 ( f3 int) ; +INSERT INTO t3 VALUES (0),(0); +SELECT a1.f3 AS r FROM t2 AS a1 , t1 WHERE a1.f3 < ALL ( SELECT f3 FROM t3 WHERE f3 = 1 ) ; +r +NULL +5 +NULL +5 +DROP TABLE t1, t2, t3; +# +# Bug#12763207 - ASSERT IN SUBSELECT::SINGLE_VALUE_TRANSFORMER +# +CREATE TABLE t1(a1 int); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2(a1 int); +INSERT INTO t2 VALUES (3); +SELECT @@session.sql_mode INTO @old_sql_mode; +SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; +SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2 FROM t2); +1 +1 +1 +SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2); +1 +1 +1 +SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2); +1 +SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2); +1 +1 +1 +SET SESSION sql_mode=@old_sql_mode; +DROP TABLE t1, t2; +create table t2(i int); +insert into t2 values(0); +SELECT @@session.sql_mode INTO @old_sql_mode; +SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; +CREATE VIEW v1 AS +SELECT 'f' FROM t2 UNION SELECT 'x' FROM t2 +; +CREATE TABLE t1 ( +pk int NOT NULL, +col_varchar_key varchar(1) DEFAULT NULL, +PRIMARY KEY (pk), +KEY col_varchar_key (col_varchar_key) +); +SELECT t1.pk +FROM t1 +WHERE t1.col_varchar_key < ALL ( SELECT * FROM v1 ) +; +pk +SET SESSION sql_mode=@old_sql_mode; +drop table t2, t1; +drop view v1; +# +# BUG#50257: Missing info in REF column of the EXPLAIN +# lines for subselects +# +CREATE TABLE t1 (a INT, b INT, INDEX (a)); +INSERT INTO t1 VALUES (3, 10), (2, 20), (7, 10), (5, 20); +EXPLAIN SELECT * FROM (SELECT * FROM t1 WHERE a=7) t; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref a a 5 const 1 +EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT * FROM t1 WHERE a=7); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 4 +2 SUBQUERY t1 ref a a 5 const 1 Using index +DROP TABLE t1; +# +# BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS) +# (duplicate of LP bug #888456) +# +CREATE TABLE t1 (f1 varchar(1)); +INSERT INTO t1 VALUES ('v'),('s'); +CREATE TABLE t2 (f1_key varchar(1), KEY (f1_key)); +INSERT INTO t2 VALUES ('j'),('v'),('c'),('m'),('d'), +('d'),('y'),('t'),('d'),('s'); +EXPLAIN +SELECT table1.f1, table2.f1_key FROM t1 AS table1, t2 AS table2 +WHERE EXISTS (SELECT DISTINCT f1_key FROM t2 +WHERE f1_key != table2.f1_key AND f1_key >= table1.f1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY table1 ALL NULL NULL NULL NULL 2 +1 PRIMARY table2 index NULL f1_key 4 NULL 10 Using where; Using index; Using join buffer (flat, BNL join) +2 DEPENDENT SUBQUERY t2 index f1_key f1_key 4 NULL 10 Using where; Using index +SELECT table1.f1, table2.f1_key FROM t1 AS table1, t2 AS table2 +WHERE EXISTS (SELECT DISTINCT f1_key FROM t2 +WHERE f1_key != table2.f1_key AND f1_key >= table1.f1); +f1 f1_key +v j +s j +v v +s v +v c +s c +v m +s m +v d +s d +v d +s d +v y +s y +v t +s t +v d +s d +v s +s s +DROP TABLE t1,t2; +# +# LP bug 919427: EXPLAIN for a query over a single-row table +# with IN subquery in WHERE condition +# +CREATE TABLE ot ( +col_int_nokey int(11), +col_varchar_nokey varchar(1) +) ; +INSERT INTO ot VALUES (1,'x'); +CREATE TABLE it1( +col_int_key int(11), +col_varchar_key varchar(1), +KEY idx_cvk_cik (col_varchar_key,col_int_key) +); +INSERT INTO it1 VALUES (NULL,'x'), (NULL,'f'); +CREATE TABLE it2 ( +col_int_key int(11), +col_varchar_key varchar(1), +col_varchar_key2 varchar(1), +KEY idx_cvk_cvk2_cik (col_varchar_key, col_varchar_key2, col_int_key), +KEY idx_cvk_cik (col_varchar_key, col_int_key) +); +INSERT INTO it2 VALUES (NULL,'x','x'), (NULL,'f','f'); +EXPLAIN +SELECT col_int_nokey FROM ot +WHERE col_varchar_nokey IN +(SELECT col_varchar_key FROM it1 WHERE col_int_key IS NULL); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ot system NULL NULL NULL NULL 1 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 +2 MATERIALIZED it1 ref idx_cvk_cik idx_cvk_cik 9 const,const 1 Using where; Using index +SELECT col_int_nokey FROM ot +WHERE col_varchar_nokey IN +(SELECT col_varchar_key FROM it1 WHERE col_int_key IS NULL); +col_int_nokey +1 +EXPLAIN +SELECT col_int_nokey FROM ot +WHERE (col_varchar_nokey, 'x') IN +(SELECT col_varchar_key, col_varchar_key2 FROM it2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ot system NULL NULL NULL NULL 1 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func,func 1 +2 MATERIALIZED it2 ref idx_cvk_cvk2_cik,idx_cvk_cik idx_cvk_cvk2_cik 8 const,const 1 Using where; Using index +SELECT col_int_nokey FROM ot +WHERE (col_varchar_nokey, 'x') IN +(SELECT col_varchar_key, col_varchar_key2 FROM it2); +col_int_nokey +1 +DROP TABLE ot,it1,it2; +# +# MDEV-746 +# Bug#13651009 WRONG RESULT FROM DERIVED TABLE IF THE SUBQUERY +# HAS AN EMPTY RESULT +# +CREATE TABLE t1 ( +pk int NOT NULL, +col_int_nokey int NOT NULL, +col_int_key int NOT NULL, +col_time_key time NOT NULL, +col_varchar_key varchar(1) NOT NULL, +col_varchar_nokey varchar(1) NOT NULL, +PRIMARY KEY (pk), +KEY col_int_key (col_int_key), +KEY col_time_key (col_time_key), +KEY col_varchar_key (col_varchar_key,col_int_key) +) ENGINE=MyISAM; +CREATE TABLE t2 ( +pk int NOT NULL AUTO_INCREMENT, +col_int_nokey int NOT NULL, +col_int_key int NOT NULL, +col_time_key time NOT NULL, +col_varchar_key varchar(1) NOT NULL, +col_varchar_nokey varchar(1) NOT NULL, +PRIMARY KEY (pk), +KEY col_int_key (col_int_key), +KEY col_time_key (col_time_key), +KEY col_varchar_key (col_varchar_key,col_int_key) +) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1,4,4,'00:00:00','b','b'); +SET @var2:=4, @var3:=8; + +Testcase without inner subquery +EXPLAIN SELECT @var3:=12, sq4_alias1.* +FROM t1 AS sq4_alias1 +WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR +sq4_alias1.col_varchar_key = @var3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found +SELECT @var3:=12, sq4_alias1.* +FROM t1 AS sq4_alias1 +WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR +sq4_alias1.col_varchar_key = @var3; +@var3:=12 pk col_int_nokey col_int_key col_time_key col_varchar_key col_varchar_nokey +SELECT @var3; +@var3 +8 +EXPLAIN SELECT * FROM ( SELECT @var3:=12, sq4_alias1.* +FROM t1 AS sq4_alias1 +WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR +sq4_alias1.col_varchar_key = @var3 ) AS alias3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found +2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table +SELECT * FROM ( SELECT @var3:=12, sq4_alias1.* +FROM t1 AS sq4_alias1 +WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR +sq4_alias1.col_varchar_key = @var3 ) AS alias3; +@var3:=12 pk col_int_nokey col_int_key col_time_key col_varchar_key col_varchar_nokey +SELECT @var3; +@var3 +8 + +Testcase with inner subquery; crashed WL#6095 +SET @var3=8; +EXPLAIN SELECT sq4_alias1.* +FROM t1 AS sq4_alias1 +WHERE (sq4_alias1.col_varchar_key , sq4_alias1.col_varchar_nokey) +NOT IN +(SELECT c_sq1_alias1.col_varchar_key AS c_sq1_field1, +c_sq1_alias1.col_varchar_nokey AS c_sq1_field2 +FROM t2 AS c_sq1_alias1 +WHERE (c_sq1_alias1.col_int_nokey != @var2 +OR c_sq1_alias1.pk != @var3)); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 DEPENDENT SUBQUERY c_sq1_alias1 system PRIMARY NULL NULL NULL 1 +SELECT sq4_alias1.* +FROM t1 AS sq4_alias1 +WHERE (sq4_alias1.col_varchar_key , sq4_alias1.col_varchar_nokey) +NOT IN +(SELECT c_sq1_alias1.col_varchar_key AS c_sq1_field1, +c_sq1_alias1.col_varchar_nokey AS c_sq1_field2 +FROM t2 AS c_sq1_alias1 +WHERE (c_sq1_alias1.col_int_nokey != @var2 +OR c_sq1_alias1.pk != @var3)); +pk col_int_nokey col_int_key col_time_key col_varchar_key col_varchar_nokey +EXPLAIN SELECT * FROM ( SELECT sq4_alias1.* +FROM t1 AS sq4_alias1 +WHERE (sq4_alias1.col_varchar_key , sq4_alias1.col_varchar_nokey) +NOT IN +(SELECT c_sq1_alias1.col_varchar_key AS c_sq1_field1, +c_sq1_alias1.col_varchar_nokey AS c_sq1_field2 +FROM t2 AS c_sq1_alias1 +WHERE (c_sq1_alias1.col_int_nokey != @var2 +OR c_sq1_alias1.pk != @var3)) ) AS alias3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +3 DEPENDENT SUBQUERY c_sq1_alias1 system PRIMARY NULL NULL NULL 1 +SELECT * FROM ( SELECT sq4_alias1.* +FROM t1 AS sq4_alias1 +WHERE (sq4_alias1.col_varchar_key , sq4_alias1.col_varchar_nokey) +NOT IN +(SELECT c_sq1_alias1.col_varchar_key AS c_sq1_field1, +c_sq1_alias1.col_varchar_nokey AS c_sq1_field2 +FROM t2 AS c_sq1_alias1 +WHERE (c_sq1_alias1.col_int_nokey != @var2 +OR c_sq1_alias1.pk != @var3)) ) AS alias3; +pk col_int_nokey col_int_key col_time_key col_varchar_key col_varchar_nokey +DROP TABLE t1,t2; +End of 5.2 tests +# +# BUG#779885: Crash in eliminate_item_equal with materialization=on in +# +CREATE TABLE t1 ( f1 int ); +INSERT INTO t1 VALUES (19), (20); +CREATE TABLE t2 ( f10 varchar(32) ); +INSERT INTO t2 VALUES ('c'),('d'); +CREATE TABLE t3 ( f10 varchar(32) ); +INSERT INTO t3 VALUES ('a'),('b'); +SELECT * +FROM t1 +WHERE +( 't' ) IN ( +SELECT t3.f10 +FROM t3 +JOIN t2 +ON t2.f10 = t3.f10 +); +f1 +DROP TABLE t1,t2,t3; +# +# BUG lp:813473: Wrong result with outer join + NOT IN subquery +# This bug is a duplicate of Bug#11764086 whose test case is added below +# +CREATE TABLE t1 (c int) ; +INSERT INTO t1 VALUES (5),(6); +CREATE TABLE t2 (a int, b int) ; +INSERT INTO t2 VALUES (20,9),(20,9); +create table t3 (d int, e int); +insert into t3 values (2, 9), (3,10); +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch='outer_join_with_cache=off'; +EXPLAIN +SELECT t2.b , t1.c +FROM t2 LEFT JOIN t1 ON t1.c < 3 +WHERE (t2.b , t1.c) NOT IN (SELECT * from t3); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where +2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 Using where +SELECT t2.b , t1.c +FROM t2 LEFT JOIN t1 ON t1.c < 3 +WHERE (t2.b, t1.c) NOT IN (SELECT * from t3); +b c +9 NULL +9 NULL +SET optimizer_switch=@save_optimizer_switch; +drop table t1, t2, t3; +# +# BUG#50257: Missing info in REF column of the EXPLAIN +# lines for subselects +# +CREATE TABLE t1 (a INT, b INT, INDEX (a)); +INSERT INTO t1 VALUES (3, 10), (2, 20), (7, 10), (5, 20); + +set @tmp_optimizer_switch=@@optimizer_switch; +set optimizer_switch='derived_merge=off,derived_with_keys=off'; +EXPLAIN SELECT * FROM (SELECT * FROM t1 WHERE a=7) t; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 +2 DERIVED t1 ref a a 5 const 1 +set optimizer_switch=@tmp_optimizer_switch; + +EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT * FROM t1 WHERE a=7); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 4 +2 SUBQUERY t1 ref a a 5 const 1 Using index + +DROP TABLE t1; +# +# Bug#11764086: Null left operand to NOT IN in WHERE clause +# behaves differently than real NULL +# +CREATE TABLE parent (id int); +INSERT INTO parent VALUES (1), (2); +CREATE TABLE child (parent_id int, other int); +INSERT INTO child VALUES (1,NULL); +# Offending query (c.parent_id is NULL for null-complemented rows only) +SELECT p.id, c.parent_id +FROM parent p +LEFT JOIN child c +ON p.id = c.parent_id +WHERE c.parent_id NOT IN ( +SELECT parent_id +FROM child +WHERE parent_id = 3 +); +id parent_id +1 1 +2 NULL +# Some syntactic variations with IS FALSE and IS NOT TRUE +SELECT p.id, c.parent_id +FROM parent p +LEFT JOIN child c +ON p.id = c.parent_id +WHERE c.parent_id IN ( +SELECT parent_id +FROM child +WHERE parent_id = 3 +) IS NOT TRUE; +id parent_id +1 1 +2 NULL +SELECT p.id, c.parent_id +FROM parent p +LEFT JOIN child c +ON p.id = c.parent_id +WHERE c.parent_id IN ( +SELECT parent_id +FROM child +WHERE parent_id = 3 +) IS FALSE; +id parent_id +1 1 +2 NULL +DROP TABLE parent, child; +# End of test for bug#11764086. +# +# Bug 11765699 - 58690: !TABLE || (!TABLE->READ_SET || +# BITMAP_IS_SET(TABLE->READ_SET, FIELD_INDEX +# +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (0), (1); +CREATE TABLE t2( +b TEXT, +c INT, +PRIMARY KEY (b(1)) +); +INSERT INTO t2 VALUES ('a', 2), ('b', 3); +SELECT 1 FROM t1 WHERE a = +(SELECT 1 FROM t2 WHERE b = +(SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2) +ORDER BY b +); +1 +SELECT 1 FROM t1 WHERE a = +(SELECT 1 FROM t2 WHERE b = +(SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2) +GROUP BY b +); +1 +DROP TABLE t1, t2; +# +# BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS) +# +CREATE TABLE t1 (f1 varchar(1)); +INSERT INTO t1 VALUES ('v'),('s'); +CREATE TABLE t2 (f1_key varchar(1), KEY (f1_key)); +INSERT INTO t2 VALUES ('j'),('v'),('c'),('m'),('d'), +('d'),('y'),('t'),('d'),('s'); +SELECT table1.f1, table2.f1_key +FROM t1 AS table1, t2 AS table2 +WHERE EXISTS +( +SELECT DISTINCT f1_key +FROM t2 +WHERE f1_key != table2.f1_key AND f1_key >= table1.f1 ); +f1 f1_key +v j +s j +v v +s v +v c +s c +v m +s m +v d +s d +v d +s d +v y +s y +v t +s t +v d +s d +v s +s s +explain SELECT table1.f1, table2.f1_key +FROM t1 AS table1, t2 AS table2 +WHERE EXISTS +( +SELECT DISTINCT f1_key +FROM t2 +WHERE f1_key != table2.f1_key AND f1_key >= table1.f1 ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY table1 ALL NULL NULL NULL NULL 2 +1 PRIMARY table2 index NULL f1_key 4 NULL 10 Using where; Using index; Using join buffer (flat, BNL join) +2 DEPENDENT SUBQUERY t2 index f1_key f1_key 4 NULL 10 Using where; Using index +DROP TABLE t1,t2; +# +# lp:826279: assertion failure with GROUP BY a result of subquery +# +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (0), (0); +CREATE TABLE t2 (a int, b int, c int); +INSERT INTO t2 VALUES (10,7,0), (0,7,0); +CREATE TABLE t3 (a int, b int); +INSERT INTO t3 VALUES (10,7), (0,7); +SELECT SUM(DISTINCT b), +(SELECT t2.a FROM t1 JOIN t2 ON t2.c != 0 +WHERE t.a != 0 AND t2.a != 0) +FROM (SELECT * FROM t3) AS t +GROUP BY 2; +SUM(DISTINCT b) (SELECT t2.a FROM t1 JOIN t2 ON t2.c != 0 +WHERE t.a != 0 AND t2.a != 0) +7 NULL +SELECT SUM(DISTINCT b), +(SELECT t2.a FROM t1,t2 WHERE t.a != 0 or 1=2 LIMIT 1) +FROM (SELECT * FROM t3) AS t +GROUP BY 2; +SUM(DISTINCT b) (SELECT t2.a FROM t1,t2 WHERE t.a != 0 or 1=2 LIMIT 1) +7 NULL +7 10 +DROP TABLE t1,t2,t3; +# +# Bug#12329653 +# EXPLAIN, UNION, PREPARED STATEMENT, CRASH, SQL_FULL_GROUP_BY +# +CREATE TABLE t1(a1 int); +INSERT INTO t1 VALUES (1),(2); +SELECT @@session.sql_mode INTO @old_sql_mode; +SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; +SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t1); +1 +1 +1 +PREPARE stmt FROM +'SELECT 1 UNION ALL +SELECT 1 FROM t1 +ORDER BY +(SELECT 1 FROM t1 AS t1_0 + WHERE 1 < SOME (SELECT a1 FROM t1) +)' ; +EXECUTE stmt ; +ERROR 21000: Subquery returns more than 1 row +EXECUTE stmt ; +ERROR 21000: Subquery returns more than 1 row +SET SESSION sql_mode=@old_sql_mode; +DEALLOCATE PREPARE stmt; +DROP TABLE t1; +# +# LP BUG#833777 Performance regression with deeply nested subqueries +# +create table t1 (a int not null, b char(10) not null); +insert into t1 values (1, 'a'); +set @@optimizer_switch='in_to_exists=on,semijoin=off,materialization=off,subquery_cache=off'; +select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1 where a in (select a from t1))))))))))))))))))))))))))))); +a +1 +set @@optimizer_switch=@subselect_tmp; +drop table t1; +# +# LP BUG#894397 Wrong result with in_to_exists, constant table , semijoin=OFF,materialization=OFF +# +CREATE TABLE t1 (a varchar(3)); +INSERT INTO t1 VALUES ('AAA'),('BBB'); +CREATE TABLE t2 (a varchar(3)); +INSERT INTO t2 VALUES ('CCC'); +set @@optimizer_switch='semijoin=off,materialization=off,in_to_exists=on,subquery_cache=off'; +SELECT * FROM t1 WHERE t1.a IN (SELECT t2.a FROM t2 WHERE t2.a < 'ZZZ'); +a +set @@optimizer_switch=@subselect_tmp; +drop table t1, t2; +# +# LP bug #859375: Assertion `0' failed in st_select_lex_unit::optimize +# with view , UNION and prepared statement (rewriting fake_select +# condition). +# +CREATE TABLE t1 ( f1 int NOT NULL, f4 varchar(1) NOT NULL) ; +INSERT INTO t1 VALUES (6,'d'),(7,'y'); +CREATE TABLE t2 ( f1 int NOT NULL, f2 int NOT NULL) ; +INSERT INTO t2 VALUES (10,7); +CREATE VIEW v2 AS SELECT * FROM t2; +PREPARE st1 FROM " + SELECT * + FROM t1 + LEFT JOIN v2 ON ( v2.f2 = t1.f1 ) + WHERE v2.f1 NOT IN ( + SELECT 1 UNION + SELECT 247 + ) +"; +EXECUTE st1; +f1 f4 f1 f2 +7 y 10 7 +deallocate prepare st1; +DROP VIEW v2; +DROP TABLE t1,t2; +# +# LP bug #887458 Crash in subselect_union_engine::no_rows with +# double UNION and join_cache_level=3,8 +# (IN/ALL/ANY optimizations should not be applied to fake_select) +CREATE TABLE t2 ( a int, b varchar(1)) ; +INSERT IGNORE INTO t2 VALUES (8,'y'),(8,'y'); +CREATE TABLE t1 ( b varchar(1)) ; +INSERT IGNORE INTO t1 VALUES (NULL),(NULL); +set @save_join_cache_level=@@join_cache_level; +SET SESSION join_cache_level=3; +SELECT * +FROM t1, t2 +WHERE t2.b IN ( +SELECT 'm' UNION +SELECT 'm' +) OR t1.b <> SOME ( +SELECT 'v' UNION +SELECT 't' +); +b a b +set @@join_cache_level= @save_join_cache_level; +drop table t1,t2; +# +# LP bug #885162 Got error 124 from storage engine with UNION inside +# subquery and join_cache_level=3..8 +# (IN/ALL/ANY optimizations should not be applied to fake_select) +# +CREATE TABLE t1 ( +f1 varchar(1) DEFAULT NULL +); +INSERT INTO t1 VALUES ('c'); +set @save_join_cache_level=@@join_cache_level; +SET SESSION join_cache_level=8; +SELECT * FROM t1 WHERE t1.f1 IN ( SELECT 'k' UNION SELECT 'e' ); +f1 +set @@join_cache_level= @save_join_cache_level; +drop table t1; +# +# LP BUG#747278 incorrect values of the NULL (no rows) single +# row subquery requested via element_index() interface +# +CREATE TABLE t1 (f1a int, f1b int) ; +INSERT IGNORE INTO t1 VALUES (1,1),(2,2); +CREATE TABLE t2 ( f2 int); +INSERT IGNORE INTO t2 VALUES (3),(4); +CREATE TABLE t3 (f3a int default 1, f3b int default 2); +INSERT INTO t3 VALUES (1,1),(2,2); +set @old_optimizer_switch = @@session.optimizer_switch; +set @@optimizer_switch='materialization=on,partial_match_rowid_merge=on,partial_match_table_scan=off,subquery_cache=off,semijoin=off'; +SELECT (SELECT f3a FROM t3 where f3a > 3) NOT IN (SELECT f1a FROM t1) FROM t2; +(SELECT f3a FROM t3 where f3a > 3) NOT IN (SELECT f1a FROM t1) +NULL +NULL +SELECT (SELECT f3a,f3a FROM t3 where f3a > 3) NOT IN (SELECT f1a,f1a FROM t1) FROM t2; +(SELECT f3a,f3a FROM t3 where f3a > 3) NOT IN (SELECT f1a,f1a FROM t1) +NULL +NULL +SELECT (SELECT f3a, f3b FROM t3 where f3a > 3) NOT IN (SELECT f1a, f1b FROM t1) FROM t2; +(SELECT f3a, f3b FROM t3 where f3a > 3) NOT IN (SELECT f1a, f1b FROM t1) +NULL +NULL +SELECT (SELECT f3a, f3b FROM t3 where f3a > 3) NOT IN (SELECT f1a, f1b FROM t1); +(SELECT f3a, f3b FROM t3 where f3a > 3) NOT IN (SELECT f1a, f1b FROM t1) +NULL +SELECT (SELECT f3a FROM t3 where f3a > 3) IN (SELECT f1a FROM t1) FROM t2; +(SELECT f3a FROM t3 where f3a > 3) IN (SELECT f1a FROM t1) +NULL +NULL +SELECT (SELECT f3a,f3a FROM t3 where f3a > 3) IN (SELECT f1a,f1a FROM t1) FROM t2; +(SELECT f3a,f3a FROM t3 where f3a > 3) IN (SELECT f1a,f1a FROM t1) +NULL +NULL +SELECT (SELECT f3a, f3b FROM t3 where f3a > 3) IN (SELECT f1a, f1b FROM t1) FROM t2; +(SELECT f3a, f3b FROM t3 where f3a > 3) IN (SELECT f1a, f1b FROM t1) +NULL +NULL +SELECT (SELECT f3a, f3b FROM t3 where f3a > 3) IN (SELECT f1a, f1b FROM t1); +(SELECT f3a, f3b FROM t3 where f3a > 3) IN (SELECT f1a, f1b FROM t1) +NULL +set @@session.optimizer_switch=@old_optimizer_switch; +SELECT (SELECT f3a FROM t3 where f3a > 3) NOT IN (SELECT f1a FROM t1) FROM t2; +(SELECT f3a FROM t3 where f3a > 3) NOT IN (SELECT f1a FROM t1) +NULL +NULL +SELECT (SELECT f3a,f3a FROM t3 where f3a > 3) NOT IN (SELECT f1a,f1a FROM t1) FROM t2; +(SELECT f3a,f3a FROM t3 where f3a > 3) NOT IN (SELECT f1a,f1a FROM t1) +NULL +NULL +SELECT (SELECT f3a, f3b FROM t3 where f3a > 3) NOT IN (SELECT f1a, f1b FROM t1) FROM t2; +(SELECT f3a, f3b FROM t3 where f3a > 3) NOT IN (SELECT f1a, f1b FROM t1) +NULL +NULL +SELECT (SELECT f3a, f3b FROM t3 where f3a > 3) NOT IN (SELECT f1a, f1b FROM t1); +(SELECT f3a, f3b FROM t3 where f3a > 3) NOT IN (SELECT f1a, f1b FROM t1) +NULL +SELECT (SELECT f3a FROM t3 where f3a > 3) IN (SELECT f1a FROM t1) FROM t2; +(SELECT f3a FROM t3 where f3a > 3) IN (SELECT f1a FROM t1) +NULL +NULL +SELECT (SELECT f3a,f3a FROM t3 where f3a > 3) IN (SELECT f1a,f1a FROM t1) FROM t2; +(SELECT f3a,f3a FROM t3 where f3a > 3) IN (SELECT f1a,f1a FROM t1) +NULL +NULL +SELECT (SELECT f3a, f3b FROM t3 where f3a > 3) IN (SELECT f1a, f1b FROM t1) FROM t2; +(SELECT f3a, f3b FROM t3 where f3a > 3) IN (SELECT f1a, f1b FROM t1) +NULL +NULL +SELECT (SELECT f3a, f3b FROM t3 where f3a > 3) IN (SELECT f1a, f1b FROM t1); +(SELECT f3a, f3b FROM t3 where f3a > 3) IN (SELECT f1a, f1b FROM t1) +NULL +select (null, null) = (null, null); +(null, null) = (null, null) +NULL +SELECT (SELECT f3a, f3a FROM t3 where f3a > 3) = (0, 0); +(SELECT f3a, f3a FROM t3 where f3a > 3) = (0, 0) +NULL +drop tables t1,t2,t3; +# +# LP BUG#825051 Wrong result with date/datetime and subquery with GROUP BY and in_to_exists +# +CREATE TABLE t1 (a date, KEY (a)) ; +INSERT INTO t1 VALUES ('2009-01-01'),('2009-02-02'); +set @old_optimizer_switch = @@optimizer_switch; +SET @@optimizer_switch='semijoin=off,materialization=off,in_to_exists=on,subquery_cache=off'; +EXPLAIN SELECT * FROM t1 WHERE a IN (SELECT a AS field1 FROM t1 GROUP BY field1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 index NULL a 4 NULL 2 Using where; Using index +2 DEPENDENT SUBQUERY t1 index_subquery a a 4 func 2 Using index +SELECT * FROM t1 WHERE a IN (SELECT a AS field1 FROM t1 GROUP BY field1); +a +2009-01-01 +2009-02-02 +SET @@optimizer_switch='semijoin=off,materialization=on,in_to_exists=off,subquery_cache=off'; +EXPLAIN SELECT * FROM t1 WHERE a IN (SELECT a AS field1 FROM t1 GROUP BY field1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 index NULL a 4 NULL 2 Using where; Using index +2 MATERIALIZED t1 index NULL a 4 NULL 2 Using index +SELECT * FROM t1 WHERE a IN (SELECT a AS field1 FROM t1 GROUP BY field1); +a +2009-01-01 +2009-02-02 +set @@optimizer_switch=@old_optimizer_switch; +drop table t1; +# +# LP BUG#908269 incorrect condition in case of subqueries depending +# on constant tables +# +CREATE TABLE t1 ( a INT ); +INSERT INTO t1 VALUES (1),(5); +CREATE TABLE t2 ( b INT ) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1); +CREATE TABLE t3 ( c INT ); +INSERT INTO t3 VALUES (4),(5); +SET optimizer_switch='subquery_cache=off'; +SELECT ( SELECT b FROM t2 WHERE b = a OR EXISTS ( SELECT c FROM t3 WHERE c = b ) ) FROM t1; +( SELECT b FROM t2 WHERE b = a OR EXISTS ( SELECT c FROM t3 WHERE c = b ) ) +1 +NULL +SELECT ( SELECT b FROM t2 WHERE b = a OR b * 0) FROM t1; +( SELECT b FROM t2 WHERE b = a OR b * 0) +1 +NULL +SELECT ( SELECT b FROM t2 WHERE b = a OR rand() * 0) FROM t1; +( SELECT b FROM t2 WHERE b = a OR rand() * 0) +1 +NULL +drop table t1,t2,t3; +set optimizer_switch=@subselect_tmp; +# +# LP BUG#905353 Wrong non-empty result with a constant table, +# aggregate function in subquery, MyISAM or Aria +# +CREATE TABLE t1 ( a INT ) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1); +SELECT a FROM t1 WHERE ( SELECT MIN(a) = 100 ); +a +drop table t1; +# +# LP BUG#985667 Wrong result with subquery in SELECT clause, and constant table in +# main query and implicit grouping +# +CREATE TABLE t1 (f1 int) engine=MyISAM; +INSERT INTO t1 VALUES (7),(8); +CREATE TABLE t2 (f2 int, f3 varchar(1)) engine=MyISAM; +INSERT INTO t2 VALUES (3,'f'); +EXPLAIN +SELECT COUNT(f1), (SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 +SELECT COUNT(f1), (SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3; +COUNT(f1) f4 +0 NULL +EXPLAIN +SELECT COUNT(f1), exists(SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 +SELECT COUNT(f1), exists(SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3; +COUNT(f1) f4 +0 0 +EXPLAIN +SELECT COUNT(f1), f2 > ALL (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where +SELECT COUNT(f1), f2 > ALL (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3; +COUNT(f1) f4 +0 1 +EXPLAIN +SELECT COUNT(f1), f2 IN (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where +SELECT COUNT(f1), f2 IN (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3; +COUNT(f1) f4 +0 0 +drop table t1,t2; +# +# LP BUG#1002079 Server crashes in Item_singlerow_subselect::val_int with constant table, +# HAVING, UNION in subquery +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (7),(0); +CREATE TABLE t2 (b INT); +EXPLAIN +SELECT SUM(a) AS f1, a AS f2 FROM (t1, t2) HAVING f2 >= ALL (SELECT 4 UNION SELECT 5) AND f1 = 7; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL +SELECT SUM(a) AS f1, a AS f2 FROM (t1, t2) HAVING f2 >= ALL (SELECT 4 UNION SELECT 5) AND f1 = 7; +f1 f2 +drop table t1,t2; +# +# LP BUG#1008686 Server crashes in subselect_union_engine::no_rows on SELECT with impossible +# WHERE and UNION in HAVING +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(7); +EXPLAIN +SELECT MIN(a) AS min_a, a FROM t1 WHERE 0 HAVING a NOT IN ( SELECT 2 UNION SELECT 5 ) OR min_a != 1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used +3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL +SELECT MIN(a) AS min_a, a FROM t1 WHERE 0 HAVING a NOT IN ( SELECT 2 UNION SELECT 5 ) OR min_a != 1; +min_a a +EXPLAIN +SELECT MIN(a) AS min_a, a FROM t1 WHERE 1=2 HAVING a NOT IN ( SELECT a from t1 UNION select a+1 from t1 ) OR min_a != 1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where +3 DEPENDENT UNION t1 ALL NULL NULL NULL NULL 2 Using where +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL +SELECT MIN(a) AS min_a, a FROM t1 WHERE 1=2 HAVING a NOT IN ( SELECT a from t1 UNION select a+1 from t1 ) OR min_a != 1; +min_a a +drop table t1; +# +# MDEV-367: Different results with and without subquery_cache on +# a query with a constant NOT IN condition +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2),(3); +set @mdev367_optimizer_switch = @@optimizer_switch; +set optimizer_switch = 'subquery_cache=on'; +SELECT * FROM t1 WHERE ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) OR a > 100; +a +SELECT *, ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) FROM t1; +a ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) +1 NULL +2 NULL +3 NULL +set optimizer_switch=@mdev367_optimizer_switch; +set optimizer_switch = 'subquery_cache=off'; +SELECT * FROM t1 WHERE ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) OR a > 100; +a +SELECT *, ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) FROM t1; +a ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) +1 NULL +2 NULL +3 NULL +set optimizer_switch=@mdev367_optimizer_switch; +DROP TABLE t1; +# +# MDEV-521 single value subselect transformation problem +# +CREATE TABLE t1 (f1 char(2), PRIMARY KEY (f1)) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('u1'),('u2'); +SELECT a.* FROM t1 a WHERE ( SELECT EXISTS ( SELECT 1 FROM t1 b WHERE b.f1 = a.f1 ) ); +f1 +u1 +u2 +FLUSH TABLES; +SELECT a.* FROM t1 a WHERE ( SELECT EXISTS ( SELECT 1 FROM t1 b WHERE b.f1 = a.f1 ) ); +f1 +u1 +u2 +DROP TABLE t1; +# return optimizer switch changed in the beginning of this test +set optimizer_switch=@subselect_tmp; +# +# lp:944706 Query with impossible or constant subquery in WHERE or HAVING is not +# precomputed and thus not part of optimization +# +CREATE TABLE t1 ( a VARCHAR(16), KEY (a) ); +INSERT INTO t1 VALUES ('Abilene'),('Akron'),('Albany'),('Albuquerque'),('Alexandria'),('Allentown'), +('Amarillo'),('Anaheim'),('Anchorage'),('Ann Arbor'),('Arden-Arcade'); +EXPLAIN +SELECT MAX( alias2.a ) AS field +FROM t1 AS alias1, t1 AS alias2, t1 AS alias3 +WHERE alias1.a = alias2.a OR alias1.a = 'y' +HAVING field>'B' AND ( 'Moscow' ) IN ( SELECT a FROM t1 ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible HAVING +2 SUBQUERY t1 index_subquery a a 19 const 1 Using index; Using where +SELECT MAX( alias2.a ) AS field +FROM t1 AS alias1, t1 AS alias2, t1 AS alias3 +WHERE alias1.a = alias2.a OR alias1.a = 'y' +HAVING field>'B' AND ( 'Moscow' ) IN ( SELECT a FROM t1 ); +field +EXPLAIN +SELECT MAX( alias2.a ) +FROM t1 AS alias1, t1 AS alias2, t1 AS alias3 +WHERE alias1.a = alias2.a OR ('Moscow') IN ( SELECT a FROM t1 ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY alias1 index a a 19 NULL 11 Using where; Using index +1 PRIMARY alias2 ref a a 19 test.alias1.a 2 Using index +1 PRIMARY alias3 index NULL a 19 NULL 11 Using index; Using join buffer (flat, BNL join) +2 SUBQUERY t1 index_subquery a a 19 const 1 Using index; Using where +SELECT MAX( alias2.a ) +FROM t1 AS alias1, t1 AS alias2, t1 AS alias3 +WHERE alias1.a = alias2.a OR ('Moscow') IN ( SELECT a FROM t1 ); +MAX( alias2.a ) +Arden-Arcade +drop table t1; +# +# MDEV-277 CHEAP SQ: Server crashes in st_join_table::get_examined_rows +# with semijoin+materialization, IN and = subqueries +# +CREATE TABLE t1 (a1 INT); +INSERT INTO t1 VALUES (4),(6); +CREATE TABLE t2 (b1 INT); +INSERT INTO t2 VALUES (1),(7); +EXPLAIN +SELECT * FROM t1 +WHERE a1 = (SELECT COUNT(*) FROM t1 WHERE a1 IN (SELECT a1 FROM t1, t2)); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where +2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 +2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 func 1 +3 MATERIALIZED t1 ALL NULL NULL NULL NULL 2 +3 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join) +SELECT * FROM t1 +WHERE a1 = (SELECT COUNT(*) FROM t1 WHERE a1 IN (SELECT a1 FROM t1, t2)); +a1 +drop table t1, t2; +# +# MDEV-287 CHEAP SQ: A query with subquery in SELECT list, EXISTS, +# inner joins takes hundreds times longer +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(7); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (4),(5); +CREATE TABLE t3 (c INT); +INSERT INTO t3 VALUES (8),(3); +set @@expensive_subquery_limit= 0; +EXPLAIN +SELECT (SELECT MIN(b) FROM t1, t2 WHERE b = a AND (b = alias1.b OR EXISTS (SELECT * FROM t3))) +FROM t2 alias1, t1 alias2, t1 alias3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY alias1 ALL NULL NULL NULL NULL 2 +1 PRIMARY alias2 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join) +1 PRIMARY alias3 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join) +2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +3 SUBQUERY t3 ALL NULL NULL NULL NULL 2 +flush status; +SELECT (SELECT MIN(b) FROM t1, t2 WHERE b = a AND (b = alias1.b OR EXISTS (SELECT * FROM t3))) +FROM t2 alias1, t1 alias2, t1 alias3; +(SELECT MIN(b) FROM t1, t2 WHERE b = a AND (b = alias1.b OR EXISTS (SELECT * FROM t3))) +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +show status like "subquery_cache%"; +Variable_name Value +Subquery_cache_hit 6 +Subquery_cache_miss 2 +show status like '%Handler_read%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 8 +Handler_read_last 0 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_retry 0 +Handler_read_rnd 0 +Handler_read_rnd_deleted 0 +Handler_read_rnd_next 22 +set @@expensive_subquery_limit= default; +EXPLAIN +SELECT (SELECT MIN(b) FROM t1, t2 WHERE b = a AND (b = alias1.b OR EXISTS (SELECT * FROM t3))) +FROM t2 alias1, t1 alias2, t1 alias3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY alias1 ALL NULL NULL NULL NULL 2 +1 PRIMARY alias2 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join) +1 PRIMARY alias3 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join) +2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 +2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +3 SUBQUERY t3 ALL NULL NULL NULL NULL 2 +flush status; +SELECT (SELECT MIN(b) FROM t1, t2 WHERE b = a AND (b = alias1.b OR EXISTS (SELECT * FROM t3))) +FROM t2 alias1, t1 alias2, t1 alias3; +(SELECT MIN(b) FROM t1, t2 WHERE b = a AND (b = alias1.b OR EXISTS (SELECT * FROM t3))) +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +show status like "subquery_cache%"; +Variable_name Value +Subquery_cache_hit 0 +Subquery_cache_miss 0 +show status like '%Handler_read%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 0 +Handler_read_last 0 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_retry 0 +Handler_read_rnd 0 +Handler_read_rnd_deleted 0 +Handler_read_rnd_next 16 +drop table t1, t2, t3; +# +# MDEV-288 CHEAP SQ: Valgrind warnings "Memory lost" with IN and EXISTS nested subquery, materialization+semijoin +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (0),(8); +CREATE TABLE t2 (b INT PRIMARY KEY); +INSERT INTO t2 VALUES (1),(2); +EXPLAIN +SELECT * FROM t1 WHERE 4 IN (SELECT MAX(b) FROM t2 WHERE EXISTS (SELECT * FROM t1)); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 MATERIALIZED NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +3 SUBQUERY t1 ALL NULL NULL NULL NULL 2 +SELECT * FROM t1 WHERE 4 IN (SELECT MAX(b) FROM t2 WHERE EXISTS (SELECT * FROM t1)); +a +drop table t1,t2; +# +# MDEV-410: EXPLAIN shows type=range, while SHOW EXPLAIN and userstat show full table scan is used +# +CREATE TABLE t1 (a VARCHAR(3) PRIMARY KEY) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('USA'); +CREATE TABLE t2 (b INT, c VARCHAR(52), KEY(b)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (3813,'United States'),(3940,'Russia'); +CREATE TABLE t3 (d INT, KEY(d)) ENGINE=MyISAM; +INSERT INTO t3 VALUES (12),(22),(9),(45); +create table t4 like t3; +insert into t4 select * from t3; +# This should not show range access for table t2 +explain +SELECT MIN(b) FROM ( SELECT * FROM t1, t2, t3 WHERE d = b ) AS alias1 +WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 1 +1 PRIMARY t2 ALL b NULL NULL NULL 2 Using where +1 PRIMARY t3 ref d d 5 test.t2.b 2 Using where; Using index +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +set @tmp_mdev410=@@global.userstat; +set global userstat=on; +flush table_statistics; +flush index_statistics; +SELECT MIN(b) FROM ( SELECT * FROM t1, t2, t3 WHERE d = b ) AS alias1 +WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 ); +MIN(b) +NULL +# The following shows that t2 was indeed scanned with a full scan. +show table_statistics; +Table_schema Table_name Rows_read Rows_changed Rows_changed_x_#indexes +test t1 2 0 0 +test t2 3 0 0 +show index_statistics; +Table_schema Table_name Index_name Rows_read +test t2 b 1 +set global userstat=@tmp_mdev410; +DROP TABLE t1,t2,t3,t4; +# +# MDEV-430: Server crashes in select_describe on EXPLAIN with +# materialization+semijoin, 2 nested subqueries, aggregate functions +# +CREATE TABLE t1 (a INT, KEY(a)); +INSERT INTO t1 VALUES (1),(8); +CREATE TABLE t2 (b INT, KEY(b)); +INSERT INTO t2 VALUES (45),(17),(20); +EXPLAIN SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t1, t2 WHERE b = a GROUP BY a HAVING a <> 1 ) ; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t1 index a a 5 NULL 2 Using where; Using index +2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index +DROP TABLE t1,t2; +# +# MDEV-435: Expensive subqueries may be evaluated during optimization in merge_key_fields +# +CREATE TABLE t1 (a INT, KEY(a)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (8),(0); +CREATE TABLE t2 (b INT, c VARCHAR(1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (4,'j'),(6,'v'); +CREATE TABLE t3 (d VARCHAR(1)) ENGINE=MyISAM; +INSERT INTO t3 VALUES ('b'),('c'); +EXPLAIN +SELECT * FROM t1 +WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 index a a 5 NULL 2 Using where; Using index +2 SUBQUERY <subquery3> ALL distinct_key NULL NULL NULL 1 +2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +3 MATERIALIZED t3 ALL NULL NULL NULL NULL 2 +SELECT * FROM t1 +WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10; +a +drop table t1, t2, t3; +# +# MDEV-405: Server crashes in test_if_skip_sort_order on EXPLAIN with GROUP BY and HAVING in EXISTS subquery +# +CREATE TABLE t1 (a INT, KEY(a)); +INSERT INTO t1 VALUES (1),(8); +CREATE TABLE t2 (b INT, KEY(b)); +INSERT INTO t2 VALUES (45),(17),(20); +EXPLAIN SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t1, t2 WHERE b = a GROUP BY a HAVING a <> 1 ) ; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t1 index a a 5 NULL 2 Using where; Using index +2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index +DROP TABLE t1,t2; +# +# MDEV-5991: crash in Item_field::used_tables +# +create table t1 (c int); +select exists(select 1 from t1 group by `c` in (select `c` from t1)); +exists(select 1 from t1 group by `c` in (select `c` from t1)) +0 +drop table t1; +# +# MDEV-7565: Server crash with Signal 6 (part 2) +# +Select +(Select Sum(`TestCase`.Revenue) From mysql.slow_log E +Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) +) As `ControlRev` +From +(Select 3 as Revenue, 4 as TemplateID) As `TestCase` +Group By TestCase.Revenue, TestCase.TemplateID; +ControlRev +NULL +# +# MDEV-7445:Server crash with Signal 6 +# +CREATE PROCEDURE procedure2() +BEGIN +Select +(Select Sum(`TestCase`.Revenue) From mysql.slow_log E +Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) +) As `ControlRev` + From +(Select 3 as Revenue, 4 as TemplateID) As `TestCase` +Group By TestCase.Revenue, TestCase.TemplateID; +END | +call procedure2(); +ControlRev +NULL +call procedure2(); +ControlRev +NULL +drop procedure procedure2; +SELECT +(SELECT user FROM mysql.user +WHERE h.host in (SELECT host FROM mysql.user) +) AS sq +FROM mysql.host h GROUP BY h.host; +sq +# +# MDEV-7846:Server crashes in Item_subselect::fix +#_fields or fails with Thread stack overrun +# +CREATE TABLE t1 (column1 INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (3),(9); +CREATE TABLE t2 (column2 INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1),(4); +CREATE TABLE t3 (column3 INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES (6),(8); +CREATE TABLE t4 (column4 INT) ENGINE=MyISAM; +INSERT INTO t4 VALUES (2),(5); +PREPARE stmt FROM " +SELECT ( + SELECT MAX( table1.column1 ) AS field1 + FROM t1 AS table1 + WHERE table3.column3 IN ( SELECT table2.column2 AS field2 FROM t2 AS table2 ) +) AS sq +FROM t3 AS table3, t4 AS table4 GROUP BY sq +"; +EXECUTE stmt; +sq +NULL +EXECUTE stmt; +sq +NULL +deallocate prepare stmt; +drop table t1,t2,t3,t4; +# +# MDEV-7122 +# Assertion `0' failed in subselect_hash_sj_engine::init +# +SET SESSION big_tables=1; +CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; +INSERT INTO t1 VALUES(0),(0),(0); +SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1); +a +0 +0 +0 +DROP TABLE t1; +SET SESSION big_tables=0; +# +# MDEV-10776: Server crash on query +# +create table t1 (field1 int); +insert into t1 values (1); +select round((select 1 from t1 limit 1)) +from t1 +group by round((select 1 from t1 limit 1)); +round((select 1 from t1 limit 1)) +1 +drop table t1; +# +# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE || +# m_lock_type != 2' failed in handler::ha_index_read_map +# +CREATE TABLE t1 (f1 INT); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (f2 INT, KEY(f2)); +INSERT INTO t2 VALUES (3); +CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM t2; +SELECT ( SELECT MIN(t2.f2) FROM t1 ) AS sq FROM t2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT ( SELECT MIN(v2.f2) FROM t1 ) AS sq FROM v2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT * FROM v2 where ( SELECT MIN(v2.f2) FROM t1 ) > 0; +f2 +3 +SELECT count(*) FROM v2 group by ( SELECT MIN(v2.f2) FROM t1 ); +count(*) +1 +delete from t1; +SELECT ( SELECT MIN(t2.f2) FROM t1 ) AS sq FROM t2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT ( SELECT MIN(v2.f2) FROM t1 ) AS sq FROM v2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +drop view v2; +drop table t1,t2; +# +# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*) +# +CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL); +INSERT INTO t1 VALUES ('foo','bar'); +SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 ); +f1 f2 +SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 ); +f1 f2 +foo bar +DROP TABLE t1; +# +# MDEV-10146: Wrong result (or questionable result and behavior) +# with aggregate function in uncorrelated SELECT subquery +# +CREATE TABLE t1 (f1 INT); +CREATE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (f2 int); +INSERT INTO t2 VALUES (3); +SELECT ( SELECT MAX(f1) FROM t2 ) FROM t1; +( SELECT MAX(f1) FROM t2 ) +2 +SELECT ( SELECT MAX(f1) FROM t2 ) FROM v1; +( SELECT MAX(f1) FROM t2 ) +2 +INSERT INTO t2 VALUES (4); +SELECT ( SELECT MAX(f1) FROM t2 ) FROM v1; +ERROR 21000: Subquery returns more than 1 row +SELECT ( SELECT MAX(f1) FROM t2 ) FROM t1; +ERROR 21000: Subquery returns more than 1 row +drop view v1; +drop table t1,t2; +CREATE TABLE t1 (f1 INT, KEY(f1)) ENGINE=MyISAM; +INSERT t1 VALUES (4),(8); +CREATE TABLE t2 (f2 INT, KEY(f2)) ENGINE=MyISAM; +INSERT t2 VALUES (6); +SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2; +(SELECT MAX(sq.f2) FROM t1) +NULL +# +# Disable this query till MDEV-13399 is resolved +# +# INSERT t2 VALUES (9); +# --error ER_SUBQUERY_NO_1_ROW +# SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2; +# +drop table t1, t2; +set optimizer_switch=default; +select @@optimizer_switch like '%exists_to_in=off%'; +@@optimizer_switch like '%exists_to_in=off%' +0 diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result index a71df97e6bc..51e3c7066d4 100644 --- a/mysql-test/r/subselect_no_mat.result +++ b/mysql-test/r/subselect_no_mat.result @@ -17,7 +17,7 @@ select (select 2); 2 explain extended select (select 2); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1249 Select 2 was reduced during optimization Note 1003 select 2 AS `(select 2)` @@ -344,11 +344,11 @@ patient_uq clinic_uq 2 2 explain extended select * from t6 where exists (select * from t7 where uq = clinic_uq); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t6 ALL NULL NULL NULL NULL 4 100.00 Using where -2 DEPENDENT SUBQUERY t7 eq_ref PRIMARY PRIMARY 4 test.t6.clinic_uq 1 100.00 Using index +1 PRIMARY t7 index PRIMARY PRIMARY 4 NULL 2 100.00 Using index +1 PRIMARY t6 ALL i1 NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join) Warnings: Note 1276 Field or reference 'test.t6.clinic_uq' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t6` where <expr_cache><`test`.`t6`.`clinic_uq`>(exists(select 1 from `test`.`t7` where (`test`.`t7`.`uq` = `test`.`t6`.`clinic_uq`))) +Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t7` join `test`.`t6` where (`test`.`t6`.`clinic_uq` = `test`.`t7`.`uq`) select * from t1 where a= (select a from t2,t4 where t2.b=t4.b); ERROR 23000: Column 'a' in field list is ambiguous drop table t1,t2,t3; @@ -586,7 +586,7 @@ a b 1 11 2 12 update t1 set b= (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t1 set b= (select b from t2); ERROR 21000: Subquery returns more than 1 row update t1 set b= (select b from t2 where t1.a = t2.a); @@ -609,7 +609,7 @@ select * from t1 where b = (select b from t2 where t1.a = t2.a); a b 2 12 delete from t1 where b in (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from t1 where b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete from t1 where b = (select b from t2 where t1.a = t2.a); @@ -635,7 +635,7 @@ a b 22 11 2 12 delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t12 where t11.a = t12.a); -ERROR HY000: You can't specify target table 't12' for update in FROM clause +ERROR HY000: Table 't12' is specified twice, both as a target for 'DELETE' and as a separate source for data delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2 where t11.a = t2.a); @@ -654,7 +654,7 @@ create table t3 (b int); insert into t2 values (1); insert into t3 values (1),(2); INSERT INTO t1 (x) VALUES ((SELECT x FROM t1)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t1 (x) VALUES ((SELECT b FROM t3)); ERROR 21000: Subquery returns more than 1 row INSERT INTO t1 (x) VALUES ((SELECT a FROM t2)); @@ -704,7 +704,7 @@ insert into t3 values (1),(2); select * from t1; x y replace into t1 (x, y) VALUES ((SELECT x FROM t1), (SELECT a+1 FROM t2)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data replace into t1 (x, y) VALUES ((SELECT a FROM t3), (SELECT a+1 FROM t2)); ERROR 21000: Subquery returns more than 1 row replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2)); @@ -741,7 +741,7 @@ id 1 EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t2 ref id id 5 const 1 100.00 Using index +1 SIMPLE t2 ref id id 5 const 1 100.00 Using index Warnings: Note 1249 Select 2 was reduced during optimization Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = 1) @@ -753,7 +753,7 @@ id 2 EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1)); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t2 ref id id 5 const 1 100.00 Using where; Using index +1 SIMPLE t2 ref id id 5 const 1 100.00 Using where; Using index Warnings: Note 1249 Select 3 was reduced during optimization Note 1249 Select 2 was reduced during optimization @@ -772,9 +772,9 @@ SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 2); id 2 INSERT INTO t2 VALUES ((SELECT * FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t2 VALUES ((SELECT id FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data SELECT * FROM t2; id 1 @@ -887,7 +887,7 @@ select 10.5 > ANY (SELECT * from t1); 1 explain extended select (select a+1) from t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 Note 1249 Select 2 was reduced during optimization @@ -1894,7 +1894,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 DEPENDENT SUBQUERY t1 eq_ref PRIMARY PRIMARY 4 test.tt.id 1 100.00 Using where; Using index Warnings: Note 1276 Field or reference 'test.tt.id' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`tt`.`id` AS `id`,`test`.`tt`.`text` AS `text` from `test`.`t1` `tt` where (not(<expr_cache><`test`.`tt`.`id`>(exists(select `test`.`t1`.`id` from `test`.`t1` where ((`test`.`t1`.`id` < 8) and (`test`.`t1`.`id` = `test`.`tt`.`id`)) having (`test`.`t1`.`id` is not null))))) +Note 1003 select `test`.`tt`.`id` AS `id`,`test`.`tt`.`text` AS `text` from `test`.`t1` `tt` where (not(<in_optimizer>(1,<expr_cache><`test`.`tt`.`id`>(exists(select `test`.`t1`.`id` from `test`.`t1` where ((`test`.`t1`.`id` < 8) and (`test`.`t1`.`id` = `test`.`tt`.`id`)) having (`test`.`t1`.`id` is not null)))))) insert into t1 (id, text) values (1000, 'text1000'), (1001, 'text1001'); create table t2 (id int not null, text varchar(20) not null default '', primary key (id)); insert into t2 (id, text) values (1, 'text1'), (2, 'text2'), (3, 'text3'), (4, 'text4'), (5, 'text5'), (6, 'text6'), (7, 'text7'), (8, 'text8'), (9, 'text9'), (10, 'text10'), (11, 'text1'), (12, 'text2'), (13, 'text3'), (14, 'text4'), (15, 'text5'), (16, 'text6'), (17, 'text7'), (18, 'text8'), (19, 'text9'), (20, 'text10'),(21, 'text1'), (22, 'text2'), (23, 'text3'), (24, 'text4'), (25, 'text5'), (26, 'text6'), (27, 'text7'), (28, 'text8'), (29, 'text9'), (30, 'text10'), (31, 'text1'), (32, 'text2'), (33, 'text3'), (34, 'text4'), (35, 'text5'), (36, 'text6'), (37, 'text7'), (38, 'text8'), (39, 'text9'), (40, 'text10'), (41, 'text1'), (42, 'text2'), (43, 'text3'), (44, 'text4'), (45, 'text5'), (46, 'text6'), (47, 'text7'), (48, 'text8'), (49, 'text9'), (50, 'text10'); @@ -2426,11 +2426,11 @@ a b 3 4 explain extended select * from t1 up where exists (select * from t1 where t1.a=up.a); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY up ALL NULL NULL NULL NULL 2 100.00 Using where -2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where +1 PRIMARY up ALL NULL NULL NULL NULL 2 100.00 +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where; FirstMatch(up); Using join buffer (flat, BNL join) Warnings: Note 1276 Field or reference 'test.up.a' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`up`.`a` AS `a`,`test`.`up`.`b` AS `b` from `test`.`t1` `up` where <expr_cache><`test`.`up`.`a`>(exists(select 1 from `test`.`t1` where (`test`.`t1`.`a` = `test`.`up`.`a`))) +Note 1003 select `test`.`up`.`a` AS `a`,`test`.`up`.`b` AS `b` from `test`.`t1` `up` semi join (`test`.`t1`) where (`test`.`t1`.`a` = `test`.`up`.`a`) drop table t1; CREATE TABLE t1 (t1_a int); INSERT INTO t1 VALUES (1); @@ -2973,7 +2973,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00 2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 9 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<expr_cache><`test`.`t1`.`one`,`test`.`t1`.`two`>(<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`))) and trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`)))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`)))))) AS `test` from `test`.`t1` +Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<expr_cache><`test`.`t1`.`one`,`test`.`t1`.`two`>(<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`)))) and trigcond(trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`))))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`)))))) AS `test` from `test`.`t1` explain extended SELECT one,two from t1 where ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N'); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00 @@ -2985,7 +2985,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00 2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 9 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<expr_cache><`test`.`t1`.`one`,`test`.`t1`.`two`>(<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`))) and trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`)))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`)))))) AS `test` from `test`.`t1` +Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<expr_cache><`test`.`t1`.`one`,`test`.`t1`.`two`>(<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`)))) and trigcond(trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`))))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`)))))) AS `test` from `test`.`t1` DROP TABLE t1,t2; set optimizer_switch=@tmp11867_optimizer_switch; CREATE TABLE t1 (a char(5), b char(5)); @@ -4432,11 +4432,11 @@ SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a)); EXPLAIN EXTENDED SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a)); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where -2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where; FirstMatch(t1); Using join buffer (flat, BNL join) Warnings: Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 -Note 1003 select 2 AS `2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a`>(exists(select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`))) +Note 1003 select 2 AS `2` from `test`.`t1` semi join (`test`.`t2`) where (`test`.`t2`.`a` = `test`.`t1`.`a`) EXPLAIN EXTENDED SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a) UNION (SELECT 1 FROM t2 WHERE t1.a = t2.a)); @@ -4556,7 +4556,7 @@ int_nokey int_key 0 0 EXPLAIN EXTENDED SELECT * FROM C WHERE `int_key` IN (SELECT `int_nokey`); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY C ALL NULL NULL NULL NULL 20 100.00 Using where +1 SIMPLE C ALL NULL NULL NULL NULL 20 100.00 Using where DROP TABLE C; # End of test for bug#45061. # @@ -4970,7 +4970,7 @@ SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 Using index 1 PRIMARY t3 ref b,b_2 b 5 test.t1.a 1 Using index -2 DEPENDENT SUBQUERY t2 ref b,b_2,c b 10 test.t3.c,test.t1.a 1 Using where; Using index; Using filesort +2 DEPENDENT SUBQUERY t2 ref b,b_2,c b 10 test.t3.c,test.t1.a 1 Using where; Using index SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a; a incorrect 1 1 @@ -5671,8 +5671,8 @@ EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT a FROM t2 USE INDEX() WHERE t2.a = t1.a); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where -2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 3 Using where +1 PRIMARY t1 ALL NULL NULL NULL NULL 4 +1 PRIMARY t2 ALL NULL NULL NULL NULL 3 Using where; FirstMatch(t1); Using join buffer (flat, BNL join) SELECT * FROM t1 WHERE EXISTS (SELECT a FROM t2 WHERE t2.a = t1.a); a @@ -5681,8 +5681,8 @@ EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT a FROM t2 WHERE t2.a = t1.a); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where -2 DEPENDENT SUBQUERY t2 ref idx idx 5 test.t1.a 2 Using index +1 PRIMARY t2 index idx idx 5 NULL 3 Using index; LooseScan +1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join) DROP TABLE t1,t2; # # BUG#752992: Wrong results for a subquery with 'semijoin=on' @@ -5899,7 +5899,7 @@ CREATE TABLE t2 ( f3 int, f10 int, KEY (f10,f3)) ; INSERT IGNORE INTO t2 VALUES (NULL,NULL),(5,0); DROP TABLE IF EXISTS t3; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' CREATE TABLE t3 ( f3 int) ; INSERT INTO t3 VALUES (0),(0); SELECT a1.f3 AS r FROM t2 AS a1 , t1 WHERE a1.f3 < ALL ( SELECT f3 FROM t3 WHERE f3 = 1 ) ; @@ -6111,7 +6111,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3 ) AS alias3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE <derived2> system NULL NULL NULL NULL 0 const row not found +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM ( SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 @@ -6156,7 +6156,7 @@ FROM t2 AS c_sq1_alias1 WHERE (c_sq1_alias1.col_int_nokey != @var2 OR c_sq1_alias1.pk != @var3)) ) AS alias3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables 3 DEPENDENT SUBQUERY c_sq1_alias1 system PRIMARY NULL NULL NULL 1 SELECT * FROM ( SELECT sq4_alias1.* FROM t1 AS sq4_alias1 @@ -6862,6 +6862,7 @@ Handler_read_key 8 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 22 @@ -6899,6 +6900,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 16 @@ -7078,6 +7080,7 @@ sq NULL deallocate prepare stmt; drop table t1,t2,t3,t4; +# # MDEV-7122 # Assertion `0' failed in subselect_hash_sj_engine::init # @@ -7103,6 +7106,32 @@ round((select 1 from t1 limit 1)) 1 drop table t1; # +# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE || +# m_lock_type != 2' failed in handler::ha_index_read_map +# +CREATE TABLE t1 (f1 INT); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (f2 INT, KEY(f2)); +INSERT INTO t2 VALUES (3); +CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM t2; +SELECT ( SELECT MIN(t2.f2) FROM t1 ) AS sq FROM t2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT ( SELECT MIN(v2.f2) FROM t1 ) AS sq FROM v2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT * FROM v2 where ( SELECT MIN(v2.f2) FROM t1 ) > 0; +f2 +3 +SELECT count(*) FROM v2 group by ( SELECT MIN(v2.f2) FROM t1 ); +count(*) +1 +delete from t1; +SELECT ( SELECT MIN(t2.f2) FROM t1 ) AS sq FROM t2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT ( SELECT MIN(v2.f2) FROM t1 ) AS sq FROM v2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +drop view v2; +drop table t1,t2; +# # MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*) # CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL); @@ -7138,10 +7167,17 @@ drop table t1,t2; CREATE TABLE t1 (f1 INT, KEY(f1)) ENGINE=MyISAM; INSERT t1 VALUES (4),(8); CREATE TABLE t2 (f2 INT, KEY(f2)) ENGINE=MyISAM; -INSERT t2 VALUES (6),(9); +INSERT t2 VALUES (6); SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2; (SELECT MAX(sq.f2) FROM t1) NULL +# +# Disable this query till MDEV-13399 is resolved +# +# INSERT t2 VALUES (9); +# --error ER_SUBQUERY_NO_1_ROW +# SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2; +# drop table t1, t2; set optimizer_switch=default; select @@optimizer_switch like '%materialization=on%'; diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result index 2f8c67fa167..4a26d641aa6 100644 --- a/mysql-test/r/subselect_no_opts.result +++ b/mysql-test/r/subselect_no_opts.result @@ -13,7 +13,7 @@ select (select 2); 2 explain extended select (select 2); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1249 Select 2 was reduced during optimization Note 1003 select 2 AS `(select 2)` @@ -341,10 +341,10 @@ patient_uq clinic_uq explain extended select * from t6 where exists (select * from t7 where uq = clinic_uq); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t6 ALL NULL NULL NULL NULL 4 100.00 Using where -2 DEPENDENT SUBQUERY t7 eq_ref PRIMARY PRIMARY 4 test.t6.clinic_uq 1 100.00 Using index +2 DEPENDENT SUBQUERY t7 unique_subquery PRIMARY PRIMARY 4 func 1 100.00 Using index Warnings: Note 1276 Field or reference 'test.t6.clinic_uq' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t6` where exists(select 1 from `test`.`t7` where (`test`.`t7`.`uq` = `test`.`t6`.`clinic_uq`)) +Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t6` where <in_optimizer>(`test`.`t6`.`clinic_uq`,<exists>(<primary_index_lookup>(<cache>(`test`.`t6`.`clinic_uq`) in t7 on PRIMARY))) select * from t1 where a= (select a from t2,t4 where t2.b=t4.b); ERROR 23000: Column 'a' in field list is ambiguous drop table t1,t2,t3; @@ -582,7 +582,7 @@ a b 1 11 2 12 update t1 set b= (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t1 set b= (select b from t2); ERROR 21000: Subquery returns more than 1 row update t1 set b= (select b from t2 where t1.a = t2.a); @@ -605,7 +605,7 @@ select * from t1 where b = (select b from t2 where t1.a = t2.a); a b 2 12 delete from t1 where b in (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from t1 where b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete from t1 where b = (select b from t2 where t1.a = t2.a); @@ -631,7 +631,7 @@ a b 22 11 2 12 delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t12 where t11.a = t12.a); -ERROR HY000: You can't specify target table 't12' for update in FROM clause +ERROR HY000: Table 't12' is specified twice, both as a target for 'DELETE' and as a separate source for data delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2 where t11.a = t2.a); @@ -650,7 +650,7 @@ create table t3 (b int); insert into t2 values (1); insert into t3 values (1),(2); INSERT INTO t1 (x) VALUES ((SELECT x FROM t1)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t1 (x) VALUES ((SELECT b FROM t3)); ERROR 21000: Subquery returns more than 1 row INSERT INTO t1 (x) VALUES ((SELECT a FROM t2)); @@ -700,7 +700,7 @@ insert into t3 values (1),(2); select * from t1; x y replace into t1 (x, y) VALUES ((SELECT x FROM t1), (SELECT a+1 FROM t2)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data replace into t1 (x, y) VALUES ((SELECT a FROM t3), (SELECT a+1 FROM t2)); ERROR 21000: Subquery returns more than 1 row replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2)); @@ -737,7 +737,7 @@ id 1 EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t2 ref id id 5 const 1 100.00 Using index +1 SIMPLE t2 ref id id 5 const 1 100.00 Using index Warnings: Note 1249 Select 2 was reduced during optimization Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = 1) @@ -749,7 +749,7 @@ id 2 EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1)); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t2 ref id id 5 const 1 100.00 Using where; Using index +1 SIMPLE t2 ref id id 5 const 1 100.00 Using where; Using index Warnings: Note 1249 Select 3 was reduced during optimization Note 1249 Select 2 was reduced during optimization @@ -768,9 +768,9 @@ SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 2); id 2 INSERT INTO t2 VALUES ((SELECT * FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t2 VALUES ((SELECT id FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data SELECT * FROM t2; id 1 @@ -883,7 +883,7 @@ select 10.5 > ANY (SELECT * from t1); 1 explain extended select (select a+1) from t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 Note 1249 Select 2 was reduced during optimization @@ -1890,7 +1890,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 DEPENDENT SUBQUERY t1 eq_ref PRIMARY PRIMARY 4 test.tt.id 1 100.00 Using where; Using index Warnings: Note 1276 Field or reference 'test.tt.id' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`tt`.`id` AS `id`,`test`.`tt`.`text` AS `text` from `test`.`t1` `tt` where (not(exists(select `test`.`t1`.`id` from `test`.`t1` where ((`test`.`t1`.`id` < 8) and (`test`.`t1`.`id` = `test`.`tt`.`id`)) having (`test`.`t1`.`id` is not null)))) +Note 1003 select `test`.`tt`.`id` AS `id`,`test`.`tt`.`text` AS `text` from `test`.`t1` `tt` where (not(<in_optimizer>(1,exists(select `test`.`t1`.`id` from `test`.`t1` where ((`test`.`t1`.`id` < 8) and (`test`.`t1`.`id` = `test`.`tt`.`id`)) having (`test`.`t1`.`id` is not null))))) insert into t1 (id, text) values (1000, 'text1000'), (1001, 'text1001'); create table t2 (id int not null, text varchar(20) not null default '', primary key (id)); insert into t2 (id, text) values (1, 'text1'), (2, 'text2'), (3, 'text3'), (4, 'text4'), (5, 'text5'), (6, 'text6'), (7, 'text7'), (8, 'text8'), (9, 'text9'), (10, 'text10'), (11, 'text1'), (12, 'text2'), (13, 'text3'), (14, 'text4'), (15, 'text5'), (16, 'text6'), (17, 'text7'), (18, 'text8'), (19, 'text9'), (20, 'text10'),(21, 'text1'), (22, 'text2'), (23, 'text3'), (24, 'text4'), (25, 'text5'), (26, 'text6'), (27, 'text7'), (28, 'text8'), (29, 'text9'), (30, 'text10'), (31, 'text1'), (32, 'text2'), (33, 'text3'), (34, 'text4'), (35, 'text5'), (36, 'text6'), (37, 'text7'), (38, 'text8'), (39, 'text9'), (40, 'text10'), (41, 'text1'), (42, 'text2'), (43, 'text3'), (44, 'text4'), (45, 'text5'), (46, 'text6'), (47, 'text7'), (48, 'text8'), (49, 'text9'), (50, 'text10'); @@ -2426,7 +2426,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: Note 1276 Field or reference 'test.up.a' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`up`.`a` AS `a`,`test`.`up`.`b` AS `b` from `test`.`t1` `up` where exists(select 1 from `test`.`t1` where (`test`.`t1`.`a` = `test`.`up`.`a`)) +Note 1003 select `test`.`up`.`a` AS `a`,`test`.`up`.`b` AS `b` from `test`.`t1` `up` where <in_optimizer>(`test`.`up`.`a`,<exists>(select `test`.`t1`.`a` from `test`.`t1` where (<cache>(`test`.`up`.`a`) = `test`.`t1`.`a`))) drop table t1; CREATE TABLE t1 (t1_a int); INSERT INTO t1 VALUES (1); @@ -2969,7 +2969,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00 2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 9 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`))) and trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`)))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`))))) AS `test` from `test`.`t1` +Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`)))) and trigcond(trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`))))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`))))) AS `test` from `test`.`t1` explain extended SELECT one,two from t1 where ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N'); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00 Using where @@ -2981,7 +2981,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00 2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 9 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`))) and trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`)))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`))))) AS `test` from `test`.`t1` +Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`)))) and trigcond(trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`))))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`))))) AS `test` from `test`.`t1` DROP TABLE t1,t2; set optimizer_switch=@tmp11867_optimizer_switch; CREATE TABLE t1 (a char(5), b char(5)); @@ -4432,7 +4432,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 -Note 1003 select 2 AS `2` from `test`.`t1` where exists(select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)) +Note 1003 select 2 AS `2` from `test`.`t1` where <in_optimizer>(`test`.`t1`.`a`,<exists>(select `test`.`t2`.`a` from `test`.`t2` where (<cache>(`test`.`t1`.`a`) = `test`.`t2`.`a`))) EXPLAIN EXTENDED SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a) UNION (SELECT 1 FROM t2 WHERE t1.a = t2.a)); @@ -4552,7 +4552,7 @@ int_nokey int_key 0 0 EXPLAIN EXTENDED SELECT * FROM C WHERE `int_key` IN (SELECT `int_nokey`); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY C ALL NULL NULL NULL NULL 20 100.00 Using where +1 SIMPLE C ALL NULL NULL NULL NULL 20 100.00 Using where DROP TABLE C; # End of test for bug#45061. # @@ -4966,7 +4966,7 @@ SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 Using index 1 PRIMARY t3 ref b,b_2 b 5 test.t1.a 1 Using index -2 DEPENDENT SUBQUERY t2 ref b,b_2,c b 10 test.t3.c,test.t1.a 1 Using where; Using index; Using filesort +2 DEPENDENT SUBQUERY t2 ref b,b_2,c b 10 test.t3.c,test.t1.a 1 Using where; Using index SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a; a incorrect 1 1 @@ -5678,7 +5678,7 @@ SELECT * FROM t1 WHERE EXISTS (SELECT a FROM t2 WHERE t2.a = t1.a); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where -2 DEPENDENT SUBQUERY t2 ref idx idx 5 test.t1.a 2 Using index +2 DEPENDENT SUBQUERY t2 index_subquery idx idx 5 func 2 Using index DROP TABLE t1,t2; # # BUG#752992: Wrong results for a subquery with 'semijoin=on' @@ -5895,7 +5895,7 @@ CREATE TABLE t2 ( f3 int, f10 int, KEY (f10,f3)) ; INSERT IGNORE INTO t2 VALUES (NULL,NULL),(5,0); DROP TABLE IF EXISTS t3; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' CREATE TABLE t3 ( f3 int) ; INSERT INTO t3 VALUES (0),(0); SELECT a1.f3 AS r FROM t2 AS a1 , t1 WHERE a1.f3 < ALL ( SELECT f3 FROM t3 WHERE f3 = 1 ) ; @@ -6107,7 +6107,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3 ) AS alias3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE <derived2> system NULL NULL NULL NULL 0 const row not found +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM ( SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 @@ -6152,7 +6152,7 @@ FROM t2 AS c_sq1_alias1 WHERE (c_sq1_alias1.col_int_nokey != @var2 OR c_sq1_alias1.pk != @var3)) ) AS alias3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables 3 DEPENDENT SUBQUERY c_sq1_alias1 system PRIMARY NULL NULL NULL 1 SELECT * FROM ( SELECT sq4_alias1.* FROM t1 AS sq4_alias1 @@ -6859,6 +6859,7 @@ Handler_read_key 8 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 22 @@ -6896,6 +6897,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 16 @@ -7076,6 +7078,7 @@ sq NULL deallocate prepare stmt; drop table t1,t2,t3,t4; +# # MDEV-7122 # Assertion `0' failed in subselect_hash_sj_engine::init # @@ -7101,6 +7104,32 @@ round((select 1 from t1 limit 1)) 1 drop table t1; # +# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE || +# m_lock_type != 2' failed in handler::ha_index_read_map +# +CREATE TABLE t1 (f1 INT); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (f2 INT, KEY(f2)); +INSERT INTO t2 VALUES (3); +CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM t2; +SELECT ( SELECT MIN(t2.f2) FROM t1 ) AS sq FROM t2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT ( SELECT MIN(v2.f2) FROM t1 ) AS sq FROM v2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT * FROM v2 where ( SELECT MIN(v2.f2) FROM t1 ) > 0; +f2 +3 +SELECT count(*) FROM v2 group by ( SELECT MIN(v2.f2) FROM t1 ); +count(*) +1 +delete from t1; +SELECT ( SELECT MIN(t2.f2) FROM t1 ) AS sq FROM t2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT ( SELECT MIN(v2.f2) FROM t1 ) AS sq FROM v2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +drop view v2; +drop table t1,t2; +# # MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*) # CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL); @@ -7136,9 +7165,16 @@ drop table t1,t2; CREATE TABLE t1 (f1 INT, KEY(f1)) ENGINE=MyISAM; INSERT t1 VALUES (4),(8); CREATE TABLE t2 (f2 INT, KEY(f2)) ENGINE=MyISAM; -INSERT t2 VALUES (6),(9); +INSERT t2 VALUES (6); SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2; (SELECT MAX(sq.f2) FROM t1) NULL +# +# Disable this query till MDEV-13399 is resolved +# +# INSERT t2 VALUES (9); +# --error ER_SUBQUERY_NO_1_ROW +# SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2; +# drop table t1, t2; set @optimizer_switch_for_subselect_test=null; diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result index 8dda0a4fd36..39e6a8c26d1 100644 --- a/mysql-test/r/subselect_no_scache.result +++ b/mysql-test/r/subselect_no_scache.result @@ -16,7 +16,7 @@ select (select 2); 2 explain extended select (select 2); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1249 Select 2 was reduced during optimization Note 1003 select 2 AS `(select 2)` @@ -343,11 +343,11 @@ patient_uq clinic_uq 2 2 explain extended select * from t6 where exists (select * from t7 where uq = clinic_uq); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t6 ALL NULL NULL NULL NULL 4 100.00 Using where -2 DEPENDENT SUBQUERY t7 eq_ref PRIMARY PRIMARY 4 test.t6.clinic_uq 1 100.00 Using index +1 PRIMARY t7 index PRIMARY PRIMARY 4 NULL 2 100.00 Using index +1 PRIMARY t6 ALL i1 NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join) Warnings: Note 1276 Field or reference 'test.t6.clinic_uq' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t6` where exists(select 1 from `test`.`t7` where (`test`.`t7`.`uq` = `test`.`t6`.`clinic_uq`)) +Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t7` join `test`.`t6` where (`test`.`t6`.`clinic_uq` = `test`.`t7`.`uq`) select * from t1 where a= (select a from t2,t4 where t2.b=t4.b); ERROR 23000: Column 'a' in field list is ambiguous drop table t1,t2,t3; @@ -585,7 +585,7 @@ a b 1 11 2 12 update t1 set b= (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t1 set b= (select b from t2); ERROR 21000: Subquery returns more than 1 row update t1 set b= (select b from t2 where t1.a = t2.a); @@ -608,7 +608,7 @@ select * from t1 where b = (select b from t2 where t1.a = t2.a); a b 2 12 delete from t1 where b in (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from t1 where b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete from t1 where b = (select b from t2 where t1.a = t2.a); @@ -634,7 +634,7 @@ a b 22 11 2 12 delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t12 where t11.a = t12.a); -ERROR HY000: You can't specify target table 't12' for update in FROM clause +ERROR HY000: Table 't12' is specified twice, both as a target for 'DELETE' and as a separate source for data delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2 where t11.a = t2.a); @@ -653,7 +653,7 @@ create table t3 (b int); insert into t2 values (1); insert into t3 values (1),(2); INSERT INTO t1 (x) VALUES ((SELECT x FROM t1)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t1 (x) VALUES ((SELECT b FROM t3)); ERROR 21000: Subquery returns more than 1 row INSERT INTO t1 (x) VALUES ((SELECT a FROM t2)); @@ -703,7 +703,7 @@ insert into t3 values (1),(2); select * from t1; x y replace into t1 (x, y) VALUES ((SELECT x FROM t1), (SELECT a+1 FROM t2)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data replace into t1 (x, y) VALUES ((SELECT a FROM t3), (SELECT a+1 FROM t2)); ERROR 21000: Subquery returns more than 1 row replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2)); @@ -740,7 +740,7 @@ id 1 EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t2 ref id id 5 const 1 100.00 Using index +1 SIMPLE t2 ref id id 5 const 1 100.00 Using index Warnings: Note 1249 Select 2 was reduced during optimization Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = 1) @@ -752,7 +752,7 @@ id 2 EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1)); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t2 ref id id 5 const 1 100.00 Using where; Using index +1 SIMPLE t2 ref id id 5 const 1 100.00 Using where; Using index Warnings: Note 1249 Select 3 was reduced during optimization Note 1249 Select 2 was reduced during optimization @@ -771,9 +771,9 @@ SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 2); id 2 INSERT INTO t2 VALUES ((SELECT * FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t2 VALUES ((SELECT id FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data SELECT * FROM t2; id 1 @@ -886,7 +886,7 @@ select 10.5 > ANY (SELECT * from t1); 1 explain extended select (select a+1) from t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 Note 1249 Select 2 was reduced during optimization @@ -1893,7 +1893,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 DEPENDENT SUBQUERY t1 eq_ref PRIMARY PRIMARY 4 test.tt.id 1 100.00 Using where; Using index Warnings: Note 1276 Field or reference 'test.tt.id' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`tt`.`id` AS `id`,`test`.`tt`.`text` AS `text` from `test`.`t1` `tt` where (not(exists(select `test`.`t1`.`id` from `test`.`t1` where ((`test`.`t1`.`id` < 8) and (`test`.`t1`.`id` = `test`.`tt`.`id`)) having (`test`.`t1`.`id` is not null)))) +Note 1003 select `test`.`tt`.`id` AS `id`,`test`.`tt`.`text` AS `text` from `test`.`t1` `tt` where (not(<in_optimizer>(1,exists(select `test`.`t1`.`id` from `test`.`t1` where ((`test`.`t1`.`id` < 8) and (`test`.`t1`.`id` = `test`.`tt`.`id`)) having (`test`.`t1`.`id` is not null))))) insert into t1 (id, text) values (1000, 'text1000'), (1001, 'text1001'); create table t2 (id int not null, text varchar(20) not null default '', primary key (id)); insert into t2 (id, text) values (1, 'text1'), (2, 'text2'), (3, 'text3'), (4, 'text4'), (5, 'text5'), (6, 'text6'), (7, 'text7'), (8, 'text8'), (9, 'text9'), (10, 'text10'), (11, 'text1'), (12, 'text2'), (13, 'text3'), (14, 'text4'), (15, 'text5'), (16, 'text6'), (17, 'text7'), (18, 'text8'), (19, 'text9'), (20, 'text10'),(21, 'text1'), (22, 'text2'), (23, 'text3'), (24, 'text4'), (25, 'text5'), (26, 'text6'), (27, 'text7'), (28, 'text8'), (29, 'text9'), (30, 'text10'), (31, 'text1'), (32, 'text2'), (33, 'text3'), (34, 'text4'), (35, 'text5'), (36, 'text6'), (37, 'text7'), (38, 'text8'), (39, 'text9'), (40, 'text10'), (41, 'text1'), (42, 'text2'), (43, 'text3'), (44, 'text4'), (45, 'text5'), (46, 'text6'), (47, 'text7'), (48, 'text8'), (49, 'text9'), (50, 'text10'); @@ -2425,11 +2425,12 @@ a b 3 4 explain extended select * from t1 up where exists (select * from t1 where t1.a=up.a); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY up ALL NULL NULL NULL NULL 2 100.00 Using where -2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where +1 PRIMARY up ALL NULL NULL NULL NULL 2 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +2 MATERIALIZED t1 ALL NULL NULL NULL NULL 2 100.00 Warnings: Note 1276 Field or reference 'test.up.a' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`up`.`a` AS `a`,`test`.`up`.`b` AS `b` from `test`.`t1` `up` where exists(select 1 from `test`.`t1` where (`test`.`t1`.`a` = `test`.`up`.`a`)) +Note 1003 select `test`.`up`.`a` AS `a`,`test`.`up`.`b` AS `b` from `test`.`t1` `up` semi join (`test`.`t1`) where 1 drop table t1; CREATE TABLE t1 (t1_a int); INSERT INTO t1 VALUES (1); @@ -2972,7 +2973,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00 2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 9 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`))) and trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`)))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`))))) AS `test` from `test`.`t1` +Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`)))) and trigcond(trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`))))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`))))) AS `test` from `test`.`t1` explain extended SELECT one,two from t1 where ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N'); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00 @@ -2985,7 +2986,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00 2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 9 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`))) and trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`)))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`))))) AS `test` from `test`.`t1` +Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`)))) and trigcond(trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`))))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`))))) AS `test` from `test`.`t1` DROP TABLE t1,t2; set optimizer_switch=@tmp11867_optimizer_switch; CREATE TABLE t1 (a char(5), b char(5)); @@ -4434,11 +4435,12 @@ SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a)); EXPLAIN EXTENDED SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a)); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where -2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 100.00 Warnings: Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 -Note 1003 select 2 AS `2` from `test`.`t1` where exists(select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)) +Note 1003 select 2 AS `2` from `test`.`t1` semi join (`test`.`t2`) where 1 EXPLAIN EXTENDED SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a) UNION (SELECT 1 FROM t2 WHERE t1.a = t2.a)); @@ -4560,7 +4562,7 @@ int_nokey int_key 0 0 EXPLAIN EXTENDED SELECT * FROM C WHERE `int_key` IN (SELECT `int_nokey`); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY C ALL NULL NULL NULL NULL 20 100.00 Using where +1 SIMPLE C ALL NULL NULL NULL NULL 20 100.00 Using where DROP TABLE C; # End of test for bug#45061. # @@ -4974,7 +4976,7 @@ SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 Using index 1 PRIMARY t3 ref b,b_2 b 5 test.t1.a 1 Using index -2 DEPENDENT SUBQUERY t2 ref b,b_2,c b 10 test.t3.c,test.t1.a 1 Using where; Using index; Using filesort +2 DEPENDENT SUBQUERY t2 ref b,b_2,c b 10 test.t3.c,test.t1.a 1 Using where; Using index SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a; a incorrect 1 1 @@ -5676,8 +5678,9 @@ EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT a FROM t2 USE INDEX() WHERE t2.a = t1.a); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where -2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 3 Using where +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3 +1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join) +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 SELECT * FROM t1 WHERE EXISTS (SELECT a FROM t2 WHERE t2.a = t1.a); a @@ -5686,8 +5689,9 @@ EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT a FROM t2 WHERE t2.a = t1.a); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where -2 DEPENDENT SUBQUERY t2 ref idx idx 5 test.t1.a 2 Using index +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3 +1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join) +2 MATERIALIZED t2 index idx idx 5 NULL 3 Using index DROP TABLE t1,t2; # # BUG#752992: Wrong results for a subquery with 'semijoin=on' @@ -5904,7 +5908,7 @@ CREATE TABLE t2 ( f3 int, f10 int, KEY (f10,f3)) ; INSERT IGNORE INTO t2 VALUES (NULL,NULL),(5,0); DROP TABLE IF EXISTS t3; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' CREATE TABLE t3 ( f3 int) ; INSERT INTO t3 VALUES (0),(0); SELECT a1.f3 AS r FROM t2 AS a1 , t1 WHERE a1.f3 < ALL ( SELECT f3 FROM t3 WHERE f3 = 1 ) ; @@ -6118,7 +6122,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3 ) AS alias3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE <derived2> system NULL NULL NULL NULL 0 const row not found +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM ( SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 @@ -6163,7 +6167,7 @@ FROM t2 AS c_sq1_alias1 WHERE (c_sq1_alias1.col_int_nokey != @var2 OR c_sq1_alias1.pk != @var3)) ) AS alias3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables 3 DEPENDENT SUBQUERY c_sq1_alias1 system PRIMARY NULL NULL NULL 1 SELECT * FROM ( SELECT sq4_alias1.* FROM t1 AS sq4_alias1 @@ -6870,6 +6874,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 58 @@ -6907,6 +6912,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 16 @@ -7087,6 +7093,7 @@ sq NULL deallocate prepare stmt; drop table t1,t2,t3,t4; +# # MDEV-7122 # Assertion `0' failed in subselect_hash_sj_engine::init # @@ -7112,6 +7119,32 @@ round((select 1 from t1 limit 1)) 1 drop table t1; # +# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE || +# m_lock_type != 2' failed in handler::ha_index_read_map +# +CREATE TABLE t1 (f1 INT); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (f2 INT, KEY(f2)); +INSERT INTO t2 VALUES (3); +CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM t2; +SELECT ( SELECT MIN(t2.f2) FROM t1 ) AS sq FROM t2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT ( SELECT MIN(v2.f2) FROM t1 ) AS sq FROM v2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT * FROM v2 where ( SELECT MIN(v2.f2) FROM t1 ) > 0; +f2 +3 +SELECT count(*) FROM v2 group by ( SELECT MIN(v2.f2) FROM t1 ); +count(*) +1 +delete from t1; +SELECT ( SELECT MIN(t2.f2) FROM t1 ) AS sq FROM t2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT ( SELECT MIN(v2.f2) FROM t1 ) AS sq FROM v2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +drop view v2; +drop table t1,t2; +# # MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*) # CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL); @@ -7147,10 +7180,17 @@ drop table t1,t2; CREATE TABLE t1 (f1 INT, KEY(f1)) ENGINE=MyISAM; INSERT t1 VALUES (4),(8); CREATE TABLE t2 (f2 INT, KEY(f2)) ENGINE=MyISAM; -INSERT t2 VALUES (6),(9); +INSERT t2 VALUES (6); SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2; (SELECT MAX(sq.f2) FROM t1) NULL +# +# Disable this query till MDEV-13399 is resolved +# +# INSERT t2 VALUES (9); +# --error ER_SUBQUERY_NO_1_ROW +# SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2; +# drop table t1, t2; set optimizer_switch=default; select @@optimizer_switch like '%subquery_cache=on%'; diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result index 339e2b89786..6980969bb79 100644 --- a/mysql-test/r/subselect_no_semijoin.result +++ b/mysql-test/r/subselect_no_semijoin.result @@ -13,7 +13,7 @@ select (select 2); 2 explain extended select (select 2); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1249 Select 2 was reduced during optimization Note 1003 select 2 AS `(select 2)` @@ -341,10 +341,10 @@ patient_uq clinic_uq explain extended select * from t6 where exists (select * from t7 where uq = clinic_uq); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t6 ALL NULL NULL NULL NULL 4 100.00 Using where -2 DEPENDENT SUBQUERY t7 eq_ref PRIMARY PRIMARY 4 test.t6.clinic_uq 1 100.00 Using index +2 MATERIALIZED t7 index PRIMARY PRIMARY 4 NULL 2 100.00 Using index Warnings: Note 1276 Field or reference 'test.t6.clinic_uq' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t6` where <expr_cache><`test`.`t6`.`clinic_uq`>(exists(select 1 from `test`.`t7` where (`test`.`t7`.`uq` = `test`.`t6`.`clinic_uq`))) +Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t6` where <expr_cache><`test`.`t6`.`clinic_uq`>(<in_optimizer>(`test`.`t6`.`clinic_uq`,`test`.`t6`.`clinic_uq` in ( <materialize> (select `test`.`t7`.`uq` from `test`.`t7` where 1 ), <primary_index_lookup>(`test`.`t6`.`clinic_uq` in <temporary table> on distinct_key where ((`test`.`t6`.`clinic_uq` = `<subquery2>`.`uq`)))))) select * from t1 where a= (select a from t2,t4 where t2.b=t4.b); ERROR 23000: Column 'a' in field list is ambiguous drop table t1,t2,t3; @@ -582,7 +582,7 @@ a b 1 11 2 12 update t1 set b= (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t1 set b= (select b from t2); ERROR 21000: Subquery returns more than 1 row update t1 set b= (select b from t2 where t1.a = t2.a); @@ -605,7 +605,7 @@ select * from t1 where b = (select b from t2 where t1.a = t2.a); a b 2 12 delete from t1 where b in (select b from t1); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete from t1 where b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete from t1 where b = (select b from t2 where t1.a = t2.a); @@ -631,7 +631,7 @@ a b 22 11 2 12 delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t12 where t11.a = t12.a); -ERROR HY000: You can't specify target table 't12' for update in FROM clause +ERROR HY000: Table 't12' is specified twice, both as a target for 'DELETE' and as a separate source for data delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2); ERROR 21000: Subquery returns more than 1 row delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2 where t11.a = t2.a); @@ -650,7 +650,7 @@ create table t3 (b int); insert into t2 values (1); insert into t3 values (1),(2); INSERT INTO t1 (x) VALUES ((SELECT x FROM t1)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t1 (x) VALUES ((SELECT b FROM t3)); ERROR 21000: Subquery returns more than 1 row INSERT INTO t1 (x) VALUES ((SELECT a FROM t2)); @@ -700,7 +700,7 @@ insert into t3 values (1),(2); select * from t1; x y replace into t1 (x, y) VALUES ((SELECT x FROM t1), (SELECT a+1 FROM t2)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data replace into t1 (x, y) VALUES ((SELECT a FROM t3), (SELECT a+1 FROM t2)); ERROR 21000: Subquery returns more than 1 row replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2)); @@ -737,7 +737,7 @@ id 1 EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t2 ref id id 5 const 1 100.00 Using index +1 SIMPLE t2 ref id id 5 const 1 100.00 Using index Warnings: Note 1249 Select 2 was reduced during optimization Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = 1) @@ -749,7 +749,7 @@ id 2 EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1)); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t2 ref id id 5 const 1 100.00 Using where; Using index +1 SIMPLE t2 ref id id 5 const 1 100.00 Using where; Using index Warnings: Note 1249 Select 3 was reduced during optimization Note 1249 Select 2 was reduced during optimization @@ -768,9 +768,9 @@ SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 2); id 2 INSERT INTO t2 VALUES ((SELECT * FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data INSERT INTO t2 VALUES ((SELECT id FROM t2)); -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data SELECT * FROM t2; id 1 @@ -883,7 +883,7 @@ select 10.5 > ANY (SELECT * from t1); 1 explain extended select (select a+1) from t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 Note 1249 Select 2 was reduced during optimization @@ -1890,7 +1890,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 DEPENDENT SUBQUERY t1 eq_ref PRIMARY PRIMARY 4 test.tt.id 1 100.00 Using where; Using index Warnings: Note 1276 Field or reference 'test.tt.id' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`tt`.`id` AS `id`,`test`.`tt`.`text` AS `text` from `test`.`t1` `tt` where (not(<expr_cache><`test`.`tt`.`id`>(exists(select `test`.`t1`.`id` from `test`.`t1` where ((`test`.`t1`.`id` < 8) and (`test`.`t1`.`id` = `test`.`tt`.`id`)) having (`test`.`t1`.`id` is not null))))) +Note 1003 select `test`.`tt`.`id` AS `id`,`test`.`tt`.`text` AS `text` from `test`.`t1` `tt` where (not(<in_optimizer>(1,<expr_cache><`test`.`tt`.`id`>(exists(select `test`.`t1`.`id` from `test`.`t1` where ((`test`.`t1`.`id` < 8) and (`test`.`t1`.`id` = `test`.`tt`.`id`)) having (`test`.`t1`.`id` is not null)))))) insert into t1 (id, text) values (1000, 'text1000'), (1001, 'text1001'); create table t2 (id int not null, text varchar(20) not null default '', primary key (id)); insert into t2 (id, text) values (1, 'text1'), (2, 'text2'), (3, 'text3'), (4, 'text4'), (5, 'text5'), (6, 'text6'), (7, 'text7'), (8, 'text8'), (9, 'text9'), (10, 'text10'), (11, 'text1'), (12, 'text2'), (13, 'text3'), (14, 'text4'), (15, 'text5'), (16, 'text6'), (17, 'text7'), (18, 'text8'), (19, 'text9'), (20, 'text10'),(21, 'text1'), (22, 'text2'), (23, 'text3'), (24, 'text4'), (25, 'text5'), (26, 'text6'), (27, 'text7'), (28, 'text8'), (29, 'text9'), (30, 'text10'), (31, 'text1'), (32, 'text2'), (33, 'text3'), (34, 'text4'), (35, 'text5'), (36, 'text6'), (37, 'text7'), (38, 'text8'), (39, 'text9'), (40, 'text10'), (41, 'text1'), (42, 'text2'), (43, 'text3'), (44, 'text4'), (45, 'text5'), (46, 'text6'), (47, 'text7'), (48, 'text8'), (49, 'text9'), (50, 'text10'); @@ -2423,10 +2423,10 @@ a b explain extended select * from t1 up where exists (select * from t1 where t1.a=up.a); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY up ALL NULL NULL NULL NULL 2 100.00 Using where -2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where +2 MATERIALIZED t1 ALL NULL NULL NULL NULL 2 100.00 Warnings: Note 1276 Field or reference 'test.up.a' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`up`.`a` AS `a`,`test`.`up`.`b` AS `b` from `test`.`t1` `up` where <expr_cache><`test`.`up`.`a`>(exists(select 1 from `test`.`t1` where (`test`.`t1`.`a` = `test`.`up`.`a`))) +Note 1003 select `test`.`up`.`a` AS `a`,`test`.`up`.`b` AS `b` from `test`.`t1` `up` where <expr_cache><`test`.`up`.`a`>(<in_optimizer>(`test`.`up`.`a`,`test`.`up`.`a` in ( <materialize> (select `test`.`t1`.`a` from `test`.`t1` where 1 ), <primary_index_lookup>(`test`.`up`.`a` in <temporary table> on distinct_key where ((`test`.`up`.`a` = `<subquery2>`.`a`)))))) drop table t1; CREATE TABLE t1 (t1_a int); INSERT INTO t1 VALUES (1); @@ -4429,10 +4429,10 @@ EXPLAIN EXTENDED SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a)); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where -2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 100.00 Warnings: Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 -Note 1003 select 2 AS `2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a`>(exists(select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`))) +Note 1003 select 2 AS `2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a`>(<in_optimizer>(`test`.`t1`.`a`,`test`.`t1`.`a` in ( <materialize> (select `test`.`t2`.`a` from `test`.`t2` where 1 ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where ((`test`.`t1`.`a` = `<subquery2>`.`a`)))))) EXPLAIN EXTENDED SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a) UNION (SELECT 1 FROM t2 WHERE t1.a = t2.a)); @@ -4552,7 +4552,7 @@ int_nokey int_key 0 0 EXPLAIN EXTENDED SELECT * FROM C WHERE `int_key` IN (SELECT `int_nokey`); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY C ALL NULL NULL NULL NULL 20 100.00 Using where +1 SIMPLE C ALL NULL NULL NULL NULL 20 100.00 Using where DROP TABLE C; # End of test for bug#45061. # @@ -4966,7 +4966,7 @@ SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 Using index 1 PRIMARY t3 ref b,b_2 b 5 test.t1.a 1 Using index -2 DEPENDENT SUBQUERY t2 ref b,b_2,c b 10 test.t3.c,test.t1.a 1 Using where; Using index; Using filesort +2 DEPENDENT SUBQUERY t2 ref b,b_2,c b 10 test.t3.c,test.t1.a 1 Using where; Using index SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a; a incorrect 1 1 @@ -5668,7 +5668,7 @@ SELECT * FROM t1 WHERE EXISTS (SELECT a FROM t2 USE INDEX() WHERE t2.a = t1.a); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where -2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 3 Using where +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 SELECT * FROM t1 WHERE EXISTS (SELECT a FROM t2 WHERE t2.a = t1.a); a @@ -5678,7 +5678,7 @@ SELECT * FROM t1 WHERE EXISTS (SELECT a FROM t2 WHERE t2.a = t1.a); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where -2 DEPENDENT SUBQUERY t2 ref idx idx 5 test.t1.a 2 Using index +2 MATERIALIZED t2 index idx idx 5 NULL 3 Using index DROP TABLE t1,t2; # # BUG#752992: Wrong results for a subquery with 'semijoin=on' @@ -5895,7 +5895,7 @@ CREATE TABLE t2 ( f3 int, f10 int, KEY (f10,f3)) ; INSERT IGNORE INTO t2 VALUES (NULL,NULL),(5,0); DROP TABLE IF EXISTS t3; Warnings: -Note 1051 Unknown table 't3' +Note 1051 Unknown table 'test.t3' CREATE TABLE t3 ( f3 int) ; INSERT INTO t3 VALUES (0),(0); SELECT a1.f3 AS r FROM t2 AS a1 , t1 WHERE a1.f3 < ALL ( SELECT f3 FROM t3 WHERE f3 = 1 ) ; @@ -6107,7 +6107,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3 ) AS alias3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE <derived2> system NULL NULL NULL NULL 0 const row not found +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM ( SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 @@ -6152,7 +6152,7 @@ FROM t2 AS c_sq1_alias1 WHERE (c_sq1_alias1.col_int_nokey != @var2 OR c_sq1_alias1.pk != @var3)) ) AS alias3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables 3 DEPENDENT SUBQUERY c_sq1_alias1 system PRIMARY NULL NULL NULL 1 SELECT * FROM ( SELECT sq4_alias1.* FROM t1 AS sq4_alias1 @@ -6859,6 +6859,7 @@ Handler_read_key 8 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 22 @@ -6896,6 +6897,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 16 @@ -7076,6 +7078,7 @@ sq NULL deallocate prepare stmt; drop table t1,t2,t3,t4; +# # MDEV-7122 # Assertion `0' failed in subselect_hash_sj_engine::init # @@ -7101,6 +7104,32 @@ round((select 1 from t1 limit 1)) 1 drop table t1; # +# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE || +# m_lock_type != 2' failed in handler::ha_index_read_map +# +CREATE TABLE t1 (f1 INT); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (f2 INT, KEY(f2)); +INSERT INTO t2 VALUES (3); +CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM t2; +SELECT ( SELECT MIN(t2.f2) FROM t1 ) AS sq FROM t2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT ( SELECT MIN(v2.f2) FROM t1 ) AS sq FROM v2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT * FROM v2 where ( SELECT MIN(v2.f2) FROM t1 ) > 0; +f2 +3 +SELECT count(*) FROM v2 group by ( SELECT MIN(v2.f2) FROM t1 ); +count(*) +1 +delete from t1; +SELECT ( SELECT MIN(t2.f2) FROM t1 ) AS sq FROM t2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +SELECT ( SELECT MIN(v2.f2) FROM t1 ) AS sq FROM v2 GROUP BY sq; +ERROR 42000: Can't group on 'sq' +drop view v2; +drop table t1,t2; +# # MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*) # CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL); @@ -7136,10 +7165,17 @@ drop table t1,t2; CREATE TABLE t1 (f1 INT, KEY(f1)) ENGINE=MyISAM; INSERT t1 VALUES (4),(8); CREATE TABLE t2 (f2 INT, KEY(f2)) ENGINE=MyISAM; -INSERT t2 VALUES (6),(9); +INSERT t2 VALUES (6); SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2; (SELECT MAX(sq.f2) FROM t1) NULL +# +# Disable this query till MDEV-13399 is resolved +# +# INSERT t2 VALUES (9); +# --error ER_SUBQUERY_NO_1_ROW +# SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2; +# drop table t1, t2; set @optimizer_switch_for_subselect_test=null; set @join_cache_level_for_subselect_test=NULL; diff --git a/mysql-test/r/subselect_sj.result b/mysql-test/r/subselect_sj.result index 74384141998..79a98b3efa1 100644 --- a/mysql-test/r/subselect_sj.result +++ b/mysql-test/r/subselect_sj.result @@ -94,6 +94,7 @@ id select_type tABle type possiBle_keys key key_len ref rows filtered ExtrA 2 MATERIALIZED t10 index PRIMARY PRIMARY 4 NULL 10 100.00 Using index Warnings: Note 1003 select `test`.`t1`.`A` AS `A`,`test`.`t1`.`B` AS `B`,`test`.`t2`.`A` AS `A`,`test`.`t2`.`B` AS `B` from `test`.`t1` left join `test`.`t2` on(((`test`.`t2`.`A` = `test`.`t1`.`A`) And <in_optimizer>(`test`.`t1`.`A`,`test`.`t1`.`A` in ( <mAteriAlize> (select `test`.`t10`.`pk` from `test`.`t10` ), <primAry_index_lookup>(`test`.`t1`.`A` in <temporAry tABle> on distinct_key where ((`test`.`t1`.`A` = `<suBquery2>`.`pk`))))))) where 1 +set join_buffer_size=8*1024; we shouldn't flatten if we're going to get a join of > MAX_TABLES. explain select * from t1 s00, t1 s01, t1 s02, t1 s03, t1 s04,t1 s05,t1 s06,t1 s07,t1 s08,t1 s09, @@ -185,6 +186,7 @@ a b a b 0 0 0 0 1 1 1 1 2 2 2 2 +set join_buffer_size=default; prepare s1 from ' select * from t1 left join t2 on (t2.a= t1.a and t2.a in (select pk from t10)) @@ -803,7 +805,7 @@ EXPLAIN EXTENDED SELECT pk FROM t1 WHERE (a, b) IN (SELECT a, b FROM t2 WHERE pk id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 11 func,func 1 100.00 -2 MATERIALIZED t2 range PRIMARY PRIMARY 4 NULL 2 100.00 Using index condition; Rowid-ordered scan +2 MATERIALIZED t2 range PRIMARY PRIMARY 4 NULL 2 100.00 Using index condition; Using where; Rowid-ordered scan Warnings: Note 1003 select `test`.`t1`.`pk` AS `pk` from `test`.`t1` semi join (`test`.`t2`) where ((`test`.`t2`.`pk` > 0)) SELECT pk FROM t1 WHERE (a, b) IN (SELECT a, b FROM t2 WHERE pk > 0); @@ -941,9 +943,9 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.t1field 1 Using index EXECUTE stmt; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 2 Using index -1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.t1field 1 Using index -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.t1field 1 Using index +1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 Using index +1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t1.t1field 1 Using index +1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.t1field 1 Using index DROP TABLE t1, t2, t3; DROP VIEW v2, v3; # End of Bug#49198 @@ -1007,8 +1009,8 @@ insert into t2 values ("1", "1", "sup", "0"), ("2", "1", "sup", "1"), ("4", "1", "sup", "0"); create table t3 ( id int(11) not null default '0', -preceeding_id int(11) not null default '0', -primary key (id,preceeding_id) +preceding_id int(11) not null default '0', +primary key (id,preceding_id) ); create table t4 ( user_id varchar(50) not null, @@ -3146,9 +3148,9 @@ LEFT JOIN ( ( SELECT * FROM t2 WHERE c2 IN ( SELECT c3 FROM t3 ) ) AS sq INNER JOIN t4 ) ON (c1 = c2); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 -1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where -1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where +1 PRIMARY t4 ALL NULL NULL NULL NULL 2 100.00 3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t2`.`c2` AS `c2`,`test`.`t4`.`c4` AS `c4` from `test`.`t1` left join (`test`.`t2` join `test`.`t4`) on(((`test`.`t2`.`c2` = `test`.`t1`.`c1`) and <in_optimizer>(`test`.`t1`.`c1`,<exists>(select `test`.`t3`.`c3` from `test`.`t3` where (<cache>(`test`.`t2`.`c2`) = `test`.`t3`.`c3`))))) where 1 diff --git a/mysql-test/r/subselect_sj2.result b/mysql-test/r/subselect_sj2.result index 9a5da710a4c..e6259a3979b 100644 --- a/mysql-test/r/subselect_sj2.result +++ b/mysql-test/r/subselect_sj2.result @@ -1262,5 +1262,38 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY T2_0_ ref FK_T2_T1Id FK_T2_T1Id 8 test.T2_1_.t1idref 1 Using index; End temporary drop table t3,t2,t1; set optimizer_search_depth=@tmp7474; +# +# +# +CREATE TABLE t1 ( +id int(16) NOT NULL AUTO_INCREMENT, +PRIMARY KEY (id) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE t2 ( +id int(16) NOT NULL AUTO_INCREMENT, +t3_id int(16) NOT NULL DEFAULT '0', +t1_id int(16) NOT NULL DEFAULT '0', +PRIMARY KEY (id), +KEY t3_idx (t3_id), +KEY t1_idx (t1_id) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE t3 ( +id int(16) NOT NULL AUTO_INCREMENT, +PRIMARY KEY (id) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +INSERT INTO t3 VALUES (1); +INSERT INTO t2 VALUES (1, 1, 1); +INSERT INTO t2 VALUES (2, 1, 2); +INSERT INTO t2 VALUES (3, 1, 2); +INSERT INTO t2 VALUES (4, 1, 1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +SELECT * FROM t1 WHERE t1.id IN ( +SELECT t2.t1_id FROM t3 JOIN t2 ON t3.id = t2.t3_id WHERE t3.id = 1 +); +id +1 +2 +drop table t1,t2,t3; # This must be the last in the file: set optimizer_switch=@subselect_sj2_tmp; diff --git a/mysql-test/r/subselect_sj2_jcl6,innodb_plugin.rdiff b/mysql-test/r/subselect_sj2_jcl6,innodb_plugin.rdiff deleted file mode 100644 index bf2c36932d5..00000000000 --- a/mysql-test/r/subselect_sj2_jcl6,innodb_plugin.rdiff +++ /dev/null @@ -1,20 +0,0 @@ ---- r/subselect_sj2_jcl6.result 2012-04-07 12:45:03.000000000 +0200 -+++ r/subselect_sj2_jcl6,innodb_plugin.reject 2012-04-07 13:10:38.000000000 +0200 -@@ -1009,7 +1009,7 @@ - 1 PRIMARY t2 ALL a NULL NULL NULL 38 - 1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func,func 1 - 2 MATERIALIZED alias1 ALL a NULL NULL NULL 19 Using where --2 MATERIALIZED alias2 ref a a 4 test.alias1.a 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan -+2 MATERIALIZED alias2 ref a a 4 test.alias1.a 1 Using where - SELECT * FROM t2 - WHERE (a, a) IN (SELECT alias2.b, alias2.a FROM t1 AS alias1, t1 AS alias2 - WHERE -@@ -1272,7 +1272,7 @@ - ); - id select_type table type possible_keys key key_len ref rows Extra - 1 PRIMARY T3_0_ ref PRIMARY,FK_T3_T2Id PRIMARY 8 const 3 Using index; Start temporary --1 PRIMARY T2_1_ eq_ref PRIMARY,FK_T2_T1Id PRIMARY 8 test.T3_0_.t2idref 1 Using join buffer (flat, BKA join); Key-ordered scan -+1 PRIMARY T2_1_ eq_ref PRIMARY,FK_T2_T1Id PRIMARY 8 test.T3_0_.t2idref 1 - 1 PRIMARY T1_1_ eq_ref PRIMARY PRIMARY 8 test.T2_1_.t1idref 1 Using index - 1 PRIMARY T2_0_ ref FK_T2_T1Id FK_T2_T1Id 8 test.T2_1_.t1idref 1 Using index; End temporary - drop table t3,t2,t1; diff --git a/mysql-test/r/subselect_sj2_jcl6.result b/mysql-test/r/subselect_sj2_jcl6.result index c10b550d11a..64f7ab2e6bf 100644 --- a/mysql-test/r/subselect_sj2_jcl6.result +++ b/mysql-test/r/subselect_sj2_jcl6.result @@ -1277,6 +1277,39 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY T2_0_ ref FK_T2_T1Id FK_T2_T1Id 8 test.T2_1_.t1idref 1 Using index; End temporary drop table t3,t2,t1; set optimizer_search_depth=@tmp7474; +# +# +# +CREATE TABLE t1 ( +id int(16) NOT NULL AUTO_INCREMENT, +PRIMARY KEY (id) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE t2 ( +id int(16) NOT NULL AUTO_INCREMENT, +t3_id int(16) NOT NULL DEFAULT '0', +t1_id int(16) NOT NULL DEFAULT '0', +PRIMARY KEY (id), +KEY t3_idx (t3_id), +KEY t1_idx (t1_id) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE t3 ( +id int(16) NOT NULL AUTO_INCREMENT, +PRIMARY KEY (id) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +INSERT INTO t3 VALUES (1); +INSERT INTO t2 VALUES (1, 1, 1); +INSERT INTO t2 VALUES (2, 1, 2); +INSERT INTO t2 VALUES (3, 1, 2); +INSERT INTO t2 VALUES (4, 1, 1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +SELECT * FROM t1 WHERE t1.id IN ( +SELECT t2.t1_id FROM t3 JOIN t2 ON t3.id = t2.t3_id WHERE t3.id = 1 +); +id +1 +2 +drop table t1,t2,t3; # This must be the last in the file: set optimizer_switch=@subselect_sj2_tmp; # diff --git a/mysql-test/r/subselect_sj2_mat.result b/mysql-test/r/subselect_sj2_mat.result index 835742a3ff4..5d0c64e9ddb 100644 --- a/mysql-test/r/subselect_sj2_mat.result +++ b/mysql-test/r/subselect_sj2_mat.result @@ -1264,6 +1264,39 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY T2_0_ ref FK_T2_T1Id FK_T2_T1Id 8 test.T2_1_.t1idref 1 Using index; End temporary drop table t3,t2,t1; set optimizer_search_depth=@tmp7474; +# +# +# +CREATE TABLE t1 ( +id int(16) NOT NULL AUTO_INCREMENT, +PRIMARY KEY (id) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE t2 ( +id int(16) NOT NULL AUTO_INCREMENT, +t3_id int(16) NOT NULL DEFAULT '0', +t1_id int(16) NOT NULL DEFAULT '0', +PRIMARY KEY (id), +KEY t3_idx (t3_id), +KEY t1_idx (t1_id) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE t3 ( +id int(16) NOT NULL AUTO_INCREMENT, +PRIMARY KEY (id) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +INSERT INTO t3 VALUES (1); +INSERT INTO t2 VALUES (1, 1, 1); +INSERT INTO t2 VALUES (2, 1, 2); +INSERT INTO t2 VALUES (3, 1, 2); +INSERT INTO t2 VALUES (4, 1, 1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +SELECT * FROM t1 WHERE t1.id IN ( +SELECT t2.t1_id FROM t3 JOIN t2 ON t3.id = t2.t3_id WHERE t3.id = 1 +); +id +1 +2 +drop table t1,t2,t3; # This must be the last in the file: set optimizer_switch=@subselect_sj2_tmp; set optimizer_switch=default; diff --git a/mysql-test/r/subselect_sj_jcl6.result b/mysql-test/r/subselect_sj_jcl6.result index 47dbdd782b5..2bc72acd478 100644 --- a/mysql-test/r/subselect_sj_jcl6.result +++ b/mysql-test/r/subselect_sj_jcl6.result @@ -107,6 +107,7 @@ id select_type tABle type possiBle_keys key key_len ref rows filtered ExtrA 2 MATERIALIZED t10 index PRIMARY PRIMARY 4 NULL 10 100.00 Using index Warnings: Note 1003 select `test`.`t1`.`A` AS `A`,`test`.`t1`.`B` AS `B`,`test`.`t2`.`A` AS `A`,`test`.`t2`.`B` AS `B` from `test`.`t1` left join `test`.`t2` on(((`test`.`t2`.`A` = `test`.`t1`.`A`) And <in_optimizer>(`test`.`t1`.`A`,`test`.`t1`.`A` in ( <mAteriAlize> (select `test`.`t10`.`pk` from `test`.`t10` ), <primAry_index_lookup>(`test`.`t1`.`A` in <temporAry tABle> on distinct_key where ((`test`.`t1`.`A` = `<suBquery2>`.`pk`))))))) where 1 +set join_buffer_size=8*1024; we shouldn't flatten if we're going to get a join of > MAX_TABLES. explain select * from t1 s00, t1 s01, t1 s02, t1 s03, t1 s04,t1 s05,t1 s06,t1 s07,t1 s08,t1 s09, @@ -198,6 +199,7 @@ a b a b 0 0 0 0 1 1 1 1 2 2 2 2 +set join_buffer_size=default; prepare s1 from ' select * from t1 left join t2 on (t2.a= t1.a and t2.a in (select pk from t10)) @@ -816,7 +818,7 @@ EXPLAIN EXTENDED SELECT pk FROM t1 WHERE (a, b) IN (SELECT a, b FROM t2 WHERE pk id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 11 func,func 1 100.00 -2 MATERIALIZED t2 range PRIMARY PRIMARY 4 NULL 2 100.00 Using index condition; Rowid-ordered scan +2 MATERIALIZED t2 range PRIMARY PRIMARY 4 NULL 2 100.00 Using index condition; Using where; Rowid-ordered scan Warnings: Note 1003 select `test`.`t1`.`pk` AS `pk` from `test`.`t1` semi join (`test`.`t2`) where ((`test`.`t2`.`pk` > 0)) SELECT pk FROM t1 WHERE (a, b) IN (SELECT a, b FROM t2 WHERE pk > 0); @@ -954,9 +956,9 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.t1field 1 Using index EXECUTE stmt; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 2 Using index -1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.t1field 1 Using index -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.t1field 1 Using index +1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 Using index +1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t1.t1field 1 Using index +1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.t1field 1 Using index DROP TABLE t1, t2, t3; DROP VIEW v2, v3; # End of Bug#49198 @@ -1020,8 +1022,8 @@ insert into t2 values ("1", "1", "sup", "0"), ("2", "1", "sup", "1"), ("4", "1", "sup", "0"); create table t3 ( id int(11) not null default '0', -preceeding_id int(11) not null default '0', -primary key (id,preceeding_id) +preceding_id int(11) not null default '0', +primary key (id,preceding_id) ); create table t4 ( user_id varchar(50) not null, @@ -3160,9 +3162,9 @@ LEFT JOIN ( ( SELECT * FROM t2 WHERE c2 IN ( SELECT c3 FROM t3 ) ) AS sq INNER JOIN t4 ) ON (c1 = c2); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 -1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join) -1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using join buffer (incremental, BNL join) +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join) +1 PRIMARY t4 ALL NULL NULL NULL NULL 2 100.00 Using join buffer (incremental, BNL join) 3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t2`.`c2` AS `c2`,`test`.`t4`.`c4` AS `c4` from `test`.`t1` left join (`test`.`t2` join `test`.`t4`) on(((`test`.`t2`.`c2` = `test`.`t1`.`c1`) and <in_optimizer>(`test`.`t1`.`c1`,<exists>(select `test`.`t3`.`c3` from `test`.`t3` where (<cache>(`test`.`t2`.`c2`) = `test`.`t3`.`c3`))))) where 1 diff --git a/mysql-test/r/subselect_sj_mat.result b/mysql-test/r/subselect_sj_mat.result index cb5012a91c9..4feab0c78b0 100644 --- a/mysql-test/r/subselect_sj_mat.result +++ b/mysql-test/r/subselect_sj_mat.result @@ -94,7 +94,7 @@ a1 a2 explain extended select * from t1i where a1 in (select b1 from t2i where b1 > '0'); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t2i index it2i1,it2i3 it2i1 # NULL 5 40.00 Using where; Using index; LooseScan +1 PRIMARY t2i index it2i1,it2i3 it2i1 # NULL 5 50.00 Using where; Using index; LooseScan 1 PRIMARY t1i ref _it1_idx _it1_idx # _ref_ 1 100.00 Warnings: Note 1003 select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` semi join (`test`.`t2i`) where ((`test`.`t1i`.`a1` = `test`.`t2i`.`b1`) and (`test`.`t2i`.`b1` > '0')) @@ -117,7 +117,7 @@ a1 a2 explain extended select * from t1i where (a1, a2) in (select b1, b2 from t2i where b1 > '0'); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t2i index it2i1,it2i2,it2i3 it2i3 # NULL 5 40.00 Using where; Using index; LooseScan +1 PRIMARY t2i index it2i1,it2i2,it2i3 it2i3 # NULL 5 50.00 Using where; Using index; LooseScan 1 PRIMARY t1i ref _it1_idx _it1_idx # _ref_ 1 100.00 Warnings: Note 1003 select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` semi join (`test`.`t2i`) where ((`test`.`t1i`.`a1` = `test`.`t2i`.`b1`) and (`test`.`t1i`.`a2` = `test`.`t2i`.`b2`) and (`test`.`t2i`.`b1` > '0')) @@ -319,7 +319,7 @@ where (a1, a2) in (select b1, b2 from t2i where b1 > '0') and (a1, a2) in (select c1, c2 from t3i where (c1, c2) in (select b1, b2 from t2i where b2 > '0')); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t2i index it2i1,it2i2,it2i3 # # # 5 40.00 # +1 PRIMARY t2i index it2i1,it2i2,it2i3 # # # 5 50.00 # 1 PRIMARY t1i ref it1i1,it1i2,it1i3 # # # 1 100.00 # 1 PRIMARY t3i ref it3i1,it3i2,it3i3 # # # 1 100.00 # 1 PRIMARY t2i ref it2i1,it2i2,it2i3 # # # 2 100.00 # @@ -407,7 +407,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 MATERIALIZED t2 ALL NULL # # # 5 100.00 # 4 MATERIALIZED t3 ALL NULL # # # 4 100.00 # 3 MATERIALIZED t3 ALL NULL # # # 4 100.00 # -7 UNION t2i index it2i1,it2i2,it2i3 # # # 5 40.00 # +7 UNION t2i index it2i1,it2i2,it2i3 # # # 5 50.00 # 7 UNION t1i ref it1i1,it1i2,it1i3 # # # 1 100.00 # 7 UNION t3i ref it3i1,it3i2,it3i3 # # # 1 100.00 # 7 UNION t2i ref it2i1,it2i2,it2i3 # # # 2 100.00 # @@ -1511,7 +1511,7 @@ EXPLAIN SELECT pk FROM t1 WHERE (a) IN (SELECT a FROM t2 WHERE pk > 0); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 -2 MATERIALIZED t2 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Rowid-ordered scan +2 MATERIALIZED t2 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where; Rowid-ordered scan SELECT pk FROM t1 WHERE (a) IN (SELECT a FROM t2 WHERE pk > 0); pk 2 @@ -2209,14 +2209,16 @@ drop table t1; CREATE TABLE t1 ( pk INT, f1 INT NOT NULL, f2 VARCHAR(3), f3 INT NULL, PRIMARY KEY(pk)) ENGINE=MyISAM; INSERT INTO t1 VALUES (1,1,'foo',8), (2,5,'bar',7); -SELECT sq1.f2 FROM t1 AS sq1 -WHERE EXISTS ( SELECT * FROM t1 AS sq2 +SELECT sq1.f2 FROM t1 AS sq1 +WHERE EXISTS ( SELECT * FROM t1 AS sq2 WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 ); f2 foo +set @save_optimizer_switch= @@optimizer_switch; +set optimizer_switch='exists_to_in=off'; EXPLAIN -SELECT sq1.f2 FROM t1 AS sq1 -WHERE EXISTS ( SELECT * FROM t1 AS sq2 +SELECT sq1.f2 FROM t1 AS sq1 +WHERE EXISTS ( SELECT * FROM t1 AS sq2 WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 ); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY sq1 ALL NULL NULL NULL NULL 2 Using where @@ -2224,10 +2226,9 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DEPENDENT SUBQUERY sq2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) 3 MATERIALIZED t1 ALL NULL NULL NULL NULL 2 # this checks the result set above -set @save_optimizer_switch= @@optimizer_switch; set optimizer_switch= 'materialization=off,semijoin=off'; -SELECT sq1.f2 FROM t1 AS sq1 -WHERE EXISTS ( SELECT * FROM t1 AS sq2 +SELECT sq1.f2 FROM t1 AS sq1 +WHERE EXISTS ( SELECT * FROM t1 AS sq2 WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 ); f2 foo @@ -2242,13 +2243,15 @@ CREATE TABLE t2 (i2 INT, KEY(i2)) ENGINE=MyISAM; INSERT INTO t2 VALUES (8),(7),(1); CREATE TABLE t3 (f3 INT, i3 INT, KEY(i3)) ENGINE=MyISAM; INSERT INTO t3 VALUES (8,0),(6,3),(2,8),(3,8),(1,6),(0,0),(1,0),(1,5); -SELECT * FROM t1 +set @save_optimizer_switch= @@optimizer_switch; +set optimizer_switch='exists_to_in=off'; +SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM t2, t3 WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) ); f1 6 EXPLAIN EXTENDED -SELECT * FROM t1 +SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM t2, t3 WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) ); id select_type table type possible_keys key key_len ref rows filtered Extra @@ -2261,9 +2264,8 @@ Warnings: Note 1276 Field or reference 'test.t1.f1' of SELECT #2 was resolved in SELECT #1 Note 1003 select `test`.`t1`.`f1` AS `f1` from `test`.`t1` where <expr_cache><`test`.`t1`.`f1`>(exists(select 1 from `test`.`t2` semi join (`test`.`t3`) join `test`.`t3` where ((`test`.`t3`.`i3` = `test`.`t2`.`i2`) and (`test`.`t1`.`f1` = `test`.`t3`.`f3`)))) # this checks the result set above -set @save_optimizer_switch= @@optimizer_switch; set optimizer_switch= 'materialization=off,semijoin=off'; -SELECT * FROM t1 +SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM t2, t3 WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) ); f1 @@ -2277,10 +2279,10 @@ CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT); INSERT INTO t1 VALUES (1, 4),(2, 3),(3, 3),(4, 6),(5, 3); CREATE TABLE t2 (f2 INT); INSERT INTO t2 VALUES (1),(2),(3),(4),(5); -# t1.pk is always IN ( SELECT f2 FROM t2 ), -# so the IN condition should be true for every row, +# t1.pk is always IN ( SELECT f2 FROM t2 ), +# so the IN condition should be true for every row, # and thus COUNT(*) should always return 5 -SELECT pk, f1, ( SELECT COUNT(*) FROM t2 +SELECT pk, f1, ( SELECT COUNT(*) FROM t2 WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1; pk f1 sq 1 4 5 @@ -2289,7 +2291,7 @@ pk f1 sq 4 6 5 5 3 5 EXPLAIN EXTENDED -SELECT pk, f1, ( SELECT COUNT(*) FROM t2 +SELECT pk, f1, ( SELECT COUNT(*) FROM t2 WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 @@ -2302,7 +2304,7 @@ Note 1003 select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`f1` AS `f1`,<expr_cache>< # this checks the result set above set @save_optimizer_switch= @@optimizer_switch; set optimizer_switch= 'materialization=off,semijoin=off'; -SELECT pk, f1, ( SELECT COUNT(*) FROM t2 +SELECT pk, f1, ( SELECT COUNT(*) FROM t2 WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1; pk f1 sq 1 4 5 @@ -2401,3 +2403,73 @@ ebb4620037332000158bbfc8bcbe5d89 DROP TABLE t1,t2,t3; set optimizer_switch=@save_optimizer_switch; # End of 5.5 tests +# +# MDEV-7220: Materialization strategy is not used for REPLACE ... SELECT +# +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 (a int, b int, c int); +insert into t1 +select A.a+B.a*10+C.a*100, A.a+B.a*10+C.a*100, A.a+B.a*10+C.a*100 +from t0 A, t0 B, t0 C; +create table t2 (a int, b int, c int); +insert into t2 select A.a, A.a, A.a from t1 A; +insert into t2 select * from t2; +insert into t2 select * from t2; +create table t3 as select * from t2 limit 1; +# The testcase only makes sense if the following uses Materialization: +explain +select * from t1 where (a,b) in (select max(a),b from t2 group by b); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 1000 Using where +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.b 1 +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 4000 Using temporary +flush status; +replace into t3 +select * from t1 where (a,b) in (select max(a),b from t2 group by b); +# Sequential reads: +# 1K is read from t1 +# 4K is read from t2 +# 1K groups is read from the tmp. table +# +# Lookups: +# 4K lookups in group by table +# 1K lookups in temp.table +# +# Writes: +# 2x 1K writes to temporary tables (grouping table and subquery materialization table +# +# The point is that neither counter should be in the millions (this +# will happen if Materialization is not used +show status where Variable_name like 'Handler_read%' or Variable_name like 'Handler_%write%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 5000 +Handler_read_last 0 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_retry 0 +Handler_read_rnd 0 +Handler_read_rnd_deleted 0 +Handler_read_rnd_next 6003 +Handler_tmp_write 2000 +Handler_write 1000 +drop table t0,t1,t2,t3; +# +# MDEV-7971: Assertion `name != __null' failed in ACL_internal_schema_registry::lookup +# on 2nd execution os PS with multi-table update +# +CREATE TABLE t1 (f1 INT); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (f2 INT); +INSERT INTO t2 VALUES (3),(4); +CREATE TABLE t3 (f3 INT); +INSERT INTO t3 VALUES (5),(6); +PREPARE stmt FROM ' + UPDATE t1, t2 + SET f1 = 5 + WHERE 8 IN ( SELECT MIN(f3) FROM t3 ) +'; +EXECUTE stmt; +EXECUTE stmt; +DROP TABLE t1,t2,t3; diff --git a/mysql-test/r/symlink-aria-11902.result b/mysql-test/r/symlink-aria-11902.result index f704bb86ea7..e563780b3ec 100644 --- a/mysql-test/r/symlink-aria-11902.result +++ b/mysql-test/r/symlink-aria-11902.result @@ -14,7 +14,7 @@ set debug_sync='mi_open_datafile SIGNAL ok WAIT_FOR go'; select * from t1; set debug_sync='now WAIT_FOR ok'; set debug_sync='now SIGNAL go'; -ERROR HY000: File 'MYSQLTEST_VARDIR/tmp/foo/t1.MAD' not found (Errcode: 20) +ERROR HY000: File 'MYSQLTEST_VARDIR/tmp/foo/t1.MAD' not found (Errcode: 20 <errmsg>) flush tables; drop table if exists t1; create table t1 (a int, b char(16), index (a)) @@ -32,7 +32,7 @@ set debug_sync='mi_open_kfile SIGNAL waiting WAIT_FOR run'; select a from t1; set debug_sync='now WAIT_FOR waiting'; set debug_sync='now SIGNAL run'; -ERROR HY000: Can't find file: 't1' (errno: 20) +ERROR HY000: Can't find file: './test/t1.MAI' (errno: 20 <errmsg>) flush tables; drop table if exists t1; drop table mysql.t1; diff --git a/mysql-test/r/symlink-myisam-11902.result b/mysql-test/r/symlink-myisam-11902.result index 74785bbcdd1..33357a80700 100644 --- a/mysql-test/r/symlink-myisam-11902.result +++ b/mysql-test/r/symlink-myisam-11902.result @@ -13,7 +13,7 @@ set debug_sync='mi_open_datafile SIGNAL ok WAIT_FOR go'; select * from t1; set debug_sync='now WAIT_FOR ok'; set debug_sync='now SIGNAL go'; -ERROR HY000: File 'MYSQLTEST_VARDIR/tmp/foo/t1.MYD' not found (Errcode: 20) +ERROR HY000: File 'MYSQLTEST_VARDIR/tmp/foo/t1.MYD' not found (Errcode: 20 <errmsg>) flush tables; drop table if exists t1; create table t1 (a int, b char(16), index (a)) @@ -31,7 +31,7 @@ set debug_sync='mi_open_kfile SIGNAL waiting WAIT_FOR run'; select a from t1; set debug_sync='now WAIT_FOR waiting'; set debug_sync='now SIGNAL run'; -ERROR HY000: Can't find file: 't1' (errno: 20) +ERROR HY000: Can't find file: './test/t1.MYI' (errno: 20 <errmsg>) flush tables; drop table if exists t1; drop table mysql.t1; diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 22b64cc346c..3218de4b225 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -120,7 +120,7 @@ CREATE TABLE t2(a INT) DATA DIRECTORY='TEST_DIR/tmp' INDEX DIRECTORY='TEST_DIR/tmp'; RENAME TABLE t2 TO t1; -ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17) +ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17 "File exists") DROP TABLE t2; create temporary table t1 (a int) engine=myisam data directory="MYSQLTEST_VARDIR/log" select 9 a; show create table t1; @@ -167,7 +167,7 @@ INDEX DIRECTORY='MYSQLD_DATADIR'; DROP TABLE IF EXISTS t1; CREATE TABLE t1(a INT) INDEX DIRECTORY='TEST_DIR/master-data_var'; -ERROR HY000: Can't create/write to file 'TEST_DIR/master-data_var/t1.MYI' (Errcode: 2) +ERROR HY000: Can't create/write to file 'TEST_DIR/master-data_var/t1.MYI' (Errcode: 2 "No such file or directory") SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE='NO_DIR_IN_CREATE'; CREATE TABLE t1(a INT) DATA DIRECTORY='MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY='MYSQLTEST_VARDIR/tmp'; Warnings: diff --git a/mysql-test/r/system_mysql_db.result b/mysql-test/r/system_mysql_db.result index d5409136ed4..53797e2a0a4 100644 --- a/mysql-test/r/system_mysql_db.result +++ b/mysql-test/r/system_mysql_db.result @@ -1,22 +1,28 @@ show tables; Tables_in_db +column_stats columns_priv db event func general_log +gtid_slave_pos help_category help_keyword help_relation help_topic host -ndb_binlog_index +index_stats +innodb_index_stats +innodb_table_stats plugin proc procs_priv proxies_priv +roles_mapping servers slow_log +table_stats tables_priv time_zone time_zone_leap_second @@ -29,7 +35,7 @@ Table Create Table db CREATE TABLE `db` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', @@ -81,7 +87,7 @@ show create table user; Table Create Table user CREATE TABLE `user` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', @@ -122,6 +128,8 @@ user CREATE TABLE `user` ( `max_user_connections` int(11) NOT NULL DEFAULT '0', `plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '', `authentication_string` text COLLATE utf8_bin NOT NULL, + `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', PRIMARY KEY (`Host`,`User`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' show create table func; @@ -138,9 +146,9 @@ Table Create Table tables_priv CREATE TABLE `tables_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', @@ -152,7 +160,7 @@ Table Create Table columns_priv CREATE TABLE `columns_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, @@ -164,10 +172,10 @@ Table Create Table procs_priv CREATE TABLE `procs_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, - `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), @@ -179,7 +187,7 @@ servers CREATE TABLE `servers` ( `Server_name` char(64) NOT NULL DEFAULT '', `Host` char(64) NOT NULL DEFAULT '', `Db` char(64) NOT NULL DEFAULT '', - `Username` char(64) NOT NULL DEFAULT '', + `Username` char(80) NOT NULL DEFAULT '', `Password` char(64) NOT NULL DEFAULT '', `Port` int(4) NOT NULL DEFAULT '0', `Socket` char(64) NOT NULL DEFAULT '', @@ -201,7 +209,7 @@ proc CREATE TABLE `proc` ( `param_list` blob NOT NULL, `returns` longblob NOT NULL, `body` longblob NOT NULL, - `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', @@ -218,7 +226,7 @@ event CREATE TABLE `event` ( `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `name` char(64) NOT NULL DEFAULT '', `body` longblob NOT NULL, - `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `execute_at` datetime DEFAULT NULL, `interval_value` int(11) DEFAULT NULL, `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, @@ -242,9 +250,9 @@ event CREATE TABLE `event` ( show create table general_log; Table Create Table general_log CREATE TABLE `general_log` ( - `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, - `thread_id` int(11) NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL, `server_id` int(10) unsigned NOT NULL, `command_type` varchar(64) NOT NULL, `argument` mediumtext NOT NULL @@ -252,7 +260,7 @@ general_log CREATE TABLE `general_log` ( show create table slow_log; Table Create Table slow_log CREATE TABLE `slow_log` ( - `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, `query_time` time(6) NOT NULL, `lock_time` time(6) NOT NULL, @@ -262,7 +270,42 @@ slow_log CREATE TABLE `slow_log` ( `last_insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL, - `sql_text` mediumtext NOT NULL + `sql_text` mediumtext NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' +show create table table_stats; +Table Create Table +table_stats CREATE TABLE `table_stats` ( + `db_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(64) COLLATE utf8_bin NOT NULL, + `cardinality` bigint(21) unsigned DEFAULT NULL, + PRIMARY KEY (`db_name`,`table_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables' +show create table column_stats; +Table Create Table +column_stats CREATE TABLE `column_stats` ( + `db_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(64) COLLATE utf8_bin NOT NULL, + `column_name` varchar(64) COLLATE utf8_bin NOT NULL, + `min_value` varbinary(255) DEFAULT NULL, + `max_value` varbinary(255) DEFAULT NULL, + `nulls_ratio` decimal(12,4) DEFAULT NULL, + `avg_length` decimal(12,4) DEFAULT NULL, + `avg_frequency` decimal(12,4) DEFAULT NULL, + `hist_size` tinyint(3) unsigned DEFAULT NULL, + `hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL, + `histogram` varbinary(255) DEFAULT NULL, + PRIMARY KEY (`db_name`,`table_name`,`column_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns' +show create table index_stats; +Table Create Table +index_stats CREATE TABLE `index_stats` ( + `db_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(64) COLLATE utf8_bin NOT NULL, + `index_name` varchar(64) COLLATE utf8_bin NOT NULL, + `prefix_arity` int(11) unsigned NOT NULL, + `avg_frequency` decimal(12,4) DEFAULT NULL, + PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes' show tables; Tables_in_test diff --git a/mysql-test/r/system_mysql_db_fix30020.result b/mysql-test/r/system_mysql_db_fix30020.result index 17fd95ab1c8..4c106ae2e5a 100644 --- a/mysql-test/r/system_mysql_db_fix30020.result +++ b/mysql-test/r/system_mysql_db_fix30020.result @@ -1,21 +1,28 @@ show tables; Tables_in_db +column_stats columns_priv db event func general_log +gtid_slave_pos help_category help_keyword help_relation help_topic host -ndb_binlog_index +index_stats +innodb_index_stats +innodb_table_stats plugin proc procs_priv +proxies_priv +roles_mapping servers slow_log +table_stats tables_priv time_zone time_zone_leap_second @@ -28,7 +35,7 @@ Table Create Table db CREATE TABLE `db` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', @@ -80,7 +87,7 @@ show create table user; Table Create Table user CREATE TABLE `user` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', @@ -110,6 +117,7 @@ user CREATE TABLE `user` ( `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', `ssl_cipher` blob NOT NULL, `x509_issuer` blob NOT NULL, @@ -117,7 +125,11 @@ user CREATE TABLE `user` ( `max_questions` int(11) unsigned NOT NULL DEFAULT '0', `max_updates` int(11) unsigned NOT NULL DEFAULT '0', `max_connections` int(11) unsigned NOT NULL DEFAULT '0', - `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0', + `max_user_connections` int(11) NOT NULL DEFAULT '0', + `plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '', + `authentication_string` text COLLATE utf8_bin NOT NULL, + `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', PRIMARY KEY (`Host`,`User`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' show create table func; @@ -134,9 +146,9 @@ Table Create Table tables_priv CREATE TABLE `tables_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', @@ -148,7 +160,7 @@ Table Create Table columns_priv CREATE TABLE `columns_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, @@ -160,10 +172,10 @@ Table Create Table procs_priv CREATE TABLE `procs_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, - `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), @@ -175,7 +187,7 @@ servers CREATE TABLE `servers` ( `Server_name` char(64) NOT NULL DEFAULT '', `Host` char(64) NOT NULL DEFAULT '', `Db` char(64) NOT NULL DEFAULT '', - `Username` char(64) NOT NULL DEFAULT '', + `Username` char(80) NOT NULL DEFAULT '', `Password` char(64) NOT NULL DEFAULT '', `Port` int(4) NOT NULL DEFAULT '0', `Socket` char(64) NOT NULL DEFAULT '', @@ -197,11 +209,11 @@ proc CREATE TABLE `proc` ( `param_list` blob NOT NULL, `returns` longblob NOT NULL, `body` longblob NOT NULL, - `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', - `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', - `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, @@ -214,7 +226,7 @@ event CREATE TABLE `event` ( `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `name` char(64) NOT NULL DEFAULT '', `body` longblob NOT NULL, - `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `execute_at` datetime DEFAULT NULL, `interval_value` int(11) DEFAULT NULL, `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, @@ -225,7 +237,7 @@ event CREATE TABLE `event` ( `ends` datetime DEFAULT NULL, `status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED', `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP', - `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `originator` int(10) unsigned NOT NULL, `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', @@ -238,9 +250,9 @@ event CREATE TABLE `event` ( show create table general_log; Table Create Table general_log CREATE TABLE `general_log` ( - `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, - `thread_id` int(11) NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL, `server_id` int(10) unsigned NOT NULL, `command_type` varchar(64) NOT NULL, `argument` mediumtext NOT NULL @@ -248,17 +260,52 @@ general_log CREATE TABLE `general_log` ( show create table slow_log; Table Create Table slow_log CREATE TABLE `slow_log` ( - `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, - `query_time` time NOT NULL, - `lock_time` time NOT NULL, + `query_time` time(6) NOT NULL, + `lock_time` time(6) NOT NULL, `rows_sent` int(11) NOT NULL, `rows_examined` int(11) NOT NULL, `db` varchar(512) NOT NULL, `last_insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL, - `sql_text` mediumtext NOT NULL + `sql_text` mediumtext NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' +show create table table_stats; +Table Create Table +table_stats CREATE TABLE `table_stats` ( + `db_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(64) COLLATE utf8_bin NOT NULL, + `cardinality` bigint(21) unsigned DEFAULT NULL, + PRIMARY KEY (`db_name`,`table_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables' +show create table column_stats; +Table Create Table +column_stats CREATE TABLE `column_stats` ( + `db_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(64) COLLATE utf8_bin NOT NULL, + `column_name` varchar(64) COLLATE utf8_bin NOT NULL, + `min_value` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `max_value` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `nulls_ratio` decimal(12,4) DEFAULT NULL, + `avg_length` decimal(12,4) DEFAULT NULL, + `avg_frequency` decimal(12,4) DEFAULT NULL, + `hist_size` tinyint(3) unsigned DEFAULT NULL, + `hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL, + `histogram` varbinary(255) DEFAULT NULL, + PRIMARY KEY (`db_name`,`table_name`,`column_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns' +show create table index_stats; +Table Create Table +index_stats CREATE TABLE `index_stats` ( + `db_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(64) COLLATE utf8_bin NOT NULL, + `index_name` varchar(64) COLLATE utf8_bin NOT NULL, + `prefix_arity` int(11) unsigned NOT NULL, + `avg_frequency` decimal(12,4) DEFAULT NULL, + PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes' show tables; Tables_in_test diff --git a/mysql-test/r/system_mysql_db_fix40123.result b/mysql-test/r/system_mysql_db_fix40123.result index d5409136ed4..53797e2a0a4 100644 --- a/mysql-test/r/system_mysql_db_fix40123.result +++ b/mysql-test/r/system_mysql_db_fix40123.result @@ -1,22 +1,28 @@ show tables; Tables_in_db +column_stats columns_priv db event func general_log +gtid_slave_pos help_category help_keyword help_relation help_topic host -ndb_binlog_index +index_stats +innodb_index_stats +innodb_table_stats plugin proc procs_priv proxies_priv +roles_mapping servers slow_log +table_stats tables_priv time_zone time_zone_leap_second @@ -29,7 +35,7 @@ Table Create Table db CREATE TABLE `db` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', @@ -81,7 +87,7 @@ show create table user; Table Create Table user CREATE TABLE `user` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', @@ -122,6 +128,8 @@ user CREATE TABLE `user` ( `max_user_connections` int(11) NOT NULL DEFAULT '0', `plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '', `authentication_string` text COLLATE utf8_bin NOT NULL, + `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', PRIMARY KEY (`Host`,`User`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' show create table func; @@ -138,9 +146,9 @@ Table Create Table tables_priv CREATE TABLE `tables_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', @@ -152,7 +160,7 @@ Table Create Table columns_priv CREATE TABLE `columns_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, @@ -164,10 +172,10 @@ Table Create Table procs_priv CREATE TABLE `procs_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, - `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), @@ -179,7 +187,7 @@ servers CREATE TABLE `servers` ( `Server_name` char(64) NOT NULL DEFAULT '', `Host` char(64) NOT NULL DEFAULT '', `Db` char(64) NOT NULL DEFAULT '', - `Username` char(64) NOT NULL DEFAULT '', + `Username` char(80) NOT NULL DEFAULT '', `Password` char(64) NOT NULL DEFAULT '', `Port` int(4) NOT NULL DEFAULT '0', `Socket` char(64) NOT NULL DEFAULT '', @@ -201,7 +209,7 @@ proc CREATE TABLE `proc` ( `param_list` blob NOT NULL, `returns` longblob NOT NULL, `body` longblob NOT NULL, - `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', @@ -218,7 +226,7 @@ event CREATE TABLE `event` ( `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `name` char(64) NOT NULL DEFAULT '', `body` longblob NOT NULL, - `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `execute_at` datetime DEFAULT NULL, `interval_value` int(11) DEFAULT NULL, `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, @@ -242,9 +250,9 @@ event CREATE TABLE `event` ( show create table general_log; Table Create Table general_log CREATE TABLE `general_log` ( - `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, - `thread_id` int(11) NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL, `server_id` int(10) unsigned NOT NULL, `command_type` varchar(64) NOT NULL, `argument` mediumtext NOT NULL @@ -252,7 +260,7 @@ general_log CREATE TABLE `general_log` ( show create table slow_log; Table Create Table slow_log CREATE TABLE `slow_log` ( - `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, `query_time` time(6) NOT NULL, `lock_time` time(6) NOT NULL, @@ -262,7 +270,42 @@ slow_log CREATE TABLE `slow_log` ( `last_insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL, - `sql_text` mediumtext NOT NULL + `sql_text` mediumtext NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' +show create table table_stats; +Table Create Table +table_stats CREATE TABLE `table_stats` ( + `db_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(64) COLLATE utf8_bin NOT NULL, + `cardinality` bigint(21) unsigned DEFAULT NULL, + PRIMARY KEY (`db_name`,`table_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables' +show create table column_stats; +Table Create Table +column_stats CREATE TABLE `column_stats` ( + `db_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(64) COLLATE utf8_bin NOT NULL, + `column_name` varchar(64) COLLATE utf8_bin NOT NULL, + `min_value` varbinary(255) DEFAULT NULL, + `max_value` varbinary(255) DEFAULT NULL, + `nulls_ratio` decimal(12,4) DEFAULT NULL, + `avg_length` decimal(12,4) DEFAULT NULL, + `avg_frequency` decimal(12,4) DEFAULT NULL, + `hist_size` tinyint(3) unsigned DEFAULT NULL, + `hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL, + `histogram` varbinary(255) DEFAULT NULL, + PRIMARY KEY (`db_name`,`table_name`,`column_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns' +show create table index_stats; +Table Create Table +index_stats CREATE TABLE `index_stats` ( + `db_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(64) COLLATE utf8_bin NOT NULL, + `index_name` varchar(64) COLLATE utf8_bin NOT NULL, + `prefix_arity` int(11) unsigned NOT NULL, + `avg_frequency` decimal(12,4) DEFAULT NULL, + PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes' show tables; Tables_in_test diff --git a/mysql-test/r/system_mysql_db_fix50030.result b/mysql-test/r/system_mysql_db_fix50030.result index d5409136ed4..53797e2a0a4 100644 --- a/mysql-test/r/system_mysql_db_fix50030.result +++ b/mysql-test/r/system_mysql_db_fix50030.result @@ -1,22 +1,28 @@ show tables; Tables_in_db +column_stats columns_priv db event func general_log +gtid_slave_pos help_category help_keyword help_relation help_topic host -ndb_binlog_index +index_stats +innodb_index_stats +innodb_table_stats plugin proc procs_priv proxies_priv +roles_mapping servers slow_log +table_stats tables_priv time_zone time_zone_leap_second @@ -29,7 +35,7 @@ Table Create Table db CREATE TABLE `db` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', @@ -81,7 +87,7 @@ show create table user; Table Create Table user CREATE TABLE `user` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', @@ -122,6 +128,8 @@ user CREATE TABLE `user` ( `max_user_connections` int(11) NOT NULL DEFAULT '0', `plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '', `authentication_string` text COLLATE utf8_bin NOT NULL, + `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', PRIMARY KEY (`Host`,`User`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' show create table func; @@ -138,9 +146,9 @@ Table Create Table tables_priv CREATE TABLE `tables_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', @@ -152,7 +160,7 @@ Table Create Table columns_priv CREATE TABLE `columns_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, @@ -164,10 +172,10 @@ Table Create Table procs_priv CREATE TABLE `procs_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, - `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), @@ -179,7 +187,7 @@ servers CREATE TABLE `servers` ( `Server_name` char(64) NOT NULL DEFAULT '', `Host` char(64) NOT NULL DEFAULT '', `Db` char(64) NOT NULL DEFAULT '', - `Username` char(64) NOT NULL DEFAULT '', + `Username` char(80) NOT NULL DEFAULT '', `Password` char(64) NOT NULL DEFAULT '', `Port` int(4) NOT NULL DEFAULT '0', `Socket` char(64) NOT NULL DEFAULT '', @@ -201,7 +209,7 @@ proc CREATE TABLE `proc` ( `param_list` blob NOT NULL, `returns` longblob NOT NULL, `body` longblob NOT NULL, - `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', @@ -218,7 +226,7 @@ event CREATE TABLE `event` ( `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `name` char(64) NOT NULL DEFAULT '', `body` longblob NOT NULL, - `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `execute_at` datetime DEFAULT NULL, `interval_value` int(11) DEFAULT NULL, `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, @@ -242,9 +250,9 @@ event CREATE TABLE `event` ( show create table general_log; Table Create Table general_log CREATE TABLE `general_log` ( - `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, - `thread_id` int(11) NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL, `server_id` int(10) unsigned NOT NULL, `command_type` varchar(64) NOT NULL, `argument` mediumtext NOT NULL @@ -252,7 +260,7 @@ general_log CREATE TABLE `general_log` ( show create table slow_log; Table Create Table slow_log CREATE TABLE `slow_log` ( - `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, `query_time` time(6) NOT NULL, `lock_time` time(6) NOT NULL, @@ -262,7 +270,42 @@ slow_log CREATE TABLE `slow_log` ( `last_insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL, - `sql_text` mediumtext NOT NULL + `sql_text` mediumtext NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' +show create table table_stats; +Table Create Table +table_stats CREATE TABLE `table_stats` ( + `db_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(64) COLLATE utf8_bin NOT NULL, + `cardinality` bigint(21) unsigned DEFAULT NULL, + PRIMARY KEY (`db_name`,`table_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables' +show create table column_stats; +Table Create Table +column_stats CREATE TABLE `column_stats` ( + `db_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(64) COLLATE utf8_bin NOT NULL, + `column_name` varchar(64) COLLATE utf8_bin NOT NULL, + `min_value` varbinary(255) DEFAULT NULL, + `max_value` varbinary(255) DEFAULT NULL, + `nulls_ratio` decimal(12,4) DEFAULT NULL, + `avg_length` decimal(12,4) DEFAULT NULL, + `avg_frequency` decimal(12,4) DEFAULT NULL, + `hist_size` tinyint(3) unsigned DEFAULT NULL, + `hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL, + `histogram` varbinary(255) DEFAULT NULL, + PRIMARY KEY (`db_name`,`table_name`,`column_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns' +show create table index_stats; +Table Create Table +index_stats CREATE TABLE `index_stats` ( + `db_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(64) COLLATE utf8_bin NOT NULL, + `index_name` varchar(64) COLLATE utf8_bin NOT NULL, + `prefix_arity` int(11) unsigned NOT NULL, + `avg_frequency` decimal(12,4) DEFAULT NULL, + PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes' show tables; Tables_in_test diff --git a/mysql-test/r/system_mysql_db_fix50117.result b/mysql-test/r/system_mysql_db_fix50117.result index d5409136ed4..53797e2a0a4 100644 --- a/mysql-test/r/system_mysql_db_fix50117.result +++ b/mysql-test/r/system_mysql_db_fix50117.result @@ -1,22 +1,28 @@ show tables; Tables_in_db +column_stats columns_priv db event func general_log +gtid_slave_pos help_category help_keyword help_relation help_topic host -ndb_binlog_index +index_stats +innodb_index_stats +innodb_table_stats plugin proc procs_priv proxies_priv +roles_mapping servers slow_log +table_stats tables_priv time_zone time_zone_leap_second @@ -29,7 +35,7 @@ Table Create Table db CREATE TABLE `db` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', @@ -81,7 +87,7 @@ show create table user; Table Create Table user CREATE TABLE `user` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', @@ -122,6 +128,8 @@ user CREATE TABLE `user` ( `max_user_connections` int(11) NOT NULL DEFAULT '0', `plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '', `authentication_string` text COLLATE utf8_bin NOT NULL, + `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', PRIMARY KEY (`Host`,`User`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' show create table func; @@ -138,9 +146,9 @@ Table Create Table tables_priv CREATE TABLE `tables_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', @@ -152,7 +160,7 @@ Table Create Table columns_priv CREATE TABLE `columns_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, @@ -164,10 +172,10 @@ Table Create Table procs_priv CREATE TABLE `procs_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, - `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), @@ -179,7 +187,7 @@ servers CREATE TABLE `servers` ( `Server_name` char(64) NOT NULL DEFAULT '', `Host` char(64) NOT NULL DEFAULT '', `Db` char(64) NOT NULL DEFAULT '', - `Username` char(64) NOT NULL DEFAULT '', + `Username` char(80) NOT NULL DEFAULT '', `Password` char(64) NOT NULL DEFAULT '', `Port` int(4) NOT NULL DEFAULT '0', `Socket` char(64) NOT NULL DEFAULT '', @@ -201,7 +209,7 @@ proc CREATE TABLE `proc` ( `param_list` blob NOT NULL, `returns` longblob NOT NULL, `body` longblob NOT NULL, - `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', @@ -218,7 +226,7 @@ event CREATE TABLE `event` ( `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `name` char(64) NOT NULL DEFAULT '', `body` longblob NOT NULL, - `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `execute_at` datetime DEFAULT NULL, `interval_value` int(11) DEFAULT NULL, `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, @@ -242,9 +250,9 @@ event CREATE TABLE `event` ( show create table general_log; Table Create Table general_log CREATE TABLE `general_log` ( - `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, - `thread_id` int(11) NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL, `server_id` int(10) unsigned NOT NULL, `command_type` varchar(64) NOT NULL, `argument` mediumtext NOT NULL @@ -252,7 +260,7 @@ general_log CREATE TABLE `general_log` ( show create table slow_log; Table Create Table slow_log CREATE TABLE `slow_log` ( - `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `user_host` mediumtext NOT NULL, `query_time` time(6) NOT NULL, `lock_time` time(6) NOT NULL, @@ -262,7 +270,42 @@ slow_log CREATE TABLE `slow_log` ( `last_insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL, - `sql_text` mediumtext NOT NULL + `sql_text` mediumtext NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' +show create table table_stats; +Table Create Table +table_stats CREATE TABLE `table_stats` ( + `db_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(64) COLLATE utf8_bin NOT NULL, + `cardinality` bigint(21) unsigned DEFAULT NULL, + PRIMARY KEY (`db_name`,`table_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables' +show create table column_stats; +Table Create Table +column_stats CREATE TABLE `column_stats` ( + `db_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(64) COLLATE utf8_bin NOT NULL, + `column_name` varchar(64) COLLATE utf8_bin NOT NULL, + `min_value` varbinary(255) DEFAULT NULL, + `max_value` varbinary(255) DEFAULT NULL, + `nulls_ratio` decimal(12,4) DEFAULT NULL, + `avg_length` decimal(12,4) DEFAULT NULL, + `avg_frequency` decimal(12,4) DEFAULT NULL, + `hist_size` tinyint(3) unsigned DEFAULT NULL, + `hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL, + `histogram` varbinary(255) DEFAULT NULL, + PRIMARY KEY (`db_name`,`table_name`,`column_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns' +show create table index_stats; +Table Create Table +index_stats CREATE TABLE `index_stats` ( + `db_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(64) COLLATE utf8_bin NOT NULL, + `index_name` varchar(64) COLLATE utf8_bin NOT NULL, + `prefix_arity` int(11) unsigned NOT NULL, + `avg_frequency` decimal(12,4) DEFAULT NULL, + PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes' show tables; Tables_in_test diff --git a/mysql-test/r/table_elim.result b/mysql-test/r/table_elim.result index 4505adab443..3e68a877f02 100644 --- a/mysql-test/r/table_elim.result +++ b/mysql-test/r/table_elim.result @@ -119,27 +119,27 @@ t2 where id=f.id); This should use one table: explain select id from v1 where id=2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE f const PRIMARY PRIMARY 4 const 1 Using index +1 PRIMARY f const PRIMARY PRIMARY 4 const 1 Using index This should use one table: explain extended select id from v1 where id in (1,2,3,4); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE f range PRIMARY PRIMARY 4 NULL 4 100.00 Using where; Using index +1 PRIMARY f range PRIMARY PRIMARY 4 NULL 4 100.00 Using where; Using index Warnings: Note 1276 Field or reference 'test.a2.id' of SELECT #3 was resolved in SELECT #2 Note 1003 select `f`.`id` AS `id` from `test`.`t0` `f` where (`f`.`id` in (1,2,3,4)) This should use facts and a1 tables: explain extended select id from v1 where attr1 between 12 and 14; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE a1 range PRIMARY,attr1 attr1 5 NULL 2 100.00 Using index condition -1 SIMPLE f eq_ref PRIMARY PRIMARY 4 test.a1.id 1 100.00 Using index +1 PRIMARY a1 range PRIMARY,attr1 attr1 5 NULL 2 100.00 Using index condition +1 PRIMARY f eq_ref PRIMARY PRIMARY 4 test.a1.id 1 100.00 Using index Warnings: Note 1276 Field or reference 'test.a2.id' of SELECT #3 was resolved in SELECT #2 Note 1003 select `f`.`id` AS `id` from `test`.`t0` `f` join `test`.`t1` `a1` where ((`f`.`id` = `a1`.`id`) and (`a1`.`attr1` between 12 and 14)) This should use facts, a2 and its subquery: explain extended select id from v1 where attr2 between 12 and 14; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE a2 range PRIMARY,attr2 attr2 5 NULL 5 100.00 Using index condition; Using where -1 SIMPLE f eq_ref PRIMARY PRIMARY 4 test.a2.id 1 100.00 Using index +1 PRIMARY a2 range PRIMARY,attr2 attr2 5 NULL 5 100.00 Using index condition; Using where +1 PRIMARY f eq_ref PRIMARY PRIMARY 4 test.a2.id 1 100.00 Using index 3 DEPENDENT SUBQUERY t2 ref PRIMARY PRIMARY 4 test.a2.id 2 100.00 Using index Warnings: Note 1276 Field or reference 'test.a2.id' of SELECT #3 was resolved in SELECT #2 @@ -147,27 +147,27 @@ Note 1003 select `f`.`id` AS `id` from `test`.`t0` `f` join `test`.`t2` `a2` whe This should use one table: explain select id from v2 where id=2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE f const PRIMARY PRIMARY 4 const 1 Using index +1 PRIMARY f const PRIMARY PRIMARY 4 const 1 Using index This should use one table: explain extended select id from v2 where id in (1,2,3,4); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE f range PRIMARY PRIMARY 4 NULL 4 100.00 Using where; Using index +1 PRIMARY f range PRIMARY PRIMARY 4 NULL 4 100.00 Using where; Using index Warnings: Note 1276 Field or reference 'test.f.id' of SELECT #3 was resolved in SELECT #2 Note 1003 select `f`.`id` AS `id` from `test`.`t0` `f` where (`f`.`id` in (1,2,3,4)) This should use facts and a1 tables: explain extended select id from v2 where attr1 between 12 and 14; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE a1 range PRIMARY,attr1 attr1 5 NULL 2 100.00 Using index condition -1 SIMPLE f eq_ref PRIMARY PRIMARY 4 test.a1.id 1 100.00 Using index +1 PRIMARY a1 range PRIMARY,attr1 attr1 5 NULL 2 100.00 Using index condition +1 PRIMARY f eq_ref PRIMARY PRIMARY 4 test.a1.id 1 100.00 Using index Warnings: Note 1276 Field or reference 'test.f.id' of SELECT #3 was resolved in SELECT #2 Note 1003 select `f`.`id` AS `id` from `test`.`t0` `f` join `test`.`t1` `a1` where ((`f`.`id` = `a1`.`id`) and (`a1`.`attr1` between 12 and 14)) This should use facts, a2 and its subquery: explain extended select id from v2 where attr2 between 12 and 14; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE a2 range PRIMARY,attr2 attr2 5 NULL 5 100.00 Using index condition -1 SIMPLE f eq_ref PRIMARY PRIMARY 4 test.a2.id 1 100.00 Using where; Using index +1 PRIMARY a2 range PRIMARY,attr2 attr2 5 NULL 5 100.00 Using index condition +1 PRIMARY f eq_ref PRIMARY PRIMARY 4 test.a2.id 1 100.00 Using where; Using index 3 DEPENDENT SUBQUERY t2 ref PRIMARY PRIMARY 4 test.f.id 2 100.00 Using index Warnings: Note 1276 Field or reference 'test.f.id' of SELECT #3 was resolved in SELECT #2 diff --git a/mysql-test/r/table_options-5867.result b/mysql-test/r/table_options-5867.result new file mode 100644 index 00000000000..21041c7c5c3 --- /dev/null +++ b/mysql-test/r/table_options-5867.result @@ -0,0 +1,37 @@ +install soname 'ha_example'; +set sql_mode='ignore_bad_table_options'; +create table t1 ( +a int complex='c,f,f,f' invalid=3 +) engine=example ull=10000 str='dskj' one_or_two='one' yesno=0 +foobar=barfoo; +Warnings: +Warning 1911 Unknown option 'invalid' +Warning 1911 Unknown option 'foobar' +create table t2 (a int, key (a) some_option=2014); +Warnings: +Warning 1911 Unknown option 'some_option' +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL `complex`='c,f,f,f' `invalid`=3 +) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ull`=10000 `str`='dskj' `one_or_two`='one' `yesno`=0 `foobar`=barfoo `VAROPT`='5' +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL, + KEY `a` (`a`) `some_option`=2014 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +set sql_mode=''; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL `complex`='c,f,f,f' /* `invalid`=3 */ +) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ull`=10000 `str`='dskj' `one_or_two`='one' `yesno`=0 /* `foobar`=barfoo */ `VAROPT`='5' +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL, + KEY `a` (`a`) /* `some_option`=2014 */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1, t2; +uninstall soname 'ha_example'; diff --git a/mysql-test/r/tc_heuristic_recover.result b/mysql-test/r/tc_heuristic_recover.result new file mode 100644 index 00000000000..f5a295cbd9f --- /dev/null +++ b/mysql-test/r/tc_heuristic_recover.result @@ -0,0 +1,37 @@ +call mtr.add_suppression("Can't init tc log"); +call mtr.add_suppression("Found 1 prepared transactions!"); +call mtr.add_suppression("Aborting"); +set debug_sync='RESET'; +CREATE TABLE t1 (i INT) ENGINE=InnoDB; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +FLUSH TABLES; +set debug_sync='ha_commit_trans_after_prepare WAIT_FOR go'; +INSERT INTO t1 VALUES (1);; +# Prove that no COMMIT or ROLLBACK occurred yet. +SELECT * FROM t1; +i +SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT * FROM t1; +i +1 +# Kill the server +FOUND 1 /was in the XA prepared state/ in mysqld.1.err +FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err +NOT FOUND /\[ERROR\] Can\'t init tc log/ in mysqld.1.err +FOUND 2 /was in the XA prepared state/ in mysqld.1.err +FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err +FOUND 1 /\[ERROR\] Can\'t init tc log/ in mysqld.1.err +FOUND 1 /Please restart mysqld without --tc-heuristic-recover/ in mysqld.1.err +FOUND 3 /was in the XA prepared state/ in mysqld.1.err +FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err +FOUND 2 /\[ERROR\] Can\'t init tc log/ in mysqld.1.err +FOUND 2 /Please restart mysqld without --tc-heuristic-recover/ in mysqld.1.err +FOUND 3 /was in the XA prepared state/ in mysqld.1.err +FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err +SET TRANSACTION ISOLATION LEVEL READ COMMITTED; +SELECT * FROM t1; +i +SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT * FROM t1; +i +DROP TABLE t1; diff --git a/mysql-test/r/temp_table.result b/mysql-test/r/temp_table.result index 33f5c6b5165..dd8bab31d75 100644 --- a/mysql-test/r/temp_table.result +++ b/mysql-test/r/temp_table.result @@ -1,5 +1,25 @@ drop table if exists t1,t2; drop view if exists v1; +# +# test basic creation of temporary tables together with normal table +# +create table t1 (a int); +create temporary table t1 AS SELECT 1; +create temporary table t1 AS SELECT 1; +ERROR 42S01: Table 't1' already exists +create temporary table t1 (a int); +ERROR 42S01: Table 't1' already exists +drop temporary table t1; +drop table t1; +create temporary table t1 AS SELECT 1; +create temporary table t1 AS SELECT 1; +ERROR 42S01: Table 't1' already exists +create temporary table t1 (a int); +ERROR 42S01: Table 't1' already exists +drop temporary table t1; +# +# Test with rename +# CREATE TABLE t1 (c int not null, d char (10) not null); insert into t1 values(1,""),(2,"a"),(3,"b"); CREATE TEMPORARY TABLE t1 (a int not null, b char (10) not null); @@ -145,7 +165,7 @@ DROP TABLE t1; CREATE TABLE t1 (i INT); CREATE TEMPORARY TABLE t2 (i INT); DROP TEMPORARY TABLE t2, t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SELECT * FROM t2; ERROR 42S02: Table 'test.t2' doesn't exist SELECT * FROM t1; @@ -223,3 +243,54 @@ CREATE TEMPORARY TABLE bug48067.t1 (c1 int); DROP DATABASE bug48067; DROP TEMPORARY table bug48067.t1; End of 5.1 tests +# +# Test that admin statements work for temporary tables. +# +DROP TABLE IF EXISTS t1,t2; +CREATE TEMPORARY TABLE t1(a INT); +CREATE TEMPORARY TABLE t2(b INT); +CREATE TEMPORARY TABLE t3(c INT); +INSERT INTO t1 VALUES (1), (2), (3); +INSERT INTO t2 VALUES (11), (12), (13); +INSERT INTO t3 VALUES (101), (102), (103); +ANALYZE TABLE t1, t2, t3; +Table Op Msg_type Msg_text +test.t1 analyze status OK +test.t2 analyze status OK +test.t3 analyze status OK +INSERT INTO t1 VALUES (1), (2), (3); +INSERT INTO t2 VALUES (11), (12), (13); +INSERT INTO t3 VALUES (101), (102), (103); +CHECK TABLE t1, t2, t3; +Table Op Msg_type Msg_text +test.t1 check status OK +test.t2 check status OK +test.t3 check status OK +INSERT INTO t1 VALUES (1), (2), (3); +INSERT INTO t2 VALUES (11), (12), (13); +INSERT INTO t3 VALUES (101), (102), (103); +CHECKSUM TABLE t1, t2, t3; +Table Checksum +test.t1 xxx +test.t2 xxx +test.t3 xxx +INSERT INTO t1 VALUES (1), (2), (3); +INSERT INTO t2 VALUES (11), (12), (13); +INSERT INTO t3 VALUES (101), (102), (103); +OPTIMIZE TABLE t1, t2, t3; +Table Op Msg_type Msg_text +test.t1 optimize status OK +test.t2 optimize status OK +test.t3 optimize status OK +INSERT INTO t1 VALUES (1), (2), (3); +INSERT INTO t2 VALUES (11), (12), (13); +INSERT INTO t3 VALUES (101), (102), (103); +REPAIR TABLE t1, t2, t3; +Table Op Msg_type Msg_text +test.t1 repair status OK +test.t2 repair status OK +test.t3 repair status OK +DROP TABLES t1, t2, t3; +CREATE TEMPORARY TABLE t1 (a int); +RENAME TABLE t1 TO t2; +DROP TABLE t2; diff --git a/mysql-test/r/temporal_literal.result b/mysql-test/r/temporal_literal.result new file mode 100644 index 00000000000..e317eba37f0 --- /dev/null +++ b/mysql-test/r/temporal_literal.result @@ -0,0 +1,643 @@ +DROP TABLE IF EXISTS t1, t2; +SET NAMES latin1; +# +# Testing DATE literals +# +SELECT DATE'xxxx'; +ERROR HY000: Incorrect DATE value: 'xxxx' +SELECT DATE'01'; +ERROR HY000: Incorrect DATE value: '01' +SELECT DATE'01-01'; +ERROR HY000: Incorrect DATE value: '01-01' +SELECT DATE'2001'; +ERROR HY000: Incorrect DATE value: '2001' +SELECT DATE'2001-01'; +ERROR HY000: Incorrect DATE value: '2001-01' +SELECT DATE'2001-00-00'; +DATE'2001-00-00' +2001-00-00 +SELECT DATE'2001-01-00'; +DATE'2001-01-00' +2001-01-00 +SELECT DATE'0000-00-00'; +DATE'0000-00-00' +0000-00-00 +SELECT DATE'2001-01-01 00:00:00'; +ERROR HY000: Incorrect DATE value: '2001-01-01 00:00:00' +SELECT DATE'01:01:01'; +DATE'01:01:01' +2001-01-01 +SELECT DATE'01-01-01'; +DATE'01-01-01' +2001-01-01 +SELECT DATE'2010-01-01'; +DATE'2010-01-01' +2010-01-01 +SELECT DATE '2010-01-01'; +DATE '2010-01-01' +2010-01-01 +CREATE TABLE t1 AS SELECT DATE'2010-01-01'; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `DATE'2010-01-01'` date NOT NULL DEFAULT '0000-00-00' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT +{d'2001-01-01'}, +{ d '2001-01-01' }, +{d'2001-01-01 10:10:10'}; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `{d'2001-01-01'}` date NOT NULL DEFAULT '0000-00-00', + `{ d '2001-01-01' }` date NOT NULL DEFAULT '0000-00-00', + `2001-01-01 10:10:10` varchar(19) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +EXPLAIN EXTENDED SELECT {d'2010-01-01'}; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select DATE'2010-01-01' AS `{d'2010-01-01'}` +EXPLAIN EXTENDED SELECT DATE'2010-01-01'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select DATE'2010-01-01' AS `DATE'2010-01-01'` +# +# Testing DATE literals in non-default sql_mode +# +SET sql_mode=no_zero_in_date; +SELECT DATE'2001-00-00'; +ERROR HY000: Incorrect DATE value: '2001-00-00' +SELECT DATE'2001-01-00'; +ERROR HY000: Incorrect DATE value: '2001-01-00' +SELECT DATE'0000-00-00'; +DATE'0000-00-00' +0000-00-00 +SET sql_mode=no_zero_date; +SELECT DATE'0000-00-00'; +ERROR HY000: Incorrect DATE value: '0000-00-00' +SET sql_mode=default; +# +# Testing TIME literals +# +SELECT TIME'xxxx'; +ERROR HY000: Incorrect TIME value: 'xxxx' +SELECT TIME'900:00:00'; +ERROR HY000: Incorrect TIME value: '900:00:00' +SELECT TIME'-900:00:00'; +ERROR HY000: Incorrect TIME value: '-900:00:00' +SELECT TIME'1 24:00:00'; +TIME'1 24:00:00' +48:00:00 +SELECT TIME'30 24:00:00'; +TIME'30 24:00:00' +744:00:00 +SELECT TIME'0000-00-00 00:00:00'; +ERROR HY000: Incorrect TIME value: '0000-00-00 00:00:00' +SELECT TIME'40 24:00:00'; +ERROR HY000: Incorrect TIME value: '40 24:00:00' +SELECT TIME'10'; +TIME'10' +00:00:10 +SELECT TIME'10:10'; +TIME'10:10' +10:10:00 +SELECT TIME'10:11.12'; +TIME'10:11.12' +10:11:00.12 +SELECT TIME'10:10:10'; +TIME'10:10:10' +10:10:10 +SELECT TIME'10:10:10.'; +TIME'10:10:10.' +10:10:10 +SELECT TIME'10:10:10.1'; +TIME'10:10:10.1' +10:10:10.1 +SELECT TIME'10:10:10.12'; +TIME'10:10:10.12' +10:10:10.12 +SELECT TIME'10:10:10.123'; +TIME'10:10:10.123' +10:10:10.123 +SELECT TIME'10:10:10.1234'; +TIME'10:10:10.1234' +10:10:10.1234 +SELECT TIME'10:10:10.12345'; +TIME'10:10:10.12345' +10:10:10.12345 +SELECT TIME'10:10:10.123456'; +TIME'10:10:10.123456' +10:10:10.123456 +SELECT TIME'-10:00:00'; +TIME'-10:00:00' +-10:00:00 +SELECT TIME '10:11:12'; +TIME '10:11:12' +10:11:12 +CREATE TABLE t1 AS SELECT +TIME'10:10:10', +TIME'10:10:10.', +TIME'10:10:10.1', +TIME'10:10:10.12', +TIME'10:10:10.123', +TIME'10:10:10.1234', +TIME'10:10:10.12345', +TIME'10:10:10.123456'; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `TIME'10:10:10'` time NOT NULL DEFAULT '00:00:00', + `TIME'10:10:10.'` time NOT NULL DEFAULT '00:00:00', + `TIME'10:10:10.1'` time(1) NOT NULL DEFAULT '00:00:00.0', + `TIME'10:10:10.12'` time(2) NOT NULL DEFAULT '00:00:00.00', + `TIME'10:10:10.123'` time(3) NOT NULL DEFAULT '00:00:00.000', + `TIME'10:10:10.1234'` time(4) NOT NULL DEFAULT '00:00:00.0000', + `TIME'10:10:10.12345'` time(5) NOT NULL DEFAULT '00:00:00.00000', + `TIME'10:10:10.123456'` time(6) NOT NULL DEFAULT '00:00:00.000000' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT +{t'10:10:10'}, +{ t '10:10:10' }, +{t'10:10:10.'}, +{t'10:10:10.123456'}, +{t'2001-01-01'}; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `{t'10:10:10'}` time NOT NULL DEFAULT '00:00:00', + `{ t '10:10:10' }` time NOT NULL DEFAULT '00:00:00', + `{t'10:10:10.'}` time NOT NULL DEFAULT '00:00:00', + `{t'10:10:10.123456'}` time(6) NOT NULL DEFAULT '00:00:00.000000', + `2001-01-01` varchar(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +EXPLAIN EXTENDED SELECT {t'10:01:01'}; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select TIME'10:01:01' AS `{t'10:01:01'}` +EXPLAIN EXTENDED SELECT TIME'10:01:01'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select TIME'10:01:01' AS `TIME'10:01:01'` +# +# Testing TIMESTAMP literals +# +SELECT TIMESTAMP'xxxx'; +ERROR HY000: Incorrect DATETIME value: 'xxxx' +SELECT TIMESTAMP'2010'; +ERROR HY000: Incorrect DATETIME value: '2010' +SELECT TIMESTAMP'2010-01'; +ERROR HY000: Incorrect DATETIME value: '2010-01' +SELECT TIMESTAMP'2010-01-01'; +ERROR HY000: Incorrect DATETIME value: '2010-01-01' +SELECT TIMESTAMP'2010-01-01 00'; +TIMESTAMP'2010-01-01 00' +2010-01-01 00:00:00 +SELECT TIMESTAMP'2010-01-01 00:01'; +TIMESTAMP'2010-01-01 00:01' +2010-01-01 00:01:00 +SELECT TIMESTAMP'2010-01-01 10:10:10'; +TIMESTAMP'2010-01-01 10:10:10' +2010-01-01 10:10:10 +SELECT TIMESTAMP'2010-01-01 10:10:10.'; +TIMESTAMP'2010-01-01 10:10:10.' +2010-01-01 10:10:10 +SELECT TIMESTAMP'2010-01-01 10:10:10.1'; +TIMESTAMP'2010-01-01 10:10:10.1' +2010-01-01 10:10:10.1 +SELECT TIMESTAMP'2010-01-01 10:10:10.12'; +TIMESTAMP'2010-01-01 10:10:10.12' +2010-01-01 10:10:10.12 +SELECT TIMESTAMP'2010-01-01 10:10:10.123'; +TIMESTAMP'2010-01-01 10:10:10.123' +2010-01-01 10:10:10.123 +SELECT TIMESTAMP'2010-01-01 10:10:10.1234'; +TIMESTAMP'2010-01-01 10:10:10.1234' +2010-01-01 10:10:10.1234 +SELECT TIMESTAMP'2010-01-01 10:10:10.12345'; +TIMESTAMP'2010-01-01 10:10:10.12345' +2010-01-01 10:10:10.12345 +SELECT TIMESTAMP'2010-01-01 10:10:10.123456'; +TIMESTAMP'2010-01-01 10:10:10.123456' +2010-01-01 10:10:10.123456 +SELECT TIMESTAMP '2010-01-01 10:20:30'; +TIMESTAMP '2010-01-01 10:20:30' +2010-01-01 10:20:30 +CREATE TABLE t1 AS SELECT +TIMESTAMP'2010-01-01 10:10:10', +TIMESTAMP'2010-01-01 10:10:10.', +TIMESTAMP'2010-01-01 10:10:10.1', +TIMESTAMP'2010-01-01 10:10:10.12', +TIMESTAMP'2010-01-01 10:10:10.123', +TIMESTAMP'2010-01-01 10:10:10.1234', +TIMESTAMP'2010-01-01 10:10:10.12345', +TIMESTAMP'2010-01-01 10:10:10.123456'; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `TIMESTAMP'2010-01-01 10:10:10'` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `TIMESTAMP'2010-01-01 10:10:10.'` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `TIMESTAMP'2010-01-01 10:10:10.1'` datetime(1) NOT NULL DEFAULT '0000-00-00 00:00:00.0', + `TIMESTAMP'2010-01-01 10:10:10.12'` datetime(2) NOT NULL DEFAULT '0000-00-00 00:00:00.00', + `TIMESTAMP'2010-01-01 10:10:10.123'` datetime(3) NOT NULL DEFAULT '0000-00-00 00:00:00.000', + `TIMESTAMP'2010-01-01 10:10:10.1234'` datetime(4) NOT NULL DEFAULT '0000-00-00 00:00:00.0000', + `TIMESTAMP'2010-01-01 10:10:10.12345'` datetime(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000', + `TIMESTAMP'2010-01-01 10:10:10.123456'` datetime(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT +{ts'2001-01-01 10:10:10'}, +{ ts '2001-01-01 10:10:10' }, +{ts'2001-01-01 10:10:10.'}, +{ts'2001-01-01 10:10:10.123456'}, +{ts'2001-01-01'}; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `{ts'2001-01-01 10:10:10'}` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `{ ts '2001-01-01 10:10:10' }` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `{ts'2001-01-01 10:10:10.'}` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `{ts'2001-01-01 10:10:10.123456'}` datetime(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000', + `2001-01-01` varchar(10) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +EXPLAIN EXTENDED SELECT {ts'2010-01-01 10:10:10'}; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select TIMESTAMP'2010-01-01 10:10:10' AS `{ts'2010-01-01 10:10:10'}` +EXPLAIN EXTENDED SELECT TIMESTAMP'2010-01-01 10:10:10'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select TIMESTAMP'2010-01-01 10:10:10' AS `TIMESTAMP'2010-01-01 10:10:10'` +# +# Testing nanosecond rounding for TIMESTAMP literals with bad dates +# +SELECT TIMESTAMP'2001-00-00 00:00:00.999999'; +TIMESTAMP'2001-00-00 00:00:00.999999' +2001-00-00 00:00:00.999999 +SELECT TIMESTAMP'2001-00-01 00:00:00.999999'; +TIMESTAMP'2001-00-01 00:00:00.999999' +2001-00-01 00:00:00.999999 +SELECT TIMESTAMP'2001-01-00 00:00:00.999999'; +TIMESTAMP'2001-01-00 00:00:00.999999' +2001-01-00 00:00:00.999999 +SELECT TIMESTAMP'2001-00-00 00:00:00.9999999'; +TIMESTAMP'2001-00-00 00:00:00.9999999' +2001-00-00 00:00:00.999999 +Warnings: +Note 1292 Truncated incorrect datetime value: '2001-00-00 00:00:00.9999999' +SELECT TIMESTAMP'2001-00-01 00:00:00.9999999'; +TIMESTAMP'2001-00-01 00:00:00.9999999' +2001-00-01 00:00:00.999999 +Warnings: +Note 1292 Truncated incorrect datetime value: '2001-00-01 00:00:00.9999999' +SELECT TIMESTAMP'2001-01-00 00:00:00.9999999'; +TIMESTAMP'2001-01-00 00:00:00.9999999' +2001-01-00 00:00:00.999999 +Warnings: +Note 1292 Truncated incorrect datetime value: '2001-01-00 00:00:00.9999999' +# +# String literal with bad dates and nanoseconds to DATETIME(N) +# +CREATE TABLE t1 (a DATETIME(6)); +INSERT INTO t1 VALUES ('2001-00-00 00:00:00.9999999'); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +INSERT INTO t1 VALUES ('2001-00-01 00:00:00.9999999'); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +INSERT INTO t1 VALUES ('2001-01-00 00:00:00.9999999'); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +SELECT * FROM t1; +a +2001-00-00 00:00:00.999999 +2001-00-01 00:00:00.999999 +2001-01-00 00:00:00.999999 +DROP TABLE t1; +CREATE TABLE t1 (a DATETIME(5)); +INSERT INTO t1 VALUES ('2001-00-00 00:00:00.9999999'); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +INSERT INTO t1 VALUES ('2001-00-01 00:00:00.9999999'); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +INSERT INTO t1 VALUES ('2001-01-00 00:00:00.9999999'); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +SELECT * FROM t1; +a +2001-00-00 00:00:00.99999 +2001-00-01 00:00:00.99999 +2001-01-00 00:00:00.99999 +DROP TABLE t1; +CREATE TABLE t1 (a DATETIME); +INSERT INTO t1 VALUES ('2001-00-00 00:00:00.9999999'); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +INSERT INTO t1 VALUES ('2001-00-01 00:00:00.9999999'); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +INSERT INTO t1 VALUES ('2001-01-00 00:00:00.9999999'); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +SELECT * FROM t1; +a +2001-00-00 00:00:00 +2001-00-01 00:00:00 +2001-01-00 00:00:00 +DROP TABLE t1; +# +# Testing Item_date_literal::eq +# +CREATE TABLE t1 (a DATE); +INSERT INTO t1 VALUES ('2001-01-01'),('2003-01-01'); +SELECT * FROM t1 WHERE a BETWEEN DATE'2001-01-01' AND DATE'2002-01-01'; +a +2001-01-01 +SELECT DATE'2001-01-01' FROM t1 GROUP BY DATE'2001-01-01'; +DATE'2001-01-01' +2001-01-01 +DROP TABLE t1; +# +# TIME literals in no-zero date context +# +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); +SELECT TO_DAYS(TIME'00:00:00'); +TO_DAYS(TIME'00:00:00') +730884 +SELECT TO_SECONDS(TIME'00:00:00'); +TO_SECONDS(TIME'00:00:00') +63148377600 +SELECT DAYOFYEAR(TIME'00:00:00'); +DAYOFYEAR(TIME'00:00:00') +34 +SELECT WEEK(TIME'00:00:00'); +WEEK(TIME'00:00:00') +4 +SELECT YEARWEEK(TIME'00:00:00'); +YEARWEEK(TIME'00:00:00') +200104 +SELECT WEEKDAY(TIME'00:00:00'); +WEEKDAY(TIME'00:00:00') +5 +SELECT CONVERT_TZ(TIME'00:00:00','+00:00','+01:00'); +CONVERT_TZ(TIME'00:00:00','+00:00','+01:00') +2001-02-03 01:00:00 +SELECT DATE_ADD(TIME'00:00:00', INTERVAL 1 HOUR); +DATE_ADD(TIME'00:00:00', INTERVAL 1 HOUR) +01:00:00 +SELECT TIMESTAMPDIFF(SECOND,TIME'00:00:00', TIME'00:00:00'); +TIMESTAMPDIFF(SECOND,TIME'00:00:00', TIME'00:00:00') +0 +SET timestamp=DEFAULT; +# +# Testing Item_func::fix_fields() +# +SELECT 'a' LIKE 'a' ESCAPE DATE'2001-01-01'; +ERROR HY000: Incorrect arguments to ESCAPE +SELECT 'a' LIKE 'a' ESCAPE TIMESTAMP'2001-01-01 00:00:00'; +ERROR HY000: Incorrect arguments to ESCAPE +SELECT 'a' LIKE 'a' ESCAPE TIME'00:00:00'; +ERROR HY000: Incorrect arguments to ESCAPE +# +# MDEV-4871 Temporal literals do not accept nanoseconds +# +SELECT TIME'10:10:10.1234567'; +TIME'10:10:10.1234567' +10:10:10.123456 +Warnings: +Note 1292 Truncated incorrect time value: '10:10:10.1234567' +SELECT TIME('10:10:10.1234567'); +TIME('10:10:10.1234567') +10:10:10.123456 +Warnings: +Note 1292 Truncated incorrect time value: '10:10:10.1234567' +SELECT TIME'10:10:10.123456xyz'; +ERROR HY000: Incorrect TIME value: '10:10:10.123456xyz' +SELECT TIME'10:10:10.1234567xyz'; +ERROR HY000: Incorrect TIME value: '10:10:10.1234567xyz' +SELECT TIME('10:10:10.123456xyz'); +TIME('10:10:10.123456xyz') +10:10:10.123456 +Warnings: +Warning 1292 Truncated incorrect time value: '10:10:10.123456xyz' +SELECT TIME('10:10:10.1234567xyz'); +TIME('10:10:10.1234567xyz') +10:10:10.123456 +Warnings: +Warning 1292 Truncated incorrect time value: '10:10:10.1234567xyz' +SELECT TIMESTAMP'2001-01-01 10:10:10.1234567'; +TIMESTAMP'2001-01-01 10:10:10.1234567' +2001-01-01 10:10:10.123456 +Warnings: +Note 1292 Truncated incorrect datetime value: '2001-01-01 10:10:10.1234567' +SELECT TIMESTAMP('2001-01-01 10:10:10.1234567'); +TIMESTAMP('2001-01-01 10:10:10.1234567') +2001-01-01 10:10:10.123456 +Warnings: +Note 1292 Truncated incorrect datetime value: '2001-01-01 10:10:10.1234567' +SELECT TIMESTAMP'2001-01-01 10:10:10.123456xyz'; +ERROR HY000: Incorrect DATETIME value: '2001-01-01 10:10:10.123456xyz' +SELECT TIMESTAMP'2001-01-01 10:10:10.1234567xyz'; +ERROR HY000: Incorrect DATETIME value: '2001-01-01 10:10:10.1234567xyz' +SELECT TIMESTAMP('2001-01-01 10:10:10.123456xyz'); +TIMESTAMP('2001-01-01 10:10:10.123456xyz') +2001-01-01 10:10:10.123456 +Warnings: +Warning 1292 Truncated incorrect datetime value: '2001-01-01 10:10:10.123456xyz' +SELECT TIMESTAMP('2001-01-01 10:10:10.1234567xyz'); +TIMESTAMP('2001-01-01 10:10:10.1234567xyz') +2001-01-01 10:10:10.123456 +Warnings: +Warning 1292 Truncated incorrect datetime value: '2001-01-01 10:10:10.1234567xyz' +CREATE TABLE t1 (a TIME(6)); +INSERT INTO t1 VALUES (TIME'10:20:30.1234567'); +Warnings: +Note 1292 Truncated incorrect time value: '10:20:30.1234567' +INSERT INTO t1 VALUES (TIME('10:20:30.1234567')); +Warnings: +Note 1292 Truncated incorrect time value: '10:20:30.1234567' +SELECT * FROM t1; +a +10:20:30.123456 +10:20:30.123456 +DROP TABLE t1; +# +# MDEV-5969 Crash in prepared statement with NO_ZERO_IN_DATE and ROLLUP +# +CREATE TABLE t1 +( +year INT NOT NULL, +product VARCHAR(32) NOT NULL, +profit INT +); +INSERT INTO t1 VALUES ('2001','car',101); +INSERT INTO t1 VALUES ('2001','gas',102); +INSERT INTO t1 VALUES ('2001','toy',103); +INSERT INTO t1 VALUES ('2002','car',201); +INSERT INTO t1 VALUES ('2002','gas',202); +INSERT INTO t1 VALUES ('2002','toy',203); +SET sql_mode=DEFAULT; +PREPARE stmt FROM "SELECT DATE'2001-00-00' AS c,year, SUM(profit) FROM t1 GROUP BY c,year WITH ROLLUP"; +EXECUTE stmt; +c year SUM(profit) +2001-00-00 2001 306 +2001-00-00 2002 606 +2001-00-00 NULL 912 +NULL NULL 912 +SET sql_mode='no_zero_in_date'; +EXECUTE stmt; +c year SUM(profit) +NULL 2001 306 +NULL 2002 606 +NULL NULL 912 +NULL NULL 912 +Warnings: +Warning 1292 Incorrect datetime value: '2001-00-00' +Warning 1292 Incorrect datetime value: '2001-00-00' +Warning 1292 Incorrect datetime value: '2001-00-00' +Warning 1292 Incorrect datetime value: '2001-00-00' +Warning 1292 Incorrect datetime value: '2001-00-00' +Warning 1292 Incorrect datetime value: '2001-00-00' +Warning 1292 Incorrect datetime value: '2001-00-00' +Warning 1292 Incorrect datetime value: '2001-00-00' +Warning 1292 Incorrect datetime value: '2001-00-00' +Warning 1292 Incorrect datetime value: '2001-00-00' +Warning 1292 Incorrect datetime value: '2001-00-00' +Warning 1292 Incorrect datetime value: '2001-00-00' +Warning 1292 Incorrect datetime value: '2001-00-00' +Warning 1292 Incorrect datetime value: '2001-00-00' +Warning 1292 Incorrect datetime value: '2001-00-00' +SET sql_mode=DEFAULT; +DROP TABLE t1; +# +# MDEV-5971 Asymmetry between CAST(DATE'2001-00-00') to INT and TO CHAR in prepared statements +# +SET sql_mode=DEFAULT; +PREPARE stmt FROM "SELECT CAST(DATE'2001-00-00' AS SIGNED) AS c"; +SET sql_mode='no_zero_in_date'; +EXECUTE stmt; +c +NULL +Warnings: +Warning 1292 Incorrect datetime value: '2001-00-00' +SET sql_mode=DEFAULT; +PREPARE stmt FROM "SELECT CAST(DATE'2001-00-00' AS CHAR) AS c"; +SET sql_mode='no_zero_in_date'; +EXECUTE stmt; +c +NULL +Warnings: +Warning 1292 Incorrect datetime value: '2001-00-00' +SET sql_mode=DEFAULT; +PREPARE stmt FROM "SELECT CAST(DATE'2001-00-00' AS DECIMAL(30,0)) AS c"; +SET sql_mode='no_zero_in_date'; +EXECUTE stmt; +c +NULL +Warnings: +Warning 1292 Incorrect datetime value: '2001-00-00' +SET sql_mode=DEFAULT; +PREPARE stmt FROM "SELECT CAST(DATE'2001-00-00' AS DOUBLE) AS c"; +SET sql_mode='no_zero_in_date'; +EXECUTE stmt; +c +NULL +Warnings: +Warning 1292 Incorrect datetime value: '2001-00-00' +# +# Zero month or zero day automatically mean NULL flag, no matter SQL_MODE is. +# Only zero year is OK for NOT NULL. +# +SET sql_mode=DEFAULT; +PREPARE stmt FROM "CREATE TABLE t1 AS SELECT CAST(DATE'2001-00-00' AS CHAR) AS c"; +EXECUTE stmt; +SHOW COLUMNS FROM t1; +Field Type Null Key Default Extra +c varchar(10) YES NULL +SELECT * FROM t1; +c +2001-00-00 +DROP TABLE t1; +SET sql_mode='no_zero_in_date'; +EXECUTE stmt; +Warnings: +Warning 1292 Incorrect datetime value: '2001-00-00' +SHOW COLUMNS FROM t1; +Field Type Null Key Default Extra +c varchar(10) YES NULL +SELECT * FROM t1; +c +NULL +DROP TABLE t1; +SET sql_mode=DEFAULT; +CREATE TABLE t1 AS SELECT +DATE'2001-01-01', +DATE'0000-01-01', +DATE'2001-00-00', +DATE'2001-00-01', +DATE'2001-01-00'; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `DATE'2001-01-01'` date NOT NULL DEFAULT '0000-00-00', + `DATE'0000-01-01'` date NOT NULL DEFAULT '0000-00-00', + `DATE'2001-00-00'` date DEFAULT NULL, + `DATE'2001-00-01'` date DEFAULT NULL, + `DATE'2001-01-00'` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT +TIMESTAMP'2001-01-01 00:00:00', +TIMESTAMP'0000-01-01 00:00:00', +TIMESTAMP'2001-00-00 00:00:00', +TIMESTAMP'2001-00-01 00:00:00', +TIMESTAMP'2001-01-00 00:00:00'; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `TIMESTAMP'2001-01-01 00:00:00'` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `TIMESTAMP'0000-01-01 00:00:00'` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `TIMESTAMP'2001-00-00 00:00:00'` datetime DEFAULT NULL, + `TIMESTAMP'2001-00-01 00:00:00'` datetime DEFAULT NULL, + `TIMESTAMP'2001-01-00 00:00:00'` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +# +# MDEV-5975 Prepared statements with DATE literals do not honor NO_ZERO_IN_DATE +# +SET sql_mode=DEFAULT; +PREPARE stmt FROM "SELECT (SELECT DATE'2001-00-00') AS c"; +EXECUTE stmt; +c +2001-00-00 +SET sql_mode='no_zero_in_date'; +EXECUTE stmt; +c +NULL +Warnings: +Warning 1292 Incorrect datetime value: '2001-00-00' +DEALLOCATE PREPARE stmt; +SET sql_mode=DEFAULT; +PREPARE stmt FROM "SELECT (SELECT TIMESTAMP'2001-00-00 10:20:30') AS c"; +EXECUTE stmt; +c +2001-00-00 10:20:30 +SET sql_mode='no_zero_in_date'; +EXECUTE stmt; +c +NULL +Warnings: +Warning 1292 Incorrect datetime value: '2001-00-00 10:20:30' +DEALLOCATE PREPARE stmt; +SET sql_mode=DEFAULT; diff --git a/mysql-test/r/testdb_only.require b/mysql-test/r/testdb_only.require deleted file mode 100644 index e717418fdb6..00000000000 --- a/mysql-test/r/testdb_only.require +++ /dev/null @@ -1,2 +0,0 @@ -Variable_name Value -use extern server NO diff --git a/mysql-test/r/timezone2.result b/mysql-test/r/timezone2.result index 0ac4ddca277..096e996bffb 100644 --- a/mysql-test/r/timezone2.result +++ b/mysql-test/r/timezone2.result @@ -315,16 +315,14 @@ End of 5.1 tests # # MDEV-4653 Wrong result for CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5') # +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); SELECT CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5'); CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5') -NULL -Warnings: -Warning 1292 Incorrect datetime value: '00:00:00' +2001-02-03 07:05:00 SELECT CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5'); CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5') -NULL -Warnings: -Warning 1292 Incorrect datetime value: '00:00:00' +2001-02-03 07:05:00 +SET timestamp=DEFAULT; # # MDEV-5506 safe_mutex: Trying to lock unitialized mutex at safemalloc.c on server shutdown after SELECT with CONVERT_TZ # diff --git a/mysql-test/r/tmp_table_count-7586.result b/mysql-test/r/tmp_table_count-7586.result new file mode 100644 index 00000000000..0c526e0d4a3 --- /dev/null +++ b/mysql-test/r/tmp_table_count-7586.result @@ -0,0 +1,83 @@ +create table t2 (a int); +insert into t2 values (1),(2),(3); +create view v2 as select a from t2; +flush status; +select * from v2; +a +1 +2 +3 +show status like '%Created_tmp%'; +Variable_name Value +Created_tmp_disk_tables 0 +Created_tmp_files 0 +Created_tmp_tables 0 +explain select * from v2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 +select * from (select * from t2) T1; +a +1 +2 +3 +show status like '%Created_tmp%'; +Variable_name Value +Created_tmp_disk_tables 0 +Created_tmp_files 0 +Created_tmp_tables 0 +explain select * from (select * from t2) T1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 +drop view v2; +drop table t2; +CREATE TABLE t1(a int); +INSERT INTO t1 values(1),(2); +CREATE TABLE t2(a int); +INSERT INTO t2 values(1),(2); +EXPLAIN SELECT * FROM t1 WHERE a IN (SELECT * FROM t2 GROUP BY a HAVING a > 1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 test.t1.a 1 +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 Using temporary +truncate table performance_schema.events_statements_history_long; +flush status; +CREATE TABLE t3 SELECT * FROM t1 WHERE a IN (SELECT * FROM t2 GROUP BY a HAVING a > 1); +# Performance schema should be the same as "Created_tmp_tables" variable below +select sum(created_tmp_tables) from performance_schema.events_statements_history_long; +sum(created_tmp_tables) +2 +show status like '%Created_tmp%'; +Variable_name Value +Created_tmp_disk_tables 0 +Created_tmp_files 0 +Created_tmp_tables 2 +drop table t3; +EXPLAIN SELECT * FROM t1 WHERE a IN (SELECT * FROM t2 GROUP BY a); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 +truncate table performance_schema.events_statements_history_long; +flush status; +CREATE TABLE t3 SELECT * FROM t1 WHERE a IN (SELECT * FROM t2 GROUP BY a); +# Performance schema should be the same as "Created_tmp_tables" variable below +select sum(created_tmp_tables) from performance_schema.events_statements_history_long; +sum(created_tmp_tables) +1 +show status like '%Created_tmp%'; +Variable_name Value +Created_tmp_disk_tables 0 +Created_tmp_files 0 +Created_tmp_tables 1 +drop table t1,t2,t3; +truncate table performance_schema.events_statements_history_long; +flush status; +# Performance schema should be the same as "Created_tmp_tables" variable below +select sum(created_tmp_tables) from performance_schema.events_statements_history_long; +sum(created_tmp_tables) +0 +show status like '%Created_tmp%'; +Variable_name Value +Created_tmp_disk_tables 0 +Created_tmp_files 0 +Created_tmp_tables 0 diff --git a/mysql-test/r/trans_read_only.result b/mysql-test/r/trans_read_only.result new file mode 100644 index 00000000000..2b1055d4a7b --- /dev/null +++ b/mysql-test/r/trans_read_only.result @@ -0,0 +1,40 @@ +# +# WL#5968: Implement START TRANSACTION READ (WRITE|ONLY); +# +# +# Test9: The --transaction-read-only startup option. +# Check that the option was set by the .opt file. +SELECT @@tx_read_only; +@@tx_read_only +1 +# Also for new connections. Switching to con1 +SELECT @@tx_read_only; +@@tx_read_only +1 +SET SESSION TRANSACTION READ WRITE; +SELECT @@tx_read_only; +@@tx_read_only +0 +# Connection default +SELECT @@tx_read_only; +@@tx_read_only +1 +# +# Test 10: SET TRANSACTION / START TRANSACTION + implicit commit. +SET SESSION TRANSACTION READ WRITE; +SET TRANSACTION READ ONLY; +# Since DDL does implicit commit before starting, SET TRANSACTION +# will have no effect because the "next" transaction will already +# be over before the DDL statement starts. +CREATE TABLE t1 (a INT); +START TRANSACTION READ ONLY; +# The same happens with START TRANSACTION +DROP TABLE t1; +# +# Test 11: INSERT DELAYED +CREATE TABLE t1(a INT); +START TRANSACTION READ ONLY; +INSERT DELAYED INTO t1 VALUES (1); +ERROR 25006: Cannot execute statement in a READ ONLY transaction. +COMMIT; +DROP TABLE t1; diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index 6047d00c858..8bf31766031 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -969,7 +969,7 @@ trigger_schema trigger_name event_object_schema event_object_table action_statem test t1_bi test t1 set @a:=new.id test t1_ai test t1 set @b:=new.id rename table t1 to t2; -ERROR HY000: Can't create/write to file './test/t1_ai.TRN~' (Errcode: 13) +ERROR HY000: Can't create/write to file './test/t1_ai.TRN~' (Errcode: 13 "Permission denied") insert into t1 values (102); select @a, @b; @a @b @@ -1163,9 +1163,9 @@ DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; CREATE TABLE t1(c INT); CREATE TABLE t2(c INT); -CREATE DEFINER=1234567890abcdefGHIKL@localhost +CREATE DEFINER=longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1; -ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW SET @a = 2; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) @@ -1944,7 +1944,7 @@ insert into table_25411_b select new.*; select * from table_25411_a; a insert into table_25411_a values (1); -ERROR 42S02: Unknown table 'new' +ERROR 42S02: Unknown table 'test.new' select * from table_25411_a; a 1 diff --git a/mysql-test/r/trigger_notembedded.result b/mysql-test/r/trigger_notembedded.result index d94713cbe02..ef86e4c496c 100644 --- a/mysql-test/r/trigger_notembedded.result +++ b/mysql-test/r/trigger_notembedded.result @@ -162,7 +162,7 @@ SELECT trigger_name, definer FROM INFORMATION_SCHEMA.TRIGGERS ORDER BY trigger_n trigger_name definer trg1 trg2 @ -trg3 @abc@def@@ +trg3 @abc@def@@% trg4 @hostname trg5 @abcdef@@@hostname @@ -170,7 +170,7 @@ SELECT * FROM INFORMATION_SCHEMA.TRIGGERS ORDER BY trigger_name; TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION def mysqltest_db1 trg1 INSERT def mysqltest_db1 t1 0 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW NULL latin1 latin1_swedish_ci latin1_swedish_ci def mysqltest_db1 trg2 INSERT def mysqltest_db1 t1 0 NULL SET @a = 2 ROW AFTER NULL NULL OLD NEW NULL @ latin1 latin1_swedish_ci latin1_swedish_ci -def mysqltest_db1 trg3 UPDATE def mysqltest_db1 t1 0 NULL SET @a = 3 ROW BEFORE NULL NULL OLD NEW NULL @abc@def@@ latin1 latin1_swedish_ci latin1_swedish_ci +def mysqltest_db1 trg3 UPDATE def mysqltest_db1 t1 0 NULL SET @a = 3 ROW BEFORE NULL NULL OLD NEW NULL @abc@def@@% latin1 latin1_swedish_ci latin1_swedish_ci def mysqltest_db1 trg4 UPDATE def mysqltest_db1 t1 0 NULL SET @a = 4 ROW AFTER NULL NULL OLD NEW NULL @hostname latin1 latin1_swedish_ci latin1_swedish_ci def mysqltest_db1 trg5 DELETE def mysqltest_db1 t1 0 NULL SET @a = 5 ROW BEFORE NULL NULL OLD NEW NULL @abcdef@@@hostname latin1 latin1_swedish_ci latin1_swedish_ci @@ -383,7 +383,7 @@ CALL p2(NEW.i1); INSERT INTO t1 VALUES (7); ERROR 42000: UPDATE command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't1' INSERT INTO t2 VALUES (11); -ERROR 42000: SELECT,UPDATE command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't2' +ERROR 42000: SELECT, UPDATE command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't2' DROP TRIGGER t2_bi; DROP TRIGGER t1_bi; GRANT SELECT ON mysqltest_db1.* TO mysqltest_dfn@localhost; diff --git a/mysql-test/r/truncate_badse.result b/mysql-test/r/truncate_badse.result new file mode 100644 index 00000000000..16f44f180ed --- /dev/null +++ b/mysql-test/r/truncate_badse.result @@ -0,0 +1,13 @@ +install plugin example soname 'ha_example'; +create table t1 (a int) engine=example; +select 1; +1 +1 +uninstall plugin example; +flush tables; +select count(*) from information_schema.plugins where plugin_name='example'; +count(*) +0 +truncate table t1; +ERROR 42000: Unknown storage engine 'EXAMPLE' +drop table t1; diff --git a/mysql-test/r/truncate_coverage.result b/mysql-test/r/truncate_coverage.result index 728702f7ab5..395c71b2e6b 100644 --- a/mysql-test/r/truncate_coverage.result +++ b/mysql-test/r/truncate_coverage.result @@ -11,7 +11,7 @@ HANDLER t1 OPEN; # # connection default LOCK TABLE t1 WRITE; -SET DEBUG_SYNC='mdl_upgrade_shared_lock_to_exclusive SIGNAL waiting'; +SET DEBUG_SYNC='mdl_upgrade_lock SIGNAL waiting'; TRUNCATE TABLE t1; # # connection con2 @@ -37,7 +37,7 @@ HANDLER t1 OPEN; # # connection default LOCK TABLE t1 WRITE; -SET DEBUG_SYNC='mdl_upgrade_shared_lock_to_exclusive SIGNAL waiting'; +SET DEBUG_SYNC='mdl_upgrade_lock SIGNAL waiting'; TRUNCATE TABLE t1; # # connection con2 @@ -50,7 +50,7 @@ HANDLER t1 CLOSE; ERROR 42S02: Table 'test.t1' doesn't exist UNLOCK TABLES; DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SET DEBUG_SYNC='RESET'; CREATE TABLE t1 (c1 INT); INSERT INTO t1 VALUES (1); diff --git a/mysql-test/r/type_binary.result b/mysql-test/r/type_binary.result index b00d1585b29..9d44d718a02 100644 --- a/mysql-test/r/type_binary.result +++ b/mysql-test/r/type_binary.result @@ -146,3 +146,37 @@ hex(f2) hex(f3) 0000 drop table t1; End of 5.0 tests +# +# Start of 10.0 tests +# +# +# MDEV-8472 BINARY, VARBINARY and BLOB return different warnings on CAST to DECIMAL +# +SET NAMES utf8; +CREATE TABLE t1 (a BINARY(30)); +INSERT INTO t1 VALUES ('1äÖüß@µ*$'); +SELECT CAST(a AS DECIMAL) FROM t1; +CAST(a AS DECIMAL) +1 +Warnings: +Warning 1292 Truncated incorrect DECIMAL value: '1\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' +DROP TABLE t1; +CREATE TABLE t1 (a VARBINARY(30)); +INSERT INTO t1 VALUES ('1äÖüß@µ*$'); +SELECT CAST(a AS DECIMAL) FROM t1; +CAST(a AS DECIMAL) +1 +Warnings: +Warning 1292 Truncated incorrect DECIMAL value: '1\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$' +DROP TABLE t1; +CREATE TABLE t1 (a BLOB); +INSERT INTO t1 VALUES ('1äÖüß@µ*$'); +SELECT CAST(a AS DECIMAL) FROM t1; +CAST(a AS DECIMAL) +1 +Warnings: +Warning 1292 Truncated incorrect DECIMAL value: '1\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$' +DROP TABLE t1; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result index e6f4db26c23..639a97be27b 100644 --- a/mysql-test/r/type_bit.result +++ b/mysql-test/r/type_bit.result @@ -722,7 +722,12 @@ DROP TABLE t1; CREATE TABLE IF NOT EXISTS t1 ( f1 bit(2) NOT NULL default b'' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -ERROR 42000: Invalid default value for 'f1' +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` bit(2) NOT NULL DEFAULT b'0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci +DROP TABLE t1; create table t1bit7 (a1 bit(7) not null) engine=MyISAM; create table t2bit7 (b1 bit(7)) engine=MyISAM; insert into t1bit7 values (b'1100000'); diff --git a/mysql-test/r/type_bit_innodb.result b/mysql-test/r/type_bit_innodb.result index 9bdd8658690..80fc942e77c 100644 --- a/mysql-test/r/type_bit_innodb.result +++ b/mysql-test/r/type_bit_innodb.result @@ -413,3 +413,12 @@ a ` drop table t1; End of 5.0 tests +create table t1(f1 bit(2) not null default b'10',f2 bit(14) not null default b'11110000111100'); +insert into t1 (f1) values (default); +insert into t1 values (b'',b''),('',''); +select hex(f1), hex(f2) from t1; +hex(f1) hex(f2) +2 3C3C +0 0 +0 0 +drop table t1; diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index 9b20ddeb1df..bdb0a974b55 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -232,7 +232,7 @@ HELLO HELLO MY a hello -set option sql_big_tables=1; +set big_tables=1; select distinct t from t1; t NULL @@ -313,7 +313,7 @@ HELLO HELLO MY a hello -set option sql_big_tables=0; +set big_tables=0; select distinct * from t1; t c b d NULL NULL NULL NULL diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result index ad7560fa3f8..ea21115a755 100644 --- a/mysql-test/r/type_date.result +++ b/mysql-test/r/type_date.result @@ -161,7 +161,7 @@ INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (NULL); SELECT str_to_date( '', a ) FROM t1; str_to_date( '', a ) -0000-00-00 00:00:00 +0000-00-00 00:00:00.000000 NULL DROP TABLE t1; CREATE TABLE t1 (a DATE, b INT, PRIMARY KEY (a,b)); @@ -349,21 +349,18 @@ Warnings: Warning 1292 Incorrect datetime value: '0' Warning 1292 Incorrect datetime value: '0' Warning 1292 Incorrect datetime value: '0' -SET @@timestamp=DEFAULT; # # MDEV-5041 Inserting a TIME with hour>24 into a DATETIME column produces a wrong value # SELECT CAST(TIME('-800:20:30') AS DATE); CAST(TIME('-800:20:30') AS DATE) -NULL -Warnings: -Warning 1292 Truncated incorrect date value: '-800:20:30' +2013-07-16 SELECT CAST(TIME('800:20:30') AS DATE); CAST(TIME('800:20:30') AS DATE) -0000-01-02 +2013-09-21 SELECT CAST(TIME('33 08:20:30') AS DATE); CAST(TIME('33 08:20:30') AS DATE) -0000-01-02 +2013-09-21 CREATE TABLE t1 (a DATE); INSERT INTO t1 VALUES (TIME('800:20:30')); Warnings: @@ -374,13 +371,13 @@ Note 1265 Data truncated for column 'a' at row 1 SET SQL_MODE=NO_ZERO_IN_DATE; INSERT INTO t1 VALUES (TIME('48:20:30')); Warnings: -Warning 1265 Data truncated for column 'a' at row 1 +Note 1265 Data truncated for column 'a' at row 1 SET SQL_MODE=DEFAULT; SELECT * FROM t1; a -0000-01-02 -0000-01-02 -0000-00-00 +2013-09-21 +2013-09-21 +2013-08-21 DROP TABLE t1; CREATE PROCEDURE test5041() BEGIN @@ -392,10 +389,11 @@ SELECT d; END;| call test5041(); d -0000-01-02 +2013-09-21 Warnings: Note 1265 Data truncated for column 'd' at row 1 drop procedure test5041; +SET @@timestamp=DEFAULT; # # End of 5.3 tests # @@ -478,3 +476,12 @@ LEAST(COALESCE(DATE(NULL), DATE(NULL)), COALESCE(DATE(NULL), DATE(NULL))) AS d0, LEAST(IFNULL(DATE(NULL), DATE(NULL)), IFNULL(DATE(NULL), DATE(NULL))) AS d1; d0 d1 NULL NULL +# +# MDEV-9511 Valgrind warnings 'Invalid read' in Field_newdate::cmp and Field_newdate::val_str +# +CREATE TABLE t1 (f1 DATE, f2 VARCHAR(1)); +INSERT INTO t1 VALUES ('2003-04-27','a'),('1900-01-01','a'); +SELECT GROUP_CONCAT(f2, IF(f1, f2, f1), f1 ORDER BY 2,1,3) FROM t1; +GROUP_CONCAT(f2, IF(f1, f2, f1), f1 ORDER BY 2,1,3) +aa1900-01-01,aa2003-04-27 +DROP TABLE t1; diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index 4a29acb3155..e033fe48607 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -627,12 +627,12 @@ SELECT CAST(CAST('2006-08-10 10:11:12.0123450' AS DATETIME(6)) AS DECIMAL(30,7)) CAST(CAST('2006-08-10 10:11:12.0123450' AS DATETIME(6)) AS DECIMAL(30,7)) 20060810101112.0123450 Warnings: -Warning 1292 Truncated incorrect datetime value: '2006-08-10 10:11:12.0123450' +Note 1292 Truncated incorrect datetime value: '2006-08-10 10:11:12.0123450' SELECT CAST(CAST('00000002006-000008-0000010 000010:0000011:00000012.0123450' AS DATETIME(6)) AS DECIMAL(30,7)); CAST(CAST('00000002006-000008-0000010 000010:0000011:00000012.0123450' AS DATETIME(6)) AS DECIMAL(30,7)) 20060810101112.0123450 Warnings: -Warning 1292 Truncated incorrect datetime value: '00000002006-000008-0000010 000010:0000011:00000012.0123450' +Note 1292 Truncated incorrect datetime value: '00000002006-000008-0000010 000010:0000011:00000012.0123450' SELECT CAST(CAST('00000002006-000008-0000010 000010:0000011:00000012.012345' AS DATETIME(6)) AS DECIMAL(30,7)); CAST(CAST('00000002006-000008-0000010 000010:0000011:00000012.012345' AS DATETIME(6)) AS DECIMAL(30,7)) 20060810101112.0123450 @@ -640,7 +640,7 @@ SELECT CAST(CAST('2008-07-29T10:42:51.1234567' AS DateTime(6)) AS DECIMAL(30,7)) CAST(CAST('2008-07-29T10:42:51.1234567' AS DateTime(6)) AS DECIMAL(30,7)) 20080729104251.1234560 Warnings: -Warning 1292 Truncated incorrect datetime value: '2008-07-29T10:42:51.1234567' +Note 1292 Truncated incorrect datetime value: '2008-07-29T10:42:51.1234567' # # Bug#59173: Failure to handle DATE(TIME) values where Year, Month or # Day is ZERO @@ -653,13 +653,15 @@ SELECT * FROM t1; dt1 DROP TABLE t1; End of 5.1 tests +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30'); create table t1 (d date, t time) engine=myisam; insert into t1 values ('2000-12-03','22:55:23'),('2008-05-03','10:19:31'); select case when d = '2012-12-12' then d else t end as cond, group_concat( d ) from t1 group by cond; cond group_concat( d ) -0000-00-00 10:19:31 2008-05-03 -0000-00-00 22:55:23 2000-12-03 +2001-01-01 10:19:31 2008-05-03 +2001-01-01 22:55:23 2000-12-03 drop table t1; +SET timestamp=DEFAULT; # # Semantics of the condition <non-nullable datetime field> IS NULL # when the field belongs to an inner table of an outer join @@ -687,30 +689,27 @@ Warning 1292 Incorrect datetime value: '2022-00-00 00:00:00' # # MDEV-5041 Inserting a TIME with hour>24 into a DATETIME column produces a wrong value # +SET @@timestamp=UNIX_TIMESTAMP('2013-08-19 20:30:00'); SELECT CAST(TIME('-800:20:30') AS DATETIME); CAST(TIME('-800:20:30') AS DATETIME) -NULL -Warnings: -Warning 1292 Truncated incorrect datetime value: '-800:20:30' +2013-07-16 15:39:30 SELECT CAST(TIME('800:20:30') AS DATETIME); CAST(TIME('800:20:30') AS DATETIME) -0000-01-02 08:20:30 +2013-09-21 08:20:30 SELECT CAST(TIME('33 08:20:30') AS DATETIME); CAST(TIME('33 08:20:30') AS DATETIME) -0000-01-02 08:20:30 +2013-09-21 08:20:30 CREATE TABLE t1 (a DATETIME); INSERT INTO t1 VALUES (TIME('800:20:30')); INSERT INTO t1 VALUES (TIME('33 08:20:30')); SET SQL_MODE=NO_ZERO_IN_DATE; INSERT INTO t1 VALUES (TIME('48:20:30')); -Warnings: -Warning 1265 Data truncated for column 'a' at row 1 SET SQL_MODE=DEFAULT; SELECT * FROM t1; a -0000-01-02 08:20:30 -0000-01-02 08:20:30 -0000-00-00 00:00:00 +2013-09-21 08:20:30 +2013-09-21 08:20:30 +2013-08-21 00:20:30 DROP TABLE t1; CREATE PROCEDURE test5041() BEGIN @@ -722,8 +721,9 @@ SELECT dt; END;| call test5041(); dt -0000-01-02 08:20:30 +2013-09-21 08:20:30 drop procedure test5041; +SET @@timestamp=DEFAULT; # # MDEV-6097 Inconsistent results for CAST(int,decimal,double AS DATETIME) # @@ -834,5 +834,13 @@ a b a b DEALLOCATE PREPARE stmt1; DROP TABLE t1,t2; # +# MDEV-9374 having '2015-01-01 01:00:00.000001' > coalesce(NULL) returns true +# +CREATE TABLE t1 (c1 DATETIME(0)); +INSERT INTO t1 VALUES (NULL); +SELECT * FROM t1 HAVING '2015-01-01 01:00:00.000001' > COALESCE(c1); +c1 +DROP TABLE t1; +# # End of 5.5 tests # diff --git a/mysql-test/r/type_datetime_hires.result b/mysql-test/r/type_datetime_hires.result index 203e45b86cb..61c8001d98e 100644 --- a/mysql-test/r/type_datetime_hires.result +++ b/mysql-test/r/type_datetime_hires.result @@ -1,3 +1,4 @@ +SET timestamp=UNIX_TIMESTAMP('2001-02-03 10:20:30'); drop table if exists t1, t2, t3; create table t1 (a datetime(7)); ERROR 42000: Too big precision 7 specified for 'a'. Maximum is 6. @@ -197,7 +198,7 @@ bigint_f5_datetime 20101112111417 varchar_f6_datetime 2010-11-12 11:14:17.765432 alter table t1 modify time4_f0_datetime datetime(0), modify datetime3_f1_datetime datetime(1), modify date_f2_datetime datetime(2), modify double_f3_datetime datetime(3), modify decimal5_f4_datetime datetime(4), modify bigint_f5_datetime datetime(5), modify varchar_f6_datetime datetime(6); select * from t1; -time4_f0_datetime 0000-00-00 11:14:17 +time4_f0_datetime 2001-02-03 11:14:17 datetime3_f1_datetime 2010-11-12 11:14:17.7 date_f2_datetime 2010-11-12 00:00:00.00 double_f3_datetime 2010-11-12 11:14:17.766 @@ -207,7 +208,7 @@ varchar_f6_datetime 2010-11-12 11:14:17.765432 delete from t1; insert t1 select * from t2; select * from t1; -time4_f0_datetime 0000-00-00 11:14:17 +time4_f0_datetime 2001-02-03 11:14:17 datetime3_f1_datetime 2010-11-12 11:14:17.7 date_f2_datetime 2010-11-12 00:00:00.00 double_f3_datetime 2010-11-12 11:14:17.765 @@ -262,6 +263,7 @@ a b 2011-01-02 03:04:06.234500 2011-01-02 03:04:06.234561 drop view v1; drop table t1, t2; +SET timestamp=DEFAULT; CREATE TABLE t1 ( taken datetime(5) NOT NULL DEFAULT '0000-00-00 00:00:00', id int(11) NOT NULL DEFAULT '0', diff --git a/mysql-test/r/type_enum.result b/mysql-test/r/type_enum.result index d373d14c089..dd9277517d8 100644 --- a/mysql-test/r/type_enum.result +++ b/mysql-test/r/type_enum.result @@ -1869,3 +1869,216 @@ AVG(f1) 1.5000 drop table t1; End of 5.3 tests +# +# Start of 10.0 tests +# +# +# MDEV-6950 Bad results with joins comparing DATE/DATETIME and INT/ENUM/VARCHAR columns +# +CREATE TABLE t1 (c1 DATE PRIMARY KEY); +INSERT INTO t1 VALUES ('2001-01-01'); +CREATE TABLE t2 (c1 ENUM('2001-01-01','2001/01/01')); +INSERT INTO t2 VALUES ('2001-01-01'); +INSERT INTO t2 VALUES ('2001/01/01'); +SELECT t1.* FROM t1,t2 WHERE t1.c1=t2.c1; +c1 +2001-01-01 +2001-01-01 +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1=t2.c1; +c1 +2001-01-01 +2001-01-01 +ALTER TABLE t2 ADD PRIMARY KEY(c1); +SELECT t1.* FROM t1,t2 WHERE t1.c1=t2.c1; +c1 +2001-01-01 +2001-01-01 +EXPLAIN SELECT t1.* FROM t1,t2 WHERE t1.c1=t2.c1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system PRIMARY NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 1 NULL 2 Using where; Using index +SELECT t1.* FROM t1 LEFT JOIN t2 USING (c1); +c1 +2001-01-01 +2001-01-01 +# t2 should NOT be eliminated +EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 USING (c1); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 1 NULL 2 Using where; Using index +DROP TABLE t1, t2; +# +# MDEV-6978 Bad results with join comparing case insensitive VARCHAR/ENUM/SET expression to a _bin ENUM column +# +CREATE TABLE t1 (c1 ENUM('a') CHARACTER SET latin1 PRIMARY KEY); +INSERT INTO t1 VALUES ('a'); +CREATE TABLE t2 (c1 ENUM('a','A') CHARACTER SET latin1 COLLATE latin1_bin); +INSERT INTO t2 VALUES ('a'),('A'); +SELECT t1.* FROM t1 JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +ALTER TABLE t2 ADD PRIMARY KEY(c1); +SELECT t1.* FROM t1 JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +# t2 should NOT be eliminated +EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 1 NULL 2 Using where; Using index +DROP TABLE IF EXISTS t1,t2; +CREATE TABLE t1 (c1 SET('a') CHARACTER SET latin1 PRIMARY KEY); +INSERT INTO t1 VALUES ('a'); +CREATE TABLE t2 (c1 ENUM('a','A') CHARACTER SET latin1 COLLATE latin1_bin); +INSERT INTO t2 VALUES ('a'),('A'); +SELECT t1.* FROM t1 JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +ALTER TABLE t2 ADD PRIMARY KEY(c1); +SELECT t1.* FROM t1 JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +# t2 should NOT be eliminated +EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 1 NULL 2 Using where; Using index +DROP TABLE IF EXISTS t1,t2; +CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET latin1 PRIMARY KEY); +INSERT INTO t1 VALUES ('a'); +CREATE TABLE t2 (c1 ENUM('a','A') CHARACTER SET latin1 COLLATE latin1_bin); +INSERT INTO t2 VALUES ('a'),('A'); +SELECT t1.* FROM t1 JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +ALTER TABLE t2 ADD PRIMARY KEY(c1); +SELECT t1.* FROM t1 JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +# t2 should NOT be eliminated +EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 1 NULL 2 Using where; Using index +DROP TABLE IF EXISTS t1,t2; +# +# MDEV-6991 GROUP_MIN_MAX optimization is erroneously applied in some cases +# +CREATE TABLE t1 (id INT NOT NULL, a ENUM('04','03','02','01')) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,'01'); +INSERT INTO t1 VALUES (1,'02'); +INSERT INTO t1 VALUES (1,'03'); +INSERT INTO t1 VALUES (1,'04'); +INSERT INTO t1 VALUES (2,'01'); +INSERT INTO t1 VALUES (2,'02'); +INSERT INTO t1 VALUES (2,'03'); +INSERT INTO t1 VALUES (2,'04'); +INSERT INTO t1 VALUES (3,'01'); +INSERT INTO t1 VALUES (3,'02'); +INSERT INTO t1 VALUES (3,'03'); +INSERT INTO t1 VALUES (3,'04'); +INSERT INTO t1 VALUES (4,'01'); +INSERT INTO t1 VALUES (4,'02'); +INSERT INTO t1 VALUES (4,'03'); +INSERT INTO t1 VALUES (4,'04'); +SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>='02' GROUP BY id; +id MIN(a) MAX(a) +1 02 04 +2 02 04 +3 02 04 +4 02 04 +SELECT id,MIN(a),MAX(a) FROM t1 WHERE a<=3 GROUP BY id; +id MIN(a) MAX(a) +1 02 04 +2 02 04 +3 02 04 +4 02 04 +ALTER TABLE t1 ADD KEY(id,a); +SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>='02' GROUP BY id; +id MIN(a) MAX(a) +1 02 04 +2 02 04 +3 02 04 +4 02 04 +# Should NOT use group_min_max optimization +EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>='02' GROUP BY id; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL id 6 NULL 16 Using where; Using index +SELECT id,MIN(a),MAX(a) FROM t1 WHERE a<=3 GROUP BY id; +id MIN(a) MAX(a) +1 02 04 +2 02 04 +3 02 04 +4 02 04 +# Should NOT use group_min_max optimization +EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a<=3 GROUP BY id; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL id 6 NULL 16 Using where; Using index +DROP TABLE t1; +# +# MDEV-6993 Bad results with join comparing DECIMAL and ENUM/SET columns +# +CREATE TABLE t1 (c1 DECIMAL(10,1) PRIMARY KEY); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (c1 ENUM('a','b')); +INSERT INTO t2 VALUES ('a'),('b'); +SELECT t1.* FROM t1 NATURAL JOIN t2; +c1 +1.0 +2.0 +ALTER TABLE t2 ADD PRIMARY KEY(c1); +SELECT t1.* FROM t1 NATURAL JOIN t2; +c1 +1.0 +2.0 +SELECT t1.* FROM t1 LEFT OUTER JOIN t2 USING (c1); +c1 +1.0 +2.0 +DROP TABLE t1,t2; +CREATE TABLE t1 (a DECIMAL(10,1), b ENUM('1','2')); +INSERT INTO t1 (a) VALUES (1),(2); +UPDATE t1 SET b=a; +SELECT * FROM t1; +a b +1.0 1 +2.0 2 +ALTER TABLE t1 MODIFY a ENUM('1','2'); +SELECT * FROM t1; +a b +1 1 +2 2 +DROP TABLE t1; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index f41c2e7688b..57e2660750b 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -447,3 +447,88 @@ End of 5.0 tests select format(truncate('1.7976931348623157E+308',-12),1,'fr_BE') as foo; foo 0 +# +# Bug #13500371 63704: CONVERSION OF '1.' TO A NUMBER GIVES ERROR 1265 +# (WARN_DATA_TRUNCATED) +# +CREATE TABLE t1 (f FLOAT); +INSERT INTO t1 VALUES ('1.'); +INSERT INTO t1 VALUES ('2.0.'); +Warnings: +Warning 1265 Data truncated for column 'f' at row 1 +INSERT INTO t1 VALUES ('.'); +Warnings: +Warning 1265 Data truncated for column 'f' at row 1 +SELECT * FROM t1 ORDER BY f; +f +0 +1 +2 +DROP TABLE t1; +# +# Start of 10.0 tests +# +# +# MDEV-6950 Bad results with joins comparing DATE/DATETIME and INT/DECIMAL/DOUBLE/ENUM/VARCHAR columns +# +CREATE TABLE t1 (a DATETIME PRIMARY KEY); +INSERT INTO t1 VALUES ('1999-01-01 00:00:00'); +CREATE TABLE t2 (a DOUBLE); +INSERT INTO t2 VALUES (19990101000000); +INSERT INTO t2 VALUES (990101000000); +SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a; +a +1999-01-01 00:00:00 +1999-01-01 00:00:00 +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a; +a +1999-01-01 00:00:00 +1999-01-01 00:00:00 +ALTER TABLE t2 ADD PRIMARY KEY(a); +SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a; +a +1999-01-01 00:00:00 +1999-01-01 00:00:00 +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a; +a +1999-01-01 00:00:00 +1999-01-01 00:00:00 +# t2 should NOT be eliminated +EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 8 NULL 2 Using where; Using index +DROP TABLE t1,t2; +# +# MDEV-6971 Bad results with joins comparing TIME and DOUBLE/DECIMAL columns +# +CREATE TABLE t1 (a TIME(6) PRIMARY KEY); +INSERT INTO t1 VALUES ('10:20:30'); +CREATE TABLE t2 (a DOUBLE); +INSERT INTO t2 VALUES (102030),(102030.000000001); +SELECT t1.* FROM t1 JOIN t2 USING(a); +a +10:20:30.000000 +10:20:30.000000 +SELECT t1.* FROM t1 LEFT JOIN t2 USING(a); +a +10:20:30.000000 +10:20:30.000000 +ALTER TABLE t2 ADD PRIMARY KEY(a); +SELECT t1.* FROM t1 JOIN t2 USING(a); +a +10:20:30.000000 +10:20:30.000000 +SELECT t1.* FROM t1 LEFT JOIN t2 USING(a); +a +10:20:30.000000 +10:20:30.000000 +# t2 should NOT be elimitated +EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 USING(a); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 8 NULL 2 Using where; Using index +DROP TABLE t1,t2; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index 3cd5028f858..ab075d29e22 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -680,7 +680,7 @@ select 0.8 = 0.7 + 0.1; 1 drop table if exists t1; Warnings: -Note 1051 Unknown table 't1' +Note 1051 Unknown table 'test.t1' create table t1 (col1 decimal(38)); insert into t1 values (12345678901234567890123456789012345678); select * from t1; @@ -1997,3 +1997,84 @@ select 0.0000000001 mod 1; select 0.01 mod 1; 0.01 mod 1 0.01 +# +# Start of 10.0 tests +# +# +# MDEV-6950 Bad results with joins comparing DATE and INT/ENUM/VARCHAR columns +# +CREATE TABLE t1 (a DATETIME PRIMARY KEY); +INSERT INTO t1 VALUES ('1999-01-01 00:00:00'); +CREATE TABLE t2 (a DECIMAL(30,1)); +INSERT INTO t2 VALUES (19990101000000); +INSERT INTO t2 VALUES (990101000000); +SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a; +a +1999-01-01 00:00:00 +1999-01-01 00:00:00 +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a; +a +1999-01-01 00:00:00 +1999-01-01 00:00:00 +ALTER TABLE t2 ADD PRIMARY KEY(a); +SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a; +a +1999-01-01 00:00:00 +1999-01-01 00:00:00 +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a; +a +1999-01-01 00:00:00 +1999-01-01 00:00:00 +# t2 should NOT be eliminated +EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 14 NULL 2 Using where; Using index +DROP TABLE t1,t2; +# +# MDEV-6971 Bad results with joins comparing TIME and DOUBLE/DECIMAL columns +# +CREATE TABLE t1 (a TIME(6) PRIMARY KEY); +INSERT INTO t1 VALUES ('10:20:30'); +CREATE TABLE t2 (a DECIMAL(30,10)); +INSERT INTO t2 VALUES (102030),(102030.000000001); +SELECT t1.* FROM t1 JOIN t2 USING(a); +a +10:20:30.000000 +10:20:30.000000 +Warnings: +Note 1292 Truncated incorrect time value: '102030.0000000000' +Note 1292 Truncated incorrect time value: '102030.0000000010' +SELECT t1.* FROM t1 LEFT JOIN t2 USING(a); +a +10:20:30.000000 +10:20:30.000000 +Warnings: +Note 1292 Truncated incorrect time value: '102030.0000000000' +Note 1292 Truncated incorrect time value: '102030.0000000000' +Note 1292 Truncated incorrect time value: '102030.0000000010' +ALTER TABLE t2 ADD PRIMARY KEY(a); +SELECT t1.* FROM t1 JOIN t2 USING(a); +a +10:20:30.000000 +10:20:30.000000 +Warnings: +Note 1292 Truncated incorrect time value: '102030.0000000000' +Note 1292 Truncated incorrect time value: '102030.0000000010' +SELECT t1.* FROM t1 LEFT JOIN t2 USING(a); +a +10:20:30.000000 +10:20:30.000000 +Warnings: +Note 1292 Truncated incorrect time value: '102030.0000000000' +Note 1292 Truncated incorrect time value: '102030.0000000000' +Note 1292 Truncated incorrect time value: '102030.0000000010' +# t2 should NOT be eliminated +EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 USING(a); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 14 NULL 2 Using where; Using index +DROP TABLE t1,t2; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result index d99c2363d62..ad52ab5da7d 100644 --- a/mysql-test/r/type_ranges.result +++ b/mysql-test/r/type_ranges.result @@ -85,7 +85,11 @@ t1 1 options 1 options A NULL NULL NULL BTREE t1 1 options 2 flags A NULL NULL NULL BTREE CREATE UNIQUE INDEX test on t1 ( auto ) ; CREATE INDEX test2 on t1 ( ulonglong,ulong) ; +Warnings: +Note 1831 Duplicate index `test2`. This is deprecated and will be disallowed in a future release. CREATE INDEX test3 on t1 ( medium ) ; +Warnings: +Note 1831 Duplicate index `test3`. This is deprecated and will be disallowed in a future release. DROP INDEX test ON t1; insert into t1 values (10, 1,1,1,1,1,1,1,1,1,1,1,1,1,NULL,0,0,0,1,1,1,1,'one','one'); insert into t1 values (NULL,2,2,2,2,2,2,2,2,2,2,2,2,2,NULL,NULL,NULL,NULL,NULL,NULL,2,2,'two','two,one'); @@ -251,7 +255,7 @@ ushort smallint(5) unsigned zerofill NULL NO 00000 # umedium mediumint(8) unsigned NULL NO 0 # ulong int(11) unsigned NULL NO 0 # ulonglong bigint(13) unsigned NULL NO 0 # -time_stamp timestamp NULL NO 0000-00-00 00:00:00 # +time_stamp timestamp NULL NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP # date_field char(10) latin1_swedish_ci YES NULL # time_field time NULL YES NULL # date_time datetime NULL YES NULL # @@ -303,6 +307,8 @@ c2 int(11) NULL YES NULL # const int(1) NULL NO 0 # drop table t1,t2,t3; create table t1 ( myfield INT NOT NULL, UNIQUE INDEX (myfield), unique (myfield), index(myfield)); +Warnings: +Note 1831 Duplicate index `myfield_2`. This is deprecated and will be disallowed in a future release. drop table t1; create table t1 ( id integer unsigned not null primary key ); create table t2 ( id integer unsigned not null primary key ); diff --git a/mysql-test/r/type_set.result b/mysql-test/r/type_set.result index 09531ec60d5..f3b7019c989 100644 --- a/mysql-test/r/type_set.result +++ b/mysql-test/r/type_set.result @@ -104,3 +104,162 @@ INSERT INTO t1 ( set_unique_utf8 ) VALUES ( '' ); ERROR 23000: Duplicate entry '' for key 'set_unique_utf8' DROP TABLE t1; End of 5.0 tests +# +# Start of 10.0 tests +# +# +# MDEV-6950 Bad results with joins compating DATE and INT/ENUM/VARCHAR columns +# +CREATE TABLE t1 (c1 DATE PRIMARY KEY); +INSERT INTO t1 VALUES ('2001-01-01'); +CREATE TABLE t2 (c1 SET('2001-01-01','2001/01/01')); +INSERT INTO t2 VALUES ('2001-01-01'); +INSERT INTO t2 VALUES ('2001/01/01'); +SELECT t1.* FROM t1,t2 WHERE t1.c1=t2.c1; +c1 +2001-01-01 +2001-01-01 +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1=t2.c1; +c1 +2001-01-01 +2001-01-01 +ALTER TABLE t2 ADD PRIMARY KEY(c1); +SELECT t1.* FROM t1,t2 WHERE t1.c1=t2.c1; +c1 +2001-01-01 +2001-01-01 +EXPLAIN SELECT t1.* FROM t1,t2 WHERE t1.c1=t2.c1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system PRIMARY NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 1 NULL 2 Using where; Using index +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1=t2.c1; +c1 +2001-01-01 +2001-01-01 +# t2 should NOT be eliminated +EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1=t2.c1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 1 NULL 2 Using where; Using index +DROP TABLE t1, t2; +# +# MDEV-6978 Bad results with join comparing case insensitive VARCHAR/ENUM/SET expression to a _bin ENUM column +# +CREATE TABLE t1 (c1 ENUM('a') CHARACTER SET latin1 PRIMARY KEY); +INSERT INTO t1 VALUES ('a'); +CREATE TABLE t2 (c1 SET('a','A') CHARACTER SET latin1 COLLATE latin1_bin); +INSERT INTO t2 VALUES ('a'),('A'); +SELECT t1.* FROM t1 JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +ALTER TABLE t2 ADD PRIMARY KEY(c1); +SELECT t1.* FROM t1 JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +# t2 should NOT be eliminated +EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 1 NULL 2 Using where; Using index +DROP TABLE IF EXISTS t1,t2; +CREATE TABLE t1 (c1 SET('a') CHARACTER SET latin1 PRIMARY KEY); +INSERT INTO t1 VALUES ('a'); +CREATE TABLE t2 (c1 SET('a','A') CHARACTER SET latin1 COLLATE latin1_bin); +INSERT INTO t2 VALUES ('a'),('A'); +SELECT t1.* FROM t1 JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +ALTER TABLE t2 ADD PRIMARY KEY(c1); +SELECT t1.* FROM t1 JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +# t2 should NOT be eliminated +EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 1 NULL 2 Using where; Using index +DROP TABLE IF EXISTS t1,t2; +CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET latin1 PRIMARY KEY); +INSERT INTO t1 VALUES ('a'); +CREATE TABLE t2 (c1 SET('a','A') CHARACTER SET latin1 COLLATE latin1_bin); +INSERT INTO t2 VALUES ('a'),('A'); +SELECT t1.* FROM t1 JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +ALTER TABLE t2 ADD PRIMARY KEY(c1); +SELECT t1.* FROM t1 JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +c1 +a +a +# t2 should NOT be eliminated +EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 1 NULL 2 Using where; Using index +DROP TABLE IF EXISTS t1,t2; +# +# MDEV-6993 Bad results with join comparing DECIMAL and ENUM/SET columns +# +CREATE TABLE t1 (c1 DECIMAL(10,1) PRIMARY KEY); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (c1 SET('a','b')); +INSERT INTO t2 VALUES ('a'),('b'); +SELECT t1.* FROM t1 NATURAL JOIN t2; +c1 +1.0 +2.0 +ALTER TABLE t2 ADD PRIMARY KEY(c1); +SELECT t1.* FROM t1 NATURAL JOIN t2; +c1 +1.0 +2.0 +SELECT t1.* FROM t1 LEFT OUTER JOIN t2 USING (c1); +c1 +1.0 +2.0 +DROP TABLE t1,t2; +CREATE TABLE t1 (a DECIMAL(10,1), b SET('1','2')); +INSERT INTO t1 (a) VALUES (1),(2); +UPDATE t1 SET b=a; +SELECT * FROM t1; +a b +1.0 1 +2.0 2 +ALTER TABLE t1 MODIFY a SET('1','2'); +SELECT * FROM t1; +a b +1 1 +2 2 +DROP TABLE t1; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/type_temporal_mysql56.result b/mysql-test/r/type_temporal_mysql56.result new file mode 100644 index 00000000000..b0c81844781 --- /dev/null +++ b/mysql-test/r/type_temporal_mysql56.result @@ -0,0 +1,89 @@ +SHOW CREATE TABLE mysql56time; +Table Create Table +mysql56time CREATE TABLE `mysql56time` ( + `t0` time DEFAULT NULL, + `t1` time(1) DEFAULT NULL, + `t2` time(2) DEFAULT NULL, + `t3` time(3) DEFAULT NULL, + `t4` time(4) DEFAULT NULL, + `t5` time(5) DEFAULT NULL, + `t6` time(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM mysql56time; +t0 838:59:59 +t1 838:59:59.0 +t2 838:59:59.00 +t3 838:59:59.000 +t4 838:59:59.0000 +t5 838:59:59.00000 +t6 838:59:59.000000 +t0 00:00:00 +t1 00:00:00.0 +t2 00:00:00.00 +t3 00:00:00.000 +t4 00:00:00.0000 +t5 00:00:00.00000 +t6 00:00:00.000000 +t0 -838:59:59 +t1 -838:59:59.0 +t2 -838:59:59.00 +t3 -838:59:59.000 +t4 -838:59:59.0000 +t5 -838:59:59.00000 +t6 -838:59:59.000000 +DROP TABLE mysql56time; +SHOW CREATE TABLE mysql56datetime; +Table Create Table +mysql56datetime CREATE TABLE `mysql56datetime` ( + `dt0` datetime DEFAULT NULL, + `dt1` datetime(1) DEFAULT NULL, + `dt2` datetime(2) DEFAULT NULL, + `dt3` datetime(3) DEFAULT NULL, + `dt4` datetime(4) DEFAULT NULL, + `dt5` datetime(5) DEFAULT NULL, + `dt6` datetime(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM mysql56datetime; +dt0 0000-00-00 00:00:00 +dt1 0000-00-00 00:00:00.0 +dt2 0000-00-00 00:00:00.00 +dt3 0000-00-00 00:00:00.000 +dt4 0000-00-00 00:00:00.0000 +dt5 0000-00-00 00:00:00.00000 +dt6 0000-00-00 00:00:00.000000 +dt0 9999-12-31 23:59:59 +dt1 9999-12-31 23:59:59.9 +dt2 9999-12-31 23:59:59.99 +dt3 9999-12-31 23:59:59.999 +dt4 9999-12-31 23:59:59.9999 +dt5 9999-12-31 23:59:59.99999 +dt6 9999-12-31 23:59:59.999999 +DROP TABLE mysql56datetime; +SET TIME_ZONE='+00:00'; +SHOW CREATE TABLE mysql56timestamp; +Table Create Table +mysql56timestamp CREATE TABLE `mysql56timestamp` ( + `ts0` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `ts1` timestamp(1) NOT NULL DEFAULT '0000-00-00 00:00:00.0', + `ts2` timestamp(2) NOT NULL DEFAULT '0000-00-00 00:00:00.00', + `ts3` timestamp(3) NOT NULL DEFAULT '0000-00-00 00:00:00.000', + `ts4` timestamp(4) NOT NULL DEFAULT '0000-00-00 00:00:00.0000', + `ts5` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000', + `ts6` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM mysql56timestamp; +ts0 1970-01-01 00:00:01 +ts1 1970-01-01 00:00:01.0 +ts2 1970-01-01 00:00:01.00 +ts3 1970-01-01 00:00:01.000 +ts4 1970-01-01 00:00:01.0000 +ts5 1970-01-01 00:00:01.00000 +ts6 1970-01-01 00:00:01.000000 +ts0 2038-01-19 03:14:07 +ts1 2038-01-19 03:14:07.9 +ts2 2038-01-19 03:14:07.99 +ts3 2038-01-19 03:14:07.999 +ts4 2038-01-19 03:14:07.9999 +ts5 2038-01-19 03:14:07.99999 +ts6 2038-01-19 03:14:07.999999 +DROP TABLE mysql56timestamp; diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result index 07e59099e4b..477703edebb 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -144,12 +144,14 @@ End of 5.0 tests # # Bug#53942 valgrind warnings with timestamp() function and incomplete datetime values # +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); CREATE TABLE t1(f1 TIME); INSERT INTO t1 VALUES ('23:38:57'); SELECT TIMESTAMP(f1,'1') FROM t1; TIMESTAMP(f1,'1') -NULL +2001-02-03 23:38:58 DROP TABLE t1; +SET timestamp=DEFAULT; End of 5.1 tests create table t1 (a time); insert t1 values (-131415); @@ -161,12 +163,26 @@ create table t1 (f1 time , f2 varchar(5), key(f1)); insert into t1 values ('00:20:01','a'),('00:20:03','b'); select * from t1 force key (f1) where f1 < curdate(); f1 f2 +select * from t1 ignore key (f1) where f1 < curdate(); +f1 f2 +select * from t1 force key (f1) where f1 > curdate(); +f1 f2 00:20:01 a 00:20:03 b -select * from t1 ignore key (f1) where f1 < curdate(); +select * from t1 ignore key (f1) where f1 > curdate(); f1 f2 00:20:01 a 00:20:03 b +delete from t1; +insert into t1 values ('-00:20:01','a'),('-00:20:03','b'); +select * from t1 force key (f1) where f1 < curdate(); +f1 f2 +-00:20:01 a +-00:20:03 b +select * from t1 ignore key (f1) where f1 < curdate(); +f1 f2 +-00:20:01 a +-00:20:03 b drop table t1; create table t1(f1 time); insert into t1 values ('23:38:57'); @@ -177,11 +193,11 @@ drop table t1; # # MDEV-4634 Crash in CONVERT_TZ # +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); SELECT CONVERT_TZ(GREATEST(TIME('00:00:00'),TIME('00:00:00')),'+00:00','+7:5'); CONVERT_TZ(GREATEST(TIME('00:00:00'),TIME('00:00:00')),'+00:00','+7:5') -NULL -Warnings: -Warning 1292 Incorrect datetime value: '00:00:00' +2001-02-03 07:05:00 +SET timestamp=DEFAULT; # # MDEV-4652 Wrong result for CONCAT(GREATEST(TIME('00:00:01'),TIME('00:00:00'))) # @@ -317,7 +333,7 @@ SELECT TIME'00:00:00'> CAST(0xFFFFFFFF00000000 AS UNSIGNED); TIME'00:00:00'> CAST(0xFFFFFFFF00000000 AS UNSIGNED) 0 Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '00:00:00' +Warning 1292 Truncated incorrect time value: '18446744069414584320' # # MDEV-6100 No warning on CAST(9000000 AS TIME) # @@ -363,3 +379,17 @@ DROP TABLE t1; # # End of 5.5 tests # +# +# Start of 10.0 tests +# +# +# MDEV-6102 Comparison between TIME and DATETIME does not use CURRENT_DATE +# +SET timestamp=UNIX_TIMESTAMP('2014-04-14 01:02:03'); +SELECT CAST(TIME'10:20:30' AS DATETIME), TIME'10:20:30'=TIMESTAMP'2014-04-14 10:20:30' AS cmp; +CAST(TIME'10:20:30' AS DATETIME) cmp +2014-04-14 10:20:30 1 +SET timestamp=DEFAULT; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/type_time_6065.result b/mysql-test/r/type_time_6065.result new file mode 100644 index 00000000000..db3efc3bcbb --- /dev/null +++ b/mysql-test/r/type_time_6065.result @@ -0,0 +1,2310 @@ +SET TIMESTAMP=UNIX_TIMESTAMP('2012-01-31 10:14:35'); +CREATE TABLE t1 (col_time_key TIME, KEY(col_time_key)); +INSERT INTO t1 VALUES ('00:00:00'),('-24:00:00'),('-48:00:00'),('24:00:00'),('48:00:00'); +CREATE TABLE t2 (col_datetime_key DATETIME, KEY(col_datetime_key)); +INSERT INTO t2 SELECT * FROM t1; +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key = col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key = col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-31 00:00:00 +24:00:00 2012-02-01 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key = col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key = col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-31 00:00:00 +24:00:00 2012-02-01 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key = col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where +1 SIMPLE t2 ref col_datetime_key col_datetime_key 9 test.t1.col_time_key 1 100.00 Using where; Using index +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key = col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-31 00:00:00 +24:00:00 2012-02-01 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key = col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where +1 SIMPLE t2 ref col_datetime_key col_datetime_key 9 test.t1.col_time_key 1 100.00 Using where; Using index +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key = col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-31 00:00:00 +24:00:00 2012-02-01 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key = col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key = col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-31 00:00:00 +24:00:00 2012-02-01 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key = col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key = col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-31 00:00:00 +24:00:00 2012-02-01 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key = col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using where; Using index +1 SIMPLE t2 ref col_datetime_key col_datetime_key 9 test.t1.col_time_key 1 100.00 Using where; Using index +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key = col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-31 00:00:00 +24:00:00 2012-02-01 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key = col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using where; Using index +1 SIMPLE t2 ref col_datetime_key col_datetime_key 9 test.t1.col_time_key 1 100.00 Using where; Using index +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key = col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-31 00:00:00 +24:00:00 2012-02-01 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key = col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key = col_datetime_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-31 00:00:00 00:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key = col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key = col_time_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-31 00:00:00 00:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key = col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where +1 SIMPLE t1 ref col_time_key col_time_key 4 test.t2.col_datetime_key 2 100.00 Using where; Using index +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key = col_datetime_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-31 00:00:00 00:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key = col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where +1 SIMPLE t1 ref col_time_key col_time_key 4 test.t2.col_datetime_key 2 100.00 Using where; Using index +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key = col_time_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-31 00:00:00 00:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key = col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key = col_datetime_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-31 00:00:00 00:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key = col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key = col_time_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-31 00:00:00 00:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key = col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t1 ref col_time_key col_time_key 4 test.t2.col_datetime_key 2 100.00 Using where; Using index +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key = col_datetime_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-31 00:00:00 00:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key = col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t1 ref col_time_key col_time_key 4 test.t2.col_datetime_key 2 100.00 Using where; Using index +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key = col_time_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-31 00:00:00 00:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key >= col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key >= col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-29 00:00:00 +-24:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-30 00:00:00 +00:00:00 2012-01-31 00:00:00 +24:00:00 2012-01-29 00:00:00 +24:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-31 00:00:00 +24:00:00 2012-02-01 00:00:00 +48:00:00 2012-01-29 00:00:00 +48:00:00 2012-01-30 00:00:00 +48:00:00 2012-01-31 00:00:00 +48:00:00 2012-02-01 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key >= col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key >= col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-30 00:00:00 +-24:00:00 2012-01-31 00:00:00 +-24:00:00 2012-02-01 00:00:00 +-24:00:00 2012-02-02 00:00:00 +-48:00:00 2012-01-29 00:00:00 +-48:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-31 00:00:00 +-48:00:00 2012-02-01 00:00:00 +-48:00:00 2012-02-02 00:00:00 +00:00:00 2012-01-31 00:00:00 +00:00:00 2012-02-01 00:00:00 +00:00:00 2012-02-02 00:00:00 +24:00:00 2012-02-01 00:00:00 +24:00:00 2012-02-02 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key >= col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key >= col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-29 00:00:00 +-24:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-30 00:00:00 +00:00:00 2012-01-31 00:00:00 +24:00:00 2012-01-29 00:00:00 +24:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-31 00:00:00 +24:00:00 2012-02-01 00:00:00 +48:00:00 2012-01-29 00:00:00 +48:00:00 2012-01-30 00:00:00 +48:00:00 2012-01-31 00:00:00 +48:00:00 2012-02-01 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key >= col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key >= col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-30 00:00:00 +-24:00:00 2012-01-31 00:00:00 +-24:00:00 2012-02-01 00:00:00 +-24:00:00 2012-02-02 00:00:00 +-48:00:00 2012-01-29 00:00:00 +-48:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-31 00:00:00 +-48:00:00 2012-02-01 00:00:00 +-48:00:00 2012-02-02 00:00:00 +00:00:00 2012-01-31 00:00:00 +00:00:00 2012-02-01 00:00:00 +00:00:00 2012-02-02 00:00:00 +24:00:00 2012-02-01 00:00:00 +24:00:00 2012-02-02 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key >= col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key >= col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-29 00:00:00 +-24:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-30 00:00:00 +00:00:00 2012-01-31 00:00:00 +24:00:00 2012-01-29 00:00:00 +24:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-31 00:00:00 +24:00:00 2012-02-01 00:00:00 +48:00:00 2012-01-29 00:00:00 +48:00:00 2012-01-30 00:00:00 +48:00:00 2012-01-31 00:00:00 +48:00:00 2012-02-01 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key >= col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key >= col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-30 00:00:00 +-24:00:00 2012-01-31 00:00:00 +-24:00:00 2012-02-01 00:00:00 +-24:00:00 2012-02-02 00:00:00 +-48:00:00 2012-01-29 00:00:00 +-48:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-31 00:00:00 +-48:00:00 2012-02-01 00:00:00 +-48:00:00 2012-02-02 00:00:00 +00:00:00 2012-01-31 00:00:00 +00:00:00 2012-02-01 00:00:00 +00:00:00 2012-02-02 00:00:00 +24:00:00 2012-02-01 00:00:00 +24:00:00 2012-02-02 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key >= col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key >= col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-29 00:00:00 +-24:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-30 00:00:00 +00:00:00 2012-01-31 00:00:00 +24:00:00 2012-01-29 00:00:00 +24:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-31 00:00:00 +24:00:00 2012-02-01 00:00:00 +48:00:00 2012-01-29 00:00:00 +48:00:00 2012-01-30 00:00:00 +48:00:00 2012-01-31 00:00:00 +48:00:00 2012-02-01 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key >= col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key >= col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-30 00:00:00 +-24:00:00 2012-01-31 00:00:00 +-24:00:00 2012-02-01 00:00:00 +-24:00:00 2012-02-02 00:00:00 +-48:00:00 2012-01-29 00:00:00 +-48:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-31 00:00:00 +-48:00:00 2012-02-01 00:00:00 +-48:00:00 2012-02-02 00:00:00 +00:00:00 2012-01-31 00:00:00 +00:00:00 2012-02-01 00:00:00 +00:00:00 2012-02-02 00:00:00 +24:00:00 2012-02-01 00:00:00 +24:00:00 2012-02-02 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key >= col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key >= col_datetime_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -24:00:00 +2012-01-29 00:00:00 -48:00:00 +2012-01-29 00:00:00 00:00:00 +2012-01-29 00:00:00 24:00:00 +2012-01-29 00:00:00 48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-30 00:00:00 00:00:00 +2012-01-30 00:00:00 24:00:00 +2012-01-30 00:00:00 48:00:00 +2012-01-31 00:00:00 00:00:00 +2012-01-31 00:00:00 24:00:00 +2012-01-31 00:00:00 48:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-01 00:00:00 48:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key >= col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key >= col_time_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-30 00:00:00 -48:00:00 +2012-01-31 00:00:00 -24:00:00 +2012-01-31 00:00:00 -48:00:00 +2012-01-31 00:00:00 00:00:00 +2012-02-01 00:00:00 -24:00:00 +2012-02-01 00:00:00 -48:00:00 +2012-02-01 00:00:00 00:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-02 00:00:00 -24:00:00 +2012-02-02 00:00:00 -48:00:00 +2012-02-02 00:00:00 00:00:00 +2012-02-02 00:00:00 24:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key >= col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key >= col_datetime_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -24:00:00 +2012-01-29 00:00:00 -48:00:00 +2012-01-29 00:00:00 00:00:00 +2012-01-29 00:00:00 24:00:00 +2012-01-29 00:00:00 48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-30 00:00:00 00:00:00 +2012-01-30 00:00:00 24:00:00 +2012-01-30 00:00:00 48:00:00 +2012-01-31 00:00:00 00:00:00 +2012-01-31 00:00:00 24:00:00 +2012-01-31 00:00:00 48:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-01 00:00:00 48:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key >= col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key >= col_time_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-30 00:00:00 -48:00:00 +2012-01-31 00:00:00 -24:00:00 +2012-01-31 00:00:00 -48:00:00 +2012-01-31 00:00:00 00:00:00 +2012-02-01 00:00:00 -24:00:00 +2012-02-01 00:00:00 -48:00:00 +2012-02-01 00:00:00 00:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-02 00:00:00 -24:00:00 +2012-02-02 00:00:00 -48:00:00 +2012-02-02 00:00:00 00:00:00 +2012-02-02 00:00:00 24:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key >= col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key >= col_datetime_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -24:00:00 +2012-01-29 00:00:00 -48:00:00 +2012-01-29 00:00:00 00:00:00 +2012-01-29 00:00:00 24:00:00 +2012-01-29 00:00:00 48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-30 00:00:00 00:00:00 +2012-01-30 00:00:00 24:00:00 +2012-01-30 00:00:00 48:00:00 +2012-01-31 00:00:00 00:00:00 +2012-01-31 00:00:00 24:00:00 +2012-01-31 00:00:00 48:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-01 00:00:00 48:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key >= col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key >= col_time_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-30 00:00:00 -48:00:00 +2012-01-31 00:00:00 -24:00:00 +2012-01-31 00:00:00 -48:00:00 +2012-01-31 00:00:00 00:00:00 +2012-02-01 00:00:00 -24:00:00 +2012-02-01 00:00:00 -48:00:00 +2012-02-01 00:00:00 00:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-02 00:00:00 -24:00:00 +2012-02-02 00:00:00 -48:00:00 +2012-02-02 00:00:00 00:00:00 +2012-02-02 00:00:00 24:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key >= col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key >= col_datetime_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -24:00:00 +2012-01-29 00:00:00 -48:00:00 +2012-01-29 00:00:00 00:00:00 +2012-01-29 00:00:00 24:00:00 +2012-01-29 00:00:00 48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-30 00:00:00 00:00:00 +2012-01-30 00:00:00 24:00:00 +2012-01-30 00:00:00 48:00:00 +2012-01-31 00:00:00 00:00:00 +2012-01-31 00:00:00 24:00:00 +2012-01-31 00:00:00 48:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-01 00:00:00 48:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key >= col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key >= col_time_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-30 00:00:00 -48:00:00 +2012-01-31 00:00:00 -24:00:00 +2012-01-31 00:00:00 -48:00:00 +2012-01-31 00:00:00 00:00:00 +2012-02-01 00:00:00 -24:00:00 +2012-02-01 00:00:00 -48:00:00 +2012-02-01 00:00:00 00:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-02 00:00:00 -24:00:00 +2012-02-02 00:00:00 -48:00:00 +2012-02-02 00:00:00 00:00:00 +2012-02-02 00:00:00 24:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key > col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key > col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-29 00:00:00 +24:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-31 00:00:00 +48:00:00 2012-01-29 00:00:00 +48:00:00 2012-01-30 00:00:00 +48:00:00 2012-01-31 00:00:00 +48:00:00 2012-02-01 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key > col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key > col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-31 00:00:00 +-24:00:00 2012-02-01 00:00:00 +-24:00:00 2012-02-02 00:00:00 +-48:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-31 00:00:00 +-48:00:00 2012-02-01 00:00:00 +-48:00:00 2012-02-02 00:00:00 +00:00:00 2012-02-01 00:00:00 +00:00:00 2012-02-02 00:00:00 +24:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key > col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key > col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-29 00:00:00 +24:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-31 00:00:00 +48:00:00 2012-01-29 00:00:00 +48:00:00 2012-01-30 00:00:00 +48:00:00 2012-01-31 00:00:00 +48:00:00 2012-02-01 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key > col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key > col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-31 00:00:00 +-24:00:00 2012-02-01 00:00:00 +-24:00:00 2012-02-02 00:00:00 +-48:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-31 00:00:00 +-48:00:00 2012-02-01 00:00:00 +-48:00:00 2012-02-02 00:00:00 +00:00:00 2012-02-01 00:00:00 +00:00:00 2012-02-02 00:00:00 +24:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key > col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key > col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-29 00:00:00 +24:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-31 00:00:00 +48:00:00 2012-01-29 00:00:00 +48:00:00 2012-01-30 00:00:00 +48:00:00 2012-01-31 00:00:00 +48:00:00 2012-02-01 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key > col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key > col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-31 00:00:00 +-24:00:00 2012-02-01 00:00:00 +-24:00:00 2012-02-02 00:00:00 +-48:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-31 00:00:00 +-48:00:00 2012-02-01 00:00:00 +-48:00:00 2012-02-02 00:00:00 +00:00:00 2012-02-01 00:00:00 +00:00:00 2012-02-02 00:00:00 +24:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key > col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key > col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-29 00:00:00 +24:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-31 00:00:00 +48:00:00 2012-01-29 00:00:00 +48:00:00 2012-01-30 00:00:00 +48:00:00 2012-01-31 00:00:00 +48:00:00 2012-02-01 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key > col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key > col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-31 00:00:00 +-24:00:00 2012-02-01 00:00:00 +-24:00:00 2012-02-02 00:00:00 +-48:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-31 00:00:00 +-48:00:00 2012-02-01 00:00:00 +-48:00:00 2012-02-02 00:00:00 +00:00:00 2012-02-01 00:00:00 +00:00:00 2012-02-02 00:00:00 +24:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key > col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key > col_datetime_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -24:00:00 +2012-01-29 00:00:00 00:00:00 +2012-01-29 00:00:00 24:00:00 +2012-01-29 00:00:00 48:00:00 +2012-01-30 00:00:00 00:00:00 +2012-01-30 00:00:00 24:00:00 +2012-01-30 00:00:00 48:00:00 +2012-01-31 00:00:00 24:00:00 +2012-01-31 00:00:00 48:00:00 +2012-02-01 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key > col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key > col_time_key; +col_datetime_key col_time_key +2012-01-30 00:00:00 -48:00:00 +2012-01-31 00:00:00 -24:00:00 +2012-01-31 00:00:00 -48:00:00 +2012-02-01 00:00:00 -24:00:00 +2012-02-01 00:00:00 -48:00:00 +2012-02-01 00:00:00 00:00:00 +2012-02-02 00:00:00 -24:00:00 +2012-02-02 00:00:00 -48:00:00 +2012-02-02 00:00:00 00:00:00 +2012-02-02 00:00:00 24:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key > col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key > col_datetime_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -24:00:00 +2012-01-29 00:00:00 00:00:00 +2012-01-29 00:00:00 24:00:00 +2012-01-29 00:00:00 48:00:00 +2012-01-30 00:00:00 00:00:00 +2012-01-30 00:00:00 24:00:00 +2012-01-30 00:00:00 48:00:00 +2012-01-31 00:00:00 24:00:00 +2012-01-31 00:00:00 48:00:00 +2012-02-01 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key > col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key > col_time_key; +col_datetime_key col_time_key +2012-01-30 00:00:00 -48:00:00 +2012-01-31 00:00:00 -24:00:00 +2012-01-31 00:00:00 -48:00:00 +2012-02-01 00:00:00 -24:00:00 +2012-02-01 00:00:00 -48:00:00 +2012-02-01 00:00:00 00:00:00 +2012-02-02 00:00:00 -24:00:00 +2012-02-02 00:00:00 -48:00:00 +2012-02-02 00:00:00 00:00:00 +2012-02-02 00:00:00 24:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key > col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key > col_datetime_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -24:00:00 +2012-01-29 00:00:00 00:00:00 +2012-01-29 00:00:00 24:00:00 +2012-01-29 00:00:00 48:00:00 +2012-01-30 00:00:00 00:00:00 +2012-01-30 00:00:00 24:00:00 +2012-01-30 00:00:00 48:00:00 +2012-01-31 00:00:00 24:00:00 +2012-01-31 00:00:00 48:00:00 +2012-02-01 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key > col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key > col_time_key; +col_datetime_key col_time_key +2012-01-30 00:00:00 -48:00:00 +2012-01-31 00:00:00 -24:00:00 +2012-01-31 00:00:00 -48:00:00 +2012-02-01 00:00:00 -24:00:00 +2012-02-01 00:00:00 -48:00:00 +2012-02-01 00:00:00 00:00:00 +2012-02-02 00:00:00 -24:00:00 +2012-02-02 00:00:00 -48:00:00 +2012-02-02 00:00:00 00:00:00 +2012-02-02 00:00:00 24:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key > col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key > col_datetime_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -24:00:00 +2012-01-29 00:00:00 00:00:00 +2012-01-29 00:00:00 24:00:00 +2012-01-29 00:00:00 48:00:00 +2012-01-30 00:00:00 00:00:00 +2012-01-30 00:00:00 24:00:00 +2012-01-30 00:00:00 48:00:00 +2012-01-31 00:00:00 24:00:00 +2012-01-31 00:00:00 48:00:00 +2012-02-01 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key > col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key > col_time_key; +col_datetime_key col_time_key +2012-01-30 00:00:00 -48:00:00 +2012-01-31 00:00:00 -24:00:00 +2012-01-31 00:00:00 -48:00:00 +2012-02-01 00:00:00 -24:00:00 +2012-02-01 00:00:00 -48:00:00 +2012-02-01 00:00:00 00:00:00 +2012-02-02 00:00:00 -24:00:00 +2012-02-02 00:00:00 -48:00:00 +2012-02-02 00:00:00 00:00:00 +2012-02-02 00:00:00 24:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key <= col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key <= col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-30 00:00:00 +-24:00:00 2012-01-31 00:00:00 +-24:00:00 2012-02-01 00:00:00 +-24:00:00 2012-02-02 00:00:00 +-48:00:00 2012-01-29 00:00:00 +-48:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-31 00:00:00 +-48:00:00 2012-02-01 00:00:00 +-48:00:00 2012-02-02 00:00:00 +00:00:00 2012-01-31 00:00:00 +00:00:00 2012-02-01 00:00:00 +00:00:00 2012-02-02 00:00:00 +24:00:00 2012-02-01 00:00:00 +24:00:00 2012-02-02 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key <= col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key <= col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-29 00:00:00 +-24:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-30 00:00:00 +00:00:00 2012-01-31 00:00:00 +24:00:00 2012-01-29 00:00:00 +24:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-31 00:00:00 +24:00:00 2012-02-01 00:00:00 +48:00:00 2012-01-29 00:00:00 +48:00:00 2012-01-30 00:00:00 +48:00:00 2012-01-31 00:00:00 +48:00:00 2012-02-01 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key <= col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key <= col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-30 00:00:00 +-24:00:00 2012-01-31 00:00:00 +-24:00:00 2012-02-01 00:00:00 +-24:00:00 2012-02-02 00:00:00 +-48:00:00 2012-01-29 00:00:00 +-48:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-31 00:00:00 +-48:00:00 2012-02-01 00:00:00 +-48:00:00 2012-02-02 00:00:00 +00:00:00 2012-01-31 00:00:00 +00:00:00 2012-02-01 00:00:00 +00:00:00 2012-02-02 00:00:00 +24:00:00 2012-02-01 00:00:00 +24:00:00 2012-02-02 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key <= col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key <= col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-29 00:00:00 +-24:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-30 00:00:00 +00:00:00 2012-01-31 00:00:00 +24:00:00 2012-01-29 00:00:00 +24:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-31 00:00:00 +24:00:00 2012-02-01 00:00:00 +48:00:00 2012-01-29 00:00:00 +48:00:00 2012-01-30 00:00:00 +48:00:00 2012-01-31 00:00:00 +48:00:00 2012-02-01 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key <= col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key <= col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-30 00:00:00 +-24:00:00 2012-01-31 00:00:00 +-24:00:00 2012-02-01 00:00:00 +-24:00:00 2012-02-02 00:00:00 +-48:00:00 2012-01-29 00:00:00 +-48:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-31 00:00:00 +-48:00:00 2012-02-01 00:00:00 +-48:00:00 2012-02-02 00:00:00 +00:00:00 2012-01-31 00:00:00 +00:00:00 2012-02-01 00:00:00 +00:00:00 2012-02-02 00:00:00 +24:00:00 2012-02-01 00:00:00 +24:00:00 2012-02-02 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key <= col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key <= col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-29 00:00:00 +-24:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-30 00:00:00 +00:00:00 2012-01-31 00:00:00 +24:00:00 2012-01-29 00:00:00 +24:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-31 00:00:00 +24:00:00 2012-02-01 00:00:00 +48:00:00 2012-01-29 00:00:00 +48:00:00 2012-01-30 00:00:00 +48:00:00 2012-01-31 00:00:00 +48:00:00 2012-02-01 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key <= col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key <= col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-30 00:00:00 +-24:00:00 2012-01-31 00:00:00 +-24:00:00 2012-02-01 00:00:00 +-24:00:00 2012-02-02 00:00:00 +-48:00:00 2012-01-29 00:00:00 +-48:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-31 00:00:00 +-48:00:00 2012-02-01 00:00:00 +-48:00:00 2012-02-02 00:00:00 +00:00:00 2012-01-31 00:00:00 +00:00:00 2012-02-01 00:00:00 +00:00:00 2012-02-02 00:00:00 +24:00:00 2012-02-01 00:00:00 +24:00:00 2012-02-02 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key <= col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key <= col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-29 00:00:00 +-24:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-30 00:00:00 +00:00:00 2012-01-31 00:00:00 +24:00:00 2012-01-29 00:00:00 +24:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-31 00:00:00 +24:00:00 2012-02-01 00:00:00 +48:00:00 2012-01-29 00:00:00 +48:00:00 2012-01-30 00:00:00 +48:00:00 2012-01-31 00:00:00 +48:00:00 2012-02-01 00:00:00 +48:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key <= col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key <= col_datetime_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-30 00:00:00 -48:00:00 +2012-01-31 00:00:00 -24:00:00 +2012-01-31 00:00:00 -48:00:00 +2012-01-31 00:00:00 00:00:00 +2012-02-01 00:00:00 -24:00:00 +2012-02-01 00:00:00 -48:00:00 +2012-02-01 00:00:00 00:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-02 00:00:00 -24:00:00 +2012-02-02 00:00:00 -48:00:00 +2012-02-02 00:00:00 00:00:00 +2012-02-02 00:00:00 24:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key <= col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key <= col_time_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -24:00:00 +2012-01-29 00:00:00 -48:00:00 +2012-01-29 00:00:00 00:00:00 +2012-01-29 00:00:00 24:00:00 +2012-01-29 00:00:00 48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-30 00:00:00 00:00:00 +2012-01-30 00:00:00 24:00:00 +2012-01-30 00:00:00 48:00:00 +2012-01-31 00:00:00 00:00:00 +2012-01-31 00:00:00 24:00:00 +2012-01-31 00:00:00 48:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-01 00:00:00 48:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key <= col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key <= col_datetime_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-30 00:00:00 -48:00:00 +2012-01-31 00:00:00 -24:00:00 +2012-01-31 00:00:00 -48:00:00 +2012-01-31 00:00:00 00:00:00 +2012-02-01 00:00:00 -24:00:00 +2012-02-01 00:00:00 -48:00:00 +2012-02-01 00:00:00 00:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-02 00:00:00 -24:00:00 +2012-02-02 00:00:00 -48:00:00 +2012-02-02 00:00:00 00:00:00 +2012-02-02 00:00:00 24:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key <= col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key <= col_time_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -24:00:00 +2012-01-29 00:00:00 -48:00:00 +2012-01-29 00:00:00 00:00:00 +2012-01-29 00:00:00 24:00:00 +2012-01-29 00:00:00 48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-30 00:00:00 00:00:00 +2012-01-30 00:00:00 24:00:00 +2012-01-30 00:00:00 48:00:00 +2012-01-31 00:00:00 00:00:00 +2012-01-31 00:00:00 24:00:00 +2012-01-31 00:00:00 48:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-01 00:00:00 48:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key <= col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key <= col_datetime_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-30 00:00:00 -48:00:00 +2012-01-31 00:00:00 -24:00:00 +2012-01-31 00:00:00 -48:00:00 +2012-01-31 00:00:00 00:00:00 +2012-02-01 00:00:00 -24:00:00 +2012-02-01 00:00:00 -48:00:00 +2012-02-01 00:00:00 00:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-02 00:00:00 -24:00:00 +2012-02-02 00:00:00 -48:00:00 +2012-02-02 00:00:00 00:00:00 +2012-02-02 00:00:00 24:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key <= col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key <= col_time_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -24:00:00 +2012-01-29 00:00:00 -48:00:00 +2012-01-29 00:00:00 00:00:00 +2012-01-29 00:00:00 24:00:00 +2012-01-29 00:00:00 48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-30 00:00:00 00:00:00 +2012-01-30 00:00:00 24:00:00 +2012-01-30 00:00:00 48:00:00 +2012-01-31 00:00:00 00:00:00 +2012-01-31 00:00:00 24:00:00 +2012-01-31 00:00:00 48:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-01 00:00:00 48:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key <= col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key <= col_datetime_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-30 00:00:00 -48:00:00 +2012-01-31 00:00:00 -24:00:00 +2012-01-31 00:00:00 -48:00:00 +2012-01-31 00:00:00 00:00:00 +2012-02-01 00:00:00 -24:00:00 +2012-02-01 00:00:00 -48:00:00 +2012-02-01 00:00:00 00:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-02 00:00:00 -24:00:00 +2012-02-02 00:00:00 -48:00:00 +2012-02-02 00:00:00 00:00:00 +2012-02-02 00:00:00 24:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key <= col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key <= col_time_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -24:00:00 +2012-01-29 00:00:00 -48:00:00 +2012-01-29 00:00:00 00:00:00 +2012-01-29 00:00:00 24:00:00 +2012-01-29 00:00:00 48:00:00 +2012-01-30 00:00:00 -24:00:00 +2012-01-30 00:00:00 00:00:00 +2012-01-30 00:00:00 24:00:00 +2012-01-30 00:00:00 48:00:00 +2012-01-31 00:00:00 00:00:00 +2012-01-31 00:00:00 24:00:00 +2012-01-31 00:00:00 48:00:00 +2012-02-01 00:00:00 24:00:00 +2012-02-01 00:00:00 48:00:00 +2012-02-02 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key < col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key < col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-31 00:00:00 +-24:00:00 2012-02-01 00:00:00 +-24:00:00 2012-02-02 00:00:00 +-48:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-31 00:00:00 +-48:00:00 2012-02-01 00:00:00 +-48:00:00 2012-02-02 00:00:00 +00:00:00 2012-02-01 00:00:00 +00:00:00 2012-02-02 00:00:00 +24:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key < col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key < col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-29 00:00:00 +24:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-31 00:00:00 +48:00:00 2012-01-29 00:00:00 +48:00:00 2012-01-30 00:00:00 +48:00:00 2012-01-31 00:00:00 +48:00:00 2012-02-01 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key < col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key < col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-31 00:00:00 +-24:00:00 2012-02-01 00:00:00 +-24:00:00 2012-02-02 00:00:00 +-48:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-31 00:00:00 +-48:00:00 2012-02-01 00:00:00 +-48:00:00 2012-02-02 00:00:00 +00:00:00 2012-02-01 00:00:00 +00:00:00 2012-02-02 00:00:00 +24:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key < col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 ignore INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key < col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-29 00:00:00 +24:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-31 00:00:00 +48:00:00 2012-01-29 00:00:00 +48:00:00 2012-01-30 00:00:00 +48:00:00 2012-01-31 00:00:00 +48:00:00 2012-02-01 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key < col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_time_key < col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-31 00:00:00 +-24:00:00 2012-02-01 00:00:00 +-24:00:00 2012-02-02 00:00:00 +-48:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-31 00:00:00 +-48:00:00 2012-02-01 00:00:00 +-48:00:00 2012-02-02 00:00:00 +00:00:00 2012-02-01 00:00:00 +00:00:00 2012-02-02 00:00:00 +24:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key < col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 ignore INDEX (col_datetime_key) +WHERE col_datetime_key < col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-29 00:00:00 +24:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-31 00:00:00 +48:00:00 2012-01-29 00:00:00 +48:00:00 2012-01-30 00:00:00 +48:00:00 2012-01-31 00:00:00 +48:00:00 2012-02-01 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key < col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_time_key < col_datetime_key; +col_time_key col_datetime_key +-24:00:00 2012-01-31 00:00:00 +-24:00:00 2012-02-01 00:00:00 +-24:00:00 2012-02-02 00:00:00 +-48:00:00 2012-01-30 00:00:00 +-48:00:00 2012-01-31 00:00:00 +-48:00:00 2012-02-01 00:00:00 +-48:00:00 2012-02-02 00:00:00 +00:00:00 2012-02-01 00:00:00 +00:00:00 2012-02-02 00:00:00 +24:00:00 2012-02-02 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key < col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index +1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`) +SELECT * FROM +t1 force INDEX (col_time_key) +STRAIGHT_JOIN +t2 force INDEX (col_datetime_key) +WHERE col_datetime_key < col_time_key; +col_time_key col_datetime_key +-24:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-29 00:00:00 +00:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-29 00:00:00 +24:00:00 2012-01-30 00:00:00 +24:00:00 2012-01-31 00:00:00 +48:00:00 2012-01-29 00:00:00 +48:00:00 2012-01-30 00:00:00 +48:00:00 2012-01-31 00:00:00 +48:00:00 2012-02-01 00:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key < col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key < col_datetime_key; +col_datetime_key col_time_key +2012-01-30 00:00:00 -48:00:00 +2012-01-31 00:00:00 -24:00:00 +2012-01-31 00:00:00 -48:00:00 +2012-02-01 00:00:00 -24:00:00 +2012-02-01 00:00:00 -48:00:00 +2012-02-01 00:00:00 00:00:00 +2012-02-02 00:00:00 -24:00:00 +2012-02-02 00:00:00 -48:00:00 +2012-02-02 00:00:00 00:00:00 +2012-02-02 00:00:00 24:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key < col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key < col_time_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -24:00:00 +2012-01-29 00:00:00 00:00:00 +2012-01-29 00:00:00 24:00:00 +2012-01-29 00:00:00 48:00:00 +2012-01-30 00:00:00 00:00:00 +2012-01-30 00:00:00 24:00:00 +2012-01-30 00:00:00 48:00:00 +2012-01-31 00:00:00 24:00:00 +2012-01-31 00:00:00 48:00:00 +2012-02-01 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key < col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key < col_datetime_key; +col_datetime_key col_time_key +2012-01-30 00:00:00 -48:00:00 +2012-01-31 00:00:00 -24:00:00 +2012-01-31 00:00:00 -48:00:00 +2012-02-01 00:00:00 -24:00:00 +2012-02-01 00:00:00 -48:00:00 +2012-02-01 00:00:00 00:00:00 +2012-02-02 00:00:00 -24:00:00 +2012-02-02 00:00:00 -48:00:00 +2012-02-02 00:00:00 00:00:00 +2012-02-02 00:00:00 24:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key < col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 +1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 ignore INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key < col_time_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -24:00:00 +2012-01-29 00:00:00 00:00:00 +2012-01-29 00:00:00 24:00:00 +2012-01-29 00:00:00 48:00:00 +2012-01-30 00:00:00 00:00:00 +2012-01-30 00:00:00 24:00:00 +2012-01-30 00:00:00 48:00:00 +2012-01-31 00:00:00 24:00:00 +2012-01-31 00:00:00 48:00:00 +2012-02-01 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key < col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_time_key < col_datetime_key; +col_datetime_key col_time_key +2012-01-30 00:00:00 -48:00:00 +2012-01-31 00:00:00 -24:00:00 +2012-01-31 00:00:00 -48:00:00 +2012-02-01 00:00:00 -24:00:00 +2012-02-01 00:00:00 -48:00:00 +2012-02-01 00:00:00 00:00:00 +2012-02-02 00:00:00 -24:00:00 +2012-02-02 00:00:00 -48:00:00 +2012-02-02 00:00:00 00:00:00 +2012-02-02 00:00:00 24:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key < col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 ignore INDEX (col_time_key) +WHERE col_datetime_key < col_time_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -24:00:00 +2012-01-29 00:00:00 00:00:00 +2012-01-29 00:00:00 24:00:00 +2012-01-29 00:00:00 48:00:00 +2012-01-30 00:00:00 00:00:00 +2012-01-30 00:00:00 24:00:00 +2012-01-30 00:00:00 48:00:00 +2012-01-31 00:00:00 24:00:00 +2012-01-31 00:00:00 48:00:00 +2012-02-01 00:00:00 48:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key < col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_time_key < col_datetime_key; +col_datetime_key col_time_key +2012-01-30 00:00:00 -48:00:00 +2012-01-31 00:00:00 -24:00:00 +2012-01-31 00:00:00 -48:00:00 +2012-02-01 00:00:00 -24:00:00 +2012-02-01 00:00:00 -48:00:00 +2012-02-01 00:00:00 00:00:00 +2012-02-02 00:00:00 -24:00:00 +2012-02-02 00:00:00 -48:00:00 +2012-02-02 00:00:00 00:00:00 +2012-02-02 00:00:00 24:00:00 +EXPLAIN EXTENDED SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key < col_time_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index +1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1) +Warnings: +Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`) +SELECT * FROM +t2 force INDEX (col_datetime_key) +STRAIGHT_JOIN +t1 force INDEX (col_time_key) +WHERE col_datetime_key < col_time_key; +col_datetime_key col_time_key +2012-01-29 00:00:00 -24:00:00 +2012-01-29 00:00:00 00:00:00 +2012-01-29 00:00:00 24:00:00 +2012-01-29 00:00:00 48:00:00 +2012-01-30 00:00:00 00:00:00 +2012-01-30 00:00:00 24:00:00 +2012-01-30 00:00:00 48:00:00 +2012-01-31 00:00:00 24:00:00 +2012-01-31 00:00:00 48:00:00 +2012-02-01 00:00:00 48:00:00 +DROP TABLE t1,t2; +CREATE TABLE t1 ( +pk INT NOT NULL AUTO_INCREMENT, +col_int_nokey INT, +col_int_key INT NOT NULL, +PRIMARY KEY (pk), +KEY col_int_key (col_int_key) +); +INSERT INTO t1 VALUES (10,1,7), (11,7,0), (12,4,9), (13,7,3), +(14,0,4), (15,2,2), (16,9,5), (17,4,3), (18,0,1), (19,9,3), (20,1,6), +(21,3,7), (22,8,5), (23,8,1), (24,18,204), (25,84,224), (26,6,9), +(27,3,5), (28,6,0), (29,6,3); +CREATE TABLE t2 ( +col_int_nokey INT NOT NULL, +col_datetime_key DATETIME NOT NULL, +col_varchar_key VARCHAR(1) NOT NULL, +KEY col_datetime_key (col_datetime_key), +KEY col_varchar_key (col_varchar_key) +); +INSERT INTO t2 VALUES (1,'2001-11-04 19:07:55','k'); +CREATE TABLE t3 ( +col_time_key TIME, +KEY col_time_key (col_time_key) +); +INSERT INTO t3 VALUES ('21:22:34'), ('10:50:38'), ('00:21:38'), +('04:08:02'), ('16:25:11'), ('10:14:58'), ('19:47:59'), ('11:14:24'), +('00:00:00'), ('00:00:00'), ('15:57:25'), ('07:05:51'), ('19:22:21'), +('03:53:16'), ('09:16:38'), ('15:37:26'), ('00:00:00'), ('05:03:03'), +('02:59:24'), ('00:01:58'); +EXPLAIN EXTENDED SELECT * FROM t2 STRAIGHT_JOIN t3 FORCE INDEX (col_time_key) +ON t3.col_time_key > t2.col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 system col_datetime_key NULL NULL NULL 1 100.00 +1 SIMPLE t3 index col_time_key col_time_key 4 NULL 20 100.00 Using where; Using index +Warnings: +Note 1003 select 1 AS `col_int_nokey`,'2001-11-04 19:07:55' AS `col_datetime_key`,'k' AS `col_varchar_key`,`test`.`t3`.`col_time_key` AS `col_time_key` from `test`.`t3` FORCE INDEX (`col_time_key`) where (`test`.`t3`.`col_time_key` > '2001-11-04 19:07:55') +SELECT * FROM t2 STRAIGHT_JOIN t3 FORCE INDEX (col_time_key) +ON t3.col_time_key > t2.col_datetime_key; +col_int_nokey col_datetime_key col_varchar_key col_time_key +1 2001-11-04 19:07:55 k 00:00:00 +1 2001-11-04 19:07:55 k 00:00:00 +1 2001-11-04 19:07:55 k 00:00:00 +1 2001-11-04 19:07:55 k 00:01:58 +1 2001-11-04 19:07:55 k 00:21:38 +1 2001-11-04 19:07:55 k 02:59:24 +1 2001-11-04 19:07:55 k 03:53:16 +1 2001-11-04 19:07:55 k 04:08:02 +1 2001-11-04 19:07:55 k 05:03:03 +1 2001-11-04 19:07:55 k 07:05:51 +1 2001-11-04 19:07:55 k 09:16:38 +1 2001-11-04 19:07:55 k 10:14:58 +1 2001-11-04 19:07:55 k 10:50:38 +1 2001-11-04 19:07:55 k 11:14:24 +1 2001-11-04 19:07:55 k 15:37:26 +1 2001-11-04 19:07:55 k 15:57:25 +1 2001-11-04 19:07:55 k 16:25:11 +1 2001-11-04 19:07:55 k 19:22:21 +1 2001-11-04 19:07:55 k 19:47:59 +1 2001-11-04 19:07:55 k 21:22:34 +EXPLAIN EXTENDED SELECT * FROM t2 STRAIGHT_JOIN t3 IGNORE INDEX (col_time_key) +ON t3.col_time_key > t2.col_datetime_key; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 system col_datetime_key NULL NULL NULL 1 100.00 +1 SIMPLE t3 ALL NULL NULL NULL NULL 20 100.00 Using where +Warnings: +Note 1003 select 1 AS `col_int_nokey`,'2001-11-04 19:07:55' AS `col_datetime_key`,'k' AS `col_varchar_key`,`test`.`t3`.`col_time_key` AS `col_time_key` from `test`.`t3` IGNORE INDEX (`col_time_key`) where (`test`.`t3`.`col_time_key` > '2001-11-04 19:07:55') +SELECT * FROM t2 STRAIGHT_JOIN t3 IGNORE INDEX (col_time_key) +ON t3.col_time_key > t2.col_datetime_key; +col_int_nokey col_datetime_key col_varchar_key col_time_key +1 2001-11-04 19:07:55 k 00:00:00 +1 2001-11-04 19:07:55 k 00:00:00 +1 2001-11-04 19:07:55 k 00:00:00 +1 2001-11-04 19:07:55 k 00:01:58 +1 2001-11-04 19:07:55 k 00:21:38 +1 2001-11-04 19:07:55 k 02:59:24 +1 2001-11-04 19:07:55 k 03:53:16 +1 2001-11-04 19:07:55 k 04:08:02 +1 2001-11-04 19:07:55 k 05:03:03 +1 2001-11-04 19:07:55 k 07:05:51 +1 2001-11-04 19:07:55 k 09:16:38 +1 2001-11-04 19:07:55 k 10:14:58 +1 2001-11-04 19:07:55 k 10:50:38 +1 2001-11-04 19:07:55 k 11:14:24 +1 2001-11-04 19:07:55 k 15:37:26 +1 2001-11-04 19:07:55 k 15:57:25 +1 2001-11-04 19:07:55 k 16:25:11 +1 2001-11-04 19:07:55 k 19:22:21 +1 2001-11-04 19:07:55 k 19:47:59 +1 2001-11-04 19:07:55 k 21:22:34 +EXPLAIN EXTENDED SELECT outr.col_int_nokey +FROM t2 as outr +STRAIGHT_JOIN t3 AS outr2 +ON outr2.col_time_key > outr.col_datetime_key +WHERE outr.col_int_nokey IN ( +SELECT col_int_key +FROM t1 AS innr +WHERE innr.pk >= innr.col_int_nokey +) AND ( +outr.col_int_nokey <= 6 +OR +outr.col_varchar_key IS NULL +); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY outr system col_datetime_key NULL NULL NULL 1 100.00 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 +1 PRIMARY outr2 index col_time_key col_time_key 4 NULL 20 100.00 Using where; Using index; Using join buffer (flat, BNL join) +2 MATERIALIZED innr ref col_int_key col_int_key 4 const 2 100.00 Using where +Warnings: +Note 1003 select 1 AS `col_int_nokey` from `test`.`t3` `outr2` semi join (`test`.`t1` `innr`) where ((`test`.`innr`.`col_int_key` = 1) and (`test`.`innr`.`pk` >= `test`.`innr`.`col_int_nokey`) and (`test`.`outr2`.`col_time_key` > '2001-11-04 19:07:55')) +SELECT outr.col_int_nokey +FROM t2 as outr +STRAIGHT_JOIN t3 AS outr2 +ON outr2.col_time_key > outr.col_datetime_key +WHERE outr.col_int_nokey IN ( +SELECT col_int_key +FROM t1 AS innr +WHERE innr.pk >= innr.col_int_nokey +) AND ( +outr.col_int_nokey <= 6 +OR +outr.col_varchar_key IS NULL +); +col_int_nokey +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +DROP TABLE t1,t2,t3; +SET TIMESTAMP=0; diff --git a/mysql-test/r/type_time_hires.result b/mysql-test/r/type_time_hires.result index 7fbb5079d5a..2620dac0794 100644 --- a/mysql-test/r/type_time_hires.result +++ b/mysql-test/r/type_time_hires.result @@ -1,3 +1,4 @@ +SET timestamp=UNIX_TIMESTAMP('2001-02-03 10:20:30'); drop table if exists t1, t2, t3; create table t1 (a time(7)); ERROR 42000: Too big precision 7 specified for 'a'. Maximum is 6. @@ -10,10 +11,10 @@ Warnings: Note 1265 Data truncated for column 'a' at row 1 insert t1 values (20101211010203.45678); Warnings: -Warning 1265 Data truncated for column 'a' at row 1 +Note 1265 Data truncated for column 'a' at row 1 insert t1 values (20101211030405.789e0); Warnings: -Warning 1265 Data truncated for column 'a' at row 1 +Note 1265 Data truncated for column 'a' at row 1 insert t1 values (99991231235959e1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 @@ -114,7 +115,6 @@ NULL delete from t1 where a < 20110101; select * from t1; a -01:02:13.3332 NULL create table t2 select * from t1; create table t3 like t1; @@ -134,12 +134,11 @@ Warnings: Note 1265 Data truncated for column 'a' at row 1 select a, a+0, a-1, a*1, a/2 from t1; a a+0 a-1 a*1 a/2 -01:02:13.3332 10213.3332 10212.3332 10213.3332 5106.66660000 NULL NULL NULL NULL NULL 14:15:16.2222 141516.2222 141515.2222 141516.2222 70758.11110000 select max(a), min(a), sum(a), avg(a) from t1; max(a) min(a) sum(a) avg(a) -14:15:16.2222 01:02:13.3332 151729.5554 75864.77770000 +14:15:16.2222 14:15:16.2222 141516.2222 141516.22220000 create table t2 select a, a+0, a-1, a*1, a/2 from t1; create table t3 select max(a), min(a), sum(a), avg(a) from t1; show create table t2; @@ -194,8 +193,8 @@ f5_time 11:14:17.76543 f6_time 11:14:17.765432 select cast(f0_time as time(4)) time4_f0_time, cast(f1_time as datetime(3)) datetime3_f1_time, cast(f2_time as date) date_f2_time, cast(f4_time as double) double_f3_time, cast(f4_time as decimal(40,5)) decimal5_f4_time, cast(f5_time as signed) bigint_f5_time, cast(f6_time as char(255)) varchar_f6_time from t1; time4_f0_time 11:14:17.0000 -datetime3_f1_time 0000-00-00 11:14:17.700 -date_f2_time 0000-00-00 +datetime3_f1_time 2001-02-03 11:14:17.700 +date_f2_time 2001-02-03 double_f3_time 111417.7654 decimal5_f4_time 111417.76540 bigint_f5_time 111417 @@ -208,8 +207,8 @@ Code 1265 Message Data truncated for column 'date_f2_time' at row 1 select * from t2; time4_f0_time 11:14:17.0000 -datetime3_f1_time 0000-00-00 11:14:17.700 -date_f2_time 0000-00-00 +datetime3_f1_time 2001-02-03 11:14:17.700 +date_f2_time 2001-02-03 double_f3_time 111417.765 decimal5_f4_time 111417.76540 bigint_f5_time 111417 @@ -221,13 +220,20 @@ Code 1265 Message Data truncated for column 'date_f2_time' at row 1 select * from t1; time4_f0_time 11:14:17.0000 -datetime3_f1_time 0000-00-00 11:14:17.700 -date_f2_time 0000-00-00 +datetime3_f1_time 2001-02-03 11:14:17.700 +date_f2_time 2001-02-03 double_f3_time 111417.765 decimal5_f4_time 111417.76540 bigint_f5_time 111417 varchar_f6_time 11:14:17.765432 alter table t1 modify time4_f0_time time(0), modify datetime3_f1_time time(1), modify date_f2_time time(2), modify double_f3_time time(3), modify decimal5_f4_time time(4), modify bigint_f5_time time(5), modify varchar_f6_time time(6); +Warnings: +Level Note +Code 1265 +Message Data truncated for column 'datetime3_f1_time' at row 1 +Level Note +Code 1265 +Message Data truncated for column 'date_f2_time' at row 1 select * from t1; time4_f0_time 11:14:17 datetime3_f1_time 11:14:17.7 @@ -238,6 +244,13 @@ bigint_f5_time 11:14:17.00000 varchar_f6_time 11:14:17.765432 delete from t1; insert t1 select * from t2; +Warnings: +Level Note +Code 1265 +Message Data truncated for column 'datetime3_f1_time' at row 1 +Level Note +Code 1265 +Message Data truncated for column 'date_f2_time' at row 1 select * from t1; time4_f0_time 11:14:17 datetime3_f1_time 11:14:17.7 @@ -301,6 +314,7 @@ a b 04:05:06.000000 04:05:06.789100 drop view v1; drop table t1, t2; +SET timestamp=DEFAULT; create table t1 (a time(4) not null, key(a)); insert into t1 values ('1:2:3.001'),('1:2:3'), ('-00:00:00.6'),('-00:00:00.7'),('-00:00:00.8'),('-00:00:00.9'),('-00:00:01.0'),('-00:00:01.1'),('-00:00:01.000000'),('-00:00:01.100001'),('-00:00:01.000002'),('-00:00:01.090000'); select * from t1 order by a; diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index 1f17247b02a..28ec7e75870 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -148,15 +148,15 @@ ix+0 20030101000000 drop table t1; create table t1 (t1 timestamp, t2 timestamp default now()); -ERROR HY000: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause +drop table t1; create table t1 (t1 timestamp, t2 timestamp on update now()); -ERROR HY000: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause +drop table t1; create table t1 (t1 timestamp, t2 timestamp default now() on update now()); -ERROR HY000: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause +drop table t1; create table t1 (t1 timestamp default now(), t2 timestamp on update now()); -ERROR HY000: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause +drop table t1; create table t1 (t1 timestamp on update now(), t2 timestamp default now() on update now()); -ERROR HY000: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause +drop table t1; create table t1 (t1 timestamp default '2003-01-01 00:00:00', t2 datetime, t3 timestamp); SET TIMESTAMP=1000000000; insert into t1 values (); @@ -654,3 +654,90 @@ c1 '2016-06-13 20:00:00.000003' >= COALESCE( c1 ) NULL NULL DROP TABLE t1; End of 5.5 tests +# +# MDEV-7254: Assigned expression is evaluated twice when updating column TIMESTAMP NOT NULL +# +SET time_zone='+02:00'; +create table t1(value timestamp not null); +set @a:=0; +create function f1 () returns timestamp +begin +set @a = @a + 1; +return NULL; +end// +set timestamp=12340; +insert t1 values (f1()); +select @a, value from t1; +@a value +1 1970-01-01 05:25:40 +set timestamp=12350; +update t1 set value = f1(); +select @a, value from t1; +@a value +2 1970-01-01 05:25:50 +drop table t1; +drop function f1; +set timestamp=0; +create table t1(value timestamp null); +set @a:=0; +create function f1 () returns timestamp +begin +set @a = @a + 1; +return NULL; +end// +set timestamp=12340; +insert t1 values (f1()); +select @a, value from t1; +@a value +1 NULL +set timestamp=12350; +update t1 set value = f1(); +select @a, value from t1; +@a value +2 NULL +drop table t1; +drop function f1; +set timestamp=0; +SET time_zone=DEFAULT; +# +# MDEV-7778 impossible create copy of table, if table contain default value for timestamp field +# +SET sql_mode="NO_ZERO_DATE"; +CREATE TABLE t1 ( +ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP +); +CREATE TABLE t2 AS SELECT * from t1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1,t2; +SET sql_mode=DEFAULT; +# +# MDEV-8082 ON UPDATE is not preserved by CREATE TABLE .. SELECT +# +CREATE TABLE t1 ( +vc VARCHAR(10) NOT NULL DEFAULT 'test', +ts timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP +); +CREATE TABLE t2 AS SELECT * FROM t1 LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `vc` varchar(10) NOT NULL DEFAULT 'test', + `ts` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `vc` varchar(10) NOT NULL DEFAULT 'test', + `ts` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1,t2; +End of 10.0 tests diff --git a/mysql-test/r/type_timestamp_hires.result b/mysql-test/r/type_timestamp_hires.result index 3f1e05f4870..6ebf83a09f0 100644 --- a/mysql-test/r/type_timestamp_hires.result +++ b/mysql-test/r/type_timestamp_hires.result @@ -1,3 +1,4 @@ +SET timestamp=UNIX_TIMESTAMP('2001-02-03 10:20:30'); drop table if exists t1, t2, t3; create table t1 (a timestamp(7)); ERROR 42000: Too big precision 7 specified for 'a'. Maximum is 6. @@ -63,15 +64,15 @@ a show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` timestamp(4) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP + `a` timestamp(4) NOT NULL DEFAULT CURRENT_TIMESTAMP(4) ON UPDATE CURRENT_TIMESTAMP(4) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 show columns from t1; Field Type Null Key Default Extra -a timestamp(4) NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP +a timestamp(4) NO CURRENT_TIMESTAMP(4) on update CURRENT_TIMESTAMP select table_name, column_name, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, datetime_precision, character_set_name, collation_name, column_type, column_key, extra from information_schema.columns where table_name='t1'; table_name t1 column_name a -column_default CURRENT_TIMESTAMP +column_default CURRENT_TIMESTAMP(4) is_nullable NO data_type timestamp character_maximum_length NULL @@ -108,12 +109,12 @@ create table t3 like t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` timestamp(4) NOT NULL DEFAULT '0000-00-00 00:00:00.0000' + `a` timestamp(4) NOT NULL DEFAULT CURRENT_TIMESTAMP(4) ON UPDATE CURRENT_TIMESTAMP(4) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `a` timestamp(4) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP + `a` timestamp(4) NOT NULL DEFAULT CURRENT_TIMESTAMP(4) ON UPDATE CURRENT_TIMESTAMP(4) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t2, t3; insert t1 values ('2010-12-13 14:15:16.222222'); @@ -129,7 +130,7 @@ create table t3 select max(a), min(a), sum(a), avg(a) from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` timestamp(4) NOT NULL DEFAULT '0000-00-00 00:00:00.0000', + `a` timestamp(4) NOT NULL DEFAULT CURRENT_TIMESTAMP(4) ON UPDATE CURRENT_TIMESTAMP(4), `a+0` decimal(25,4) NOT NULL DEFAULT '0.0000', `a-1` decimal(25,4) NOT NULL DEFAULT '0.0000', `a*1` decimal(25,4) NOT NULL DEFAULT '0.0000', @@ -196,12 +197,8 @@ decimal5_f4_timestamp 20101112111417.76540 bigint_f5_timestamp 20101112111417 varchar_f6_timestamp 2010-11-12 11:14:17.765432 alter table t1 modify time4_f0_timestamp timestamp(0), modify datetime3_f1_timestamp timestamp(1), modify date_f2_timestamp timestamp(2), modify double_f3_timestamp timestamp(3), modify decimal5_f4_timestamp timestamp(4), modify bigint_f5_timestamp timestamp(5), modify varchar_f6_timestamp timestamp(6); -Warnings: -Level Warning -Code 1265 -Message Data truncated for column 'time4_f0_timestamp' at row 1 select * from t1; -time4_f0_timestamp 0000-00-00 00:00:00 +time4_f0_timestamp 2001-02-03 11:14:17 datetime3_f1_timestamp 2010-11-12 11:14:17.7 date_f2_timestamp 2010-11-12 00:00:00.00 double_f3_timestamp 2010-11-12 11:14:17.766 @@ -210,12 +207,8 @@ bigint_f5_timestamp 2010-11-12 11:14:17.00000 varchar_f6_timestamp 2010-11-12 11:14:17.765432 delete from t1; insert t1 select * from t2; -Warnings: -Level Warning -Code 1265 -Message Data truncated for column 'time4_f0_timestamp' at row 1 select * from t1; -time4_f0_timestamp 0000-00-00 00:00:00 +time4_f0_timestamp 2001-02-03 11:14:17 datetime3_f1_timestamp 2010-11-12 11:14:17.7 date_f2_timestamp 2010-11-12 00:00:00.00 double_f3_timestamp 2010-11-12 11:14:17.765 @@ -270,6 +263,7 @@ a b 2011-01-02 03:04:06.234500 2011-01-02 03:04:06.234561 drop view v1; drop table t1, t2; +SET timestamp=DEFAULT; set time_zone='+03:00'; set timestamp=unix_timestamp('2011-01-01 01:01:01') + 0.123456; create table t1 (a timestamp(5)); @@ -278,3 +272,23 @@ select * from t1; a 2011-01-01 01:01:01.12345 drop table t1; +create table t1 (a timestamp(5) default current_timestamp); +drop table t1; +create table t1 (a timestamp(5) default current_timestamp()); +drop table t1; +create table t1 (a timestamp(5) default current_timestamp(2)); +ERROR 42000: Invalid default value for 'a' +create table t1 (a timestamp(5) default current_timestamp(5)); +drop table t1; +create table t1 (a timestamp(5) default current_timestamp(6)); +drop table t1; +create table t1 (a timestamp(5) on update current_timestamp); +drop table t1; +create table t1 (a timestamp(5) on update current_timestamp()); +drop table t1; +create table t1 (a timestamp(5) on update current_timestamp(3)); +ERROR HY000: Invalid ON UPDATE clause for 'a' column +create table t1 (a timestamp(5) on update current_timestamp(5)); +drop table t1; +create table t1 (a timestamp(5) on update current_timestamp(6)); +drop table t1; diff --git a/mysql-test/r/type_uint.result b/mysql-test/r/type_uint.result index d67c735f067..c970f2ff896 100644 --- a/mysql-test/r/type_uint.result +++ b/mysql-test/r/type_uint.result @@ -33,3 +33,40 @@ a 2 16777215 drop table t1, t2; +# +# Start of 10.0 tests +# +# +# MDEV-6950 Bad results with joins comparing DATE and INT/ENUM/VARCHAR columns +# +CREATE TABLE t1 (a DATE PRIMARY KEY); +INSERT INTO t1 VALUES ('1999-01-01'); +CREATE TABLE t2 (a INT UNSIGNED); +INSERT INTO t2 VALUES (19990101); +INSERT INTO t2 VALUES (990101); +SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a; +a +1999-01-01 +1999-01-01 +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a; +a +1999-01-01 +1999-01-01 +ALTER TABLE t2 ADD PRIMARY KEY(a); +SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a; +a +1999-01-01 +1999-01-01 +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a; +a +1999-01-01 +1999-01-01 +# t2 should NOT be eliminated +EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index +DROP TABLE t1,t2; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/type_varchar.result b/mysql-test/r/type_varchar.result index 0ab13be113e..60227def751 100644 --- a/mysql-test/r/type_varchar.result +++ b/mysql-test/r/type_varchar.result @@ -579,3 +579,44 @@ DESCRIBE t1; Field Type Null Key Default Extra c1 mediumtext YES NULL DROP TABLE t1; +# +# End of 5.5 tests +# +# +# MDEV-6950 Bad results with joins comparing DATE and INT/ENUM/VARCHAR columns +# +CREATE TABLE t1 (c1 DATE PRIMARY KEY); +INSERT INTO t1 VALUES ('2001-01-01'); +CREATE TABLE t2 (c1 VARCHAR(20)); +INSERT INTO t2 VALUES ('2001-01-01'); +INSERT INTO t2 VALUES ('2001/01/01'); +SELECT t1.* FROM t1,t2 WHERE t1.c1=t2.c1; +c1 +2001-01-01 +2001-01-01 +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1=t2.c1; +c1 +2001-01-01 +2001-01-01 +ALTER TABLE t2 ADD PRIMARY KEY(c1); +SELECT t1.* FROM t1,t2 WHERE t1.c1=t2.c1; +c1 +2001-01-01 +2001-01-01 +EXPLAIN SELECT t1.* FROM t1,t2 WHERE t1.c1=t2.c1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system PRIMARY NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 22 NULL 2 Using where; Using index +SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1=t2.c1; +c1 +2001-01-01 +2001-01-01 +# t2 should NOT be eliminated +EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1=t2.c1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +1 SIMPLE t2 index PRIMARY PRIMARY 22 NULL 2 Using where; Using index +DROP TABLE IF EXISTS t1,t2; +# +# End of 10.0 tests +# diff --git a/mysql-test/r/update.result b/mysql-test/r/update.result index 0b036ca0a2e..49141e33709 100644 --- a/mysql-test/r/update.result +++ b/mysql-test/r/update.result @@ -276,6 +276,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -289,6 +290,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 2 Handler_read_rnd_deleted 0 Handler_read_rnd_next 9 @@ -301,6 +303,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -313,6 +316,7 @@ Handler_read_key 0 Handler_read_last 1 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -326,6 +330,7 @@ Handler_read_key 0 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 1 Handler_read_rnd_deleted 2 Handler_read_rnd_next 7 @@ -381,6 +386,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 1 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 1 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -420,6 +426,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -432,6 +439,7 @@ Handler_read_key 2 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -443,6 +451,7 @@ Handler_read_key 3 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -454,6 +463,7 @@ Handler_read_key 3 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 @@ -677,3 +687,31 @@ WHERE data_entry_exit_id = t2.data_entry_id ); drop view v1; drop table t1, t2; +# +# MDEV-4410: update does not want to use a covering index, but select uses it. +# +create table t2(a int); +insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 (key1 int, col1 int, key(key1)); +insert into t1 +select A.a + 10 * B.a + 100 * C.a, 1234 from t2 A, t2 B, t2 C; +# This must not have "Using filesort": +explain +update t1 set key1=key1+1 where key1 between 10 and 110 order by key1 limit 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range key1 key1 5 NULL 2 Using where; Using buffer +flush status; +update t1 set key1=key1+1 where key1 between 10 and 110 order by key1 limit 2; +show status like 'Handler_read%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 1 +Handler_read_last 0 +Handler_read_next 1 +Handler_read_prev 0 +Handler_read_retry 0 +Handler_read_rnd 2 +Handler_read_rnd_deleted 0 +Handler_read_rnd_next 0 +drop table t1, t2; +# End of MariaDB 10.0 tests diff --git a/mysql-test/r/upgrade.result b/mysql-test/r/upgrade.result index ec63cc0d98c..b6e924c71cc 100644 --- a/mysql-test/r/upgrade.result +++ b/mysql-test/r/upgrade.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Invalid .old.. table or database name"); drop database if exists `mysqltest1`; drop database if exists `mysqltest-1`; drop database if exists `#mysql50#mysqltest-1`; @@ -33,26 +34,32 @@ show create database `#mysql50#mysqltest-1`; ERROR 42000: Unknown database '#mysql50#mysqltest-1' show tables in `mysqltest1`; Tables_in_mysqltest1 -t1 t-1 +t1 show tables in `mysqltest-1`; Tables_in_mysqltest-1 -t1 t-1 +t1 drop database `mysqltest1`; drop database `mysqltest-1`; -drop table if exists `txu@0023p@0023p1`; -drop table if exists `txu#p#p1`; create table `txu#p#p1` (s1 int); insert into `txu#p#p1` values (1); select * from `txu@0023p@0023p1`; ERROR 42S02: Table 'test.txu@0023p@0023p1' doesn't exist create table `txu@0023p@0023p1` (s1 int); -ERROR 42S01: Table '#mysql50#txu@0023p@0023p1' already exists +show tables; +Tables_in_test +txu#p#p1 +txu@0023p@0023p1 +insert into `txu@0023p@0023p1` values (2); +select * from `txu@0023p@0023p1`; +s1 +2 select * from `txu#p#p1`; s1 1 drop table `txu#p#p1`; +drop table `txu@0023p@0023p1`; # # Bug#37631 Incorrect key file for table after upgrading from 5.0 to 5.1 # diff --git a/mysql-test/r/user_var-binlog.result b/mysql-test/r/user_var-binlog.result index 8aae1bca4f6..e6e9ddf9545 100644 --- a/mysql-test/r/user_var-binlog.result +++ b/mysql-test/r/user_var-binlog.result @@ -6,13 +6,13 @@ INSERT INTO t1 VALUES(@`a b`); set @var1= "';aaa"; SET @var2=char(ascii('a')); insert into t1 values (@var1),(@var2); -show binlog events from <binlog_start>; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # User var # # @`a b`=_latin1 X'68656C6C6F' COLLATE latin1_swedish_ci master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES(@`a b`) master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # BEGIN +master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # User var # # @`var1`=_latin1 X'273B616161' COLLATE latin1_swedish_ci master-bin.000001 # User var # # @`var2`=_binary X'61' COLLATE binary master-bin.000001 # Query # # use `test`; insert into t1 values (@var1),(@var2) @@ -23,6 +23,10 @@ flush logs; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; +BEGIN +/*!*/; +SET @`a b`:=_latin1 X'68656C6C6F' COLLATE `latin1_swedish_ci`/*!*/; +use `test`/*!*/; SET TIMESTAMP=10000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -32,17 +36,11 @@ SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/ SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -BEGIN -/*!*/; -SET @`a b`:=_latin1 X'68656C6C6F' COLLATE `latin1_swedish_ci`/*!*/; -use `test`/*!*/; -SET TIMESTAMP=10000/*!*/; INSERT INTO t1 VALUES(@`a b`) /*!*/; SET TIMESTAMP=10000/*!*/; COMMIT /*!*/; -SET TIMESTAMP=10000/*!*/; BEGIN /*!*/; SET @`var1`:=_latin1 X'273B616161' COLLATE `latin1_swedish_ci`/*!*/; diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index 2a3cdc49802..178f9fb7db4 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -126,14 +126,14 @@ select @a+0, @a:=@a+0+count(*), count(*), @a+0 from t1 group by i; set @a=0; select @a,@a:="hello",@a,@a:=3,@a,@a:="hello again" from t1 group by i; @a @a:="hello" @a @a:=3 @a @a:="hello again" -0 hello 0 3 0 hello again -0 hello 0 3 0 hello again -0 hello 0 3 0 hello again +0 hello 0 3 3 hello again +0 hello 0 3 3 hello again +0 hello 0 3 3 hello again select @a,@a:="hello",@a,@a:=3,@a,@a:="hello again" from t1 group by i; @a @a:="hello" @a @a:=3 @a @a:="hello again" -hello again hello hello again 3 hello again hello again -hello again hello hello again 3 hello again hello again -hello again hello hello again 3 hello again hello again +hello again hello hello 3 3 hello again +hello again hello hello 3 3 hello again +hello again hello hello 3 3 hello again drop table t1; set @a=_latin2'test'; select charset(@a),collation(@a),coercibility(@a); @@ -526,4 +526,47 @@ f1 f2 1 4 DROP TRIGGER trg1; DROP TABLE t1; +# +# Bug #12408412: GROUP_CONCAT + ORDER BY + INPUT/OUTPUT +# SAME USER VARIABLE = CRASH +# +SET @bug12408412=1; +SELECT GROUP_CONCAT(@bug12408412 ORDER BY 1) INTO @bug12408412; +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (0); +SELECT DISTINCT POW(COUNT(*), @a:=(SELECT 1 FROM t1 LEFT JOIN t1 AS t2 ON @a)) +AS b FROM t1 GROUP BY a; +b +1 +SELECT @a; +@a +1 +DROP TABLE t1; +CREATE TABLE t1(f1 INT, f2 INT); +INSERT INTO t1 VALUES (1,2),(2,3),(3,1); +CREATE TABLE t2(a INT); +INSERT INTO t2 VALUES (1); +SET @var=NULL; +SELECT @var:=(SELECT f2 FROM t2 WHERE @var) FROM t1 GROUP BY f1 ORDER BY f2 DESC +LIMIT 1; +@var:=(SELECT f2 FROM t2 WHERE @var) +NULL +SELECT @var; +@var +NULL +DROP TABLE t1, t2; +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (0),(1),(3); +SELECT DISTINCT POW(COUNT(distinct a), @a:=(SELECT 1 FROM t1 LEFT JOIN t1 AS t2 ON @a limit 1)) AS b FROM t1 GROUP BY a; +b +1 +SELECT @a; +@a +1 +DROP TABLE t1; End of 5.5 tests +# +# Check that used memory extends if we set a variable +# +set @var= repeat('a',20000); +1 diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 90365669229..a42c0c5abcb 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -215,10 +215,10 @@ VARIABLE_NAME VARIABLE_VALUE DEFAULT_STORAGE_ENGINE MEMORY show global variables like 'default_storage_engine'; Variable_name Value -default_storage_engine MRG_MYISAM +default_storage_engine MRG_MyISAM select * from information_schema.global_variables where variable_name like 'default_storage_engine'; VARIABLE_NAME VARIABLE_VALUE -DEFAULT_STORAGE_ENGINE MRG_MYISAM +DEFAULT_STORAGE_ENGINE MRG_MyISAM set GLOBAL myisam_max_sort_file_size=2000000; Warnings: Warning 1292 Truncated incorrect myisam_max_sort_file_size value: '2000000' @@ -565,11 +565,9 @@ select @@sql_auto_is_null; @@sql_auto_is_null 0 set sql_big_selects=1; -set sql_big_tables=1; set sql_buffer_result=1; set sql_log_bin=1; set sql_log_off=1; -set sql_low_priority_updates=1; set sql_quote_show_create=1; set sql_safe_updates=1; set sql_select_limit=1; @@ -765,9 +763,6 @@ select ifnull(@@character_set_results,"really null"); ifnull(@@character_set_results,"really null") really null set names latin1; -select @@have_innodb; -@@have_innodb -# *** Various tests with LC_TIME_NAMES *** LC_TIME_NAMES: testing case insensitivity set @@lc_time_names='ru_ru'; @@ -810,16 +805,16 @@ select @@lc_time_names; @@lc_time_names en_US LC_TIME_NAMES: testing locale with the last ID: -set lc_time_names=109; +set lc_time_names=110; select @@lc_time_names; @@lc_time_names -el_GR +rm_CH LC_TIME_NAMES: testing a number beyond the valid ID range: -set lc_time_names=110; -ERROR HY000: Unknown locale: '110' +set lc_time_names=111; +ERROR HY000: Unknown locale: '111' select @@lc_time_names; @@lc_time_names -el_GR +rm_CH LC_TIME_NAMES: testing that 0 is en_US: set lc_time_names=0; select @@lc_time_names; @@ -986,6 +981,8 @@ ssl_ca # ssl_capath # ssl_cert # ssl_cipher # +ssl_crl # +ssl_crlpath # ssl_key # select * from information_schema.session_variables where variable_name like 'ssl%' order by 1; VARIABLE_NAME VARIABLE_VALUE @@ -993,6 +990,8 @@ SSL_CA # SSL_CAPATH # SSL_CERT # SSL_CIPHER # +SSL_CRL # +SSL_CRLPATH # SSL_KEY # select @@log_queries_not_using_indexes; @@log_queries_not_using_indexes @@ -1142,12 +1141,12 @@ ERROR HY000: Variable 'ft_stopword_file' is a read only variable # SHOW VARIABLES like 'back_log'; Variable_name Value -back_log 50 +back_log 150 SELECT @@session.back_log; ERROR HY000: Variable 'back_log' is a GLOBAL variable SELECT @@global.back_log; @@global.back_log -50 +150 SET @@session.back_log= 7; ERROR HY000: Variable 'back_log' is a read only variable SET @@global.back_log= 7; @@ -1483,16 +1482,6 @@ SELECT @@GLOBAL.server_id; @@GLOBAL.server_id 0 SET GLOBAL server_id = @old_server_id; -SELECT @@GLOBAL.INIT_CONNECT, @@GLOBAL.INIT_CONNECT IS NULL; -@@GLOBAL.INIT_CONNECT @@GLOBAL.INIT_CONNECT IS NULL - 1 -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (); -SET @bug42778= @@sql_safe_updates; -SET @@sql_safe_updates= 0; -DELETE FROM t1 ORDER BY (@@GLOBAL.INIT_CONNECT) ASC LIMIT 10; -SET @@sql_safe_updates= @bug42778; -DROP TABLE t1; # # BUG#10206 - InnoDB: Transaction requiring Max_BinLog_Cache_size > 4GB always rollsback # @@ -1563,7 +1552,7 @@ one 1 explain SELECT 1 as 'one' FROM t1 GROUP BY @a:= (SELECT ROUND(f1) FROM t1 WHERE f1 = 0); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort 2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where SELECT 1 as 'one' FROM t1 GROUP BY @a:= (SELECT ROUND(f1) FROM t1 WHERE f1 = 0); one @@ -1574,7 +1563,7 @@ one set sql_buffer_result=1; explain SELECT 1 as 'one' FROM t1 GROUP BY @a:= (SELECT ROUND(f1) FROM t1 WHERE f1 = 0); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using temporary +1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort 2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where SELECT 1 as 'one' FROM t1 GROUP BY @a:= (SELECT ROUND(f1) FROM t1 WHERE f1 = 0); one diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 8bc33a8860b..5a51ea85f55 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -119,7 +119,7 @@ c 12 explain extended select c from v5; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE <derived3> ALL NULL NULL NULL NULL 5 100.00 +1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 3 DERIVED t1 ALL NULL NULL NULL NULL 5 100.00 Warnings: Note 1003 select (`v2`.`c` + 1) AS `c` from `test`.`v2` @@ -201,11 +201,11 @@ c d 2 5 3 10 drop view v100; -ERROR 42S02: Unknown table 'v100' +ERROR 42S02: Unknown table 'test.v100' drop view t1; ERROR HY000: 'test.t1' is not VIEW drop table v1; -ERROR 42S02: Unknown table 'v1' +ERROR 42S02: 'test.v1' is a view drop view v1,v2; drop table t1; create table t1 (a int); @@ -949,13 +949,13 @@ ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 'v2 update v2 set col1 = (select max(col1) from t1); ERROR HY000: The definition of table 'v2' prevents operation UPDATE on table 'v2'. update v2 set col1 = (select max(col1) from v2); -ERROR HY000: You can't specify target table 'v2' for update in FROM clause +ERROR HY000: Table 'v2' is specified twice, both as a target for 'UPDATE' and as a separate source for data update v2,t2 set v2.col1 = (select max(col1) from v1) where v2.col1 = t2.col1; ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 'v2'. update t1,t2 set t1.col1 = (select max(col1) from v1) where t1.col1 = t2.col1; ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 't1'. update v1,t2 set v1.col1 = (select max(col1) from v1) where v1.col1 = t2.col1; -ERROR HY000: You can't specify target table 'v1' for update in FROM clause +ERROR HY000: Table 'v1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t2,v2 set v2.col1 = (select max(col1) from v1) where v2.col1 = t2.col1; ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 't2'. update t2,t1 set t1.col1 = (select max(col1) from v1) where t1.col1 = t2.col1; @@ -965,17 +965,17 @@ ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 't2 update v2,t2 set v2.col1 = (select max(col1) from t1) where v2.col1 = t2.col1; ERROR HY000: The definition of table 'v2' prevents operation UPDATE on table 'v2'. update t1,t2 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1; -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data update v1,t2 set v1.col1 = (select max(col1) from t1) where v1.col1 = t2.col1; ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 'v1'. update t2,v2 set v2.col1 = (select max(col1) from t1) where v2.col1 = t2.col1; -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t2,t1 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1; -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t2,v1 set v1.col1 = (select max(col1) from t1) where v1.col1 = t2.col1; -ERROR HY000: You can't specify target table 't2' for update in FROM clause +ERROR HY000: Table 't2' is specified twice, both as a target for 'UPDATE' and as a separate source for data update v2,t2 set v2.col1 = (select max(col1) from v2) where v2.col1 = t2.col1; -ERROR HY000: You can't specify target table 'v2' for update in FROM clause +ERROR HY000: Table 'v2' is specified twice, both as a target for 'UPDATE' and as a separate source for data update t1,t2 set t1.col1 = (select max(col1) from v2) where t1.col1 = t2.col1; ERROR HY000: The definition of table 'v2' prevents operation UPDATE on table 't1'. update v1,t2 set v1.col1 = (select max(col1) from v2) where v1.col1 = t2.col1; @@ -993,27 +993,27 @@ ERROR HY000: The definition of table 'v3' prevents operation UPDATE on table 'v3 update v3 set v3.col1 = (select max(col1) from v2); ERROR HY000: The definition of table 'v2' prevents operation UPDATE on table 'v3'. update v3 set v3.col1 = (select max(col1) from v3); -ERROR HY000: You can't specify target table 'v3' for update in FROM clause +ERROR HY000: Table 'v3' is specified twice, both as a target for 'UPDATE' and as a separate source for data delete from v2 where col1 = (select max(col1) from v1); ERROR HY000: The definition of table 'v1' prevents operation DELETE on table 'v2'. delete from v2 where col1 = (select max(col1) from t1); ERROR HY000: The definition of table 'v2' prevents operation DELETE on table 'v2'. delete from v2 where col1 = (select max(col1) from v2); -ERROR HY000: You can't specify target table 'v2' for update in FROM clause +ERROR HY000: Table 'v2' is specified twice, both as a target for 'DELETE' and as a separate source for data delete v2 from v2,t2 where (select max(col1) from v1) > 0 and v2.col1 = t2.col1; ERROR HY000: The definition of table 'v1' prevents operation DELETE on table 'v2'. delete t1 from t1,t2 where (select max(col1) from v1) > 0 and t1.col1 = t2.col1; ERROR HY000: The definition of table 'v1' prevents operation DELETE on table 't1'. delete v1 from v1,t2 where (select max(col1) from v1) > 0 and v1.col1 = t2.col1; -ERROR HY000: You can't specify target table 'v1' for update in FROM clause +ERROR HY000: Table 'v1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete v2 from v2,t2 where (select max(col1) from t1) > 0 and v2.col1 = t2.col1; ERROR HY000: The definition of table 'v2' prevents operation DELETE on table 'v2'. delete t1 from t1,t2 where (select max(col1) from t1) > 0 and t1.col1 = t2.col1; -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data delete v1 from v1,t2 where (select max(col1) from t1) > 0 and v1.col1 = t2.col1; ERROR HY000: The definition of table 'v1' prevents operation DELETE on table 'v1'. delete v2 from v2,t2 where (select max(col1) from v2) > 0 and v2.col1 = t2.col1; -ERROR HY000: You can't specify target table 'v2' for update in FROM clause +ERROR HY000: Table 'v2' is specified twice, both as a target for 'DELETE' and as a separate source for data delete t1 from t1,t2 where (select max(col1) from v2) > 0 and t1.col1 = t2.col1; ERROR HY000: The definition of table 'v2' prevents operation DELETE on table 't1'. delete v1 from v1,t2 where (select max(col1) from v2) > 0 and v1.col1 = t2.col1; @@ -1027,15 +1027,15 @@ ERROR HY000: The definition of table 'v1' prevents operation INSERT on table 'v2 insert into v2 values ((select max(col1) from t1)); ERROR HY000: The definition of table 'v2' prevents operation INSERT on table 'v2'. insert into t1 values ((select max(col1) from t1)); -ERROR HY000: You can't specify target table 't1' for update in FROM clause +ERROR HY000: Table 't1' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into v2 values ((select max(col1) from t1)); ERROR HY000: The definition of table 'v2' prevents operation INSERT on table 'v2'. insert into v2 values ((select max(col1) from v2)); -ERROR HY000: You can't specify target table 'v2' for update in FROM clause +ERROR HY000: Table 'v2' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into t1 values ((select max(col1) from v2)); ERROR HY000: The definition of table 'v2' prevents operation INSERT on table 't1'. insert into v2 values ((select max(col1) from v2)); -ERROR HY000: You can't specify target table 'v2' for update in FROM clause +ERROR HY000: Table 'v2' is specified twice, both as a target for 'INSERT' and as a separate source for data insert into v3 (col1) values ((select max(col1) from v1)); ERROR HY000: The definition of table 'v1' prevents operation INSERT on table 'v3'. insert into v3 (col1) values ((select max(col1) from t1)); @@ -2890,7 +2890,7 @@ Tables_in_test t1 v1 DROP VIEW v2,v1; -ERROR 42S02: Unknown table 'v2' +ERROR 42S02: Unknown table 'test.v2' SHOW TABLES; Tables_in_test t1 @@ -2935,9 +2935,9 @@ DROP TABLE IF EXISTS t1; DROP VIEW IF EXISTS v1; DROP VIEW IF EXISTS v2; CREATE TABLE t1(a INT, b INT); -CREATE DEFINER=1234567890abcdefGHIKL@localhost +CREATE DEFINER=longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost VIEW v1 AS SELECT a FROM t1; -ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY VIEW v2 AS SELECT b FROM t1; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) @@ -3969,8 +3969,6 @@ create view a as select 1; end| call p(); call p(); -Warnings: -Error 1050 Table 'a' already exists drop view a; drop procedure p; # @@ -4257,6 +4255,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -4280,6 +4279,7 @@ Handler_read_key 1 Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 +Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 Handler_read_rnd_next 17 @@ -4601,8 +4601,8 @@ f1 f1 1 1 EXPLAIN EXTENDED SELECT * FROM v2 AS a1, v2 AS a2; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE <derived3> ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort -1 SIMPLE <derived5> ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join) +1 PRIMARY <derived3> ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort +1 PRIMARY <derived5> ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join) 5 DERIVED t1 ALL NULL NULL NULL NULL 2 100.00 3 DERIVED t1 ALL NULL NULL NULL NULL 2 100.00 Warnings: @@ -5432,6 +5432,7 @@ DROP FUNCTION f1; DROP VIEW v1; DROP TABLE t1, t2; create view v1 as select 1; +FOUND /mariadb-version/ in v1.frm drop view v1; # # MDEV-7260: Crash in get_best_combination when executing multi-table @@ -5646,4 +5647,391 @@ drop table t1; # ----------------------------------------------------------------- # -- End of 5.5 tests. # ----------------------------------------------------------------- +# some subqueries in SELECT list test +create table t1 (a int, b int); +create table t2 (a int, b int); +insert into t1 values (1,2), (3,4), (3,3), (5,6), (7,8), (9,10); +insert into t2 values (1,2), (3,4), (3,3), (5,6), (7,8), (9,10); +create algorithm=merge view v1 as select t1.a as a, (select max(b) from t2 where t1.a=t2.a) as c from t1; +explain extended +select * from v1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 +3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 6 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2 +Note 1003 select `test`.`t1`.`a` AS `a`,(select max(`test`.`t2`.`b`) from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)) AS `c` from `test`.`t1` +select * from v1; +a c +1 2 +3 4 +3 4 +5 6 +7 8 +9 10 +explain extended +select * from t2, v1 where t2.a=v1.a; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 6 100.00 +1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join) +3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 6 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2 +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t1`.`a` AS `a`,(select max(`test`.`t2`.`b`) from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)) AS `c` from `test`.`t2` join `test`.`t1` where (`test`.`t1`.`a` = `test`.`t2`.`a`) +select * from t2, v1 where t2.a=v1.a; +a b a c +1 2 1 2 +3 4 3 4 +3 3 3 4 +3 4 3 4 +3 3 3 4 +5 6 5 6 +7 8 7 8 +9 10 9 10 +explain extended +select * from t1, v1 where t1.a=v1.a; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 +1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join) +3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 6 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2 +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`a` AS `a`,(select max(`test`.`t2`.`b`) from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)) AS `c` from `test`.`t1` join `test`.`t1` where (`test`.`t1`.`a` = `test`.`t1`.`a`) +select * from t1, v1 where t1.a=v1.a; +a b a c +1 2 1 2 +3 4 3 4 +3 3 3 4 +3 4 3 4 +3 3 3 4 +5 6 5 6 +7 8 7 8 +9 10 9 10 +explain extended +select * from t1, v1 where t1.b=v1.c; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 +1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join) +3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 6 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2 +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`a` AS `a`,(select max(`test`.`t2`.`b`) from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)) AS `c` from `test`.`t1` join `test`.`t1` where (`test`.`t1`.`b` = (select max(`test`.`t2`.`b`) from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`))) +select * from t1, v1 where t1.b=v1.c; +a b a c +1 2 1 2 +3 4 3 4 +3 4 3 4 +5 6 5 6 +7 8 7 8 +9 10 9 10 +explain extended +select * from t2, t1, v1 where t1.a=t2.a and t1.a=v1.a; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 6 100.00 +1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join) +1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (incremental, BNL join) +3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 6 100.00 Using where +Warnings: +Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2 +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`a` AS `a`,(select max(`test`.`t2`.`b`) from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)) AS `c` from `test`.`t2` join `test`.`t1` join `test`.`t1` where ((`test`.`t1`.`a` = `test`.`t2`.`a`) and (`test`.`t1`.`a` = `test`.`t2`.`a`)) +select * from t2, t1, v1 where t1.a=t2.a and t1.a=v1.a; +a b a b a c +1 2 1 2 1 2 +3 4 3 4 3 4 +3 3 3 4 3 4 +3 4 3 3 3 4 +3 3 3 3 3 4 +3 4 3 4 3 4 +3 3 3 4 3 4 +3 4 3 3 3 4 +3 3 3 3 3 4 +5 6 5 6 5 6 +7 8 7 8 7 8 +9 10 9 10 9 10 +drop view v1; +drop table t1,t2; +create table t1 (i int not null); +insert into t1 values (1),(2); +create table t2 (j int not null); +insert into t2 values (11),(12); +create algorithm=merge view v3 as select t1.* from t2 left join t1 on (t2.j = t1.i); +prepare stmt from 'select count(v3.i) from t1, v3'; +execute stmt; +count(v3.i) +0 +execute stmt; +count(v3.i) +0 +drop table t1, t2; +drop view v3; +# +# MDEV-8525: mariadb 10.0.20 crashing when data is read by Kodi +# media center (http://kodi.tv). +# +CREATE TABLE `t1` ( +`idSong` int(11) NOT NULL AUTO_INCREMENT, +`idAlbum` int(11) DEFAULT NULL, +`idPath` int(11) DEFAULT NULL, +`strArtists` text, +`strGenres` text, +`strTitle` varchar(512) DEFAULT NULL, +`iTrack` int(11) DEFAULT NULL, +`iDuration` int(11) DEFAULT NULL, +`iYear` int(11) DEFAULT NULL, +`dwFileNameCRC` text, +`strFileName` text, +`strMusicBrainzTrackID` text, +`iTimesPlayed` int(11) DEFAULT NULL, +`iStartOffset` int(11) DEFAULT NULL, +`iEndOffset` int(11) DEFAULT NULL, +`idThumb` int(11) DEFAULT NULL, +`lastplayed` varchar(20) DEFAULT NULL, +`rating` char(1) DEFAULT '0', +`comment` text, +`mood` text, +PRIMARY KEY (`idSong`), +UNIQUE KEY `idxSong7` (`idAlbum`,`strMusicBrainzTrackID`(36)), +KEY `idxSong` (`strTitle`(255)), +KEY `idxSong1` (`iTimesPlayed`), +KEY `idxSong2` (`lastplayed`), +KEY `idxSong3` (`idAlbum`), +KEY `idxSong6` (`idPath`,`strFileName`(255)) +) DEFAULT CHARSET=utf8; +INSERT INTO `t1` VALUES (1,1,1,'strArtists1','strGenres1','strTitle1',1,100,2000,NULL,'strFileName1','strMusicBrainzTrackID1',0,0,0,NULL,NULL,'0','',''),(2,2,2,'strArtists2','strGenres2','strTitle2',2,200,2001,NULL,'strFileName2','strMusicBrainzTrackID2',0,0,0,NULL,NULL,'0','',''); +CREATE TABLE `t2` ( +`idAlbum` int(11) NOT NULL AUTO_INCREMENT, +`strAlbum` varchar(256) DEFAULT NULL, +`strMusicBrainzAlbumID` text, +`strArtists` text, +`strGenres` text, +`iYear` int(11) DEFAULT NULL, +`idThumb` int(11) DEFAULT NULL, +`bCompilation` int(11) NOT NULL DEFAULT '0', +`strMoods` text, +`strStyles` text, +`strThemes` text, +`strReview` text, +`strImage` text, +`strLabel` text, +`strType` text, +`iRating` int(11) DEFAULT NULL, +`lastScraped` varchar(20) DEFAULT NULL, +`dateAdded` varchar(20) DEFAULT NULL, +`strReleaseType` text, +PRIMARY KEY (`idAlbum`), +UNIQUE KEY `idxAlbum_2` (`strMusicBrainzAlbumID`(36)), +KEY `idxAlbum` (`strAlbum`(255)), +KEY `idxAlbum_1` (`bCompilation`) +) DEFAULT CHARSET=utf8; +INSERT INTO `t2` VALUES (1,'strAlbum1','strMusicBrainzAlbumID1','strArtists1','strGenres1',2000,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'album'); +CREATE TABLE `t3` ( +`idArtist` int(11) DEFAULT NULL, +`idAlbum` int(11) DEFAULT NULL, +`strJoinPhrase` text, +`boolFeatured` int(11) DEFAULT NULL, +`iOrder` int(11) DEFAULT NULL, +`strArtist` text, +UNIQUE KEY `idxAlbumArtist_1` (`idAlbum`,`idArtist`), +UNIQUE KEY `idxAlbumArtist_2` (`idArtist`,`idAlbum`), +KEY `idxAlbumArtist_3` (`boolFeatured`) +) DEFAULT CHARSET=utf8; +INSERT INTO `t3` VALUES (1,1,'',0,0,'strArtist1'); +CREATE TABLE `t4` ( +`idArtist` int(11) NOT NULL AUTO_INCREMENT, +`strArtist` varchar(256) DEFAULT NULL, +`strMusicBrainzArtistID` text, +`strBorn` text, +`strFormed` text, +`strGenres` text, +`strMoods` text, +`strStyles` text, +`strInstruments` text, +`strBiography` text, +`strDied` text, +`strDisbanded` text, +`strYearsActive` text, +`strImage` text, +`strFanart` text, +`lastScraped` varchar(20) DEFAULT NULL, +`dateAdded` varchar(20) DEFAULT NULL, +PRIMARY KEY (`idArtist`), +UNIQUE KEY `idxArtist1` (`strMusicBrainzArtistID`(36)), +KEY `idxArtist` (`strArtist`(255)) +) DEFAULT CHARSET=utf8; +INSERT INTO `t4` VALUES (1,'strArtist1','strMusicBrainzArtistID',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +CREATE VIEW `v1` AS select `t2`.`idAlbum` AS `idAlbum`,`t2`.`strAlbum` AS `strAlbum`,`t2`.`strMusicBrainzAlbumID` AS `strMusicBrainzAlbumID`,`t2`.`strArtists` AS `strArtists`,`t2`.`strGenres` AS `strGenres`,`t2`.`iYear` AS `iYear`,`t2`.`strMoods` AS `strMoods`,`t2`.`strStyles` AS `strStyles`,`t2`.`strThemes` AS `strThemes`,`t2`.`strReview` AS `strReview`,`t2`.`strLabel` AS `strLabel`,`t2`.`strType` AS `strType`,`t2`.`strImage` AS `strImage`,`t2`.`iRating` AS `iRating`,`t2`.`bCompilation` AS `bCompilation`,(select min(`t1`.`iTimesPlayed`) from `t1` where (`t1`.`idAlbum` = `t2`.`idAlbum`)) AS `iTimesPlayed`,`t2`.`strReleaseType` AS `strReleaseType` from `t2`; +CREATE VIEW `v2` AS select `t3`.`idAlbum` AS `idAlbum`,`t3`.`idArtist` AS `idArtist`,`t4`.`strArtist` AS `strArtist`,`t4`.`strMusicBrainzArtistID` AS `strMusicBrainzArtistID`,`t3`.`boolFeatured` AS `boolFeatured`,`t3`.`strJoinPhrase` AS `strJoinPhrase`,`t3`.`iOrder` AS `iOrder` from (`t3` join `t4` on((`t3`.`idArtist` = `t4`.`idArtist`))); +SELECT v1.*,v2.* FROM v1 LEFT JOIN v2 ON v1.idAlbum = v2.idAlbum WHERE v1.idAlbum = 1 ORDER BY v2.iOrder; +idAlbum strAlbum strMusicBrainzAlbumID strArtists strGenres iYear strMoods strStyles strThemes strReview strLabel strType strImage iRating bCompilation iTimesPlayed strReleaseType idAlbum idArtist strArtist strMusicBrainzArtistID boolFeatured strJoinPhrase iOrder +1 strAlbum1 strMusicBrainzAlbumID1 strArtists1 strGenres1 2000 NULL NULL NULL NULL NULL NULL NULL NULL 0 0 album 1 1 strArtist1 strMusicBrainzArtistID 0 0 +drop view v1,v2; +drop table t1,t2,t3,t4; +# +# MDEV-8913: Derived queries with same column names as final +# projection causes issues when using Order By +# +create table t1 (field int); +insert into t1 values (10),(5),(3),(8),(20); +SELECT sq.f2 AS f1, sq.f1 AS f2 +FROM ( SELECT field AS f1, 1 AS f2 FROM t1) AS sq +ORDER BY sq.f1; +f1 f2 +1 3 +1 5 +1 8 +1 10 +1 20 +create view v1 as SELECT field AS f1, 1 AS f2 FROM t1; +SELECT sq.f2 AS f1, sq.f1 AS f2 +FROM v1 AS sq +ORDER BY sq.f1; +f1 f2 +1 3 +1 5 +1 8 +1 10 +1 20 +drop view v1; +create table t2 SELECT field AS f1, 1 AS f2 FROM t1; +SELECT +sq.f2 AS f1, +sq.f1 AS f2 +FROM t2 AS sq +ORDER BY sq.f1; +f1 f2 +1 3 +1 5 +1 8 +1 10 +1 20 +drop table t1, t2; +SELECT 1 FROM (SELECT 1 as a) AS b HAVING (SELECT `SOME_GARBAGE`.b.a)=1; +ERROR 42S22: Unknown column 'SOME_GARBAGE.b.a' in 'field list' +# +# MDEV-10035: DBUG_ASSERT on CREATE VIEW v1 AS SELECT * FROM t1 +# FOR UPDATE +# +CREATE TABLE t1 (a INT); +insert into t1 values (1),(2); +CREATE VIEW v1 AS SELECT * FROM t1 FOR UPDATE; +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` for update latin1 latin1_swedish_ci +select * from v1; +a +1 +2 +DROP VIEW v1; +CREATE VIEW v1 AS SELECT * FROM t1 LOCK IN SHARE MODE; +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` lock in share mode latin1 latin1_swedish_ci +select * from v1; +a +1 +2 +DROP VIEW v1; +DROP TABLE t1; +# +# MDEV-8642: WHERE Clause not applied on View - Empty result set returned +# +CREATE TABLE `t1` ( +`id` int(20) NOT NULL AUTO_INCREMENT, +`use_case` int(11) DEFAULT NULL, +`current_deadline` date DEFAULT NULL, +`ts_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, +PRIMARY KEY (`id`), +UNIQUE KEY `id_UNIQUE` (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=13976 DEFAULT CHARSET=latin1; +INSERT INTO `t1` VALUES (1,10,'2015-12-18','2015-08-18 08:38:16'); +INSERT INTO `t1` VALUES (2,20,'2015-10-18','2015-08-18 08:43:30'); +CREATE VIEW v1 AS SELECT +use_case as use_case_id, +( +SELECT +deadline_sub.current_deadline +FROM +t1 deadline_sub +WHERE +deadline_sub.use_case = use_case_id +AND ts_create = (SELECT +MIN(ts_create) +FROM +t1 startdate_sub +WHERE +startdate_sub.use_case = use_case_id +) +) AS InitialDeadline +FROM +t1; +SELECT * FROM v1 where use_case_id = 10; +use_case_id InitialDeadline +10 2015-12-18 +drop view v1; +drop table t1; +# +# MDEV-12666: CURRENT_ROLE() and DATABASE() does not work in a view +# +# DATABASE() fails only when the initial view creation features a NULL +# default database. +# +# CREATE, USE and DROP database so that we have no "default" database. +# +CREATE DATABASE temporary; +USE temporary; +DROP DATABASE temporary; +SELECT DATABASE(); +DATABASE() +NULL +CREATE VIEW test.v_no_db AS SELECT DATABASE() = 'temporary_two'; +SHOW CREATE VIEW test.v_no_db; +View Create View character_set_client collation_connection +v_no_db CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test`.`v_no_db` AS select (database() = 'temporary_two') AS `DATABASE() = 'temporary_two'` latin1 latin1_swedish_ci +PREPARE prepared_no_database FROM "SELECT DATABASE() = 'temporary_two'"; +# +# All statements should return NULL +# +EXECUTE prepared_no_database; +DATABASE() = 'temporary_two' +NULL +SELECT DATABASE() = 'temporary_two'; +DATABASE() = 'temporary_two' +NULL +SELECT * FROM test.v_no_db; +DATABASE() = 'temporary_two' +NULL +CREATE DATABASE temporary_two; +USE temporary_two; +CREATE VIEW test.v_with_db AS SELECT DATABASE() = 'temporary_two'; +PREPARE prepared_with_database FROM "SELECT DATABASE() = 'temporary_two'"; +# +# All statements should return 1; +# +SELECT DATABASE() = 'temporary_two'; +DATABASE() = 'temporary_two' +1 +SELECT * FROM test.v_no_db; +DATABASE() = 'temporary_two' +1 +SELECT * FROM test.v_with_db; +DATABASE() = 'temporary_two' +1 +EXECUTE prepared_with_database; +DATABASE() = 'temporary_two' +1 +# +# Prepared statements maintain default database to be the same +# during on creation so this should return NULL still. +# See MySQL bug #25843 +# +EXECUTE prepared_no_database; +DATABASE() = 'temporary_two' +NULL +DROP DATABASE temporary_two; +DROP VIEW test.v_no_db; +DROP VIEW test.v_with_db; +USE test; +# ----------------------------------------------------------------- +# -- End of 10.0 tests. +# ----------------------------------------------------------------- SET optimizer_switch=@save_optimizer_switch; diff --git a/mysql-test/r/view_alias.result b/mysql-test/r/view_alias.result index 72c4bf29f25..e07b40dba13 100644 --- a/mysql-test/r/view_alias.result +++ b/mysql-test/r/view_alias.result @@ -109,3 +109,11 @@ DROP VIEW v1; CREATE VIEW v1 AS select `test`.`t1`.`a` AS `a` from `test`.`t1` where exists(select ' a ' AS `alias` from `test`.`t1` group by ' a '); DROP VIEW v1; DROP TABLE t1, t2; +create view v1 as select interval(55,10) as my_col; +show create view v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select interval(55,10) AS `my_col` latin1 latin1_swedish_ci +select * from v1; +my_col +1 +drop view v1; diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index ac09c19a4b4..8f0ffdda742 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -357,13 +357,9 @@ use mysqltest; select * from v1; f2() NULL -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed select * from v2; f2() NULL -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed select * from v3; ERROR HY000: View 'mysqltest.v3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them select * from v4; @@ -403,13 +399,9 @@ ERROR HY000: View 'mysqltest.v2' references invalid table(s) or column(s) or fun select * from v3; f2() NULL -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed select * from v4; f2() NULL -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed select * from v5; ERROR HY000: View 'mysqltest.v5' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them drop view v1, v2, v3, v4, v5; @@ -531,13 +523,13 @@ drop user mysqltest_1@localhost; drop database mysqltest; create definer=some_user@`` sql security invoker view v1 as select 1; Warnings: -Note 1449 The user specified as a definer ('some_user'@'') does not exist +Note 1449 The user specified as a definer ('some_user'@'%') does not exist create definer=some_user@localhost sql security invoker view v2 as select 1; Warnings: Note 1449 The user specified as a definer ('some_user'@'localhost') does not exist show create view v1; View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`some_user`@`` SQL SECURITY INVOKER VIEW `v1` AS select 1 AS `1` latin1 latin1_swedish_ci +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`some_user`@`%` SQL SECURITY INVOKER VIEW `v1` AS select 1 AS `1` latin1 latin1_swedish_ci show create view v2; View Create View character_set_client collation_connection v2 CREATE ALGORITHM=UNDEFINED DEFINER=`some_user`@`localhost` SQL SECURITY INVOKER VIEW `v2` AS select 1 AS `1` latin1 latin1_swedish_ci @@ -1583,3 +1575,152 @@ USE test; DROP DATABASE mysqltest1; DROP USER 'mysqluser1'@'%'; DROP USER 'mysqluser2'@'%'; +# +# Test for bug #11766767 - "59957: VIEW USING MERGE PERMISSIONS +# IN MULTI-TABLE UPDATE". +# +drop database if exists mysqltest1; +drop database if exists mysqltest2; +# +# Prepare playground. +create database mysqltest1; +create database mysqltest2; +create user user_11766767; +grant select on mysqltest1.* to user_11766767; +grant all on mysqltest2.* to user_11766767; +use mysqltest1; +create table t1 (id int primary key, val varchar(20)); +insert into t1 values (1, 'test1'); +create table t11 (id int primary key); +insert into t11 values (1); +create algorithm=temptable view v1_temp as select * from t1; +create algorithm=merge view v1_merge as select * from t1; +create algorithm=temptable view v11_temp as +select t1.id as id, t1.val as val from t1, t11 where t1.id= t11.id; +create algorithm=merge view v11_merge as +select t1.id as id, t1.val as val from t1, t11 where t1.id= t11.id; +use mysqltest2; +create table t2 (id int primary key, val varchar(20)); +insert into t2 values (1, 'test2'); +create table t21 (id int primary key); +insert into t21 values (1); +create algorithm=temptable view v2_temp as select * from t2; +create algorithm=merge view v2_merge as select * from t2; +create algorithm=temptable view v21_temp as +select t2.id as id, t2.val as val from t2, t21 where t2.id= t21.id; +create algorithm=merge view v21_merge as +select t2.id as id, t2.val as val from t2, t21 where t2.id= t21.id; +create algorithm=temptable sql security invoker view v3_temp as +select t1.id as id, t1.val as val from mysqltest1.t1 as t1, mysqltest1.t11 as t11 +where t1.id = t11.id; +create algorithm=merge sql security invoker view v3_merge as +select t1.id as id, t1.val as val from mysqltest1.t1 as t1, mysqltest1.t11 as t11 +where t1.id = t11.id; +create sql security invoker view v31 as +select t2.id as id, t2.val as val from mysqltest2.t2 as t2, mysqltest1.t11 as t11 +where t2.id = t11.id; +create sql security invoker view v4 as +select t2.id as id, t2.val as val from mysqltest2.t2 as t2, mysqltest1.v1_merge as v1 +where t2.id = v1.id; +create sql security invoker view v41 as +select v1.id as id, v1.val as val from mysqltest2.t2 as t2, mysqltest1.v1_merge as v1 +where t2.id = v1.id; +create sql security invoker view v42 as +select v2.id as id, v2.val as val from mysqltest2.t2 as t2, mysqltest2.v2_merge as v2 +where t2.id = v2.id; +# +# Connect as user_11766767 +# +# A) Check how we handle privilege checking in multi-update for +# directly used views. +# +# A.1) Originally reported problem, view is used in read-only mode. +# This should work with only SELECT privilege for both mergeable +# and temptable algorithms. +update mysqltest2.t2 as t2, mysqltest1.v1_merge as v1 set t2.val= 'test3' + where t2.id= v1.id; +update mysqltest2.t2 as t2, mysqltest1.v1_temp as v1 set t2.val= 'test4' + where t2.id= v1.id; +# +# A.2) If view is updated an UPDATE privilege on it is required. +# Temptable views can't be updated. +update mysqltest2.t2 as t2, mysqltest1.v1_merge as v1 set v1.val= 'test5' + where t2.id= v1.id; +ERROR 42000: UPDATE command denied to user 'user_11766767'@'localhost' for table 'v1_merge' +update mysqltest1.t1 as t1, mysqltest2.v2_merge as v2 set v2.val= 'test6' + where t1.id= v2.id; +# +# Note that the below error is OK even though user lacks UPDATE +# privilege on v1_temp since he/she still has SELECT privilege on +# this view. +update mysqltest2.t2 as t2, mysqltest1.v1_temp as v1 set v1.val= 'test7' + where t2.id= v1.id; +ERROR HY000: The target table v1 of the UPDATE is not updatable +update mysqltest1.t1 as t1, mysqltest2.v2_temp as v2 set v2.val= 'test8' + where t1.id= v2.id; +ERROR HY000: The target table v2 of the UPDATE is not updatable +# +# A.3) This also works for correctly for multi-table views. +# When usage is read-only SELECT is enough. +update mysqltest2.t2 as t2, mysqltest1.v11_merge as v11 set t2.val= 'test9' + where t2.id= v11.id; +update mysqltest2.t2 as t2, mysqltest1.v11_temp as v11 set t2.val= 'test10' + where t2.id= v11.id; +# When one of view's tables is updated, UPDATE is required +# on a view. +update mysqltest2.t2 as t2, mysqltest1.v11_merge as v11 set v11.val= 'test11' + where t2.id= v11.id; +ERROR 42000: UPDATE command denied to user 'user_11766767'@'localhost' for table 'v11_merge' +update mysqltest1.t1 as t1, mysqltest2.v21_merge as v21 set v21.val= 'test12' + where t1.id= v21.id; +# As before, temptable views are not updateable. +update mysqltest2.t2 as t2, mysqltest1.v11_temp as v11 set v11.val= 'test13' + where t2.id= v11.id; +ERROR HY000: The target table v11 of the UPDATE is not updatable +update mysqltest1.t1 as t1, mysqltest2.v21_temp as v21 set v21.val= 'test14' + where t1.id= v21.id; +ERROR HY000: The target table v21 of the UPDATE is not updatable +# +# B) Now check that correct privileges are required on underlying +# tables. To simplify this part of test we will use SECURITY +# INVOKER views in it. +# +# B.1) In case when view is used for read only it is enough to have +# SELECT on its underlying tables. +update mysqltest2.t2 as t2, mysqltest2.v3_merge as v3 set t2.val= 'test15' + where t2.id= v3.id; +update mysqltest2.t2 as t2, mysqltest2.v3_temp as v3 set t2.val= 'test16' + where t2.id= v3.id; +# +# B.2) If view is updated, UPDATE privilege on the table being updated +# is required (since we already checked that temptable views are +# not updateable we don't test them here). +update mysqltest2.t2 as t2, mysqltest2.v3_merge as v3 set v3.val= 'test17' + where t2.id= v3.id; +ERROR HY000: View 'mysqltest2.v3_merge' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +update mysqltest1.t11 as t11, mysqltest2.v31 as v31 set v31.val= 'test18' + where t11.id= v31.id; +# +# C) Finally, check how we handle privilege checking in case when +# view is used through another view. Again we will use SECURITY +# INVOKER views for simplicity. +# +# C.1) As usual, when a view used by another view is going to be used +# in read-only fashion, only SELECT privilege is necessary. +update mysqltest1.t11 as t11, mysqltest2.v4 as v4 set v4.val= 'test19' + where t11.id= v4.id; +# +# C.2) If one of underlying tables of the view is updated then +# UPDATE on a view is necessary. +update mysqltest1.t11 as t11, mysqltest2.v41 as v4 set v4.val= 'test20' + where t11.id= v4.id; +ERROR HY000: View 'mysqltest2.v41' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +update mysqltest1.t11 as t11, mysqltest2.v42 as v4 set v4.val= 'test20' + where t11.id= v4.id; +# +# Clean-up. +# +# Switching to connection 'default'. +drop user user_11766767; +drop database mysqltest1; +drop database mysqltest2; diff --git a/mysql-test/r/wait_timeout_not_windows.result b/mysql-test/r/wait_timeout_not_windows.result index df70aa99221..867787a8ed3 100644 --- a/mysql-test/r/wait_timeout_not_windows.result +++ b/mysql-test/r/wait_timeout_not_windows.result @@ -1,3 +1,4 @@ set global log_warnings=2; set @@wait_timeout=1; +FOUND /Aborted.*Got timeout reading communication packets/ in mysqld.1.err set global log_warnings=@@log_warnings; diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index e033b358b6b..b4b345ca260 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -48,13 +48,13 @@ drop table t1; set SQL_WARNINGS=0; drop temporary table if exists not_exists; Warnings: -Note 1051 Unknown table 'not_exists' +Note 1051 Unknown table 'test.not_exists' drop table if exists not_exists_table; Warnings: -Note 1051 Unknown table 'not_exists_table' +Note 1051 Unknown table 'test.not_exists_table' show warnings limit 1; Level Code Message -Note 1051 Unknown table 'not_exists_table' +Note 1051 Unknown table 'test.not_exists_table' drop database if exists not_exists_db; Warnings: Note 1008 Can't drop database 'not_exists_db'; database doesn't exist @@ -311,10 +311,10 @@ insert into t2 values(@q); ERROR 22001: Data too long for column 'c_tinyblob' at row 1 drop table t1, t2; DROP TABLE t1; -ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1' SHOW ERRORS; Level Code Message -Error 1051 Unknown table 't1' +Error 1051 Unknown table 'test.t1' End of 5.0 tests set sql_mode = default; select CAST(a AS DECIMAL(13,5)) FROM (SELECT '' as a) t; diff --git a/mysql-test/r/windows.require b/mysql-test/r/windows.require deleted file mode 100644 index 09aae1ed1d0..00000000000 --- a/mysql-test/r/windows.require +++ /dev/null @@ -1,2 +0,0 @@ -TRUE -1 diff --git a/mysql-test/r/xa_binlog.result b/mysql-test/r/xa_binlog.result index 3ce64953902..619a6e08b20 100644 --- a/mysql-test/r/xa_binlog.result +++ b/mysql-test/r/xa_binlog.result @@ -18,15 +18,15 @@ a 1 2 3 -SHOW BINLOG EVENTS LIMIT 1,9; +SHOW BINLOG EVENTS LIMIT 3,9; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # BEGIN +master-bin.000001 # Gtid 1 # BEGIN GTID #-#-# master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1) master-bin.000001 # Query 1 # COMMIT -master-bin.000001 # Query 1 # BEGIN +master-bin.000001 # Gtid 1 # BEGIN GTID #-#-# master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (2) master-bin.000001 # Query 1 # COMMIT -master-bin.000001 # Query 1 # BEGIN +master-bin.000001 # Gtid 1 # BEGIN GTID #-#-# master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (3) master-bin.000001 # Xid 1 # COMMIT /* xid=XX */ DROP TABLE t1; diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result index 056ea62ee97..24b95f0e204 100644 --- a/mysql-test/r/xml.result +++ b/mysql-test/r/xml.result @@ -1183,5 +1183,90 @@ SELECT ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,..)'); ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,..)') # +# Bug#62429 XML: ExtractValue, UpdateXML max arg length 127 chars +# +CREATE TABLE t1 (id INT AUTO_INCREMENT, txt VARCHAR(1000), PRIMARY KEY(id)); +INSERT INTO t1 (txt) VALUES +(CONCAT('<', REPEAT('a',127), '>127</', REPEAT('a',127), '>')), +(CONCAT('<', REPEAT('a',128), '>128</', REPEAT('a',128), '>')), +(CONCAT('<', REPEAT('a',63), '><', REPEAT('b',63), '>63/63</', REPEAT('b',63), '></', REPEAT('a',63),'>')), +(CONCAT('<', REPEAT('a',63), '><', REPEAT('b',64), '>63/64</', REPEAT('b',64), '></', REPEAT('a',63),'>')); +SELECT +txt, +EXTRACTVALUE(txt, CONCAT('/', REPEAT('a', 127))) as a127, +EXTRACTVALUE(txt, CONCAT('/', REPEAT('a', 128))) as a128, +EXTRACTVALUE(txt, CONCAT('//', REPEAT('b', 63))) as a63b63, +EXTRACTVALUE(txt, CONCAT('//', REPEAT('b', 64))) as a63b64 +FROM t1; +txt <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>127</aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> +a127 127 +a128 +a63b63 +a63b64 +txt <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>128</aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> +a127 +a128 128 +a63b63 +a63b64 +txt <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa><bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb>63/63</bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb></aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> +a127 +a128 +a63b63 63/63 +a63b64 +txt <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa><bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb>63/64</bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb></aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> +a127 +a128 +a63b63 +a63b64 63/64 +SELECT UPDATEXML(txt, CONCAT('//', REPEAT('b', 63)), '63/63+') FROM t1; +UPDATEXML(txt, CONCAT('//', REPEAT('b', 63)), '63/63+') <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>127</aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> +UPDATEXML(txt, CONCAT('//', REPEAT('b', 63)), '63/63+') <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>128</aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> +UPDATEXML(txt, CONCAT('//', REPEAT('b', 63)), '63/63+') <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>63/63+</aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> +UPDATEXML(txt, CONCAT('//', REPEAT('b', 63)), '63/63+') <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa><bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb>63/64</bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb></aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> +DROP TABLE t1; +CREATE TABLE t1 (a TEXT); +INSERT INTO t1 VALUES (CONCAT('<a><', REPEAT('b',128),'>b128</',REPEAT('b',128),'><',REPEAT('c',512),'>c512</',REPEAT('c',512),'></a>')); +SELECT ExtractValue (a, CONCAT('//',REPEAT('c',512))) AS c512 FROM t1; +c512 c512 +DROP TABLE t1; +# # End of 5.5 tests # +# +# Start of 10.0 tests +# +# +# MDEV-5689 ExtractValue(xml, 'substring(/x,/y)') crashes +# +SELECT ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,..)') AS e; +e + +SELECT ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,/a/c)') AS e; +e +bc +SELECT ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,/a/d)') AS e; +e +abc +SELECT ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,/a/c,/a/d)') AS e; +e +b +SELECT ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,/a/d,/a/c)') AS e; +e +ab +# +# MDEV-5709 ExtractValue() with XPath variable references returns wrong result +# +CREATE TABLE t1 (c1 INT, c2 VARCHAR(10)); +INSERT INTO t1 VALUES (1,'b1'),(2,'b2'); +SELECT *,IF(@i:=c1,ExtractValue('<a><b>b1</b><b>b2</b></a>','//b[$@i]'),0) AS xpath FROM t1; +c1 c2 xpath +1 b1 b1 +2 b2 b2 +SELECT * FROM t1 WHERE c2=IF(@i:=c1,ExtractValue('<a><b>b1</b><b>b2</b></a>','//b[$@i]'),0); +c1 c2 +1 b1 +2 b2 +DROP TABLE t1; +# +# End of 10.0 tests +# |