Debian Codegraph @

mysql-test/suite/innodb/include/instant_add_column_exec_and_verify.inc

raw
1
2 --let $old_table_id = `SELECT table_id FROM information_schema.innodb_tables WHERE name like '%t1%';`
3
4 --let $old_instant_cols = `SELECT instant_cols FROM information_schema.innodb_tables WHERE name like '%t1%';`
5
6 --disable_warnings
7 --eval $instant_add_column
8 --enable_warnings
9
10 --let $table_id = `SELECT table_id FROM information_schema.innodb_tables WHERE name like '%t1%';`
11
12 --let $instant_cols = `SELECT instant_cols FROM information_schema.innodb_tables WHERE name like '%t1%';`
13
14 if ($old_table_id != $table_id)
15 {
16 --echo Table ID differed
17 }
18
19 if ($old_table_id == $table_id)
20 {
21 --echo Table id did not change
22 }
23
24 if ($old_instant_cols == 0)
25 {
26 --disable_query_log
27 --eval SELECT count(*) = $new_cols FROM information_schema.innodb_columns WHERE table_id = $table_id AND has_default = 1;
28 --enable_query_log
29 }
30
31 if ($old_instant_cols != 0)
32 {
33 --eval SELECT $old_instant_cols = instant_cols AS `Instant columns equal` FROM information_schema.innodb_tables WHERE name like '%t1%'
34 }
35
36 CHECK TABLE t1;