################################################################################ # # Verify that SELECT COUNT(*) FROM t1 is never 0. # This should hold because we take care not to delete all rows from that table. # # There have been bugs in the past where this query sporadically has returned # 0 for non-empty tables. # ################################################################################ SET autocommit = 0; START TRANSACTION; --echo *** Running query: SELECT COUNT(*) FROM t1 let $count= `SELECT COUNT(*) FROM t1`; if (!$count) { # count was zero (0) --echo FAIL! SELECT COUNT(*) returned 0 - this should neven happen. } # Check that the count of rows with pk divisible by 5 is constant. # This should hold because # a) We do not delete rows with pk MOD 5 = 0 # b) We cannot insert new pk's below the initial auto_increment counter (see init test). SELECT COUNT(*) FROM t1 WHERE `pk` MOD 5 = 0 AND `pk` BETWEEN 1 AND 1000; --sleep 1 SELECT COUNT(*) FROM t1 WHERE `pk` MOD 5 = 0 AND `pk` BETWEEN 1 AND 1000; COMMIT;
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
init_innodb.test | File | 110 B | 0644 |
|
rr_c_count_not_zero.test | File | 1.02 KB | 0644 |
|
rr_c_stats.test | File | 131 B | 0644 |
|
rr_i_40-44.test | File | 5.54 KB | 0644 |
|
rr_id_3.test | File | 995 B | 0644 |
|
rr_id_900.test | File | 5.74 KB | 0644 |
|
rr_insert_select_2.test | File | 2.11 KB | 0644 |
|
rr_iud_rollback-multi-50.test | File | 3.02 KB | 0644 |
|
rr_replace_7-8.test | File | 3.87 KB | 0644 |
|
rr_s_select-uncommitted.test | File | 387 B | 0644 |
|
rr_sc_select-limit-nolimit_4.test | File | 2.34 KB | 0644 |
|
rr_sc_select-same_2.test | File | 1.93 KB | 0644 |
|
rr_sc_sum_total.test | File | 968 B | 0644 |
|
rr_u_10-19.test | File | 15.41 KB | 0644 |
|
rr_u_10-19_nolimit.test | File | 15.03 KB | 0644 |
|
rr_u_4.test | File | 1.36 KB | 0644 |
|