diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-05-21 20:54:41 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-05-21 20:54:41 +0200 |
commit | 1185420da0964b2f06d9fd91bd02d067b0a359de (patch) | |
tree | 0b4162e316a18fa6ce3f56ee447454b4c73d1805 /mysql-test/extra | |
parent | 431e042b5d76ed5fd219c39db798c9e7478731c8 (diff) | |
parent | 7f6f53a8df10c76f93848c8d06bc5af71051c525 (diff) | |
download | mariadb-git-1185420da0964b2f06d9fd91bd02d067b0a359de.tar.gz |
5.3 merge
Diffstat (limited to 'mysql-test/extra')
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_row_basic.test | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_row_basic.test b/mysql-test/extra/rpl_tests/rpl_row_basic.test index 8b070999ecf..c7570de3aba 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_basic.test +++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test @@ -2,13 +2,6 @@ # Basic tests of row-level logging # ---disable_query_log ---disable_result_log -# Add suppression for expected warning(s) in error log -call mtr.add_suppression("Can't find record in 't.'"); ---enable_query_log ---enable_result_log - # # First we test tables with only an index. # @@ -16,11 +9,11 @@ call mtr.add_suppression("Can't find record in 't.'"); #BUG#12662190 - COM_COMMIT IS NOT INCREMENTED FROM THE BINARY LOGS ON SLAVE, COM_BEGIN IS #Testing command counters -BEFORE #Storing the before counts of Slave -sync_slave_with_master; connection slave; -create temporary table stats -select variable_name as n, -variable_value as v from information_schema.global_status - where variable_name in ('com_commit','com_insert','com_delete','com_update'); +let $slave_com_commit_before= query_get_value(SHOW GLOBAL STATUS LIKE 'com_commit', Value, 1); +let $slave_com_insert_before= query_get_value(SHOW GLOBAL STATUS LIKE 'com_insert', Value, 1); +let $slave_com_delete_before= query_get_value(SHOW GLOBAL STATUS LIKE 'com_delete', Value, 1); +let $slave_com_update_before= query_get_value(SHOW GLOBAL STATUS LIKE 'com_update', Value, 1); connection master; eval CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)$extra_index_t1) ENGINE = $type ; @@ -60,11 +53,27 @@ SELECT * FROM t1 ORDER BY C1,C2; #Testing command counters -AFTER #Storing the after counts of Slave connection slave; - -insert stats -select variable_name, variable_value from information_schema.global_status - where variable_name in ('com_commit','com_insert','com_delete','com_update'); -select n, sum(v) from stats group by n; +let $slave_com_commit_after= query_get_value(SHOW GLOBAL STATUS LIKE 'com_commit', Value, 1); +let $slave_com_insert_after= query_get_value(SHOW GLOBAL STATUS LIKE 'com_insert', Value, 1); +let $slave_com_delete_after= query_get_value(SHOW GLOBAL STATUS LIKE 'com_delete', Value, 1); +let $slave_com_update_after= query_get_value(SHOW GLOBAL STATUS LIKE 'com_update', Value, 1); + +#Commit count check +--let $assert_text= Counter for COM_COMMIT is consistent with the number of actual commits +--let $assert_cond= $slave_com_commit_after - $slave_com_commit_before = 4 +--source include/assert.inc +#Insert count check +--let $assert_text= Counter for COM_INSERT is consistent with the number of actual inserts +--let $assert_cond= $slave_com_insert_after - $slave_com_insert_before = 2 +--source include/assert.inc +#Delete count check +--let $assert_text= Counter for COM_DELETE is consistent with the number of actual deletes +--let $assert_cond= $slave_com_delete_after - $slave_com_delete_before = 1 +--source include/assert.inc +#Update count check +--let $assert_text= Counter for COM_UPDATE is consistent with the number of actual updates +--let $assert_cond= $slave_com_update_after - $slave_com_update_before = 1 +--source include/assert.inc # Testing update with a condition that does not match any rows, but # which has a match for the index. |