| 
 | 1 | +#!/bin/sh  | 
 | 2 | + | 
 | 3 | +echo "=== Verifying Data Integrity ==="  | 
 | 4 | + | 
 | 5 | +# Verify original table key data is intact  | 
 | 6 | +run_sql "SELECT COUNT(*) as cnt FROM key_types_test.table_key_test;"  | 
 | 7 | +check_contains "cnt: 4"  | 
 | 8 | +run_sql "SELECT id, name, value FROM key_types_test.table_key_test ORDER BY id;"  | 
 | 9 | +check_contains "id: 1"  | 
 | 10 | +check_contains "name: test1"  | 
 | 11 | +check_contains "value: 100"  | 
 | 12 | +check_contains "id: 2"  | 
 | 13 | +check_contains "name: test2"  | 
 | 14 | +check_contains "value: 200"  | 
 | 15 | +check_contains "id: 3"  | 
 | 16 | +check_contains "name: test3"  | 
 | 17 | +check_contains "value: 300"  | 
 | 18 | + | 
 | 19 | +# Verify new table key data  | 
 | 20 | +run_sql "SELECT COUNT(*) as cnt FROM key_types_test.table_key_test2;"  | 
 | 21 | +check_contains "cnt: 1"  | 
 | 22 | +run_sql "SELECT id, name, value FROM key_types_test.table_key_test2 ORDER BY id;"  | 
 | 23 | +check_contains "id: 1"  | 
 | 24 | +check_contains "name: test1"  | 
 | 25 | +check_contains "value: 100"  | 
 | 26 | + | 
 | 27 | +# Verify original auto increment data  | 
 | 28 | +run_sql "SELECT COUNT(*) as cnt FROM key_types_test.auto_inc_test;"  | 
 | 29 | +check_contains "cnt: 4"  | 
 | 30 | +run_sql "SELECT id FROM key_types_test.auto_inc_test ORDER BY id;"  | 
 | 31 | +check_contains "id: 1"  | 
 | 32 | +check_contains "id: 2"  | 
 | 33 | +check_contains "id: 3"  | 
 | 34 | +check_contains "id: 4"  | 
 | 35 | + | 
 | 36 | +# Verify new auto increment data  | 
 | 37 | +run_sql "SELECT COUNT(*) as cnt FROM key_types_test.auto_inc_test2;"  | 
 | 38 | +check_contains "cnt: 2"  | 
 | 39 | +run_sql "SELECT id FROM key_types_test.auto_inc_test2 ORDER BY id;"  | 
 | 40 | +check_contains "id: 1"  | 
 | 41 | +check_contains "id: 2"  | 
 | 42 | + | 
 | 43 | +# Verify original sequence data  | 
 | 44 | +run_sql "SELECT COUNT(*) as cnt FROM key_types_test.sequence_test;"  | 
 | 45 | +check_contains "cnt: 4"  | 
 | 46 | +run_sql "SELECT id FROM key_types_test.sequence_test ORDER BY id;"  | 
 | 47 | +check_contains "id: 1"  | 
 | 48 | +check_contains "id: 3"  | 
 | 49 | +check_contains "id: 5"  | 
 | 50 | +check_contains "id: 7"  | 
 | 51 | + | 
 | 52 | +# Verify new sequence data  | 
 | 53 | +run_sql "SELECT COUNT(*) as cnt FROM key_types_test.sequence_test2;"  | 
 | 54 | +check_contains "cnt: 2"  | 
 | 55 | +run_sql "SELECT id FROM key_types_test.sequence_test2 ORDER BY id;"  | 
 | 56 | +check_contains "id: 1"  | 
 | 57 | +check_contains "id: 3"  | 
 | 58 | + | 
 | 59 | +# Verify original auto random data  | 
 | 60 | +run_sql "SELECT COUNT(*) as cnt FROM key_types_test.auto_random_test;"  | 
 | 61 | +check_contains "cnt: 4"  | 
 | 62 | +run_sql "SELECT name FROM key_types_test.auto_random_test ORDER BY id;"  | 
 | 63 | +check_contains "name: rand1"  | 
 | 64 | +check_contains "name: rand2"  | 
 | 65 | +check_contains "name: rand3"  | 
 | 66 | +check_contains "name: random4"  | 
 | 67 | + | 
 | 68 | +# Verify new auto random data  | 
 | 69 | +run_sql "SELECT COUNT(*) as cnt FROM key_types_test.auto_random_test2;"  | 
 | 70 | +check_contains "cnt: 2"  | 
 | 71 | +run_sql "SELECT name FROM key_types_test.auto_random_test2 ORDER BY id;"  | 
 | 72 | +check_contains "name: rand1"  | 
 | 73 | +check_contains "name: rand2"  | 
0 commit comments