-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
396 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# | ||
# MDEV-6255 DUPLICATE KEY Errors on SELECT .. GROUP BY that uses temporary and filesort | ||
# | ||
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET cp1251 COLLATE cp1251_ukrainian_ci); | ||
INSERT INTO t1 VALUES (0x20),(0x60),(0x6060),(0x606060); | ||
SELECT HEX(a) FROM t1 WHERE a=0x60; | ||
HEX(a) | ||
20 | ||
60 | ||
6060 | ||
606060 | ||
ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 3; | ||
SELECT HEX(a) FROM t1 WHERE a=0x60; | ||
HEX(a) | ||
20 | ||
60 | ||
6060 | ||
606060 | ||
DROP TABLE t1; | ||
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET koi8u COLLATE koi8u_general_ci); | ||
INSERT INTO t1 VALUES (0x20),(0x60),(0x6060),(0x606060); | ||
SELECT HEX(a) FROM t1 WHERE a=0x60; | ||
HEX(a) | ||
20 | ||
60 | ||
6060 | ||
606060 | ||
ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 3; | ||
SELECT HEX(a) FROM t1 WHERE a=0x60; | ||
HEX(a) | ||
20 | ||
60 | ||
6060 | ||
606060 | ||
DROP TABLE t1; | ||
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET cp1250 COLLATE cp1250_general_ci); | ||
INSERT INTO t1 VALUES (0x20),(0xA0),(0xA0A0),(0xA0A0A0); | ||
SELECT HEX(a) FROM t1 WHERE a=0xA0; | ||
HEX(a) | ||
20 | ||
A0 | ||
A0A0 | ||
A0A0A0 | ||
ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 3; | ||
SELECT HEX(a) FROM t1 WHERE a=0xA0; | ||
HEX(a) | ||
20 | ||
A0 | ||
A0A0 | ||
A0A0A0 | ||
DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
include/master-slave.inc | ||
[connection master] | ||
# | ||
# MDEV-6525 ; Problems with CREATE OR REPLACE under lock | ||
# | ||
CREATE TABLE t1 (a INT) ENGINE=InnoDB; | ||
CREATE FUNCTION f1() RETURNS INT RETURN ( SELECT MAX(a) FROM t1 ); | ||
connect con1,localhost,root,,test; | ||
CREATE TEMPORARY TABLE tmp (b INT) ENGINE=InnoDB; | ||
LOCK TABLE t1 WRITE; | ||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; | ||
CREATE OR REPLACE TABLE t1 LIKE tmp; | ||
SHOW CREATE TABLE t1; | ||
Table Create Table | ||
t1 CREATE TABLE `t1` ( | ||
`b` int(11) DEFAULT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 | ||
connection default; | ||
set session lock_wait_timeout=1; | ||
SELECT f1(); | ||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction | ||
set session lock_wait_timeout=@@global.lock_wait_timeout; | ||
SELECT f1(); | ||
connection con1; | ||
unlock tables; | ||
connection default; | ||
ERROR 42S22: Unknown column 'a' in 'field list' | ||
disconnect con1; | ||
drop function f1; | ||
drop table t1; | ||
include/rpl_end.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--source include/have_innodb.inc | ||
--source include/have_binlog_format_row_or_statement.inc | ||
--source include/have_metadata_lock_info.inc | ||
--source include/master-slave.inc | ||
--enable_connect_log | ||
|
||
--echo # | ||
--echo # MDEV-6525 ; Problems with CREATE OR REPLACE under lock | ||
--echo # | ||
|
||
CREATE TABLE t1 (a INT) ENGINE=InnoDB; | ||
CREATE FUNCTION f1() RETURNS INT RETURN ( SELECT MAX(a) FROM t1 ); | ||
|
||
--connect (con1,localhost,root,,test) | ||
|
||
CREATE TEMPORARY TABLE tmp (b INT) ENGINE=InnoDB; | ||
LOCK TABLE t1 WRITE; | ||
|
||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; | ||
|
||
CREATE OR REPLACE TABLE t1 LIKE tmp; | ||
SHOW CREATE TABLE t1; | ||
|
||
--connection default | ||
set session lock_wait_timeout=1; | ||
--error 1205 | ||
SELECT f1(); | ||
|
||
set session lock_wait_timeout=@@global.lock_wait_timeout; | ||
--send SELECT f1() | ||
--connection con1 | ||
# This is here just in case, any timeout should be ok | ||
--sleep 1 | ||
unlock tables; | ||
--connection default | ||
--error 1054 | ||
--reap | ||
--disconnect con1 | ||
|
||
# Cleanup | ||
drop function f1; | ||
drop table t1; | ||
--disable_connect_log | ||
--source include/rpl_end.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--source include/have_partition.inc | ||
|
||
--echo # | ||
--echo # MDEV-6255 DUPLICATE KEY Errors on SELECT .. GROUP BY that uses temporary and filesort | ||
--echo # | ||
|
||
# cp1251_ukrainian_ci: 0x20 SPACE is equal to 0x60 GRAVE ACCENT | ||
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET cp1251 COLLATE cp1251_ukrainian_ci); | ||
INSERT INTO t1 VALUES (0x20),(0x60),(0x6060),(0x606060); | ||
SELECT HEX(a) FROM t1 WHERE a=0x60; | ||
ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 3; | ||
SELECT HEX(a) FROM t1 WHERE a=0x60; | ||
DROP TABLE t1; | ||
|
||
# koi8u_general_ci: 0x20 SPACE is equal to 0x60 GRAVE ACCENT | ||
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET koi8u COLLATE koi8u_general_ci); | ||
INSERT INTO t1 VALUES (0x20),(0x60),(0x6060),(0x606060); | ||
SELECT HEX(a) FROM t1 WHERE a=0x60; | ||
ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 3; | ||
SELECT HEX(a) FROM t1 WHERE a=0x60; | ||
DROP TABLE t1; | ||
|
||
# cp1250_general_ci: 0x20 SPACE is equal to 0xA0 NO-BREAK SPACE | ||
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET cp1250 COLLATE cp1250_general_ci); | ||
INSERT INTO t1 VALUES (0x20),(0xA0),(0xA0A0),(0xA0A0A0); | ||
SELECT HEX(a) FROM t1 WHERE a=0xA0; | ||
ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 3; | ||
SELECT HEX(a) FROM t1 WHERE a=0xA0; | ||
DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.