mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
merge of 5.1-main into mysql-trunk.
Changes to ha_innodb.cc are not propagated to plugin, they will come back via Oracle/Innobase if needed.
This commit is contained in:
@@ -258,3 +258,15 @@ dec $it;
|
||||
}
|
||||
show master status /* must show new binlog index after rotating */;
|
||||
drop table t3;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #45998: database crashes when running "create as select"
|
||||
--echo #
|
||||
CREATE DATABASE test1;
|
||||
USE test1;
|
||||
DROP DATABASE test1;
|
||||
CREATE TABLE test.t1(a int);
|
||||
INSERT INTO test.t1 VALUES (1), (2);
|
||||
CREATE TABLE test.t2 SELECT * FROM test.t1;
|
||||
USE test;
|
||||
DROP TABLES t1, t2;
|
||||
|
@@ -0,0 +1,63 @@
|
||||
#
|
||||
# BUG#45214
|
||||
# The common part of the "rpl_get_master_version_and_clock" test.
|
||||
# Restart slave under network disconnection between slave and master
|
||||
# following the steps:
|
||||
# 1 - Got DBUG_SYNC_POINT lock
|
||||
# 2 - Set DBUG_SYNC_POINT before call mysql_real_query(...) function in get_master_version_and_clock(...) function and hang here
|
||||
# 3 - shutdown master server for simulating network disconnection
|
||||
# 4 - Release DBUG_SYNC_POINT lock
|
||||
# 5 - Check if the slave I/O thread tries to reconnect to master.
|
||||
#
|
||||
# Note: Please make sure initialize the $debug_lock when call the test script.
|
||||
#
|
||||
connection slave;
|
||||
if (`SELECT '$debug_lock' = ''`)
|
||||
{
|
||||
--die Cannot continue. Please set value for $debug_lock.
|
||||
}
|
||||
|
||||
# Restart slave
|
||||
--disable_warnings
|
||||
stop slave;
|
||||
source include/wait_for_slave_to_stop.inc;
|
||||
start slave;
|
||||
source include/wait_for_slave_to_start.inc;
|
||||
connection master;
|
||||
# Write file to make mysql-test-run.pl expect the "crash", but don't start
|
||||
# it until it's told to
|
||||
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
wait
|
||||
EOF
|
||||
|
||||
# Send shutdown to the connected server and give
|
||||
# it 10 seconds to die before zapping it
|
||||
shutdown_server 10;
|
||||
|
||||
connection slave;
|
||||
eval SELECT RELEASE_LOCK($debug_lock);
|
||||
|
||||
# Show slave last IO errno
|
||||
connection slave;
|
||||
source include/wait_for_slave_io_error.inc;
|
||||
let $last_io_errno= query_get_value("show slave status", Last_IO_Errno, 1);
|
||||
echo Slave_IO_Errno= $last_io_errno;
|
||||
|
||||
# Write file to make mysql-test-run.pl start up the server again
|
||||
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
restart
|
||||
EOF
|
||||
|
||||
connection master;
|
||||
# Turn on reconnect
|
||||
--enable_reconnect
|
||||
|
||||
# Call script that will poll the server waiting for it to be back online again
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
# Turn off reconnect again
|
||||
--disable_reconnect
|
||||
|
||||
connection slave;
|
||||
source include/wait_for_slave_to_start.inc;
|
||||
|
29
mysql-test/r/bug40113.result
Normal file
29
mysql-test/r/bug40113.result
Normal file
@@ -0,0 +1,29 @@
|
||||
#
|
||||
# Bug #40113: Embedded SELECT inside UPDATE or DELETE can timeout
|
||||
# without error
|
||||
#
|
||||
CREATE TABLE t1 (a int, b int, PRIMARY KEY (a,b)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 (a,b) VALUES (1070109,99);
|
||||
CREATE TABLE t2 (b int, a int, PRIMARY KEY (b)) ENGINE=InnoDB;
|
||||
INSERT INTO t2 (b,a) VALUES (7,1070109);
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
1070109 99
|
||||
BEGIN;
|
||||
SELECT b FROM t2 WHERE b=7 FOR UPDATE;
|
||||
b
|
||||
7
|
||||
BEGIN;
|
||||
SELECT b FROM t2 WHERE b=7 FOR UPDATE;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
INSERT INTO t1 (a) VALUES ((SELECT a FROM t2 WHERE b=7));
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
UPDATE t1 SET a='7000000' WHERE a=(SELECT a FROM t2 WHERE b=7);
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
DELETE FROM t1 WHERE a=(SELECT a FROM t2 WHERE b=7);
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
1070109 99
|
||||
DROP TABLE t2, t1;
|
||||
End of 5.0 tests
|
@@ -1894,4 +1894,18 @@ DROP TABLE t1;
|
||||
create table `me:i`(id int);
|
||||
drop table `me:i`;
|
||||
|
||||
# --
|
||||
# -- Bug#45829: CREATE TABLE TRANSACTIONAL PAGE_CHECKSUM ROW_FORMAT=PAGE accepted, does nothing
|
||||
# --
|
||||
|
||||
drop table if exists t1,t2,t3;
|
||||
create table t1 (a int) transactional=0;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'transactional=0' at line 1
|
||||
create table t2 (a int) page_checksum=1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'page_checksum=1' at line 1
|
||||
create table t3 (a int) row_format=page;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'page' at line 1
|
||||
|
||||
# -- End of Bug#45829
|
||||
|
||||
End of 5.1 tests
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -165,7 +165,7 @@ CREATE TABLE `good
|
||||
ERROR HY000: Invalid utf8 character string: '<27><><EFBFBD><EFBFBD><EFBFBD>'
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE `good<6F><64><EFBFBD><EFBFBD><EFBFBD>` (a int);
|
||||
ERROR HY000: Invalid utf8 character string: '<27><><EFBFBD><EFBFBD><EFBFBD>` (a int)'
|
||||
ERROR HY000: Invalid utf8 character string: '<27><><EFBFBD><EFBFBD><EFBFBD>'
|
||||
set names latin1;
|
||||
create table t1 (a char(10) character set koi8r, b text character set koi8r);
|
||||
insert into t1 values ('test','test');
|
||||
|
@@ -543,3 +543,11 @@ awrd bwrd cwrd
|
||||
awrd bwrd cwrd
|
||||
awrd bwrd cwrd
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (col text, FULLTEXT KEY full_text (col));
|
||||
PREPARE s FROM
|
||||
"SELECT MATCH (col) AGAINST('findme') FROM t1 ORDER BY MATCH (col) AGAINST('findme')"
|
||||
;
|
||||
EXECUTE s;
|
||||
MATCH (col) AGAINST('findme')
|
||||
DEALLOCATE PREPARE s;
|
||||
DROP TABLE t1;
|
||||
|
@@ -833,3 +833,16 @@ Table Op Msg_type Msg_text
|
||||
test.t2 check status OK
|
||||
drop table t1,t2;
|
||||
##################################################################
|
||||
#
|
||||
# Bug #46075: Assertion failed: 0, file .\protocol.cc, line 416
|
||||
#
|
||||
CREATE TABLE t1(a INT);
|
||||
SET max_heap_table_size = 16384;
|
||||
SET @old_myisam_data_pointer_size = @@myisam_data_pointer_size;
|
||||
SET GLOBAL myisam_data_pointer_size = 2;
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
|
||||
INSERT IGNORE INTO t1 SELECT t1.a FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6,t1 t7;
|
||||
Got one of the listed errors
|
||||
SET GLOBAL myisam_data_pointer_size = @old_myisam_data_pointer_size;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
|
@@ -2115,6 +2115,52 @@ insert into m1 (col1) values (1);
|
||||
insert into m1 (col1) values (1);
|
||||
ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
|
||||
drop table m1, t1;
|
||||
#
|
||||
# Bug#45800 crash when replacing into a merge table and there is a duplicate
|
||||
#
|
||||
# Replace duplicate value in child table when merge table doesn't have key
|
||||
CREATE TABLE t1 (c1 INT PRIMARY KEY) ENGINE=MyISAM;
|
||||
CREATE TABLE m1 (c1 INT NOT NULL) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||
INSERT INTO m1 VALUES (666);
|
||||
SELECT * FROM m1;
|
||||
c1
|
||||
666
|
||||
# insert the duplicate value into the merge table
|
||||
REPLACE INTO m1 VALUES (666);
|
||||
SELECT * FROM m1;
|
||||
c1
|
||||
666
|
||||
DROP TABLE m1, t1;
|
||||
# Insert... on duplicate key update (with duplicate values in the table)
|
||||
CREATE TABLE t1 (c1 INT PRIMARY KEY) ENGINE=MyISAM;
|
||||
CREATE TABLE m1 (c1 INT NOT NULL) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||
INSERT INTO m1 VALUES (666);
|
||||
SELECT * FROM m1;
|
||||
c1
|
||||
666
|
||||
# insert the duplicate value into the merge table
|
||||
INSERT INTO m1 VALUES (666) ON DUPLICATE KEY UPDATE c1=c1+1;
|
||||
SELECT * FROM m1;
|
||||
c1
|
||||
667
|
||||
DROP TABLE m1, t1;
|
||||
# Insert duplicate value on MERGE table, where, MERGE has a key but MyISAM has more keys
|
||||
CREATE TABLE t1 (c1 INT, c2 INT, UNIQUE (c1), UNIQUE (c2));
|
||||
CREATE TABLE m1 (c1 INT, c2 INT, UNIQUE (c1)) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||
INSERT INTO m1 VALUES (1,2);
|
||||
# insert the duplicate value into the merge table
|
||||
INSERT INTO m1 VALUES (3,2);
|
||||
ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
|
||||
DROP TABLE m1,t1;
|
||||
# Try to define MERGE and MyISAM with keys on different columns
|
||||
CREATE TABLE t1 (c1 INT, c2 INT, UNIQUE (c1));
|
||||
CREATE TABLE m1 (c1 INT, c2 INT, UNIQUE (c2)) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||
# Try accessing the merge table for inserts (error occurs)
|
||||
INSERT INTO m1 VALUES (1,2);
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
INSERT INTO m1 VALUES (1,4);
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
DROP TABLE m1,t1;
|
||||
CREATE TABLE t1 (
|
||||
col1 INT(10)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
@@ -2141,4 +2187,24 @@ SELECT * FROM m1;
|
||||
c1
|
||||
DROP TABLE m1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug45781 infinite hang/crash in "opening tables" after handler tries to
|
||||
# open merge table
|
||||
#
|
||||
DROP TABLE IF EXISTS m1,t1;
|
||||
CREATE TABLE t1(a int)engine=myisam;
|
||||
CREATE TABLE t2(a int)engine=myisam;
|
||||
CREATE TABLE t3(a int)engine=myisam;
|
||||
CREATE TABLE t4(a int)engine=myisam;
|
||||
CREATE TABLE t5(a int)engine=myisam;
|
||||
CREATE TABLE t6(a int)engine=myisam;
|
||||
CREATE TABLE t7(a int)engine=myisam;
|
||||
CREATE TABLE m1(a int)engine=merge union=(t1,t2,t3,t4,t5,t6,t7);
|
||||
SELECT 1 FROM m1;
|
||||
1
|
||||
HANDLER m1 OPEN;
|
||||
ERROR HY000: Table storage engine for 'm1' doesn't have this option
|
||||
DROP TABLE m1,t1,t2,t3,t4,t5,t6,t7;
|
||||
SELECT 1 FROM m1;
|
||||
ERROR 42S02: Table 'test.m1' doesn't exist
|
||||
End of 5.1 tests
|
||||
|
@@ -64,28 +64,28 @@ drop table t1;
|
||||
+----------------------+------------+--------+
|
||||
| concat('>',col1,'<') | col2 | col3 |
|
||||
+----------------------+------------+--------+
|
||||
| >a < | b | 123421 |
|
||||
| >a < | 0123456789 | 4 |
|
||||
| >abcd< | | 4 |
|
||||
| >a < | b | 123421 |
|
||||
| >a < | 0123456789 | 4 |
|
||||
| >abcd< | | 4 |
|
||||
+----------------------+------------+--------+
|
||||
+-------------------+
|
||||
| __tañgè Ñãmé |
|
||||
+-------------------+
|
||||
| John Doe |
|
||||
| John Doe |
|
||||
+-------------------+
|
||||
+-------------------+
|
||||
| John Doe |
|
||||
+-------------------+
|
||||
| __tañgè Ñãmé |
|
||||
| __tañgè Ñãmé |
|
||||
+-------------------+
|
||||
+------+------+---------------------------+
|
||||
| i | j | k |
|
||||
+------+------+---------------------------+
|
||||
| 1 | NULL | NULL |
|
||||
| NULL | NULL | <-----------------------> |
|
||||
| NULL | NULL | <----- |
|
||||
| NULL | NULL | Τη γλώσσα |
|
||||
| NULL | NULL | ᛖᚴ ᚷᛖᛏ |
|
||||
| 1 | NULL | NULL |
|
||||
| NULL | NULL | <-----------------------> |
|
||||
| NULL | NULL | <----- |
|
||||
| NULL | NULL | Τη γλώσσα |
|
||||
| NULL | NULL | ᛖᚴ ᚷᛖᛏ |
|
||||
+------+------+---------------------------+
|
||||
i j k
|
||||
NULL 1 NULL
|
||||
@@ -96,14 +96,14 @@ k int(11) YES NULL
|
||||
+------+---+------+
|
||||
| i | j | k |
|
||||
+------+---+------+
|
||||
| NULL | 1 | NULL |
|
||||
| NULL | 1 | NULL |
|
||||
+------+---+------+
|
||||
+-------+---------+------+-----+---------+-------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+-------+---------+------+-----+---------+-------+
|
||||
| i | int(11) | YES | | NULL | |
|
||||
| j | int(11) | NO | | NULL | |
|
||||
| k | int(11) | YES | | NULL | |
|
||||
| i | int(11) | YES | | NULL | |
|
||||
| j | int(11) | NO | | NULL | |
|
||||
| k | int(11) | YES | | NULL | |
|
||||
+-------+---------+------+-----+---------+-------+
|
||||
i s1
|
||||
1 x
|
||||
@@ -112,16 +112,16 @@ i s1
|
||||
+------+------+
|
||||
| i | s1 |
|
||||
+------+------+
|
||||
| 1 | x |
|
||||
| 2 | NULL |
|
||||
| 3 | |
|
||||
| 1 | x |
|
||||
| 2 | NULL |
|
||||
| 3 | |
|
||||
+------+------+
|
||||
unhex('zz')
|
||||
NULL
|
||||
+-------------+
|
||||
| unhex('zz') |
|
||||
+-------------+
|
||||
| NULL |
|
||||
| NULL |
|
||||
+-------------+
|
||||
create table t1(a int, b varchar(255), c int);
|
||||
Field Type Null Key Default Extra
|
||||
@@ -207,5 +207,27 @@ Warning (Code 1286): Unknown table engine 'nonexistent2'
|
||||
Warning (Code 1266): Using storage engine MyISAM for table 't2'
|
||||
Error (Code 1050): Table 't2' already exists
|
||||
drop tables t1, t2;
|
||||
<TABLE BORDER=1><TR><TH><</TH></TR><TR><TD>< & ></TD></TR></TABLE>
|
||||
<TABLE BORDER=1><TR><TH><</TH></TR><TR><TD>< & ></TD></TR></TABLE>create table t1 (a char(5));
|
||||
insert into t1 values ('\0b\0');
|
||||
a
|
||||
\0b\0
|
||||
a
|
||||
\0b\0
|
||||
+------+
|
||||
| a |
|
||||
+------+
|
||||
| b |
|
||||
+------+
|
||||
*************************** 1. row ***************************
|
||||
a: b
|
||||
<TABLE BORDER=1><TR><TH>a</TH></TR><TR><TD> b </TD></TR></TABLE><?xml version="1.0"?>
|
||||
|
||||
<resultset statement="select a from t1
|
||||
" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<row>
|
||||
<field name="a"> b </field>
|
||||
</row>
|
||||
</resultset>
|
||||
drop table t1;
|
||||
|
||||
End of tests
|
||||
|
@@ -186,4 +186,18 @@ a
|
||||
500
|
||||
DROP DATABASE `a@b`;
|
||||
USE test;
|
||||
#
|
||||
# Bug #31821: --all-in-1 and --fix-table-names don't work together
|
||||
#
|
||||
drop table if exists `#mysql50#t1-1`;
|
||||
create table `#mysql50#t1-1` (a int);
|
||||
show tables like 't1-1';
|
||||
Tables_in_test (t1-1)
|
||||
t1-1
|
||||
drop table `t1-1`;
|
||||
create table `#mysql50#t1-1` (a int);
|
||||
show tables like 't1-1';
|
||||
Tables_in_test (t1-1)
|
||||
t1-1
|
||||
drop table `t1-1`;
|
||||
End of 5.1 tests
|
||||
|
@@ -1991,7 +1991,7 @@ SET character_set_client = utf8;
|
||||
`a` varchar(30)
|
||||
) ENGINE=MyISAM */;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
/*!50001 DROP TABLE `v2`*/;
|
||||
/*!50001 DROP TABLE IF EXISTS `v2`*/;
|
||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
@@ -2085,7 +2085,7 @@ SET character_set_client = utf8;
|
||||
`a` int(11)
|
||||
) ENGINE=MyISAM */;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
/*!50001 DROP TABLE `v1`*/;
|
||||
/*!50001 DROP TABLE IF EXISTS `v1`*/;
|
||||
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
@@ -2159,7 +2159,7 @@ SET character_set_client = utf8;
|
||||
`a` varchar(30)
|
||||
) ENGINE=MyISAM */;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
/*!50001 DROP TABLE `v2`*/;
|
||||
/*!50001 DROP TABLE IF EXISTS `v2`*/;
|
||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
@@ -2293,7 +2293,7 @@ SET character_set_client = utf8;
|
||||
`c` varchar(30)
|
||||
) ENGINE=MyISAM */;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
/*!50001 DROP TABLE `v1`*/;
|
||||
/*!50001 DROP TABLE IF EXISTS `v1`*/;
|
||||
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
@@ -2307,7 +2307,7 @@ SET character_set_client = @saved_cs_client;
|
||||
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||
/*!50001 DROP TABLE `v2`*/;
|
||||
/*!50001 DROP TABLE IF EXISTS `v2`*/;
|
||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
@@ -2321,7 +2321,7 @@ SET character_set_client = @saved_cs_client;
|
||||
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||
/*!50001 DROP TABLE `v3`*/;
|
||||
/*!50001 DROP TABLE IF EXISTS `v3`*/;
|
||||
/*!50001 DROP VIEW IF EXISTS `v3`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
@@ -3054,7 +3054,7 @@ SET character_set_client = utf8;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
|
||||
USE `test`;
|
||||
/*!50001 DROP TABLE `v0`*/;
|
||||
/*!50001 DROP TABLE IF EXISTS `v0`*/;
|
||||
/*!50001 DROP VIEW IF EXISTS `v0`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
@@ -3068,7 +3068,7 @@ USE `test`;
|
||||
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||
/*!50001 DROP TABLE `v1`*/;
|
||||
/*!50001 DROP TABLE IF EXISTS `v1`*/;
|
||||
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
@@ -3082,7 +3082,7 @@ USE `test`;
|
||||
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||
/*!50001 DROP TABLE `v2`*/;
|
||||
/*!50001 DROP TABLE IF EXISTS `v2`*/;
|
||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
@@ -3320,7 +3320,7 @@ insert into t values(5, 51);
|
||||
create view v1 as select qty, price, qty*price as value from t;
|
||||
create view v2 as select qty from v1;
|
||||
mysqldump {
|
||||
/*!50001 DROP TABLE `v1`*/;
|
||||
/*!50001 DROP TABLE IF EXISTS `v1`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||
@@ -3335,7 +3335,7 @@ mysqldump {
|
||||
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||
|
||||
} mysqldump {
|
||||
/*!50001 DROP TABLE `v2`*/;
|
||||
/*!50001 DROP TABLE IF EXISTS `v2`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||
@@ -3434,7 +3434,7 @@ SET character_set_client = utf8;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
|
||||
USE `mysqldump_test_db`;
|
||||
/*!50001 DROP TABLE `v1`*/;
|
||||
/*!50001 DROP TABLE IF EXISTS `v1`*/;
|
||||
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
@@ -3496,7 +3496,7 @@ SET character_set_client = @saved_cs_client;
|
||||
USE `mysqldump_tables`;
|
||||
|
||||
USE `mysqldump_views`;
|
||||
/*!50001 DROP TABLE `nasishnasifu`*/;
|
||||
/*!50001 DROP TABLE IF EXISTS `nasishnasifu`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||
@@ -3885,7 +3885,7 @@ SET character_set_client = utf8;
|
||||
`c` int(11)
|
||||
) ENGINE=MyISAM */;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
/*!50001 DROP TABLE `v2`*/;
|
||||
/*!50001 DROP TABLE IF EXISTS `v2`*/;
|
||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
@@ -4304,7 +4304,7 @@ SET character_set_client = utf8;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
|
||||
USE `mysqldump_test_db`;
|
||||
/*!50001 DROP TABLE `v1`*/;
|
||||
/*!50001 DROP TABLE IF EXISTS `v1`*/;
|
||||
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
@@ -4430,6 +4430,25 @@ DROP DATABASE mysqldump_test_db;
|
||||
|
||||
# -- End of test case for Bug#32538.
|
||||
|
||||
#
|
||||
# Bug#37377 Incorrect DROP TABLE statement in dump of a VIEW using --tab
|
||||
#
|
||||
create table t1 (a int);
|
||||
create view v1 as select a from t1;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#28071 mysqlimport does not quote or escape table name
|
||||
#
|
||||
drop table if exists `load`;
|
||||
create table `load` (a varchar(255));
|
||||
test.load: Records: 70 Deleted: 0 Skipped: 0 Warnings: 0
|
||||
select count(*) from `load`;
|
||||
count(*)
|
||||
70
|
||||
drop table `load`;
|
||||
SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT;
|
||||
|
||||
Bug #34861 - mysqldump with --tab gives weird output for triggers.
|
||||
@@ -4483,5 +4502,64 @@ DROP PROCEDURE IF EXISTS pr1;
|
||||
DROP TRIGGER IF EXISTS tr1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
#
|
||||
# Bug #30946: mysqldump silently ignores --default-character-set
|
||||
# when used with --tab
|
||||
#
|
||||
# Also see outfile_loaddata.test
|
||||
#
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE t1 (a INT, b CHAR(10) CHARSET koi8r, c CHAR(10) CHARSET latin1);
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
INSERT INTO t1 VALUES (1, 'ABC-АБВ', 'DEF-ÂÃÄ'), (2, NULL, NULL);
|
||||
# error on multi-character ENCLOSED/ESCAPED BY
|
||||
# default '--default-charset' (binary):
|
||||
##################################################
|
||||
1 ABC-<2D><><EFBFBD> DEF-<2D><><EFBFBD>
|
||||
2 \N \N
|
||||
##################################################
|
||||
TRUNCATE t2;
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary;
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
a b c
|
||||
1 ABC-АБВ DEF-ÂÃÄ
|
||||
2 NULL NULL
|
||||
# utf8:
|
||||
##################################################
|
||||
1 ABC-АБВ DEF-ÂÃÄ
|
||||
2 \N \N
|
||||
##################################################
|
||||
TRUNCATE t2;
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET utf8;
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
a b c
|
||||
1 ABC-АБВ DEF-ÂÃÄ
|
||||
2 NULL NULL
|
||||
# latin1 (data corruption is expected):
|
||||
##################################################
|
||||
1 ABC-??? DEF-<2D><><EFBFBD>
|
||||
2 \N \N
|
||||
##################################################
|
||||
TRUNCATE t2;
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET latin1 ;
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
a b c
|
||||
1 ABC-??? DEF-ÂÃÄ
|
||||
1 ABC-АБВ DEF-ÂÃÄ
|
||||
2 NULL NULL
|
||||
# koi8r (data corruption is expected):
|
||||
##################################################
|
||||
1 ABC-<2D><><EFBFBD> DEF-???
|
||||
2 \N \N
|
||||
##################################################
|
||||
TRUNCATE t2;
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET koi8r;
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
a b c
|
||||
1 ABC-АБВ DEF-???
|
||||
1 ABC-АБВ DEF-ÂÃÄ
|
||||
2 NULL NULL
|
||||
SET NAMES default;
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
@@ -1500,3 +1500,60 @@ id1
|
||||
15
|
||||
16
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
b INT NOT NULL,
|
||||
c char(100),
|
||||
KEY (b, c),
|
||||
KEY (b, a, c)
|
||||
)
|
||||
DEFAULT CHARSET = utf8;
|
||||
INSERT INTO t1 VALUES
|
||||
(1, 1, 1),
|
||||
(2, 2, 2),
|
||||
(3, 3, 3),
|
||||
(4, 4, 4),
|
||||
(5, 5, 5),
|
||||
(6, 6, 6),
|
||||
(7, 7, 7),
|
||||
(8, 8, 8),
|
||||
(9, 9, 9);
|
||||
INSERT INTO t1 SELECT a + 10, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 20, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 40, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 80, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 160, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 320, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 640, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 1280, b, c FROM t1 LIMIT 80;
|
||||
EXPLAIN
|
||||
SELECT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b,b_2 b 4 NULL 226 Using where
|
||||
SELECT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 9;
|
||||
a
|
||||
2071
|
||||
2061
|
||||
2051
|
||||
2041
|
||||
2031
|
||||
2021
|
||||
2011
|
||||
2001
|
||||
1991
|
||||
EXPLAIN
|
||||
SELECT DISTINCT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 0, 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b,b_2 b 4 NULL 226 Using where; Using temporary
|
||||
SELECT DISTINCT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 0, 9;
|
||||
a
|
||||
2071
|
||||
2061
|
||||
2051
|
||||
2041
|
||||
2031
|
||||
2021
|
||||
2011
|
||||
2001
|
||||
1991
|
||||
DROP TABLE t1;
|
||||
|
@@ -91,13 +91,152 @@ SELECT HEX(c1) FROM t1;
|
||||
HEX(c1)
|
||||
C3
|
||||
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug32533.txt' FIELDS ENCLOSED BY 0xC3 FROM t1;
|
||||
Warnings:
|
||||
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||
TRUNCATE t1;
|
||||
SELECT HEX(LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug32533.txt'));
|
||||
HEX(LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug32533.txt'))
|
||||
C35CC3C30A
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug32533.txt' INTO TABLE t1 FIELDS ENCLOSED BY 0xC3;
|
||||
Warnings:
|
||||
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||
SELECT HEX(c1) FROM t1;
|
||||
HEX(c1)
|
||||
C3
|
||||
DROP TABLE t1;
|
||||
# End of 5.0 tests.
|
||||
#
|
||||
# Bug #30946: mysqldump silently ignores --default-character-set
|
||||
# when used with --tab
|
||||
#
|
||||
# Also see mysqldump.test
|
||||
#
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE t1 (a INT, b CHAR(10) CHARSET koi8r, c CHAR(10) CHARSET latin1);
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
INSERT INTO t1 VALUES (1, 'ABC-АБВ', 'DEF-ÂÃÄ'), (2, NULL, NULL);
|
||||
# Error on multi-character ENCLOSED/ESCAPED BY
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FIELDS ENCLOSED BY '12345';
|
||||
ERROR 42000: Field separator argument is not what is expected; check the manual
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FIELDS ESCAPED BY '12345';
|
||||
ERROR 42000: Field separator argument is not what is expected; check the manual
|
||||
# "Not implemented" warning on multibyte ENCLOSED/ESCAPED BY character,
|
||||
# LOAD DATA rises error or has unpredictable result -- to be fixed later
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FIELDS ENCLOSED BY 'ъ';
|
||||
Warnings:
|
||||
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary FIELDS ENCLOSED BY 'ъ';
|
||||
ERROR 42000: Field separator argument is not what is expected; check the manual
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FIELDS ESCAPED BY 'ъ';
|
||||
Warnings:
|
||||
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary FIELDS ESCAPED BY 'ъ';
|
||||
ERROR 42000: Field separator argument is not what is expected; check the manual
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FIELDS TERMINATED BY 'ъ';
|
||||
Warnings:
|
||||
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||
##################################################
|
||||
1ъABC-<2D><><EFBFBD>ъDEF-<2D><><EFBFBD>
|
||||
2ъ\Nъ\N
|
||||
##################################################
|
||||
TRUNCATE t2;
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary FIELDS TERMINATED BY 'ъ';
|
||||
Warnings:
|
||||
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||
Warning 1265 Data truncated for column 'a' at row 1
|
||||
Warning 1261 Row 1 doesn't contain data for all columns
|
||||
Warning 1261 Row 1 doesn't contain data for all columns
|
||||
Warning 1265 Data truncated for column 'a' at row 2
|
||||
Warning 1261 Row 2 doesn't contain data for all columns
|
||||
Warning 1261 Row 2 doesn't contain data for all columns
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
a b c
|
||||
1 NULL NULL
|
||||
1 ABC-АБВ DEF-ÂÃÄ
|
||||
2 NULL NULL
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' LINES STARTING BY 'ъ';
|
||||
Warnings:
|
||||
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||
##################################################
|
||||
ъ1 ABC-<2D><><EFBFBD> DEF-<2D><><EFBFBD>
|
||||
ъ2 \N \N
|
||||
##################################################
|
||||
TRUNCATE t2;
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary LINES STARTING BY 'ъ';
|
||||
Warnings:
|
||||
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
a b c
|
||||
1 ABC-АБВ DEF-ÂÃÄ
|
||||
2 NULL NULL
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' LINES TERMINATED BY 'ъ';
|
||||
Warnings:
|
||||
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||
##################################################
|
||||
1 ABC-<2D><><EFBFBD> DEF-<2D><><EFBFBD>ъ2 \N \Nъ##################################################
|
||||
TRUNCATE t2;
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary LINES TERMINATED BY 'ъ';
|
||||
Warnings:
|
||||
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
a b c
|
||||
1 ABC-АБВ DEF-ÂÃÄ
|
||||
1 ABC-АБВ DEF-ÂÃÄÑŠ2
|
||||
2 NULL NULL
|
||||
# Default (binary) charset:
|
||||
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FROM t1;
|
||||
##################################################
|
||||
1 ABC-<2D><><EFBFBD> DEF-<2D><><EFBFBD>
|
||||
2 \N \N
|
||||
##################################################
|
||||
TRUNCATE t2;
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary;
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
a b c
|
||||
1 ABC-АБВ DEF-ÂÃÄ
|
||||
2 NULL NULL
|
||||
# latin1 charset (INTO OUTFILE warning is expected):
|
||||
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' CHARACTER SET latin1 FROM t1;
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 1
|
||||
##################################################
|
||||
1 ABC-??? DEF-<2D><><EFBFBD>
|
||||
2 \N \N
|
||||
##################################################
|
||||
TRUNCATE t2;
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET latin1 ;
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
a b c
|
||||
1 ABC-??? DEF-ÂÃÄ
|
||||
1 ABC-АБВ DEF-ÂÃÄ
|
||||
2 NULL NULL
|
||||
# KOI8-R charset (INTO OUTFILE warning is expected):
|
||||
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' CHARACTER SET koi8r FROM t1;
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xC2\xC3\xC4' for column 'c' at row 1
|
||||
##################################################
|
||||
1 ABC-<2D><><EFBFBD> DEF-???
|
||||
2 \N \N
|
||||
##################################################
|
||||
TRUNCATE t2;
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET koi8r;
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
a b c
|
||||
1 ABC-АБВ DEF-???
|
||||
1 ABC-АБВ DEF-ÂÃÄ
|
||||
2 NULL NULL
|
||||
# UTF-8 charset:
|
||||
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' CHARACTER SET utf8 FROM t1;
|
||||
##################################################
|
||||
1 ABC-АБВ DEF-ÂÃÄ
|
||||
2 \N \N
|
||||
##################################################
|
||||
TRUNCATE t2;
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET utf8;
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
a b c
|
||||
1 ABC-АБВ DEF-ÂÃÄ
|
||||
2 NULL NULL
|
||||
SET NAMES default;
|
||||
DROP TABLE t1, t2;
|
||||
# End of 5.1 tests.
|
||||
|
@@ -5,45 +5,45 @@
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 2 | 2 |
|
||||
| 2 | 2 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 1 | 1 |
|
||||
| 1 | 1 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 3 | 3 |
|
||||
| 3 | 3 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 2 | 2 |
|
||||
| 2 | 2 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 7 | 7 |
|
||||
| 7 | 7 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 8 | 8 |
|
||||
| 8 | 8 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 7 | 7 |
|
||||
| 7 | 7 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 4 | 4 |
|
||||
| 4 | 4 |
|
||||
+----------+--------+
|
||||
+----------+--------+
|
||||
| expected | result |
|
||||
+----------+--------+
|
||||
| 4 | 4 |
|
||||
| 4 | 4 |
|
||||
+----------+--------+
|
||||
|
@@ -1,4 +1,3 @@
|
||||
SET @old_general_log= @@global.general_log;
|
||||
drop table if exists t1, t2;
|
||||
CREATE TABLE t1 (a INT, FOREIGN KEY (a) REFERENCES t0 (a))
|
||||
ENGINE=MyISAM
|
||||
@@ -1068,7 +1067,13 @@ partition by range (a)
|
||||
subpartition by hash(a)
|
||||
(partition p0 values less than (0),
|
||||
partition p1 values less than (1) (subpartition sp0));
|
||||
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '))' at line 5
|
||||
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'subpartition sp0))' at line 5
|
||||
create table t1 (a int, b int)
|
||||
partition by list (a)
|
||||
subpartition by hash(a)
|
||||
(partition p0 values in (0),
|
||||
partition p1 values in (1) (subpartition sp0));
|
||||
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'subpartition sp0))' at line 5
|
||||
create table t1 (a int)
|
||||
partition by hash (a)
|
||||
(partition p0 (subpartition sp0));
|
||||
@@ -1621,17 +1626,6 @@ create table t (s1 int) engine=myisam partition by key (s1);
|
||||
create trigger t_ad after delete on t for each row insert into t values (old.s1);
|
||||
insert into t values (1);
|
||||
drop table t;
|
||||
USE mysql;
|
||||
TRUNCATE TABLE general_log;
|
||||
SET @old_general_log_state = @@global.general_log;
|
||||
SET GLOBAL general_log = 0;
|
||||
ALTER TABLE general_log ENGINE = MyISAM;
|
||||
ALTER TABLE general_log PARTITION BY RANGE (TO_DAYS(event_time))
|
||||
(PARTITION p0 VALUES LESS THAN (733144), PARTITION p1 VALUES LESS THAN (3000000));
|
||||
ERROR HY000: Incorrect usage of PARTITION and log table
|
||||
ALTER TABLE general_log ENGINE = CSV;
|
||||
SET GLOBAL general_log = @old_general_log_state;
|
||||
use test;
|
||||
create table t2 (b int);
|
||||
create table t1 (b int)
|
||||
PARTITION BY RANGE (t2.b) (
|
||||
@@ -1991,5 +1985,23 @@ CREATE TABLE t1(id INT,KEY(id)) ENGINE=MYISAM
|
||||
PARTITION BY HASH(id) PARTITIONS 2;
|
||||
DROP TABLE t1;
|
||||
SET SESSION SQL_MODE=DEFAULT;
|
||||
#
|
||||
# BUG#45816 - assertion failure with index containing double
|
||||
# column on partitioned table
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
a INT DEFAULT NULL,
|
||||
b DOUBLE DEFAULT NULL,
|
||||
c INT DEFAULT NULL,
|
||||
KEY idx2(b,a)
|
||||
) PARTITION BY HASH(c) PARTITIONS 3;
|
||||
INSERT INTO t1 VALUES (6,8,9);
|
||||
INSERT INTO t1 VALUES (6,8,10);
|
||||
SELECT 1 FROM t1 JOIN t1 AS t2 USING (a) FOR UPDATE;
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
SET @@global.general_log= @old_general_log;
|
||||
|
@@ -5,11 +5,50 @@ partition by list (a)
|
||||
(partition p0 values in (null));
|
||||
ERROR HY000: Engine cannot be used in partitioned tables
|
||||
USE mysql;
|
||||
TRUNCATE TABLE general_log;
|
||||
SET @old_general_log_state = @@global.general_log;
|
||||
SET GLOBAL general_log = 0;
|
||||
ALTER TABLE general_log ENGINE = MyISAM;
|
||||
ALTER TABLE general_log PARTITION BY RANGE (TO_DAYS(event_time))
|
||||
(PARTITION p0 VALUES LESS THAN (733144),
|
||||
PARTITION p1 VALUES LESS THAN (3000000));
|
||||
(PARTITION p0 VALUES LESS THAN (733144), PARTITION p1 VALUES LESS THAN (3000000));
|
||||
ERROR HY000: Incorrect usage of PARTITION and log table
|
||||
ALTER TABLE general_log ENGINE = CSV;
|
||||
SET GLOBAL general_log = @old_general_log_state;
|
||||
use test;
|
||||
#
|
||||
# Bug#40281: partitioning the general log table crashes the server
|
||||
#
|
||||
# set up partitioned log, and switch to it
|
||||
USE mysql;
|
||||
SET @old_general_log_state = @@global.general_log;
|
||||
SET GLOBAL general_log = 0;
|
||||
CREATE TABLE gl_partitioned LIKE general_log;
|
||||
ALTER TABLE gl_partitioned ENGINE=myisam;
|
||||
ALTER TABLE gl_partitioned PARTITION BY HASH (thread_id) PARTITIONS 10;
|
||||
ALTER TABLE general_log RENAME TO gl_nonpartitioned;
|
||||
ALTER TABLE gl_partitioned RENAME TO general_log;
|
||||
SELECT @@global.log_output INTO @old_glo;
|
||||
SET GLOBAL log_output='table';
|
||||
SET GLOBAL general_log =1;
|
||||
# do some things to be logged to partitioned log, should fail
|
||||
USE /* 1 */ test;
|
||||
CREATE TABLE t1 (i INT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1;
|
||||
i
|
||||
1
|
||||
USE mysql;
|
||||
SET GLOBAL general_log =0;
|
||||
ALTER TABLE general_log RENAME TO gl_partitioned;
|
||||
ALTER TABLE gl_nonpartitioned RENAME TO general_log;
|
||||
# show whether we actually logged anything (no) to general_log
|
||||
SELECT COUNT(argument) FROM gl_partitioned;
|
||||
COUNT(argument)
|
||||
0
|
||||
DROP TABLE gl_partitioned;
|
||||
SET GLOBAL log_output = @old_glo;
|
||||
SET GLOBAL general_log = 1;
|
||||
USE /* 2 */ test;
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL general_log = @old_general_log_state;
|
||||
End of 5.1 tests
|
||||
|
81
mysql-test/r/partition_not_embedded.result
Normal file
81
mysql-test/r/partition_not_embedded.result
Normal file
@@ -0,0 +1,81 @@
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
# Bug#30102 test
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION p0 VALUES LESS THAN (6),
|
||||
PARTITION `p1....................` VALUES LESS THAN (9),
|
||||
PARTITION p2 VALUES LESS THAN MAXVALUE);
|
||||
# List of files in database `test`, all original t1-files here
|
||||
t1#P#p0.MYD
|
||||
t1#P#p0.MYI
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||
t1#P#p2.MYD
|
||||
t1#P#p2.MYI
|
||||
t1.frm
|
||||
t1.par
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
# Renaming to a file name where the first partition is 250 chars
|
||||
# and the second partition is 350 chars
|
||||
RENAME TABLE t1 TO `t2_new..............................................end`;
|
||||
Got one of the listed errors
|
||||
# List of files in database `test`, should not be any t2-files here
|
||||
# List of files in database `test`, should be all t1-files here
|
||||
t1#P#p0.MYD
|
||||
t1#P#p0.MYI
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||
t1#P#p2.MYD
|
||||
t1#P#p2.MYI
|
||||
t1.frm
|
||||
t1.par
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# List of files in database `test`, should be all t1-files here
|
||||
t1#P#p0.MYD
|
||||
t1#P#p0.MYI
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||
t1#P#p2.MYD
|
||||
t1#P#p2.MYI
|
||||
t1.frm
|
||||
t1.par
|
||||
# Renaming to a file name where the first partition is 156 chars
|
||||
# and the second partition is 256 chars
|
||||
RENAME TABLE t1 TO `t2_............................_end`;
|
||||
Got one of the listed errors
|
||||
# List of files in database `test`, should not be any t2-files here
|
||||
# List of files in database `test`, should be all t1-files here
|
||||
t1#P#p0.MYD
|
||||
t1#P#p0.MYI
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||
t1#P#p2.MYD
|
||||
t1#P#p2.MYI
|
||||
t1.frm
|
||||
t1.par
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
DROP TABLE t1;
|
||||
# Should not be any files left here
|
||||
# End of bug#30102 test.
|
66
mysql-test/r/partition_rename_longfilename.result
Normal file
66
mysql-test/r/partition_rename_longfilename.result
Normal file
@@ -0,0 +1,66 @@
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION p0 VALUES LESS THAN (6),
|
||||
PARTITION `p1....................` VALUES LESS THAN (9),
|
||||
PARTITION p2 VALUES LESS THAN MAXVALUE);
|
||||
# List of files in database `test`, all original t1-files here
|
||||
t1#P#p0.MYD
|
||||
t1#P#p0.MYI
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||
t1#P#p2.MYD
|
||||
t1#P#p2.MYI
|
||||
t1.frm
|
||||
t1.par
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
# Renaming to a file name where the first partition is 155 chars
|
||||
# and the second partition is 255 chars
|
||||
RENAME TABLE t1 TO `t2_............................end`;
|
||||
# List of files in database `test`, should not be any t1-files here
|
||||
# List of files in database `test`, should be all t2-files here
|
||||
t2_@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend#P#p0.MYD
|
||||
t2_@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend#P#p0.MYI
|
||||
t2_@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||
t2_@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||
t2_@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend#P#p2.MYD
|
||||
t2_@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend#P#p2.MYI
|
||||
t2_@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend.frm
|
||||
t2_@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend.par
|
||||
SELECT * FROM `t2_............................end`;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE `t2_............................end` to t1;
|
||||
# List of files in database `test`, should be all t1-files here
|
||||
t1#P#p0.MYD
|
||||
t1#P#p0.MYI
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||
t1#P#p2.MYD
|
||||
t1#P#p2.MYI
|
||||
t1.frm
|
||||
t1.par
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
DROP TABLE t1;
|
||||
# Should not be any files left here
|
||||
# End of bug#30102 test.
|
@@ -249,3 +249,25 @@ DROP PROCEDURE p1;
|
||||
DELETE FROM mysql.user WHERE User='mysqltest_1';
|
||||
FLUSH PRIVILEGES;
|
||||
set @@global.concurrent_insert= @old_concurrent_insert;
|
||||
#
|
||||
# Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al.
|
||||
#
|
||||
SELECT GET_LOCK('Bug44521', 0);
|
||||
GET_LOCK('Bug44521', 0)
|
||||
1
|
||||
** Connection con1
|
||||
CREATE PROCEDURE p()
|
||||
BEGIN
|
||||
SELECT 1;
|
||||
SELECT GET_LOCK('Bug44521', 100);
|
||||
SELECT 2;
|
||||
END$
|
||||
CALL p();;
|
||||
** Default connection
|
||||
SELECT RELEASE_LOCK('Bug44521');
|
||||
RELEASE_LOCK('Bug44521')
|
||||
1
|
||||
DROP PROCEDURE p;
|
||||
# ------------------------------------------------------------------
|
||||
# -- End of 5.1 tests
|
||||
# ------------------------------------------------------------------
|
||||
|
@@ -4361,6 +4361,28 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `1` from `test`.`t1` where <in_optimizer>(1,<exists>(select 1 AS `1` from `test`.`t1` where (`test`.`t1`.`a` > 3) group by `test`.`t1`.`a` having (<cache>(1) = <ref_null_helper>(1))))
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#45061: Incorrectly market field caused wrong result.
|
||||
#
|
||||
CREATE TABLE `C` (
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`int_key` int(11) NOT NULL,
|
||||
KEY `int_key` (`int_key`)
|
||||
);
|
||||
INSERT INTO `C` VALUES (9,9), (0,0), (8,6), (3,6), (7,6), (0,4),
|
||||
(1,7), (9,4), (0,8), (9,4), (0,7), (5,5), (0,0), (8,5), (8,7),
|
||||
(5,2), (1,8), (7,0), (0,9), (9,5);
|
||||
SELECT * FROM C WHERE `int_key` IN (SELECT `int_nokey`);
|
||||
int_nokey int_key
|
||||
9 9
|
||||
0 0
|
||||
5 5
|
||||
0 0
|
||||
EXPLAIN EXTENDED SELECT * FROM C WHERE `int_key` IN (SELECT `int_nokey`);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY C ALL NULL NULL NULL NULL 20 100.00 Using where
|
||||
DROP TABLE C;
|
||||
# End of test for bug#45061.
|
||||
End of 5.0 tests.
|
||||
CREATE TABLE t1 (a INT, b INT);
|
||||
INSERT INTO t1 VALUES (2,22),(1,11),(2,22);
|
||||
|
@@ -35,4 +35,11 @@ CREATE DATABASE IF NOT EXISTS init_file;
|
||||
CREATE TABLE IF NOT EXISTS init_file.startup ( startdate DATETIME );
|
||||
INSERT INTO init_file.startup VALUES ( NOW() );
|
||||
|
||||
#
|
||||
# Bug#43587 "Putting event_scheduler=1 in init SQL file crashes mysqld"
|
||||
#
|
||||
|
||||
SET GLOBAL event_scheduler = 'ON';
|
||||
CREATE EVENT ev1 ON SCHEDULE EVERY 1 DAY DISABLE DO SELECT 1;
|
||||
DROP EVENT ev1;
|
||||
SET GLOBAL event_scheduler = 'OFF';
|
||||
|
@@ -1298,3 +1298,14 @@ show master status /* must show new binlog index after rotating */;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000002 106
|
||||
drop table t3;
|
||||
#
|
||||
# Bug #45998: database crashes when running "create as select"
|
||||
#
|
||||
CREATE DATABASE test1;
|
||||
USE test1;
|
||||
DROP DATABASE test1;
|
||||
CREATE TABLE test.t1(a int);
|
||||
INSERT INTO test.t1 VALUES (1), (2);
|
||||
CREATE TABLE test.t2 SELECT * FROM test.t1;
|
||||
USE test;
|
||||
DROP TABLES t1, t2;
|
||||
|
@@ -773,3 +773,14 @@ show master status /* must show new binlog index after rotating */;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000002 106
|
||||
drop table t3;
|
||||
#
|
||||
# Bug #45998: database crashes when running "create as select"
|
||||
#
|
||||
CREATE DATABASE test1;
|
||||
USE test1;
|
||||
DROP DATABASE test1;
|
||||
CREATE TABLE test.t1(a int);
|
||||
INSERT INTO test.t1 VALUES (1), (2);
|
||||
CREATE TABLE test.t2 SELECT * FROM test.t1;
|
||||
USE test;
|
||||
DROP TABLES t1, t2;
|
||||
|
@@ -28,3 +28,23 @@ UPDATE t1 SET b='4' WHERE a=1 LIMIT 1;
|
||||
UPDATE t1 SET b='5' WHERE a=2 ORDER BY a LIMIT 1;
|
||||
DROP TABLE t1;
|
||||
DROP DATABASE b42851;
|
||||
USE test;
|
||||
#
|
||||
# Bug#46265: Can not disable warning about unsafe statements for binary logging
|
||||
#
|
||||
SET @old_log_warnings = @@log_warnings;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(10));
|
||||
SET GLOBAL LOG_WARNINGS = 0;
|
||||
INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
|
||||
Warnings:
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
SET GLOBAL LOG_WARNINGS = 1;
|
||||
INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
|
||||
Warnings:
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL log_warnings = @old_log_warnings;
|
||||
# Count the number of times the "Unsafe" message was printed
|
||||
# to the error log.
|
||||
Occurrences: 1
|
||||
|
@@ -1 +1 @@
|
||||
--binlog-ignore-db=b42851
|
||||
--binlog-ignore-db=b42851 --log-error
|
||||
|
@@ -56,6 +56,8 @@ SET SQL_LOG_BIN= 1;
|
||||
|
||||
-- echo ### FILTERED database => assertion: warnings ARE NOT shown
|
||||
|
||||
let $old_db= `SELECT DATABASE()`;
|
||||
|
||||
CREATE DATABASE b42851;
|
||||
USE b42851;
|
||||
|
||||
@@ -71,3 +73,36 @@ DROP TABLE t1;
|
||||
|
||||
# clean up
|
||||
DROP DATABASE b42851;
|
||||
|
||||
eval USE $old_db;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#46265: Can not disable warning about unsafe statements for binary logging
|
||||
--echo #
|
||||
|
||||
SET @old_log_warnings = @@log_warnings;
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(10));
|
||||
SET GLOBAL LOG_WARNINGS = 0;
|
||||
INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
|
||||
SET GLOBAL LOG_WARNINGS = 1;
|
||||
INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
|
||||
DROP TABLE t1;
|
||||
|
||||
SET GLOBAL log_warnings = @old_log_warnings;
|
||||
|
||||
let LOG_ERROR= `SELECT @@GLOBAL.log_error`;
|
||||
|
||||
--echo # Count the number of times the "Unsafe" message was printed
|
||||
--echo # to the error log.
|
||||
|
||||
perl;
|
||||
$log_error= $ENV{'LOG_ERROR'};
|
||||
open(FILE, "$log_error") or die("Unable to open $log_error: $!\n");
|
||||
$count = () = grep(/Bug#46265/g,<FILE>);
|
||||
print "Occurrences: $count\n";
|
||||
close(FILE);
|
||||
EOF
|
||||
|
@@ -764,7 +764,7 @@ f_char2 CHAR(20),
|
||||
f_charbig VARCHAR(1000) )
|
||||
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20), PARTITION part3 VALUES LESS THAN (2147483646)
|
||||
(SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ;
|
||||
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '))' at line 7
|
||||
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart31 , SUBPARTITION subpart32 ))' at line 7
|
||||
CREATE TABLE t1 ( f_int1 INTEGER,
|
||||
f_int2 INTEGER,
|
||||
f_char1 CHAR(20),
|
||||
@@ -772,7 +772,7 @@ f_char2 CHAR(20),
|
||||
f_charbig VARCHAR(1000) )
|
||||
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20)
|
||||
(SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646)) ;
|
||||
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part3 VALUES LESS THAN (2147483646))' at line 7
|
||||
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS T' at line 7
|
||||
CREATE TABLE t1 ( f_int1 INTEGER,
|
||||
f_int2 INTEGER,
|
||||
f_char1 CHAR(20),
|
||||
@@ -781,8 +781,7 @@ f_charbig VARCHAR(1000) )
|
||||
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20)
|
||||
(SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646)
|
||||
(SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ;
|
||||
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part3 VALUES LESS THAN (2147483646)
|
||||
(SUBPARTITION subpart31 , SUBPA' at line 7
|
||||
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS T' at line 7
|
||||
CREATE TABLE t1 ( f_int1 INTEGER,
|
||||
f_int2 INTEGER,
|
||||
f_char1 CHAR(20),
|
||||
|
@@ -796,7 +796,7 @@ f_char2 CHAR(20),
|
||||
f_charbig VARCHAR(1000) )
|
||||
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20), PARTITION part3 VALUES LESS THAN (2147483646)
|
||||
(SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ;
|
||||
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '))' at line 7
|
||||
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart31 , SUBPARTITION subpart32 ))' at line 7
|
||||
CREATE TABLE t1 ( f_int1 INTEGER,
|
||||
f_int2 INTEGER,
|
||||
f_char1 CHAR(20),
|
||||
@@ -804,7 +804,7 @@ f_char2 CHAR(20),
|
||||
f_charbig VARCHAR(1000) )
|
||||
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20)
|
||||
(SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646)) ;
|
||||
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part3 VALUES LESS THAN (2147483646))' at line 7
|
||||
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS T' at line 7
|
||||
CREATE TABLE t1 ( f_int1 INTEGER,
|
||||
f_int2 INTEGER,
|
||||
f_char1 CHAR(20),
|
||||
@@ -813,8 +813,7 @@ f_charbig VARCHAR(1000) )
|
||||
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20)
|
||||
(SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646)
|
||||
(SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ;
|
||||
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part3 VALUES LESS THAN (2147483646)
|
||||
(SUBPARTITION subpart31 , SUBPA' at line 7
|
||||
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS T' at line 7
|
||||
CREATE TABLE t1 ( f_int1 INTEGER,
|
||||
f_int2 INTEGER,
|
||||
f_char1 CHAR(20),
|
||||
|
@@ -33,12 +33,10 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||
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 t SET f = 'magenta 2' WHERE f = 'red'
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'yellow 2' WHERE i = 3
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'magenta 2' WHERE f = 'red'
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (5 + (2 * 10),"brown")
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown")
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
@@ -56,12 +54,10 @@ COMMIT;
|
||||
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 t SET f = 'dark blue 2' WHERE f = 'red'
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'gray 2' WHERE i = 3
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 2' WHERE f = 'red'
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (2 * 10),"brown")
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown")
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
@@ -79,12 +75,10 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||
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 t SET f = 'magenta 1' WHERE f = 'red'
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'yellow 1' WHERE i = 3
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'magenta 1' WHERE f = 'red'
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (5 + (1 * 10),"brown")
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown")
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
@@ -100,17 +94,13 @@ COMMIT;
|
||||
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 t SET f = 'dark blue 1' WHERE f = 'red'
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'gray 1' WHERE i = 3
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 1' WHERE f = 'red'
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (1 * 10),"brown")
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown")
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
source include/diff_master_slave.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
########################################################################
|
||||
# Cleanup
|
||||
########################################################################
|
||||
|
@@ -0,0 +1,40 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
SELECT IS_FREE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP");
|
||||
IS_FREE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP")
|
||||
1
|
||||
SELECT GET_LOCK("debug_lock.before_get_UNIX_TIMESTAMP", 1000);
|
||||
GET_LOCK("debug_lock.before_get_UNIX_TIMESTAMP", 1000)
|
||||
1
|
||||
set global debug= 'd,debug_lock.before_get_UNIX_TIMESTAMP';
|
||||
stop slave;
|
||||
start slave;
|
||||
SELECT RELEASE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP");
|
||||
RELEASE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP")
|
||||
1
|
||||
Slave_IO_Errno= 2013
|
||||
SELECT IS_FREE_LOCK("debug_lock.before_get_SERVER_ID");
|
||||
IS_FREE_LOCK("debug_lock.before_get_SERVER_ID")
|
||||
1
|
||||
SELECT GET_LOCK("debug_lock.before_get_SERVER_ID", 1000);
|
||||
GET_LOCK("debug_lock.before_get_SERVER_ID", 1000)
|
||||
1
|
||||
set global debug= 'd,debug_lock.before_get_SERVER_ID';
|
||||
stop slave;
|
||||
start slave;
|
||||
SELECT RELEASE_LOCK("debug_lock.before_get_SERVER_ID");
|
||||
RELEASE_LOCK("debug_lock.before_get_SERVER_ID")
|
||||
1
|
||||
Slave_IO_Errno= 2013
|
||||
set global debug= '';
|
||||
reset master;
|
||||
include/stop_slave.inc
|
||||
change master to master_port=SLAVE_PORT;
|
||||
start slave;
|
||||
*** must be having the replicate-same-server-id IO thread error ***
|
||||
Slave_IO_Errno= 1593
|
||||
Slave_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).
|
@@ -19,5 +19,50 @@ fn16456()
|
||||
timestamp
|
||||
set binlog_format=STATEMENT;
|
||||
select fn16456();
|
||||
ERROR HY000: Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events
|
||||
ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
|
||||
drop function fn16456;
|
||||
set global log_bin_trust_function_creators=0;
|
||||
create function fn16456()
|
||||
returns int deterministic
|
||||
begin
|
||||
return unix_timestamp();
|
||||
end|
|
||||
set binlog_format=ROW;
|
||||
select fn16456();
|
||||
fn16456()
|
||||
timestamp
|
||||
set binlog_format=STATEMENT;
|
||||
select fn16456();
|
||||
fn16456()
|
||||
timestamp
|
||||
drop function fn16456;
|
||||
set global log_bin_trust_function_creators=0;
|
||||
create function fn16456()
|
||||
returns int no sql
|
||||
begin
|
||||
return unix_timestamp();
|
||||
end|
|
||||
set binlog_format=ROW;
|
||||
select fn16456();
|
||||
fn16456()
|
||||
timestamp
|
||||
set binlog_format=STATEMENT;
|
||||
select fn16456();
|
||||
fn16456()
|
||||
timestamp
|
||||
drop function fn16456;
|
||||
set global log_bin_trust_function_creators=0;
|
||||
create function fn16456()
|
||||
returns int reads sql data
|
||||
begin
|
||||
return unix_timestamp();
|
||||
end|
|
||||
set binlog_format=ROW;
|
||||
select fn16456();
|
||||
fn16456()
|
||||
timestamp
|
||||
set binlog_format=STATEMENT;
|
||||
select fn16456();
|
||||
fn16456()
|
||||
timestamp
|
||||
drop function fn16456;
|
||||
|
@@ -24,3 +24,48 @@ Slave_open_temp_tables 0
|
||||
[on master]
|
||||
DROP TABLE t1;
|
||||
[on slave]
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE t1 (a int);
|
||||
CREATE TABLE t2 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) );
|
||||
CREATE TABLE t3 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) );
|
||||
CREATE TRIGGER tr1 AFTER DELETE ON t2 FOR EACH ROW INSERT INTO t3 () VALUES ();
|
||||
CREATE TEMPORARY TABLE t1_tmp (i1 int);
|
||||
ALTER TABLE t1_tmp ADD COLUMN b INT;
|
||||
DELETE FROM t2;
|
||||
CREATE TEMPORARY TABLE t2_tmp (a int);
|
||||
ALTER TABLE t1_tmp ADD COLUMN c INT;
|
||||
### assertion: assert that there is one open temp table on slave
|
||||
SHOW STATUS LIKE 'Slave_open_temp_tables';
|
||||
Variable_name Value
|
||||
Slave_open_temp_tables 1
|
||||
DROP TABLE t1_tmp, t2;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
DROP TEMPORARY TABLE t2_tmp;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
### assertion: assert that slave has no temporary tables opened
|
||||
SHOW STATUS LIKE 'Slave_open_temp_tables';
|
||||
Variable_name Value
|
||||
Slave_open_temp_tables 0
|
||||
DROP TABLE t3, t1;
|
||||
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)
|
||||
slave-bin.000001 # Query # # use `test`; CREATE TABLE t2 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) )
|
||||
slave-bin.000001 # Query # # use `test`; CREATE TABLE t3 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) )
|
||||
slave-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER DELETE ON t2 FOR EACH ROW INSERT INTO t3 () VALUES ()
|
||||
slave-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE t1_tmp (i1 int)
|
||||
slave-bin.000001 # Query # # use `test`; ALTER TABLE t1_tmp ADD COLUMN b INT
|
||||
slave-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
|
||||
slave-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `t1_tmp` /* generated by server */
|
||||
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
|
||||
slave-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `t2_tmp` /* generated by server */
|
||||
slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2)
|
||||
slave-bin.000001 # Query # # use `test`; DROP TABLE t3, t1
|
||||
|
@@ -125,13 +125,14 @@ while ($type)
|
||||
connection master;
|
||||
sync_slave_with_master;
|
||||
|
||||
connection master;
|
||||
let $diff_statement= SELECT * FROM t order by i;
|
||||
source include/diff_master_slave.inc;
|
||||
# Re-enable this after fixing BUG#46130
|
||||
#connection master;
|
||||
#let $diff_statement= SELECT * FROM t order by i;
|
||||
#source include/diff_master_slave.inc;
|
||||
|
||||
connection master;
|
||||
let $diff_statement= SELECT * FROM n order by d, f;
|
||||
source include/diff_master_slave.inc;
|
||||
#connection master;
|
||||
#let $diff_statement= SELECT * FROM n order by d, f;
|
||||
#source include/diff_master_slave.inc;
|
||||
|
||||
--echo ########################################################################
|
||||
--echo # Cleanup
|
||||
|
60
mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
Normal file
60
mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
Normal file
@@ -0,0 +1,60 @@
|
||||
#
|
||||
# BUG#45214
|
||||
# This test verifies if the slave I/O tread tries to reconnect to
|
||||
# master when it tries to get the values of the UNIX_TIMESTAMP, SERVER_ID,
|
||||
# COLLATION_SERVER and TIME_ZONE from master under network disconnection.
|
||||
# The COLLATION_SERVER and TIME_ZONE are got only on master server version 4.
|
||||
# So they can't be verified by test case here.
|
||||
# Finish the following tests by calling its common test script:
|
||||
# extra/rpl_tests/rpl_get_master_version_and_clock.test.
|
||||
# And meanwhile this test checks that the slave I/O thread refuses to start if slave
|
||||
# and master have the same server id (because this is a useless setup,
|
||||
# and otherwise SHOW SLAVE STATUS shows progress but all queries are
|
||||
# ignored, which has caught our customers), unless
|
||||
# --replicate-same-server-id.
|
||||
#
|
||||
|
||||
source include/master-slave.inc;
|
||||
source include/have_debug.inc;
|
||||
#Test case 1: Try to get the value of the UNIX_TIMESTAMP from master under network disconnection
|
||||
connection slave;
|
||||
let $debug_saved= `select @@global.debug`;
|
||||
|
||||
let $debug_lock= "debug_lock.before_get_UNIX_TIMESTAMP";
|
||||
eval SELECT IS_FREE_LOCK($debug_lock);
|
||||
eval SELECT GET_LOCK($debug_lock, 1000);
|
||||
|
||||
set global debug= 'd,debug_lock.before_get_UNIX_TIMESTAMP';
|
||||
source extra/rpl_tests/rpl_get_master_version_and_clock.test;
|
||||
|
||||
#Test case 2: Try to get the value of the SERVER_ID from master under network disconnection
|
||||
connection slave;
|
||||
let $debug_lock= "debug_lock.before_get_SERVER_ID";
|
||||
eval SELECT IS_FREE_LOCK($debug_lock);
|
||||
eval SELECT GET_LOCK($debug_lock, 1000);
|
||||
|
||||
set global debug= 'd,debug_lock.before_get_SERVER_ID';
|
||||
source extra/rpl_tests/rpl_get_master_version_and_clock.test;
|
||||
|
||||
eval set global debug= '$debug_saved';
|
||||
|
||||
#Test case 3: This test checks that the slave I/O thread refuses to start
|
||||
#if slave and master have the same server id.
|
||||
connection slave;
|
||||
reset master;
|
||||
# replicate ourselves
|
||||
source include/stop_slave.inc;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval change master to master_port=$SLAVE_MYPORT;
|
||||
start slave;
|
||||
|
||||
let $slave_param= Last_IO_Errno;
|
||||
let $slave_param_value= 1593;
|
||||
source include/wait_for_slave_param.inc;
|
||||
--echo *** must be having the replicate-same-server-id IO thread error ***
|
||||
let $last_io_errno= query_get_value("show slave status", Last_IO_Errno, 1);
|
||||
let $last_io_error= query_get_value("show slave status", Last_IO_Error, 1);
|
||||
echo Slave_IO_Errno= $last_io_errno;
|
||||
echo Slave_IO_Error= $last_io_error;
|
||||
|
||||
# End of tests
|
@@ -1,6 +1,7 @@
|
||||
-- source include/have_log_bin.inc
|
||||
|
||||
# Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
|
||||
# BUG#41166 stored function requires "deterministic" if binlog_format is "statement"
|
||||
|
||||
# save status
|
||||
|
||||
@@ -55,15 +56,131 @@ select fn16456();
|
||||
|
||||
set binlog_format=STATEMENT;
|
||||
|
||||
--error ER_BINLOG_ROW_RBR_TO_SBR
|
||||
--error ER_BINLOG_UNSAFE_ROUTINE
|
||||
select fn16456();
|
||||
|
||||
|
||||
|
||||
# clean
|
||||
|
||||
drop function fn16456;
|
||||
|
||||
|
||||
|
||||
# success in definition with deterministic
|
||||
|
||||
set global log_bin_trust_function_creators=0;
|
||||
|
||||
delimiter |;
|
||||
create function fn16456()
|
||||
returns int deterministic
|
||||
begin
|
||||
return unix_timestamp();
|
||||
end|
|
||||
delimiter ;|
|
||||
|
||||
|
||||
|
||||
# allow funcall in RBR
|
||||
|
||||
set binlog_format=ROW;
|
||||
|
||||
--replace_column 1 timestamp
|
||||
select fn16456();
|
||||
|
||||
|
||||
|
||||
# allow funcall in SBR
|
||||
|
||||
set binlog_format=STATEMENT;
|
||||
|
||||
--replace_column 1 timestamp
|
||||
select fn16456();
|
||||
|
||||
|
||||
|
||||
# clean
|
||||
|
||||
drop function fn16456;
|
||||
|
||||
|
||||
# success in definition with NO SQL
|
||||
|
||||
set global log_bin_trust_function_creators=0;
|
||||
|
||||
delimiter |;
|
||||
create function fn16456()
|
||||
returns int no sql
|
||||
begin
|
||||
return unix_timestamp();
|
||||
end|
|
||||
delimiter ;|
|
||||
|
||||
|
||||
|
||||
# allow funcall in RBR
|
||||
|
||||
set binlog_format=ROW;
|
||||
|
||||
--replace_column 1 timestamp
|
||||
select fn16456();
|
||||
|
||||
|
||||
|
||||
# allow funcall in SBR
|
||||
|
||||
set binlog_format=STATEMENT;
|
||||
|
||||
--replace_column 1 timestamp
|
||||
select fn16456();
|
||||
|
||||
|
||||
# clean
|
||||
|
||||
drop function fn16456;
|
||||
|
||||
|
||||
|
||||
# success in definition with reads sql data
|
||||
|
||||
set global log_bin_trust_function_creators=0;
|
||||
|
||||
delimiter |;
|
||||
create function fn16456()
|
||||
returns int reads sql data
|
||||
begin
|
||||
return unix_timestamp();
|
||||
end|
|
||||
delimiter ;|
|
||||
|
||||
|
||||
|
||||
# allow funcall in RBR
|
||||
|
||||
set binlog_format=ROW;
|
||||
|
||||
--replace_column 1 timestamp
|
||||
select fn16456();
|
||||
|
||||
|
||||
|
||||
# allow funcall in SBR
|
||||
|
||||
set binlog_format=STATEMENT;
|
||||
|
||||
--replace_column 1 timestamp
|
||||
select fn16456();
|
||||
|
||||
|
||||
|
||||
# clean
|
||||
|
||||
drop function fn16456;
|
||||
|
||||
|
||||
|
||||
# restore status
|
||||
|
||||
drop function fn16456;
|
||||
|
||||
--disable_query_log
|
||||
eval set binlog_format=$oblf;
|
||||
eval set global log_bin_trust_function_creators=$otfc;
|
||||
|
@@ -51,3 +51,98 @@ DROP TABLE t1;
|
||||
|
||||
--echo [on slave]
|
||||
sync_slave_with_master;
|
||||
|
||||
#
|
||||
# BUG#43046: mixed mode switch to row format with temp table lead to wrong
|
||||
# result
|
||||
#
|
||||
# NOTES
|
||||
# =====
|
||||
#
|
||||
# 1. Temporary tables cannot be logged using the row-based
|
||||
# format. Thus, once row-based logging is used, all subsequent
|
||||
# statements using that table are unsafe, and we approximate this
|
||||
# condition by treating all statements made by that client as
|
||||
# unsafe until the client no longer holds any temporary tables.
|
||||
#
|
||||
# 2. Two different connections can use the same temporary table
|
||||
# name without conflicting with each other or with an
|
||||
# existing non-TEMPORARY table of the same name.
|
||||
#
|
||||
# DESCRIPTION
|
||||
# ===========
|
||||
#
|
||||
# The test is implemented as follows:
|
||||
# 1. create regular tables
|
||||
# 2. create a temporary table t1_tmp: should be logged as statement
|
||||
# 3. issue an alter table: should be logged as statement
|
||||
# 4. issue statement that forces switch to RBR
|
||||
# 5. create another temporary table t2_tmp: should not be logged
|
||||
# 6. issue alter table on t1_tmp: should not be logged
|
||||
# 7. drop t1_tmp and regular table on same statement: should log both in
|
||||
# statement format (but different statements)
|
||||
# 8. issue deterministic insert: logged as row (because t2_tmp still
|
||||
# exists).
|
||||
# 9. drop t2_tmp and issue deterministic statement: should log drop and
|
||||
# query in statement format (show switch back to STATEMENT format)
|
||||
# 10. in the end the slave should not have open temp tables.
|
||||
#
|
||||
|
||||
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||
-- source include/master-slave-reset.inc
|
||||
-- connection master
|
||||
|
||||
# action: setup environment
|
||||
CREATE TABLE t1 (a int);
|
||||
CREATE TABLE t2 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) );
|
||||
CREATE TABLE t3 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) );
|
||||
CREATE TRIGGER tr1 AFTER DELETE ON t2 FOR EACH ROW INSERT INTO t3 () VALUES ();
|
||||
|
||||
# assertion: assert that CREATE is logged as STATEMENT
|
||||
CREATE TEMPORARY TABLE t1_tmp (i1 int);
|
||||
|
||||
# assertion: assert that ALTER TABLE is logged as STATEMENT
|
||||
ALTER TABLE t1_tmp ADD COLUMN b INT;
|
||||
|
||||
# action: force switch to RBR
|
||||
DELETE FROM t2;
|
||||
|
||||
# assertion: assert that t2_tmp will not make into the binlog (RBR logging atm)
|
||||
CREATE TEMPORARY TABLE t2_tmp (a int);
|
||||
|
||||
# assertion: assert that ALTER TABLE on t1_tmp will not make into the binlog
|
||||
ALTER TABLE t1_tmp ADD COLUMN c INT;
|
||||
|
||||
-- echo ### assertion: assert that there is one open temp table on slave
|
||||
-- sync_slave_with_master
|
||||
SHOW STATUS LIKE 'Slave_open_temp_tables';
|
||||
|
||||
-- connection master
|
||||
|
||||
# assertion: assert that both drops are logged
|
||||
DROP TABLE t1_tmp, t2;
|
||||
|
||||
# assertion: assert that statement is logged as row (master still has one
|
||||
# opened temporary table - t2_tmp.
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# assertion: assert that DROP TABLE *is* logged despite CREATE is not.
|
||||
DROP TEMPORARY TABLE t2_tmp;
|
||||
|
||||
# assertion: assert that statement is now logged as STMT (mixed mode switches
|
||||
# back to STATEMENT).
|
||||
INSERT INTO t1 VALUES (2);
|
||||
|
||||
-- sync_slave_with_master
|
||||
|
||||
-- echo ### assertion: assert that slave has no temporary tables opened
|
||||
SHOW STATUS LIKE 'Slave_open_temp_tables';
|
||||
|
||||
-- connection master
|
||||
|
||||
# action: drop remaining tables
|
||||
DROP TABLE t3, t1;
|
||||
|
||||
-- sync_slave_with_master
|
||||
|
||||
-- source include/show_binlog_events.inc
|
||||
|
1
mysql-test/t/bug40113-master.opt
Normal file
1
mysql-test/t/bug40113-master.opt
Normal file
@@ -0,0 +1 @@
|
||||
--innodb_lock_wait_timeout=1
|
46
mysql-test/t/bug40113.test
Normal file
46
mysql-test/t/bug40113.test
Normal file
@@ -0,0 +1,46 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--echo #
|
||||
--echo # Bug #40113: Embedded SELECT inside UPDATE or DELETE can timeout
|
||||
--echo # without error
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a int, b int, PRIMARY KEY (a,b)) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t1 (a,b) VALUES (1070109,99);
|
||||
|
||||
CREATE TABLE t2 (b int, a int, PRIMARY KEY (b)) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t2 (b,a) VALUES (7,1070109);
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
BEGIN;
|
||||
|
||||
SELECT b FROM t2 WHERE b=7 FOR UPDATE;
|
||||
|
||||
CONNECT (addconroot, localhost, root,,);
|
||||
CONNECTION addconroot;
|
||||
|
||||
BEGIN;
|
||||
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
SELECT b FROM t2 WHERE b=7 FOR UPDATE;
|
||||
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
INSERT INTO t1 (a) VALUES ((SELECT a FROM t2 WHERE b=7));
|
||||
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
UPDATE t1 SET a='7000000' WHERE a=(SELECT a FROM t2 WHERE b=7);
|
||||
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
DELETE FROM t1 WHERE a=(SELECT a FROM t2 WHERE b=7);
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
CONNECTION default;
|
||||
DISCONNECT addconroot;
|
||||
|
||||
DROP TABLE t2, t1;
|
||||
|
||||
--echo End of 5.0 tests
|
@@ -1539,5 +1539,29 @@ DROP TABLE t1;
|
||||
create table `me:i`(id int);
|
||||
drop table `me:i`;
|
||||
|
||||
###########################################################################
|
||||
|
||||
#
|
||||
# Bug#45829 CREATE TABLE TRANSACTIONAL PAGE_CHECKSUM ROW_FORMAT=PAGE accepted, does nothing
|
||||
#
|
||||
|
||||
--echo
|
||||
--echo # --
|
||||
--echo # -- Bug#45829: CREATE TABLE TRANSACTIONAL PAGE_CHECKSUM ROW_FORMAT=PAGE accepted, does nothing
|
||||
--echo # --
|
||||
--echo
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3;
|
||||
--enable_warnings
|
||||
--error ER_PARSE_ERROR
|
||||
create table t1 (a int) transactional=0;
|
||||
--error ER_PARSE_ERROR
|
||||
create table t2 (a int) page_checksum=1;
|
||||
--error ER_PARSE_ERROR
|
||||
create table t3 (a int) row_format=page;
|
||||
--echo
|
||||
--echo # -- End of Bug#45829
|
||||
|
||||
--echo
|
||||
--echo End of 5.1 tests
|
||||
|
@@ -56,3 +56,54 @@ select hex(s1), hex(convert(s1 using utf8)) from t1 order by binary s1;
|
||||
drop table t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
|
||||
--echo Start of 5.4 tests
|
||||
|
||||
--echo #
|
||||
--echo # WL#3997 New euckr characters
|
||||
--echo #
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE t1 (a varchar(10) character set euckr);
|
||||
INSERT INTO t1 VALUES (0xA2E6), (0xA2E7);
|
||||
SELECT hex(a), hex(@utf8:=convert(a using utf8)), hex(convert(@utf8 using euckr)) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # WL#3332 Korean Enhancements
|
||||
--echo # euckr valid codes are now [81..FE][41..5A,61..7A,81..FE]
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a binary(1), key(a));
|
||||
--disable_query_log
|
||||
let $1=255;
|
||||
while($1)
|
||||
{
|
||||
eval INSERT INTO t1 VALUES (unhex(hex($1)));
|
||||
dec $1;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
CREATE TABLE t2 (s VARCHAR(4), a VARCHAR(1) CHARACTER SET euckr);
|
||||
--disable_warnings
|
||||
INSERT INTO t2
|
||||
SELECT hex(concat(t11.a, t12.a)), concat(t11.a, t12.a)
|
||||
FROM t1 t11, t1 t12
|
||||
WHERE t11.a >= 0x81 AND t11.a <= 0xFE
|
||||
AND t12.a >= 0x41 AND t12.a <= 0xFE
|
||||
ORDER BY t11.a, t12.a;
|
||||
--enable_warnings
|
||||
SELECT s as bad_code FROM t2 WHERE a='' ORDER BY s;
|
||||
DELETE FROM t2 WHERE a='';
|
||||
ALTER TABLE t2 ADD u VARCHAR(1) CHARACTER SET utf8, ADD a2 VARCHAR(1) CHARACTER SET euckr;
|
||||
--disable_warnings
|
||||
UPDATE t2 SET u=a, a2=u;
|
||||
--enable_warnings
|
||||
SELECT s as unassigned_code FROM t2 WHERE u='?';
|
||||
DELETE FROM t2 WHERE u='?';
|
||||
# Make sure there are no euckr->utf8->euckr roundtrip problems
|
||||
SELECT count(*) as roundtrip_problem_chars FROM t2 WHERE hex(a) <> hex(a2);
|
||||
SELECT s, hex(a), hex(u), hex(a2) FROM t2 ORDER BY s;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo End of 5.4 tests
|
||||
|
@@ -471,3 +471,16 @@ CREATE TABLE t1(a VARCHAR(64), FULLTEXT(a));
|
||||
INSERT INTO t1 VALUES('awrd bwrd cwrd'),('awrd bwrd cwrd'),('awrd bwrd cwrd');
|
||||
SELECT * FROM t1 WHERE MATCH(a) AGAINST('+awrd bwrd* +cwrd*' IN BOOLEAN MODE);
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# BUG#37740 Server crashes on execute statement with full text search and match against
|
||||
#
|
||||
CREATE TABLE t1 (col text, FULLTEXT KEY full_text (col));
|
||||
|
||||
PREPARE s FROM
|
||||
"SELECT MATCH (col) AGAINST('findme') FROM t1 ORDER BY MATCH (col) AGAINST('findme')"
|
||||
;
|
||||
|
||||
EXECUTE s;
|
||||
DEALLOCATE PREPARE s;
|
||||
DROP TABLE t1;
|
||||
|
@@ -36,9 +36,15 @@ rollback;
|
||||
connection b;
|
||||
reap;
|
||||
rollback;
|
||||
|
||||
# Cleanup
|
||||
connection a;
|
||||
disconnect a;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection b;
|
||||
disconnect b;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
drop table t1;
|
||||
drop function f1;
|
||||
disconnect a;
|
||||
disconnect b;
|
||||
SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
|
||||
|
@@ -394,3 +394,24 @@ check table t2 extended;
|
||||
drop table t1,t2;
|
||||
--echo ##################################################################
|
||||
|
||||
--echo #
|
||||
--echo # Bug #46075: Assertion failed: 0, file .\protocol.cc, line 416
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(a INT);
|
||||
# To force MyISAM temp. table in the following INSERT ... SELECT.
|
||||
SET max_heap_table_size = 16384;
|
||||
# To overflow the temp. table.
|
||||
SET @old_myisam_data_pointer_size = @@myisam_data_pointer_size;
|
||||
SET GLOBAL myisam_data_pointer_size = 2;
|
||||
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
|
||||
|
||||
--error ER_RECORD_FILE_FULL,ER_RECORD_FILE_FULL
|
||||
INSERT IGNORE INTO t1 SELECT t1.a FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6,t1 t7;
|
||||
|
||||
# Cleanup
|
||||
SET GLOBAL myisam_data_pointer_size = @old_myisam_data_pointer_size;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
@@ -1515,6 +1515,49 @@ insert into m1 (col1) values (1);
|
||||
|
||||
drop table m1, t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#45800 crash when replacing into a merge table and there is a duplicate
|
||||
--echo #
|
||||
|
||||
--echo # Replace duplicate value in child table when merge table doesn't have key
|
||||
CREATE TABLE t1 (c1 INT PRIMARY KEY) ENGINE=MyISAM;
|
||||
CREATE TABLE m1 (c1 INT NOT NULL) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||
INSERT INTO m1 VALUES (666);
|
||||
SELECT * FROM m1;
|
||||
--echo # insert the duplicate value into the merge table
|
||||
REPLACE INTO m1 VALUES (666);
|
||||
SELECT * FROM m1;
|
||||
DROP TABLE m1, t1;
|
||||
|
||||
--echo # Insert... on duplicate key update (with duplicate values in the table)
|
||||
CREATE TABLE t1 (c1 INT PRIMARY KEY) ENGINE=MyISAM;
|
||||
CREATE TABLE m1 (c1 INT NOT NULL) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||
INSERT INTO m1 VALUES (666);
|
||||
SELECT * FROM m1;
|
||||
--echo # insert the duplicate value into the merge table
|
||||
INSERT INTO m1 VALUES (666) ON DUPLICATE KEY UPDATE c1=c1+1;
|
||||
SELECT * FROM m1;
|
||||
DROP TABLE m1, t1;
|
||||
|
||||
--echo # Insert duplicate value on MERGE table, where, MERGE has a key but MyISAM has more keys
|
||||
CREATE TABLE t1 (c1 INT, c2 INT, UNIQUE (c1), UNIQUE (c2));
|
||||
CREATE TABLE m1 (c1 INT, c2 INT, UNIQUE (c1)) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||
INSERT INTO m1 VALUES (1,2);
|
||||
--echo # insert the duplicate value into the merge table
|
||||
--error ER_DUP_ENTRY
|
||||
INSERT INTO m1 VALUES (3,2);
|
||||
DROP TABLE m1,t1;
|
||||
|
||||
--echo # Try to define MERGE and MyISAM with keys on different columns
|
||||
CREATE TABLE t1 (c1 INT, c2 INT, UNIQUE (c1));
|
||||
CREATE TABLE m1 (c1 INT, c2 INT, UNIQUE (c2)) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||
--echo # Try accessing the merge table for inserts (error occurs)
|
||||
--error ER_WRONG_MRG_TABLE
|
||||
INSERT INTO m1 VALUES (1,2);
|
||||
--error ER_WRONG_MRG_TABLE
|
||||
INSERT INTO m1 VALUES (1,4);
|
||||
DROP TABLE m1,t1;
|
||||
|
||||
#
|
||||
#Bug #44040 MySQL allows creating a MERGE table upon VIEWs but crashes
|
||||
#when using it
|
||||
@@ -1555,4 +1598,28 @@ SELECT * FROM m1;
|
||||
DROP TABLE m1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug45781 infinite hang/crash in "opening tables" after handler tries to
|
||||
--echo # open merge table
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS m1,t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1(a int)engine=myisam;
|
||||
CREATE TABLE t2(a int)engine=myisam;
|
||||
CREATE TABLE t3(a int)engine=myisam;
|
||||
CREATE TABLE t4(a int)engine=myisam;
|
||||
CREATE TABLE t5(a int)engine=myisam;
|
||||
CREATE TABLE t6(a int)engine=myisam;
|
||||
CREATE TABLE t7(a int)engine=myisam;
|
||||
CREATE TABLE m1(a int)engine=merge union=(t1,t2,t3,t4,t5,t6,t7);
|
||||
SELECT 1 FROM m1;
|
||||
--error ER_ILLEGAL_HA
|
||||
HANDLER m1 OPEN;
|
||||
DROP TABLE m1,t1,t2,t3,t4,t5,t6,t7;
|
||||
--error ER_NO_SUCH_TABLE
|
||||
SELECT 1 FROM m1; # Should not hang!
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@@ -387,5 +387,19 @@ drop tables t1, t2;
|
||||
#
|
||||
--exec $MYSQL --html test -e "select '< & >' as '<'"
|
||||
|
||||
#
|
||||
# Bug #27884: mysql client + null byte
|
||||
#
|
||||
create table t1 (a char(5));
|
||||
insert into t1 values ('\0b\0');
|
||||
--exec $MYSQL test -e "select a from t1"
|
||||
--exec $MYSQL -r test -e "select a from t1"
|
||||
--exec $MYSQL -s test -e "select a from t1"
|
||||
--exec $MYSQL --table test -e "select a from t1"
|
||||
--exec $MYSQL --vertical test -e "select a from t1"
|
||||
--exec $MYSQL --html test -e "select a from t1"
|
||||
--exec $MYSQL --xml test -e "select a from t1"
|
||||
drop table t1;
|
||||
|
||||
--echo
|
||||
--echo End of tests
|
||||
|
@@ -7,6 +7,26 @@
|
||||
select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade;
|
||||
--enable_query_log
|
||||
|
||||
#
|
||||
# Hack:
|
||||
#
|
||||
# If running with Valgrind ($VALGRIND_TEST <> 0) then the resource
|
||||
# consumption (CPU) for upgrading a large log table will be intense.
|
||||
# Therefore, truncate the log table in advance and issue a statement
|
||||
# that should be logged.
|
||||
#
|
||||
if (`SELECT $VALGRIND_TEST`)
|
||||
{
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
--disable_abort_on_error
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
SELECT 1;
|
||||
--enable_abort_on_error
|
||||
--enable_result_log
|
||||
--enable_query_log
|
||||
}
|
||||
|
||||
#
|
||||
# Basic test that we can run mysql_upgrde and that it finds the
|
||||
# expected binaries it uses.
|
||||
|
@@ -193,5 +193,22 @@ DROP DATABASE `a@b`;
|
||||
|
||||
USE test;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #31821: --all-in-1 and --fix-table-names don't work together
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists `#mysql50#t1-1`;
|
||||
--enable_warnings
|
||||
|
||||
create table `#mysql50#t1-1` (a int);
|
||||
--exec $MYSQL_CHECK --all-in-1 --fix-table-names --databases test
|
||||
show tables like 't1-1';
|
||||
drop table `t1-1`;
|
||||
|
||||
create table `#mysql50#t1-1` (a int);
|
||||
--exec $MYSQL_CHECK --all-in-1 --fix-table-names test "#mysql50#t1-1"
|
||||
show tables like 't1-1';
|
||||
drop table `t1-1`;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@@ -1496,8 +1496,11 @@ INSERT INTO t1 VALUES (1), (2);
|
||||
--exec $MYSQL_DUMP --tab=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test
|
||||
|
||||
@@ -1947,8 +1950,50 @@ DROP DATABASE mysqldump_test_db;
|
||||
--echo # -- End of test case for Bug#32538.
|
||||
--echo
|
||||
|
||||
# We reset concurrent_inserts value to whatever it was at the start of the test
|
||||
# This line must be executed _after_ all test cases.
|
||||
--echo #
|
||||
--echo # Bug#37377 Incorrect DROP TABLE statement in dump of a VIEW using --tab
|
||||
--echo #
|
||||
|
||||
create table t1 (a int);
|
||||
create view v1 as select a from t1;
|
||||
|
||||
--exec $MYSQL_DUMP --skip-comments --tab=$MYSQLTEST_VARDIR/tmp/ test t1 v1
|
||||
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t1.sql
|
||||
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/v1.sql
|
||||
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/v1.sql
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#28071 mysqlimport does not quote or escape table name
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists `load`;
|
||||
--enable_warnings
|
||||
create table `load` (a varchar(255));
|
||||
|
||||
--copy_file std_data/words.dat $MYSQLTEST_VARDIR/tmp/load.txt
|
||||
|
||||
--exec $MYSQL_IMPORT --ignore test $MYSQLTEST_VARDIR/tmp/load.txt
|
||||
|
||||
select count(*) from `load`;
|
||||
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/load.txt
|
||||
|
||||
drop table `load`;
|
||||
|
||||
# We reset concurrent_inserts value to whatever it was at the start of the
|
||||
# test This line must be executed _after_ all test cases.
|
||||
SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT;
|
||||
|
||||
|
||||
@@ -2007,6 +2052,88 @@ DROP TABLE IF EXISTS t1;
|
||||
|
||||
###########################################################################
|
||||
|
||||
--echo #
|
||||
--echo # Bug #30946: mysqldump silently ignores --default-character-set
|
||||
--echo # when used with --tab
|
||||
--echo #
|
||||
--echo # Also see outfile_loaddata.test
|
||||
--echo #
|
||||
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE t1 (a INT, b CHAR(10) CHARSET koi8r, c CHAR(10) CHARSET latin1);
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
INSERT INTO t1 VALUES (1, 'ABC-АБВ', 'DEF-ÂÃÄ'), (2, NULL, NULL);
|
||||
|
||||
--let $file=$MYSQLTEST_VARDIR/tmp/t1.txt
|
||||
|
||||
|
||||
--echo # error on multi-character ENCLOSED/ESCAPED BY
|
||||
|
||||
--error 2
|
||||
--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-enclosed-by='12345' test t1
|
||||
--remove_file $file
|
||||
|
||||
--error 2
|
||||
--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-escaped-by='12345' test t1
|
||||
--remove_file $file
|
||||
|
||||
--echo # default '--default-charset' (binary):
|
||||
|
||||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --tab=$MYSQLTEST_VARDIR/tmp/ test t1
|
||||
--echo ##################################################
|
||||
--cat_file $file
|
||||
--echo ##################################################
|
||||
TRUNCATE t2;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary
|
||||
--remove_file $file
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
|
||||
|
||||
--echo # utf8:
|
||||
|
||||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --default-character-set=utf8 --tab=$MYSQLTEST_VARDIR/tmp/ test t1
|
||||
--echo ##################################################
|
||||
--cat_file $file
|
||||
--echo ##################################################
|
||||
TRUNCATE t2;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET utf8
|
||||
--remove_file $file
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
|
||||
|
||||
--echo # latin1 (data corruption is expected):
|
||||
|
||||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --default-character-set=latin1 --tab=$MYSQLTEST_VARDIR/tmp/ test t1
|
||||
--echo ##################################################
|
||||
--cat_file $file
|
||||
--echo ##################################################
|
||||
TRUNCATE t2;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET latin1
|
||||
--remove_file $file
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
|
||||
|
||||
--echo # koi8r (data corruption is expected):
|
||||
|
||||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --default-character-set=koi8r --tab=$MYSQLTEST_VARDIR/tmp/ test t1
|
||||
--echo ##################################################
|
||||
--cat_file $file
|
||||
--echo ##################################################
|
||||
TRUNCATE t2;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET koi8r
|
||||
--remove_file $file
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
|
||||
|
||||
SET NAMES default;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
###########################################################################
|
||||
--echo #
|
||||
--echo # End of 5.1 tests
|
||||
--echo #
|
||||
|
@@ -1361,3 +1361,44 @@ DROP TABLE t1;
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Bug#46454: MySQL wrong index optimisation leads to incorrect result & crashes
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
b INT NOT NULL,
|
||||
c char(100),
|
||||
KEY (b, c),
|
||||
KEY (b, a, c)
|
||||
)
|
||||
DEFAULT CHARSET = utf8;
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
(1, 1, 1),
|
||||
(2, 2, 2),
|
||||
(3, 3, 3),
|
||||
(4, 4, 4),
|
||||
(5, 5, 5),
|
||||
(6, 6, 6),
|
||||
(7, 7, 7),
|
||||
(8, 8, 8),
|
||||
(9, 9, 9);
|
||||
|
||||
INSERT INTO t1 SELECT a + 10, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 20, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 40, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 80, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 160, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 320, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 640, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 1280, b, c FROM t1 LIMIT 80;
|
||||
|
||||
EXPLAIN
|
||||
SELECT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 9;
|
||||
SELECT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 9;
|
||||
|
||||
EXPLAIN
|
||||
SELECT DISTINCT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 0, 9;
|
||||
SELECT DISTINCT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 0, 9;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
@@ -111,3 +111,146 @@ SELECT HEX(c1) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # End of 5.0 tests.
|
||||
|
||||
###########################################################################
|
||||
|
||||
--echo #
|
||||
--echo # Bug #30946: mysqldump silently ignores --default-character-set
|
||||
--echo # when used with --tab
|
||||
--echo #
|
||||
--echo # Also see mysqldump.test
|
||||
--echo #
|
||||
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE t1 (a INT, b CHAR(10) CHARSET koi8r, c CHAR(10) CHARSET latin1);
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
INSERT INTO t1 VALUES (1, 'ABC-АБВ', 'DEF-ÂÃÄ'), (2, NULL, NULL);
|
||||
|
||||
--let $file=$MYSQLTEST_VARDIR/tmp/t1.txt
|
||||
|
||||
|
||||
--echo # Error on multi-character ENCLOSED/ESCAPED BY
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--error 1083
|
||||
--eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ENCLOSED BY '12345'
|
||||
--remove_file $file
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--error 1083
|
||||
--eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ESCAPED BY '12345'
|
||||
--remove_file $file
|
||||
|
||||
|
||||
--echo # "Not implemented" warning on multibyte ENCLOSED/ESCAPED BY character,
|
||||
--echo # LOAD DATA rises error or has unpredictable result -- to be fixed later
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ENCLOSED BY 'ъ'
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--error 1083 # backward compatibility
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary FIELDS ENCLOSED BY 'ъ'
|
||||
--remove_file $file
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ESCAPED BY 'ъ'
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--error 1083 # backward compatibility
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary FIELDS ESCAPED BY 'ъ'
|
||||
--remove_file $file
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS TERMINATED BY 'ъ'
|
||||
--echo ##################################################
|
||||
--cat_file $file
|
||||
--echo ##################################################
|
||||
TRUNCATE t2;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary FIELDS TERMINATED BY 'ъ'
|
||||
--remove_file $file
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval SELECT * FROM t1 INTO OUTFILE '$file' LINES STARTING BY 'ъ'
|
||||
--echo ##################################################
|
||||
--cat_file $file
|
||||
--echo ##################################################
|
||||
TRUNCATE t2;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary LINES STARTING BY 'ъ'
|
||||
--remove_file $file
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval SELECT * FROM t1 INTO OUTFILE '$file' LINES TERMINATED BY 'ъ'
|
||||
--echo ##################################################
|
||||
--cat_file $file
|
||||
--echo ##################################################
|
||||
TRUNCATE t2;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary LINES TERMINATED BY 'ъ'
|
||||
--remove_file $file
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
|
||||
--echo # Default (binary) charset:
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval SELECT * INTO OUTFILE '$file' FROM t1
|
||||
--echo ##################################################
|
||||
--cat_file $file
|
||||
--echo ##################################################
|
||||
TRUNCATE t2;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary
|
||||
--remove_file $file
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
|
||||
|
||||
--echo # latin1 charset (INTO OUTFILE warning is expected):
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval SELECT * INTO OUTFILE '$file' CHARACTER SET latin1 FROM t1
|
||||
--echo ##################################################
|
||||
--cat_file $file
|
||||
--echo ##################################################
|
||||
TRUNCATE t2;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET latin1
|
||||
--remove_file $file
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
|
||||
|
||||
--echo # KOI8-R charset (INTO OUTFILE warning is expected):
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval SELECT * INTO OUTFILE '$file' CHARACTER SET koi8r FROM t1
|
||||
--echo ##################################################
|
||||
--cat_file $file
|
||||
--echo ##################################################
|
||||
TRUNCATE t2;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET koi8r
|
||||
--remove_file $file
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
|
||||
|
||||
--echo # UTF-8 charset:
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval SELECT * INTO OUTFILE '$file' CHARACTER SET utf8 FROM t1
|
||||
--echo ##################################################
|
||||
--cat_file $file
|
||||
--echo ##################################################
|
||||
TRUNCATE t2;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET utf8
|
||||
--remove_file $file
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||
|
||||
|
||||
SET NAMES default;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
###########################################################################
|
||||
--echo # End of 5.1 tests.
|
||||
|
@@ -10,8 +10,6 @@
|
||||
#
|
||||
--source include/have_partition.inc
|
||||
|
||||
SET @old_general_log= @@global.general_log;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1, t2;
|
||||
--enable_warnings
|
||||
@@ -1019,6 +1017,17 @@ subpartition by hash(a)
|
||||
(partition p0 values less than (0),
|
||||
partition p1 values less than (1) (subpartition sp0));
|
||||
|
||||
#
|
||||
# Bug 46354 Crash with subpartition
|
||||
#
|
||||
--error ER_PARSE_ERROR
|
||||
create table t1 (a int, b int)
|
||||
partition by list (a)
|
||||
subpartition by hash(a)
|
||||
(partition p0 values in (0),
|
||||
partition p1 values in (1) (subpartition sp0));
|
||||
|
||||
|
||||
#
|
||||
# BUG 15961 No error when subpartition defined without subpartition by clause
|
||||
#
|
||||
@@ -1640,23 +1649,6 @@ create trigger t_ad after delete on t for each row insert into t values (old.s1)
|
||||
insert into t values (1);
|
||||
drop table t;
|
||||
|
||||
#
|
||||
# Bug #27816: Log tables ran with partitions crashes the server when logging
|
||||
# is enabled.
|
||||
#
|
||||
|
||||
USE mysql;
|
||||
TRUNCATE TABLE general_log;
|
||||
SET @old_general_log_state = @@global.general_log;
|
||||
SET GLOBAL general_log = 0;
|
||||
ALTER TABLE general_log ENGINE = MyISAM;
|
||||
--error ER_WRONG_USAGE
|
||||
ALTER TABLE general_log PARTITION BY RANGE (TO_DAYS(event_time))
|
||||
(PARTITION p0 VALUES LESS THAN (733144), PARTITION p1 VALUES LESS THAN (3000000));
|
||||
ALTER TABLE general_log ENGINE = CSV;
|
||||
SET GLOBAL general_log = @old_general_log_state;
|
||||
use test;
|
||||
|
||||
#
|
||||
# Bug #27084 partitioning by list seems failing when using case
|
||||
# BUG #18198: Case no longer supported, test case removed
|
||||
@@ -1987,6 +1979,23 @@ CREATE TABLE t1(id INT,KEY(id)) ENGINE=MYISAM
|
||||
DROP TABLE t1;
|
||||
SET SESSION SQL_MODE=DEFAULT;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
SET @@global.general_log= @old_general_log;
|
||||
--echo #
|
||||
--echo # BUG#45816 - assertion failure with index containing double
|
||||
--echo # column on partitioned table
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a INT DEFAULT NULL,
|
||||
b DOUBLE DEFAULT NULL,
|
||||
c INT DEFAULT NULL,
|
||||
KEY idx2(b,a)
|
||||
) PARTITION BY HASH(c) PARTITIONS 3;
|
||||
|
||||
INSERT INTO t1 VALUES (6,8,9);
|
||||
INSERT INTO t1 VALUES (6,8,10);
|
||||
|
||||
SELECT 1 FROM t1 JOIN t1 AS t2 USING (a) FOR UPDATE;
|
||||
|
||||
DROP TABLE t1;
|
||||
--echo End of 5.1 tests
|
||||
|
@@ -24,15 +24,68 @@ partition by list (a)
|
||||
(partition p0 values in (null));
|
||||
|
||||
#
|
||||
# Bug#27816: Log tables ran with partitions crashes the server when logging
|
||||
# is enabled.
|
||||
# Bug #27816: Log tables ran with partitions crashes the server when logging
|
||||
# is enabled.
|
||||
#
|
||||
|
||||
USE mysql;
|
||||
TRUNCATE TABLE general_log;
|
||||
SET @old_general_log_state = @@global.general_log;
|
||||
SET GLOBAL general_log = 0;
|
||||
ALTER TABLE general_log ENGINE = MyISAM;
|
||||
--error ER_WRONG_USAGE
|
||||
ALTER TABLE general_log PARTITION BY RANGE (TO_DAYS(event_time))
|
||||
(PARTITION p0 VALUES LESS THAN (733144),
|
||||
PARTITION p1 VALUES LESS THAN (3000000));
|
||||
(PARTITION p0 VALUES LESS THAN (733144), PARTITION p1 VALUES LESS THAN (3000000));
|
||||
ALTER TABLE general_log ENGINE = CSV;
|
||||
SET GLOBAL general_log = @old_general_log_state;
|
||||
use test;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#40281: partitioning the general log table crashes the server
|
||||
--echo #
|
||||
|
||||
--echo # set up partitioned log, and switch to it
|
||||
|
||||
USE mysql;
|
||||
SET @old_general_log_state = @@global.general_log;
|
||||
SET GLOBAL general_log = 0;
|
||||
CREATE TABLE gl_partitioned LIKE general_log;
|
||||
ALTER TABLE gl_partitioned ENGINE=myisam;
|
||||
ALTER TABLE gl_partitioned PARTITION BY HASH (thread_id) PARTITIONS 10;
|
||||
ALTER TABLE general_log RENAME TO gl_nonpartitioned;
|
||||
ALTER TABLE gl_partitioned RENAME TO general_log;
|
||||
|
||||
SELECT @@global.log_output INTO @old_glo;
|
||||
SET GLOBAL log_output='table';
|
||||
SET GLOBAL general_log =1;
|
||||
|
||||
--echo # do some things to be logged to partitioned log, should fail
|
||||
USE /* 1 */ test;
|
||||
|
||||
CREATE TABLE t1 (i INT);
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1;
|
||||
disconnect con1;
|
||||
|
||||
connection default;
|
||||
USE mysql;
|
||||
SET GLOBAL general_log =0;
|
||||
ALTER TABLE general_log RENAME TO gl_partitioned;
|
||||
ALTER TABLE gl_nonpartitioned RENAME TO general_log;
|
||||
|
||||
--echo # show whether we actually logged anything (no) to general_log
|
||||
SELECT COUNT(argument) FROM gl_partitioned;
|
||||
|
||||
DROP TABLE gl_partitioned;
|
||||
|
||||
SET GLOBAL log_output = @old_glo;
|
||||
SET GLOBAL general_log = 1;
|
||||
|
||||
USE /* 2 */ test;
|
||||
DROP TABLE t1;
|
||||
|
||||
SET GLOBAL general_log = @old_general_log_state;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
53
mysql-test/t/partition_not_embedded.test
Normal file
53
mysql-test/t/partition_not_embedded.test
Normal file
@@ -0,0 +1,53 @@
|
||||
-- source include/have_partition.inc
|
||||
-- source include/not_embedded.inc
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
--enable_warnings
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
|
||||
#
|
||||
# Bug#30102: rename table does corrupt tables with partition files on failure
|
||||
#
|
||||
--echo # Bug#30102 test
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION p0 VALUES LESS THAN (6),
|
||||
PARTITION `p1....................` VALUES LESS THAN (9),
|
||||
PARTITION p2 VALUES LESS THAN MAXVALUE);
|
||||
# partition p1 is 't1#P#p1' + @002e * 20 = 107 characters + file ending
|
||||
# total path lenght of './test/t1#P#p1@002e@002e<...>@002e.MY[ID]' is 118 chars
|
||||
--echo # List of files in database `test`, all original t1-files here
|
||||
--list_files $MYSQLD_DATADIR/test t1*
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
--echo # Renaming to a file name where the first partition is 250 chars
|
||||
--echo # and the second partition is 350 chars
|
||||
# 7,7 avoids the error message, which is not deterministic.
|
||||
--error 7,7
|
||||
RENAME TABLE t1 TO `t2_new..............................................end`;
|
||||
# 1234567890123456789012345678901234567890123456
|
||||
--echo # List of files in database `test`, should not be any t2-files here
|
||||
--list_files $MYSQLD_DATADIR/test t2*
|
||||
--echo # List of files in database `test`, should be all t1-files here
|
||||
--list_files $MYSQLD_DATADIR/test t1*
|
||||
--sorted_result
|
||||
SELECT * FROM t1;
|
||||
--echo # List of files in database `test`, should be all t1-files here
|
||||
--list_files $MYSQLD_DATADIR/test t1*
|
||||
--echo # Renaming to a file name where the first partition is 156 chars
|
||||
--echo # and the second partition is 256 chars
|
||||
# 7,7 avoids the error message, which is not deterministic.
|
||||
--error 7,7
|
||||
RENAME TABLE t1 TO `t2_............................_end`;
|
||||
# 1234567890123456789012345678
|
||||
# 7 + 4 + 5 + 28 * 5 = 16 + 140 = 156
|
||||
--echo # List of files in database `test`, should not be any t2-files here
|
||||
--list_files $MYSQLD_DATADIR/test t2*
|
||||
--echo # List of files in database `test`, should be all t1-files here
|
||||
--list_files $MYSQLD_DATADIR/test t1*
|
||||
--sorted_result
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
--echo # Should not be any files left here
|
||||
--list_files $MYSQLD_DATADIR/test t1*
|
||||
--list_files $MYSQLD_DATADIR/test t2*
|
||||
--echo # End of bug#30102 test.
|
50
mysql-test/t/partition_rename_longfilename.test
Normal file
50
mysql-test/t/partition_rename_longfilename.test
Normal file
@@ -0,0 +1,50 @@
|
||||
-- source include/not_windows.inc
|
||||
-- source include/have_partition.inc
|
||||
-- source include/not_embedded.inc
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
--enable_warnings
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
|
||||
#
|
||||
# Bug#30102: rename table does corrupt tables with partition files on failure
|
||||
# This test case renames the table such that the partition file name
|
||||
# is 255 chars long. Due the restriction of 260 char path name (including drive label)
|
||||
# this will fail in windows.
|
||||
# Other tests related to this bug can be found in partition_not_embedded.test
|
||||
#
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION p0 VALUES LESS THAN (6),
|
||||
PARTITION `p1....................` VALUES LESS THAN (9),
|
||||
PARTITION p2 VALUES LESS THAN MAXVALUE);
|
||||
# partition p1 is 't1#P#p1' + @002e * 20 = 107 characters + file ending
|
||||
# total path lenght of './test/t1#P#p1@002e@002e<...>@002e.MY[ID]' is 118 chars
|
||||
--echo # List of files in database `test`, all original t1-files here
|
||||
--list_files $MYSQLD_DATADIR/test t1*
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
--echo # Renaming to a file name where the first partition is 155 chars
|
||||
--echo # and the second partition is 255 chars
|
||||
RENAME TABLE t1 TO `t2_............................end`;
|
||||
# 1234567890123456789012345678
|
||||
# t2_ + end
|
||||
# .MY[ID] or .frm
|
||||
# #P#p[012]
|
||||
# 28 * @002e
|
||||
# 6 + 4 + 5 + 28 * 5 = 155
|
||||
--echo # List of files in database `test`, should not be any t1-files here
|
||||
--list_files $MYSQLD_DATADIR/test t1*
|
||||
--echo # List of files in database `test`, should be all t2-files here
|
||||
--list_files $MYSQLD_DATADIR/test t2*
|
||||
--sorted_result
|
||||
SELECT * FROM `t2_............................end`;
|
||||
RENAME TABLE `t2_............................end` to t1;
|
||||
--echo # List of files in database `test`, should be all t1-files here
|
||||
--list_files $MYSQLD_DATADIR/test t1*
|
||||
--sorted_result
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
--echo # Should not be any files left here
|
||||
--list_files $MYSQLD_DATADIR/test t1*
|
||||
--list_files $MYSQLD_DATADIR/test t2*
|
||||
--echo # End of bug#30102 test.
|
@@ -380,3 +380,39 @@ set @@global.concurrent_insert= @old_concurrent_insert;
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al.
|
||||
--echo #
|
||||
SELECT GET_LOCK('Bug44521', 0);
|
||||
--connect (con1,localhost,root,,)
|
||||
--echo ** Connection con1
|
||||
delimiter $;
|
||||
CREATE PROCEDURE p()
|
||||
BEGIN
|
||||
SELECT 1;
|
||||
SELECT GET_LOCK('Bug44521', 100);
|
||||
SELECT 2;
|
||||
END$
|
||||
delimiter ;$
|
||||
--send CALL p();
|
||||
--connection default
|
||||
--echo ** Default connection
|
||||
let $wait_condition=
|
||||
SELECT count(*) = 1 FROM information_schema.processlist
|
||||
WHERE state = "User lock" AND info = "SELECT GET_LOCK('Bug44521', 100)";
|
||||
--source include/wait_condition.inc
|
||||
let $conid =
|
||||
`SELECT id FROM information_schema.processlist
|
||||
WHERE state = "User lock" AND info = "SELECT GET_LOCK('Bug44521', 100)"`;
|
||||
dirty_close con1;
|
||||
SELECT RELEASE_LOCK('Bug44521');
|
||||
let $wait_condition=
|
||||
SELECT count(*) = 0 FROM information_schema.processlist
|
||||
WHERE id = $conid;
|
||||
--source include/wait_condition.inc
|
||||
DROP PROCEDURE p;
|
||||
|
||||
--echo # ------------------------------------------------------------------
|
||||
--echo # -- End of 5.1 tests
|
||||
--echo # ------------------------------------------------------------------
|
||||
|
@@ -3315,6 +3315,27 @@ EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE 1 IN (SELECT 1 FROM t1 GROUP BY a);
|
||||
EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE 1 IN (SELECT 1 FROM t1 WHERE a > 3 GROUP BY a);
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#45061: Incorrectly market field caused wrong result.
|
||||
--echo #
|
||||
CREATE TABLE `C` (
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`int_key` int(11) NOT NULL,
|
||||
KEY `int_key` (`int_key`)
|
||||
);
|
||||
|
||||
INSERT INTO `C` VALUES (9,9), (0,0), (8,6), (3,6), (7,6), (0,4),
|
||||
(1,7), (9,4), (0,8), (9,4), (0,7), (5,5), (0,0), (8,5), (8,7),
|
||||
(5,2), (1,8), (7,0), (0,9), (9,5);
|
||||
|
||||
--disable_warnings
|
||||
SELECT * FROM C WHERE `int_key` IN (SELECT `int_nokey`);
|
||||
EXPLAIN EXTENDED SELECT * FROM C WHERE `int_key` IN (SELECT `int_nokey`);
|
||||
--enable_warnings
|
||||
|
||||
DROP TABLE C;
|
||||
--echo # End of test for bug#45061.
|
||||
|
||||
--echo End of 5.0 tests.
|
||||
|
||||
#
|
||||
|
@@ -517,3 +517,111 @@
|
||||
fun:dlopen*
|
||||
}
|
||||
|
||||
#
|
||||
# BUG#45630
|
||||
# Suppress valgrind failures within nptl_pthread_exit_hack_handler on Ubuntu 9.04, x86 (but not amd64)
|
||||
#
|
||||
|
||||
{
|
||||
Mem loss within nptl_pthread_exit_hack_handler 1
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/libc-*.so
|
||||
obj:*/ld-*.so
|
||||
fun:__libc_dlopen_mode
|
||||
fun:pthread_cancel_init
|
||||
fun:_Unwind_ForcedUnwind
|
||||
fun:__pthread_unwind
|
||||
fun:pthread_exit
|
||||
fun:nptl_pthread_exit_hack_handler
|
||||
fun:start_thread
|
||||
fun:clone
|
||||
}
|
||||
|
||||
{
|
||||
Mem loss within nptl_pthread_exit_hack_handler 2
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/libc-*.so
|
||||
obj:*/ld-*.so
|
||||
fun:__libc_dlopen_mode
|
||||
fun:pthread_cancel_init
|
||||
fun:_Unwind_ForcedUnwind
|
||||
fun:__pthread_unwind
|
||||
fun:pthread_exit
|
||||
fun:nptl_pthread_exit_hack_handler
|
||||
fun:start_thread
|
||||
fun:clone
|
||||
}
|
||||
|
||||
{
|
||||
Mem loss within nptl_pthread_exit_hack_handler 3
|
||||
Memcheck:Leak
|
||||
fun:calloc
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/libc-*.so
|
||||
obj:*/ld-*.so
|
||||
fun:__libc_dlopen_mode
|
||||
fun:pthread_cancel_init
|
||||
fun:_Unwind_ForcedUnwind
|
||||
fun:__pthread_unwind
|
||||
fun:pthread_exit
|
||||
fun:nptl_pthread_exit_hack_handler
|
||||
fun:start_thread
|
||||
fun:clone
|
||||
}
|
||||
|
||||
{
|
||||
Mem loss within nptl_pthread_exit_hack_handler 4
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/libc-*.so
|
||||
obj:*/ld-*.so
|
||||
fun:__libc_dlopen_mode
|
||||
fun:pthread_cancel_init
|
||||
fun:_Unwind_ForcedUnwind
|
||||
fun:__pthread_unwind
|
||||
fun:pthread_exit
|
||||
fun:nptl_pthread_exit_hack_handler
|
||||
fun:start_thread
|
||||
}
|
||||
|
||||
{
|
||||
Mem loss within nptl_pthread_exit_hack_handler 5
|
||||
Memcheck:Leak
|
||||
fun:calloc
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/ld-*.so
|
||||
obj:*/libc-*.so
|
||||
obj:*/ld-*.so
|
||||
fun:__libc_dlopen_mode
|
||||
fun:pthread_cancel_init
|
||||
fun:_Unwind_ForcedUnwind
|
||||
fun:__pthread_unwind
|
||||
fun:pthread_exit
|
||||
fun:nptl_pthread_exit_hack_handler
|
||||
fun:start_thread
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user