summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2004-02-24 19:14:41 +0200
committerunknown <monty@mashka.mysql.fi>2004-02-24 19:14:41 +0200
commit83188d50ccac7dc65af548b954f8782f1f1ffed6 (patch)
treea9ceb3022d24b95a370e197928b4f8a91086333d /mysql-test
parent07b40e621e5ff2a285b673b6b7bab345c7c361cf (diff)
parent8388a57a96c42cc69776f17d2b3d7766e00bd41c (diff)
downloadmariadb-git-83188d50ccac7dc65af548b954f8782f1f1ffed6.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mashka.mysql.fi:/home/my/mysql-4.1 sql/mysqld.cc: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/bigint.result3
-rw-r--r--mysql-test/r/func_misc.result2
-rw-r--r--mysql-test/r/show_check.result74
-rw-r--r--mysql-test/t/bigint.test2
-rw-r--r--mysql-test/t/show_check.test54
5 files changed, 133 insertions, 2 deletions
diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result
index 4c6e1645451..4c70e72bdfb 100644
--- a/mysql-test/r/bigint.result
+++ b/mysql-test/r/bigint.result
@@ -84,3 +84,6 @@ quantity
10000000000000000000
10000000000000000000
drop table t1;
+SELECT '0x8000000000000001'+0;
+'0x8000000000000001'+0
+0
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index ec5f76409e7..581bc54db18 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -1,6 +1,6 @@
select format(1.5555,0),format(123.5555,1),format(1234.5555,2),format(12345.5555,3),format(123456.5555,4),format(1234567.5555,5),format("12345.2399",2);
format(1.5555,0) format(123.5555,1) format(1234.5555,2) format(12345.5555,3) format(123456.5555,4) format(1234567.5555,5) format("12345.2399",2)
-2 123.6 1,234.56 12,345.556 123,456.5555 1,234,567.55550 12,345.24
+2 123.6 1,234.56 12,345.555 123,456.5555 1,234,567.55550 12,345.24
select inet_ntoa(inet_aton("255.255.255.255.255.255.255.255"));
inet_ntoa(inet_aton("255.255.255.255.255.255.255.255"))
NULL
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index 235c6cd0ecf..2dc715f238f 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -313,3 +313,77 @@ table CREATE TABLE `table` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE `table`;
SET sql_quote_show_create=ON;
+select @@max_heap_table_size;
+@@max_heap_table_size
+1047552
+CREATE TABLE t1 (
+a int(11) default NULL,
+KEY a TYPE BTREE (a)
+) ENGINE=HEAP;
+CREATE TABLE t2 (
+b int(11) default NULL,
+index(b)
+) ENGINE=HEAP;
+CREATE TABLE t3 (
+a int(11) default NULL,
+b int(11) default NULL,
+KEY a TYPE BTREE (a),
+index(b)
+) ENGINE=HEAP;
+insert into t1 values (1),(2);
+insert into t2 values (1),(2);
+insert into t3 values (1,1),(2,2);
+show table status;
+Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 HEAP Fixed 2 5 39904 249415 42 0 NULL NULL NULL NULL latin1_swedish_ci NULL
+t2 HEAP Fixed 2 5 39904 249415 39904 0 NULL NULL NULL NULL latin1_swedish_ci NULL
+t3 HEAP Fixed 2 9 33072 248103 22090 0 NULL NULL NULL NULL latin1_swedish_ci NULL
+insert into t1 values (3),(4);
+insert into t2 values (3),(4);
+insert into t3 values (3,3),(4,4);
+show table status;
+Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 HEAP Fixed 4 5 39904 249415 84 0 NULL NULL NULL NULL latin1_swedish_ci NULL
+t2 HEAP Fixed 4 5 39904 249415 39904 0 NULL NULL NULL NULL latin1_swedish_ci NULL
+t3 HEAP Fixed 4 9 33072 248103 22132 0 NULL NULL NULL NULL latin1_swedish_ci NULL
+insert into t1 values (5);
+insert into t2 values (5);
+insert into t3 values (5,5);
+show table status;
+Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 HEAP Fixed 5 5 39904 249415 105 0 NULL NULL NULL NULL latin1_swedish_ci NULL
+t2 HEAP Fixed 5 5 39904 249415 39904 0 NULL NULL NULL NULL latin1_swedish_ci NULL
+t3 HEAP Fixed 5 9 33072 248103 22153 0 NULL NULL NULL NULL latin1_swedish_ci NULL
+delete from t1 where a=3;
+delete from t2 where b=3;
+delete from t3 where a=3;
+show table status;
+Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 HEAP Fixed 4 5 39904 249415 105 5 NULL NULL NULL NULL latin1_swedish_ci NULL
+t2 HEAP Fixed 4 5 39904 249415 39904 5 NULL NULL NULL NULL latin1_swedish_ci NULL
+t3 HEAP Fixed 4 9 33072 248103 22153 9 NULL NULL NULL NULL latin1_swedish_ci NULL
+delete from t1;
+delete from t2;
+delete from t3;
+show table status;
+Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 HEAP Fixed 0 5 0 249415 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL
+t2 HEAP Fixed 0 5 0 249415 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL
+t3 HEAP Fixed 0 9 0 248103 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL
+insert into t1 values (5);
+insert into t2 values (5);
+insert into t3 values (5,5);
+show table status;
+Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 HEAP Fixed 1 5 39904 249415 21 0 NULL NULL NULL NULL latin1_swedish_ci NULL
+t2 HEAP Fixed 1 5 39904 249415 39904 0 NULL NULL NULL NULL latin1_swedish_ci NULL
+t3 HEAP Fixed 1 9 33072 248103 22069 0 NULL NULL NULL NULL latin1_swedish_ci NULL
+delete from t1 where a=5;
+delete from t2 where b=5;
+delete from t3 where a=5;
+show table status;
+Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 HEAP Fixed 0 5 39904 249415 21 5 NULL NULL NULL NULL latin1_swedish_ci NULL
+t2 HEAP Fixed 0 5 39904 249415 39904 5 NULL NULL NULL NULL latin1_swedish_ci NULL
+t3 HEAP Fixed 0 9 33072 248103 22069 9 NULL NULL NULL NULL latin1_swedish_ci NULL
+drop table t1, t2, t3;
diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test
index 9bbe10eae8c..c509a4113f4 100644
--- a/mysql-test/t/bigint.test
+++ b/mysql-test/t/bigint.test
@@ -69,5 +69,5 @@ select * from t1;
drop table t1;
# atof() behaviour is different of different systems. to be fixed in 4.1
-#SELECT '0x8000000000000001'+0;
+SELECT '0x8000000000000001'+0;
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index 1d64cfd2105..935e472c4a1 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -182,3 +182,57 @@ SHOW CREATE TABLE `table`;
DROP TABLE `table`;
SET sql_quote_show_create=ON;
+
+#
+# Test for bug #2719 "Heap tables status shows wrong or missing data."
+#
+
+select @@max_heap_table_size;
+
+CREATE TABLE t1 (
+ a int(11) default NULL,
+ KEY a TYPE BTREE (a)
+) ENGINE=HEAP;
+
+CREATE TABLE t2 (
+ b int(11) default NULL,
+ index(b)
+) ENGINE=HEAP;
+
+CREATE TABLE t3 (
+ a int(11) default NULL,
+ b int(11) default NULL,
+ KEY a TYPE BTREE (a),
+ index(b)
+) ENGINE=HEAP;
+
+insert into t1 values (1),(2);
+insert into t2 values (1),(2);
+insert into t3 values (1,1),(2,2);
+show table status;
+insert into t1 values (3),(4);
+insert into t2 values (3),(4);
+insert into t3 values (3,3),(4,4);
+show table status;
+insert into t1 values (5);
+insert into t2 values (5);
+insert into t3 values (5,5);
+show table status;
+delete from t1 where a=3;
+delete from t2 where b=3;
+delete from t3 where a=3;
+show table status;
+delete from t1;
+delete from t2;
+delete from t3;
+show table status;
+insert into t1 values (5);
+insert into t2 values (5);
+insert into t3 values (5,5);
+show table status;
+delete from t1 where a=5;
+delete from t2 where b=5;
+delete from t3 where a=5;
+show table status;
+
+drop table t1, t2, t3;