summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2006-05-04 15:58:30 +0300
committerunknown <monty@mysql.com>2006-05-04 15:58:30 +0300
commit1f89605e4bd32d5e63a57288e500d9e9b569e9a7 (patch)
tree6d293225bed8f1e3ed7c0029fbbaa3056aeb1ff4 /mysql-test
parent79d87430db7aac8e9b763d63a2e51cc9946bdc8d (diff)
parent63791773b166eed0958a598b5ea359b4f1b7222b (diff)
downloadmariadb-git-1f89605e4bd32d5e63a57288e500d9e9b569e9a7.tar.gz
Merge mysql.com:/home/my/mysql-5.0
into mysql.com:/home/my/mysql-5.1 VC++Files/libmysqld/libmysqld.dsp: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/heap_btree.result: Auto merged mysql-test/r/innodb.result: Auto merged mysql-test/r/mysqltest.result: Auto merged mysql-test/r/ndb_blob.result: Auto merged mysql-test/t/innodb.test: Auto merged mysql-test/t/mysql_client_test.test: Auto merged mysql-test/t/mysqltest.test: Auto merged sql/ha_myisam.cc: Auto merged sql/item_func.h: Auto merged sql/sp.cc: Auto merged sql/sp_head.cc: Auto merged sql/sp_head.h: Auto merged storage/heap/hp_delete.c: Auto merged storage/myisam/mi_key.c: Auto merged storage/myisam/myisamlog.c: Auto merged storage/ndb/include/kernel/signaldata/TcKeyReq.hpp: Auto merged storage/ndb/include/ndbapi/NdbBlob.hpp: Auto merged storage/ndb/test/ndbapi/testBlobs.cpp: Auto merged storage/ndb/tools/delete_all.cpp: Auto merged VC++Files/libmysqld/libmysqld.vcproj: Use original file (my_user.c was already added in 5.1) mysql-test/mysql-test-run.pl: Manual merge sql/handler.h: Manual merge sql/share/errmsg.txt: Align error messages with 5.0 sql/sql_table.cc: Manual merge storage/ndb/src/ndbapi/NdbBlob.cpp: No changes
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/analyze.result8
-rw-r--r--mysql-test/r/heap_btree.result10
-rw-r--r--mysql-test/r/innodb.result2
-rw-r--r--mysql-test/r/ndb_blob.result18
-rw-r--r--mysql-test/r/sp_notembedded.result1
-rw-r--r--mysql-test/t/analyze.test8
-rw-r--r--mysql-test/t/heap_btree.test12
-rw-r--r--mysql-test/t/innodb.test6
-rw-r--r--mysql-test/t/ndb_blob.test25
-rw-r--r--mysql-test/t/sp_notembedded.test4
10 files changed, 86 insertions, 8 deletions
diff --git a/mysql-test/r/analyze.result b/mysql-test/r/analyze.result
index 65c6955a959..fc267cb598d 100644
--- a/mysql-test/r/analyze.result
+++ b/mysql-test/r/analyze.result
@@ -46,4 +46,12 @@ Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_
execute stmt1;
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
deallocate prepare stmt1;
+create temporary table t1(a int, index(a));
+insert into t1 values('1'),('2'),('3'),('4'),('5');
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
+show index from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 a 1 a A 5 NULL NULL YES BTREE
drop table t1;
diff --git a/mysql-test/r/heap_btree.result b/mysql-test/r/heap_btree.result
index a100266978b..7b944558a62 100644
--- a/mysql-test/r/heap_btree.result
+++ b/mysql-test/r/heap_btree.result
@@ -246,3 +246,13 @@ DELETE from t1 where a < 100;
SELECT * from t1;
a
DROP TABLE t1;
+CREATE TABLE t1(val INT, KEY USING BTREE(val)) ENGINE=memory;
+INSERT INTO t1 VALUES(0);
+SELECT INDEX_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='t1';
+INDEX_LENGTH
+21
+UPDATE t1 SET val=1;
+SELECT INDEX_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='t1';
+INDEX_LENGTH
+21
+DROP TABLE t1;
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index f32d7ee264a..03e9525c977 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -3455,3 +3455,5 @@ SELECT p0.a FROM t2 p0 WHERE BINARY p0.b = 'customer_over';
a
1
drop table t2, t1;
+create table t1 (g geometry not null, spatial gk(g)) engine=innodb;
+ERROR HY000: The used table type doesn't support SPATIAL indexes
diff --git a/mysql-test/r/ndb_blob.result b/mysql-test/r/ndb_blob.result
index 9c76d46f4f0..7a781ae3bde 100644
--- a/mysql-test/r/ndb_blob.result
+++ b/mysql-test/r/ndb_blob.result
@@ -481,14 +481,22 @@ msg text NOT NULL
insert into t1 (msg) values(
'Tries to validate (8 byte length + inline bytes) as UTF8 :(
Fast fix: removed validation for Text. It is not yet indexable
-so bad data will not crash kernel.
-Proper fix: Set inline bytes to multiple of mbmaxlen and
-validate it (after the 8 byte length).');
+so bad data will not crash kernel.');
select * from t1;
id msg
1 Tries to validate (8 byte length + inline bytes) as UTF8 :(
Fast fix: removed validation for Text. It is not yet indexable
so bad data will not crash kernel.
-Proper fix: Set inline bytes to multiple of mbmaxlen and
-validate it (after the 8 byte length).
+drop table t1;
+create table t1 (
+a int primary key not null auto_increment,
+b text
+) engine=ndbcluster;
+select count(*) from t1;
+count(*)
+500
+truncate t1;
+select count(*) from t1;
+count(*)
+0
drop table t1;
diff --git a/mysql-test/r/sp_notembedded.result b/mysql-test/r/sp_notembedded.result
index e39ddd1d79d..c8cafe5ace1 100644
--- a/mysql-test/r/sp_notembedded.result
+++ b/mysql-test/r/sp_notembedded.result
@@ -1,3 +1,4 @@
+drop table if exists t1,t3;
drop procedure if exists bug4902|
create procedure bug4902()
begin
diff --git a/mysql-test/t/analyze.test b/mysql-test/t/analyze.test
index a8fd0a4283e..1801a4a440f 100644
--- a/mysql-test/t/analyze.test
+++ b/mysql-test/t/analyze.test
@@ -61,6 +61,14 @@ prepare stmt1 from "SELECT * FROM t1 PROCEDURE ANALYSE()";
execute stmt1;
execute stmt1;
deallocate prepare stmt1;
+
+#
+# bug#15225 (ANALYZE temporary has no effect)
+#
+create temporary table t1(a int, index(a));
+insert into t1 values('1'),('2'),('3'),('4'),('5');
+analyze table t1;
+show index from t1;
drop table t1;
# End of 4.1 tests
diff --git a/mysql-test/t/heap_btree.test b/mysql-test/t/heap_btree.test
index 5e493c2643b..f1b9d290885 100644
--- a/mysql-test/t/heap_btree.test
+++ b/mysql-test/t/heap_btree.test
@@ -164,4 +164,16 @@ DELETE from t1 where a < 100;
SELECT * from t1;
DROP TABLE t1;
+#
+# BUG#18160 - Memory-/HEAP Table endless growing indexes
+#
+CREATE TABLE t1(val INT, KEY USING BTREE(val)) ENGINE=memory;
+INSERT INTO t1 VALUES(0);
+--replace_result 37 21
+SELECT INDEX_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='t1';
+UPDATE t1 SET val=1;
+--replace_result 37 21
+SELECT INDEX_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='t1';
+DROP TABLE t1;
+
# End of 4.1 tests
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index cadb611714c..820c7872b73 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -2494,3 +2494,9 @@ SELECT DISTINCT p0.a FROM t2 p0 WHERE BINARY p0.b = 'customer_over';
SELECT p0.a FROM t2 p0 WHERE BINARY p0.b = 'customer_over';
drop table t2, t1;
+
+#
+# Bug #15680 (SPATIAL key in innodb)
+#
+--error ER_TABLE_CANT_HANDLE_SPKEYS
+create table t1 (g geometry not null, spatial gk(g)) engine=innodb;
diff --git a/mysql-test/t/ndb_blob.test b/mysql-test/t/ndb_blob.test
index f80b7f71281..bf82a793049 100644
--- a/mysql-test/t/ndb_blob.test
+++ b/mysql-test/t/ndb_blob.test
@@ -403,10 +403,29 @@ create table t1 (
insert into t1 (msg) values(
'Tries to validate (8 byte length + inline bytes) as UTF8 :(
Fast fix: removed validation for Text. It is not yet indexable
-so bad data will not crash kernel.
-Proper fix: Set inline bytes to multiple of mbmaxlen and
-validate it (after the 8 byte length).');
+so bad data will not crash kernel.');
select * from t1;
drop table t1;
+# -- bug #19201
+create table t1 (
+ a int primary key not null auto_increment,
+ b text
+) engine=ndbcluster;
+--disable_query_log
+set autocommit=1;
+# more rows than batch size (64)
+# for this bug no blob parts would be necessary
+let $1 = 500;
+while ($1)
+{
+ insert into t1 (b) values (repeat('x',4000));
+ dec $1;
+}
+--enable_query_log
+select count(*) from t1;
+truncate t1;
+select count(*) from t1;
+drop table t1;
+
# End of 4.1 tests
diff --git a/mysql-test/t/sp_notembedded.test b/mysql-test/t/sp_notembedded.test
index 4eb429156b2..0adbeb2d98b 100644
--- a/mysql-test/t/sp_notembedded.test
+++ b/mysql-test/t/sp_notembedded.test
@@ -1,6 +1,10 @@
# Can't test with embedded server
-- source include/not_embedded.inc
+--sleep 2
+--disable_warnings
+drop table if exists t1,t3;
+--enable_warnings
delimiter |;
#