summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/index_merge.test2
-rw-r--r--mysql-test/t/myisam.test54
-rw-r--r--mysql-test/t/ps_1general.test2
-rw-r--r--mysql-test/t/variables.test14
-rw-r--r--mysql-test/t/view.test2
5 files changed, 60 insertions, 14 deletions
diff --git a/mysql-test/t/index_merge.test b/mysql-test/t/index_merge.test
index 5acbcd8eaeb..5ac91f1f8b1 100644
--- a/mysql-test/t/index_merge.test
+++ b/mysql-test/t/index_merge.test
@@ -310,7 +310,7 @@ update t0 set key2=1, key3=1, key4=1, key5=1,key6=1,key7=1 where key7 < 500;
# The next query will not use index i7 in intersection if the OS doesn't
# support file sizes > 2GB. (ha_myisam::ref_length depends on this and index
# scan cost estimates depend on ha_myisam::ref_length)
---replace_result "4,4,4,4,4,4,4" X "4,4,4,4,4,4" X "i6,i7" "i6,i7?" "i6" "i6,i7?" 7 7or16 16 7or16
+--replace_result "4,4,4,4,4,4,4" X "4,4,4,4,4,4" X "i6,i7" "i6,i7?" "i6" "i6,i7?" 7 # 16 # 18 #
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
from t0 as A, t0 as B
where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7 = 1 or A.key8=1)
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 2b60e85fcc6..04f0de47e43 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -606,3 +606,57 @@ system rm ./var/master-data/test/t1.MYD ;
drop table t1;
--error 1051
drop table t1;
+
+#
+# Test concurrent insert
+# First with static record length
+#
+set @save_concurrent_insert=@@concurrent_insert;
+set global concurrent_insert=1;
+create table t1 (a int);
+insert into t1 values (1),(2),(3),(4),(5);
+lock table t1 read local;
+connect (con1,localhost,root,,);
+connection con1;
+# Insert in table without hole
+insert into t1 values(6),(7);
+connection default;
+unlock tables;
+delete from t1 where a>=3 and a<=4;
+lock table t1 read local;
+connection con1;
+set global concurrent_insert=2;
+# Insert in table with hole -> Should insert at end
+insert into t1 values (8),(9);
+connection default;
+unlock tables;
+# Insert into hole
+insert into t1 values (10),(11),(12);
+select * from t1;
+check table t1;
+drop table t1;
+
+# Same test with dynamic record length
+create table t1 (a int, b varchar(30) default "hello");
+insert into t1 (a) values (1),(2),(3),(4),(5);
+lock table t1 read local;
+connect (con1,localhost,root,,);
+connection con1;
+# Insert in table without hole
+insert into t1 (a) values(6),(7);
+connection default;
+unlock tables;
+delete from t1 where a>=3 and a<=4;
+lock table t1 read local;
+connection con1;
+set global concurrent_insert=2;
+# Insert in table with hole -> Should insert at end
+insert into t1 (a) values (8),(9);
+connection default;
+unlock tables;
+# Insert into hole
+insert into t1 (a) values (10),(11),(12);
+select a from t1;
+check table t1;
+drop table t1;
+set global concurrent_insert=@save_concurrent_insert;
diff --git a/mysql-test/t/ps_1general.test b/mysql-test/t/ps_1general.test
index 1fa9d30eaba..1c247240eb9 100644
--- a/mysql-test/t/ps_1general.test
+++ b/mysql-test/t/ps_1general.test
@@ -833,7 +833,7 @@ execute stmt1 ;
--disable_metadata
--horizontal_results
-drop table t5 ;
+drop table t5, t9;
##### RULES OF THUMB TO PRESERVE THE SYSTEMATICS OF THE PS TEST CASES #####
#
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index 9931b72599f..b6059ac00e3 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -72,23 +72,20 @@ explain extended select @@IDENTITY,last_insert_id(), @@identity;
set big_tables=OFF, big_tables=ON, big_tables=0, big_tables=1, big_tables="OFF", big_tables="ON";
-set global concurrent_insert=ON;
+set global concurrent_insert=2;
show variables like 'concurrent_insert';
set global concurrent_insert=1;
show variables like 'concurrent_insert';
set global concurrent_insert=0;
show variables like 'concurrent_insert';
-set global concurrent_insert=OFF;
-show variables like 'concurrent_insert';
set global concurrent_insert=DEFAULT;
-show variables like 'concurrent_insert';
+select @@concurrent_insert;
-set global timed_mutexes=1;
+set global timed_mutexes=ON;
show variables like 'timed_mutexes';
set global timed_mutexes=0;
show variables like 'timed_mutexes';
-
set storage_engine=MYISAM, storage_engine="HEAP", global storage_engine="MERGE";
show local variables like 'storage_engine';
show global variables like 'storage_engine';
@@ -174,8 +171,6 @@ set @@global.sql_auto_is_null=1;
select @@global.sql_auto_is_null;
--error 1229
set myisam_max_sort_file_size=100;
---error 1229
-set myisam_max_extra_sort_file_size=100;
--error 1231
set @@SQL_WARNINGS=NULL;
@@ -222,9 +217,6 @@ set max_tmp_tables=100;
set global max_user_connections=100;
select @@max_user_connections;
set global max_write_lock_count=100;
-set global myisam_max_extra_sort_file_size=100;
-select @@myisam_max_extra_sort_file_size;
-set global myisam_max_sort_file_size=100;
set myisam_sort_buffer_size=100;
set net_buffer_length=100;
set net_read_timeout=100;
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index 0303605a9ef..b5a1e9f1e0a 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -1,5 +1,5 @@
--disable_warnings
-drop table if exists t1,t2,`t1a``b`,v1,v2,v3,v4,v5,v6;
+drop table if exists t1,t2,t9,`t1a``b`,v1,v2,v3,v4,v5,v6;
drop view if exists t1,t2,`t1a``b`,v1,v2,v3,v4,v5,v6;
drop database if exists mysqltest;
--enable_warnings