| 1 |
CREATE DATABASE test_2; |
| 2 |
|
| 3 |
USE test; |
| 4 |
--disable_result_log |
| 5 |
--disable_query_log |
| 6 |
--source suite/parts/inc/part_exch_tabs.inc |
| 7 |
|
| 8 |
USE test_2; |
| 9 |
--source suite/parts/inc/part_exch_tabs.inc |
| 10 |
|
| 11 |
--enable_result_log |
| 12 |
--enable_query_log |
| 13 |
|
| 14 |
USE test; |
| 15 |
# 10) Exchanges with different databases. |
| 16 |
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE test_2.t_10; |
| 17 |
--sorted_result |
| 18 |
SELECT * FROM test_2.t_10; |
| 19 |
--sorted_result |
| 20 |
SELECT * FROM tp WHERE a BETWEEN 0 AND 10; |
| 21 |
# Back to former values. |
| 22 |
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE test_2.t_10; |
| 23 |
--sorted_result |
| 24 |
SELECT * FROM test_2.t_10; |
| 25 |
--sorted_result |
| 26 |
SELECT * FROM tp WHERE a BETWEEN 0 AND 10; |
| 27 |
ALTER TABLE tsp EXCHANGE PARTITION sp00 WITH TABLE test_2.tsp_00; |
| 28 |
--sorted_result |
| 29 |
SELECT * FROM test_2.tsp_00; |
| 30 |
--sorted_result |
| 31 |
SELECT * FROM tsp WHERE a BETWEEN 0 AND 10; |
| 32 |
# Back to former values. |
| 33 |
ALTER TABLE tsp EXCHANGE PARTITION sp00 WITH TABLE test_2.tsp_00; |
| 34 |
--sorted_result |
| 35 |
SELECT * FROM test_2.tsp_00; |
| 36 |
--sorted_result |
| 37 |
SELECT * FROM tsp WHERE a BETWEEN 0 AND 10; |
| 38 |
|
| 39 |
--source suite/parts/inc/part_exch_drop_tabs.inc |
| 40 |
USE test_2; |
| 41 |
--source suite/parts/inc/part_exch_drop_tabs.inc |
| 42 |
USE test; |
| 43 |
|
| 44 |
DROP DATABASE test_2; |
| 45 |
|