| 1 |
########################################################################## |
| 2 |
# Test script to test UPGRADE from older version table having |
| 3 |
# INSTANT ADD columns and try UPDATE/ROLLBACK on them. The tables have |
| 4 |
# row fitting exactly to page bounday and UPDATE will cause fields to be |
| 5 |
# stored off page. Whereas ROLLBACK shall bring it back to in page. |
| 6 |
|
| 7 |
# NOTE : This behavior isn't there for tables with row versions. |
| 8 |
# |
| 9 |
# $row_format is to be set to the row_format on which test is to be run. |
| 10 |
########################################################################## |
| 11 |
|
| 12 |
--echo # ------------------------------------------------------------ |
| 13 |
--echo # Start server with old datadir with |
| 14 |
--echo # table t1_$row_format having |
| 15 |
--echo # c1 normal column |
| 16 |
--echo # c2 INSTANT ADD column |
| 17 |
--echo # |
| 18 |
--echo # table t2_$row_format having |
| 19 |
--echo # id, c1 normal columns |
| 20 |
--echo # c2 INSTANT ADD column |
| 21 |
--echo # ------------------------------------------------------------ |
| 22 |
|
| 23 |
# ------------------- |
| 24 |
# Table t1 with no PK |
| 25 |
# ------------------- |
| 26 |
eval SHOW CREATE TABLE t1_$row_format; |
| 27 |
|
| 28 |
BEGIN; |
| 29 |
eval UPDATE t1_$row_format SET c2 = 0; |
| 30 |
ROLLBACK; |
| 31 |
|
| 32 |
eval SELECT SUBSTRING(c1, 1000, 32) FROM t1_$row_format; |
| 33 |
|
| 34 |
# ------------------- |
| 35 |
# Table t2 with PK |
| 36 |
# ------------------- |
| 37 |
eval SHOW CREATE TABLE t2_$row_format; |
| 38 |
|
| 39 |
BEGIN; |
| 40 |
eval UPDATE t2_$row_format SET c2 = 0; |
| 41 |
ROLLBACK; |
| 42 |
|
| 43 |
eval SELECT SUBSTRING(c1, 1000, 32) FROM t2_$row_format; |
| 44 |
|
| 45 |
|