summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <elliot@mysql.com>2006-06-25 09:59:34 -0400
committerunknown <elliot@mysql.com>2006-06-25 09:59:34 -0400
commitc2575322c696eedbb120737c5c35ed8b972eca96 (patch)
tree58d0df03a85c17a3a29ebd9cc7455d8cc34e2322 /mysql-test
parentd98a7999e2e13dd9aac38995cf55a570752c7647 (diff)
parent41b9884db0db0b3e16562161a86e94a998bcce2d (diff)
downloadmariadb-git-c2575322c696eedbb120737c5c35ed8b972eca96.tar.gz
Merge mysql.com:/home/emurphy/src/bk-clean/tmp_merge
into mysql.com:/home/emurphy/src/bk-clean/mysql-5.1 mysql-test/mysql-test-run.sh: Auto merged mysql-test/valgrind.supp: Auto merged mysql-test/r/func_str.result: Auto merged mysql-test/r/insert_select.result: Auto merged mysql-test/r/myisam.result: Auto merged mysql-test/t/func_time.test: Auto merged mysql-test/t/myisam.test: Auto merged mysql-test/t/select.test: Auto merged mysys/Makefile.am: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_strfunc.cc: Auto merged sql/item_strfunc.h: Auto merged sql/mysqld.cc: Auto merged sql/opt_sum.cc: Auto merged sql/slave.cc: Auto merged sql/sql_select.cc: Auto merged storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp: Auto merged storage/ndb/src/ndbapi/ndberror.c: Auto merged include/Makefile.am: manual merge mysql-test/r/func_time.result: manual merge mysql-test/r/select.result: manual merge
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/insert_select.result4
-rw-r--r--mysql-test/r/myisam.result13
-rw-r--r--mysql-test/t/func_time.test6
-rw-r--r--mysql-test/t/insert_select.test13
-rw-r--r--mysql-test/t/myisam.test12
-rw-r--r--mysql-test/t/select.test19
-rw-r--r--mysql-test/valgrind.supp12
7 files changed, 77 insertions, 2 deletions
diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result
index 772179d758a..bcad0460acc 100644
--- a/mysql-test/r/insert_select.result
+++ b/mysql-test/r/insert_select.result
@@ -686,3 +686,7 @@ ERROR 42S22: Unknown column 'z' in 'field list'
insert into t1(x,y) select x,z from t2 on duplicate key update x=values(t2.x);
ERROR 42S22: Unknown column 't2.x' in 'field list'
drop table t1,t2;
+CREATE TABLE t1 (a int PRIMARY KEY);
+INSERT INTO t1 values (1), (2);
+INSERT INTO t1 SELECT a + 2 FROM t1 LIMIT 1;
+DROP TABLE t1;
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 0ec74f59de3..bb62f2a063b 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -747,6 +747,19 @@ select count(id1) from t1 where id2 = 10;
count(id1)
5
drop table t1;
+CREATE TABLE t1(a TINYINT, KEY(a)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES(1);
+SELECT MAX(a) FROM t1 IGNORE INDEX(a);
+MAX(a)
+1
+ALTER TABLE t1 DISABLE KEYS;
+SELECT MAX(a) FROM t1;
+MAX(a)
+1
+SELECT MAX(a) FROM t1 IGNORE INDEX(a);
+MAX(a)
+1
+DROP TABLE t1;
CREATE TABLE t1(a CHAR(9), b VARCHAR(7)) ENGINE=MyISAM;
INSERT INTO t1(a) VALUES('xxxxxxxxx'),('xxxxxxxxx');
UPDATE t1 AS ta1,t1 AS ta2 SET ta1.b='aaaaaa',ta2.b='bbbbbb';
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index 976f7191a5f..355b64e0405 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -392,8 +392,10 @@ drop table t1;
# Bug #16546
#
-select now() - now() + 0, curtime() - curtime() + 0,
- sec_to_time(1) + 0, from_unixtime(1) + 0;
+create table t1 select now() - now(), curtime() - curtime(),
+ sec_to_time(1) + 0, from_unixtime(1) + 0;
+show create table t1;
+drop table t1;
--echo End of 4.1 tests
diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test
index 5dd6f338865..0b9a0e86ba9 100644
--- a/mysql-test/t/insert_select.test
+++ b/mysql-test/t/insert_select.test
@@ -224,4 +224,17 @@ insert into t1(x,y) select x,z from t2 on duplicate key update x=values(z);
insert into t1(x,y) select x,z from t2 on duplicate key update x=values(t2.x);
drop table t1,t2;
+#
+# Bug #9676: INSERT INTO x SELECT .. FROM x LIMIT 1; slows down with big
+# tables
+#
+
+#Note: not an exsaustive test : just a check of the code path.
+CREATE TABLE t1 (a int PRIMARY KEY);
+INSERT INTO t1 values (1), (2);
+
+INSERT INTO t1 SELECT a + 2 FROM t1 LIMIT 1;
+
+DROP TABLE t1;
+
# End of 4.1 tests
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 2cce38498b8..9936b8bfc44 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -698,6 +698,18 @@ select count(id1) from t1 where id2 = 10;
drop table t1;
#
+# BUG##20357 - Got error 124 from storage engine using MIN and MAX functions
+# in queries
+#
+CREATE TABLE t1(a TINYINT, KEY(a)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES(1);
+SELECT MAX(a) FROM t1 IGNORE INDEX(a);
+ALTER TABLE t1 DISABLE KEYS;
+SELECT MAX(a) FROM t1;
+SELECT MAX(a) FROM t1 IGNORE INDEX(a);
+DROP TABLE t1;
+
+#
# BUG#18036 - update of table joined to self reports table as crashed
#
CREATE TABLE t1(a CHAR(9), b VARCHAR(7)) ENGINE=MyISAM;
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index ae3981ce47b..b75d0dd8bb6 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -2285,6 +2285,25 @@ EXPLAIN SELECT * FROM t1 FORCE INDEX (a);
DROP TABLE t1;
+#
+# Bug #18759 "Incorrect string to numeric conversion"
+#
+# This test is here so that the behavior will not be changed to 4.1
+# and not to 5.0 either. In 4.1 and 5.0 sending an integer as a string
+# will be converted internally to real (double) value and it is not
+# as accurate as bigint (longlong) for integers. Thus the results may
+# vary. In 5.1 internally it is decimal, which is a string type and
+# will be more accurate. Due to rather big changes needed to fix this
+# in 4.1 or 5.0 it is not desired to do it in the stable versions.
+#
+# This test is here only to make sure that behavior is not changed in
+# 4.1 and 5.0
+#
+CREATE TABLE t1 (i BIGINT UNSIGNED NOT NULL);
+INSERT INTO t1 VALUES (10);
+SELECT i='1e+01',i=1e+01, i in (1e+01,1e+01), i in ('1e+01','1e+01') FROM t1;
+DROP TABLE t1;
+
# End of 4.1 tests
#
diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp
index c30d5c8f43e..6dd11df5de6 100644
--- a/mysql-test/valgrind.supp
+++ b/mysql-test/valgrind.supp
@@ -249,6 +249,18 @@
}
#
+# Warning from my_thread_init becasue mysqld dies before kill thread exists
+#
+
+{
+ my_thread_init kill thread memory loss second
+ Memcheck:Leak
+ fun:calloc
+ fun:my_thread_init
+ fun:kill_server_thread
+}
+
+#
# Leaks reported in _dl_* internal functions on Linux amd64 / glibc2.3.2.
#