| 1 |
# Author: Horst Hunger |
| 2 |
# Created: 2010-07-13 |
| 3 |
|
| 4 |
|
| 5 |
let $engine_table= INNODB; |
| 6 |
let $engine_part= INNODB; |
| 7 |
let $engine_subpart= INNODB; |
| 8 |
|
| 9 |
use test; |
| 10 |
|
| 11 |
--disable_result_log |
| 12 |
--disable_query_log |
| 13 |
--source suite/parts/inc/part_exch_tabs.inc |
| 14 |
--enable_result_log |
| 15 |
--enable_query_log |
| 16 |
|
| 17 |
# 13) Exchange with dynamic variables. |
| 18 |
SET @part= 'p0'; |
| 19 |
SET @part_tab= 'tp'; |
| 20 |
SET @table= 't_10'; |
| 21 |
SET @s= CONCAT('ALTER TABLE ',@part_tab,' EXCHANGE PARTITION ',@part,' WITH TABLE ',@table); |
| 22 |
PREPARE test_stmt1 FROM @s; |
| 23 |
EXECUTE test_stmt1; |
| 24 |
--sorted_result |
| 25 |
SELECT * FROM t_10; |
| 26 |
--sorted_result |
| 27 |
SELECT * FROM tp; |
| 28 |
DEALLOCATE PREPARE test_stmt1; |
| 29 |
|
| 30 |
SET @part_tab= 'tp'; |
| 31 |
SET @s= CONCAT('ALTER TABLE ',@part_tab,' EXCHANGE PARTITION ? WITH TABLE ?'); |
| 32 |
--error ER_PARSE_ERROR |
| 33 |
PREPARE test_stmt2 FROM @s; |
| 34 |
|
| 35 |
--source suite/parts/inc/part_exch_drop_tabs.inc |
| 36 |
|