mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
merge: 5.1 -> 5.1-rpl
conflicts: Text conflict in client/mysqltest.cc Text conflict in mysql-test/include/wait_until_connected_again.inc Text conflict in mysql-test/lib/mtr_report.pm Text conflict in mysql-test/mysql-test-run.pl Text conflict in mysql-test/r/events_bugs.result Text conflict in mysql-test/r/log_state.result Text conflict in mysql-test/r/myisam_data_pointer_size_func.result Text conflict in mysql-test/r/mysqlcheck.result Text conflict in mysql-test/r/query_cache.result Text conflict in mysql-test/r/status.result Text conflict in mysql-test/suite/binlog/r/binlog_index.result Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result Text conflict in mysql-test/suite/rpl/r/rpl_packet.result Text conflict in mysql-test/suite/rpl/t/rpl_packet.test Text conflict in mysql-test/t/disabled.def Text conflict in mysql-test/t/events_bugs.test Text conflict in mysql-test/t/log_state.test Text conflict in mysql-test/t/myisam_data_pointer_size_func.test Text conflict in mysql-test/t/mysqlcheck.test Text conflict in mysql-test/t/query_cache.test Text conflict in mysql-test/t/rpl_init_slave_func.test Text conflict in mysql-test/t/status.test
This commit is contained in:
@@ -33,6 +33,7 @@ master-bin.000001 # Query # # use `test`; insert into t1 values (1)
|
||||
master-bin.000001 # Query # # drop database if exists mysqltest1
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values (1)
|
||||
master-bin.000001 # Query # # use `test`; drop table tt1, t1
|
||||
FLUSH STATUS;
|
||||
set binlog_format=mixed;
|
||||
reset master;
|
||||
create database testing_1;
|
||||
@@ -68,6 +69,7 @@ master-bin.000001 # Query # # use `test`; insert into t1 values (1)
|
||||
master-bin.000001 # Query # # drop database if exists mysqltest1
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values (1)
|
||||
master-bin.000001 # Query # # use `test`; drop table tt1, t1
|
||||
FLUSH STATUS;
|
||||
set binlog_format=row;
|
||||
reset master;
|
||||
create database testing_1;
|
||||
@@ -108,6 +110,7 @@ master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
|
||||
FLUSH STATUS;
|
||||
show databases;
|
||||
Database
|
||||
information_schema
|
||||
|
@@ -21,6 +21,7 @@ flush logs;
|
||||
*** must be a warning master-bin.000001 was not found ***
|
||||
Warnings:
|
||||
Warning 1612 Being purged log master-bin.000001 was not found
|
||||
Warning 1612 Being purged log master-bin.000001 was not found
|
||||
*** must show one record, of the active binlog, left in the index file after PURGE ***
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
|
@@ -113,16 +113,17 @@ master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
DROP TABLE t1;
|
||||
flush status;
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 13
|
||||
Binlog_cache_use 0
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 0
|
||||
create table t1 (a int) engine=innodb;
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 14
|
||||
Binlog_cache_use 1
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 1
|
||||
@@ -131,7 +132,7 @@ delete from t1;
|
||||
commit;
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 15
|
||||
Binlog_cache_use 2
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 1
|
||||
|
31
mysql-test/suite/binlog/r/binlog_innodb_row.result
Normal file
31
mysql-test/suite/binlog/r/binlog_innodb_row.result
Normal file
@@ -0,0 +1,31 @@
|
||||
CREATE TABLE t1 (i int unique) ENGINE=innodb;
|
||||
reset master;
|
||||
begin;
|
||||
insert into t1 values (1),(2);
|
||||
*** the following UPDATE query wont generate any updates for the binlog ***
|
||||
update t1 set i = 3 where i < 3;
|
||||
ERROR 23000: Duplicate entry '3' for key 'i'
|
||||
commit;
|
||||
*** Results of the test: the binlog must have only Write_rows events not any Update_rows ***
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
delete from t1;
|
||||
reset master;
|
||||
begin;
|
||||
insert into t1 values (1),(2);
|
||||
*** the following UPDATE query wont generate any updates for the binlog ***
|
||||
insert into t1 values (3),(4),(1),(2);
|
||||
ERROR 23000: Duplicate entry '1' for key 'i'
|
||||
commit;
|
||||
*** Results of the test: the binlog must have only one Write_rows event not two ***
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
drop table t1;
|
@@ -133,10 +133,6 @@ master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t2)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
insert into t1 values(11);
|
||||
commit;
|
||||
show binlog events from <binlog_start>;
|
||||
@@ -148,8 +144,6 @@ master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t2)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
@@ -278,10 +272,6 @@ master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t2)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; drop table t1,t2
|
||||
master-bin.000001 # Query # # use `test`; create table t0 (n int)
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
@@ -382,7 +372,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE if exists t2
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; ROLLBACK
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t2
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
@@ -400,7 +390,9 @@ master-bin.000001 # Query # # use `test`; DROP TABLE t2
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # use `test`; ROLLBACK
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
@@ -408,11 +400,7 @@ master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; ROLLBACK
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE table t2
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
|
@@ -101,6 +101,7 @@ DROP TABLE t1;
|
||||
# Actually this test has nothing to do with innodb per se, it just requires
|
||||
# transactional table.
|
||||
#
|
||||
flush status;
|
||||
show status like "binlog_cache_use";
|
||||
show status like "binlog_cache_disk_use";
|
||||
|
||||
|
42
mysql-test/suite/binlog/t/binlog_innodb_row.test
Normal file
42
mysql-test/suite/binlog/t/binlog_innodb_row.test
Normal file
@@ -0,0 +1,42 @@
|
||||
#
|
||||
# Tests of innodb/binlog with the row binlog format
|
||||
#
|
||||
source include/have_innodb.inc;
|
||||
source include/have_log_bin.inc;
|
||||
source include/have_binlog_format_row.inc;
|
||||
|
||||
#
|
||||
# Bug #40221 Replication failure on RBR + UPDATE the primary key
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (i int unique) ENGINE=innodb;
|
||||
reset master;
|
||||
|
||||
# part 1: update can cause the dup key
|
||||
|
||||
begin;
|
||||
insert into t1 values (1),(2);
|
||||
--echo *** the following UPDATE query wont generate any updates for the binlog ***
|
||||
--error ER_DUP_ENTRY
|
||||
update t1 set i = 3 where i < 3;
|
||||
commit;
|
||||
|
||||
--echo *** Results of the test: the binlog must have only Write_rows events not any Update_rows ***
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
# part 2: insert can cause the dup key
|
||||
|
||||
delete from t1;
|
||||
reset master;
|
||||
|
||||
begin;
|
||||
insert into t1 values (1),(2);
|
||||
--echo *** the following UPDATE query wont generate any updates for the binlog ***
|
||||
--error ER_DUP_ENTRY
|
||||
insert into t1 values (3),(4),(1),(2);
|
||||
commit;
|
||||
|
||||
--echo *** Results of the test: the binlog must have only one Write_rows event not two ***
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
drop table t1;
|
@@ -43,10 +43,10 @@ NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL N
|
||||
NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
||||
NULL information_schema ENGINES COMMENT 3 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
|
||||
NULL information_schema ENGINES ENGINE 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
||||
NULL information_schema ENGINES SAVEPOINTS 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
|
||||
NULL information_schema ENGINES SAVEPOINTS 6 NULL YES varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
|
||||
NULL information_schema ENGINES SUPPORT 2 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
|
||||
NULL information_schema ENGINES TRANSACTIONS 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
|
||||
NULL information_schema ENGINES XA 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
|
||||
NULL information_schema ENGINES TRANSACTIONS 4 NULL YES varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
|
||||
NULL information_schema ENGINES XA 5 NULL YES varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
|
||||
NULL information_schema EVENTS CHARACTER_SET_CLIENT 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
|
||||
NULL information_schema EVENTS COLLATION_CONNECTION 23 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
|
||||
NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
|
||||
|
@@ -31,27 +31,27 @@ Field Type Null Key Default Extra
|
||||
ENGINE varchar(64) NO
|
||||
SUPPORT varchar(8) NO
|
||||
COMMENT varchar(80) NO
|
||||
TRANSACTIONS varchar(3) NO
|
||||
XA varchar(3) NO
|
||||
SAVEPOINTS varchar(3) NO
|
||||
TRANSACTIONS varchar(3) YES NULL
|
||||
XA varchar(3) YES NULL
|
||||
SAVEPOINTS varchar(3) YES NULL
|
||||
SHOW CREATE TABLE information_schema.ENGINES;
|
||||
Table Create Table
|
||||
ENGINES CREATE TEMPORARY TABLE `ENGINES` (
|
||||
`ENGINE` varchar(64) NOT NULL DEFAULT '',
|
||||
`SUPPORT` varchar(8) NOT NULL DEFAULT '',
|
||||
`COMMENT` varchar(80) NOT NULL DEFAULT '',
|
||||
`TRANSACTIONS` varchar(3) NOT NULL DEFAULT '',
|
||||
`XA` varchar(3) NOT NULL DEFAULT '',
|
||||
`SAVEPOINTS` varchar(3) NOT NULL DEFAULT ''
|
||||
`TRANSACTIONS` varchar(3) DEFAULT NULL,
|
||||
`XA` varchar(3) DEFAULT NULL,
|
||||
`SAVEPOINTS` varchar(3) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=utf8
|
||||
SHOW COLUMNS FROM information_schema.ENGINES;
|
||||
Field Type Null Key Default Extra
|
||||
ENGINE varchar(64) NO
|
||||
SUPPORT varchar(8) NO
|
||||
COMMENT varchar(80) NO
|
||||
TRANSACTIONS varchar(3) NO
|
||||
XA varchar(3) NO
|
||||
SAVEPOINTS varchar(3) NO
|
||||
TRANSACTIONS varchar(3) YES NULL
|
||||
XA varchar(3) YES NULL
|
||||
SAVEPOINTS varchar(3) YES NULL
|
||||
########################################################################
|
||||
# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
|
||||
# DDL on INFORMATION_SCHEMA tables are not supported
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -16,15 +16,32 @@
|
||||
# Created:
|
||||
# 2008-08-27 mleich
|
||||
#
|
||||
|
||||
# Modified:
|
||||
# 2008-11-17 pcrews
|
||||
# added --disable / --enable_warning statements to minimize differences
|
||||
# between platforms (Bug#40177 Test funcs_1.storedproc failing on Pushbuild)
|
||||
#
|
||||
# TODO: (After 5.1 GA)
|
||||
# 1) Examine reordering statements in this file to minimize the number of
|
||||
# --disable / --enable_warning statements. Unsure if performance gains
|
||||
# warrant the working time
|
||||
# 2) We could probably add a comparison of the # of warnings before the
|
||||
# assignment of @v1_proc and @v1_func to the # of warnings after assignment
|
||||
# The difference of these values should be zero
|
||||
# Refer to Bug#40177 - http://bugs.mysql.com/bug.php?id=40177 for notes as well
|
||||
|
||||
eval UPDATE t1_aux SET f1 = NULL;
|
||||
# Enforce that all user variables have the same data type and initial value.
|
||||
SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
|
||||
|
||||
--disable_warnings
|
||||
eval UPDATE t1_aux SET f1 = $test_value;
|
||||
--enable_warnings
|
||||
SELECT f1 INTO @v1_tab FROM t1_aux;
|
||||
--disable_warnings
|
||||
eval CALL sproc_1($test_value, @v1_proc);
|
||||
eval SET @v1_func = func_1($test_value);
|
||||
--enable_warnings
|
||||
|
||||
if (`SELECT @v1_tab <> @v1_proc OR @v1_tab <> @v2_proc OR @v1_tab <> @v1_func`)
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# suite/funcs_1/t/is_collation_character_set_applicability.test
|
||||
# suite/funcs_1/t/is_coll_char_set_appl.test
|
||||
#
|
||||
# Check the layout of information_schema.collation_character_set_applicability
|
||||
# and some functionality realted tests.
|
||||
# and some functionality related tests.
|
||||
#
|
||||
# Author:
|
||||
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
|
@@ -1,6 +1,6 @@
|
||||
# Disabled by hhunger (2008-03-03) due to WL4204
|
||||
innodb_charset : Due to bug#20447
|
||||
myisam_charset : Due to bug#20477
|
||||
memory_charset : Due to bug#20447
|
||||
ndb_charset : Due to bug#20447
|
||||
innodb_charset : Bug#20447 Problem with prefix keys with contractions and expansions
|
||||
myisam_charset : Bug#20447 Problem with prefix keys with contractions and expansions
|
||||
memory_charset : Bug#20447 Problem with prefix keys with contractions and expansions
|
||||
ndb_charset : Bug#20447 Problem with prefix keys with contractions and expansions
|
||||
|
||||
|
@@ -9,8 +9,7 @@
|
||||
# Do not use any TAB characters for whitespace.
|
||||
#
|
||||
##############################################################################
|
||||
partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table
|
||||
|
||||
ndb_partition_error2 : HF is not sure if the test can work as internded on all the platforms
|
||||
ndb_partition_error2 : Bug#40989 ndb_partition_error2 needs maintenance
|
||||
|
||||
# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
|
||||
|
@@ -6,7 +6,7 @@ create table t1 (a bit(0), primary key (a)) engine='INNODB' partition by key (a)
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0',
|
||||
`a` bit(1) NOT NULL DEFAULT b'0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a) */
|
||||
@@ -18,7 +18,7 @@ partition pa2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0',
|
||||
`a` bit(1) NOT NULL DEFAULT b'0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
@@ -30,7 +30,7 @@ partition by key (a) partitions 2;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
|
||||
`a` bit(64) NOT NULL DEFAULT b'0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
@@ -58,7 +58,7 @@ partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
|
||||
`a` bit(64) NOT NULL DEFAULT b'0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
@@ -88,7 +88,7 @@ partition by key (a) partitions 4;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0',
|
||||
`a` bit(1) NOT NULL DEFAULT b'0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
@@ -102,7 +102,7 @@ alter table t2 drop primary key;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0'
|
||||
`a` bit(1) NOT NULL DEFAULT b'0'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 4 */
|
||||
@@ -114,7 +114,7 @@ alter table t2 add primary key (a);
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0',
|
||||
`a` bit(1) NOT NULL DEFAULT b'0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
@@ -133,7 +133,7 @@ partition pa4 values less than (256));
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` bit(8) NOT NULL DEFAULT '\0',
|
||||
`a` bit(8) NOT NULL DEFAULT b'0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY RANGE (a)
|
||||
@@ -416,7 +416,7 @@ partition pa3 values in (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32));
|
||||
show create table t4;
|
||||
Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`a` bit(8) NOT NULL DEFAULT '\0',
|
||||
`a` bit(8) NOT NULL DEFAULT b'0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY LIST (a)
|
||||
|
@@ -6,7 +6,7 @@ create table t1 (a bit(0), primary key (a)) engine='MyISAM' partition by key (a)
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0',
|
||||
`a` bit(1) NOT NULL DEFAULT b'0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a) */
|
||||
@@ -18,7 +18,7 @@ partition pa2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0',
|
||||
`a` bit(1) NOT NULL DEFAULT b'0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
@@ -30,7 +30,7 @@ partition by key (a) partitions 2;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
|
||||
`a` bit(64) NOT NULL DEFAULT b'0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
@@ -58,7 +58,7 @@ partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
|
||||
`a` bit(64) NOT NULL DEFAULT b'0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
@@ -88,7 +88,7 @@ partition by key (a) partitions 4;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0',
|
||||
`a` bit(1) NOT NULL DEFAULT b'0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
@@ -102,7 +102,7 @@ alter table t2 drop primary key;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0'
|
||||
`a` bit(1) NOT NULL DEFAULT b'0'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 4 */
|
||||
@@ -114,7 +114,7 @@ alter table t2 add primary key (a);
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0',
|
||||
`a` bit(1) NOT NULL DEFAULT b'0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
@@ -133,7 +133,7 @@ partition pa4 values less than (256));
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` bit(8) NOT NULL DEFAULT '\0',
|
||||
`a` bit(8) NOT NULL DEFAULT b'0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY RANGE (a)
|
||||
@@ -416,7 +416,7 @@ partition pa3 values in (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32));
|
||||
show create table t4;
|
||||
Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`a` bit(8) NOT NULL DEFAULT '\0',
|
||||
`a` bit(8) NOT NULL DEFAULT b'0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY LIST (a)
|
||||
|
@@ -1,126 +0,0 @@
|
||||
SET @max_row = 20;
|
||||
create table t1 (a bit(65), primary key (a)) partition by key (a);
|
||||
ERROR 42000: Display width out of range for column 'a' (max = 64)
|
||||
create table t1 (a bit(0), primary key (a)) partition by key (a);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a) */
|
||||
drop table t1;
|
||||
create table t1 (a bit(0), primary key (a)) partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp',
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp');
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/'
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM,
|
||||
PARTITION pa2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
drop table t1;
|
||||
create table t1 (a bit(64), primary key (a)) partition by key (a);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a) */
|
||||
insert into t1 values
|
||||
(b'1111111111111111111111111111111111111111111111111111111111111111'),
|
||||
(b'1000000000000000000000000000000000000000000000000000000000000000'),
|
||||
(b'0000000000000000000000000000000000000000000000000000000000000001'),
|
||||
(b'1010101010101010101010101010101010101010101010101010101010101010'),
|
||||
(b'0101010101010101010101010101010101010101010101010101010101010101');
|
||||
select hex(a) from t1;
|
||||
hex(a)
|
||||
1
|
||||
5555555555555555
|
||||
8000000000000000
|
||||
AAAAAAAAAAAAAAAA
|
||||
FFFFFFFFFFFFFFFF
|
||||
drop table t1;
|
||||
create table t1 (a bit(64), primary key (a)) partition by key (a)(
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/'
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
insert into t1 values
|
||||
(b'1111111111111111111111111111111111111111111111111111111111111111'),
|
||||
(b'1000000000000000000000000000000000000000000000000000000000000000'),
|
||||
(b'0000000000000000000000000000000000000000000000000000000000000001'),
|
||||
(b'1010101010101010101010101010101010101010101010101010101010101010'),
|
||||
(b'0101010101010101010101010101010101010101010101010101010101010101');
|
||||
select hex(a) from t1;
|
||||
hex(a)
|
||||
1
|
||||
5555555555555555
|
||||
8000000000000000
|
||||
AAAAAAAAAAAAAAAA
|
||||
FFFFFFFFFFFFFFFF
|
||||
drop table t1;
|
||||
create table t1 (a bit, primary key (a)) partition by key (a);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a) */
|
||||
insert into t1 values (b'0'), (b'1');
|
||||
select hex(a) from t1;
|
||||
hex(a)
|
||||
0
|
||||
1
|
||||
alter table t1 drop primary key;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a) */
|
||||
select hex(a) from t1;
|
||||
hex(a)
|
||||
0
|
||||
1
|
||||
alter table t1 add primary key (a);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a) */
|
||||
select hex(a) from t1;
|
||||
hex(a)
|
||||
0
|
||||
1
|
||||
drop table t1;
|
@@ -213,5 +213,10 @@ START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (NULL, 'first row t2');
|
||||
SET autocommit=OFF;
|
||||
ALTER TABLE t1 AUTO_INCREMENT = 10;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
INSERT INTO t1 VALUES (NULL, 'second row t2');
|
||||
SELECT a,b FROM t1 ORDER BY a;
|
||||
a b
|
||||
1 first row t2
|
||||
2 second row t2
|
||||
DROP TABLE t1;
|
||||
|
@@ -1,8 +1,3 @@
|
||||
partition_basic_ndb : Bug#19899 Crashing the server
|
||||
# http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-limitations-syntax.html
|
||||
partition_bit_ndb : NDB does not support bit column in index
|
||||
partition_sessions : needs system_3_init.inc
|
||||
partition_syntax_ndb : Bug#36735 Not supported
|
||||
partition_value_innodb : Bug#30581 partition_value tests use disallowed CAST() function
|
||||
partition_value_myisam : Bug#30581 partition_value tests use disallowed CAST() function
|
||||
partition_value_ndb : Bug#30581 partition_value tests use disallowed CAST() function
|
||||
|
@@ -1,60 +0,0 @@
|
||||
################################################################################
|
||||
# t/partition_bit_ndb.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Tests around bit type #
|
||||
# NDB branch #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: HH #
|
||||
# Original Date: 2006-08-01 #
|
||||
# Change Author: #
|
||||
# Change Date: #
|
||||
# Change: #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
|
||||
##### Options, for debugging support #####
|
||||
let $debug= 0;
|
||||
let $with_partitioning= 1;
|
||||
|
||||
##### Option, for displaying files #####
|
||||
let $ls= 1;
|
||||
|
||||
##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments #####
|
||||
# on partioned tables
|
||||
SET @max_row = 20;
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
--source include/have_ndb.inc
|
||||
let $engine= 'NDB';
|
||||
connection default;
|
||||
|
||||
# range, list and hash partitioning in ndb requires new_mode
|
||||
--disable_query_log
|
||||
set new=on;
|
||||
--enable_query_log
|
||||
##### Assign a big number smaller than the maximum value for partitions #####
|
||||
# and smaller than the maximum value of SIGNED INTEGER
|
||||
let $MAX_VALUE= (2147483646);
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_bit.inc
|
@@ -1,391 +0,0 @@
|
||||
|
||||
#--------------------------------------------------
|
||||
# Initialize system_3 test variables
|
||||
#--------------------------------------------------
|
||||
|
||||
--source suite/system_3/include/system_3_init.inc
|
||||
|
||||
let $NUM_VAL=`SELECT @NUM_VAL`;
|
||||
let $LOAD_LINES=`SELECT @LOAD_LINES`;
|
||||
let $LOG_UPPER=`SELECT @LOG_UPPER`;
|
||||
let $LOG_LOWER=`SELECT @LOG_LOWER`;
|
||||
#let $ENG1=`SELECT @ENG1`;
|
||||
let $ENG2=`SELECT @ENG2`;
|
||||
let $ENG_LOG=`SELECT @ENG_LOG`;
|
||||
let $CLIENT_HOST=`SELECT @CLIENT_HOST`;
|
||||
let $ENG=innodb;
|
||||
let $ENG1=innodb;
|
||||
#---------------------------------------------------------
|
||||
# Column list with definition for all tables to be checked
|
||||
#---------------------------------------------------------
|
||||
|
||||
let $column_list= f1 int,
|
||||
f2 char (15),
|
||||
f3 decimal (5,3),
|
||||
f4 datetime;
|
||||
|
||||
let $col_access_list = f1,f2,f3,f4 ;
|
||||
let $col_new_list = new.f1,new.f2,new.f3 new.f4 ;
|
||||
|
||||
#---------------------------------------------------
|
||||
# Setting the parameters to use during testing
|
||||
#---------------------------------------------------
|
||||
# Set number of variations of the f1 variable (used to segment the rows
|
||||
# being updated/deleted by a user at a time. The higher the number, the
|
||||
# more smaller segments used with each query.
|
||||
--replace_result $NUM_VAL NUM_VAL
|
||||
eval set @f1_nums=$NUM_VAL;
|
||||
|
||||
# The following sets the number controls the size of the log table.
|
||||
# Once a size of '@threshold' is reached, the first rows are removed
|
||||
# sunch that the table is down to '@shrink_to' lines
|
||||
--replace_result $LOG_LOWER LOG_LOWER
|
||||
eval set @shrink_to=$LOG_LOWER;
|
||||
--replace_result $LOG_UPPER LOG_UPPER
|
||||
eval set @threshold=$LOG_UPPER;
|
||||
|
||||
#---------------------------------------------------
|
||||
# Creating the database tables and loading the data
|
||||
#---------------------------------------------------
|
||||
|
||||
--disable_warnings
|
||||
drop database if exists systest1;
|
||||
--enable_warnings
|
||||
|
||||
create database systest1;
|
||||
|
||||
--disable_abort_on_error
|
||||
--replace_result $CLIENT_HOST CLIENT_HOST
|
||||
eval create user systuser@'$CLIENT_HOST';
|
||||
--enable_abort_on_error
|
||||
--replace_result $CLIENT_HOST CLIENT_HOST
|
||||
eval set password for systuser@'$CLIENT_HOST' = password('systpass');
|
||||
--replace_result $CLIENT_HOST CLIENT_HOST
|
||||
eval grant ALL on systest1.* to systuser@'$CLIENT_HOST';
|
||||
use systest1;
|
||||
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
|
||||
connect (systuser,localhost,systuser,systpass,systest1,$MASTER_MYPORT,$MASTER_MYSOCK);
|
||||
|
||||
create table tb1_master (
|
||||
f1 int,
|
||||
f2 char(15),
|
||||
f3 decimal (5,3),
|
||||
f4 datetime
|
||||
);
|
||||
|
||||
#--replace_result $ENG_LOG ENG_LOG
|
||||
eval create table tb1_logs (
|
||||
i1 int NOT NULL auto_increment, primary key (i1),
|
||||
dt1 datetime NOT NULL,
|
||||
entry_dsc char(100),
|
||||
f4 int
|
||||
) engine=$ENG_LOG
|
||||
;
|
||||
#PARTITION BY HASH (i1) PARTITIONS 8;
|
||||
|
||||
if ($debug)
|
||||
{
|
||||
SHOW CREATE TABLE tb1_logs;
|
||||
}
|
||||
|
||||
#--replace_result $ENG_LOG ENG_LOG
|
||||
eval create table ddl_logs (
|
||||
i1 int NOT NULL auto_increment, primary key (i1),
|
||||
dt1 datetime NOT NULL,
|
||||
entry_dsc char(100),
|
||||
errno int
|
||||
) engine=$ENG_LOG;
|
||||
#PARTITION BY HASH (i1) PARTITIONS 8;
|
||||
|
||||
if ($debug)
|
||||
{
|
||||
SHOW CREATE TABLE tb1_logs;
|
||||
}
|
||||
create table test_stat (
|
||||
dt1 datetime,
|
||||
table_name char(20),
|
||||
row_count int,
|
||||
start_row int,
|
||||
end_row int
|
||||
);
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# tb3_eng1: key partitioning
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
#--replace_result $ENG1 ENG1
|
||||
eval create table tb3_eng1 (
|
||||
i1 int NOT NULL auto_increment, primary key (i1),
|
||||
$column_list
|
||||
) engine=$ENG1
|
||||
PARTITION BY KEY (i1) PARTITIONS 4
|
||||
(PARTITION part1,
|
||||
PARTITION part2,
|
||||
PARTITION part3,
|
||||
PARTITION part4);
|
||||
|
||||
#--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data local infile '$MYSQL_TEST_DIR/suite/system_3/data/tb1.txt'
|
||||
into table tb3_eng1 ($col_access_list);
|
||||
|
||||
if ($WITH_TRIGGERS)
|
||||
{
|
||||
delimiter //;
|
||||
|
||||
Create trigger tb3_eng1_ins after insert on tb3_eng1 for each row
|
||||
BEGIN
|
||||
insert into tb1_logs (dt1, entry_dsc, f4)
|
||||
values (now(), concat('Insert row ', new.f1,' ',
|
||||
new.f2, ' ', new.f3, ' (tb3_eng1)'), new.f1);
|
||||
END//
|
||||
|
||||
Create trigger tb3_eng1_upd after update on tb3_eng1 for each row
|
||||
BEGIN
|
||||
insert into tb1_logs (dt1, entry_dsc, f4)
|
||||
values (now(), concat('Update row ', old.f1,' ', old.f2, '->',
|
||||
new.f2, ' ', old.f3, '->', new.f3, ' (tb3_eng1)'), new.f1);
|
||||
END//
|
||||
|
||||
Create trigger tb3_eng1_del after delete on tb3_eng1 for each row
|
||||
BEGIN
|
||||
insert into tb1_logs (dt1, entry_dsc, f4)
|
||||
values (now(), concat('Delete row ', old.f1,' ', old.f2, ' ',
|
||||
old.f3, ' (tb3_eng1)'), old.f1);
|
||||
END//
|
||||
|
||||
delimiter ;//
|
||||
}
|
||||
delimiter //;
|
||||
|
||||
# This functions returns a random integer number
|
||||
# between zero and 'num'
|
||||
#-----------------------------------------------
|
||||
create function int_rand(num int) returns int
|
||||
BEGIN
|
||||
return round(num*rand()+0.5);
|
||||
END//
|
||||
|
||||
# This function returns a string in the length 'len' of
|
||||
# random letters (ascii range of 65-122)
|
||||
#------------------------------------------------------
|
||||
create function str_rand (len int) returns char(12)
|
||||
BEGIN
|
||||
declare tmp_letter char(1);
|
||||
declare tmp_word char(12);
|
||||
declare word_str char(12) default '';
|
||||
wl_loop: WHILE len DO
|
||||
set tmp_letter=char(round(57*rand()+65));
|
||||
set tmp_word=concat(word_str,tmp_letter);
|
||||
set word_str=tmp_word;
|
||||
set len=len-1;
|
||||
END WHILE wl_loop;
|
||||
return word_str;
|
||||
END//
|
||||
|
||||
|
||||
# This procedure scans 'tb1_master' table for rows where f1='num_pr'
|
||||
# and for each row inserts a row in 'tb3_eng1'
|
||||
#------------------------------------------------------------------
|
||||
eval create procedure ins_tb3_eng1 (num_pr int, str_pr char(15))
|
||||
BEGIN
|
||||
declare done int default 0;
|
||||
declare v3 decimal(5,3);
|
||||
declare cur1 cursor for
|
||||
select f3 from tb1_master where f1=num_pr;
|
||||
declare continue handler for sqlstate '01000' set done = 1;
|
||||
declare continue handler for sqlstate '02000' set done = 1;
|
||||
open cur1;
|
||||
fetch cur1 into v3;
|
||||
wl_loop: WHILE NOT done DO
|
||||
insert into tb3_eng1 ($col_access_list) values
|
||||
(int_rand(@f1_nums), concat('I:',str_pr,'-',num_pr), v3, now());
|
||||
fetch cur1 into v3;
|
||||
END WHILE wl_loop;
|
||||
close cur1;
|
||||
END//
|
||||
|
||||
|
||||
# This procedure does selects from the 'tb1_logs' and inserts the
|
||||
# count into the table
|
||||
#------------------------------------------------------------------
|
||||
create procedure slct_tb1_logs ()
|
||||
BEGIN
|
||||
declare done int default 0;
|
||||
declare v4 int;
|
||||
declare v_count int default 0;
|
||||
declare str_val char(15) default ELT(int_rand(3),
|
||||
'Insert', 'Update', 'Delete');
|
||||
declare cur1 cursor for
|
||||
select f4 from tb1_logs where entry_dsc like concat('%',str_val,'%');
|
||||
declare continue handler for sqlstate '01000' set done = 1;
|
||||
declare continue handler for sqlstate '02000' set done = 1;
|
||||
open cur1;
|
||||
fetch cur1 into v4;
|
||||
wl_loop: WHILE NOT done DO
|
||||
set v_count=v_count+1;
|
||||
fetch cur1 into v4;
|
||||
END WHILE wl_loop;
|
||||
close cur1;
|
||||
insert into tb1_logs (dt1, entry_dsc, f4)
|
||||
values (now(), concat('Number of \'', str_val, '\' rows is: ',
|
||||
v_count, ' (tb1_log)'),0);
|
||||
END//
|
||||
|
||||
delimiter ;//
|
||||
|
||||
--disable_abort_on_error
|
||||
insert into systest1.tb3_eng1 values (NULL,50,'init_val',12.345,'2005-01-01 00:00:00');
|
||||
insert into systest1.tb3_eng1 values (NULL,70,'init_val',12.345,'2005-01-01 00:00:00');
|
||||
--enable_abort_on_error
|
||||
|
||||
connection default;0.
|
||||
--disable_abort_on_error
|
||||
--replace_result $CLIENT_HOST CLIENT_HOST
|
||||
eval create user syst1user@'$CLIENT_HOST';
|
||||
--enable_abort_on_error
|
||||
--replace_result $CLIENT_HOST CLIENT_HOST
|
||||
eval set password for syst1user@'$CLIENT_HOST' = password('systpass');
|
||||
--replace_result $CLIENT_HOST CLIENT_HOST
|
||||
eval grant ALL on systest1.* to syst1user@'$CLIENT_HOST';
|
||||
use systest1;
|
||||
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
|
||||
connect (syst1user,localhost,syst1user,systpass,systest1,$MASTER_MYPORT,$MASTER_MYSOCK);
|
||||
|
||||
--source suite/system_3/include/system_3_init.inc
|
||||
use systest1;
|
||||
let $NUM_VAL=`SELECT @NUM_VAL`;
|
||||
eval SET @f1_nums=$NUM_VAL;
|
||||
SET @tmp_num=int_rand(@f1_nums);
|
||||
SET @tmp_word=str_rand(4);
|
||||
|
||||
# DEBUG select @tmp_num, @tmp_word;
|
||||
|
||||
# Insert rows replacing the deleted rows using a strored procedure
|
||||
# that reads the rows from a master table
|
||||
CALL ins_tb3_eng1 (@tmp_num, @tmp_word);
|
||||
|
||||
connection syst1user;
|
||||
--source suite/system_3/include/system_3_init.inc
|
||||
use systest1;
|
||||
let $NUM_VAL=`SELECT @NUM_VAL`;
|
||||
eval SET @f1_nums=$NUM_VAL;
|
||||
SET @tmp_num=int_rand(@f1_nums);
|
||||
SET @tmp_word=str_rand(4);
|
||||
|
||||
# DEBUG select @tmp_num, @tmp_word;
|
||||
|
||||
# Insert rows replacing the deleted rows using a strored procedure
|
||||
# that reads the rows from a master table
|
||||
CALL ins_tb3_eng1 (@tmp_num, @tmp_word);
|
||||
|
||||
connection systuser;
|
||||
--source suite/system_3/include/system_3_init.inc
|
||||
use systest1;
|
||||
call slct_tb1_logs();
|
||||
|
||||
connection syst1user;
|
||||
--source suite/system_3/include/system_3_init.inc
|
||||
use systest1;
|
||||
let $NUM_VAL=`SELECT @NUM_VAL`;
|
||||
eval set @f1_nums=$NUM_VAL;
|
||||
set @tmp_num=int_rand(@f1_nums);
|
||||
set @tmp_word=str_rand(4);
|
||||
|
||||
select @tmp_num, @tmp_word;
|
||||
|
||||
# Update all rows in the table where f1 is one less the random number
|
||||
update tb3_eng1
|
||||
set f2=concat('U:',@tmp_word,'-',@tmp_num), f3=f3+1
|
||||
where f1=@tmp_num-1;
|
||||
|
||||
connection systuser;
|
||||
--source suite/system_3/include/system_3_init.inc
|
||||
use systest1;
|
||||
let $NUM_VAL=`SELECT @NUM_VAL`;
|
||||
eval set @f1_nums=$NUM_VAL;
|
||||
set @tmp_num=int_rand(@f1_nums);
|
||||
set @tmp_word=str_rand(4);
|
||||
|
||||
select @tmp_num, @tmp_word;
|
||||
|
||||
# Update all rows in the table where f1 is one less the random number
|
||||
update tb3_eng1
|
||||
set f2=concat('U:',@tmp_word,'-',@tmp_num), f3=f3+1
|
||||
where f1=@tmp_num-1;
|
||||
|
||||
connection syst1user;
|
||||
--source suite/system_3/include/system_3_init.inc
|
||||
use systest1;
|
||||
call slct_tb1_logs();
|
||||
|
||||
connection systuser;
|
||||
--source suite/system_3/include/system_3_init.inc
|
||||
use systest1;
|
||||
let $NUM_VAL=`SELECT @NUM_VAL`;
|
||||
eval set @f1_nums=$NUM_VAL;
|
||||
set @tmp_num=int_rand(@f1_nums);
|
||||
set @tmp_word=str_rand(4);
|
||||
|
||||
select @tmp_num, @tmp_word;
|
||||
|
||||
# Update all rows in the table where f1 is one less the random number
|
||||
update tb3_eng1
|
||||
set f2=concat('U:',@tmp_word,'-',@tmp_num), f3=f3+1
|
||||
where f1=@tmp_num-1;
|
||||
|
||||
|
||||
connection syst1user;
|
||||
--source suite/system_3/include/system_3_init.inc
|
||||
use systest1;
|
||||
#--replace_result $NUM_VAL <NUM_VAL>
|
||||
let $NUM_VAL=`SELECT @NUM_VAL`;
|
||||
eval set @f1_nums=$NUM_VAL;
|
||||
set @tmp_num=int_rand(@f1_nums);
|
||||
select @tmp_num;
|
||||
|
||||
# DEBUG select @tmp_num, @tmp_word;
|
||||
|
||||
# Delete all rows from the table where f1 is equal to the above number
|
||||
delete from tb3_eng1 where f1=@tmp_num;
|
||||
|
||||
connection systuser;
|
||||
--source suite/system_3/include/system_3_init.inc
|
||||
use systest1;
|
||||
select * from tb3_eng1 where f1>40;
|
||||
|
||||
|
||||
connection syst1user;
|
||||
--source suite/system_3/include/system_3_init.inc
|
||||
use systest1;
|
||||
let $NUM_VAL=`SELECT @NUM_VAL`;
|
||||
eval set @f1_nums=$NUM_VAL;
|
||||
set @tmp_num=int_rand(@f1_nums);
|
||||
select @tmp_num;
|
||||
|
||||
# DEBUG select @tmp_num, @tmp_word;
|
||||
|
||||
# Delete all rows from the table where f1 is equal to the above number
|
||||
delete from tb3_eng1 where f1=@tmp_num;
|
||||
|
||||
connection systuser;
|
||||
--source suite/system_3/include/system_3_init.inc
|
||||
use systest1;
|
||||
select * from tb3_eng1 where f1>40;
|
||||
|
||||
connection syst1user;
|
||||
--source suite/system_3/include/system_3_init.inc
|
||||
use systest1;
|
||||
let $NUM_VAL=`SELECT @NUM_VAL`;
|
||||
eval set @f1_nums=$NUM_VAL;
|
||||
set @tmp_num=int_rand(@f1_nums);
|
||||
select @tmp_num;
|
||||
|
||||
select @tmp_num, @tmp_word;
|
||||
|
||||
# Delete all rows from the table where f1 is equal to the above number
|
||||
delete from tb3_eng1 where f1=@tmp_num;
|
||||
|
||||
connection systuser;
|
||||
--source suite/system_3/include/system_3_init.inc
|
||||
use systest1;
|
||||
select * from tb3_eng1 where f1>40;
|
@@ -68,10 +68,12 @@ INSERT INTO t1 VALUES (NULL, 'first row t2');
|
||||
|
||||
--connection con2
|
||||
SET autocommit=OFF;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
ALTER TABLE t1 AUTO_INCREMENT = 10;
|
||||
|
||||
--connection con1
|
||||
INSERT INTO t1 VALUES (NULL, 'second row t2');
|
||||
SELECT a,b FROM t1 ORDER BY a;
|
||||
--disconnect con2
|
||||
--disconnect con1
|
||||
--connection default
|
||||
|
@@ -8,9 +8,9 @@
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: mleich #
|
||||
# Original Date: 2006-04-11 #
|
||||
# Change Author: #
|
||||
# Change Date: #
|
||||
# Change: #
|
||||
# Change Author: mleich #
|
||||
# Change Date: 2008-12-08 #
|
||||
# Change: Remove test from disabled.def + change test that it gets skipped #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
@@ -22,6 +22,12 @@
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#
|
||||
# CAST() within the partitioning function si no more supported, but we get
|
||||
# this functionality probably soon again. Therefor we do not delete this test.
|
||||
--skip # CAST() in partitioning function is currently not supported.
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
|
||||
|
@@ -8,9 +8,9 @@
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: mleich #
|
||||
# Original Date: 2006-04-11 #
|
||||
# Change Author: #
|
||||
# Change Date: #
|
||||
# Change: #
|
||||
# Change Author: mleich #
|
||||
# Change Date: 2008-12-08 #
|
||||
# Change: Remove test from disabled.def + change test that it gets skipped #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
@@ -22,6 +22,12 @@
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#
|
||||
# CAST() within the partitioning function si no more supported, but we get
|
||||
# this functionality probably soon again. Therefor we do not delete this test.
|
||||
--skip # CAST() in partitioning function is currently not supported.
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
|
||||
|
@@ -8,9 +8,9 @@
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: mleich #
|
||||
# Original Date: 2006-04-11 #
|
||||
# Change Author: #
|
||||
# Change Date: #
|
||||
# Change: #
|
||||
# Change Author: mleich #
|
||||
# Change Date: 2008-12-08 #
|
||||
# Change: Remove test from disabled.def + change test that it gets skipped #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
@@ -22,6 +22,12 @@
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#
|
||||
# CAST() within the partitioning function si no more supported, but we get
|
||||
# this functionality probably soon again. Therefor we do not delete this test.
|
||||
--skip # CAST() in partitioning function is currently not supported.
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
|
||||
|
@@ -227,3 +227,20 @@ select * from t3 order by a;
|
||||
a
|
||||
127
|
||||
drop table t1,t2,t3;
|
||||
set auto_increment_increment=1;
|
||||
set auto_increment_offset=1;
|
||||
CREATE TABLE t1 (id MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=innodb;
|
||||
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
|
8
mysql-test/suite/rpl/r/rpl_binlog_corruption.result
Normal file
8
mysql-test/suite/rpl/r/rpl_binlog_corruption.result
Normal file
@@ -0,0 +1,8 @@
|
||||
call mtr.add_suppression('Found invalid event in binary log');
|
||||
==== Initialize ====
|
||||
Setting up fake replication from MYSQL_TEST_DIR/std_data/bug40482-bin.000001
|
||||
==== Test ====
|
||||
START SLAVE SQL_THREAD;
|
||||
Last_SQL_Error = Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.
|
||||
==== Clean up ====
|
||||
Cleaning up after setup_fake_relay_log.inc
|
@@ -29,7 +29,7 @@ SET @@global.max_allowed_packet=4096;
|
||||
SET @@global.net_buffer_length=4096;
|
||||
include/stop_slave.inc
|
||||
include/start_slave.inc
|
||||
CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
|
||||
CREATE TABLE `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
|
||||
INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048');
|
||||
Slave_IO_Running = No (expect No)
|
||||
==== clean up ====
|
||||
|
@@ -4,34 +4,39 @@ reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
**** Resetting master and slave ****
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
include/start_slave.inc
|
||||
CREATE TABLE t1 (a INT, b INT);
|
||||
CREATE TABLE t2 (a INT, b INT) ENGINE=Merge;
|
||||
CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
|
||||
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
|
||||
SHOW BINLOG EVENTS FROM 216;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
Log_name #
|
||||
Pos 216
|
||||
Pos 106
|
||||
Event_type Query
|
||||
Server_id #
|
||||
End_log_pos 309
|
||||
End_log_pos 199
|
||||
Info use `test`; CREATE TABLE t1 (a INT, b INT)
|
||||
Log_name #
|
||||
Pos 309
|
||||
Pos 199
|
||||
Event_type Query
|
||||
Server_id #
|
||||
End_log_pos 415
|
||||
End_log_pos 305
|
||||
Info use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge
|
||||
Log_name #
|
||||
Pos 415
|
||||
Pos 305
|
||||
Event_type Query
|
||||
Server_id #
|
||||
End_log_pos 521
|
||||
End_log_pos 411
|
||||
Info use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8
|
||||
Log_name #
|
||||
Pos 521
|
||||
Pos 411
|
||||
Event_type Query
|
||||
Server_id #
|
||||
End_log_pos 640
|
||||
End_log_pos 530
|
||||
Info use `test`; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8
|
||||
**** On Master ****
|
||||
SHOW CREATE TABLE t1;
|
||||
@@ -125,9 +130,14 @@ NULL 3 6
|
||||
NULL 4 2
|
||||
NULL 5 10
|
||||
NULL 6 12
|
||||
**** Resetting master and slave ****
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
include/start_slave.inc
|
||||
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
|
||||
ERROR 23000: Duplicate entry '2' for key 'b'
|
||||
SHOW BINLOG EVENTS FROM 1374;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
CREATE TABLE t7 (a INT, b INT UNIQUE);
|
||||
INSERT INTO t7 SELECT a,b FROM tt3;
|
||||
@@ -137,18 +147,23 @@ a b
|
||||
1 2
|
||||
2 4
|
||||
3 6
|
||||
SHOW BINLOG EVENTS FROM 1374;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 1374 Query # 1474 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
|
||||
# 1474 Query # 1542 use `test`; BEGIN
|
||||
# 1542 Table_map # 1584 table_id: # (test.t7)
|
||||
# 1584 Write_rows # 1640 table_id: # flags: STMT_END_F
|
||||
# 1640 Query # 1711 use `test`; ROLLBACK
|
||||
# 106 Query # 206 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
|
||||
# 206 Query # 274 use `test`; BEGIN
|
||||
# 274 Table_map # 316 table_id: # (test.t7)
|
||||
# 316 Write_rows # 372 table_id: # flags: STMT_END_F
|
||||
# 372 Query # 443 use `test`; ROLLBACK
|
||||
SELECT * FROM t7 ORDER BY a,b;
|
||||
a b
|
||||
1 2
|
||||
2 4
|
||||
3 6
|
||||
**** Resetting master and slave ****
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
include/start_slave.inc
|
||||
CREATE TEMPORARY TABLE tt4 (a INT, b INT);
|
||||
INSERT INTO tt4 VALUES (4,8), (5,10), (6,12);
|
||||
BEGIN;
|
||||
@@ -156,12 +171,12 @@ INSERT INTO t7 SELECT a,b FROM tt4;
|
||||
ROLLBACK;
|
||||
Warnings:
|
||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||
SHOW BINLOG EVENTS FROM 1711;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 1711 Query # 1779 use `test`; BEGIN
|
||||
# 1779 Table_map # 1821 table_id: # (test.t7)
|
||||
# 1821 Write_rows # 1877 table_id: # flags: STMT_END_F
|
||||
# 1877 Query # 1946 use `test`; COMMIT
|
||||
# 106 Query # 174 use `test`; BEGIN
|
||||
# 174 Table_map # 216 table_id: # (test.t7)
|
||||
# 216 Write_rows # 272 table_id: # flags: STMT_END_F
|
||||
# 272 Query # 343 use `test`; ROLLBACK
|
||||
SELECT * FROM t7 ORDER BY a,b;
|
||||
a b
|
||||
1 2
|
||||
@@ -178,6 +193,11 @@ a b
|
||||
4 8
|
||||
5 10
|
||||
6 12
|
||||
**** Resetting master and slave ****
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
include/start_slave.inc
|
||||
CREATE TABLE t8 LIKE t4;
|
||||
CREATE TABLE t9 LIKE tt4;
|
||||
CREATE TEMPORARY TABLE tt5 LIKE t4;
|
||||
@@ -196,10 +216,10 @@ Create Table CREATE TABLE `t9` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SHOW BINLOG EVENTS FROM 1946;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 1946 Query # 2032 use `test`; CREATE TABLE t8 LIKE t4
|
||||
# 2032 Query # 2171 use `test`; CREATE TABLE `t9` (
|
||||
# 106 Query # 192 use `test`; CREATE TABLE t8 LIKE t4
|
||||
# 192 Query # 331 use `test`; CREATE TABLE `t9` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL
|
||||
)
|
||||
@@ -276,9 +296,8 @@ a
|
||||
1
|
||||
2
|
||||
3
|
||||
SHOW BINLOG EVENTS;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 4 Format_desc # 106 Server ver: #, Binlog ver: #
|
||||
# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT)
|
||||
# 192 Query # 260 use `test`; BEGIN
|
||||
# 260 Table_map # 301 table_id: # (test.t1)
|
||||
@@ -308,7 +327,7 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 1329 Query # 1397 use `test`; BEGIN
|
||||
# 1397 Table_map # 1438 table_id: # (test.t1)
|
||||
# 1438 Write_rows # 1482 table_id: # flags: STMT_END_F
|
||||
# 1482 Query # 1551 use `test`; COMMIT
|
||||
# 1482 Query # 1553 use `test`; ROLLBACK
|
||||
SHOW TABLES;
|
||||
Tables_in_test
|
||||
t1
|
||||
@@ -371,9 +390,8 @@ a
|
||||
4
|
||||
6
|
||||
9
|
||||
SHOW BINLOG EVENTS;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 4 Format_desc # 106 Server ver: #, Binlog ver: #
|
||||
# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT)
|
||||
# 192 Query # 260 use `test`; BEGIN
|
||||
# 260 Table_map # 301 table_id: # (test.t1)
|
||||
@@ -394,6 +412,11 @@ a
|
||||
6
|
||||
9
|
||||
TRUNCATE TABLE t2;
|
||||
**** Resetting master and slave ****
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
include/start_slave.inc
|
||||
BEGIN;
|
||||
INSERT INTO t2 SELECT a*a FROM t1;
|
||||
CREATE TEMPORARY TABLE tt2
|
||||
@@ -406,14 +429,14 @@ Warnings:
|
||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a
|
||||
SHOW BINLOG EVENTS FROM 949;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 949 Query # 1017 use `test`; BEGIN
|
||||
# 1017 Table_map # 1058 table_id: # (test.t2)
|
||||
# 1058 Write_rows # 1102 table_id: # flags: STMT_END_F
|
||||
# 1102 Table_map # 1143 table_id: # (test.t2)
|
||||
# 1143 Write_rows # 1182 table_id: # flags: STMT_END_F
|
||||
# 1182 Query # 1253 use `test`; ROLLBACK
|
||||
# 106 Query # 174 use `test`; BEGIN
|
||||
# 174 Table_map # 215 table_id: # (test.t2)
|
||||
# 215 Write_rows # 259 table_id: # flags: STMT_END_F
|
||||
# 259 Table_map # 300 table_id: # (test.t2)
|
||||
# 300 Write_rows # 339 table_id: # flags: STMT_END_F
|
||||
# 339 Query # 410 use `test`; ROLLBACK
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a
|
||||
DROP TABLE t1,t2;
|
||||
|
@@ -174,6 +174,7 @@ DROP TRIGGER tr2;
|
||||
INSERT INTO t1 VALUES (3,'master/slave');
|
||||
INSERT INTO t2 VALUES (3,'master/slave');
|
||||
INSERT INTO t3 VALUES (3,'master/slave');
|
||||
COMMIT;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
2 master only
|
||||
|
@@ -975,3 +975,22 @@ a b
|
||||
2 b
|
||||
3 c
|
||||
drop table t1;
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
create table t1 ( f int ) engine = innodb;
|
||||
create table log ( r int ) engine = myisam;
|
||||
create trigger tr
|
||||
after insert on t1
|
||||
for each row insert into log values ( new.f );
|
||||
set autocommit = 0;
|
||||
insert into t1 values ( 1 );
|
||||
rollback;
|
||||
Warnings:
|
||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||
Comparing tables master:test.t1 and slave:test.t1
|
||||
Comparing tables master:test.log and slave:test.log
|
||||
drop table t1, log;
|
||||
|
@@ -10,3 +10,4 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
rpl_binlog_corruption : BUG#41793 2008-12-30 sven rpl_binlog_corruption disabled in main (needs new mtr)
|
||||
|
1
mysql-test/suite/rpl/t/rpl_binlog_corruption-master.opt
Normal file
1
mysql-test/suite/rpl/t/rpl_binlog_corruption-master.opt
Normal file
@@ -0,0 +1 @@
|
||||
--replicate-same-server-id --relay-log=slave-relay-bin
|
42
mysql-test/suite/rpl/t/rpl_binlog_corruption.test
Normal file
42
mysql-test/suite/rpl/t/rpl_binlog_corruption.test
Normal file
@@ -0,0 +1,42 @@
|
||||
# ==== Purpose ====
|
||||
#
|
||||
# Verify that the slave stops gracefully when reading a relay log with
|
||||
# corrupted data.
|
||||
#
|
||||
# ==== Implementation ====
|
||||
#
|
||||
# Setup "fake replication" where the slave only starts the SQL thread,
|
||||
# not the IO thread, and reads from an existing relay log that has
|
||||
# been prepared so that it contains the error. This requires some
|
||||
# extra server options: see the -master.opt file.
|
||||
#
|
||||
# ==== Related bugs ====
|
||||
#
|
||||
# BUG#31793: log event corruption causes crash
|
||||
# BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event
|
||||
|
||||
source include/have_log_bin.inc;
|
||||
# BUG#40482 only manifested itself in debug-compiled binaries.
|
||||
source include/have_debug.inc;
|
||||
|
||||
call mtr.add_suppression('Found invalid event in binary log');
|
||||
|
||||
|
||||
#
|
||||
# BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event
|
||||
#
|
||||
# The relay log contains an Incident_log_event with a non-existing
|
||||
# incident number.
|
||||
|
||||
--echo ==== Initialize ====
|
||||
let $fake_relay_log= $MYSQL_TEST_DIR/std_data/bug40482-bin.000001;
|
||||
source include/setup_fake_relay_log.inc;
|
||||
|
||||
--echo ==== Test ====
|
||||
START SLAVE SQL_THREAD;
|
||||
source include/wait_for_slave_sql_error.inc;
|
||||
let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
|
||||
--echo Last_SQL_Error = $error
|
||||
|
||||
--echo ==== Clean up ====
|
||||
source include/cleanup_fake_relay_log.inc;
|
@@ -73,7 +73,11 @@ disconnect master;
|
||||
connect (master, localhost, root);
|
||||
connection master;
|
||||
|
||||
CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
|
||||
CREATE TABLE `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
|
||||
|
||||
sync_slave_with_master;
|
||||
|
||||
connection master;
|
||||
|
||||
INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048');
|
||||
|
||||
@@ -83,7 +87,6 @@ connection slave;
|
||||
let $slave_io_running= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1);
|
||||
--echo Slave_IO_Running = $slave_io_running (expect No)
|
||||
|
||||
|
||||
--echo ==== clean up ====
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
|
@@ -29,6 +29,8 @@ SET GLOBAL storage_engine=memory;
|
||||
START SLAVE;
|
||||
--enable_query_log
|
||||
|
||||
--source include/reset_master_and_slave.inc
|
||||
|
||||
connection master;
|
||||
CREATE TABLE t1 (a INT, b INT);
|
||||
CREATE TABLE t2 (a INT, b INT) ENGINE=Merge;
|
||||
@@ -36,7 +38,7 @@ CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
|
||||
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
|
||||
--replace_column 1 # 4 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
--query_vertical SHOW BINLOG EVENTS FROM 216
|
||||
--query_vertical SHOW BINLOG EVENTS FROM 106
|
||||
--echo **** On Master ****
|
||||
--query_vertical SHOW CREATE TABLE t1
|
||||
--query_vertical SHOW CREATE TABLE t2
|
||||
@@ -65,6 +67,8 @@ SELECT * FROM t5 ORDER BY a,b,c;
|
||||
--query_vertical SHOW CREATE TABLE t6
|
||||
SELECT * FROM t6 ORDER BY a,b,c;
|
||||
|
||||
--source include/reset_master_and_slave.inc
|
||||
|
||||
connection master;
|
||||
# Test for erroneous constructions
|
||||
--error ER_DUP_ENTRY
|
||||
@@ -72,7 +76,7 @@ CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
|
||||
# Shouldn't be written to the binary log
|
||||
--replace_column 1 # 4 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
SHOW BINLOG EVENTS FROM 1374;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
|
||||
# Test that INSERT-SELECT works the same way as for SBR.
|
||||
CREATE TABLE t7 (a INT, b INT UNIQUE);
|
||||
@@ -82,10 +86,12 @@ SELECT * FROM t7 ORDER BY a,b;
|
||||
# Should be written to the binary log
|
||||
--replace_column 1 # 4 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
SHOW BINLOG EVENTS FROM 1374;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
sync_slave_with_master;
|
||||
SELECT * FROM t7 ORDER BY a,b;
|
||||
|
||||
--source include/reset_master_and_slave.inc
|
||||
|
||||
connection master;
|
||||
CREATE TEMPORARY TABLE tt4 (a INT, b INT);
|
||||
INSERT INTO tt4 VALUES (4,8), (5,10), (6,12);
|
||||
@@ -94,11 +100,13 @@ INSERT INTO t7 SELECT a,b FROM tt4;
|
||||
ROLLBACK;
|
||||
--replace_column 1 # 4 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
SHOW BINLOG EVENTS FROM 1711;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
SELECT * FROM t7 ORDER BY a,b;
|
||||
sync_slave_with_master;
|
||||
SELECT * FROM t7 ORDER BY a,b;
|
||||
|
||||
--source include/reset_master_and_slave.inc
|
||||
|
||||
connection master;
|
||||
CREATE TABLE t8 LIKE t4;
|
||||
CREATE TABLE t9 LIKE tt4;
|
||||
@@ -110,7 +118,7 @@ CREATE TEMPORARY TABLE tt7 SELECT 1;
|
||||
--query_vertical SHOW CREATE TABLE t9
|
||||
--replace_column 1 # 4 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
SHOW BINLOG EVENTS FROM 1946;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
sync_slave_with_master;
|
||||
--echo **** On Slave ****
|
||||
--query_vertical SHOW CREATE TABLE t8
|
||||
@@ -162,7 +170,7 @@ SELECT * FROM t3 ORDER BY a;
|
||||
SELECT * FROM t4 ORDER BY a;
|
||||
--replace_column 1 # 4 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
|
||||
SHOW BINLOG EVENTS;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
sync_slave_with_master;
|
||||
SHOW TABLES;
|
||||
SELECT TABLE_NAME,ENGINE
|
||||
@@ -208,13 +216,17 @@ COMMIT;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
--replace_column 1 # 4 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
|
||||
SHOW BINLOG EVENTS;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
sync_slave_with_master;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
|
||||
connection master;
|
||||
TRUNCATE TABLE t2;
|
||||
sync_slave_with_master;
|
||||
|
||||
--source include/reset_master_and_slave.inc
|
||||
|
||||
connection master;
|
||||
BEGIN;
|
||||
INSERT INTO t2 SELECT a*a FROM t1;
|
||||
CREATE TEMPORARY TABLE tt2
|
||||
@@ -227,7 +239,7 @@ ROLLBACK;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
--replace_column 1 # 4 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
|
||||
SHOW BINLOG EVENTS FROM 949;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
sync_slave_with_master;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
|
||||
|
@@ -120,6 +120,7 @@ DROP TRIGGER tr2;
|
||||
INSERT INTO t1 VALUES (3,'master/slave');
|
||||
INSERT INTO t2 VALUES (3,'master/slave');
|
||||
INSERT INTO t3 VALUES (3,'master/slave');
|
||||
COMMIT;
|
||||
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
|
@@ -469,20 +469,48 @@ drop trigger if exists t1_bi;
|
||||
insert into t1 values (3, "c");
|
||||
|
||||
select * from t1;
|
||||
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
|
||||
sync_slave_with_master;
|
||||
select * from t1;
|
||||
|
||||
connection master;
|
||||
|
||||
drop table t1;
|
||||
sync_slave_with_master;
|
||||
|
||||
#
|
||||
# Bug#40116: Uncommited changes are replicated and stay on slave after
|
||||
# rollback on master
|
||||
#
|
||||
|
||||
connection master;
|
||||
source include/master-slave-reset.inc;
|
||||
source include/have_innodb.inc;
|
||||
connection slave;
|
||||
source include/have_innodb.inc;
|
||||
|
||||
connection master;
|
||||
create table t1 ( f int ) engine = innodb;
|
||||
create table log ( r int ) engine = myisam;
|
||||
create trigger tr
|
||||
after insert on t1
|
||||
for each row insert into log values ( new.f );
|
||||
|
||||
set autocommit = 0;
|
||||
insert into t1 values ( 1 );
|
||||
rollback;
|
||||
|
||||
let $diff_table_1=master:test.t1;
|
||||
let $diff_table_2=slave:test.t1;
|
||||
--source include/diff_tables.inc
|
||||
|
||||
let $diff_table_1=master:test.log;
|
||||
let $diff_table_2=slave:test.log;
|
||||
--source include/diff_tables.inc
|
||||
|
||||
connection master;
|
||||
drop table t1, log;
|
||||
sync_slave_with_master;
|
||||
|
||||
#
|
||||
# End of tests
|
||||
#
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
|
@@ -10,7 +10,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
rpl_ndb_circular : Bug#33849 COMMIT event missing in cluster circular replication.
|
||||
rpl_ndb_circular_simplex : Bug#33849 COMMIT event missing in cluster circular replication.
|
||||
rpl_ndb_circular : Bug#41183 rpl_ndb_circular, rpl_ndb_circular_simplex need maintenance, crash
|
||||
rpl_ndb_circular_simplex : Bug#41183 rpl_ndb_circular, rpl_ndb_circular_simplex need maintenance, crash
|
||||
|
||||
# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
|
||||
|
@@ -17,14 +17,14 @@
|
||||
# * Valid & Invalid values #
|
||||
# * Scope & Access method #
|
||||
# * Data Integrity #
|
||||
# Modified: Horst Hunger 2008-11-27 #
|
||||
# Due to OS depending values the check has been changed #
|
||||
# from concrete values to ranges. #
|
||||
# #
|
||||
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
|
||||
# server-system-variables.html #
|
||||
# Reference: #
|
||||
# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
|
||||
# #
|
||||
###############################################################################
|
||||
# Changes: #
|
||||
# 2008-03-06 hhunger Got "lost connections with 5.1.24 #
|
||||
########################################################################
|
||||
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
@@ -38,8 +38,6 @@
|
||||
########################################################################
|
||||
|
||||
SET @start_value = @@global.key_buffer_size;
|
||||
SELECT @start_value;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_055_01------------------------#'
|
||||
########################################################################
|
||||
@@ -49,9 +47,7 @@ SELECT @start_value;
|
||||
SET @@global.key_buffer_size = 99;
|
||||
--Error ER_NO_DEFAULT
|
||||
SET @@global.key_buffer_size = DEFAULT;
|
||||
--echo 'Bug# 34878: This variable has default value according to documentation';
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_055_02-------------------------#'
|
||||
###############################################
|
||||
@@ -66,26 +62,25 @@ SELECT @@global.key_buffer_size = @start_value;
|
||||
# Change the value of key_buffer_size to a valid value #
|
||||
########################################################################
|
||||
|
||||
SET @@global.key_buffer_size = @min_key_buffer_size;
|
||||
SELECT @@global.key_buffer_size= @min_key_buffer_size;
|
||||
SET @@global.key_buffer_size = 8 ;
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
--disable_warnings
|
||||
#Due to "lost connection"
|
||||
#Due to increasing the runtime significantly and allocating the buffer instantly.
|
||||
#SET @@global.key_buffer_size = 4294967295;
|
||||
--enable_warnings
|
||||
#SELECT @@global.key_buffer_size;
|
||||
SET @@global.key_buffer_size = 1800;
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
SET @@global.key_buffer_size = 65535;
|
||||
SELECT @@global.key_buffer_size;
|
||||
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_055_04-------------------------#'
|
||||
###########################################################################
|
||||
# Change the value of key_buffer_size to invalid value #
|
||||
###########################################################################
|
||||
|
||||
# Due to "lost connection"
|
||||
# Due to increasing the runtime significantly and allocating the buffer instantly
|
||||
# with a size of 18446744073709551615 bytes with 32bit exec.
|
||||
#SET @@global.key_buffer_size = -1;
|
||||
#SELECT @@global.key_buffer_size;
|
||||
#SET @@global.key_buffer_size = 100000000000;
|
||||
@@ -96,16 +91,14 @@ SELECT @@global.key_buffer_size;
|
||||
#SET @@global.key_buffer_size = -1024;
|
||||
#SELECT @@global.key_buffer_size;
|
||||
SET @@global.key_buffer_size = 4;
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.key_buffer_size = ON;
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.key_buffer_size = 'test';
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
|
||||
--echo '#-------------------FN_DYNVARS_055_05----------------------------#'
|
||||
###########################################################################
|
||||
@@ -114,8 +107,7 @@ SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET @@session.key_buffer_size = 0;
|
||||
SELECT @@key_buffer_size = @min_key_buffer_size;
|
||||
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_055_06------------------------#'
|
||||
##############################################################################
|
||||
@@ -130,17 +122,15 @@ SELECT @@key_buffer_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='key_buffer_size';
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_055_07----------------------#'
|
||||
###################################################################
|
||||
# Check if TRUE and FALSE values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
SET @@global.key_buffer_size = TRUE;
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
SET @@global.key_buffer_size = FALSE;
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_055_08----------------------#'
|
||||
#####################################################################
|
||||
@@ -150,7 +140,7 @@ SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
|
||||
# due to differences in contents of the warnings
|
||||
--disable_warnings
|
||||
SET @@global.key_buffer_size = @min_key_buffer_size;
|
||||
SET @@global.key_buffer_size = 8 ;
|
||||
SELECT @@key_buffer_size = @@global.key_buffer_size;
|
||||
--enable_warnings
|
||||
|
||||
@@ -160,8 +150,8 @@ SELECT @@key_buffer_size = @@global.key_buffer_size;
|
||||
##########################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET key_buffer_size = @min_key_buffer_size;
|
||||
SELECT @@key_buffer_size = @min_key_buffer_size;
|
||||
SET key_buffer_size = 8 ;
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
--Error ER_PARSE_ERROR
|
||||
SET local.key_buffer_size = 10;
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
@@ -179,9 +169,9 @@ SELECT key_buffer_size = @@session.key_buffer_size;
|
||||
##############################
|
||||
|
||||
SET @@global.key_buffer_size = @start_value;
|
||||
SELECT @@global.key_buffer_size;
|
||||
|
||||
--enable_warnings
|
||||
#######################################################################
|
||||
# END OF key_buffer_size TESTS #
|
||||
#######################################################################
|
||||
|
||||
|
@@ -17,9 +17,12 @@
|
||||
# * Valid & Invalid values #
|
||||
# * Scope & Access method #
|
||||
# * Data Integrity #
|
||||
# Modified: Horst Hunger, 2008-11-28 #
|
||||
# disabled warnings as they contain the values of this variable, #
|
||||
# modified the check of the value only checking a range. #
|
||||
# #
|
||||
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
|
||||
# server-system-variables.html #
|
||||
# Reference: #
|
||||
# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
@@ -29,7 +32,7 @@
|
||||
|
||||
|
||||
######################################################################
|
||||
# START OF sort_buffer_size TESTS #
|
||||
# START OF sort_buffer_size TESTS #
|
||||
######################################################################
|
||||
|
||||
|
||||
@@ -37,65 +40,74 @@
|
||||
# Save initial value #
|
||||
#############################################################
|
||||
|
||||
# due to difference when running on Windows (bug filed)
|
||||
# due to differences when running on Windows (Bug#36695)
|
||||
--source include/not_windows.inc
|
||||
|
||||
SET @start_global_value = @@global.sort_buffer_size;
|
||||
SELECT @start_global_value;
|
||||
SET @start_session_value = @@session.sort_buffer_size;
|
||||
SELECT @start_session_value;
|
||||
let $kbrange32 = BETWEEN 32776 AND 32999;
|
||||
let $mbrange2 = BETWEEN 2097116 AND 2100000;
|
||||
|
||||
--disable_warnings
|
||||
|
||||
SET @start_global_value = @@global.sort_buffer_size;
|
||||
SET @start_session_value = @@session.sort_buffer_size;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_151_01-------------------------#'
|
||||
######################################################################
|
||||
# Display the DEFAULT value of sort_buffer_size #
|
||||
# Display the DEFAULT value of sort_buffer_size #
|
||||
######################################################################
|
||||
|
||||
SET @@global.sort_buffer_size = 1000;
|
||||
SET @@global.sort_buffer_size = DEFAULT;
|
||||
SELECT @@global.sort_buffer_size= 2097144 OR @@global.sort_buffer_size= 2097116;
|
||||
eval
|
||||
SELECT @@global.sort_buffer_size $mbrange2;
|
||||
|
||||
SET @@session.sort_buffer_size = 2000;
|
||||
SET @@session.sort_buffer_size = DEFAULT;
|
||||
SELECT @@session.sort_buffer_size= 2097144 OR @@session.sort_buffer_size= 2097116;
|
||||
eval
|
||||
SELECT @@session.sort_buffer_size $mbrange2;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_151_02-------------------------#'
|
||||
######################################################################
|
||||
# Check the DEFAULT value of sort_buffer_size #
|
||||
# Check the DEFAULT value of sort_buffer_size #
|
||||
######################################################################
|
||||
|
||||
SET @@global.sort_buffer_size = DEFAULT;
|
||||
SELECT @@global.sort_buffer_size = 2097144 OR @@global.sort_buffer_size= 2097116;
|
||||
eval
|
||||
SELECT @@global.sort_buffer_size $mbrange2;
|
||||
|
||||
SET @@session.sort_buffer_size = DEFAULT;
|
||||
SELECT @@session.sort_buffer_size = 2097144 OR @@session.sort_buffer_size= 2097116;
|
||||
eval
|
||||
SELECT @@session.sort_buffer_size $mbrange2;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_151_03-------------------------#'
|
||||
################################################################################
|
||||
# Change the value of sort_buffer_size to a valid value for GLOBAL Scope #
|
||||
# Change the value of sort_buffer_size to a valid value for GLOBAL Scope #
|
||||
################################################################################
|
||||
|
||||
SET @@global.sort_buffer_size = 32776;
|
||||
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
|
||||
eval
|
||||
SELECT @@global.sort_buffer_size $kbrange32;
|
||||
SET @@global.sort_buffer_size = 32777;
|
||||
SELECT @@global.sort_buffer_size= 32777 OR @@global.sort_buffer_size= 32804;
|
||||
eval
|
||||
SELECT @@global.sort_buffer_size $kbrange32;
|
||||
SET @@global.sort_buffer_size = 4294967295;
|
||||
SELECT @@global.sort_buffer_size;
|
||||
SET @@global.sort_buffer_size = 4294967294;
|
||||
SELECT @@global.sort_buffer_size;
|
||||
--echo 'Bug# 34877: Invalid Values are showing in variable on assigning valid values.';
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_151_04-------------------------#'
|
||||
###################################################################################
|
||||
# Change the value of sort_buffer_size to a valid value for SESSION Scope #
|
||||
# Change the value of sort_buffer_size to a valid value for SESSION Scope #
|
||||
###################################################################################
|
||||
|
||||
SET @@session.sort_buffer_size = 32776;
|
||||
SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804;
|
||||
eval
|
||||
SELECT @@session.sort_buffer_size $kbrange32;
|
||||
SET @@session.sort_buffer_size = 32777;
|
||||
SELECT @@session.sort_buffer_size= 32777 OR @@session.sort_buffer_size= 32804;
|
||||
eval
|
||||
SELECT @@session.sort_buffer_size $kbrange32;
|
||||
SET @@session.sort_buffer_size = 4294967295;
|
||||
SELECT @@session.sort_buffer_size;
|
||||
SET @@session.sort_buffer_size = 4294967294;
|
||||
@@ -104,13 +116,15 @@ SELECT @@session.sort_buffer_size;
|
||||
|
||||
--echo '#------------------FN_DYNVARS_151_05-----------------------#'
|
||||
##################################################################
|
||||
# Change the value of sort_buffer_size to an invalid value #
|
||||
# Change the value of sort_buffer_size to an invalid value #
|
||||
##################################################################
|
||||
|
||||
SET @@global.sort_buffer_size = 32775;
|
||||
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
|
||||
eval
|
||||
SELECT @@global.sort_buffer_size $kbrange32;
|
||||
SET @@global.sort_buffer_size = -1024;
|
||||
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
|
||||
eval
|
||||
SELECT @@global.sort_buffer_size $kbrange32;
|
||||
SET @@global.sort_buffer_size = 4294967296;
|
||||
SELECT @@global.sort_buffer_size;
|
||||
--Error ER_PARSE_ERROR
|
||||
@@ -121,19 +135,18 @@ SET @@global.sort_buffer_size = test;
|
||||
SELECT @@global.sort_buffer_size;
|
||||
|
||||
SET @@session.sort_buffer_size = 32775;
|
||||
SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804;
|
||||
eval
|
||||
SELECT @@session.sort_buffer_size $kbrange32;
|
||||
SET @@session.sort_buffer_size = -2;
|
||||
SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804;
|
||||
eval
|
||||
SELECT @@session.sort_buffer_size $kbrange32;
|
||||
--Error ER_PARSE_ERROR
|
||||
SET @@session.sort_buffer_size = 65530.34.;
|
||||
SET @@session.sort_buffer_size = 4294967296;
|
||||
SELECT @@session.sort_buffer_size;
|
||||
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.sort_buffer_size = test;
|
||||
SELECT @@session.sort_buffer_size;
|
||||
|
||||
|
||||
--echo '#------------------FN_DYNVARS_151_06-----------------------#'
|
||||
####################################################################
|
||||
@@ -141,14 +154,16 @@ SELECT @@session.sort_buffer_size;
|
||||
####################################################################
|
||||
|
||||
|
||||
SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
|
||||
SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM
|
||||
INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
|
||||
|
||||
--echo '#------------------FN_DYNVARS_151_07-----------------------#'
|
||||
####################################################################
|
||||
# Check if the value in SESSION Table matches value in variable #
|
||||
####################################################################
|
||||
|
||||
SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
|
||||
SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM
|
||||
INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
|
||||
|
||||
|
||||
--echo '#------------------FN_DYNVARS_151_08-----------------------#'
|
||||
@@ -157,25 +172,24 @@ SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSI
|
||||
####################################################################
|
||||
|
||||
SET @@global.sort_buffer_size = TRUE;
|
||||
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
|
||||
eval
|
||||
SELECT @@global.sort_buffer_size $kbrange32;
|
||||
SET @@global.sort_buffer_size = FALSE;
|
||||
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
|
||||
echo 'Bug: Errors should be displayed on assigning TRUE/FALSE to variable';
|
||||
|
||||
eval
|
||||
SELECT @@global.sort_buffer_size $kbrange32;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_151_09----------------------#'
|
||||
####################################################################################
|
||||
# Check if accessing variable with and without GLOBAL point to same variable #
|
||||
# Check if accessing variable with and without GLOBAL point to same variable #
|
||||
####################################################################################
|
||||
|
||||
SET @@global.sort_buffer_size = 9000;
|
||||
SELECT @@sort_buffer_size = @@global.sort_buffer_size;
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_151_10----------------------#'
|
||||
########################################################################################################
|
||||
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
|
||||
########################################################################################################
|
||||
###################################################################################################
|
||||
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable#
|
||||
###################################################################################################
|
||||
|
||||
SET @@sort_buffer_size = 9000;
|
||||
SELECT @@sort_buffer_size = @@local.sort_buffer_size;
|
||||
@@ -184,12 +198,12 @@ SELECT @@local.sort_buffer_size = @@session.sort_buffer_size;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_151_11----------------------#'
|
||||
###################################################################################
|
||||
# Check if sort_buffer_size can be accessed with and without @@ sign #
|
||||
# Check if sort_buffer_size can be accessed with and without @@ sign #
|
||||
###################################################################################
|
||||
|
||||
SET sort_buffer_size = 9100;
|
||||
SELECT @sort_buffer_size= 32776 OR @@sort_buffer_size= 32804;
|
||||
SELECT @@sort_buffer_size;
|
||||
eval
|
||||
SELECT @@sort_buffer_size $kbrange32;
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.sort_buffer_size;
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
@@ -203,11 +217,11 @@ SELECT sort_buffer_size = @@session.sort_buffer_size;
|
||||
####################################
|
||||
|
||||
SET @@global.sort_buffer_size = @start_global_value;
|
||||
SELECT @@global.sort_buffer_size;
|
||||
SET @@session.sort_buffer_size = @start_session_value;
|
||||
SELECT @@session.sort_buffer_size;
|
||||
|
||||
--enable_warnings
|
||||
|
||||
#############################################################
|
||||
# END OF sort_buffer_size TESTS #
|
||||
# END OF sort_buffer_size TESTS #
|
||||
#############################################################
|
||||
|
||||
|
@@ -1,14 +1,10 @@
|
||||
SET @start_value = @@global.key_buffer_size;
|
||||
SELECT @start_value;
|
||||
@start_value
|
||||
1048576
|
||||
'#--------------------FN_DYNVARS_055_01------------------------#'
|
||||
SET @@global.key_buffer_size = 99;
|
||||
SET @@global.key_buffer_size = DEFAULT;
|
||||
ERROR 42000: Variable 'key_buffer_size' doesn't have a default value
|
||||
'Bug# 34878: This variable has default value according to documentation';
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
@@global.key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
'#---------------------FN_DYNVARS_055_02-------------------------#'
|
||||
SET @@global.key_buffer_size = @start_value;
|
||||
@@ -16,21 +12,20 @@ SELECT @@global.key_buffer_size = @start_value;
|
||||
@@global.key_buffer_size = @start_value
|
||||
1
|
||||
'#--------------------FN_DYNVARS_055_03------------------------#'
|
||||
SET @@global.key_buffer_size = @min_key_buffer_size;
|
||||
SELECT @@global.key_buffer_size= @min_key_buffer_size;
|
||||
@@global.key_buffer_size= @min_key_buffer_size
|
||||
SET @@global.key_buffer_size = 8 ;
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
SET @@global.key_buffer_size = 1800;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect key_buffer_size value: '1800'
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
@@global.key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
SET @@global.key_buffer_size = 65535;
|
||||
SELECT @@global.key_buffer_size;
|
||||
@@global.key_buffer_size
|
||||
61440
|
||||
'Bug # 34837: Errors are not coming on assigning invalid values to variable'
|
||||
'#--------------------FN_DYNVARS_055_04-------------------------#'
|
||||
SET @@global.key_buffer_size = 10000.01;
|
||||
ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
|
||||
@@ -40,25 +35,24 @@ SELECT @@global.key_buffer_size;
|
||||
SET @@global.key_buffer_size = 4;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect key_buffer_size value: '4'
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
@@global.key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
SET @@global.key_buffer_size = ON;
|
||||
ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
@@global.key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
SET @@global.key_buffer_size = 'test';
|
||||
ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
@@global.key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
'#-------------------FN_DYNVARS_055_05----------------------------#'
|
||||
SET @@session.key_buffer_size = 0;
|
||||
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SELECT @@key_buffer_size = @min_key_buffer_size;
|
||||
@@key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
'#----------------------FN_DYNVARS_055_06------------------------#'
|
||||
SELECT @@global.key_buffer_size = VARIABLE_VALUE
|
||||
@@ -75,25 +69,25 @@ WHERE VARIABLE_NAME='key_buffer_size';
|
||||
SET @@global.key_buffer_size = TRUE;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect key_buffer_size value: '1'
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
@@global.key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
SET @@global.key_buffer_size = FALSE;
|
||||
Warnings:
|
||||
Warning 1438 Cannot drop default keycache
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
@@global.key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
'#---------------------FN_DYNVARS_055_08----------------------#'
|
||||
SET @@global.key_buffer_size = @min_key_buffer_size;
|
||||
SET @@global.key_buffer_size = 8 ;
|
||||
SELECT @@key_buffer_size = @@global.key_buffer_size;
|
||||
@@key_buffer_size = @@global.key_buffer_size
|
||||
1
|
||||
'#---------------------FN_DYNVARS_055_09----------------------#'
|
||||
SET key_buffer_size = @min_key_buffer_size;
|
||||
SET key_buffer_size = 8 ;
|
||||
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SELECT @@key_buffer_size = @min_key_buffer_size;
|
||||
@@key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
SET local.key_buffer_size = 10;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size = 10' at line 1
|
||||
@@ -106,6 +100,3 @@ ERROR 42S02: Unknown table 'global' in field list
|
||||
SELECT key_buffer_size = @@session.key_buffer_size;
|
||||
ERROR 42S22: Unknown column 'key_buffer_size' in 'field list'
|
||||
SET @@global.key_buffer_size = @start_value;
|
||||
SELECT @@global.key_buffer_size;
|
||||
@@global.key_buffer_size
|
||||
1048576
|
||||
|
@@ -1,14 +1,10 @@
|
||||
SET @start_value = @@global.key_buffer_size;
|
||||
SELECT @start_value;
|
||||
@start_value
|
||||
1048576
|
||||
'#--------------------FN_DYNVARS_055_01------------------------#'
|
||||
SET @@global.key_buffer_size = 99;
|
||||
SET @@global.key_buffer_size = DEFAULT;
|
||||
ERROR 42000: Variable 'key_buffer_size' doesn't have a default value
|
||||
'Bug# 34878: This variable has default value according to documentation';
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
@@global.key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
'#---------------------FN_DYNVARS_055_02-------------------------#'
|
||||
SET @@global.key_buffer_size = @start_value;
|
||||
@@ -16,21 +12,20 @@ SELECT @@global.key_buffer_size = @start_value;
|
||||
@@global.key_buffer_size = @start_value
|
||||
1
|
||||
'#--------------------FN_DYNVARS_055_03------------------------#'
|
||||
SET @@global.key_buffer_size = @min_key_buffer_size;
|
||||
SELECT @@global.key_buffer_size= @min_key_buffer_size;
|
||||
@@global.key_buffer_size= @min_key_buffer_size
|
||||
SET @@global.key_buffer_size = 8 ;
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
SET @@global.key_buffer_size = 1800;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect key_buffer_size value: '1800'
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
@@global.key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
SET @@global.key_buffer_size = 65535;
|
||||
SELECT @@global.key_buffer_size;
|
||||
@@global.key_buffer_size
|
||||
61440
|
||||
'Bug # 34837: Errors are not coming on assigning invalid values to variable'
|
||||
'#--------------------FN_DYNVARS_055_04-------------------------#'
|
||||
SET @@global.key_buffer_size = 10000.01;
|
||||
ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
|
||||
@@ -40,25 +35,24 @@ SELECT @@global.key_buffer_size;
|
||||
SET @@global.key_buffer_size = 4;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect key_buffer_size value: '4'
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
@@global.key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
SET @@global.key_buffer_size = ON;
|
||||
ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
@@global.key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
SET @@global.key_buffer_size = 'test';
|
||||
ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
@@global.key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
'#-------------------FN_DYNVARS_055_05----------------------------#'
|
||||
SET @@session.key_buffer_size = 0;
|
||||
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SELECT @@key_buffer_size = @min_key_buffer_size;
|
||||
@@key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
'#----------------------FN_DYNVARS_055_06------------------------#'
|
||||
SELECT @@global.key_buffer_size = VARIABLE_VALUE
|
||||
@@ -75,25 +69,25 @@ WHERE VARIABLE_NAME='key_buffer_size';
|
||||
SET @@global.key_buffer_size = TRUE;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect key_buffer_size value: '1'
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
@@global.key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
SET @@global.key_buffer_size = FALSE;
|
||||
Warnings:
|
||||
Warning 1438 Cannot drop default keycache
|
||||
SELECT @@global.key_buffer_size = @min_key_buffer_size;
|
||||
@@global.key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
'#---------------------FN_DYNVARS_055_08----------------------#'
|
||||
SET @@global.key_buffer_size = @min_key_buffer_size;
|
||||
SET @@global.key_buffer_size = 8 ;
|
||||
SELECT @@key_buffer_size = @@global.key_buffer_size;
|
||||
@@key_buffer_size = @@global.key_buffer_size
|
||||
1
|
||||
'#---------------------FN_DYNVARS_055_09----------------------#'
|
||||
SET key_buffer_size = @min_key_buffer_size;
|
||||
SET key_buffer_size = 8 ;
|
||||
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SELECT @@key_buffer_size = @min_key_buffer_size;
|
||||
@@key_buffer_size = @min_key_buffer_size
|
||||
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
|
||||
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
|
||||
1
|
||||
SET local.key_buffer_size = 10;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size = 10' at line 1
|
||||
@@ -106,6 +100,3 @@ ERROR 42S02: Unknown table 'global' in field list
|
||||
SELECT key_buffer_size = @@session.key_buffer_size;
|
||||
ERROR 42S22: Unknown column 'key_buffer_size' in 'field list'
|
||||
SET @@global.key_buffer_size = @start_value;
|
||||
SELECT @@global.key_buffer_size;
|
||||
@@global.key_buffer_size
|
||||
1048576
|
||||
|
@@ -1,47 +1,33 @@
|
||||
SET @start_global_value = @@global.sort_buffer_size;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
262144
|
||||
SET @start_session_value = @@session.sort_buffer_size;
|
||||
SELECT @start_session_value;
|
||||
@start_session_value
|
||||
262144
|
||||
'#--------------------FN_DYNVARS_151_01-------------------------#'
|
||||
SET @@global.sort_buffer_size = 1000;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '1000'
|
||||
SET @@global.sort_buffer_size = DEFAULT;
|
||||
SELECT @@global.sort_buffer_size= 2097144 OR @@global.sort_buffer_size= 2097116;
|
||||
@@global.sort_buffer_size= 2097144 OR @@global.sort_buffer_size= 2097116
|
||||
SELECT @@global.sort_buffer_size BETWEEN 2097116 AND 2100000;
|
||||
@@global.sort_buffer_size BETWEEN 2097116 AND 2100000
|
||||
1
|
||||
SET @@session.sort_buffer_size = 2000;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '2000'
|
||||
SET @@session.sort_buffer_size = DEFAULT;
|
||||
SELECT @@session.sort_buffer_size= 2097144 OR @@session.sort_buffer_size= 2097116;
|
||||
@@session.sort_buffer_size= 2097144 OR @@session.sort_buffer_size= 2097116
|
||||
SELECT @@session.sort_buffer_size BETWEEN 2097116 AND 2100000;
|
||||
@@session.sort_buffer_size BETWEEN 2097116 AND 2100000
|
||||
1
|
||||
'#--------------------FN_DYNVARS_151_02-------------------------#'
|
||||
SET @@global.sort_buffer_size = DEFAULT;
|
||||
SELECT @@global.sort_buffer_size = 2097144 OR @@global.sort_buffer_size= 2097116;
|
||||
@@global.sort_buffer_size = 2097144 OR @@global.sort_buffer_size= 2097116
|
||||
SELECT @@global.sort_buffer_size BETWEEN 2097116 AND 2100000;
|
||||
@@global.sort_buffer_size BETWEEN 2097116 AND 2100000
|
||||
1
|
||||
SET @@session.sort_buffer_size = DEFAULT;
|
||||
SELECT @@session.sort_buffer_size = 2097144 OR @@session.sort_buffer_size= 2097116;
|
||||
@@session.sort_buffer_size = 2097144 OR @@session.sort_buffer_size= 2097116
|
||||
SELECT @@session.sort_buffer_size BETWEEN 2097116 AND 2100000;
|
||||
@@session.sort_buffer_size BETWEEN 2097116 AND 2100000
|
||||
1
|
||||
'#--------------------FN_DYNVARS_151_03-------------------------#'
|
||||
SET @@global.sort_buffer_size = 32776;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '32776'
|
||||
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
|
||||
@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804
|
||||
SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@global.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@global.sort_buffer_size = 32777;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '32777'
|
||||
SELECT @@global.sort_buffer_size= 32777 OR @@global.sort_buffer_size= 32804;
|
||||
@@global.sort_buffer_size= 32777 OR @@global.sort_buffer_size= 32804
|
||||
SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@global.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@global.sort_buffer_size = 4294967295;
|
||||
SELECT @@global.sort_buffer_size;
|
||||
@@ -51,19 +37,14 @@ SET @@global.sort_buffer_size = 4294967294;
|
||||
SELECT @@global.sort_buffer_size;
|
||||
@@global.sort_buffer_size
|
||||
4294967294
|
||||
'Bug# 34877: Invalid Values are showing in variable on assigning valid values.';
|
||||
'#--------------------FN_DYNVARS_151_04-------------------------#'
|
||||
SET @@session.sort_buffer_size = 32776;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '32776'
|
||||
SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804;
|
||||
@@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804
|
||||
SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@session.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@session.sort_buffer_size = 32777;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '32777'
|
||||
SELECT @@session.sort_buffer_size= 32777 OR @@session.sort_buffer_size= 32804;
|
||||
@@session.sort_buffer_size= 32777 OR @@session.sort_buffer_size= 32804
|
||||
SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@session.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@session.sort_buffer_size = 4294967295;
|
||||
SELECT @@session.sort_buffer_size;
|
||||
@@ -75,20 +56,14 @@ SELECT @@session.sort_buffer_size;
|
||||
4294967294
|
||||
'#------------------FN_DYNVARS_151_05-----------------------#'
|
||||
SET @@global.sort_buffer_size = 32775;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '32775'
|
||||
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
|
||||
@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804
|
||||
SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@global.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@global.sort_buffer_size = -1024;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '0'
|
||||
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
|
||||
@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804
|
||||
SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@global.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@global.sort_buffer_size = 4294967296;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '4294967296'
|
||||
SELECT @@global.sort_buffer_size;
|
||||
@@global.sort_buffer_size
|
||||
4294967295
|
||||
@@ -103,64 +78,47 @@ SELECT @@global.sort_buffer_size;
|
||||
@@global.sort_buffer_size
|
||||
4294967295
|
||||
SET @@session.sort_buffer_size = 32775;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '32775'
|
||||
SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804;
|
||||
@@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804
|
||||
SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@session.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@session.sort_buffer_size = -2;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '0'
|
||||
SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804;
|
||||
@@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804
|
||||
SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@session.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@session.sort_buffer_size = 65530.34.;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
|
||||
SET @@session.sort_buffer_size = 4294967296;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '4294967296'
|
||||
SELECT @@session.sort_buffer_size;
|
||||
@@session.sort_buffer_size
|
||||
4294967295
|
||||
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
SET @@session.sort_buffer_size = test;
|
||||
ERROR 42000: Incorrect argument type to variable 'sort_buffer_size'
|
||||
SELECT @@session.sort_buffer_size;
|
||||
@@session.sort_buffer_size
|
||||
4294967295
|
||||
'#------------------FN_DYNVARS_151_06-----------------------#'
|
||||
SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
|
||||
SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM
|
||||
INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
|
||||
@@global.sort_buffer_size = VARIABLE_VALUE
|
||||
1
|
||||
'#------------------FN_DYNVARS_151_07-----------------------#'
|
||||
SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
|
||||
SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM
|
||||
INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
|
||||
@@session.sort_buffer_size = VARIABLE_VALUE
|
||||
1
|
||||
'#------------------FN_DYNVARS_151_08-----------------------#'
|
||||
SET @@global.sort_buffer_size = TRUE;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '1'
|
||||
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
|
||||
@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804
|
||||
SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@global.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@global.sort_buffer_size = FALSE;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '0'
|
||||
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
|
||||
@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804
|
||||
SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@global.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
'Bug: Errors should be displayed on assigning TRUE/FALSE to variable'
|
||||
'#---------------------FN_DYNVARS_151_09----------------------#'
|
||||
SET @@global.sort_buffer_size = 9000;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '9000'
|
||||
SELECT @@sort_buffer_size = @@global.sort_buffer_size;
|
||||
@@sort_buffer_size = @@global.sort_buffer_size
|
||||
0
|
||||
'#---------------------FN_DYNVARS_151_10----------------------#'
|
||||
SET @@sort_buffer_size = 9000;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '9000'
|
||||
SELECT @@sort_buffer_size = @@local.sort_buffer_size;
|
||||
@@sort_buffer_size = @@local.sort_buffer_size
|
||||
1
|
||||
@@ -169,14 +127,9 @@ SELECT @@local.sort_buffer_size = @@session.sort_buffer_size;
|
||||
1
|
||||
'#---------------------FN_DYNVARS_151_11----------------------#'
|
||||
SET sort_buffer_size = 9100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '9100'
|
||||
SELECT @sort_buffer_size= 32776 OR @@sort_buffer_size= 32804;
|
||||
@sort_buffer_size= 32776 OR @@sort_buffer_size= 32804
|
||||
SELECT @@sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SELECT @@sort_buffer_size;
|
||||
@@sort_buffer_size
|
||||
32804
|
||||
SELECT local.sort_buffer_size;
|
||||
ERROR 42S02: Unknown table 'local' in field list
|
||||
SELECT session.sort_buffer_size;
|
||||
@@ -184,10 +137,4 @@ ERROR 42S02: Unknown table 'session' in field list
|
||||
SELECT sort_buffer_size = @@session.sort_buffer_size;
|
||||
ERROR 42S22: Unknown column 'sort_buffer_size' in 'field list'
|
||||
SET @@global.sort_buffer_size = @start_global_value;
|
||||
SELECT @@global.sort_buffer_size;
|
||||
@@global.sort_buffer_size
|
||||
262144
|
||||
SET @@session.sort_buffer_size = @start_session_value;
|
||||
SELECT @@session.sort_buffer_size;
|
||||
@@session.sort_buffer_size
|
||||
262144
|
||||
|
@@ -1,47 +1,33 @@
|
||||
SET @start_global_value = @@global.sort_buffer_size;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
262144
|
||||
SET @start_session_value = @@session.sort_buffer_size;
|
||||
SELECT @start_session_value;
|
||||
@start_session_value
|
||||
262144
|
||||
'#--------------------FN_DYNVARS_151_01-------------------------#'
|
||||
SET @@global.sort_buffer_size = 1000;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '1000'
|
||||
SET @@global.sort_buffer_size = DEFAULT;
|
||||
SELECT @@global.sort_buffer_size= 2097144 OR @@global.sort_buffer_size= 2097116;
|
||||
@@global.sort_buffer_size= 2097144 OR @@global.sort_buffer_size= 2097116
|
||||
SELECT @@global.sort_buffer_size BETWEEN 2097116 AND 2100000;
|
||||
@@global.sort_buffer_size BETWEEN 2097116 AND 2100000
|
||||
1
|
||||
SET @@session.sort_buffer_size = 2000;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '2000'
|
||||
SET @@session.sort_buffer_size = DEFAULT;
|
||||
SELECT @@session.sort_buffer_size= 2097144 OR @@session.sort_buffer_size= 2097116;
|
||||
@@session.sort_buffer_size= 2097144 OR @@session.sort_buffer_size= 2097116
|
||||
SELECT @@session.sort_buffer_size BETWEEN 2097116 AND 2100000;
|
||||
@@session.sort_buffer_size BETWEEN 2097116 AND 2100000
|
||||
1
|
||||
'#--------------------FN_DYNVARS_151_02-------------------------#'
|
||||
SET @@global.sort_buffer_size = DEFAULT;
|
||||
SELECT @@global.sort_buffer_size = 2097144 OR @@global.sort_buffer_size= 2097116;
|
||||
@@global.sort_buffer_size = 2097144 OR @@global.sort_buffer_size= 2097116
|
||||
SELECT @@global.sort_buffer_size BETWEEN 2097116 AND 2100000;
|
||||
@@global.sort_buffer_size BETWEEN 2097116 AND 2100000
|
||||
1
|
||||
SET @@session.sort_buffer_size = DEFAULT;
|
||||
SELECT @@session.sort_buffer_size = 2097144 OR @@session.sort_buffer_size= 2097116;
|
||||
@@session.sort_buffer_size = 2097144 OR @@session.sort_buffer_size= 2097116
|
||||
SELECT @@session.sort_buffer_size BETWEEN 2097116 AND 2100000;
|
||||
@@session.sort_buffer_size BETWEEN 2097116 AND 2100000
|
||||
1
|
||||
'#--------------------FN_DYNVARS_151_03-------------------------#'
|
||||
SET @@global.sort_buffer_size = 32776;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '32776'
|
||||
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
|
||||
@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804
|
||||
SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@global.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@global.sort_buffer_size = 32777;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '32777'
|
||||
SELECT @@global.sort_buffer_size= 32777 OR @@global.sort_buffer_size= 32804;
|
||||
@@global.sort_buffer_size= 32777 OR @@global.sort_buffer_size= 32804
|
||||
SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@global.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@global.sort_buffer_size = 4294967295;
|
||||
SELECT @@global.sort_buffer_size;
|
||||
@@ -51,19 +37,14 @@ SET @@global.sort_buffer_size = 4294967294;
|
||||
SELECT @@global.sort_buffer_size;
|
||||
@@global.sort_buffer_size
|
||||
4294967294
|
||||
'Bug# 34877: Invalid Values are showing in variable on assigning valid values.';
|
||||
'#--------------------FN_DYNVARS_151_04-------------------------#'
|
||||
SET @@session.sort_buffer_size = 32776;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '32776'
|
||||
SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804;
|
||||
@@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804
|
||||
SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@session.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@session.sort_buffer_size = 32777;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '32777'
|
||||
SELECT @@session.sort_buffer_size= 32777 OR @@session.sort_buffer_size= 32804;
|
||||
@@session.sort_buffer_size= 32777 OR @@session.sort_buffer_size= 32804
|
||||
SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@session.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@session.sort_buffer_size = 4294967295;
|
||||
SELECT @@session.sort_buffer_size;
|
||||
@@ -75,16 +56,12 @@ SELECT @@session.sort_buffer_size;
|
||||
4294967294
|
||||
'#------------------FN_DYNVARS_151_05-----------------------#'
|
||||
SET @@global.sort_buffer_size = 32775;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '32775'
|
||||
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
|
||||
@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804
|
||||
SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@global.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@global.sort_buffer_size = -1024;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '0'
|
||||
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
|
||||
@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804
|
||||
SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@global.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@global.sort_buffer_size = 4294967296;
|
||||
SELECT @@global.sort_buffer_size;
|
||||
@@ -101,16 +78,12 @@ SELECT @@global.sort_buffer_size;
|
||||
@@global.sort_buffer_size
|
||||
4294967296
|
||||
SET @@session.sort_buffer_size = 32775;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '32775'
|
||||
SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804;
|
||||
@@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804
|
||||
SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@session.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@session.sort_buffer_size = -2;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '0'
|
||||
SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804;
|
||||
@@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804
|
||||
SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@session.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@session.sort_buffer_size = 65530.34.;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
|
||||
@@ -118,45 +91,34 @@ SET @@session.sort_buffer_size = 4294967296;
|
||||
SELECT @@session.sort_buffer_size;
|
||||
@@session.sort_buffer_size
|
||||
4294967296
|
||||
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
SET @@session.sort_buffer_size = test;
|
||||
ERROR 42000: Incorrect argument type to variable 'sort_buffer_size'
|
||||
SELECT @@session.sort_buffer_size;
|
||||
@@session.sort_buffer_size
|
||||
4294967296
|
||||
'#------------------FN_DYNVARS_151_06-----------------------#'
|
||||
SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
|
||||
SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM
|
||||
INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
|
||||
@@global.sort_buffer_size = VARIABLE_VALUE
|
||||
1
|
||||
'#------------------FN_DYNVARS_151_07-----------------------#'
|
||||
SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
|
||||
SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM
|
||||
INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
|
||||
@@session.sort_buffer_size = VARIABLE_VALUE
|
||||
1
|
||||
'#------------------FN_DYNVARS_151_08-----------------------#'
|
||||
SET @@global.sort_buffer_size = TRUE;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '1'
|
||||
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
|
||||
@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804
|
||||
SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@global.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SET @@global.sort_buffer_size = FALSE;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '0'
|
||||
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
|
||||
@@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804
|
||||
SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@global.sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
'Bug: Errors should be displayed on assigning TRUE/FALSE to variable'
|
||||
'#---------------------FN_DYNVARS_151_09----------------------#'
|
||||
SET @@global.sort_buffer_size = 9000;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '9000'
|
||||
SELECT @@sort_buffer_size = @@global.sort_buffer_size;
|
||||
@@sort_buffer_size = @@global.sort_buffer_size
|
||||
0
|
||||
'#---------------------FN_DYNVARS_151_10----------------------#'
|
||||
SET @@sort_buffer_size = 9000;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '9000'
|
||||
SELECT @@sort_buffer_size = @@local.sort_buffer_size;
|
||||
@@sort_buffer_size = @@local.sort_buffer_size
|
||||
1
|
||||
@@ -165,14 +127,9 @@ SELECT @@local.sort_buffer_size = @@session.sort_buffer_size;
|
||||
1
|
||||
'#---------------------FN_DYNVARS_151_11----------------------#'
|
||||
SET sort_buffer_size = 9100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect sort_buffer_size value: '9100'
|
||||
SELECT @sort_buffer_size= 32776 OR @@sort_buffer_size= 32804;
|
||||
@sort_buffer_size= 32776 OR @@sort_buffer_size= 32804
|
||||
SELECT @@sort_buffer_size BETWEEN 32776 AND 32999;
|
||||
@@sort_buffer_size BETWEEN 32776 AND 32999
|
||||
1
|
||||
SELECT @@sort_buffer_size;
|
||||
@@sort_buffer_size
|
||||
32804
|
||||
SELECT local.sort_buffer_size;
|
||||
ERROR 42S02: Unknown table 'local' in field list
|
||||
SELECT session.sort_buffer_size;
|
||||
@@ -180,10 +137,4 @@ ERROR 42S02: Unknown table 'session' in field list
|
||||
SELECT sort_buffer_size = @@session.sort_buffer_size;
|
||||
ERROR 42S22: Unknown column 'sort_buffer_size' in 'field list'
|
||||
SET @@global.sort_buffer_size = @start_global_value;
|
||||
SELECT @@global.sort_buffer_size;
|
||||
@@global.sort_buffer_size
|
||||
262144
|
||||
SET @@session.sort_buffer_size = @start_session_value;
|
||||
SELECT @@session.sort_buffer_size;
|
||||
@@session.sort_buffer_size
|
||||
262144
|
||||
|
@@ -1,39 +1,21 @@
|
||||
SET @start_global_value = @@global.tmp_table_size;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
16777216
|
||||
SET @start_session_value = @@session.tmp_table_size;
|
||||
SELECT @start_session_value;
|
||||
@start_session_value
|
||||
16777216
|
||||
'Bug# 34876: This variable has invalid default value as compared to documentation';
|
||||
'#--------------------FN_DYNVARS_005_01-------------------------#'
|
||||
SET @@global.tmp_table_size = 100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_table_size value: '100'
|
||||
SET @@global.tmp_table_size = DEFAULT;
|
||||
SELECT @@global.tmp_table_size;
|
||||
@@global.tmp_table_size
|
||||
16777216
|
||||
'Bug# 34876: This variable has invalid default value as compared to documentation';
|
||||
SET @@session.tmp_table_size = 200;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_table_size value: '200'
|
||||
SET @@session.tmp_table_size = DEFAULT;
|
||||
SELECT @@session.tmp_table_size;
|
||||
@@session.tmp_table_size
|
||||
16777216
|
||||
'Bug# 34876: This variable has invalid default value as compared to documentation';
|
||||
'#--------------------FN_DYNVARS_005_02-------------------------#'
|
||||
SET @@global.tmp_table_size = DEFAULT;
|
||||
SELECT @@global.tmp_table_size = 33554432;
|
||||
@@global.tmp_table_size = 33554432
|
||||
0
|
||||
SET @@session.tmp_table_size = DEFAULT;
|
||||
SELECT @@session.tmp_table_size = 33554432;
|
||||
@@session.tmp_table_size = 33554432
|
||||
0
|
||||
'Bug# 34876: This variable has invalid default value as compared to documentation';
|
||||
SELECT @@global.tmp_table_size >= 16777216;
|
||||
@@global.tmp_table_size >= 16777216
|
||||
1
|
||||
SELECT @@session.tmp_table_size >= 16777216;
|
||||
@@session.tmp_table_size >= 16777216
|
||||
1
|
||||
'#--------------------FN_DYNVARS_005_03-------------------------#'
|
||||
SET @@global.tmp_table_size = 1024;
|
||||
SELECT @@global.tmp_table_size;
|
||||
@@ -52,7 +34,7 @@ SET @@session.tmp_table_size = 1024;
|
||||
SELECT @@session.tmp_table_size;
|
||||
@@session.tmp_table_size
|
||||
1024
|
||||
SET @@session.tmp_table_size =4294967295;
|
||||
SET @@session.tmp_table_size = 4294967295;
|
||||
SELECT @@session.tmp_table_size;
|
||||
@@session.tmp_table_size
|
||||
4294967295
|
||||
@@ -79,7 +61,6 @@ Warning 1292 Truncated incorrect tmp_table_size value: '1000'
|
||||
SELECT @@global.tmp_table_size;
|
||||
@@global.tmp_table_size
|
||||
1024
|
||||
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
SET @@global.tmp_table_size = ON;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
|
||||
SET @@global.tmp_table_size = OFF;
|
||||
@@ -96,7 +77,6 @@ Warning 1292 Truncated incorrect tmp_table_size value: '0'
|
||||
SELECT @@global.tmp_table_size;
|
||||
@@global.tmp_table_size
|
||||
1024
|
||||
'Bug:Error should be shown that variable is numeric and can not assigned boolean value';
|
||||
SET @@global.tmp_table_size = 65530.34;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
|
||||
SET @@global.tmp_table_size ="Test";
|
||||
@@ -120,18 +100,18 @@ SELECT @@session.tmp_table_size;
|
||||
SET @@session.tmp_table_size = "Test";
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
|
||||
SET @@session.tmp_table_size = 12345678901;
|
||||
SELECT @@session.tmp_table_size;
|
||||
@@session.tmp_table_size
|
||||
4294967295
|
||||
SELECT @@session.tmp_table_size IN (12345678901,4294967295);
|
||||
@@session.tmp_table_size IN (12345678901,4294967295)
|
||||
1
|
||||
'#------------------FN_DYNVARS_005_06-----------------------#'
|
||||
SELECT @@global.tmp_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
SELECT @@global.tmp_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='tmp_table_size';
|
||||
@@global.tmp_table_size = VARIABLE_VALUE
|
||||
1
|
||||
'#------------------FN_DYNVARS_005_07-----------------------#'
|
||||
SELECT @@session.tmp_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
SELECT @@session.tmp_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='tmp_table_size';
|
||||
@@session.tmp_table_size = VARIABLE_VALUE
|
||||
1
|
||||
@@ -163,10 +143,4 @@ ERROR 42S02: Unknown table 'global' in field list
|
||||
SELECT tmp_table_size = @@session.tmp_table_size;
|
||||
ERROR 42S22: Unknown column 'tmp_table_size' in 'field list'
|
||||
SET @@global.tmp_table_size = @start_global_value;
|
||||
SELECT @@global.tmp_table_size;
|
||||
@@global.tmp_table_size
|
||||
16777216
|
||||
SET @@session.tmp_table_size = @start_session_value;
|
||||
SELECT @@session.tmp_table_size;
|
||||
@@session.tmp_table_size
|
||||
16777216
|
@@ -1,172 +0,0 @@
|
||||
SET @start_global_value = @@global.tmp_table_size;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
16777216
|
||||
SET @start_session_value = @@session.tmp_table_size;
|
||||
SELECT @start_session_value;
|
||||
@start_session_value
|
||||
16777216
|
||||
'Bug# 34876: This variable has invalid default value as compared to documentation';
|
||||
'#--------------------FN_DYNVARS_005_01-------------------------#'
|
||||
SET @@global.tmp_table_size = 100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_table_size value: '100'
|
||||
SET @@global.tmp_table_size = DEFAULT;
|
||||
SELECT @@global.tmp_table_size;
|
||||
@@global.tmp_table_size
|
||||
16777216
|
||||
'Bug# 34876: This variable has invalid default value as compared to documentation';
|
||||
SET @@session.tmp_table_size = 200;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_table_size value: '200'
|
||||
SET @@session.tmp_table_size = DEFAULT;
|
||||
SELECT @@session.tmp_table_size;
|
||||
@@session.tmp_table_size
|
||||
16777216
|
||||
'Bug# 34876: This variable has invalid default value as compared to documentation';
|
||||
'#--------------------FN_DYNVARS_005_02-------------------------#'
|
||||
SET @@global.tmp_table_size = DEFAULT;
|
||||
SELECT @@global.tmp_table_size = 33554432;
|
||||
@@global.tmp_table_size = 33554432
|
||||
0
|
||||
SET @@session.tmp_table_size = DEFAULT;
|
||||
SELECT @@session.tmp_table_size = 33554432;
|
||||
@@session.tmp_table_size = 33554432
|
||||
0
|
||||
'Bug# 34876: This variable has invalid default value as compared to documentation';
|
||||
'#--------------------FN_DYNVARS_005_03-------------------------#'
|
||||
SET @@global.tmp_table_size = 1024;
|
||||
SELECT @@global.tmp_table_size;
|
||||
@@global.tmp_table_size
|
||||
1024
|
||||
SET @@global.tmp_table_size = 60020;
|
||||
SELECT @@global.tmp_table_size;
|
||||
@@global.tmp_table_size
|
||||
60020
|
||||
SET @@global.tmp_table_size = 4294967295;
|
||||
SELECT @@global.tmp_table_size;
|
||||
@@global.tmp_table_size
|
||||
4294967295
|
||||
'#--------------------FN_DYNVARS_005_04-------------------------#'
|
||||
SET @@session.tmp_table_size = 1024;
|
||||
SELECT @@session.tmp_table_size;
|
||||
@@session.tmp_table_size
|
||||
1024
|
||||
SET @@session.tmp_table_size =4294967295;
|
||||
SELECT @@session.tmp_table_size;
|
||||
@@session.tmp_table_size
|
||||
4294967295
|
||||
SET @@session.tmp_table_size = 65535;
|
||||
SELECT @@session.tmp_table_size;
|
||||
@@session.tmp_table_size
|
||||
65535
|
||||
'#------------------FN_DYNVARS_005_05-----------------------#'
|
||||
SET @@global.tmp_table_size = 0;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_table_size value: '0'
|
||||
SELECT @@global.tmp_table_size;
|
||||
@@global.tmp_table_size
|
||||
1024
|
||||
SET @@global.tmp_table_size = -1024;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_table_size value: '0'
|
||||
SELECT @@global.tmp_table_size;
|
||||
@@global.tmp_table_size
|
||||
1024
|
||||
SET @@global.tmp_table_size = 1000;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_table_size value: '1000'
|
||||
SELECT @@global.tmp_table_size;
|
||||
@@global.tmp_table_size
|
||||
1024
|
||||
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
SET @@global.tmp_table_size = ON;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
|
||||
SET @@global.tmp_table_size = OFF;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
|
||||
SET @@global.tmp_table_size = True;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_table_size value: '1'
|
||||
SELECT @@global.tmp_table_size;
|
||||
@@global.tmp_table_size
|
||||
1024
|
||||
SET @@global.tmp_table_size = False;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_table_size value: '0'
|
||||
SELECT @@global.tmp_table_size;
|
||||
@@global.tmp_table_size
|
||||
1024
|
||||
'Bug:Error should be shown that variable is numeric and can not assigned boolean value';
|
||||
SET @@global.tmp_table_size = 65530.34;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
|
||||
SET @@global.tmp_table_size ="Test";
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
|
||||
SET @@session.tmp_table_size = ON;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
|
||||
SET @@session.tmp_table_size = OFF;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
|
||||
SET @@session.tmp_table_size = True;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_table_size value: '1'
|
||||
SELECT @@session.tmp_table_size;
|
||||
@@session.tmp_table_size
|
||||
1024
|
||||
SET @@session.tmp_table_size = False;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_table_size value: '0'
|
||||
SELECT @@session.tmp_table_size;
|
||||
@@session.tmp_table_size
|
||||
1024
|
||||
SET @@session.tmp_table_size = "Test";
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
|
||||
SET @@session.tmp_table_size = 12345678901;
|
||||
SELECT @@session.tmp_table_size;
|
||||
@@session.tmp_table_size
|
||||
12345678901
|
||||
'#------------------FN_DYNVARS_005_06-----------------------#'
|
||||
SELECT @@global.tmp_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='tmp_table_size';
|
||||
@@global.tmp_table_size = VARIABLE_VALUE
|
||||
1
|
||||
'#------------------FN_DYNVARS_005_07-----------------------#'
|
||||
SELECT @@session.tmp_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='tmp_table_size';
|
||||
@@session.tmp_table_size = VARIABLE_VALUE
|
||||
1
|
||||
'#---------------------FN_DYNVARS_001_09----------------------#'
|
||||
SET @@global.tmp_table_size = 1024;
|
||||
SET @@tmp_table_size = 4294967295;
|
||||
SELECT @@tmp_table_size = @@global.tmp_table_size;
|
||||
@@tmp_table_size = @@global.tmp_table_size
|
||||
0
|
||||
'#---------------------FN_DYNVARS_001_10----------------------#'
|
||||
SET @@tmp_table_size = 100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_table_size value: '100'
|
||||
SELECT @@tmp_table_size = @@local.tmp_table_size;
|
||||
@@tmp_table_size = @@local.tmp_table_size
|
||||
1
|
||||
SELECT @@local.tmp_table_size = @@session.tmp_table_size;
|
||||
@@local.tmp_table_size = @@session.tmp_table_size
|
||||
1
|
||||
'#---------------------FN_DYNVARS_001_11----------------------#'
|
||||
SET tmp_table_size = 1027;
|
||||
SELECT @@tmp_table_size;
|
||||
@@tmp_table_size
|
||||
1027
|
||||
SELECT local.tmp_table_size;
|
||||
ERROR 42S02: Unknown table 'local' in field list
|
||||
SELECT global.tmp_table_size;
|
||||
ERROR 42S02: Unknown table 'global' in field list
|
||||
SELECT tmp_table_size = @@session.tmp_table_size;
|
||||
ERROR 42S22: Unknown column 'tmp_table_size' in 'field list'
|
||||
SET @@global.tmp_table_size = @start_global_value;
|
||||
SELECT @@global.tmp_table_size;
|
||||
@@global.tmp_table_size
|
||||
16777216
|
||||
SET @@session.tmp_table_size = @start_session_value;
|
||||
SELECT @@session.tmp_table_size;
|
||||
@@session.tmp_table_size
|
||||
16777216
|
@@ -1,27 +1,29 @@
|
||||
############## mysql-test\t\tmp_table_size_basic.test #########################
|
||||
# #
|
||||
# Variable Name: tmp_table_size #
|
||||
# Scope: GLOBAL | SESSION #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: numeric #
|
||||
# Default Value: 33554432 #
|
||||
# Range: 1024-4294967295 #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-13 #
|
||||
# Author: Salman #
|
||||
# #
|
||||
# Description: Test Cases of Dynamic System Variable tmp_table_size #
|
||||
# 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#option_mysqld_tmp_table_size #
|
||||
# #
|
||||
###############################################################################
|
||||
########################### tmp_table_size_basic.test ##########################
|
||||
# #
|
||||
# Variable Name: tmp_table_size #
|
||||
# Scope: GLOBAL | SESSION #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: numeric #
|
||||
# Default Value: system dependend #
|
||||
# Range: 1024-system dependend #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-13 #
|
||||
# Author: Salman #
|
||||
# #
|
||||
# Description: Test Cases of Dynamic System Variable tmp_table_size #
|
||||
# that checks the behavior of this variable in the following ways #
|
||||
# * Default Value #
|
||||
# * Valid & Invalid values #
|
||||
# * Scope & Access method #
|
||||
# * Data Integrity #
|
||||
# Modified: 2008-12-04 HHunger #
|
||||
# removed the differences between 64 and 32 bit platforms #
|
||||
# #
|
||||
# Reference: #
|
||||
# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
|
||||
# #
|
||||
################################################################################
|
||||
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
@@ -29,17 +31,12 @@
|
||||
# START OF tmp_table_size TESTS #
|
||||
##############################################################
|
||||
|
||||
|
||||
#############################################################
|
||||
# Save initial value #
|
||||
#############################################################
|
||||
|
||||
SET @start_global_value = @@global.tmp_table_size;
|
||||
SELECT @start_global_value;
|
||||
SET @start_session_value = @@session.tmp_table_size;
|
||||
SELECT @start_session_value;
|
||||
|
||||
--echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_005_01-------------------------#'
|
||||
##############################################################
|
||||
@@ -48,27 +45,19 @@ SELECT @start_session_value;
|
||||
|
||||
SET @@global.tmp_table_size = 100;
|
||||
SET @@global.tmp_table_size = DEFAULT;
|
||||
SELECT @@global.tmp_table_size;
|
||||
|
||||
--echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
|
||||
SET @@session.tmp_table_size = 200;
|
||||
SET @@session.tmp_table_size = DEFAULT;
|
||||
SELECT @@session.tmp_table_size;
|
||||
--echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_005_02-------------------------#'
|
||||
########################################################################
|
||||
# Check the DEFAULT value of tmp_table_size #
|
||||
# Check the DEFAULT value of tmp_table_size #
|
||||
########################################################################
|
||||
# The DEFAULT value is system dependend.
|
||||
# Therefore we have only a plausibility check here
|
||||
SELECT @@global.tmp_table_size >= 16777216;
|
||||
|
||||
SET @@global.tmp_table_size = DEFAULT;
|
||||
SELECT @@global.tmp_table_size = 33554432;
|
||||
|
||||
SET @@session.tmp_table_size = DEFAULT;
|
||||
SELECT @@session.tmp_table_size = 33554432;
|
||||
|
||||
--echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
|
||||
SELECT @@session.tmp_table_size >= 16777216;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_005_03-------------------------#'
|
||||
########################################################################
|
||||
@@ -87,11 +76,11 @@ SELECT @@global.tmp_table_size;
|
||||
#########################################################################
|
||||
# Change the value of tmp_table_size to a valid value for SESSION Scope #
|
||||
#########################################################################
|
||||
|
||||
|
||||
SET @@session.tmp_table_size = 1024;
|
||||
SELECT @@session.tmp_table_size;
|
||||
|
||||
SET @@session.tmp_table_size =4294967295;
|
||||
SET @@session.tmp_table_size = 4294967295;
|
||||
SELECT @@session.tmp_table_size;
|
||||
SET @@session.tmp_table_size = 65535;
|
||||
SELECT @@session.tmp_table_size;
|
||||
@@ -111,37 +100,28 @@ SELECT @@global.tmp_table_size;
|
||||
SET @@global.tmp_table_size = 1000;
|
||||
SELECT @@global.tmp_table_size;
|
||||
|
||||
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
|
||||
|
||||
-- Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.tmp_table_size = ON;
|
||||
|
||||
|
||||
-- Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.tmp_table_size = OFF;
|
||||
|
||||
|
||||
SET @@global.tmp_table_size = True;
|
||||
SELECT @@global.tmp_table_size;
|
||||
|
||||
SET @@global.tmp_table_size = False;
|
||||
SELECT @@global.tmp_table_size;
|
||||
--echo 'Bug:Error should be shown that variable is numeric and can not assigned boolean value';
|
||||
|
||||
|
||||
-- Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.tmp_table_size = 65530.34;
|
||||
|
||||
-- Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.tmp_table_size ="Test";
|
||||
|
||||
|
||||
-- Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.tmp_table_size = ON;
|
||||
|
||||
|
||||
-- Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.tmp_table_size = OFF;
|
||||
|
||||
SET @@session.tmp_table_size = True;
|
||||
@@ -150,21 +130,21 @@ SELECT @@session.tmp_table_size;
|
||||
SET @@session.tmp_table_size = False;
|
||||
SELECT @@session.tmp_table_size;
|
||||
|
||||
-- Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.tmp_table_size = "Test";
|
||||
|
||||
SET @@session.tmp_table_size = 12345678901;
|
||||
SELECT @@session.tmp_table_size;
|
||||
|
||||
# With a 64 bit mysqld:12345678901,with a 32 bit mysqld: 4294967295
|
||||
SELECT @@session.tmp_table_size IN (12345678901,4294967295);
|
||||
|
||||
--echo '#------------------FN_DYNVARS_005_06-----------------------#'
|
||||
####################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
####################################################################
|
||||
|
||||
|
||||
SELECT @@global.tmp_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
SELECT @@global.tmp_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='tmp_table_size';
|
||||
|
||||
--echo '#------------------FN_DYNVARS_005_07-----------------------#'
|
||||
@@ -172,13 +152,10 @@ WHERE VARIABLE_NAME='tmp_table_size';
|
||||
# Check if the value in SESSION Table matches value in variable #
|
||||
####################################################################
|
||||
|
||||
SELECT @@session.tmp_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
SELECT @@session.tmp_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='tmp_table_size';
|
||||
|
||||
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_001_09----------------------#'
|
||||
########################################################################
|
||||
# Check if global and session variables are independent of each other #
|
||||
@@ -216,16 +193,12 @@ SELECT global.tmp_table_size;
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT tmp_table_size = @@session.tmp_table_size;
|
||||
|
||||
|
||||
####################################
|
||||
# Restore initial value #
|
||||
####################################
|
||||
|
||||
SET @@global.tmp_table_size = @start_global_value;
|
||||
SELECT @@global.tmp_table_size;
|
||||
SET @@session.tmp_table_size = @start_session_value;
|
||||
SELECT @@session.tmp_table_size;
|
||||
|
||||
|
||||
###################################################
|
||||
# END OF tmp_table_size TESTS #
|
@@ -1,9 +0,0 @@
|
||||
################################################################################
|
||||
# Created by Horst Hunger 2008-05-07 #
|
||||
# #
|
||||
# Wrapper for 32 bit machines #
|
||||
################################################################################
|
||||
|
||||
--source include/have_32bit.inc
|
||||
--source suite/sys_vars/inc/tmp_table_size_basic.inc
|
||||
|
@@ -1,9 +0,0 @@
|
||||
################################################################################
|
||||
# Created by Horst Hunger 2008-05-07 #
|
||||
# #
|
||||
# Wrapper for 64 bit machines #
|
||||
################################################################################
|
||||
|
||||
--source include/have_64bit.inc
|
||||
--source suite/sys_vars/inc/tmp_table_size_basic.inc
|
||||
|
Reference in New Issue
Block a user