| 1 |
########################################################################## |
| 2 |
# Test script to test UPGRADE from older version table having |
| 3 |
# INSTANT ADD columns. |
| 4 |
# |
| 5 |
# $row_format is to be set to the row_format on which test is to be run. |
| 6 |
########################################################################## |
| 7 |
|
| 8 |
--echo # ------------------------------------------------------------ |
| 9 |
--echo # Start server with old datadir with |
| 10 |
--echo # table t1_$row_format having |
| 11 |
--echo # id, c1, c2 normal columns |
| 12 |
--echo # c3 INSTANT ADD column with default. |
| 13 |
--echo # ------------------------------------------------------------ |
| 14 |
|
| 15 |
--disable_warnings |
| 16 |
eval SHOW CREATE TABLE t1_$row_format; |
| 17 |
--enable_warnings |
| 18 |
|
| 19 |
--echo # ------------------------------------------------------------ |
| 20 |
--echo # Read rows from upgraded table t1_$row_format |
| 21 |
--echo # ------------------------------------------------------------ |
| 22 |
--let $table_name=t1_$row_format |
| 23 |
--source suite/innodb/include/print_instant_metadata.inc |
| 24 |
eval SELECT id, LEFT(c1 , 10), LEFT(c2, 10), LEFT(c3, 10) FROM t1_$row_format ORDER BY id; |
| 25 |
|
| 26 |
--echo # ------------------------------------------------------------ |
| 27 |
--echo # Run an UPDATE and ROLLBACK. |
| 28 |
--echo # ------------------------------------------------------------ |
| 29 |
START TRANSACTION; |
| 30 |
eval UPDATE t1_$row_format SET c1 = repeat('x', 200) WHERE id = 1; |
| 31 |
eval SELECT id, LEFT(c1 , 10), LEFT(c2, 10), LEFT(c3, 10) FROM t1_$row_format ORDER BY id; |
| 32 |
ROLLBACK; |
| 33 |
eval SELECT id, LEFT(c1 , 10), LEFT(c2, 10), LEFT(c3, 10) FROM t1_$row_format ORDER BY id; |