mirror of
https://github.com/MariaDB/server.git
synced 2025-12-18 10:22:14 +03:00
merge
This commit is contained in:
@@ -12,10 +12,8 @@ main.gis # Bug#52208 2010-11-24 alik gis fails o
|
||||
main.gis-rtree @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
|
||||
main.information_schema # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically
|
||||
main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically
|
||||
main.lock_multi_bug38691 @solaris # Bug#47792 2009-10-02 alik main.lock_multi_bug38691 times out sporadically on Solaris 10
|
||||
main.lowercase_table2 @darwin # Bug#55509 2010-07-26 alik main.lowercase_table2 fails on Mac OSX (again)
|
||||
main.outfile_loaddata @solaris # Bug#46895 2010-01-20 alik Test "outfile_loaddata" fails (reproducible)
|
||||
main.show_check # Bug#58414 2010-11-24 alik Race condition in show_check.test
|
||||
main.signal_demo3 @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
main.sp @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
main.type_float @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
|
||||
|
||||
6
mysql-test/collections/default.weekly
Normal file → Executable file
6
mysql-test/collections/default.weekly
Normal file → Executable file
@@ -1,2 +1,8 @@
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=1st --experimental=collections/default.experimental 1st
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 main.alter_table-big main.archive-big main.count_distinct3 main.create-big main.events_stress main.events_time_zone main.information_schema-big main.log_tables-big main.merge-big main.mysqlbinlog_row_big main.read_many_rows_innodb main.ssl-big main.sum_distinct-big main.type_newdecimal-big main.variables-big parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_2_innodb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb funcs_1.myisam_views-big
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-rpl-binlog-row-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=row
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-rpl-binlog-mixed-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=mixed
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-rpl-binlog-row-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=row
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-rpl-binlog-mixed-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=mixed
|
||||
|
||||
5
mysql-test/collections/mysql-5.1-innodb.push
Normal file
5
mysql-test/collections/mysql-5.1-innodb.push
Normal file
@@ -0,0 +1,5 @@
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed --embedded --experimental=collections/default.experimental --skip-ndb
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental --skip-ndb
|
||||
5
mysql-test/collections/mysql-5.5-innodb.push
Normal file
5
mysql-test/collections/mysql-5.5-innodb.push
Normal file
@@ -0,0 +1,5 @@
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed --embedded --experimental=collections/default.experimental --skip-ndb
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental --skip-ndb
|
||||
5
mysql-test/collections/mysql-trunk-innodb.push
Normal file
5
mysql-test/collections/mysql-trunk-innodb.push
Normal file
@@ -0,0 +1,5 @@
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --suite=main,binlog,innodb,rpl,sys_vars,perfschema --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --suite=main,binlog,innodb,rpl,sys_vars,perfschema --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-emebbed --embedded --suite=main,binlog,innodb,rpl,sys_vars,perfschema
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --mysqld=--binlog-format=row --suite=rpl,binlog --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1
|
||||
@@ -497,3 +497,22 @@ SET @@SESSION.AUTO_INCREMENT_INCREMENT=default;
|
||||
SET @@SESSION.AUTO_INCREMENT_OFFSET=default;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug#50619 assert in handler::update_auto_increment
|
||||
#
|
||||
CREATE TABLE t1 (pk INT AUTO_INCREMENT, PRIMARY KEY (pk));
|
||||
INSERT INTO t1 VALUES (NULL), (-1), (NULL);
|
||||
SELECT * FROM t1;
|
||||
pk
|
||||
-1
|
||||
1
|
||||
2
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (pk BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY (pk));
|
||||
INSERT INTO t1 VALUES (NULL), (18446744073709551615-1), (NULL);
|
||||
ERROR HY000: Failed to read auto-increment value from storage engine
|
||||
SELECT * FROM t1;
|
||||
pk
|
||||
1
|
||||
18446744073709551614
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -66,3 +66,27 @@ SELECT ((@id := id) - id) FROM t2;
|
||||
KILL @id;
|
||||
SET DEBUG_SYNC= "now SIGNAL killed";
|
||||
DROP TABLE t1, t2;
|
||||
SET DEBUG_SYNC= "RESET";
|
||||
#
|
||||
# Bug#58933 Assertion `thd- >is_error()' fails on shutdown with ongoing
|
||||
# OPTIMIZE TABLE
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
# Connection con1
|
||||
SET DEBUG_SYNC= 'ha_admin_open_ltable SIGNAL waiting WAIT_FOR killed';
|
||||
# Sending:
|
||||
OPTIMIZE TABLE t1;
|
||||
# Connection default
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR waiting';
|
||||
KILL QUERY ID;
|
||||
SET DEBUG_SYNC= 'now SIGNAL killed';
|
||||
# Connection con1
|
||||
# Reaping: OPTIMIZE TABLE t1
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status Operation failed
|
||||
# Connection default
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
|
||||
@@ -5,3 +5,111 @@
|
||||
CREATE DATABASE XY;
|
||||
USE XY;
|
||||
DROP DATABASE XY;
|
||||
USE TEST;
|
||||
#
|
||||
# Bug55222 Mysqldump table names case bug in REFERENCES clause
|
||||
# InnoDB did not handle lower_case_table_names=2 for
|
||||
# foreign_table_names and referenced_table_names.
|
||||
#
|
||||
SHOW VARIABLES LIKE 'lower_case_table_names';
|
||||
Variable_name Value
|
||||
lower_case_table_names 2
|
||||
DROP TABLE IF EXISTS `Table2`;
|
||||
DROP TABLE IF EXISTS `Table1`;
|
||||
CREATE TABLE `Table1`(c1 INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE TABLE `Table2`(c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB;
|
||||
ALTER TABLE `Table2` ADD CONSTRAINT fk1 FOREIGN KEY(c2) REFERENCES `Table1`(c1);
|
||||
SHOW CREATE TABLE `Table2`;
|
||||
Table Table2
|
||||
Create Table CREATE TABLE `Table2` (
|
||||
`c1` int(11) NOT NULL,
|
||||
`c2` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`c1`),
|
||||
KEY `fk1` (`c2`),
|
||||
CONSTRAINT `fk1` FOREIGN KEY (`c2`) REFERENCES `Table1` (`c1`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS;
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA test
|
||||
CONSTRAINT_NAME fk1
|
||||
UNIQUE_CONSTRAINT_CATALOG def
|
||||
UNIQUE_CONSTRAINT_SCHEMA test
|
||||
UNIQUE_CONSTRAINT_NAME PRIMARY
|
||||
MATCH_OPTION NONE
|
||||
UPDATE_RULE RESTRICT
|
||||
DELETE_RULE RESTRICT
|
||||
TABLE_NAME Table2
|
||||
REFERENCED_TABLE_NAME Table1
|
||||
DROP TABLE `Table2`;
|
||||
DROP TABLE `Table1`;
|
||||
DROP TABLE IF EXISTS Product_Order;
|
||||
DROP TABLE IF EXISTS Product;
|
||||
DROP TABLE IF EXISTS Customer;
|
||||
CREATE TABLE Product (Category INT NOT NULL, Id INT NOT NULL,
|
||||
Price DECIMAL, PRIMARY KEY(Category, Id)) ENGINE=InnoDB;
|
||||
CREATE TABLE Customer (Id INT NOT NULL, PRIMARY KEY (Id)) ENGINE=InnoDB;
|
||||
CREATE TABLE Product_Order (No INT NOT NULL AUTO_INCREMENT,
|
||||
Product_Category INT NOT NULL,
|
||||
Product_Id INT NOT NULL,
|
||||
Customer_Id INT NOT NULL,
|
||||
PRIMARY KEY(No),
|
||||
INDEX (Product_Category, Product_Id),
|
||||
FOREIGN KEY (Product_Category, Product_Id)
|
||||
REFERENCES Product(Category, Id) ON UPDATE CASCADE ON DELETE RESTRICT,
|
||||
INDEX (Customer_Id),
|
||||
FOREIGN KEY (Customer_Id)
|
||||
REFERENCES Customer(Id)
|
||||
) ENGINE=INNODB;
|
||||
SHOW CREATE TABLE Product_Order;
|
||||
Table Product_Order
|
||||
Create Table CREATE TABLE `Product_Order` (
|
||||
`No` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`Product_Category` int(11) NOT NULL,
|
||||
`Product_Id` int(11) NOT NULL,
|
||||
`Customer_Id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`No`),
|
||||
KEY `Product_Category` (`Product_Category`,`Product_Id`),
|
||||
KEY `Customer_Id` (`Customer_Id`),
|
||||
CONSTRAINT `product_order_ibfk_1` FOREIGN KEY (`Product_Category`, `Product_Id`) REFERENCES `Product` (`Category`, `Id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `product_order_ibfk_2` FOREIGN KEY (`Customer_Id`) REFERENCES `Customer` (`Id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SHOW CREATE TABLE Product;
|
||||
Table Product
|
||||
Create Table CREATE TABLE `Product` (
|
||||
`Category` int(11) NOT NULL,
|
||||
`Id` int(11) NOT NULL,
|
||||
`Price` decimal(10,0) DEFAULT NULL,
|
||||
PRIMARY KEY (`Category`,`Id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SHOW CREATE TABLE Customer;
|
||||
Table Customer
|
||||
Create Table CREATE TABLE `Customer` (
|
||||
`Id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS;
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA test
|
||||
CONSTRAINT_NAME product_order_ibfk_1
|
||||
UNIQUE_CONSTRAINT_CATALOG def
|
||||
UNIQUE_CONSTRAINT_SCHEMA test
|
||||
UNIQUE_CONSTRAINT_NAME PRIMARY
|
||||
MATCH_OPTION NONE
|
||||
UPDATE_RULE CASCADE
|
||||
DELETE_RULE RESTRICT
|
||||
TABLE_NAME Product_Order
|
||||
REFERENCED_TABLE_NAME Product
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA test
|
||||
CONSTRAINT_NAME product_order_ibfk_2
|
||||
UNIQUE_CONSTRAINT_CATALOG def
|
||||
UNIQUE_CONSTRAINT_SCHEMA test
|
||||
UNIQUE_CONSTRAINT_NAME PRIMARY
|
||||
MATCH_OPTION NONE
|
||||
UPDATE_RULE RESTRICT
|
||||
DELETE_RULE RESTRICT
|
||||
TABLE_NAME Product_Order
|
||||
REFERENCED_TABLE_NAME Customer
|
||||
DROP TABLE Product_Order;
|
||||
DROP TABLE Product;
|
||||
DROP TABLE Customer;
|
||||
|
||||
@@ -7,13 +7,13 @@ slave_skip_errors OFF
|
||||
#
|
||||
# FLUSH PRIVILEGES should not implicitly unlock locked tables.
|
||||
#
|
||||
drop table if exists t1;
|
||||
create table t1 (c1 int);
|
||||
lock tables t1 read;
|
||||
flush privileges;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (c1 INT);
|
||||
LOCK TABLES t1 READ;
|
||||
FLUSH PRIVILEGES;
|
||||
ERROR HY000: Table 'host' was not locked with LOCK TABLES
|
||||
unlock tables;
|
||||
drop table t1;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#54812: assert in Diagnostics_area::set_ok_status during EXPLAIN
|
||||
#
|
||||
@@ -28,7 +28,7 @@ CREATE FUNCTION f() RETURNS INT RETURN 1;
|
||||
GRANT FILE ON *.* TO 'nopriv_user'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
connection: con1
|
||||
SELECT MAX(key1) FROM t1 WHERE f() < 1 INTO OUTFILE 'mytest';
|
||||
SELECT MAX(key1) FROM t1 WHERE f() < 1 INTO OUTFILE '<outfile>';
|
||||
ERROR 42000: execute command denied to user 'nopriv_user'@'localhost' for routine 'test.f'
|
||||
INSERT INTO t2 SELECT MAX(key1) FROM t1 WHERE f() < 1;
|
||||
ERROR 42000: execute command denied to user 'nopriv_user'@'localhost' for routine 'test.f'
|
||||
|
||||
@@ -1901,7 +1901,7 @@ c1 bigint,
|
||||
c2 set('sweet'),
|
||||
key (c2,c1,c0),
|
||||
key(c0)
|
||||
) engine=myisam partition by hash (month(c0)) partitions 5;
|
||||
) engine=myisam partition by hash (c0) partitions 5;
|
||||
insert ignore into t1 set c0 = -6502262, c1 = 3992917, c2 = 35019;
|
||||
insert ignore into t1 set c0 = 241221, c1 = -6862346, c2 = 56644;
|
||||
select c1 from t1 group by (select c0 from t1 limit 1);
|
||||
|
||||
@@ -1,5 +1,655 @@
|
||||
drop table if exists t1, t2;
|
||||
#
|
||||
# Bug#54483: valgrind errors when making warnings for multiline inserts
|
||||
# into partition
|
||||
#
|
||||
CREATE TABLE t1 (a VARBINARY(10))
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a CHAR(10))
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIMESTAMP)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
INSERT INTO t1 VALUES ('test'),('a'),('5');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'a' at row 1
|
||||
Warning 1265 Data truncated for column 'a' at row 2
|
||||
Warning 1265 Data truncated for column 'a' at row 3
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1265 Data truncated for column 'a' at row 1
|
||||
Warning 1265 Data truncated for column 'a' at row 2
|
||||
Warning 1265 Data truncated for column 'a' at row 3
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
INSERT INTO t1 VALUES ('test'),('a'),('5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'a' at row 1
|
||||
Warning 1264 Out of range value for column 'a' at row 2
|
||||
Warning 1264 Out of range value for column 'a' at row 3
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1264 Out of range value for column 'a' at row 1
|
||||
Warning 1264 Out of range value for column 'a' at row 2
|
||||
Warning 1264 Out of range value for column 'a' at row 3
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1486 Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
# TO_SECONDS() is added in 5.5.
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (TO_SECONDS(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (TO_SECONDS(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (TO_SECONDS(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TO_SECONDS(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TO_SECONDS(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TO_DAYS(FROM_DAYS(a)));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
ERROR HY000: The PARTITION function returns the wrong type
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TO_DAYS(FROM_DAYS(a)));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
ERROR HY000: The PARTITION function returns the wrong type
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
# Bug#57071
|
||||
CREATE TABLE t1
|
||||
(`date` date,
|
||||
`extracted_week` int,
|
||||
`yearweek` int,
|
||||
`week` int,
|
||||
`default_week_format` int)
|
||||
PARTITION BY LIST (EXTRACT(WEEK FROM date) % 3)
|
||||
(PARTITION p0 VALUES IN (0),
|
||||
PARTITION p1 VALUES IN (1),
|
||||
PARTITION p2 VALUES IN (2));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1
|
||||
(`date` date,
|
||||
`extracted_week` int,
|
||||
`yearweek` int,
|
||||
`week` int,
|
||||
`default_week_format` int);
|
||||
SET @old_default_week_format := @@default_week_format;
|
||||
SET default_week_format = 0;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 1;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 2;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 3;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 4;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 5;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 6;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 7;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SELECT * FROM t1;
|
||||
date extracted_week yearweek week default_week_format
|
||||
2000-01-01 0 199952 0 0
|
||||
2000-01-01 0 199952 0 1
|
||||
2000-01-01 52 199952 52 2
|
||||
2000-01-01 52 199952 52 3
|
||||
2000-01-01 0 199952 0 4
|
||||
2000-01-01 0 199952 0 5
|
||||
2000-01-01 52 199952 52 6
|
||||
2000-01-01 52 199952 52 7
|
||||
SET default_week_format = @old_default_week_format;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
# EXTRACT(WEEK...) is disallowed, see bug#57071.
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME, b DATE)
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE, b DATETIME)
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME, b DATE)
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE, b VARCHAR(10))
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT, b DATETIME)
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
#
|
||||
# Bug#50036: Inconsistent errors when using TIMESTAMP
|
||||
# columns/expressions
|
||||
# 1. correct and appropriate errors in light of
|
||||
|
||||
@@ -13,16 +13,16 @@ EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100, 3) GROUP BY a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 5 NULL 4 Using where; Using index
|
||||
DROP TABLE t1;
|
||||
create table t1 (a int)
|
||||
partition by range (a)
|
||||
create table t1 (a DATETIME)
|
||||
partition by range (TO_DAYS(a))
|
||||
subpartition by hash(to_seconds(a))
|
||||
(partition p0 values less than (1));
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
`a` datetime DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50500 PARTITION BY RANGE (a)
|
||||
/*!50500 PARTITION BY RANGE (TO_DAYS(a))
|
||||
SUBPARTITION BY HASH (to_seconds(a))
|
||||
(PARTITION p0 VALUES LESS THAN (1) ENGINE = MyISAM) */
|
||||
drop table t1;
|
||||
|
||||
@@ -5004,6 +5004,58 @@ ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
|
||||
SELECT * FROM t2 UNION SELECT * FROM t2
|
||||
ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# Bug #58818: Incorrect result for IN/ANY subquery
|
||||
# with HAVING condition
|
||||
#
|
||||
CREATE TABLE t1(i INT);
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
CREATE TABLE t1s(i INT);
|
||||
INSERT INTO t1s VALUES (10), (20), (30);
|
||||
CREATE TABLE t2s(i INT);
|
||||
INSERT INTO t2s VALUES (100), (200), (300);
|
||||
SELECT * FROM t1
|
||||
WHERE t1.i NOT IN
|
||||
(
|
||||
SELECT STRAIGHT_JOIN t2s.i
|
||||
FROM
|
||||
t1s LEFT OUTER JOIN t2s ON t2s.i = t1s.i
|
||||
HAVING t2s.i = 999
|
||||
);
|
||||
i
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT * FROM t1
|
||||
WHERE t1.I IN
|
||||
(
|
||||
SELECT STRAIGHT_JOIN t2s.i
|
||||
FROM
|
||||
t1s LEFT OUTER JOIN t2s ON t2s.i = t1s.i
|
||||
HAVING t2s.i = 999
|
||||
) IS UNKNOWN;
|
||||
i
|
||||
SELECT * FROM t1
|
||||
WHERE NOT t1.I = ANY
|
||||
(
|
||||
SELECT STRAIGHT_JOIN t2s.i
|
||||
FROM
|
||||
t1s LEFT OUTER JOIN t2s ON t2s.i = t1s.i
|
||||
HAVING t2s.i = 999
|
||||
);
|
||||
i
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT * FROM t1
|
||||
WHERE t1.i = ANY (
|
||||
SELECT STRAIGHT_JOIN t2s.i
|
||||
FROM
|
||||
t1s LEFT OUTER JOIN t2s ON t2s.i = t1s.i
|
||||
HAVING t2s.i = 999
|
||||
) IS UNKNOWN;
|
||||
i
|
||||
DROP TABLE t1,t1s,t2s;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug #57704: Cleanup code dies with void TABLE::set_keyread(bool):
|
||||
|
||||
@@ -164,6 +164,17 @@ a b
|
||||
2 NULL
|
||||
DROP TABLE t1, t2, t3, t4, t5;
|
||||
#
|
||||
# Bug#58207: invalid memory reads when using default column value and
|
||||
# tmptable needed
|
||||
#
|
||||
CREATE TABLE t(a VARCHAR(245) DEFAULT
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
|
||||
INSERT INTO t VALUES (''),(''),(''),(''),(''),(''),(''),(''),(''),(''),('');
|
||||
SELECT * FROM (SELECT default(a) FROM t GROUP BY a) d;
|
||||
default(a)
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
DROP TABLE t;
|
||||
#
|
||||
# End of 5.1 tests.
|
||||
#
|
||||
#
|
||||
|
||||
@@ -1644,3 +1644,128 @@ b
|
||||
2
|
||||
DROP TABLE t1,t2;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug#57986 ORDER BY clause is not used after a UNION,
|
||||
# if embedded in a SELECT
|
||||
#
|
||||
CREATE TABLE t1 (c1 VARCHAR(10) NOT NULL, c2 INT NOT NULL);
|
||||
CREATE TABLE t2 (c1 VARCHAR(10) NOT NULL, c2 INT NOT NULL);
|
||||
INSERT INTO t1 (c1, c2) VALUES ('t1a', 1), ('t1a', 2), ('t1a', 3), ('t1b', 2), ('t1b', 1);
|
||||
INSERT INTO t2 (c1, c2) VALUES ('t2a', 1), ('t2a', 2), ('t2a', 3), ('t2b', 2), ('t2b', 1);
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY c2, c1;
|
||||
c1 c2
|
||||
t1a 1
|
||||
t1b 1
|
||||
t2a 1
|
||||
t2b 1
|
||||
t1a 2
|
||||
t1b 2
|
||||
t2a 2
|
||||
t2b 2
|
||||
t1a 3
|
||||
t2a 3
|
||||
SELECT * FROM t1 UNION (SELECT * FROM t2) ORDER BY c2, c1;
|
||||
c1 c2
|
||||
t1a 1
|
||||
t1b 1
|
||||
t2a 1
|
||||
t2b 1
|
||||
t1a 2
|
||||
t1b 2
|
||||
t2a 2
|
||||
t2b 2
|
||||
t1a 3
|
||||
t2a 3
|
||||
SELECT * FROM t1 UNION (SELECT * FROM t2 ORDER BY c2, c1);
|
||||
c1 c2
|
||||
t1a 1
|
||||
t1a 2
|
||||
t1a 3
|
||||
t1b 2
|
||||
t1b 1
|
||||
t2a 1
|
||||
t2a 2
|
||||
t2a 3
|
||||
t2b 2
|
||||
t2b 1
|
||||
SELECT c1, c2 FROM (
|
||||
SELECT c1, c2 FROM t1
|
||||
UNION
|
||||
(SELECT c1, c2 FROM t2)
|
||||
ORDER BY c2, c1
|
||||
) AS res;
|
||||
c1 c2
|
||||
t1a 1
|
||||
t1b 1
|
||||
t2a 1
|
||||
t2b 1
|
||||
t1a 2
|
||||
t1b 2
|
||||
t2a 2
|
||||
t2b 2
|
||||
t1a 3
|
||||
t2a 3
|
||||
SELECT c1, c2 FROM (
|
||||
SELECT c1, c2 FROM t1
|
||||
UNION
|
||||
(SELECT c1, c2 FROM t2)
|
||||
ORDER BY c2 DESC, c1 LIMIT 1
|
||||
) AS res;
|
||||
c1 c2
|
||||
t1a 3
|
||||
SELECT c1, c2 FROM (
|
||||
SELECT c1, c2 FROM t1
|
||||
UNION
|
||||
(SELECT c1, c2 FROM t2 ORDER BY c2 DESC, c1 LIMIT 1)
|
||||
) AS res;
|
||||
c1 c2
|
||||
t1a 1
|
||||
t1a 2
|
||||
t1a 3
|
||||
t1b 2
|
||||
t1b 1
|
||||
t2a 3
|
||||
SELECT c1, c2 FROM (
|
||||
SELECT c1, c2 FROM t1
|
||||
UNION
|
||||
SELECT c1, c2 FROM t2
|
||||
ORDER BY c2 DESC, c1 DESC LIMIT 1
|
||||
) AS res;
|
||||
c1 c2
|
||||
t2a 3
|
||||
SELECT c1, c2 FROM (
|
||||
(
|
||||
(SELECT c1, c2 FROM t1)
|
||||
UNION
|
||||
(SELECT c1, c2 FROM t2)
|
||||
)
|
||||
ORDER BY c2 DESC, c1 ASC LIMIT 1
|
||||
) AS res;
|
||||
c1 c2
|
||||
t1a 3
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug #58970 Problem Subquery (without referencing a table)
|
||||
# and Order By
|
||||
#
|
||||
SELECT(SELECT 0 AS a UNION SELECT 1 AS a ORDER BY a ASC LIMIT 1) AS dev;
|
||||
dev
|
||||
0
|
||||
SELECT(SELECT 0 AS a UNION SELECT 1 AS a ORDER BY a DESC LIMIT 1) AS dev;
|
||||
dev
|
||||
1
|
||||
SELECT(SELECT 0 AS a FROM dual UNION SELECT 1 AS a FROM dual ORDER BY a ASC LIMIT 1) AS dev;
|
||||
dev
|
||||
0
|
||||
SELECT(SELECT 0 AS a FROM dual UNION SELECT 1 AS a FROM dual ORDER BY a DESC LIMIT 1) AS dev;
|
||||
dev
|
||||
1
|
||||
SELECT(SELECT 1 AS a ORDER BY a) AS dev;
|
||||
dev
|
||||
1
|
||||
SELECT(SELECT 1 AS a LIMIT 1) AS dev;
|
||||
dev
|
||||
1
|
||||
SELECT(SELECT 1 AS a FROM dual ORDER BY a DESC LIMIT 1) AS dev;
|
||||
dev
|
||||
1
|
||||
|
||||
@@ -55,6 +55,12 @@ INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','abc');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('def','def','abc');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','def');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
|
||||
ERROR 23000: Duplicate entry 'abc-abc-abc' for key 'PRIMARY'
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
|
||||
ERROR 23000: Duplicate entry 'abc-abc-def' for key 'PRIMARY'
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
|
||||
ERROR 23000: Duplicate entry 'abc-def-def' for key 'PRIMARY'
|
||||
SELECT hex(c1),hex(c2),hex(c3) FROM t1;
|
||||
hex(c1) hex(c2) hex(c3)
|
||||
61626300000000000000 61626300000000000000 61626300000000000000
|
||||
|
||||
@@ -55,6 +55,12 @@ INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','abc');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('def','def','abc');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','def');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
|
||||
ERROR 23000: Duplicate entry 'abc-abc-abc' for key 'PRIMARY'
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
|
||||
ERROR 23000: Duplicate entry 'abc-abc-def' for key 'PRIMARY'
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
|
||||
ERROR 23000: Duplicate entry 'abc-def-def' for key 'PRIMARY'
|
||||
SELECT * FROM t1;
|
||||
c1 c2 c3
|
||||
abc
|
||||
|
||||
@@ -55,6 +55,12 @@ INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','abc');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('def','def','abc');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','def');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
|
||||
ERROR 23000: Duplicate entry 'abc-abc-abc' for key 'c1'
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
|
||||
ERROR 23000: Duplicate entry 'abc-abc-def' for key 'c1'
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
|
||||
ERROR 23000: Duplicate entry 'abc-def-def' for key 'c1'
|
||||
SELECT * FROM t1;
|
||||
c1 c2 c3
|
||||
abc
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -10,25 +10,174 @@ File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 107
|
||||
stop slave;
|
||||
reset slave;
|
||||
show slave status;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry #
|
||||
Master_Log_File
|
||||
Read_Master_Log_Pos 4
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File
|
||||
Slave_IO_Running No
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 0
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
||||
Replicate_Ignore_Server_Ids
|
||||
Master_Server_Id 1
|
||||
change master to master_host='127.0.0.1';
|
||||
show slave status;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry #
|
||||
Master_Log_File
|
||||
Read_Master_Log_Pos 4
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File
|
||||
Slave_IO_Running No
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 0
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
||||
Replicate_Ignore_Server_Ids
|
||||
Master_Server_Id 1
|
||||
change master to master_host='127.0.0.1',master_user='root',
|
||||
master_password='',master_port=MASTER_PORT;
|
||||
show slave status;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry #
|
||||
Master_Log_File
|
||||
Read_Master_Log_Pos 4
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File
|
||||
Slave_IO_Running No
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 0
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
||||
Replicate_Ignore_Server_Ids
|
||||
Master_Server_Id 1
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Waiting for master to send event
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 107
|
||||
Relay_Log_File slave-relay-bin.000002
|
||||
Relay_Log_Pos 254
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Checking that both slave threads are running.
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 107
|
||||
Relay_Log_Space 410
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
||||
Replicate_Ignore_Server_Ids
|
||||
Master_Server_Id 1
|
||||
drop table if exists t1;
|
||||
create table t1 (n int, PRIMARY KEY(n));
|
||||
insert into t1 values (10),(45),(90);
|
||||
|
||||
@@ -11,7 +11,13 @@ stop slave sql_thread;
|
||||
insert into t1 values(1);
|
||||
insert into t1 values(2);
|
||||
stop slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 192 # None 0 No # No 0 0 1
|
||||
change master to master_user='root';
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 192 # None 0 No # No 0 0 1
|
||||
start slave;
|
||||
select * from t1;
|
||||
n
|
||||
|
||||
@@ -17,6 +17,45 @@ let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes%
|
||||
|
||||
--source include/wait_slave_status.inc
|
||||
flush logs;
|
||||
Relay_Log_File mysqld-relay-bin.000003
|
||||
Checking that both slave threads are running.
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port SLAVE_PORT
|
||||
Connect_Retry 60
|
||||
Master_Log_File slave-bin.000001
|
||||
Read_Master_Log_Pos 107
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File slave-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 107
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
||||
Replicate_Ignore_Server_Ids
|
||||
Master_Server_Id 2
|
||||
STOP SLAVE;
|
||||
|
||||
@@ -10,6 +10,6 @@ load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
|
||||
select count(*) from test.t1;
|
||||
count(*)
|
||||
2
|
||||
show binlog events from <binlog_start>;
|
||||
show binlog events from 107;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
drop table test.t1;
|
||||
|
||||
@@ -4,23 +4,39 @@ reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 107 <Binlog_Ignore_DB>
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 107 # # master-bin.000001 Yes Yes 0 0 107 # None 0 No # No 0 0 1
|
||||
stop slave;
|
||||
change master to master_log_pos=MASTER_LOG_POS;
|
||||
change master to master_log_pos=107;
|
||||
start slave;
|
||||
stop slave;
|
||||
change master to master_log_pos=MASTER_LOG_POS;
|
||||
change master to master_log_pos=107;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 107 # # master-bin.000001 No No 0 0 107 # None 0 No # No 0 0 1
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 107 # # master-bin.000001 Yes Yes 0 0 107 # None 0 No # No 0 0 1
|
||||
stop slave;
|
||||
# impossible position leads to an error
|
||||
change master to master_log_pos=MASTER_LOG_POS;
|
||||
change master to master_log_pos=178;
|
||||
start slave;
|
||||
Last_IO_Error = Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position'
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 178 # # master-bin.000001 No Yes 0 0 178 # None 0 No # No 1236 Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position' 0 1
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 107 <Binlog_Ignore_DB>
|
||||
create table if not exists t1 (n int);
|
||||
drop table if exists t1;
|
||||
create table t1 (n int);
|
||||
insert into t1 values (1),(2),(3);
|
||||
stop slave;
|
||||
change master to master_log_pos=MASTER_LOG_POS;
|
||||
change master to master_log_pos=207;
|
||||
start slave;
|
||||
select * from t1 ORDER BY n;
|
||||
n
|
||||
|
||||
@@ -8,17 +8,48 @@ start slave;
|
||||
CREATE TABLE t1 (a INT, b LONG);
|
||||
INSERT INTO t1 VALUES (1,1), (2,2);
|
||||
INSERT INTO t1 VALUES (3,UUID()), (4,UUID());
|
||||
show binlog events from <binlog_start>;
|
||||
SHOW BINLOG EVENTS;
|
||||
**** On Slave ****
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG)
|
||||
slave-bin.000001 # Query # # BEGIN
|
||||
slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
||||
slave-bin.000001 # Query # # COMMIT
|
||||
slave-bin.000001 # Query # # BEGIN
|
||||
slave-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query # # COMMIT
|
||||
show binlog events from <binlog_start>;
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
||||
Replicate_Ignore_Server_Ids
|
||||
Master_Server_Id 1
|
||||
SHOW BINLOG EVENTS;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
||||
@@ -41,11 +41,14 @@ t1
|
||||
t2
|
||||
**** On Master ****
|
||||
DROP TABLE t1,t2;
|
||||
show binlog events from <binlog_start>;
|
||||
SHOW BINLOG EVENTS;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a int)
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int)
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
|
||||
master-bin.000001 4 Format_desc 1 107 Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 107 Query 1 193 use `test`; CREATE TABLE t1 (a int)
|
||||
master-bin.000001 193 Query 1 279 use `test`; CREATE TABLE t2 (a int)
|
||||
master-bin.000001 279 Query 1 403 use `test`; DROP TEMPORARY TABLE IF EXISTS `t2` /* generated by server */
|
||||
master-bin.000001 403 Query 1 527 use `test`; DROP TEMPORARY TABLE IF EXISTS `t2` /* generated by server */
|
||||
master-bin.000001 527 Query 1 631 use `test`; DROP TABLE `t1` /* generated by server */
|
||||
SHOW TABLES;
|
||||
Tables_in_test
|
||||
t2
|
||||
|
||||
@@ -17,5 +17,45 @@ a
|
||||
0
|
||||
drop table t1;
|
||||
insert into t1 values (1);
|
||||
Last_SQL_Error = Error 'Table 'test.t1' doesn't exist' on opening tables
|
||||
show slave status;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_MYPORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table test.t2
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1146
|
||||
Last_Error Error executing row event: 'Table 'test.t1' doesn't exist'
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1146
|
||||
Last_SQL_Error Error executing row event: 'Table 'test.t1' doesn't exist'
|
||||
Replicate_Ignore_Server_Ids
|
||||
Master_Server_Id 1
|
||||
drop table t1, t2;
|
||||
|
||||
@@ -11,8 +11,9 @@ change master to master_user='test';
|
||||
Master_User test
|
||||
Master_Host 127.0.0.1
|
||||
reset slave;
|
||||
Master_User root
|
||||
Master_User test
|
||||
Master_Host 127.0.0.1
|
||||
change master to master_user='root';
|
||||
include/start_slave.inc
|
||||
Master_User root
|
||||
Master_Host 127.0.0.1
|
||||
@@ -30,11 +31,11 @@ include/stop_slave.inc
|
||||
reset slave;
|
||||
change master to master_user='impossible_user_name';
|
||||
start slave;
|
||||
include/stop_slave.inc
|
||||
stop slave;
|
||||
change master to master_user='root';
|
||||
include/start_slave.inc
|
||||
include/stop_slave.inc
|
||||
stop slave;
|
||||
change master to master_user='impossible_user_name';
|
||||
start slave;
|
||||
include/stop_slave.inc
|
||||
stop slave;
|
||||
reset slave;
|
||||
|
||||
@@ -77,6 +77,8 @@ id2
|
||||
< ---- Master selects-- >
|
||||
-------------------------
|
||||
CALL test.p1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM test.t3 ORDER BY id3;
|
||||
id3 c
|
||||
1 MySQL
|
||||
|
||||
@@ -69,9 +69,15 @@ INSERT INTO test.t2 VALUES(NULL,0,'Testing MySQL databases is a cool ', 'MySQL C
|
||||
UPDATE test.t1 SET b1 = 0 WHERE b1 = 1;
|
||||
INSERT INTO test.t2 VALUES(NULL,1,'This is an after update test.', 'If this works, total will not be zero on the master or slave',1.4321,5.221,0,YEAR(NOW()),NOW());
|
||||
UPDATE test.t2 SET b1 = 0 WHERE b1 = 1;
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
INSERT INTO test.t1 VALUES(NULL,1,'add some more test data test.', 'and hope for the best', 3.321,5.221,0,YEAR(NOW()),NOW());
|
||||
DELETE FROM test.t1 WHERE id = 1;
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
DELETE FROM test.t2 WHERE id = 1;
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
DROP TRIGGER test.t1_bi;
|
||||
DROP TRIGGER test.t2_ai;
|
||||
DROP TRIGGER test.t1_bu;
|
||||
|
||||
@@ -12,39 +12,201 @@ create table t2(n int not null auto_increment primary key);
|
||||
insert into t2 values (1),(2);
|
||||
insert into t2 values (3),(4);
|
||||
drop table t2;
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS;
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=311;
|
||||
select * from t1;
|
||||
n
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=MASTER_LOG_POS;
|
||||
show slave status;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_MYPORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File slave-relay-bin.000004
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running #
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition Master
|
||||
Until_Log_File master-bin.000001
|
||||
Until_Log_Pos 311
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
||||
Replicate_Ignore_Server_Ids
|
||||
Master_Server_Id 1
|
||||
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
|
||||
select * from t1;
|
||||
n
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=RELAY_LOG_POS;
|
||||
n 1
|
||||
n 2
|
||||
n 3
|
||||
n 4
|
||||
show slave status;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_MYPORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File slave-relay-bin.000004
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running #
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition Master
|
||||
Until_Log_File master-no-such-bin.000001
|
||||
Until_Log_Pos 291
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
||||
Replicate_Ignore_Server_Ids
|
||||
Master_Server_Id 1
|
||||
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
|
||||
select * from t2;
|
||||
n
|
||||
1
|
||||
2
|
||||
show slave status;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_MYPORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File slave-relay-bin.000004
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running #
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition Relay
|
||||
Until_Log_File slave-relay-bin.000004
|
||||
Until_Log_Pos 728
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
||||
Replicate_Ignore_Server_Ids
|
||||
Master_Server_Id 1
|
||||
start slave;
|
||||
stop slave;
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS;
|
||||
start slave until master_log_file='master-bin', master_log_pos=MASTER_LOG_POS;
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=740;
|
||||
show slave status;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_MYPORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File slave-relay-bin.000004
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition Master
|
||||
Until_Log_File master-bin.000001
|
||||
Until_Log_Pos 740
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
||||
Replicate_Ignore_Server_Ids
|
||||
Master_Server_Id 1
|
||||
start slave until master_log_file='master-bin', master_log_pos=561;
|
||||
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS, relay_log_pos=RELAY_LOG_POS;
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
|
||||
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
||||
start slave until master_log_file='master-bin.000001';
|
||||
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
||||
start slave until relay_log_file='slave-relay-bin.000002';
|
||||
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
||||
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=MASTER_LOG_POS;
|
||||
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
|
||||
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
||||
start slave sql_thread;
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS;
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=740;
|
||||
Warnings:
|
||||
Note 1254 Slave is already running
|
||||
Level Note
|
||||
Code 1254
|
||||
Message Slave is already running
|
||||
|
||||
@@ -8,8 +8,10 @@ create table t1 (n int);
|
||||
reset master;
|
||||
stop slave;
|
||||
change master to master_port=SLAVE_PORT;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id
|
||||
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 107 None 0 No NULL No 0 0 1
|
||||
start slave;
|
||||
Last_IO_Error = Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).
|
||||
insert into t1 values (1);
|
||||
show status like "slave_running";
|
||||
Variable_name Value
|
||||
|
||||
@@ -8,6 +8,9 @@ create table t1 (n int);
|
||||
reset master;
|
||||
stop slave;
|
||||
change master to master_port=SLAVE_PORT;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id
|
||||
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 107 None 0 No NULL No 0 0 1
|
||||
start slave;
|
||||
insert into t1 values (1);
|
||||
select * from t1;
|
||||
|
||||
@@ -18,5 +18,46 @@ drop user rpl@127.0.0.1;
|
||||
flush privileges;
|
||||
stop slave;
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User rpl
|
||||
Master_Port MASTER_MYPORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Connecting
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master NULL
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno #
|
||||
Last_IO_Error #
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
||||
Replicate_Ignore_Server_Ids
|
||||
Master_Server_Id 1
|
||||
drop table t1;
|
||||
drop table t1;
|
||||
|
||||
@@ -376,7 +376,7 @@ CREATE TABLE t12 (data LONG);
|
||||
LOCK TABLES t12 WRITE;
|
||||
INSERT INTO t12 VALUES(UUID());
|
||||
UNLOCK TABLES;
|
||||
show binlog events from <binlog_start>;
|
||||
show binlog events from <binlog_start>;
|
||||
show binlog events;
|
||||
show binlog events;
|
||||
drop database mysqltest1;
|
||||
set global binlog_format= @saved_binlog_format;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -34,6 +34,8 @@ END//
|
||||
SELECT sf1();
|
||||
sf1()
|
||||
0
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -51,6 +53,8 @@ id data
|
||||
2 1
|
||||
3 3
|
||||
INSERT INTO t4 VALUES(sf1());
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -71,6 +75,9 @@ id data
|
||||
3 3
|
||||
3 3
|
||||
UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -97,6 +104,8 @@ id data
|
||||
3 3
|
||||
3 3
|
||||
DELETE FROM t4 WHERE i = sf1() + 1;
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
|
||||
@@ -31,6 +31,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -80,6 +82,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# CONTAINS SQL ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -129,6 +133,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# NO SQL ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -178,6 +184,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# READS SQL DATA ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -227,6 +235,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -276,6 +286,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -325,6 +337,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# CONTAINS SQL COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -374,6 +388,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# NO SQL COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -423,6 +439,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# READS SQL DATA COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -472,6 +490,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -521,6 +541,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -570,6 +592,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -619,6 +643,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -668,6 +694,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -717,6 +745,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -766,6 +796,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -815,6 +847,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -864,6 +898,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -913,6 +949,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -962,6 +1000,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1011,6 +1051,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# SQL SECURITY INVOKER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1060,6 +1102,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# CONTAINS SQL SQL SECURITY INVOKER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1109,6 +1153,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# NO SQL SQL SECURITY INVOKER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1158,6 +1204,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# READS SQL DATA SQL SECURITY INVOKER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1207,6 +1255,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA SQL SECURITY INVOKER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1256,6 +1306,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# SQL SECURITY INVOKER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1305,6 +1357,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# CONTAINS SQL SQL SECURITY INVOKER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1354,6 +1408,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# NO SQL SQL SECURITY INVOKER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1403,6 +1459,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# READS SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1452,6 +1510,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1501,6 +1561,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# SQL SECURITY INVOKER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1550,6 +1612,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY INVOKER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1599,6 +1663,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL SQL SECURITY INVOKER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1648,6 +1714,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY INVOKER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1697,6 +1765,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY INVOKER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1746,6 +1816,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# SQL SECURITY INVOKER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1795,6 +1867,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY INVOKER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1844,6 +1918,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL SQL SECURITY INVOKER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1893,6 +1969,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1942,6 +2020,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -1991,6 +2071,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# SQL SECURITY DEFINER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2040,6 +2122,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# CONTAINS SQL SQL SECURITY DEFINER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2089,6 +2173,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# NO SQL SQL SECURITY DEFINER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2138,6 +2224,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# READS SQL DATA SQL SECURITY DEFINER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2187,6 +2275,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA SQL SECURITY DEFINER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2236,6 +2326,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# SQL SECURITY DEFINER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2285,6 +2377,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# CONTAINS SQL SQL SECURITY DEFINER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2334,6 +2428,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# NO SQL SQL SECURITY DEFINER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2383,6 +2479,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# READS SQL DATA SQL SECURITY DEFINER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2432,6 +2530,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA SQL SECURITY DEFINER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2481,6 +2581,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# SQL SECURITY DEFINER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2530,6 +2632,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY DEFINER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2579,6 +2683,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL SQL SECURITY DEFINER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2628,6 +2734,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY DEFINER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2677,6 +2785,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY DEFINER ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2726,6 +2836,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# SQL SECURITY DEFINER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2775,6 +2887,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY DEFINER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2824,6 +2938,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL SQL SECURITY DEFINER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2873,6 +2989,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY DEFINER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
@@ -2922,6 +3040,8 @@ CLOSE cur2;
|
||||
END//
|
||||
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY DEFINER COMMENT 'comment' ;
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
|
||||
@@ -30,6 +30,8 @@ CLOSE cur1;
|
||||
CLOSE cur2;
|
||||
END//
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id data
|
||||
1 1
|
||||
|
||||
@@ -1,8 +1,99 @@
|
||||
# List of disabled tests
|
||||
# test name : comment
|
||||
rpl_redirect : Fails due to bug#49978
|
||||
crash_manycolumns_string : Bug#50495 'Row size too large' for plugin, but works for built-in innodb
|
||||
ix_unique_lob : Bug#52283 Innodb reports extra warnings when SELECT/WHERE is performed using invalid value
|
||||
ix_unique_string_length : Bug#52283 Innodb reports extra warnings when SELECT/WHERE is performed using invalid value
|
||||
rpl_empty_master_crash : Test not applicable in 5.5+
|
||||
rpl_REDIRECT : Test not applicable in 5.5+
|
||||
rpl_redirect : Fails due to bug#49978
|
||||
crash_manycolumns_string : Bug#50495 'Row size too large' for plugin, but works for built-in innodb
|
||||
ix_unique_lob : Bug#52283 Innodb reports extra warnings when SELECT/WHERE is performed using invalid value
|
||||
ix_unique_string_length : Bug#52283 Innodb reports extra warnings when SELECT/WHERE is performed using invalid value
|
||||
rpl_empty_master_crash : Test not applicable in 5.5+
|
||||
rpl_REDIRECT : Test not applicable in 5.5+
|
||||
|
||||
rpl_create_database : Result Difference Due To Change In .inc file
|
||||
rpl_loaddata_m : Result Difference Due To Change In .inc file
|
||||
rpl_sp_effects : Result Difference Due To Change In .inc file
|
||||
rpl_variables : Result Difference Due To Change In .inc file
|
||||
rpl_loaddata_s : Result Difference Due To Change In .inc file
|
||||
rpl_dual_pos_advance : Result Difference Due To Change In .inc file
|
||||
rpl000011 : Result Difference Due To Change In .inc file
|
||||
rpl000013 : Result Difference Due To Change In .inc file
|
||||
rpl_000015 : Result Difference Due To Change In .inc file
|
||||
rpl_LD_INFILE : Result Difference Due To Change In .inc file
|
||||
rpl_alter : Result Difference Due To Change In .inc file
|
||||
rpl_alter_db : Result Difference Due To Change In .inc file
|
||||
rpl_alter_db : Result Difference Due To Change In .inc file
|
||||
rpl_bit : Result Difference Due To Change In .inc file
|
||||
rpl_bit_npk : Result Difference Due To Change In .inc file
|
||||
rpl_change_master : Result Difference Due To Change In .inc file
|
||||
rpl_do_grant : Result Difference Due To Change In .inc file
|
||||
rpl_drop : Result Difference Due To Change In .inc file
|
||||
rpl_drop_db : Result Difference Due To Change In .inc file
|
||||
rpl_flushlog_loop : Result Difference Due To Change In .inc file
|
||||
rpl_get_lock : Result Difference Due To Change In .inc file
|
||||
rpl_get_lock : Result Difference Due To Change In .inc file
|
||||
rpl_insert : Result Difference Due To Change In .inc file
|
||||
rpl_insert_select : Result Difference Due To Change In .inc file
|
||||
rpl_loaddata2 : Result Difference Due To Change In .inc file
|
||||
rpl_loaddatalocal : Result Difference Due To Change In .inc file
|
||||
rpl_loadfile : Result Difference Due To Change In .inc file
|
||||
rpl_log_pos : Result Difference Due To Change In .inc file
|
||||
rpl_many_optimize : Result Difference Due To Change In .inc file
|
||||
rpl_master_pos_wait : Result Difference Due To Change In .inc file
|
||||
rpl_misc_functions : Result Difference Due To Change In .inc file
|
||||
rpl_ps : Result Difference Due To Change In .inc file
|
||||
rpl_server_id1 : Result Difference Due To Change In .inc file
|
||||
rpl_session_var : Result Difference Due To Change In .inc file
|
||||
rpl_sf : Result Difference Due To Change In .inc file
|
||||
rpl_slave_status : Result Difference Due To Change In .inc file
|
||||
rpl_sp004 : Result Difference Due To Change In .inc file
|
||||
rpl_start_stop_slave : Result Difference Due To Change In .inc file
|
||||
rpl_stm_max_relay_size : Result Difference Due To Change In .inc file
|
||||
rpl_stm_mystery22 : Result Difference Due To Change In .inc file
|
||||
rpl_stm_no_op : Result Difference Due To Change In .inc file
|
||||
rpl_stm_reset_slave : Result Difference Due To Change In .inc file
|
||||
rpl_temp_table : Result Difference Due To Change In .inc file
|
||||
rpl_temporary : Result Difference Due To Change In .inc file
|
||||
rpl_trigger : Result Difference Due To Change In .inc file
|
||||
rpl_trunc_temp : Result Difference Due To Change In .inc file
|
||||
rpl_user_variables : Result Difference Due To Change In .inc file
|
||||
rpl_server_id2 : Result Difference Due To Change In .inc file
|
||||
rpl000010 : Result Difference Due To Change In .inc file
|
||||
rpl_init_slave : Result Difference Due To Change In .inc file
|
||||
rpl_multi_delete2 : Result Difference Due To Change In .inc file
|
||||
rpl_view : Result Difference Due To Change In .inc file
|
||||
rpl_ignore_table_update : Result Difference Due To Change In .inc file
|
||||
rpl_err_ignoredtable : Result Difference Due To Change In .inc file
|
||||
rpl_multi_update4 : Result Difference Due To Change In .inc file
|
||||
rpl_multi_delete : Result Difference Due To Change In .inc file
|
||||
rpl_ignore_grant : Result Difference Due To Change In .inc file
|
||||
rpl_ignore_revoke : Result Difference Due To Change In .inc file
|
||||
rpl_free_items : Result Difference Due To Change In .inc file
|
||||
rpl_replicate_ignore_db : Result Difference Due To Change In .inc file
|
||||
rpl000017 : Result Difference Due To Change In .inc file
|
||||
rpl_skip_error : Result Difference Due To Change In .inc file
|
||||
|
||||
rpl_row_until : Test Present in rpl suite as well . Test Fails table with t2 table not found.
|
||||
rpl_loaddata_s : Test Present in rpl suite as well . Test Fails due to bin log truncation.
|
||||
rpl_log_pos : Test Present in rpl suite as well . Test Fails due to bin log truncation.
|
||||
rpl_row_NOW : Result Difference Due To Change In .inc file
|
||||
rpl_row_USER : Result Difference Due To Change In .inc file
|
||||
rpl_row_drop : Result Difference Due To Change In .inc file
|
||||
rpl_row_func001 : Result Difference Due To Change In .inc file
|
||||
rpl_row_max_relay_size : Result Difference Due To Change In .inc file
|
||||
rpl_row_reset_slave : Result Difference Due To Change In .inc file
|
||||
rpl_row_sp001 : Result Difference Due To Change In .inc file
|
||||
rpl_row_sp005 : Result Difference Due To Change In .inc file
|
||||
rpl_row_sp008 : Result Difference Due To Change In .inc file
|
||||
rpl_row_sp009 : Result Difference Due To Change In .inc file
|
||||
rpl_row_sp010 : Result Difference Due To Change In .inc file
|
||||
rpl_row_sp011 : Result Difference Due To Change In .inc file
|
||||
rpl_row_sp012 : Result Difference Due To Change In .inc file
|
||||
rpl_row_stop_middle : Result Difference Due To Change In .inc file
|
||||
rpl_row_trig001 : Result Difference Due To Change In .inc file
|
||||
rpl_row_trig002 : Result Difference Due To Change In .inc file
|
||||
rpl_row_trig003 : Result Difference Due To Change In .inc file
|
||||
rpl_row_view01 : Result Difference Due To Change In .inc file
|
||||
rpl_switch_stm_row_mixed : Result Difference Due To Change In .inc file
|
||||
rpl_relayspace : Result Difference Due To Change In .inc file
|
||||
rpl_row_inexist_tbl : Result Difference Due To Change In .inc file
|
||||
rpl_sp : Result Difference Due To Change In .inc file
|
||||
rpl_rbr_to_sbr : Result Difference Due To Change In .inc file
|
||||
rpl_row_until : Test Timesout
|
||||
|
||||
@@ -43,14 +43,13 @@ INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','abc');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('def','def','abc');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','def');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
|
||||
# Bug#52430 : Uncomment the following lines
|
||||
# when the bug is fixed
|
||||
#--error ER_DUP_ENTRY
|
||||
#INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
|
||||
#--error ER_DUP_ENTRY
|
||||
#INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
|
||||
#--error ER_DUP_ENTRY
|
||||
#INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
|
||||
# Bug#52430
|
||||
--error ER_DUP_ENTRY
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
|
||||
--error ER_DUP_ENTRY
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
|
||||
--error ER_DUP_ENTRY
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
|
||||
--sorted_result
|
||||
SELECT hex(c1),hex(c2),hex(c3) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -43,14 +43,13 @@ INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','abc');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('def','def','abc');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','def');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
|
||||
# Bug#52430 : Uncomment the following lines
|
||||
# when the bug is fixed
|
||||
#--error ER_DUP_ENTRY
|
||||
#INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
|
||||
#--error ER_DUP_ENTRY
|
||||
#INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
|
||||
#--error ER_DUP_ENTRY
|
||||
#INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
|
||||
# Bug#52430
|
||||
--error ER_DUP_ENTRY
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
|
||||
--error ER_DUP_ENTRY
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
|
||||
--error ER_DUP_ENTRY
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
|
||||
--sorted_result
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -43,14 +43,13 @@ INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','abc');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('def','def','abc');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','def');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
|
||||
# Bug#52430 : Uncomment the following lines
|
||||
# when the bug is fixed
|
||||
#--error ER_DUP_ENTRY
|
||||
#INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
|
||||
#--error ER_DUP_ENTRY
|
||||
#INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
|
||||
#--error ER_DUP_ENTRY
|
||||
#INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
|
||||
# Bug#52430
|
||||
--error ER_DUP_ENTRY
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
|
||||
--error ER_DUP_ENTRY
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
|
||||
--error ER_DUP_ENTRY
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
|
||||
--sorted_result
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -18,10 +18,9 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1(c1 BINARY(10) NOT NULL PRIMARY KEY);
|
||||
INSERT INTO t1 (c1) VALUES('abc');
|
||||
INSERT INTO t1 (c1) VALUES('def');
|
||||
# Bug#52430 : Uncomment the following lines
|
||||
# when the bug is fixed
|
||||
#--error ER_DUP_ENTRY
|
||||
#INSERT INTO t1 (c1) VALUES('abc');
|
||||
# Bug#52430
|
||||
--error ER_DUP_ENTRY
|
||||
INSERT INTO t1 (c1) VALUES('abc');
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(c1 VARBINARY(10) NOT NULL PRIMARY KEY);
|
||||
|
||||
@@ -18,10 +18,9 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1(c1 BINARY(10) NULL UNIQUE);
|
||||
INSERT INTO t1 (c1) VALUES('abc');
|
||||
INSERT INTO t1 (c1) VALUES('def');
|
||||
# Bug#52430 : Uncomment the following lines
|
||||
# when the bug is fixed
|
||||
#--error ER_DUP_ENTRY
|
||||
#INSERT INTO t1 (c1) VALUES('abc');
|
||||
# Bug#52430
|
||||
--error ER_DUP_ENTRY
|
||||
INSERT INTO t1 (c1) VALUES('abc');
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(c1 VARBINARY(10) NULL UNIQUE);
|
||||
|
||||
@@ -14,14 +14,22 @@ connection slave;
|
||||
sync_with_master;
|
||||
connection master;
|
||||
|
||||
--disable_query_log
|
||||
CALL mtr.add_suppression(" Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
--enable_query_log
|
||||
|
||||
create table t2(n int);
|
||||
create temporary table t1 (n int);
|
||||
insert into t1 values(1),(2),(3);
|
||||
--disable_warnings
|
||||
insert into t2 select * from t1;
|
||||
--enable_warnings
|
||||
connection master1;
|
||||
create temporary table t1 (n int);
|
||||
insert into t1 values (4),(5);
|
||||
--disable_warnings
|
||||
insert into t2 select * from t1 as t10;
|
||||
--enable_warnings
|
||||
save_master_pos;
|
||||
disconnect master;
|
||||
connection slave;
|
||||
|
||||
@@ -11,25 +11,31 @@ save_master_pos;
|
||||
connection slave;
|
||||
stop slave;
|
||||
reset slave;
|
||||
let $status_items= Master_Log_File, Read_Master_Log_Pos, Relay_Master_Log_File, Exec_Master_Log_Pos;
|
||||
source include/show_slave_status.inc;
|
||||
--vertical_results
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 5 # 8 # 9 # 23 # 33 #
|
||||
show slave status;
|
||||
|
||||
change master to master_host='127.0.0.1';
|
||||
# The following needs to be cleaned up when change master is fixed
|
||||
source include/show_slave_status.inc;
|
||||
|
||||
--vertical_results
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 5 # 8 # 9 # 23 # 33 #
|
||||
show slave status;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
eval change master to master_host='127.0.0.1',master_user='root',
|
||||
master_password='',master_port=$MASTER_MYPORT;
|
||||
source include/show_slave_status.inc;
|
||||
|
||||
--vertical_results
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 5 # 8 # 9 # 23 # 33 #
|
||||
show slave status;
|
||||
start slave;
|
||||
sync_with_master;
|
||||
let $status_items= Master_Log_File, Relay_Master_Log_File;
|
||||
source include/show_slave_status.inc;
|
||||
source include/check_slave_is_running.inc;
|
||||
|
||||
--vertical_results
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 5 # 8 # 9 # 23 # 33 #
|
||||
--replace_column 33 #
|
||||
show slave status;
|
||||
connection master;
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
|
||||
@@ -18,26 +18,13 @@ save_master_pos;
|
||||
connection slave;
|
||||
--real_sleep 3 # wait for I/O thread to have read updates
|
||||
stop slave;
|
||||
source include/wait_for_slave_to_stop.inc;
|
||||
|
||||
let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
|
||||
let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
|
||||
if (`SELECT $read_pos = $exec_pos`)
|
||||
{
|
||||
source include/show_rpl_debug_info.inc;
|
||||
echo 'Read_Master_Log_Pos: $read_pos' == 'Exec_Master_Log_Pos: $exec_pos';
|
||||
die Failed because Read_Master_Log_Pos is equal to Exec_Master_Log_Pos;
|
||||
}
|
||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
||||
--replace_column 1 # 7 # 8 # 9 # 23 # 33 #
|
||||
show slave status;
|
||||
change master to master_user='root';
|
||||
let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
|
||||
let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
|
||||
if (`SELECT $read_pos <> $exec_pos`)
|
||||
{
|
||||
source include/show_rpl_debug_info.inc;
|
||||
echo 'Read_Master_Log_Pos: $read_pos' <> 'Exec_Master_Log_Pos: $exec_pos';
|
||||
die Failed because Read_Master_Log_Pos is not equal to Exec_Master_Log_Pos;
|
||||
}
|
||||
|
||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
||||
--replace_column 1 # 7 # 8 # 9 # 23 # 33 #
|
||||
show slave status;
|
||||
start slave;
|
||||
sync_with_master;
|
||||
select * from t1;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
-- source include/master-slave.inc
|
||||
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT");
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
--enable_query_log
|
||||
|
||||
connection master;
|
||||
|
||||
@@ -41,7 +41,8 @@ sleep 5;
|
||||
#
|
||||
# Show status of slave
|
||||
#
|
||||
--let status_items= Relay_Log_File
|
||||
--source include/show_slave_status.inc
|
||||
--source include/check_slave_is_running.inc
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
|
||||
--vertical_results
|
||||
SHOW SLAVE STATUS;
|
||||
STOP SLAVE;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
source include/master-slave.inc;
|
||||
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT");
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
--enable_query_log
|
||||
|
||||
create table t1(n int);
|
||||
|
||||
@@ -20,7 +20,9 @@ save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
select count(*) from test.t1; # check that LOAD was replicated
|
||||
source include/show_binlog_events.inc;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 107; # should be nothing
|
||||
|
||||
# Cleanup
|
||||
connection master;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
-- source include/master-slave.inc
|
||||
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT");
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
--enable_query_log
|
||||
|
||||
# Begin clean up test section
|
||||
|
||||
@@ -11,41 +11,36 @@
|
||||
# Passes with rbr no problem, removed statement include [jbm]
|
||||
|
||||
source include/master-slave.inc;
|
||||
let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
--replace_column 3 <Binlog_Ignore_DB>
|
||||
show master status;
|
||||
sync_slave_with_master;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 23 # 33 #
|
||||
show slave status;
|
||||
stop slave;
|
||||
|
||||
--replace_result $master_log_pos MASTER_LOG_POS
|
||||
eval change master to master_log_pos=$master_log_pos;
|
||||
change master to master_log_pos=107;
|
||||
start slave;
|
||||
sleep 5;
|
||||
stop slave;
|
||||
|
||||
--replace_result $master_log_pos MASTER_LOG_POS
|
||||
eval change master to master_log_pos=$master_log_pos;
|
||||
--let $slave_param= Read_Master_Log_Pos
|
||||
--let $slave_param_value= $master_log_pos
|
||||
--source include/wait_for_slave_param.inc
|
||||
|
||||
change master to master_log_pos=107;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 23 # 33 #
|
||||
show slave status;
|
||||
start slave;
|
||||
sleep 5;
|
||||
--let $slave_param= Read_Master_Log_Pos
|
||||
--let $slave_param_value= $master_log_pos
|
||||
--source include/wait_for_slave_param.inc
|
||||
--source include/check_slave_no_error.inc
|
||||
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 23 # 33 #
|
||||
show slave status;
|
||||
stop slave;
|
||||
--echo # impossible position leads to an error
|
||||
--replace_result 177 MASTER_LOG_POS
|
||||
change master to master_log_pos=177;
|
||||
change master to master_log_pos=178;
|
||||
start slave;
|
||||
sleep 2;
|
||||
let $slave_io_errno= 1236;
|
||||
let $show_slave_io_error= 1;
|
||||
source include/wait_for_slave_io_error.inc;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 23 # 33 #
|
||||
show slave status;
|
||||
connection master;
|
||||
|
||||
let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
--replace_column 3 <Binlog_Ignore_DB>
|
||||
show master status;
|
||||
create table if not exists t1 (n int);
|
||||
drop table if exists t1;
|
||||
create table t1 (n int);
|
||||
@@ -53,9 +48,7 @@ insert into t1 values (1),(2),(3);
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
stop slave;
|
||||
|
||||
--replace_result $master_log_pos MASTER_LOG_POS
|
||||
eval change master to master_log_pos=$master_log_pos;
|
||||
change master to master_log_pos=207;
|
||||
start slave;
|
||||
sync_with_master;
|
||||
select * from t1 ORDER BY n;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
source include/master-slave.inc;
|
||||
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT");
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
--enable_query_log
|
||||
|
||||
create table t1(id int, i int, r1 int, r2 int, p varchar(100));
|
||||
|
||||
@@ -9,17 +9,25 @@
|
||||
CREATE TABLE t1 (a INT, b LONG);
|
||||
INSERT INTO t1 VALUES (1,1), (2,2);
|
||||
INSERT INTO t1 VALUES (3,UUID()), (4,UUID());
|
||||
let $VERSION=`select version()`;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
# Different number of binlog events are generated by different engines
|
||||
--disable_result_log
|
||||
source include/show_binlog_events.inc;
|
||||
SHOW BINLOG EVENTS;
|
||||
--enable_result_log
|
||||
sync_slave_with_master;
|
||||
--echo **** On Slave ****
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 #
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
# Different number of binlog events are generated by different engines
|
||||
--disable_result_log
|
||||
source include/show_binlog_events.inc;
|
||||
SHOW BINLOG EVENTS;
|
||||
--enable_result_log
|
||||
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql
|
||||
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql
|
||||
|
||||
@@ -30,7 +30,10 @@ connection master;
|
||||
--echo **** On Master ****
|
||||
# Should drop the non-temporary table t1 and the temporary table t2
|
||||
DROP TABLE t1,t2;
|
||||
source include/show_binlog_events.inc;
|
||||
let $VERSION=`select version()`;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
SHOW BINLOG EVENTS;
|
||||
SHOW TABLES;
|
||||
sync_slave_with_master;
|
||||
--echo **** On Slave ****
|
||||
|
||||
@@ -22,11 +22,13 @@ connection master;
|
||||
insert into t1 values (1);
|
||||
|
||||
connection slave;
|
||||
# slave should have stopped because can't find table t1
|
||||
# slave should have stopped because can't find table t1
|
||||
wait_for_slave_to_stop;
|
||||
# see if we have a good error message:
|
||||
--let $slave_sql_errno= 1146
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error.inc
|
||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
||||
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 #
|
||||
--vertical_results
|
||||
show slave status;
|
||||
|
||||
# cleanup
|
||||
connection master;
|
||||
|
||||
@@ -18,50 +18,44 @@ connection master;
|
||||
# create some events on master
|
||||
create table t1(n int not null auto_increment primary key);
|
||||
insert into t1 values (1),(2),(3),(4);
|
||||
let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
drop table t1;
|
||||
|
||||
create table t2(n int not null auto_increment primary key);
|
||||
insert into t2 values (1),(2);
|
||||
let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
insert into t2 values (3),(4);
|
||||
drop table t2;
|
||||
|
||||
# try to replicate all queries until drop of t1
|
||||
connection slave;
|
||||
--replace_result $master_log_pos_1 MASTER_LOG_POS
|
||||
eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_log_pos_1;
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=311;
|
||||
sleep 2;
|
||||
wait_for_slave_to_stop;
|
||||
# here table should be still not deleted
|
||||
select * from t1;
|
||||
--let $slave_param= Exec_Master_Log_Pos
|
||||
--let $slave_param_value= $master_log_pos_1
|
||||
--source include/check_slave_param.inc
|
||||
--vertical_results
|
||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
||||
--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
|
||||
show slave status;
|
||||
|
||||
# this should fail right after start
|
||||
--replace_result 291 MASTER_LOG_POS
|
||||
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
|
||||
# again this table should be still not deleted
|
||||
select * from t1;
|
||||
sleep 2;
|
||||
wait_for_slave_to_stop;
|
||||
--let $slave_param= Exec_Master_Log_Pos
|
||||
--let $slave_param_value= $master_log_pos_1
|
||||
--source include/check_slave_param.inc
|
||||
--vertical_results
|
||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
||||
--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
|
||||
show slave status;
|
||||
|
||||
# try replicate all up to and not including the second insert to t2;
|
||||
let $master_log_pos= $master_log_pos_2;
|
||||
let $relay_log_file= slave-relay-bin.000004;
|
||||
--source include/get_relay_log_pos.inc
|
||||
--replace_result $relay_log_pos RELAY_LOG_POS
|
||||
eval start slave until relay_log_file='$relay_log_file', relay_log_pos=$relay_log_pos;
|
||||
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
|
||||
sleep 2;
|
||||
wait_for_slave_to_stop;
|
||||
select * from t2;
|
||||
--let $slave_param= Exec_Master_Log_Pos
|
||||
--let $slave_param_value= $master_log_pos
|
||||
--source include/check_slave_param.inc
|
||||
--vertical_results
|
||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
||||
--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
|
||||
show slave status;
|
||||
|
||||
# clean up
|
||||
start slave;
|
||||
@@ -71,32 +65,27 @@ connection slave;
|
||||
sync_with_master;
|
||||
stop slave;
|
||||
|
||||
--let $exec_log_pos_1= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1)
|
||||
# this should stop immediately as we are already there
|
||||
--replace_result $master_log_pos_2 MASTER_LOG_POS
|
||||
eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_log_pos_2;
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=740;
|
||||
sleep 2;
|
||||
wait_for_slave_to_stop;
|
||||
# here the sql slave thread should be stopped
|
||||
--let $slave_param= Exec_Master_Log_Pos
|
||||
--let $slave_param_value= $exec_log_pos_1
|
||||
--source include/check_slave_param.inc
|
||||
--vertical_results
|
||||
--replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
|
||||
--replace_column 1 # 7 # 9 # 22 # 23 # 33 #
|
||||
show slave status;
|
||||
|
||||
#testing various error conditions
|
||||
--replace_result 561 MASTER_LOG_POS
|
||||
--error 1277
|
||||
start slave until master_log_file='master-bin', master_log_pos=561;
|
||||
--replace_result 561 MASTER_LOG_POS 12 RELAY_LOG_POS
|
||||
--error 1277
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
|
||||
--error 1277
|
||||
start slave until master_log_file='master-bin.000001';
|
||||
--error 1277
|
||||
start slave until relay_log_file='slave-relay-bin.000002';
|
||||
--replace_result 561 MASTER_LOG_POS
|
||||
--error 1277
|
||||
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
|
||||
# Warning should be given for second command
|
||||
start slave sql_thread;
|
||||
--replace_result 740 MASTER_LOG_POS
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=740;
|
||||
|
||||
@@ -12,13 +12,10 @@ reset master;
|
||||
stop slave;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval change master to master_port=$SLAVE_MYPORT;
|
||||
source include/check_slave_no_error.inc;
|
||||
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
--replace_column 16 # 18 #
|
||||
show slave status;
|
||||
start slave;
|
||||
let $slave_io_errno= 1593;
|
||||
let $show_slave_io_error= 1;
|
||||
source include/wait_for_slave_io_error.inc;
|
||||
|
||||
insert into t1 values (1);
|
||||
# can't MASTER_POS_WAIT(), it does not work in this weird setup
|
||||
# (when slave is its own master without --replicate-same-server-id)
|
||||
|
||||
@@ -9,6 +9,9 @@ reset master;
|
||||
stop slave;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval change master to master_port=$SLAVE_MYPORT;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
--replace_column 18 #
|
||||
show slave status;
|
||||
start slave;
|
||||
insert into t1 values (1);
|
||||
save_master_pos;
|
||||
|
||||
@@ -22,7 +22,9 @@ drop table if exists t1;
|
||||
--enable_warnings
|
||||
create table t1 (n int);
|
||||
insert into t1 values (1);
|
||||
sync_slave_with_master;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
select * from t1;
|
||||
|
||||
# 3. Delete new replication user
|
||||
@@ -38,8 +40,12 @@ stop slave;
|
||||
start slave;
|
||||
|
||||
# 5. Make sure Slave_IO_Running = No
|
||||
let $slave_io_errno= 1045;
|
||||
source include/wait_for_slave_io_error.inc;
|
||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
||||
# Column 1 is replaced, since the output can be either
|
||||
# "Connecting to master" or "Waiting for master update"
|
||||
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 35 # 36 #
|
||||
--vertical_results
|
||||
show slave status;
|
||||
|
||||
# Cleanup (Note that slave IO thread is not running)
|
||||
connection slave;
|
||||
|
||||
@@ -510,7 +510,9 @@ INSERT INTO t12 VALUES(UUID());
|
||||
UNLOCK TABLES;
|
||||
|
||||
--disable_result_log
|
||||
source include/show_binlog_events.inc;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events;
|
||||
--enable_result_log
|
||||
sync_slave_with_master;
|
||||
|
||||
@@ -527,7 +529,9 @@ diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_
|
||||
|
||||
connection master;
|
||||
--disable_result_log
|
||||
source include/show_binlog_events.inc;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events;
|
||||
--enable_result_log
|
||||
|
||||
# Now test that mysqlbinlog works fine on a binlog generated by the
|
||||
|
||||
@@ -4,18 +4,26 @@
|
||||
-- source include/have_binlog_format_mixed_or_statement.inc
|
||||
-- source include/master-slave.inc
|
||||
|
||||
--disable_query_log
|
||||
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
--enable_query_log
|
||||
|
||||
|
||||
create table t2 (n int, PRIMARY KEY(n));
|
||||
create temporary table t1 (n int);
|
||||
create temporary table t3 (n int not null);
|
||||
|
||||
insert into t1 values(1),(2),(3),(100),(25),(26),(200),(300);
|
||||
--disable_warnings
|
||||
insert into t2 select * from t1;
|
||||
--enable_warnings
|
||||
alter table t3 add primary key(n);
|
||||
|
||||
flush logs;
|
||||
insert into t3 values (1010);
|
||||
--disable_warnings
|
||||
insert into t2 select * from t3;
|
||||
--enable_warnings
|
||||
|
||||
drop table if exists t3;
|
||||
insert into t2 values (1012);
|
||||
@@ -23,7 +31,9 @@ insert into t2 values (1012);
|
||||
connection master1;
|
||||
create temporary table t1 (n int);
|
||||
insert into t1 values (4),(5);
|
||||
--disable_warnings
|
||||
insert into t2 select * from t1;
|
||||
--enable_warnings
|
||||
|
||||
save_master_pos;
|
||||
disconnect master;
|
||||
|
||||
@@ -18,6 +18,10 @@ sync_with_master;
|
||||
reset master;
|
||||
connection master;
|
||||
|
||||
--disable_query_log
|
||||
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
--enable_query_log
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
|
||||
#added on 2007/5/18
|
||||
@@ -62,7 +66,9 @@ insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
||||
|
||||
connection con1;
|
||||
create temporary table t3(f int);
|
||||
--disable_warnings
|
||||
insert into t3 select * from t1 where f<6;
|
||||
--enable_warnings
|
||||
sleep 1;
|
||||
|
||||
connection con2;
|
||||
@@ -70,11 +76,15 @@ create temporary table t3(f int);
|
||||
sleep 1;
|
||||
|
||||
connection con1;
|
||||
--disable_warnings
|
||||
insert into t2 select count(*) from t3;
|
||||
--enable_warnings
|
||||
sleep 1;
|
||||
|
||||
connection con2;
|
||||
--disable_warnings
|
||||
insert into t3 select * from t1 where f>=4;
|
||||
--enable_warnings
|
||||
sleep 1;
|
||||
|
||||
connection con1;
|
||||
@@ -82,7 +92,9 @@ drop temporary table t3;
|
||||
sleep 1;
|
||||
|
||||
connection con2;
|
||||
--disable_warnings
|
||||
insert into t2 select count(*) from t3;
|
||||
--enable_warnings
|
||||
drop temporary table t3;
|
||||
|
||||
select * from t2 ORDER BY f;
|
||||
@@ -107,22 +119,30 @@ SET @@session.pseudo_thread_id=1;
|
||||
create temporary table t3(f int);
|
||||
SET TIMESTAMP=1040323952;
|
||||
SET @@session.pseudo_thread_id=1;
|
||||
--disable_warnings
|
||||
insert into t3 select * from t1 where f<6;
|
||||
--enable_warnings
|
||||
SET TIMESTAMP=1040324145;
|
||||
SET @@session.pseudo_thread_id=2;
|
||||
create temporary table t3(f int);
|
||||
SET TIMESTAMP=1040324186;
|
||||
SET @@session.pseudo_thread_id=1;
|
||||
--disable_warnings
|
||||
insert into t2 select count(*) from t3;
|
||||
--enable_warnings
|
||||
SET TIMESTAMP=1040324200;
|
||||
SET @@session.pseudo_thread_id=2;
|
||||
--disable_warnings
|
||||
insert into t3 select * from t1 where f>=4;
|
||||
--enable_warnings
|
||||
SET TIMESTAMP=1040324211;
|
||||
SET @@session.pseudo_thread_id=1;
|
||||
drop temporary table t3;
|
||||
SET TIMESTAMP=1040324219;
|
||||
SET @@session.pseudo_thread_id=2;
|
||||
--disable_warnings
|
||||
insert into t2 select count(*) from t3;
|
||||
--enable_warnings
|
||||
SET TIMESTAMP=1040324224;
|
||||
SET @@session.pseudo_thread_id=2;
|
||||
drop temporary table t3;
|
||||
@@ -149,7 +169,9 @@ create table t5 (f int);
|
||||
# find dumper's $id
|
||||
select id from information_schema.processlist where command='Binlog Dump' into @id;
|
||||
kill @id; # to stimulate reconnection by slave w/o timeout
|
||||
--disable_warnings
|
||||
insert into t5 select * from t4;
|
||||
--enable_warnings
|
||||
save_master_pos;
|
||||
|
||||
connection slave;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
--source include/master-slave.inc
|
||||
|
||||
disable_query_log;
|
||||
call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT");
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
enable_query_log;
|
||||
|
||||
--disable_warnings
|
||||
|
||||
@@ -791,6 +791,9 @@ Warning 1292 Truncated incorrect datetime value: '2009-01-10 23:60:59'
|
||||
SELECT count(*) FROM t1 WHERE c2='2001-01-11 23:59:60' /* returns 0 */;
|
||||
count(*)
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '2001-01-11 23:59:60' for column 'c2' at row 1
|
||||
Warning 1292 Incorrect datetime value: '2001-01-11 23:59:60' for column 'c2' at row 1
|
||||
SELECT * FROM t1 WHERE c1='0000-00-00 00:00:00' OR c2='0000-00-00 00:00:00';
|
||||
c1 c2 c3
|
||||
0000-00-00 00:00:00 0000-00-00 00:00:00 6
|
||||
|
||||
@@ -63,7 +63,7 @@ c1 c2 c3
|
||||
4294967295 2147483647 9
|
||||
UPDATE t1 SET c2=-2147483649 WHERE c1=109 ORDER BY c1;
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 13
|
||||
SELECT c1,c2 FROM t1 WHERE c1=109;
|
||||
c1 c2
|
||||
109 -2147483648
|
||||
@@ -1158,7 +1158,7 @@ c1 c2 c3
|
||||
255 127 9
|
||||
UPDATE t1 SET c2=-129 WHERE c1=109 ORDER BY c1;
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 13
|
||||
SELECT c1,c2 FROM t1 WHERE c1=109;
|
||||
c1 c2
|
||||
109 -128
|
||||
@@ -1929,7 +1929,7 @@ c1 c2 c3
|
||||
65535 32767 9
|
||||
UPDATE t1 SET c2=-32769 WHERE c1=109 ORDER BY c1;
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 13
|
||||
SELECT c1,c2 FROM t1 WHERE c1=109;
|
||||
c1 c2
|
||||
109 -32768
|
||||
@@ -2676,7 +2676,7 @@ c1 c2 c3
|
||||
16777215 8388607 9
|
||||
UPDATE t1 SET c2=-8388609 WHERE c1=109 ORDER BY c1;
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 13
|
||||
SELECT c1,c2 FROM t1 WHERE c1=109;
|
||||
c1 c2
|
||||
109 -8388608
|
||||
@@ -3423,7 +3423,7 @@ c1 c2 c3
|
||||
18446744073709551615 9223372036854775807 9
|
||||
UPDATE t1 SET c2=-9223372036854775809 WHERE c1=109 ORDER BY c1;
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 13
|
||||
SELECT c1,c2 FROM t1 WHERE c1=109;
|
||||
c1 c2
|
||||
109 -9223372036854775808
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
insert_calendar : Bug#52283 Innodb reports extra warnings when SELECT/WHERE is performed using invalid value
|
||||
update_delete_calendar : Bug#52824 + Bug#52283(in case of Innodb)
|
||||
|
||||
|
||||
@@ -7812,9 +7812,6 @@ SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
||||
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
||||
|
||||
## ref type access
|
||||
|
||||
# Bug#52283 : Remove the following --disable_warnings
|
||||
# command when the bug is fixed
|
||||
--disable_warnings
|
||||
SELECT * FROM t2 WHERE c1 = 18446744073709551616 ORDER BY c1,c6;
|
||||
SELECT * FROM t2 WHERE c1 = 18446744073709551616 ORDER BY c1,c6 LIMIT 2;
|
||||
|
||||
@@ -300,12 +300,7 @@ INSERT INTO t1 VALUES('2001-01-09','2001-01-10',6),('2001-01-11','2001-01-12',7)
|
||||
UPDATE t1 SET c1='2001-01-09 24:59:59',c2='2009-01-10 23:60:59' WHERE c1='2001-01-09';
|
||||
UPDATE t1 SET c2='2001-01-11 23:59:60' WHERE c1='2001-01-11';
|
||||
SELECT count(*) FROM t1 WHERE c1='2001-01-09 24:59:59' AND c2='2009-01-10 23:60:59';
|
||||
|
||||
# Bug#52283 : Remove the following --disable_warnings
|
||||
# command when the bug is fixed
|
||||
--disable_warnings
|
||||
SELECT count(*) FROM t1 WHERE c2='2001-01-11 23:59:60' /* returns 0 */;
|
||||
--enable_warnings
|
||||
--sorted_result
|
||||
SELECT * FROM t1 WHERE c1='0000-00-00 00:00:00' OR c2='0000-00-00 00:00:00';
|
||||
|
||||
|
||||
26
mysql-test/suite/innodb/r/innodb-autoinc-18274.result
Normal file
26
mysql-test/suite/innodb/r/innodb-autoinc-18274.result
Normal file
@@ -0,0 +1,26 @@
|
||||
drop table if exists t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (null);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
|
||||
DELETE FROM t1;
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 VALUES(null);
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
2
|
||||
DROP TABLE t1;
|
||||
@@ -13,13 +13,14 @@ set global innodb_lock_wait_timeout=347;
|
||||
select @@innodb_lock_wait_timeout;
|
||||
@@innodb_lock_wait_timeout
|
||||
42
|
||||
set innodb_lock_wait_timeout=1;
|
||||
set innodb_lock_wait_timeout=10;
|
||||
select @@innodb_lock_wait_timeout;
|
||||
@@innodb_lock_wait_timeout
|
||||
1
|
||||
10
|
||||
select @@innodb_lock_wait_timeout;
|
||||
@@innodb_lock_wait_timeout
|
||||
347
|
||||
SET @connection_b_id = <connection_b_id>;
|
||||
create table t1(a int primary key)engine=innodb;
|
||||
begin;
|
||||
insert into t1 values(1),(2),(3);
|
||||
@@ -31,8 +32,9 @@ a
|
||||
3
|
||||
begin;
|
||||
insert into t1 values(4);
|
||||
set innodb_lock_wait_timeout=3;
|
||||
select * from t1 for update;
|
||||
commit;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
drop table t1;
|
||||
set global innodb_lock_wait_timeout=50;
|
||||
set global innodb_lock_wait_timeout=<initial_timeout>;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
drop table if exists t1,t2,t3,t4;
|
||||
drop database if exists mysqltest;
|
||||
CREATE TABLE bug58912 (a BLOB, b TEXT, PRIMARY KEY(a(1))) ENGINE=InnoDB;
|
||||
INSERT INTO bug58912 VALUES(REPEAT('a',8000),REPEAT('b',8000));
|
||||
UPDATE bug58912 SET a=REPEAT('a',7999);
|
||||
create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
|
||||
insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt');
|
||||
select id, code, name from t1 order by id;
|
||||
@@ -1670,10 +1673,10 @@ variable_value - @innodb_rows_deleted_orig
|
||||
71
|
||||
SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
|
||||
variable_value - @innodb_rows_inserted_orig
|
||||
1065
|
||||
1066
|
||||
SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
|
||||
variable_value - @innodb_rows_updated_orig
|
||||
865
|
||||
866
|
||||
SELECT variable_value - @innodb_row_lock_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits';
|
||||
variable_value - @innodb_row_lock_waits_orig
|
||||
0
|
||||
@@ -3173,3 +3176,4 @@ Variable_name Value
|
||||
Handler_update 1
|
||||
Variable_name Value
|
||||
Handler_delete 1
|
||||
DROP TABLE bug58912;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
CREATE TABLE product (category INT NOT NULL, id INT NOT NULL,
|
||||
CREATE TABLE product (category INT NOT NULL, id INT NOT NULL,
|
||||
price DECIMAL, PRIMARY KEY(category, id)) ENGINE=INNODB;
|
||||
CREATE TABLE customer (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
|
||||
CREATE TABLE product_order (no INT NOT NULL AUTO_INCREMENT,
|
||||
product_category INT NOT NULL,
|
||||
product_id INT NOT NULL,
|
||||
customer_id INT NOT NULL,
|
||||
PRIMARY KEY(no),
|
||||
INDEX (product_category, product_id),
|
||||
FOREIGN KEY (product_category, product_id)
|
||||
REFERENCES product(category, id) ON UPDATE CASCADE ON DELETE RESTRICT,
|
||||
INDEX (customer_id),
|
||||
FOREIGN KEY (customer_id)
|
||||
CREATE TABLE product_order (no INT NOT NULL AUTO_INCREMENT,
|
||||
product_category INT NOT NULL,
|
||||
product_id INT NOT NULL,
|
||||
customer_id INT NOT NULL,
|
||||
PRIMARY KEY(no),
|
||||
INDEX (product_category, product_id),
|
||||
FOREIGN KEY (product_category, product_id)
|
||||
REFERENCES product(category, id) ON UPDATE CASCADE ON DELETE RESTRICT,
|
||||
INDEX (customer_id),
|
||||
FOREIGN KEY (customer_id)
|
||||
REFERENCES customer(id)
|
||||
) ENGINE=INNODB;
|
||||
SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS;
|
||||
|
||||
26
mysql-test/suite/innodb/t/innodb-autoinc-18274.test
Normal file
26
mysql-test/suite/innodb/t/innodb-autoinc-18274.test
Normal file
@@ -0,0 +1,26 @@
|
||||
-- source include/have_innodb.inc
|
||||
# embedded server ignores 'delayed', so skip this
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Bug #18274 InnoDB auto_increment field reset on OPTIMIZE TABLE
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (null);
|
||||
SHOW CREATE TABLE t1;
|
||||
DELETE FROM t1;
|
||||
OPTIMIZE TABLE t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
INSERT INTO t1 VALUES(null);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# restore environment to the state it was before this test execution
|
||||
#
|
||||
|
||||
-- disable_query_log
|
||||
@@ -1,6 +1,6 @@
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
let $timeout=`select @@innodb_lock_wait_timeout`;
|
||||
let $initial_timeout=`select @@innodb_lock_wait_timeout`;
|
||||
set global innodb_lock_wait_timeout=42;
|
||||
|
||||
connect (a,localhost,root,,);
|
||||
@@ -12,19 +12,24 @@ set innodb_lock_wait_timeout=1;
|
||||
select @@innodb_lock_wait_timeout;
|
||||
|
||||
connection b;
|
||||
let $connection_b_id=`SELECT CONNECTION_ID()`;
|
||||
select @@innodb_lock_wait_timeout;
|
||||
set global innodb_lock_wait_timeout=347;
|
||||
select @@innodb_lock_wait_timeout;
|
||||
set innodb_lock_wait_timeout=1;
|
||||
set innodb_lock_wait_timeout=10;
|
||||
select @@innodb_lock_wait_timeout;
|
||||
|
||||
connect (c,localhost,root,,);
|
||||
connection c;
|
||||
|
||||
select @@innodb_lock_wait_timeout;
|
||||
connection default;
|
||||
|
||||
disconnect c;
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
connection a;
|
||||
--replace_result $connection_b_id <connection_b_id>
|
||||
eval SET @connection_b_id = $connection_b_id;
|
||||
create table t1(a int primary key)engine=innodb;
|
||||
begin;
|
||||
insert into t1 values(1),(2),(3);
|
||||
@@ -33,7 +38,37 @@ connection b;
|
||||
--send
|
||||
select * from t1 for update;
|
||||
|
||||
# Observation on information_schema.processlist (2010-12 mysql-5.5)
|
||||
# -----------------------------------------------------------------
|
||||
# As soon as the server started the execution of the
|
||||
# connection a: --send select ... for update
|
||||
# High parallel load could delay this up to two seconds.
|
||||
# and before either
|
||||
# - the innodb_lock_wait_timeout was exceeded
|
||||
# -> connection b reap gets ER_LOCK_WAIT_TIMEOUT
|
||||
# or
|
||||
# - connection a commits, the lock disappears and the statement
|
||||
# of connection b finishes
|
||||
# -> connection b reap gets success + result set
|
||||
# we see within information_schema.processlist for connection b a row
|
||||
# command state info
|
||||
# Query Sending data select * from t1 for update
|
||||
# The highest time value seen was @@innodb_lock_wait_timeout + 1.
|
||||
# Please note that there is unfortunately nothing which says
|
||||
# that we are just waiting for a lock.
|
||||
|
||||
connection a;
|
||||
# In order to ensure that the execution of
|
||||
# connection b: select * from t1 for update
|
||||
# has really started and is most probably waiting for the lock now we poll on
|
||||
# information_schema.processlist.
|
||||
# Also our current session innodb_lock_wait_timeout of 10 seconds should big
|
||||
# enough to prevent that connection b ends up with getting ER_LOCK_WAIT_TIMEOUT.
|
||||
#
|
||||
let $wait_timeout= 10;
|
||||
let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist
|
||||
WHERE id = @connection_b_id AND INFO = 'select * from t1 for update';
|
||||
--source include/wait_condition.inc
|
||||
commit;
|
||||
|
||||
connection b;
|
||||
@@ -44,21 +79,39 @@ begin;
|
||||
insert into t1 values(4);
|
||||
|
||||
connection b;
|
||||
set innodb_lock_wait_timeout=3;
|
||||
# 3 seconds should be big enough that the wait routine of connection a will
|
||||
# hit the time span where our next statement is visible within the
|
||||
# information_schema.processlist.
|
||||
--send
|
||||
select * from t1 for update;
|
||||
|
||||
connection a;
|
||||
sleep 2;
|
||||
# Wait till the execution of the connection b statement was started.
|
||||
let $wait_timeout= 10;
|
||||
let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist
|
||||
WHERE id = @connection_b_id AND INFO = 'select * from t1 for update';
|
||||
--source include/wait_condition.inc
|
||||
# Wait till the execution of the connection b statement has ended.
|
||||
let $wait_timeout= 10;
|
||||
let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist
|
||||
WHERE id = @connection_b_id AND INFO IS NULL;
|
||||
--source include/wait_condition.inc
|
||||
# Give "commit" though this must be too late for the statement of connection b.
|
||||
commit;
|
||||
|
||||
connection b;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
reap;
|
||||
drop table t1;
|
||||
|
||||
disconnect b;
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
connection a;
|
||||
disconnect a;
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
connection default;
|
||||
|
||||
disconnect a;
|
||||
disconnect b;
|
||||
|
||||
eval set global innodb_lock_wait_timeout=$timeout;
|
||||
drop table t1;
|
||||
--replace_result $initial_timeout <initial_timeout>
|
||||
eval set global innodb_lock_wait_timeout=$initial_timeout;
|
||||
|
||||
@@ -49,6 +49,15 @@ drop table if exists t1,t2,t3,t4;
|
||||
drop database if exists mysqltest;
|
||||
--enable_warnings
|
||||
|
||||
# Bug#58912 InnoDB unnecessarily avoids update-in-place on column prefixes
|
||||
CREATE TABLE bug58912 (a BLOB, b TEXT, PRIMARY KEY(a(1))) ENGINE=InnoDB;
|
||||
INSERT INTO bug58912 VALUES(REPEAT('a',8000),REPEAT('b',8000));
|
||||
UPDATE bug58912 SET a=REPEAT('a',7999);
|
||||
# The above statements used to trigger a failure during purge when
|
||||
# Bug#55284 was fixed while Bug#58912 was not. Defer the DROP TABLE,
|
||||
# so that purge gets a chance to run (and a double free of the
|
||||
# off-page column can be detected, if one is to occur.)
|
||||
|
||||
#
|
||||
# Small basic test with ignore
|
||||
#
|
||||
@@ -2548,6 +2557,9 @@ SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig;
|
||||
|
||||
-- enable_query_log
|
||||
|
||||
# Clean up after the Bug#55284/Bug#58912 test case.
|
||||
DROP TABLE bug58912;
|
||||
|
||||
#######################################################################
|
||||
# #
|
||||
# Please, DO NOT TOUCH this file as well as the innodb.result file. #
|
||||
|
||||
@@ -12,6 +12,7 @@ create table C(id int not null auto_increment primary key, f1 int not null, fore
|
||||
insert into A values(1), (2);
|
||||
|
||||
--disable_query_log
|
||||
begin;
|
||||
let $i=257;
|
||||
while ($i)
|
||||
{
|
||||
@@ -24,6 +25,7 @@ while ($i)
|
||||
insert into C(f1) values(2);
|
||||
dec $i;
|
||||
}
|
||||
commit;
|
||||
--enable_query_log
|
||||
|
||||
# Following Deletes should not report error
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
#
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
CREATE TABLE product (category INT NOT NULL, id INT NOT NULL,
|
||||
CREATE TABLE product (category INT NOT NULL, id INT NOT NULL,
|
||||
price DECIMAL, PRIMARY KEY(category, id)) ENGINE=INNODB;
|
||||
CREATE TABLE customer (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
|
||||
CREATE TABLE product_order (no INT NOT NULL AUTO_INCREMENT,
|
||||
product_category INT NOT NULL,
|
||||
product_id INT NOT NULL,
|
||||
customer_id INT NOT NULL,
|
||||
PRIMARY KEY(no),
|
||||
INDEX (product_category, product_id),
|
||||
FOREIGN KEY (product_category, product_id)
|
||||
REFERENCES product(category, id) ON UPDATE CASCADE ON DELETE RESTRICT,
|
||||
INDEX (customer_id),
|
||||
FOREIGN KEY (customer_id)
|
||||
CREATE TABLE product_order (no INT NOT NULL AUTO_INCREMENT,
|
||||
product_category INT NOT NULL,
|
||||
product_id INT NOT NULL,
|
||||
customer_id INT NOT NULL,
|
||||
PRIMARY KEY(no),
|
||||
INDEX (product_category, product_id),
|
||||
FOREIGN KEY (product_category, product_id)
|
||||
REFERENCES product(category, id) ON UPDATE CASCADE ON DELETE RESTRICT,
|
||||
INDEX (customer_id),
|
||||
FOREIGN KEY (customer_id)
|
||||
REFERENCES customer(id)
|
||||
) ENGINE=INNODB;
|
||||
|
||||
|
||||
@@ -88,8 +88,9 @@ let $val2 = '2006-01-17';
|
||||
let $val3 = '2006-02-25';
|
||||
let $val4 = '2006-02-05';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
let $coltype = char(30);
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# Disabled after fixing bug#54483.
|
||||
#let $coltype = char(30);
|
||||
#--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = extract(month from col1);
|
||||
let $valsqlfunc = extract(year from '1998-11-23');
|
||||
@@ -139,8 +140,9 @@ let $val2 = '14:30:20';
|
||||
let $val3 = '21:59:22';
|
||||
let $val4 = '10:22:33';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
let $coltype = char(30);
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# second(non_time_col) is disabled after bug#54483.
|
||||
#let $coltype = char(30);
|
||||
#--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = month(col1);
|
||||
let $valsqlfunc = month('2006-10-14');
|
||||
@@ -172,26 +174,28 @@ let $val3 = '21:59:22';
|
||||
let $val4 = '10:33:11';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = to_days(col1)-to_days('2006-01-01');
|
||||
let $valsqlfunc = to_days('2006-02-02')-to_days('2006-01-01');
|
||||
let $coltype = date;
|
||||
let $infile = part_supported_sql_funcs_int_date.inc;
|
||||
let $val1 = '2006-02-03';
|
||||
let $val2 = '2006-01-17';
|
||||
let $val3 = '2006-01-25';
|
||||
let $val4 = '2006-02-06';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# to_days(non_date_col) is disabled after bug#54483.
|
||||
#let $sqlfunc = to_days(col1)-to_days('2006-01-01');
|
||||
#let $valsqlfunc = to_days('2006-02-02')-to_days('2006-01-01');
|
||||
#let $coltype = date;
|
||||
#let $infile = part_supported_sql_funcs_int_date.inc;
|
||||
#let $val1 = '2006-02-03';
|
||||
#let $val2 = '2006-01-17';
|
||||
#let $val3 = '2006-01-25';
|
||||
#let $val4 = '2006-02-06';
|
||||
#--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
|
||||
# to_days(non_date_col) is disabled after bug#54483.
|
||||
# DATEDIFF() is implemented as (TO_DAYS(d1) - TO_DAYS(d2))
|
||||
let $sqlfunc = datediff(col1, '2006-01-01');
|
||||
let $valsqlfunc = datediff('2006-02-02', '2006-01-01');
|
||||
let $coltype = date;
|
||||
let $infile = part_supported_sql_funcs_int_date.inc;
|
||||
let $val1 = '2006-02-03';
|
||||
let $val2 = '2006-01-17';
|
||||
let $val3 = '2006-01-25';
|
||||
let $val4 = '2006-02-06';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
#let $sqlfunc = datediff(col1, '2006-01-01');
|
||||
#let $valsqlfunc = datediff('2006-02-02', '2006-01-01');
|
||||
#let $coltype = date;
|
||||
#let $infile = part_supported_sql_funcs_int_date.inc;
|
||||
#let $val1 = '2006-02-03';
|
||||
#let $val2 = '2006-01-17';
|
||||
#let $val3 = '2006-01-25';
|
||||
#let $val4 = '2006-02-06';
|
||||
#--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = weekday(col1);
|
||||
let $valsqlfunc = weekday('2006-10-14');
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -134,7 +134,7 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1
|
||||
(a INT NULL AUTO_INCREMENT,
|
||||
@@ -440,7 +440,7 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (c1)
|
||||
PARTITIONS 2 */
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -10,8 +10,8 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
||||
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
@@ -19,8 +19,13 @@ RESET MASTER;
|
||||
|
||||
select count(*) > 0 from performance_schema.setup_instruments;
|
||||
|
||||
# Note:
|
||||
# Do not include records that could depend on
|
||||
# compiling options (storage engines, SSL),
|
||||
# to ensure the expected output in the binlog is predictable.
|
||||
update performance_schema.setup_instruments set enabled='NO'
|
||||
where name like "wait/synch/rwlock/%";
|
||||
where name like "wait/synch/rwlock/sql/%"
|
||||
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
|
||||
|
||||
select count(*) > 0 from performance_schema.events_waits_current;
|
||||
|
||||
@@ -37,13 +42,15 @@ insert into test.t1
|
||||
|
||||
insert into test.t2
|
||||
select name from performance_schema.setup_instruments
|
||||
where name like "wait/synch/rwlock/%";
|
||||
where name like "wait/synch/rwlock/sql/%"
|
||||
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
|
||||
|
||||
drop table test.t1;
|
||||
drop table test.t2;
|
||||
|
||||
update performance_schema.setup_instruments set enabled='YES'
|
||||
where name like "wait/synch/rwlock/%";
|
||||
where name like "wait/synch/rwlock/sql/%"
|
||||
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
|
||||
|
||||
--source include/show_binlog_events.inc
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ select count(*) > 0 from performance_schema.setup_instruments;
|
||||
count(*) > 0
|
||||
1
|
||||
update performance_schema.setup_instruments set enabled='NO'
|
||||
where name like "wait/synch/rwlock/%";
|
||||
where name like "wait/synch/rwlock/sql/%"
|
||||
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
|
||||
select count(*) > 0 from performance_schema.events_waits_current;
|
||||
count(*) > 0
|
||||
1
|
||||
@@ -16,16 +17,17 @@ insert into test.t1
|
||||
select thread_id from performance_schema.events_waits_current;
|
||||
insert into test.t2
|
||||
select name from performance_schema.setup_instruments
|
||||
where name like "wait/synch/rwlock/%";
|
||||
where name like "wait/synch/rwlock/sql/%"
|
||||
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
|
||||
drop table test.t1;
|
||||
drop table test.t2;
|
||||
update performance_schema.setup_instruments set enabled='YES'
|
||||
where name like "wait/synch/rwlock/%";
|
||||
where name like "wait/synch/rwlock/sql/%"
|
||||
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (performance_schema.setup_instruments)
|
||||
master-bin.000001 # Update_rows # # table_id: #
|
||||
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
|
||||
@@ -44,6 +46,5 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (performance_schema.setup_instruments)
|
||||
master-bin.000001 # Update_rows # # table_id: #
|
||||
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
|
||||
@@ -4,7 +4,8 @@ select count(*) > 0 from performance_schema.setup_instruments;
|
||||
count(*) > 0
|
||||
1
|
||||
update performance_schema.setup_instruments set enabled='NO'
|
||||
where name like "wait/synch/rwlock/%";
|
||||
where name like "wait/synch/rwlock/sql/%"
|
||||
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
|
||||
select count(*) > 0 from performance_schema.events_waits_current;
|
||||
count(*) > 0
|
||||
1
|
||||
@@ -16,16 +17,17 @@ insert into test.t1
|
||||
select thread_id from performance_schema.events_waits_current;
|
||||
insert into test.t2
|
||||
select name from performance_schema.setup_instruments
|
||||
where name like "wait/synch/rwlock/%";
|
||||
where name like "wait/synch/rwlock/sql/%"
|
||||
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
|
||||
drop table test.t1;
|
||||
drop table test.t2;
|
||||
update performance_schema.setup_instruments set enabled='YES'
|
||||
where name like "wait/synch/rwlock/%";
|
||||
where name like "wait/synch/rwlock/sql/%"
|
||||
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (performance_schema.setup_instruments)
|
||||
master-bin.000001 # Update_rows # # table_id: #
|
||||
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
|
||||
@@ -44,6 +46,5 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (performance_schema.setup_instruments)
|
||||
master-bin.000001 # Update_rows # # table_id: #
|
||||
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
|
||||
@@ -5,7 +5,8 @@ select count(*) > 0 from performance_schema.setup_instruments;
|
||||
count(*) > 0
|
||||
1
|
||||
update performance_schema.setup_instruments set enabled='NO'
|
||||
where name like "wait/synch/rwlock/%";
|
||||
where name like "wait/synch/rwlock/sql/%"
|
||||
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
|
||||
select count(*) > 0 from performance_schema.events_waits_current;
|
||||
@@ -21,20 +22,23 @@ Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
|
||||
insert into test.t2
|
||||
select name from performance_schema.setup_instruments
|
||||
where name like "wait/synch/rwlock/%";
|
||||
where name like "wait/synch/rwlock/sql/%"
|
||||
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
|
||||
drop table test.t1;
|
||||
drop table test.t2;
|
||||
update performance_schema.setup_instruments set enabled='YES'
|
||||
where name like "wait/synch/rwlock/%";
|
||||
where name like "wait/synch/rwlock/sql/%"
|
||||
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; update performance_schema.setup_instruments set enabled='NO'
|
||||
where name like "wait/synch/rwlock/%"
|
||||
where name like "wait/synch/rwlock/sql/%"
|
||||
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock")
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by server */
|
||||
@@ -47,11 +51,13 @@ master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; insert into test.t2
|
||||
select name from performance_schema.setup_instruments
|
||||
where name like "wait/synch/rwlock/%"
|
||||
where name like "wait/synch/rwlock/sql/%"
|
||||
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock")
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; update performance_schema.setup_instruments set enabled='YES'
|
||||
where name like "wait/synch/rwlock/%"
|
||||
where name like "wait/synch/rwlock/sql/%"
|
||||
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock")
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -10,8 +10,8 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
||||
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
# See Bug#46896 binlog: case sensitivity of table names
|
||||
--source include/have_lowercase0.inc
|
||||
|
||||
set binlog_format=mixed;
|
||||
|
||||
--source ../include/binlog_common.inc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -10,8 +10,8 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
||||
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
# See Bug#46896 binlog: case sensitivity of table names
|
||||
--source include/have_lowercase0.inc
|
||||
|
||||
set binlog_format=row;
|
||||
|
||||
--source ../include/binlog_common.inc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -10,8 +10,8 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
||||
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
|
||||
@@ -15,3 +15,4 @@ rpl_read_only : WL#4284: Setting Read only won't succeed until all m
|
||||
rpl_row_create_table : Bug#51574 2010-02-27 andrei failed different way than earlier with bug#45576
|
||||
rpl_spec_variables : BUG#47661 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux
|
||||
rpl_log_pos : BUG#55675 2010-09-10 alfranio rpl.rpl_log_pos fails sporadically with error binlog truncated in the middle
|
||||
rpl_get_master_version_and_clock : Bug#59178 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock
|
||||
|
||||
@@ -363,3 +363,20 @@ SET @@SESSION.AUTO_INCREMENT_OFFSET=default;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug#50619 assert in handler::update_auto_increment
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (pk INT AUTO_INCREMENT, PRIMARY KEY (pk));
|
||||
# This triggered the assert
|
||||
INSERT INTO t1 VALUES (NULL), (-1), (NULL);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# Check that that true overflow still gives error
|
||||
CREATE TABLE t1 (pk BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY (pk));
|
||||
--error ER_AUTOINC_READ_FAILED
|
||||
INSERT INTO t1 VALUES (NULL), (18446744073709551615-1), (NULL);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -104,6 +104,47 @@ SELECT ((@id := id) - id) FROM t2;
|
||||
KILL @id;
|
||||
SET DEBUG_SYNC= "now SIGNAL killed";
|
||||
DROP TABLE t1, t2;
|
||||
disconnect con1;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
SET DEBUG_SYNC= "RESET";
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#58933 Assertion `thd- >is_error()' fails on shutdown with ongoing
|
||||
--echo # OPTIMIZE TABLE
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
|
||||
--echo # Connection con1
|
||||
connect (con1,localhost,root);
|
||||
let $ID= `SELECT connection_id()`;
|
||||
SET DEBUG_SYNC= 'ha_admin_open_ltable SIGNAL waiting WAIT_FOR killed';
|
||||
--echo # Sending:
|
||||
--send OPTIMIZE TABLE t1
|
||||
|
||||
--echo # Connection default
|
||||
connection default;
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR waiting';
|
||||
--replace_result $ID ID
|
||||
eval KILL QUERY $ID;
|
||||
SET DEBUG_SYNC= 'now SIGNAL killed';
|
||||
|
||||
--echo # Connection con1
|
||||
connection con1;
|
||||
--echo # Reaping: OPTIMIZE TABLE t1
|
||||
--reap
|
||||
|
||||
--echo # Connection default
|
||||
connection default;
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
disconnect con1;
|
||||
|
||||
|
||||
# Check that all connections opened by test cases in this file are really
|
||||
|
||||
@@ -53,4 +53,56 @@ eval SELECT * FROM XY.T_$tcs LIMIT 1;
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
DROP DATABASE XY;
|
||||
USE TEST;
|
||||
|
||||
--echo #
|
||||
--echo # Bug55222 Mysqldump table names case bug in REFERENCES clause
|
||||
--echo # InnoDB did not handle lower_case_table_names=2 for
|
||||
--echo # foreign_table_names and referenced_table_names.
|
||||
--echo #
|
||||
|
||||
SHOW VARIABLES LIKE 'lower_case_table_names';
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS `Table2`;
|
||||
DROP TABLE IF EXISTS `Table1`;
|
||||
--disable_warnings
|
||||
|
||||
CREATE TABLE `Table1`(c1 INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE TABLE `Table2`(c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB;
|
||||
ALTER TABLE `Table2` ADD CONSTRAINT fk1 FOREIGN KEY(c2) REFERENCES `Table1`(c1);
|
||||
query_vertical SHOW CREATE TABLE `Table2`;
|
||||
query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS;
|
||||
DROP TABLE `Table2`;
|
||||
DROP TABLE `Table1`;
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS Product_Order;
|
||||
DROP TABLE IF EXISTS Product;
|
||||
DROP TABLE IF EXISTS Customer;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE Product (Category INT NOT NULL, Id INT NOT NULL,
|
||||
Price DECIMAL, PRIMARY KEY(Category, Id)) ENGINE=InnoDB;
|
||||
CREATE TABLE Customer (Id INT NOT NULL, PRIMARY KEY (Id)) ENGINE=InnoDB;
|
||||
CREATE TABLE Product_Order (No INT NOT NULL AUTO_INCREMENT,
|
||||
Product_Category INT NOT NULL,
|
||||
Product_Id INT NOT NULL,
|
||||
Customer_Id INT NOT NULL,
|
||||
PRIMARY KEY(No),
|
||||
INDEX (Product_Category, Product_Id),
|
||||
FOREIGN KEY (Product_Category, Product_Id)
|
||||
REFERENCES Product(Category, Id) ON UPDATE CASCADE ON DELETE RESTRICT,
|
||||
INDEX (Customer_Id),
|
||||
FOREIGN KEY (Customer_Id)
|
||||
REFERENCES Customer(Id)
|
||||
) ENGINE=INNODB;
|
||||
|
||||
query_vertical SHOW CREATE TABLE Product_Order;
|
||||
query_vertical SHOW CREATE TABLE Product;
|
||||
query_vertical SHOW CREATE TABLE Customer;
|
||||
query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS;
|
||||
DROP TABLE Product_Order;
|
||||
DROP TABLE Product;
|
||||
DROP TABLE Customer;
|
||||
|
||||
|
||||
@@ -4,31 +4,7 @@
|
||||
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
# The following fails sporadically because 'check-testcase' runs
|
||||
# queries before this test and there is no way to guarantee that any
|
||||
# previous process finishes. The purpose of the test is not clearly
|
||||
# stated, there is no reference to any bug report, and "select from
|
||||
# I_S from prepared statement" doesn't look like something that's
|
||||
# really imporant to test. I'm commenting out this for now. If
|
||||
# anyone wants to keep this, please fix the race and motivate why we
|
||||
# need to test this. If you see this comment and it is after mid-2009
|
||||
# or so, feel free to remove this test from the file. /Sven
|
||||
#
|
||||
#
|
||||
## Show full process list with prepare
|
||||
## To not show other connections, this must be the first test and we must
|
||||
## have a server restart before this one
|
||||
##
|
||||
## We don't have any 4.1 tests as we use I_S to query the PROCESSLIST to
|
||||
## exclude system threads that may/may not be active in the server
|
||||
## (namely the ndb injector thread)
|
||||
##
|
||||
## End of 4.1 tests
|
||||
#
|
||||
#prepare stmt1 from ' SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!=\'Daemon\' ';
|
||||
#--replace_column 1 number 6 time 3 localhost
|
||||
#execute stmt1;
|
||||
#deallocate prepare stmt1;
|
||||
# End of 4.1 tests
|
||||
|
||||
call mtr.add_suppression("Can't open and lock privilege tables: Table 'host' was not locked with LOCK TABLES");
|
||||
|
||||
@@ -46,14 +22,14 @@ SHOW VARIABLES like 'slave_skip_errors';
|
||||
--echo # FLUSH PRIVILEGES should not implicitly unlock locked tables.
|
||||
--echo #
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
create table t1 (c1 int);
|
||||
lock tables t1 read;
|
||||
CREATE TABLE t1 (c1 INT);
|
||||
LOCK TABLES t1 READ;
|
||||
--error ER_TABLE_NOT_LOCKED
|
||||
flush privileges;
|
||||
unlock tables;
|
||||
drop table t1;
|
||||
FLUSH PRIVILEGES;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#54812: assert in Diagnostics_area::set_ok_status during EXPLAIN
|
||||
@@ -83,8 +59,18 @@ connect (con1,localhost,nopriv_user,,);
|
||||
connection con1;
|
||||
--echo connection: con1
|
||||
|
||||
let outfile=$MYSQLTEST_VARDIR/tmp/mytest;
|
||||
--error 0,1
|
||||
--remove_file $outfile
|
||||
--replace_result $outfile <outfile>
|
||||
--error ER_PROCACCESS_DENIED_ERROR
|
||||
SELECT MAX(key1) FROM t1 WHERE f() < 1 INTO OUTFILE 'mytest';
|
||||
eval SELECT MAX(key1) FROM t1 WHERE f() < 1 INTO OUTFILE '$outfile';
|
||||
# A removal of the outfile is necessary, at least today (2010-12-07), because
|
||||
# the outfile is created even if the SELECT statement fails.
|
||||
# If the server is improved in the future this may not happen.
|
||||
# ==> Do not fail if the outfile does not exist.
|
||||
--error 0,1
|
||||
--remove_file $outfile
|
||||
|
||||
--error ER_PROCACCESS_DENIED_ERROR
|
||||
INSERT INTO t2 SELECT MAX(key1) FROM t1 WHERE f() < 1;
|
||||
|
||||
@@ -1898,15 +1898,16 @@ while ($cnt)
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG#32272: partition crash 1: enum column
|
||||
# BUG#32772: partition crash 1: enum column
|
||||
#
|
||||
# Note that month(int_col) is disallowed after bug#54483.
|
||||
create table t1 (
|
||||
c0 int,
|
||||
c1 bigint,
|
||||
c2 set('sweet'),
|
||||
key (c2,c1,c0),
|
||||
key(c0)
|
||||
) engine=myisam partition by hash (month(c0)) partitions 5;
|
||||
) engine=myisam partition by hash (c0) partitions 5;
|
||||
|
||||
--disable_warnings
|
||||
insert ignore into t1 set c0 = -6502262, c1 = 3992917, c2 = 35019;
|
||||
|
||||
@@ -10,6 +10,667 @@ drop table if exists t1, t2;
|
||||
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#54483: valgrind errors when making warnings for multiline inserts
|
||||
--echo # into partition
|
||||
--echo #
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARBINARY(10))
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a CHAR(10))
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIMESTAMP)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
INSERT INTO t1 VALUES ('test'),('a'),('5');
|
||||
SHOW WARNINGS;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
INSERT INTO t1 VALUES ('test'),('a'),('5');
|
||||
SHOW WARNINGS;
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
SHOW WARNINGS;
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
|
||||
--echo # TO_SECONDS() is added in 5.5.
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (TO_SECONDS(a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (TO_SECONDS(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (TO_SECONDS(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TO_SECONDS(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TO_SECONDS(a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TO_DAYS(FROM_DAYS(a)));
|
||||
--error ER_PARTITION_FUNC_NOT_ALLOWED_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TO_DAYS(FROM_DAYS(a)));
|
||||
--error ER_PARTITION_FUNC_NOT_ALLOWED_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
--echo # Bug#57071
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1
|
||||
(`date` date,
|
||||
`extracted_week` int,
|
||||
`yearweek` int,
|
||||
`week` int,
|
||||
`default_week_format` int)
|
||||
PARTITION BY LIST (EXTRACT(WEEK FROM date) % 3)
|
||||
(PARTITION p0 VALUES IN (0),
|
||||
PARTITION p1 VALUES IN (1),
|
||||
PARTITION p2 VALUES IN (2));
|
||||
CREATE TABLE t1
|
||||
(`date` date,
|
||||
`extracted_week` int,
|
||||
`yearweek` int,
|
||||
`week` int,
|
||||
`default_week_format` int);
|
||||
SET @old_default_week_format := @@default_week_format;
|
||||
SET default_week_format = 0;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 1;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 2;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 3;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 4;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 5;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 6;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 7;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SELECT * FROM t1;
|
||||
SET default_week_format = @old_default_week_format;
|
||||
DROP TABLE t1;
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
|
||||
--echo # EXTRACT(WEEK...) is disallowed, see bug#57071.
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME, b DATE)
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
CREATE TABLE t1 (a DATE, b DATETIME)
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME, b DATE)
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE, b VARCHAR(10))
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT, b DATETIME)
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#50036: Inconsistent errors when using TIMESTAMP
|
||||
--echo # columns/expressions
|
||||
|
||||
@@ -30,8 +30,8 @@ DROP TABLE t1;
|
||||
#
|
||||
#BUG#49591, Add proper version number to SHOW CREATE TABLE
|
||||
#
|
||||
create table t1 (a int)
|
||||
partition by range (a)
|
||||
create table t1 (a DATETIME)
|
||||
partition by range (TO_DAYS(a))
|
||||
subpartition by hash(to_seconds(a))
|
||||
(partition p0 values less than (1));
|
||||
show create table t1;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user