Commit f05f760e authored by Satya B's avatar Satya B

Applying InnoDB snashot 5.0-ss4900, part 2. Fixes BUG#43309

1) BUG#43309 - Test main.innodb can't be run twice

Detailed revision comments:

r4701 | vasil | 2009-04-13 17:03:46 +0300 (Mon, 13 Apr 2009) | 6 lines
branches/5.0:

Fix Bug#43309 Test main.innodb can't be run twice

by making the innodb.test reentrant.
parent 8d06b4de
......@@ -1803,15 +1803,12 @@ Innodb_buffer_pool_pages_total 512
show status like "Innodb_page_size";
Variable_name Value
Innodb_page_size 16384
show status like "Innodb_rows_deleted";
Variable_name Value
Innodb_rows_deleted 73
show status like "Innodb_rows_inserted";
Variable_name Value
Innodb_rows_inserted 29734
show status like "Innodb_rows_updated";
Variable_name Value
Innodb_rows_updated 29532
innodb_rows_deleted
73
innodb_rows_inserted
29734
innodb_rows_updated
29532
show status like "Innodb_row_lock_waits";
Variable_name Value
Innodb_row_lock_waits 0
......
......@@ -13,6 +13,18 @@
-- source include/have_innodb.inc
# Save the original values of some variables in order to be able to
# estimate how much they have changed during the tests. Previously this
# test assumed that e.g. rows_deleted is 0 here and after deleting 23
# rows it expected that rows_deleted will be 23. Now we do not make
# assumptions about the values of the variables at the beginning, e.g.
# rows_deleted should be 23 + "rows_deleted before the test". This allows
# the test to be run multiple times without restarting the mysqld server.
# See Bug#43309 Test main.innodb can't be run twice
-- let $innodb_rows_deleted_orig = query_get_value(SHOW STATUS WHERE variable_name = 'innodb_rows_deleted', Value, 1)
-- let $innodb_rows_inserted_orig = query_get_value(SHOW STATUS WHERE variable_name = 'innodb_rows_inserted', Value, 1)
-- let $innodb_rows_updated_orig = query_get_value(SHOW STATUS WHERE variable_name = 'innodb_rows_updated', Value, 1)
#
# Small basic test with ignore
#
......@@ -1344,9 +1356,14 @@ drop table t1;
# uses previous ones(pages_created, rows_deleted, ...).
show status like "Innodb_buffer_pool_pages_total";
show status like "Innodb_page_size";
show status like "Innodb_rows_deleted";
show status like "Innodb_rows_inserted";
show status like "Innodb_rows_updated";
-- let $innodb_rows_deleted = query_get_value(SHOW STATUS WHERE variable_name = 'innodb_rows_deleted', Value, 1)
-- let $innodb_rows_inserted = query_get_value(SHOW STATUS WHERE variable_name = 'innodb_rows_inserted', Value, 1)
-- let $innodb_rows_updated = query_get_value(SHOW STATUS WHERE variable_name = 'innodb_rows_updated', Value, 1)
-- disable_query_log
-- eval SELECT $innodb_rows_deleted - $innodb_rows_deleted_orig AS innodb_rows_deleted
-- eval SELECT $innodb_rows_inserted - $innodb_rows_inserted_orig AS innodb_rows_inserted
-- eval SELECT $innodb_rows_updated - $innodb_rows_updated_orig AS innodb_rows_updated
-- enable_query_log
# Test for row locks InnoDB status variables.
show status like "Innodb_row_lock_waits";
......@@ -1365,6 +1382,8 @@ set global innodb_sync_spin_loops=20;
show variables like "innodb_sync_spin_loops";
# Test for innodb_thread_concurrency variable
# save the original value so we can restore it at the end
-- let $innodb_thread_concurrency_orig = query_get_value(SHOW VARIABLES WHERE variable_name = 'innodb_thread_concurrency', Value, 1)
show variables like "innodb_thread_concurrency";
set global innodb_thread_concurrency=1001;
show variables like "innodb_thread_concurrency";
......@@ -1372,6 +1391,10 @@ set global innodb_thread_concurrency=0;
show variables like "innodb_thread_concurrency";
set global innodb_thread_concurrency=16;
show variables like "innodb_thread_concurrency";
# restore the orginal value, this way the test can be run multiple times
-- disable_query_log
-- eval set global innodb_thread_concurrency = $innodb_thread_concurrency_orig
-- enable_query_log
# Test for innodb_concurrency_tickets variable
show variables like "innodb_concurrency_tickets";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment