39 lines
1.3 KiB
Plaintext
39 lines
1.3 KiB
Plaintext
--source suite/xengine/include/have_xengine.inc
|
|
|
|
#
|
|
# Generate concurrent requests to alter a table using mysqlslap
|
|
#
|
|
|
|
--disable_warnings
|
|
DROP DATABASE IF EXISTS mysqlslap;
|
|
--enable_warnings
|
|
|
|
CREATE DATABASE mysqlslap;
|
|
|
|
use mysqlslap;
|
|
|
|
CREATE TABLE a1 (a int, b int) ENGINE=XENGINE;
|
|
INSERT INTO a1 VALUES (1, 1);
|
|
|
|
--write_file $MYSQL_TMP_DIR/concurrent_alter.sh
|
|
$MYSQL_SLAP --silent --delimiter=";" --query="alter table a1 add index bx(b); alter table a1 drop index bx" --concurrency=1 --iterations=25 &
|
|
$MYSQL_SLAP --silent --delimiter=";" --query="alter table a1 add index ax(a); alter table a1 drop index ax" --concurrency=1 --iterations=25 &
|
|
sleep 2
|
|
$MYSQL_SLAP --silent --delimiter=";" --query="select * from a1 where a=1" --concurrency=16 --iterations=1000 &
|
|
$MYSQL_SLAP --silent --delimiter=";" --query="select * from a1 where b=1" --concurrency=16 --iterations=1000
|
|
sleep 2
|
|
$MYSQL_SLAP --silent --delimiter=";" --query="select * from a1 where a=1" --concurrency=16 --iterations=1000 &
|
|
$MYSQL_SLAP --silent --delimiter=";" --query="select * from a1 where b=1" --concurrency=16 --iterations=1000
|
|
wait
|
|
EOF
|
|
|
|
--exec bash $MYSQL_TMP_DIR/concurrent_alter.sh
|
|
|
|
SHOW CREATE TABLE a1;
|
|
|
|
DROP DATABASE mysqlslap;
|
|
|
|
#clean
|
|
--remove_file $MYSQL_TMP_DIR/concurrent_alter.sh
|
|
--source suite/xengine/include/check_xengine_log_error.inc
|