summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/binlog/disabled.def2
-rw-r--r--mysql-test/suite/binlog/r/binlog_spurious_ddl_errors.result7
-rw-r--r--mysql-test/suite/binlog/r/binlog_truncate_innodb.result185
-rw-r--r--mysql-test/suite/binlog/t/binlog_spurious_ddl_errors-master.opt1
-rw-r--r--mysql-test/suite/binlog/t/binlog_spurious_ddl_errors.test1
-rw-r--r--mysql-test/suite/binlog/t/binlog_truncate_innodb-master.opt1
-rw-r--r--mysql-test/suite/binlog/t/binlog_truncate_innodb.test3
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_semi_sync.result19
-rw-r--r--mysql-test/suite/federated/federatedx.result26
-rw-r--r--mysql-test/suite/federated/federatedx.test29
-rw-r--r--mysql-test/suite/funcs_1/r/is_check_constraints.result5
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_is.result4
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_is_embedded.result4
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_is.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_is_embedded.result8
-rw-r--r--mysql-test/suite/funcs_1/t/is_check_constraints.test4
-rw-r--r--mysql-test/suite/galera/r/galera#500.result2
-rw-r--r--mysql-test/suite/galera/t/galera#500.test5
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_fk.result28
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_fk.test37
-rw-r--r--mysql-test/suite/innodb/r/innodb_multi_update.result1
-rw-r--r--mysql-test/suite/innodb/t/innodb_multi_update.test1
-rw-r--r--mysql-test/suite/rpl/include/rpl_semi_sync.inc72
-rw-r--r--mysql-test/suite/rpl/r/rpl_semi_sync.result19
-rw-r--r--mysql-test/suite/rpl/r/rpl_semi_sync_after_sync.result19
-rw-r--r--mysql-test/suite/rpl/r/rpl_semi_sync_after_sync_row.result19
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_retry.test3
-rw-r--r--mysql-test/suite/sys_vars/r/max_sort_length_basic.result199
-rw-r--r--mysql-test/suite/sys_vars/r/max_sort_length_func.result442
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded.result6
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result6
-rw-r--r--mysql-test/suite/sys_vars/t/max_sort_length_basic.test225
-rw-r--r--mysql-test/suite/sys_vars/t/max_sort_length_func.test157
33 files changed, 577 insertions, 971 deletions
diff --git a/mysql-test/suite/binlog/disabled.def b/mysql-test/suite/binlog/disabled.def
index 424e5549541..888298bbb09 100644
--- a/mysql-test/suite/binlog/disabled.def
+++ b/mysql-test/suite/binlog/disabled.def
@@ -9,5 +9,3 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
-binlog_truncate_innodb : BUG#11764459 2010-10-20 anitha Originally disabled due to BUG#42643. Product bug fixed, but test changes needed
-binlog_spurious_ddl_errors : BUG#11761680 2013-01-18 astha Fixed on mysql-5.6 and trunk
diff --git a/mysql-test/suite/binlog/r/binlog_spurious_ddl_errors.result b/mysql-test/suite/binlog/r/binlog_spurious_ddl_errors.result
index 1a81eee1a58..798bd8ab853 100644
--- a/mysql-test/suite/binlog/r/binlog_spurious_ddl_errors.result
+++ b/mysql-test/suite/binlog/r/binlog_spurious_ddl_errors.result
@@ -1,5 +1,5 @@
SET @old_binlog_format= @@global.binlog_format;
-INSTALL PLUGIN example SONAME 'ha_example.so';
+INSTALL PLUGIN example SONAME 'ha_example';
################################################################################
# Verifies if ER_BINLOG_STMT_MODE_AND_ROW_ENGINE happens by setting the binlog
# format to STATEMENT and the transaction isolation level to READ COMMITTED as
@@ -18,7 +18,7 @@ ALTER TABLE t_row ADD COLUMN b INT;
CREATE TRIGGER trig_row BEFORE INSERT ON t_row FOR EACH ROW INSERT INTO t_stmt VALUES (1);
CREATE INDEX i ON t_row(a);
CREATE TABLE t_row_new ENGINE = InnoDB SELECT * FROM t_row;
-ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
+ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging.
DROP TABLE t_row;
@@ -36,12 +36,11 @@ DROP TABLE t_row;
SET binlog_format = ROW;
CREATE TABLE t_stmt (a VARCHAR(100)) ENGINE = EXAMPLE;
ALTER TABLE t_stmt ADD COLUMN b INT;
-ERROR 42000: This version of MySQL doesn't yet support 'ALTER TABLE'
CREATE TRIGGER trig_stmt BEFORE INSERT ON t_stmt FOR EACH ROW INSERT INTO t_stmt VALUES (1);
CREATE INDEX i ON t_stmt(a);
ERROR 42000: Too many key parts specified; max 0 parts allowed
CREATE TABLE t_stmt_new ENGINE = EXAMPLE SELECT * FROM t_stmt;
-ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-based logging.
+ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-based logging
DROP TABLE t_stmt;
diff --git a/mysql-test/suite/binlog/r/binlog_truncate_innodb.result b/mysql-test/suite/binlog/r/binlog_truncate_innodb.result
index 8beeeb1a428..87ce8e30dee 100644
--- a/mysql-test/suite/binlog/r/binlog_truncate_innodb.result
+++ b/mysql-test/suite/binlog/r/binlog_truncate_innodb.result
@@ -7,9 +7,11 @@ INSERT INTO t2 VALUES (1),(2),(3);
**** Truncate of empty table shall be logged
TRUNCATE TABLE t1;
TRUNCATE 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 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
DROP TABLE t1,t2;
#
@@ -18,18 +20,17 @@ DROP TABLE t1,t2;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
-# Connection: default
BEGIN;
INSERT INTO t2 SELECT * FROM t1;
-# Connection: truncate
+connect truncate,localhost,root,,;
TRUNCATE TABLE t1;
-# Connection: default
+connection default;
INSERT INTO t2 SELECT * FROM t1;
SELECT COUNT(*) FROM t2;
COUNT(*)
4
COMMIT;
-# Connection: truncate
+connection truncate;
# Reaping TRUNCATE TABLE
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -37,16 +38,20 @@ COUNT(*)
SELECT COUNT(*) FROM t2;
COUNT(*)
4
-# Connection: default
-show binlog events from <binlog_start>;
+connection default;
+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 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
master-bin.000001 # Table_map # # table_id: # (test.t2)
-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 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
master-bin.000001 # Table_map # # table_id: # (test.t2)
-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 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+disconnect truncate;
DROP TABLE t1,t2;
# Even though the isolation level might be permissive, truncate
# table follows a stricter isolation as its locking is based on
@@ -59,9 +64,11 @@ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
TRUNCATE TABLE t1;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
TRUNCATE 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 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
DROP TABLE t1,t2;
#
@@ -71,18 +78,17 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
-# Connection: default
BEGIN;
INSERT INTO t2 SELECT * FROM t1;
-# Connection: truncate
+connect truncate,localhost,root,,;
TRUNCATE TABLE t1;
-# Connection: default
+connection default;
INSERT INTO t2 SELECT * FROM t1;
SELECT COUNT(*) FROM t2;
COUNT(*)
4
COMMIT;
-# Connection: truncate
+connection truncate;
# Reaping TRUNCATE TABLE
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -90,16 +96,20 @@ COUNT(*)
SELECT COUNT(*) FROM t2;
COUNT(*)
4
-# Connection: default
-show binlog events from <binlog_start>;
+connection default;
+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 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
master-bin.000001 # Table_map # # table_id: # (test.t2)
-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 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
master-bin.000001 # Table_map # # table_id: # (test.t2)
-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 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+disconnect truncate;
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
@@ -109,9 +119,11 @@ SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
TRUNCATE TABLE t1;
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
TRUNCATE 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 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
DROP TABLE t1,t2;
#
@@ -121,18 +133,17 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
-# Connection: default
BEGIN;
INSERT INTO t2 SELECT * FROM t1;
-# Connection: truncate
+connect truncate,localhost,root,,;
TRUNCATE TABLE t1;
-# Connection: default
+connection default;
INSERT INTO t2 SELECT * FROM t1;
SELECT COUNT(*) FROM t2;
COUNT(*)
4
COMMIT;
-# Connection: truncate
+connection truncate;
# Reaping TRUNCATE TABLE
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -140,16 +151,20 @@ COUNT(*)
SELECT COUNT(*) FROM t2;
COUNT(*)
4
-# Connection: default
-show binlog events from <binlog_start>;
+connection default;
+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 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
master-bin.000001 # Table_map # # table_id: # (test.t2)
-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 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
master-bin.000001 # Table_map # # table_id: # (test.t2)
-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 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+disconnect truncate;
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
@@ -159,9 +174,11 @@ SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
TRUNCATE TABLE t1;
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
TRUNCATE 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 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
DROP TABLE t1,t2;
#
@@ -171,18 +188,17 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
-# Connection: default
BEGIN;
INSERT INTO t2 SELECT * FROM t1;
-# Connection: truncate
+connect truncate,localhost,root,,;
TRUNCATE TABLE t1;
-# Connection: default
+connection default;
INSERT INTO t2 SELECT * FROM t1;
SELECT COUNT(*) FROM t2;
COUNT(*)
4
COMMIT;
-# Connection: truncate
+connection truncate;
# Reaping TRUNCATE TABLE
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -190,16 +206,20 @@ COUNT(*)
SELECT COUNT(*) FROM t2;
COUNT(*)
4
-# Connection: default
-show binlog events from <binlog_start>;
+connection default;
+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 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
master-bin.000001 # Table_map # # table_id: # (test.t2)
-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 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
master-bin.000001 # Table_map # # table_id: # (test.t2)
-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 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+disconnect truncate;
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
@@ -209,9 +229,11 @@ SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
TRUNCATE TABLE t1;
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
TRUNCATE 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 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
DROP TABLE t1,t2;
#
@@ -221,18 +243,17 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
-# Connection: default
BEGIN;
INSERT INTO t2 SELECT * FROM t1;
-# Connection: truncate
+connect truncate,localhost,root,,;
TRUNCATE TABLE t1;
-# Connection: default
+connection default;
INSERT INTO t2 SELECT * FROM t1;
SELECT COUNT(*) FROM t2;
COUNT(*)
4
COMMIT;
-# Connection: truncate
+connection truncate;
# Reaping TRUNCATE TABLE
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -240,16 +261,20 @@ COUNT(*)
SELECT COUNT(*) FROM t2;
COUNT(*)
4
-# Connection: default
-show binlog events from <binlog_start>;
+connection default;
+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 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
master-bin.000001 # Table_map # # table_id: # (test.t2)
-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 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
master-bin.000001 # Table_map # # table_id: # (test.t2)
-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 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+disconnect truncate;
DROP TABLE t1,t2;
SET BINLOG_FORMAT=STATEMENT;
RESET MASTER;
@@ -261,9 +286,11 @@ SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
TRUNCATE TABLE t1;
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
TRUNCATE 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 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
DROP TABLE t1,t2;
#
@@ -273,18 +300,17 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
-# Connection: default
BEGIN;
INSERT INTO t2 SELECT * FROM t1;
-# Connection: truncate
+connect truncate,localhost,root,,;
TRUNCATE TABLE t1;
-# Connection: default
+connection default;
INSERT INTO t2 SELECT * FROM t1;
SELECT COUNT(*) FROM t2;
COUNT(*)
4
COMMIT;
-# Connection: truncate
+connection truncate;
# Reaping TRUNCATE TABLE
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -292,14 +318,16 @@ COUNT(*)
SELECT COUNT(*) FROM t2;
COUNT(*)
4
-# Connection: default
-show binlog events from <binlog_start>;
+connection default;
+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 SELECT * FROM t1
master-bin.000001 # Query # # use `test`; INSERT INTO t2 SELECT * FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+disconnect truncate;
DROP TABLE t1,t2;
# Truncate is not supported for SBR if the isolation level is
# READ UNCOMMITTED or READ COMMITTED. These specific isolation
@@ -312,9 +340,11 @@ SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
TRUNCATE TABLE t1;
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
TRUNCATE 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 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
DROP TABLE t1,t2;
#
@@ -324,18 +354,17 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
-# Connection: default
BEGIN;
INSERT INTO t2 SELECT * FROM t1;
-# Connection: truncate
+connect truncate,localhost,root,,;
TRUNCATE TABLE t1;
-# Connection: default
+connection default;
INSERT INTO t2 SELECT * FROM t1;
SELECT COUNT(*) FROM t2;
COUNT(*)
4
COMMIT;
-# Connection: truncate
+connection truncate;
# Reaping TRUNCATE TABLE
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -343,14 +372,16 @@ COUNT(*)
SELECT COUNT(*) FROM t2;
COUNT(*)
4
-# Connection: default
-show binlog events from <binlog_start>;
+connection default;
+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 SELECT * FROM t1
master-bin.000001 # Query # # use `test`; INSERT INTO t2 SELECT * FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+disconnect truncate;
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
@@ -360,9 +391,11 @@ SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
TRUNCATE TABLE t1;
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
TRUNCATE 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 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
DROP TABLE t1,t2;
#
@@ -372,18 +405,17 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
-# Connection: default
BEGIN;
INSERT INTO t2 SELECT * FROM t1;
-# Connection: truncate
+connect truncate,localhost,root,,;
TRUNCATE TABLE t1;
-# Connection: default
+connection default;
INSERT INTO t2 SELECT * FROM t1;
SELECT COUNT(*) FROM t2;
COUNT(*)
4
COMMIT;
-# Connection: truncate
+connection truncate;
# Reaping TRUNCATE TABLE
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -391,13 +423,16 @@ COUNT(*)
SELECT COUNT(*) FROM t2;
COUNT(*)
4
-# Connection: default
-show binlog events from <binlog_start>;
+connection default;
+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 SELECT * FROM t1
master-bin.000001 # Query # # use `test`; INSERT INTO t2 SELECT * FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+disconnect truncate;
DROP TABLE t1,t2;
-SET BINLOG_FORMAT=@old_binlog_format;
+SET @@global.binlog_format = @old_binlog_format;
+SET @@session.binlog_format = @old_binlog_format;
diff --git a/mysql-test/suite/binlog/t/binlog_spurious_ddl_errors-master.opt b/mysql-test/suite/binlog/t/binlog_spurious_ddl_errors-master.opt
deleted file mode 100644
index 627becdbfb5..00000000000
--- a/mysql-test/suite/binlog/t/binlog_spurious_ddl_errors-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---innodb
diff --git a/mysql-test/suite/binlog/t/binlog_spurious_ddl_errors.test b/mysql-test/suite/binlog/t/binlog_spurious_ddl_errors.test
index e64e7838a31..29a860764a9 100644
--- a/mysql-test/suite/binlog/t/binlog_spurious_ddl_errors.test
+++ b/mysql-test/suite/binlog/t/binlog_spurious_ddl_errors.test
@@ -71,7 +71,6 @@ DROP TABLE t_row;
SET binlog_format = ROW;
CREATE TABLE t_stmt (a VARCHAR(100)) ENGINE = EXAMPLE;
---error ER_NOT_SUPPORTED_YET
ALTER TABLE t_stmt ADD COLUMN b INT;
CREATE TRIGGER trig_stmt BEFORE INSERT ON t_stmt FOR EACH ROW INSERT INTO t_stmt VALUES (1);
diff --git a/mysql-test/suite/binlog/t/binlog_truncate_innodb-master.opt b/mysql-test/suite/binlog/t/binlog_truncate_innodb-master.opt
deleted file mode 100644
index 69cc489a969..00000000000
--- a/mysql-test/suite/binlog/t/binlog_truncate_innodb-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---loose-innodb \ No newline at end of file
diff --git a/mysql-test/suite/binlog/t/binlog_truncate_innodb.test b/mysql-test/suite/binlog/t/binlog_truncate_innodb.test
index 54a32b96ef1..511b82bd717 100644
--- a/mysql-test/suite/binlog/t/binlog_truncate_innodb.test
+++ b/mysql-test/suite/binlog/t/binlog_truncate_innodb.test
@@ -41,4 +41,5 @@ source include/binlog_truncate.test;
let $before_truncate = SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
source include/binlog_truncate.test;
-SET BINLOG_FORMAT=@old_binlog_format;
+SET @@global.binlog_format = @old_binlog_format;
+SET @@session.binlog_format = @old_binlog_format; \ No newline at end of file
diff --git a/mysql-test/suite/binlog_encryption/rpl_semi_sync.result b/mysql-test/suite/binlog_encryption/rpl_semi_sync.result
index 106efb555d3..d18bd1efda7 100644
--- a/mysql-test/suite/binlog_encryption/rpl_semi_sync.result
+++ b/mysql-test/suite/binlog_encryption/rpl_semi_sync.result
@@ -164,20 +164,15 @@ connection slave;
connection slave;
include/stop_slave.inc
connection master;
+include/kill_binlog_dump_threads.inc
set global rpl_semi_sync_master_timeout= 5000;
[ master status should be ON ]
-show status like 'Rpl_semi_sync_master_status';
-Variable_name Value
-Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value
Rpl_semi_sync_master_no_tx 0
show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value
Rpl_semi_sync_master_yes_tx 14
-show status like 'Rpl_semi_sync_master_clients';
-Variable_name Value
-Rpl_semi_sync_master_clients 0
[ semi-sync replication of these transactions will fail ]
insert into t1 values (500);
[ master status should be OFF ]
@@ -235,9 +230,6 @@ max(a)
500
connection master;
[ master status should be ON again after slave catches up ]
-show status like 'Rpl_semi_sync_master_status';
-Variable_name Value
-Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value
Rpl_semi_sync_master_no_tx 12
@@ -304,8 +296,6 @@ connection master;
create table t1 (a int) engine = ENGINE_TYPE;
drop table t1;
connection slave;
-show status like 'Rpl_relay%';
-Variable_name Value
[ test reset master ]
connection master;
reset master;
@@ -321,7 +311,7 @@ Rpl_semi_sync_master_yes_tx 0
connection slave;
include/stop_slave.inc
reset slave;
-connection master;
+include/kill_binlog_dump_threads.inc
connection slave;
include/start_slave.inc
connection master;
@@ -353,6 +343,7 @@ include/stop_slave.inc
reset slave;
connection master;
reset master;
+include/kill_binlog_dump_threads.inc
set sql_log_bin=0;
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
flush privileges;
@@ -403,10 +394,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
Variable_name Value
Rpl_semi_sync_slave_status OFF
connection master;
+include/kill_binlog_dump_threads.inc
[ Semi-sync status on master should be ON ]
-show status like 'Rpl_semi_sync_master_clients';
-Variable_name Value
-Rpl_semi_sync_master_clients 0
show status like 'Rpl_semi_sync_master_status';
Variable_name Value
Rpl_semi_sync_master_status ON
diff --git a/mysql-test/suite/federated/federatedx.result b/mysql-test/suite/federated/federatedx.result
index 8345f56dba9..2c21e31afe9 100644
--- a/mysql-test/suite/federated/federatedx.result
+++ b/mysql-test/suite/federated/federatedx.result
@@ -2284,6 +2284,32 @@ connection master;
CREATE TABLE t1 (a INT) ENGINE=FEDERATED CONNECTION='mysql://@127.0.0.1:SLAVE_PORT/federated/t1';
ERROR HY000: Can't create federated table. Foreign data src error: database: 'federated' username: '' hostname: '127.0.0.1'
#
+# MDEV-17573 Assertion in federatedx on multi-update
+#
+create table t1 (
+x int,
+d datetime);
+create table t1f engine=FEDERATED connection='mysql://root@127.0.0.1:MASTER_MYPORT/test/t1';
+create table t2 (
+x int, y int,
+d datetime);
+create table t2f engine=FEDERATED connection='mysql://root@127.0.0.1:MASTER_MYPORT/test/t2';
+create table t3 (
+x int, y int, z int,
+d datetime);
+create table t3f engine=FEDERATED connection='mysql://root@127.0.0.1:MASTER_MYPORT/test/t3';
+insert into t1 values (1, "1990-01-01 00:00");
+insert into t1 values (1, "1991-01-01 11:11");
+insert into t2 values (2, 2, "1992-02-02 22:22");
+insert into t3 values (3, 3, 3, "1993-03-03 23:33");
+update t1f, t2f, t3f set t1f.x= 11, t2f.y= 22, t3f.z= 33;
+drop table t1f;
+drop table t2f;
+drop table t3f;
+drop table t1;
+drop table t2;
+drop table t3;
+#
# MDEV-21049 Segfault in create federatedx table with empty hostname
#
connection master;
diff --git a/mysql-test/suite/federated/federatedx.test b/mysql-test/suite/federated/federatedx.test
index fcc0178c024..51d34298626 100644
--- a/mysql-test/suite/federated/federatedx.test
+++ b/mysql-test/suite/federated/federatedx.test
@@ -2011,6 +2011,35 @@ connection master;
eval CREATE TABLE t1 (a INT) ENGINE=FEDERATED CONNECTION='mysql://@127.0.0.1:$SLAVE_MYPORT/federated/t1';
--echo #
+--echo # MDEV-17573 Assertion in federatedx on multi-update
+--echo #
+create table t1 (
+ x int,
+ d datetime);
+--replace_result $MASTER_MYPORT MASTER_MYPORT
+eval create table t1f engine=FEDERATED connection='mysql://root@127.0.0.1:$MASTER_MYPORT/test/t1';
+
+create table t2 (
+ x int, y int,
+ d datetime);
+--replace_result $MASTER_MYPORT MASTER_MYPORT
+eval create table t2f engine=FEDERATED connection='mysql://root@127.0.0.1:$MASTER_MYPORT/test/t2';
+
+create table t3 (
+ x int, y int, z int,
+ d datetime);
+--replace_result $MASTER_MYPORT MASTER_MYPORT
+eval create table t3f engine=FEDERATED connection='mysql://root@127.0.0.1:$MASTER_MYPORT/test/t3';
+
+insert into t1 values (1, "1990-01-01 00:00");
+insert into t1 values (1, "1991-01-01 11:11");
+insert into t2 values (2, 2, "1992-02-02 22:22");
+insert into t3 values (3, 3, 3, "1993-03-03 23:33");
+update t1f, t2f, t3f set t1f.x= 11, t2f.y= 22, t3f.z= 33;
+
+drop table t1f; drop table t2f; drop table t3f; drop table t1; drop table t2; drop table t3;
+
+--echo #
--echo # MDEV-21049 Segfault in create federatedx table with empty hostname
--echo #
connection master;
diff --git a/mysql-test/suite/funcs_1/r/is_check_constraints.result b/mysql-test/suite/funcs_1/r/is_check_constraints.result
index 37fd191d979..2436be8142f 100644
--- a/mysql-test/suite/funcs_1/r/is_check_constraints.result
+++ b/mysql-test/suite/funcs_1/r/is_check_constraints.result
@@ -90,7 +90,9 @@ CREATE TABLE t3
(
a int,
b int check (b>0), # field constraint named 'b'
-CONSTRAINT b check (b>10) # table constraint
+CONSTRAINT b check (b>10), # table constraint
+# `CHECK_CLAUSE` should allow more then `var(64)` constraints
+CONSTRAINT b1 check (b<123456789012345678901234567890123456789012345678901234567890123456789)
) ENGINE=InnoDB;
SELECT * from information_schema.check_constraints;
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
@@ -104,6 +106,7 @@ def foo t2 CHK_dates `start_date` is null
def foo t2 name char_length(`name`) > 2
def foo t3 b `b` > 0
def foo t3 b `b` > 10
+def foo t3 b1 `b` < 123456789012345678901234567890123456789012345678901234567890123456789
disconnect con1;
CONNECT con2, localhost, boo2,, test;
SELECT * from information_schema.check_constraints;
diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result
index e4797521889..a6e74cb2f05 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_is.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_is.result
@@ -24,7 +24,7 @@ def information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 '' NO varchar 32 96 N
def information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL
def information_schema CHARACTER_SETS DESCRIPTION 3 '' NO varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60) select NEVER NULL
def information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) select NEVER NULL
-def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL
+def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 5 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL
def information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL
def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL
def information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL
@@ -570,7 +570,7 @@ NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(
3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema CHECK_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
-3.0000 information_schema CHECK_CONSTRAINTS CHECK_CLAUSE varchar 64 192 utf8 utf8_general_ci varchar(64)
+1.0000 information_schema CHECK_CONSTRAINTS CHECK_CLAUSE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema CLIENT_STATISTICS CLIENT varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS CONCURRENT_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
diff --git a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
index 4fc90b8433d..71765adb3fe 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
@@ -24,7 +24,7 @@ def information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 '' NO varchar 32 96 N
def information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL
def information_schema CHARACTER_SETS DESCRIPTION 3 '' NO varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60) NEVER NULL
def information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) NEVER NULL
-def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL
+def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 5 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL
def information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL
def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL
def information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL
@@ -570,7 +570,7 @@ NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(
3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema CHECK_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
-3.0000 information_schema CHECK_CONSTRAINTS CHECK_CLAUSE varchar 64 192 utf8 utf8_general_ci varchar(64)
+1.0000 information_schema CHECK_CONSTRAINTS CHECK_CLAUSE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema CLIENT_STATISTICS CLIENT varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS CONCURRENT_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
diff --git a/mysql-test/suite/funcs_1/r/is_tables_is.result b/mysql-test/suite/funcs_1/r/is_tables_is.result
index 9af3aa860a0..65dae5a0d6b 100644
--- a/mysql-test/suite/funcs_1/r/is_tables_is.result
+++ b/mysql-test/suite/funcs_1/r/is_tables_is.result
@@ -91,9 +91,9 @@ TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME CHECK_CONSTRAINTS
TABLE_TYPE SYSTEM VIEW
-ENGINE MEMORY
+ENGINE MYISAM_OR_MARIA
VERSION 11
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1157,9 +1157,9 @@ TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME CHECK_CONSTRAINTS
TABLE_TYPE SYSTEM VIEW
-ENGINE MEMORY
+ENGINE MYISAM_OR_MARIA
VERSION 11
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
diff --git a/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result
index 9af3aa860a0..65dae5a0d6b 100644
--- a/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result
@@ -91,9 +91,9 @@ TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME CHECK_CONSTRAINTS
TABLE_TYPE SYSTEM VIEW
-ENGINE MEMORY
+ENGINE MYISAM_OR_MARIA
VERSION 11
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1157,9 +1157,9 @@ TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME CHECK_CONSTRAINTS
TABLE_TYPE SYSTEM VIEW
-ENGINE MEMORY
+ENGINE MYISAM_OR_MARIA
VERSION 11
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
diff --git a/mysql-test/suite/funcs_1/t/is_check_constraints.test b/mysql-test/suite/funcs_1/t/is_check_constraints.test
index b539de67f73..dbd286e6239 100644
--- a/mysql-test/suite/funcs_1/t/is_check_constraints.test
+++ b/mysql-test/suite/funcs_1/t/is_check_constraints.test
@@ -69,7 +69,9 @@ CREATE TABLE t3
(
a int,
b int check (b>0), # field constraint named 'b'
-CONSTRAINT b check (b>10) # table constraint
+CONSTRAINT b check (b>10), # table constraint
+# `CHECK_CLAUSE` should allow more then `var(64)` constraints
+CONSTRAINT b1 check (b<123456789012345678901234567890123456789012345678901234567890123456789)
) ENGINE=InnoDB;
--sorted_result
SELECT * from information_schema.check_constraints;
diff --git a/mysql-test/suite/galera/r/galera#500.result b/mysql-test/suite/galera/r/galera#500.result
index a5ab0b19718..d983e844d76 100644
--- a/mysql-test/suite/galera/r/galera#500.result
+++ b/mysql-test/suite/galera/r/galera#500.result
@@ -1,3 +1,5 @@
+connection node_1;
+connection node_2;
connection node_2;
connection node_1;
connection node_1;
diff --git a/mysql-test/suite/galera/t/galera#500.test b/mysql-test/suite/galera/t/galera#500.test
index 60f303b7103..471620b32c1 100644
--- a/mysql-test/suite/galera/t/galera#500.test
+++ b/mysql-test/suite/galera/t/galera#500.test
@@ -8,9 +8,10 @@
--source include/galera_cluster.inc
--source include/galera_have_debug_sync.inc
+# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
---source suite/galera/include/auto_increment_offset_save.inc
+--source include/auto_increment_offset_save.inc
# Force node_2 gcomm background thread to terminate via exception.
--connection node_2
@@ -41,4 +42,4 @@ SET SESSION wsrep_on=0;
--connection node_2
CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast.isolate=2.");
---source suite/galera/include/auto_increment_offset_restore.inc
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_fk.result b/mysql-test/suite/gcol/r/innodb_virtual_fk.result
index 50685e04a69..68601823e31 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_fk.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_fk.result
@@ -790,3 +790,31 @@ t1 CREATE TABLE `t1` (
ALTER TABLE t1 DROP INDEX f1;
ALTER TABLE t1 DROP f3;
DROP TABLE t1;
+#
+# MDEV-24041 Generated column DELETE with FOREIGN KEY crash InnoDB
+#
+CREATE TABLE emails (
+id int,
+PRIMARY KEY (id)
+) ENGINE=InnoDB;
+CREATE TABLE email_stats (
+id int,
+email_id int,
+date_sent char(4),
+generated_email_id int as (email_id),
+PRIMARY KEY (id),
+KEY mautic_generated_sent_date_email_id (generated_email_id),
+FOREIGN KEY (email_id) REFERENCES emails (id) ON DELETE SET NULL
+) ENGINE=InnoDB;
+CREATE TABLE emails_metadata (
+email_id int,
+PRIMARY KEY (email_id),
+CONSTRAINT FK FOREIGN KEY (email_id) REFERENCES emails (id) ON DELETE CASCADE
+) ENGINE=InnoDB;
+INSERT INTO emails VALUES (1);
+INSERT INTO email_stats (id, email_id, date_sent) VALUES (1,1,'Jan');
+INSERT INTO emails_metadata VALUES (1);
+DELETE FROM emails;
+DROP TABLE email_stats;
+DROP TABLE emails_metadata;
+DROP TABLE emails;
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_fk.test b/mysql-test/suite/gcol/t/innodb_virtual_fk.test
index 23d3ee97290..da20612f0a1 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_fk.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_fk.test
@@ -649,3 +649,40 @@ SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX f1;
ALTER TABLE t1 DROP f3;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-24041 Generated column DELETE with FOREIGN KEY crash InnoDB
+--echo #
+
+CREATE TABLE emails (
+ id int,
+ PRIMARY KEY (id)
+) ENGINE=InnoDB;
+
+CREATE TABLE email_stats (
+ id int,
+ email_id int,
+ date_sent char(4),
+ generated_email_id int as (email_id),
+ PRIMARY KEY (id),
+ KEY mautic_generated_sent_date_email_id (generated_email_id),
+ FOREIGN KEY (email_id) REFERENCES emails (id) ON DELETE SET NULL
+) ENGINE=InnoDB;
+
+
+CREATE TABLE emails_metadata (
+ email_id int,
+ PRIMARY KEY (email_id),
+ CONSTRAINT FK FOREIGN KEY (email_id) REFERENCES emails (id) ON DELETE CASCADE
+) ENGINE=InnoDB;
+
+
+INSERT INTO emails VALUES (1);
+INSERT INTO email_stats (id, email_id, date_sent) VALUES (1,1,'Jan');
+INSERT INTO emails_metadata VALUES (1);
+
+DELETE FROM emails;
+
+DROP TABLE email_stats;
+DROP TABLE emails_metadata;
+DROP TABLE emails;
diff --git a/mysql-test/suite/innodb/r/innodb_multi_update.result b/mysql-test/suite/innodb/r/innodb_multi_update.result
index 64f9ebc2fc2..93bd4e6716c 100644
--- a/mysql-test/suite/innodb/r/innodb_multi_update.result
+++ b/mysql-test/suite/innodb/r/innodb_multi_update.result
@@ -81,4 +81,5 @@ CREATE TABLE t1(f1 INT) ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
UPDATE (SELECT ((SELECT 1 FROM t1), 1) FROM t1 WHERE (SELECT 1 FROM t1)) x, (SELECT 1) AS d SET d.f1 = 1;
ERROR 21000: Operand should contain 1 column(s)
+UPDATE (SELECT ((SELECT 1 FROM t1),1) = (1,1) FROM t1 WHERE (SELECT 1 FROM t1)) x, t1 AS d SET d.f1 = 1;
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb_multi_update.test b/mysql-test/suite/innodb/t/innodb_multi_update.test
index 8d5283a9ed5..74a7aea7d13 100644
--- a/mysql-test/suite/innodb/t/innodb_multi_update.test
+++ b/mysql-test/suite/innodb/t/innodb_multi_update.test
@@ -35,4 +35,5 @@ CREATE TABLE t1(f1 INT) ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
--error ER_OPERAND_COLUMNS
UPDATE (SELECT ((SELECT 1 FROM t1), 1) FROM t1 WHERE (SELECT 1 FROM t1)) x, (SELECT 1) AS d SET d.f1 = 1;
+UPDATE (SELECT ((SELECT 1 FROM t1),1) = (1,1) FROM t1 WHERE (SELECT 1 FROM t1)) x, t1 AS d SET d.f1 = 1;
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/include/rpl_semi_sync.inc b/mysql-test/suite/rpl/include/rpl_semi_sync.inc
index 393b49372e1..c3cd918b5fc 100644
--- a/mysql-test/suite/rpl/include/rpl_semi_sync.inc
+++ b/mysql-test/suite/rpl/include/rpl_semi_sync.inc
@@ -9,7 +9,6 @@ source include/have_innodb.inc;
source include/master-slave.inc;
let $engine_type= InnoDB;
-#let $engine_type= MyISAM;
# Suppress warnings that might be generated during the test
connection master;
@@ -94,7 +93,6 @@ enable_query_log;
echo [ status of semi-sync on master should be OFF ];
show status like 'Rpl_semi_sync_master_clients';
show status like 'Rpl_semi_sync_master_status';
---replace_result 305 304
show status like 'Rpl_semi_sync_master_yes_tx';
# reset master to make sure the following test will start with a clean environment
@@ -201,16 +199,23 @@ connection slave;
source include/stop_slave.inc;
connection master;
+--source include/kill_binlog_dump_threads.inc
set global rpl_semi_sync_master_timeout= 5000;
# The first semi-sync check should be on because after slave stop,
# there are no transactions on the master.
echo [ master status should be ON ];
-show status like 'Rpl_semi_sync_master_status';
+
+let $status_var= Rpl_semi_sync_master_status;
+let $status_var_value= ON;
+source include/wait_for_status_var.inc;
+
+let $status_var= Rpl_semi_sync_master_clients;
+let $status_var_value= 0;
+source include/wait_for_status_var.inc;
+
show status like 'Rpl_semi_sync_master_no_tx';
---replace_result 305 304
show status like 'Rpl_semi_sync_master_yes_tx';
-show status like 'Rpl_semi_sync_master_clients';
echo [ semi-sync replication of these transactions will fail ];
insert into t1 values (500);
@@ -225,7 +230,6 @@ source include/wait_for_status_var.inc;
echo [ master status should be OFF ];
show status like 'Rpl_semi_sync_master_status';
show status like 'Rpl_semi_sync_master_no_tx';
---replace_result 305 304
show status like 'Rpl_semi_sync_master_yes_tx';
# Semi-sync status on master is now OFF, so all these transactions
@@ -246,7 +250,6 @@ insert into t1 values (100);
echo [ master status should be OFF ];
show status like 'Rpl_semi_sync_master_status';
show status like 'Rpl_semi_sync_master_no_tx';
---replace_result 305 304
show status like 'Rpl_semi_sync_master_yes_tx';
--echo #
@@ -274,9 +277,11 @@ connection master;
# The master semi-sync status should be on again after slave catches up.
echo [ master status should be ON again after slave catches up ];
-show status like 'Rpl_semi_sync_master_status';
+
+let $status_var= Rpl_semi_sync_master_status;
+let $status_var_value= ON;
+source include/wait_for_status_var.inc;
show status like 'Rpl_semi_sync_master_no_tx';
---replace_result 305 304
show status like 'Rpl_semi_sync_master_yes_tx';
show status like 'Rpl_semi_sync_master_clients';
@@ -332,11 +337,7 @@ replace_result $engine_type ENGINE_TYPE;
eval create table t1 (a int) engine = $engine_type;
drop table t1;
-##show status like 'Rpl_semi_sync_master_status';
-
sync_slave_with_master;
---replace_column 2 #
-show status like 'Rpl_relay%';
echo [ test reset master ];
connection master;
@@ -353,19 +354,7 @@ source include/stop_slave.inc;
reset slave;
# Kill the dump thread on master for previous slave connection and
-# wait for it to exit
-connection master;
-let $_tid= `select id from information_schema.processlist where command = 'Binlog Dump' limit 1`;
-if ($_tid)
-{
- --replace_result $_tid _tid
- eval kill query $_tid;
-
- # After dump thread exit, Rpl_semi_sync_master_clients will be 0
- let $status_var= Rpl_semi_sync_master_clients;
- let $status_var_value= 0;
- source include/wait_for_status_var.inc;
-}
+--source include/kill_binlog_dump_threads.inc
connection slave;
source include/start_slave.inc;
@@ -404,17 +393,7 @@ connection master;
reset master;
# Kill the dump thread on master for previous slave connection and wait for it to exit
-let $_tid= `select id from information_schema.processlist where command = 'Binlog Dump' limit 1`;
-if ($_tid)
-{
- --replace_result $_tid _tid
- eval kill query $_tid;
-
- # After dump thread exit, Rpl_semi_sync_master_clients will be 0
- let $status_var= Rpl_semi_sync_master_clients;
- let $status_var_value= 0;
- source include/wait_for_status_var.inc;
-}
+--source include/kill_binlog_dump_threads.inc
# Do not binlog the following statement because it will generate
# different events for ROW and STATEMENT format
@@ -459,21 +438,16 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
connection master;
# Kill the dump thread on master for previous slave connection and wait for it to exit
-let $_tid= `select id from information_schema.processlist where command = 'Binlog Dump' limit 1`;
-if ($_tid)
-{
- --replace_result $_tid _tid
- eval kill query $_tid;
-
- # After dump thread exit, Rpl_semi_sync_master_clients will be 0
- let $status_var= Rpl_semi_sync_master_clients;
- let $status_var_value= 0;
- source include/wait_for_status_var.inc;
-}
+--source include/kill_binlog_dump_threads.inc
echo [ Semi-sync status on master should be ON ];
-show status like 'Rpl_semi_sync_master_clients';
+let $status_var= Rpl_semi_sync_master_clients;
+let $status_var_value= 0;
+source include/wait_for_status_var.inc;
show status like 'Rpl_semi_sync_master_status';
+let $status_var= Rpl_semi_sync_master_status;
+let $status_var_value= ON;
+source include/wait_for_status_var.inc;
set global rpl_semi_sync_master_enabled= 0;
connection slave;
diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync.result b/mysql-test/suite/rpl/r/rpl_semi_sync.result
index 106efb555d3..d18bd1efda7 100644
--- a/mysql-test/suite/rpl/r/rpl_semi_sync.result
+++ b/mysql-test/suite/rpl/r/rpl_semi_sync.result
@@ -164,20 +164,15 @@ connection slave;
connection slave;
include/stop_slave.inc
connection master;
+include/kill_binlog_dump_threads.inc
set global rpl_semi_sync_master_timeout= 5000;
[ master status should be ON ]
-show status like 'Rpl_semi_sync_master_status';
-Variable_name Value
-Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value
Rpl_semi_sync_master_no_tx 0
show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value
Rpl_semi_sync_master_yes_tx 14
-show status like 'Rpl_semi_sync_master_clients';
-Variable_name Value
-Rpl_semi_sync_master_clients 0
[ semi-sync replication of these transactions will fail ]
insert into t1 values (500);
[ master status should be OFF ]
@@ -235,9 +230,6 @@ max(a)
500
connection master;
[ master status should be ON again after slave catches up ]
-show status like 'Rpl_semi_sync_master_status';
-Variable_name Value
-Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value
Rpl_semi_sync_master_no_tx 12
@@ -304,8 +296,6 @@ connection master;
create table t1 (a int) engine = ENGINE_TYPE;
drop table t1;
connection slave;
-show status like 'Rpl_relay%';
-Variable_name Value
[ test reset master ]
connection master;
reset master;
@@ -321,7 +311,7 @@ Rpl_semi_sync_master_yes_tx 0
connection slave;
include/stop_slave.inc
reset slave;
-connection master;
+include/kill_binlog_dump_threads.inc
connection slave;
include/start_slave.inc
connection master;
@@ -353,6 +343,7 @@ include/stop_slave.inc
reset slave;
connection master;
reset master;
+include/kill_binlog_dump_threads.inc
set sql_log_bin=0;
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
flush privileges;
@@ -403,10 +394,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
Variable_name Value
Rpl_semi_sync_slave_status OFF
connection master;
+include/kill_binlog_dump_threads.inc
[ Semi-sync status on master should be ON ]
-show status like 'Rpl_semi_sync_master_clients';
-Variable_name Value
-Rpl_semi_sync_master_clients 0
show status like 'Rpl_semi_sync_master_status';
Variable_name Value
Rpl_semi_sync_master_status ON
diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync.result b/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync.result
index c61340f3967..f2240817489 100644
--- a/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync.result
+++ b/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync.result
@@ -165,20 +165,15 @@ connection slave;
connection slave;
include/stop_slave.inc
connection master;
+include/kill_binlog_dump_threads.inc
set global rpl_semi_sync_master_timeout= 5000;
[ master status should be ON ]
-show status like 'Rpl_semi_sync_master_status';
-Variable_name Value
-Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value
Rpl_semi_sync_master_no_tx 0
show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value
Rpl_semi_sync_master_yes_tx 16
-show status like 'Rpl_semi_sync_master_clients';
-Variable_name Value
-Rpl_semi_sync_master_clients 0
[ semi-sync replication of these transactions will fail ]
insert into t1 values (500);
[ master status should be OFF ]
@@ -236,9 +231,6 @@ max(a)
500
connection master;
[ master status should be ON again after slave catches up ]
-show status like 'Rpl_semi_sync_master_status';
-Variable_name Value
-Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value
Rpl_semi_sync_master_no_tx 12
@@ -305,8 +297,6 @@ connection master;
create table t1 (a int) engine = ENGINE_TYPE;
drop table t1;
connection slave;
-show status like 'Rpl_relay%';
-Variable_name Value
[ test reset master ]
connection master;
reset master;
@@ -322,7 +312,7 @@ Rpl_semi_sync_master_yes_tx 0
connection slave;
include/stop_slave.inc
reset slave;
-connection master;
+include/kill_binlog_dump_threads.inc
connection slave;
include/start_slave.inc
connection master;
@@ -354,6 +344,7 @@ include/stop_slave.inc
reset slave;
connection master;
reset master;
+include/kill_binlog_dump_threads.inc
set sql_log_bin=0;
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
flush privileges;
@@ -404,10 +395,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
Variable_name Value
Rpl_semi_sync_slave_status OFF
connection master;
+include/kill_binlog_dump_threads.inc
[ Semi-sync status on master should be ON ]
-show status like 'Rpl_semi_sync_master_clients';
-Variable_name Value
-Rpl_semi_sync_master_clients 0
show status like 'Rpl_semi_sync_master_status';
Variable_name Value
Rpl_semi_sync_master_status ON
diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync_row.result b/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync_row.result
index 6a23f24b66d..fcced801d65 100644
--- a/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync_row.result
+++ b/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync_row.result
@@ -165,20 +165,15 @@ connection slave;
connection slave;
include/stop_slave.inc
connection master;
+include/kill_binlog_dump_threads.inc
set global rpl_semi_sync_master_timeout= 5000;
[ master status should be ON ]
-show status like 'Rpl_semi_sync_master_status';
-Variable_name Value
-Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value
Rpl_semi_sync_master_no_tx 0
show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value
Rpl_semi_sync_master_yes_tx 14
-show status like 'Rpl_semi_sync_master_clients';
-Variable_name Value
-Rpl_semi_sync_master_clients 0
[ semi-sync replication of these transactions will fail ]
insert into t1 values (500);
[ master status should be OFF ]
@@ -236,9 +231,6 @@ max(a)
500
connection master;
[ master status should be ON again after slave catches up ]
-show status like 'Rpl_semi_sync_master_status';
-Variable_name Value
-Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value
Rpl_semi_sync_master_no_tx 12
@@ -305,8 +297,6 @@ connection master;
create table t1 (a int) engine = ENGINE_TYPE;
drop table t1;
connection slave;
-show status like 'Rpl_relay%';
-Variable_name Value
[ test reset master ]
connection master;
reset master;
@@ -322,7 +312,7 @@ Rpl_semi_sync_master_yes_tx 0
connection slave;
include/stop_slave.inc
reset slave;
-connection master;
+include/kill_binlog_dump_threads.inc
connection slave;
include/start_slave.inc
connection master;
@@ -354,6 +344,7 @@ include/stop_slave.inc
reset slave;
connection master;
reset master;
+include/kill_binlog_dump_threads.inc
set sql_log_bin=0;
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
flush privileges;
@@ -404,10 +395,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
Variable_name Value
Rpl_semi_sync_slave_status OFF
connection master;
+include/kill_binlog_dump_threads.inc
[ Semi-sync status on master should be ON ]
-show status like 'Rpl_semi_sync_master_clients';
-Variable_name Value
-Rpl_semi_sync_master_clients 0
show status like 'Rpl_semi_sync_master_status';
Variable_name Value
Rpl_semi_sync_master_status ON
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_retry.test b/mysql-test/suite/rpl/t/rpl_parallel_retry.test
index 55da54e3c8c..97a3a709eb5 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_retry.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_retry.test
@@ -436,6 +436,9 @@ SET @@DEBUG_SYNC='now SIGNAL proceed_by_1000';
--connection spoiler_21
ROLLBACK;
+--let $wait_condition= SELECT count(*)=1 FROM information_schema.processlist WHERE state LIKE '%debug sync point%';
+--source include/wait_condition.inc
+
--echo # Release the 2nd worker to proceed
--connection spoiler_22
ROLLBACK;
diff --git a/mysql-test/suite/sys_vars/r/max_sort_length_basic.result b/mysql-test/suite/sys_vars/r/max_sort_length_basic.result
deleted file mode 100644
index b48b045897c..00000000000
--- a/mysql-test/suite/sys_vars/r/max_sort_length_basic.result
+++ /dev/null
@@ -1,199 +0,0 @@
-SET @start_global_value = @@global.max_sort_length;
-SELECT @start_global_value;
-@start_global_value
-1024
-SET @start_session_value = @@session.max_sort_length;
-SELECT @start_session_value;
-@start_session_value
-1024
-'#--------------------FN_DYNVARS_084_01-------------------------#'
-SET @@global.max_sort_length = 1000;
-SET @@global.max_sort_length = DEFAULT;
-SELECT @@global.max_sort_length;
-@@global.max_sort_length
-1024
-SET @@session.max_sort_length = 1000;
-SET @@session.max_sort_length = DEFAULT;
-SELECT @@session.max_sort_length;
-@@session.max_sort_length
-1024
-'#--------------------FN_DYNVARS_084_02-------------------------#'
-SET @@global.max_sort_length = DEFAULT;
-SELECT @@global.max_sort_length = 1024;
-@@global.max_sort_length = 1024
-1
-SET @@session.max_sort_length = DEFAULT;
-SELECT @@session.max_sort_length = 1024;
-@@session.max_sort_length = 1024
-1
-'#--------------------FN_DYNVARS_084_03-------------------------#'
-SET @@global.max_sort_length = 8;
-SELECT @@global.max_sort_length;
-@@global.max_sort_length
-8
-SET @@global.max_sort_length = 9;
-SELECT @@global.max_sort_length;
-@@global.max_sort_length
-9
-SET @@global.max_sort_length = 8388608;
-SELECT @@global.max_sort_length;
-@@global.max_sort_length
-8388608
-SET @@global.max_sort_length = 8388607;
-SELECT @@global.max_sort_length;
-@@global.max_sort_length
-8388607
-SET @@global.max_sort_length = 65536;
-SELECT @@global.max_sort_length;
-@@global.max_sort_length
-65536
-'#--------------------FN_DYNVARS_084_04-------------------------#'
-SET @@session.max_sort_length = 8;
-SELECT @@session.max_sort_length;
-@@session.max_sort_length
-8
-SET @@session.max_sort_length = 9;
-SELECT @@session.max_sort_length;
-@@session.max_sort_length
-9
-SET @@session.max_sort_length = 8388608;
-SELECT @@session.max_sort_length;
-@@session.max_sort_length
-8388608
-SET @@session.max_sort_length = 8388607;
-SELECT @@session.max_sort_length;
-@@session.max_sort_length
-8388607
-SET @@session.max_sort_length = 65536;
-SELECT @@session.max_sort_length;
-@@session.max_sort_length
-65536
-'#------------------FN_DYNVARS_084_05-----------------------#'
-SET @@global.max_sort_length = -1024;
-Warnings:
-Warning 1292 Truncated incorrect max_sort_length value: '-1024'
-SELECT @@global.max_sort_length;
-@@global.max_sort_length
-8
-SET @@global.max_sort_length = 3;
-Warnings:
-Warning 1292 Truncated incorrect max_sort_length value: '3'
-SELECT @@global.max_sort_length;
-@@global.max_sort_length
-8
-SET @@global.max_sort_length = 8388609;
-Warnings:
-Warning 1292 Truncated incorrect max_sort_length value: '8388609'
-SELECT @@global.max_sort_length;
-@@global.max_sort_length
-8388608
-SET @@global.max_sort_length = 0;
-Warnings:
-Warning 1292 Truncated incorrect max_sort_length value: '0'
-SELECT @@global.max_sort_length;
-@@global.max_sort_length
-8
-SET @@global.max_sort_length = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'max_sort_length'
-SELECT @@global.max_sort_length;
-@@global.max_sort_length
-8
-SET @@global.max_sort_length = test;
-ERROR 42000: Incorrect argument type to variable 'max_sort_length'
-SELECT @@global.max_sort_length;
-@@global.max_sort_length
-8
-SET @@session.max_sort_length = 8388610;
-Warnings:
-Warning 1292 Truncated incorrect max_sort_length value: '8388610'
-SELECT @@session.max_sort_length;
-@@session.max_sort_length
-8388608
-SET @@session.max_sort_length = -1;
-Warnings:
-Warning 1292 Truncated incorrect max_sort_length value: '-1'
-SELECT @@session.max_sort_length;
-@@session.max_sort_length
-8
-SET @@session.max_sort_length = 3;
-Warnings:
-Warning 1292 Truncated incorrect max_sort_length value: '3'
-SELECT @@session.max_sort_length;
-@@session.max_sort_length
-8
-SET @@session.max_sort_length = 0;
-Warnings:
-Warning 1292 Truncated incorrect max_sort_length value: '0'
-SELECT @@session.max_sort_length;
-@@session.max_sort_length
-8
-SET @@session.max_sort_length = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'max_sort_length'
-SET @@session.max_sort_length = 10737418241;
-Warnings:
-Warning 1292 Truncated incorrect max_sort_length value: '10737418241'
-SELECT @@session.max_sort_length;
-@@session.max_sort_length
-8388608
-SET @@session.max_sort_length = test;
-ERROR 42000: Incorrect argument type to variable 'max_sort_length'
-SELECT @@session.max_sort_length;
-@@session.max_sort_length
-8388608
-'#------------------FN_DYNVARS_084_06-----------------------#'
-SELECT @@global.max_sort_length = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='max_sort_length';
-@@global.max_sort_length = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_084_07-----------------------#'
-SELECT @@session.max_sort_length = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='max_sort_length';
-@@session.max_sort_length = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_084_08-----------------------#'
-SET @@global.max_sort_length = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect max_sort_length value: '1'
-SELECT @@global.max_sort_length;
-@@global.max_sort_length
-8
-SET @@global.max_sort_length = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect max_sort_length value: '0'
-SELECT @@global.max_sort_length;
-@@global.max_sort_length
-8
-'#---------------------FN_DYNVARS_084_09----------------------#'
-SET @@global.max_sort_length = 2048;
-SELECT @@max_sort_length = @@global.max_sort_length;
-@@max_sort_length = @@global.max_sort_length
-0
-'#---------------------FN_DYNVARS_084_10----------------------#'
-SET @@max_sort_length = 100000;
-SELECT @@max_sort_length = @@local.max_sort_length;
-@@max_sort_length = @@local.max_sort_length
-1
-SELECT @@local.max_sort_length = @@session.max_sort_length;
-@@local.max_sort_length = @@session.max_sort_length
-1
-'#---------------------FN_DYNVARS_084_11----------------------#'
-SET max_sort_length = 1024;
-SELECT @@max_sort_length;
-@@max_sort_length
-1024
-SELECT local.max_sort_length;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.max_sort_length;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT max_sort_length = @@session.max_sort_length;
-ERROR 42S22: Unknown column 'max_sort_length' in 'field list'
-SET @@global.max_sort_length = @start_global_value;
-SELECT @@global.max_sort_length;
-@@global.max_sort_length
-1024
-SET @@session.max_sort_length = @start_session_value;
-SELECT @@session.max_sort_length;
-@@session.max_sort_length
-1024
diff --git a/mysql-test/suite/sys_vars/r/max_sort_length_func.result b/mysql-test/suite/sys_vars/r/max_sort_length_func.result
index 36f5518287a..3ec8faf1b7e 100644
--- a/mysql-test/suite/sys_vars/r/max_sort_length_func.result
+++ b/mysql-test/suite/sys_vars/r/max_sort_length_func.result
@@ -1,301 +1,279 @@
SET @start_value= @@global.max_sort_length;
-SET @session_max_sort_length = @@Session.max_sort_length;
-DROP TABLE IF EXISTS t;
** creating tables **
-CREATE TABLE t
-(
-id INT AUTO_INCREMENT PRIMARY KEY,
-c TEXT(30)
-);
-CREATE TABLE t1
-(
-id INT AUTO_INCREMENT PRIMARY KEY,
-c BLOB(30)
-);
-CREATE TABLE t2
-(
-id INT AUTO_INCREMENT PRIMARY KEY,
-c TEXT(30)
-);
+CREATE TABLE t (id INT AUTO_INCREMENT PRIMARY KEY, c TEXT);
+CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY, c BLOB);
+CREATE TABLE t2 (id INT AUTO_INCREMENT PRIMARY KEY, c TEXT);
'#--------------------FN_DYNVARS_098_01-------------------------#'
connect test_con1,localhost,root,,;
-connection test_con1;
-SELECT @@global.max_sort_length = 10;
-@@global.max_sort_length = 10
-0
-SELECT @@session.max_sort_length = 10;
-@@session.max_sort_length = 10
-0
-** Setting value to 30 and inserting data **
-SET @@global.max_sort_length = 30;
+** Setting value to 70 and inserting data **
+SET @@global.max_sort_length = 70;
SELECT @@global.max_sort_length;
@@global.max_sort_length
-30
-INSERT INTO t set c = repeat('x',29);
-INSERT INTO t set c = concat(repeat('x',28),'r','x');
-INSERT INTO t set c = concat(repeat('x',28),'s','y');
-INSERT INTO t set c = concat(repeat('x',28),'g','w');
+70
+INSERT INTO t set c = repeat('x',69);
+INSERT INTO t set c = concat(repeat('x',68),'r','x');
+INSERT INTO t set c = concat(repeat('x',68),'s','y');
+INSERT INTO t set c = concat(repeat('x',68),'g','w');
SELECT c from t ORDER BY c, id;
c
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
** Results should be sorted **
-SET @@session.max_sort_length = 29;
+SET @@session.max_sort_length = 69;
SELECT @@session.max_sort_length;
@@session.max_sort_length
-29
-INSERT INTO t set c = repeat('x',29);
-INSERT INTO t set c = concat(repeat('x',28),'r','x');
-INSERT INTO t set c = concat(repeat('x',28),'s','y');
-INSERT INTO t set c = concat(repeat('x',28),'g','w');
+69
+INSERT INTO t set c = repeat('x',69);
+INSERT INTO t set c = concat(repeat('x',68),'r','x');
+INSERT INTO t set c = concat(repeat('x',68),'s','y');
+INSERT INTO t set c = concat(repeat('x',68),'g','w');
SELECT c from t ORDER BY c, id;
c
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
** Results should be sorted **
'#--------------------FN_DYNVARS_098_02-------------------------#'
connect test_con2,localhost,root,,;
-connection test_con2;
-SET @@global.max_sort_length = 30;
+SET @@global.max_sort_length = 70;
SELECT @@global.max_sort_length;
@@global.max_sort_length
-30
-INSERT INTO t set c = repeat('x',29);
-INSERT INTO t set c = concat(repeat('x',28),'r','x');
-INSERT INTO t set c = concat(repeat('x',28),'s','y');
-INSERT INTO t set c = concat(repeat('x',28),'g','w');
+70
+INSERT INTO t set c = repeat('x',69);
+INSERT INTO t set c = concat(repeat('x',68),'r','x');
+INSERT INTO t set c = concat(repeat('x',68),'s','y');
+INSERT INTO t set c = concat(repeat('x',68),'g','w');
SELECT c from t ORDER BY c, id;
c
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
** Results should be sorted **
-SET @@session.max_sort_length = 20;
+SET @@session.max_sort_length = 64;
SELECT @@session.max_sort_length;
@@session.max_sort_length
-20
-INSERT INTO t set c = repeat('x',29);
-INSERT INTO t set c = concat(repeat('x',28),'r','x');
-INSERT INTO t set c = concat(repeat('x',28),'s','y');
-INSERT INTO t set c = concat(repeat('x',28),'g','w');
+64
+INSERT INTO t set c = repeat('x',69);
+INSERT INTO t set c = concat(repeat('x',68),'r','x');
+INSERT INTO t set c = concat(repeat('x',68),'s','y');
+INSERT INTO t set c = concat(repeat('x',68),'g','w');
SELECT c from t ORDER BY c, id;
c
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
** Results should not be sorted **
'#--------------------FN_DYNVARS_098_03-------------------------#'
-SET max_sort_length=20;
-INSERT INTO t set c = repeat('x',29);
-INSERT INTO t set c = concat(repeat('x',28),'r','x');
-INSERT INTO t set c = concat(repeat('x',28),'s','y');
-INSERT INTO t set c = concat(repeat('x',28),'g','w');
+SET max_sort_length=64;
+INSERT INTO t set c = repeat('x',69);
+INSERT INTO t set c = concat(repeat('x',68),'r','x');
+INSERT INTO t set c = concat(repeat('x',68),'s','y');
+INSERT INTO t set c = concat(repeat('x',68),'g','w');
SELECT c from t ORDER BY c, id;
c
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxr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xxxxxxxxxxxxxxxxxxxxxxxxxxxgw
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
** Results should not be sorted **
RESET QUERY CACHE;
'#--------------------FN_DYNVARS_098_04-------------------------#'
-SET max_sort_length=29;
+SET max_sort_length=69;
SELECT c from t ORDER BY c, id;
c
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
** Results should be sorted **
'#--------------------FN_DYNVARS_098_06-------------------------#'
SET max_sort_length=default;
+SELECT @@max_sort_length;
+@@max_sort_length
+70
SELECT c from t ORDER BY c, id;
c
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xx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_length;
-@@global.max_sort_length
-30
-INSERT INTO t1 set c = repeat('x',29);
-INSERT INTO t1 set c = concat(repeat('x',28),'r','x');
-INSERT INTO t1 set c = concat(repeat('x',28),'s','y');
-INSERT INTO t1 set c = concat(repeat('x',28),'g','w');
-SELECT c from t1 ORDER BY c, id;
+SET @@max_sort_length = 70;
+SELECT @@max_sort_length;
+@@max_sort_length
+70
+INSERT INTO t1 set c = repeat('x',69);
+INSERT INTO t1 set c = concat(repeat('x',68),'r','x');
+INSERT INTO t1 set c = concat(repeat('x',68),'s','y');
+INSERT INTO t1 set c = concat(repeat('x',68),'g','w');
+SELECT c from t1 ORDER BY c, id DESC;
c
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
** Results should be sorted **
-SET @@session.max_sort_length = 20;
+SET @@session.max_sort_length = 64;
SELECT @@session.max_sort_length;
@@session.max_sort_length
-20
-INSERT INTO t1 set c = repeat('x',29);
-INSERT INTO t1 set c = concat(repeat('x',28),'r','x');
-INSERT INTO t1 set c = concat(repeat('x',28),'s','y');
-INSERT INTO t1 set c = concat(repeat('x',28),'g','w');
+64
+INSERT INTO t1 set c = repeat('x',69);
+INSERT INTO t1 set c = concat(repeat('x',68),'r','x');
+INSERT INTO t1 set c = concat(repeat('x',68),'s','y');
+INSERT INTO t1 set c = concat(repeat('x',68),'g','w');
SELECT c from t1 ORDER BY c, id;
c
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
** Results should not be sorted **
'#--------------------FN_DYNVARS_098_08-------------------------#'
Testing type CHAR
-SET @@global.max_sort_length = 30;
+SET @@global.max_sort_length = 70;
SELECT @@global.max_sort_length;
@@global.max_sort_length
-30
-INSERT INTO t2 set c = repeat('x',29);
-INSERT INTO t2 set c = concat(repeat('x',28),'r','x');
-INSERT INTO t2 set c = concat(repeat('x',28),'s','y');
-INSERT INTO t2 set c = concat(repeat('x',28),'g','w');
+70
+INSERT INTO t2 set c = repeat('x',69);
+INSERT INTO t2 set c = concat(repeat('x',68),'r','x');
+INSERT INTO t2 set c = concat(repeat('x',68),'s','y');
+INSERT INTO t2 set c = concat(repeat('x',68),'g','w');
SELECT c from t2 ORDER BY c, id;
c
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
** Results should not be sorted **
-SET @@session.max_sort_length = 20;
+SET @@session.max_sort_length = 64;
SELECT @@session.max_sort_length;
@@session.max_sort_length
-20
-INSERT INTO t2 set c = repeat('x',29);
-INSERT INTO t2 set c = concat(repeat('x',28),'r','x');
-INSERT INTO t2 set c = concat(repeat('x',28),'s','y');
-INSERT INTO t2 set c = concat(repeat('x',28),'g','w');
+64
+INSERT INTO t2 set c = repeat('x',69);
+INSERT INTO t2 set c = concat(repeat('x',68),'r','x');
+INSERT INTO t2 set c = concat(repeat('x',68),'s','y');
+INSERT INTO t2 set c = concat(repeat('x',68),'g','w');
SELECT c from t2 ORDER BY c, id;
c
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
** Results should not be sorted **
connection default;
disconnect test_con1;
disconnect test_con2;
-SET @@SESSION.max_sort_length = @session_max_sort_length;
-DROP TABLE IF EXISTS t;
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
+DROP TABLE t, t1, t2;
SET @@global.max_sort_length= @start_value;
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
index 37cb483e50d..00927ebd4a5 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
@@ -1044,10 +1044,10 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME GROUP_CONCAT_MAX_LEN
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT()
NUMERIC_MIN_VALUE 4
-NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -1946,7 +1946,7 @@ VARIABLE_NAME MAX_SORT_LENGTH
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored)
-NUMERIC_MIN_VALUE 8
+NUMERIC_MIN_VALUE 64
NUMERIC_MAX_VALUE 8388608
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
index 083469406eb..7bd3bedcc81 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
@@ -1064,10 +1064,10 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME GROUP_CONCAT_MAX_LEN
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT()
NUMERIC_MIN_VALUE 4
-NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -2106,7 +2106,7 @@ VARIABLE_NAME MAX_SORT_LENGTH
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored)
-NUMERIC_MIN_VALUE 8
+NUMERIC_MIN_VALUE 64
NUMERIC_MAX_VALUE 8388608
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
diff --git a/mysql-test/suite/sys_vars/t/max_sort_length_basic.test b/mysql-test/suite/sys_vars/t/max_sort_length_basic.test
deleted file mode 100644
index fcd6db017f1..00000000000
--- a/mysql-test/suite/sys_vars/t/max_sort_length_basic.test
+++ /dev/null
@@ -1,225 +0,0 @@
-############## mysql-test\t\max_sort_length_basic.test ###############
-# #
-# Variable Name: max_sort_length #
-# Scope: GLOBAL | SESSION #
-# Access Type: Dynamic #
-# Data Type: numeric #
-# Default Value: 1024 #
-# Range: 4-8388608 #
-# #
-# #
-# Creation Date: 2008-02-07 #
-# Author: Salman #
-# #
-# Description: Test Cases of Dynamic System Variable max_sort_length #
-# that checks the behavior of this variable in the following ways#
-# * Default Value #
-# * Valid & Invalid values #
-# * Scope & Access method #
-# * Data Integrity #
-# #
-# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
-# server-system-variables.html #
-# #
-###############################################################################
-
---source include/load_sysvars.inc
-
-
-############################################
-# START OF max_sort_length TESTS #
-############################################
-
-
-#############################################################
-# Save initial value #
-#############################################################
-
-SET @start_global_value = @@global.max_sort_length;
-SELECT @start_global_value;
-SET @start_session_value = @@session.max_sort_length;
-SELECT @start_session_value;
-
-
---echo '#--------------------FN_DYNVARS_084_01-------------------------#'
-#######################################################
-# Display the DEFAULT value of max_sort_length #
-#######################################################
-
-SET @@global.max_sort_length = 1000;
-SET @@global.max_sort_length = DEFAULT;
-SELECT @@global.max_sort_length;
-
-
-SET @@session.max_sort_length = 1000;
-SET @@session.max_sort_length = DEFAULT;
-SELECT @@session.max_sort_length;
-
-
---echo '#--------------------FN_DYNVARS_084_02-------------------------#'
-#######################################################
-# Check the DEFAULT value of max_sort_length #
-#######################################################
-
-SET @@global.max_sort_length = DEFAULT;
-SELECT @@global.max_sort_length = 1024;
-
-SET @@session.max_sort_length = DEFAULT;
-SELECT @@session.max_sort_length = 1024;
-
-
-
---echo '#--------------------FN_DYNVARS_084_03-------------------------#'
-#########################################################################
-# Change the value of max_sort_length to a valid value for GLOBAL Scope #
-#########################################################################
-
-SET @@global.max_sort_length = 8;
-SELECT @@global.max_sort_length;
-SET @@global.max_sort_length = 9;
-SELECT @@global.max_sort_length;
-SET @@global.max_sort_length = 8388608;
-SELECT @@global.max_sort_length;
-SET @@global.max_sort_length = 8388607;
-SELECT @@global.max_sort_length;
-SET @@global.max_sort_length = 65536;
-SELECT @@global.max_sort_length;
-
---echo '#--------------------FN_DYNVARS_084_04-------------------------#'
-##########################################################################
-# Change the value of max_sort_length to a valid value for SESSION Scope #
-##########################################################################
-
-SET @@session.max_sort_length = 8;
-SELECT @@session.max_sort_length;
-
-SET @@session.max_sort_length = 9;
-SELECT @@session.max_sort_length;
-
-SET @@session.max_sort_length = 8388608;
-SELECT @@session.max_sort_length;
-
-SET @@session.max_sort_length = 8388607;
-SELECT @@session.max_sort_length;
-
-SET @@session.max_sort_length = 65536;
-SELECT @@session.max_sort_length;
-
-
---echo '#------------------FN_DYNVARS_084_05-----------------------#'
-###########################################################
-# Change the value of max_sort_length to an invalid value #
-###########################################################
-
-SET @@global.max_sort_length = -1024;
-SELECT @@global.max_sort_length;
-SET @@global.max_sort_length = 3;
-SELECT @@global.max_sort_length;
-SET @@global.max_sort_length = 8388609;
-SELECT @@global.max_sort_length;
-SET @@global.max_sort_length = 0;
-SELECT @@global.max_sort_length;
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@global.max_sort_length = 65530.34;
-SELECT @@global.max_sort_length;
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@global.max_sort_length = test;
-SELECT @@global.max_sort_length;
-
-SET @@session.max_sort_length = 8388610;
-SELECT @@session.max_sort_length;
-SET @@session.max_sort_length = -1;
-SELECT @@session.max_sort_length;
-SET @@session.max_sort_length = 3;
-SELECT @@session.max_sort_length;
-SET @@session.max_sort_length = 0;
-SELECT @@session.max_sort_length;
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@session.max_sort_length = 65530.34;
-SET @@session.max_sort_length = 10737418241;
-SELECT @@session.max_sort_length;
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@session.max_sort_length = test;
-SELECT @@session.max_sort_length;
-
-
---echo '#------------------FN_DYNVARS_084_06-----------------------#'
-####################################################################
-# Check if the value in GLOBAL Table matches value in variable #
-####################################################################
-
-
-SELECT @@global.max_sort_length = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='max_sort_length';
-
---echo '#------------------FN_DYNVARS_084_07-----------------------#'
-####################################################################
-# Check if the value in SESSION Table matches value in variable #
-####################################################################
-
-SELECT @@session.max_sort_length = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='max_sort_length';
-
-
---echo '#------------------FN_DYNVARS_084_08-----------------------#'
-####################################################################
-# Check if TRUE and FALSE values can be used on variable #
-####################################################################
-
-SET @@global.max_sort_length = TRUE;
-SELECT @@global.max_sort_length;
-SET @@global.max_sort_length = FALSE;
-SELECT @@global.max_sort_length;
-
-
---echo '#---------------------FN_DYNVARS_084_09----------------------#'
-#################################################################################
-# Check if accessing variable with and without GLOBAL point to same variable #
-#################################################################################
-
-SET @@global.max_sort_length = 2048;
-SELECT @@max_sort_length = @@global.max_sort_length;
-
-
---echo '#---------------------FN_DYNVARS_084_10----------------------#'
-########################################################################################################
-# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
-########################################################################################################
-
-SET @@max_sort_length = 100000;
-SELECT @@max_sort_length = @@local.max_sort_length;
-SELECT @@local.max_sort_length = @@session.max_sort_length;
-
-
---echo '#---------------------FN_DYNVARS_084_11----------------------#'
-##########################################################################
-# Check if max_sort_length can be accessed with and without @@ sign #
-##########################################################################
-
-
-SET max_sort_length = 1024;
-SELECT @@max_sort_length;
---Error ER_UNKNOWN_TABLE
-SELECT local.max_sort_length;
---Error ER_UNKNOWN_TABLE
-SELECT session.max_sort_length;
---Error ER_BAD_FIELD_ERROR
-SELECT max_sort_length = @@session.max_sort_length;
-
-
-####################################
-# Restore initial value #
-####################################
-
-SET @@global.max_sort_length = @start_global_value;
-SELECT @@global.max_sort_length;
-SET @@session.max_sort_length = @start_session_value;
-SELECT @@session.max_sort_length;
-
-
-####################################################
-# END OF max_sort_length TESTS #
-####################################################
-
diff --git a/mysql-test/suite/sys_vars/t/max_sort_length_func.test b/mysql-test/suite/sys_vars/t/max_sort_length_func.test
index fd0b87750a1..d54453a57b6 100644
--- a/mysql-test/suite/sys_vars/t/max_sort_length_func.test
+++ b/mysql-test/suite/sys_vars/t/max_sort_length_func.test
@@ -26,70 +26,40 @@
SET @start_value= @@global.max_sort_length;
-SET @session_max_sort_length = @@Session.max_sort_length;
-
-
---disable_warnings
-DROP TABLE IF EXISTS t;
---enable_warnings
-
#########################
# Creating new table #
#########################
-
--echo ** creating tables **
-CREATE TABLE t
-(
-id INT AUTO_INCREMENT PRIMARY KEY,
-c TEXT(30)
-);
-
-CREATE TABLE t1
-(
-id INT AUTO_INCREMENT PRIMARY KEY,
-c BLOB(30)
-);
-
-CREATE TABLE t2
-(
-id INT AUTO_INCREMENT PRIMARY KEY,
-c TEXT(30)
-);
-
-
+CREATE TABLE t (id INT AUTO_INCREMENT PRIMARY KEY, c TEXT);
+CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY, c BLOB);
+CREATE TABLE t2 (id INT AUTO_INCREMENT PRIMARY KEY, c TEXT);
--echo '#--------------------FN_DYNVARS_098_01-------------------------#'
##########################################################
# Test behavior of variable on new connection # 01 #
##########################################################
-
connect (test_con1,localhost,root,,);
-connection test_con1;
-
-# Value of session & global vairable here should be 10
-SELECT @@global.max_sort_length = 10;
-SELECT @@session.max_sort_length = 10;
# Setting global value of variable and inserting data in table
---echo ** Setting value to 30 and inserting data **
-SET @@global.max_sort_length = 30;
+--echo ** Setting value to 70 and inserting data **
+SET @@global.max_sort_length = 70;
SELECT @@global.max_sort_length;
-INSERT INTO t set c = repeat('x',29);
-INSERT INTO t set c = concat(repeat('x',28),'r','x');
-INSERT INTO t set c = concat(repeat('x',28),'s','y');
-INSERT INTO t set c = concat(repeat('x',28),'g','w');
+INSERT INTO t set c = repeat('x',69);
+INSERT INTO t set c = concat(repeat('x',68),'r','x');
+INSERT INTO t set c = concat(repeat('x',68),'s','y');
+INSERT INTO t set c = concat(repeat('x',68),'g','w');
SELECT c from t ORDER BY c, id;
--echo ** Results should be sorted **
# Setting session value of variable and inserting data in table
-SET @@session.max_sort_length = 29;
+SET @@session.max_sort_length = 69;
SELECT @@session.max_sort_length;
-INSERT INTO t set c = repeat('x',29);
-INSERT INTO t set c = concat(repeat('x',28),'r','x');
-INSERT INTO t set c = concat(repeat('x',28),'s','y');
-INSERT INTO t set c = concat(repeat('x',28),'g','w');
+INSERT INTO t set c = repeat('x',69);
+INSERT INTO t set c = concat(repeat('x',68),'r','x');
+INSERT INTO t set c = concat(repeat('x',68),'s','y');
+INSERT INTO t set c = concat(repeat('x',68),'g','w');
SELECT c from t ORDER BY c, id;
--echo ** Results should be sorted **
@@ -99,72 +69,69 @@ SELECT c from t ORDER BY c, id;
##########################################################
connect (test_con2,localhost,root,,);
-connection test_con2;
-
## Setting global value of variable and inserting data in table
-SET @@global.max_sort_length = 30;
+SET @@global.max_sort_length = 70;
SELECT @@global.max_sort_length;
-INSERT INTO t set c = repeat('x',29);
-INSERT INTO t set c = concat(repeat('x',28),'r','x');
-INSERT INTO t set c = concat(repeat('x',28),'s','y');
-INSERT INTO t set c = concat(repeat('x',28),'g','w');
+INSERT INTO t set c = repeat('x',69);
+INSERT INTO t set c = concat(repeat('x',68),'r','x');
+INSERT INTO t set c = concat(repeat('x',68),'s','y');
+INSERT INTO t set c = concat(repeat('x',68),'g','w');
SELECT c from t ORDER BY c, id;
--echo ** Results should be sorted **
# Setting session value of variable and inserting data in table
-SET @@session.max_sort_length = 20;
+SET @@session.max_sort_length = 64;
SELECT @@session.max_sort_length;
-INSERT INTO t set c = repeat('x',29);
-INSERT INTO t set c = concat(repeat('x',28),'r','x');
-INSERT INTO t set c = concat(repeat('x',28),'s','y');
-INSERT INTO t set c = concat(repeat('x',28),'g','w');
+INSERT INTO t set c = repeat('x',69);
+INSERT INTO t set c = concat(repeat('x',68),'r','x');
+INSERT INTO t set c = concat(repeat('x',68),'s','y');
+INSERT INTO t set c = concat(repeat('x',68),'g','w');
SELECT c from t ORDER BY c, id;
--echo ** Results should not be sorted **
--echo '#--------------------FN_DYNVARS_098_03-------------------------#'
#########################################################
-#Check if sorting is applied with the max_sort_length=20#
+#Check if sorting is applied with the max_sort_length=64#
#########################################################
###########################################
# Setting new value for max_sort_length #
###########################################
-SET max_sort_length=20;
+SET max_sort_length=64;
###################################
# Inserting values in table t #
###################################
-INSERT INTO t set c = repeat('x',29);
-INSERT INTO t set c = concat(repeat('x',28),'r','x');
-INSERT INTO t set c = concat(repeat('x',28),'s','y');
-INSERT INTO t set c = concat(repeat('x',28),'g','w');
+INSERT INTO t set c = repeat('x',69);
+INSERT INTO t set c = concat(repeat('x',68),'r','x');
+INSERT INTO t set c = concat(repeat('x',68),'s','y');
+INSERT INTO t set c = concat(repeat('x',68),'g','w');
SELECT c from t ORDER BY c, id;
--echo ** Results should not be sorted **
RESET QUERY CACHE;
-
--echo '#--------------------FN_DYNVARS_098_04-------------------------#'
#########################################################
-#Check if sorting is applied with the max_sort_length=29#
+#Check if sorting is applied with the max_sort_length=69#
#########################################################
-SET max_sort_length=29;
+SET max_sort_length=69;
SELECT c from t ORDER BY c, id;
--echo ** Results should be sorted **
--echo '#--------------------FN_DYNVARS_098_05-------------------------#'
#########################################################
-#Check if sorting is applied with the max_sort_length=30#
+#Check if sorting is applied with the max_sort_length=70#
#########################################################
-SET max_sort_length=30;
+SET max_sort_length=70;
SELECT c from t ORDER BY c, id;
--echo ** Results should be sorted **
@@ -173,34 +140,33 @@ SELECT c from t ORDER BY c, id;
#Check if sorting is applied with the max_sort_length=Default#
##############################################################
-
SET max_sort_length=default;
+SELECT @@max_sort_length;
SELECT c from t ORDER BY c, id;
--echo ** Results should be sorted **
-
--echo '#--------------------FN_DYNVARS_098_07-------------------------#'
###########################################
#Check if sorting is applied on BLOB type #
###########################################
--echo Testing type BLOB
# Setting global value of variable and inserting data in table
-SET @@global.max_sort_length = 30;
-SELECT @@global.max_sort_length;
-INSERT INTO t1 set c = repeat('x',29);
-INSERT INTO t1 set c = concat(repeat('x',28),'r','x');
-INSERT INTO t1 set c = concat(repeat('x',28),'s','y');
-INSERT INTO t1 set c = concat(repeat('x',28),'g','w');
-SELECT c from t1 ORDER BY c, id;
+SET @@max_sort_length = 70;
+SELECT @@max_sort_length;
+INSERT INTO t1 set c = repeat('x',69);
+INSERT INTO t1 set c = concat(repeat('x',68),'r','x');
+INSERT INTO t1 set c = concat(repeat('x',68),'s','y');
+INSERT INTO t1 set c = concat(repeat('x',68),'g','w');
+SELECT c from t1 ORDER BY c, id DESC;
--echo ** Results should be sorted **
# Setting session value of variable and inserting data in table
-SET @@session.max_sort_length = 20;
+SET @@session.max_sort_length = 64;
SELECT @@session.max_sort_length;
-INSERT INTO t1 set c = repeat('x',29);
-INSERT INTO t1 set c = concat(repeat('x',28),'r','x');
-INSERT INTO t1 set c = concat(repeat('x',28),'s','y');
-INSERT INTO t1 set c = concat(repeat('x',28),'g','w');
+INSERT INTO t1 set c = repeat('x',69);
+INSERT INTO t1 set c = concat(repeat('x',68),'r','x');
+INSERT INTO t1 set c = concat(repeat('x',68),'s','y');
+INSERT INTO t1 set c = concat(repeat('x',68),'g','w');
SELECT c from t1 ORDER BY c, id;
--echo ** Results should not be sorted **
@@ -210,26 +176,25 @@ SELECT c from t1 ORDER BY c, id;
###########################################
--echo Testing type CHAR
# Setting global value of variable and inserting data in table
-SET @@global.max_sort_length = 30;
+SET @@global.max_sort_length = 70;
SELECT @@global.max_sort_length;
-INSERT INTO t2 set c = repeat('x',29);
-INSERT INTO t2 set c = concat(repeat('x',28),'r','x');
-INSERT INTO t2 set c = concat(repeat('x',28),'s','y');
-INSERT INTO t2 set c = concat(repeat('x',28),'g','w');
+INSERT INTO t2 set c = repeat('x',69);
+INSERT INTO t2 set c = concat(repeat('x',68),'r','x');
+INSERT INTO t2 set c = concat(repeat('x',68),'s','y');
+INSERT INTO t2 set c = concat(repeat('x',68),'g','w');
SELECT c from t2 ORDER BY c, id;
--echo ** Results should not be sorted **
# Setting session value of variable and inserting data in table
-SET @@session.max_sort_length = 20;
+SET @@session.max_sort_length = 64;
SELECT @@session.max_sort_length;
-INSERT INTO t2 set c = repeat('x',29);
-INSERT INTO t2 set c = concat(repeat('x',28),'r','x');
-INSERT INTO t2 set c = concat(repeat('x',28),'s','y');
-INSERT INTO t2 set c = concat(repeat('x',28),'g','w');
+INSERT INTO t2 set c = repeat('x',69);
+INSERT INTO t2 set c = concat(repeat('x',68),'r','x');
+INSERT INTO t2 set c = concat(repeat('x',68),'s','y');
+INSERT INTO t2 set c = concat(repeat('x',68),'g','w');
SELECT c from t2 ORDER BY c, id;
--echo ** Results should not be sorted **
-
#
# Cleanup
#
@@ -239,12 +204,6 @@ connection default;
disconnect test_con1;
disconnect test_con2;
-SET @@SESSION.max_sort_length = @session_max_sort_length;
-
---disable_warnings
-DROP TABLE IF EXISTS t;
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
---enable_warnings
+DROP TABLE t, t1, t2;
SET @@global.max_sort_length= @start_value;