mariadb/mysql-test/t/myisam-metadata.test
Michael Widenius 5cf5a9a1e8 Fixed timing failure in myisam-metadata.test
mysql-test/include/wait_show_condition.inc:
  Print failing statement if timeout
mysql-test/r/myisam-metadata.result:
  Updated DBUG_SYNC
mysql-test/t/myisam-metadata.test:
  Updated DBUG_SYNC.
  Removed wait_show_condtion, as this is not needed when we use DBUG_SYNC
  This should fix timing issues with the test
mysys/thr_mutex.c:
  Added comments
sql/sql_acl.cc:
  atoi -> atoll()  (Safety)
storage/myisam/ha_myisam.cc:
  Send signal before mi_repair_by_sort.
2013-06-06 15:51:36 +03:00

48 lines
905 B
Text

#
# Test bugs in MyISAM that may cause problems for metadata
#
--source include/big_test.inc
--source include/have_debug_sync.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
#
# LP:989055 - Querying myisam table metadata may corrupt the table
#
CREATE TABLE t1 (
id INT PRIMARY KEY,
a VARCHAR(100),
INDEX(a)
) ENGINE=MyISAM;
ALTER TABLE t1 DISABLE KEYS;
let $1=100000;
--disable_query_log
while ($1)
{
eval insert into t1 values($1, "line number $1");
dec $1;
}
--enable_query_log
--connect(con1,localhost,root,,)
SET debug_sync= 'myisam_before_repair_by_sort SIGNAL waiting WAIT_FOR go';
send
ALTER TABLE t1 ENABLE KEYS;
--connection default
SET debug_sync= 'now WAIT_FOR waiting';
SET debug_sync= 'now SIGNAL go';
--replace_column 7 # 8 # 9 # 12 # 13 # 14 #
SHOW TABLE STATUS LIKE 't1';
--connection con1
--reap
--connection default
--disconnect con1
DROP TABLE t1;