| 1 |
#==== Purpose ==== |
| 2 |
# |
| 3 |
# Verify that there is no crash in the server while executing the command |
| 4 |
# INSERT..SELECT..LIMIT on a partitioned table in binlog_format='mixed'. |
| 5 |
# |
| 6 |
# ==== Implementation ==== |
| 7 |
# |
| 8 |
# 1. Create a partitioned table 'employees' and insert a row in it. |
| 9 |
# 2. Create a non-partitioned table t1 and insert a row in it. |
| 10 |
# 3. Execute the command INSERT..SELECT..LIMIT on partition table |
| 11 |
# employees. |
| 12 |
# 4. Execute SHOW BINLOG EVENTS command to ensure the server didn't crash. |
| 13 |
# 5. Clean up. |
| 14 |
# |
| 15 |
# ==== References ==== |
| 16 |
# |
| 17 |
# Bug#29170679:ASSERT FAILURE IN EXECUTING INSERT..SELECT..LIMIT STMT IN PARTITION TABLE IN MBR |
| 18 |
|
| 19 |
# Run this test in mixed mode as that is where the crash is seen. |
| 20 |
--source include/have_binlog_format_mixed.inc |
| 21 |
|
| 22 |
RESET MASTER; |
| 23 |
|
| 24 |
CREATE TABLE employees (store_id INT NOT NULL) PARTITION BY RANGE (store_id) |
| 25 |
( PARTITION p0 VALUES LESS THAN (10), PARTITION p1 VALUES LESS THAN (20), |
| 26 |
PARTITION p2 VALUES LESS THAN (30)); |
| 27 |
INSERT INTO employees VALUES (5); |
| 28 |
|
| 29 |
CREATE TABLE t1 (m INT); |
| 30 |
INSERT INTO t1 VALUES (9); |
| 31 |
INSERT INTO employees SELECT 5 FROM t1 LIMIT 3; |
| 32 |
--source include/show_binlog_events.inc |
| 33 |
|
| 34 |
#Cleanup |
| 35 |
DROP TABLE employees; |
| 36 |
DROP TABLE t1; |