diff options
author | unknown <monty@hundin.mysql.fi> | 2002-01-02 21:29:41 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-01-02 21:29:41 +0200 |
commit | f4fee3d90e8456cfd2a4e2f395bd270d0a12c70d (patch) | |
tree | ef8afaf7a0fed42b30ef0d9d38acccc992b5f87d /mysql-test | |
parent | 27f652efefba29bf58f45cbfe21a4228ec6fdb34 (diff) | |
download | mariadb-git-f4fee3d90e8456cfd2a4e2f395bd270d0a12c70d.tar.gz |
Added macros for nice TIMESPEC usage.
Fixes for building MySQL with gcc 3.0
Added SIGNED / UNSIGNED casts
Fixed core dump bug in net_clear() with libmysqld.
Back to using semaphores in query cache.
Added 'Null' and 'Index_type' to SHOW INDEX.
BUILD/FINISH.sh:
Fixes for gcc 3.0
BUILD/SETUP.sh:
Fixes for gcc 3.0
Docs/manual.texi:
Changelog + SIGNED/UNSIGNED casts.
Makefile.am:
include BUILD scripts in source distribution.
client/Makefile.am:
Fixes for gcc 3.0
client/mysql.cc:
Cleanup
client/mysqldump.c:
Changed 'K' to mean 'disable-keys' instead of 'no-disabled-keys'
client/readline.cc:
Cleanup
configure.in:
Include BUILD in source distrbution
extra/my_print_defaults.c:
Cleanup
include/my_global.h:
Fix for HPUX and setrlimit.
Portability fix.
Added macros for nice TIMESPEC usage.
innobase/include/dyn0dyn.h:
Fix for AIX
libmysql/Makefile.shared:
Added strxmov to libmysqld
libmysqld/examples/Makefile.am:
Fixes for gcc 3.0
libmysqld/lib_vio.c:
Cleanup
myisam/ft_dump.c:
Portability fixes
myisam/ftdefs.h:
Portability fixes
mysql-test/r/bdb.result:
Cleanup results after adding 2 columns to SHOW KEYS
mysql-test/r/bigint.result:
New test for SIGNED/UNSIGNED
mysql-test/r/fulltext.result:
Cleanup results after adding 2 columns to SHOW KEYS
mysql-test/r/heap.result:
Cleanup results after adding 2 columns to SHOW KEYS
mysql-test/r/innodb.result:
Cleanup results after adding 2 columns to SHOW KEYS
mysql-test/r/isam.result:
Cleanup results after adding 2 columns to SHOW KEYS
mysql-test/r/key.result:
Cleanup results after adding 2 columns to SHOW KEYS
mysql-test/r/myisam.result:
Cleanup results after adding 2 columns to SHOW KEYS
mysql-test/r/query_cache.result:
Cleanup results after adding 2 columns to SHOW KEYS
mysql-test/r/select.result:
Cleanup results after adding 2 columns to SHOW KEYS
mysql-test/r/show_check.result:
Cleanup results after adding 2 columns to SHOW KEYS
mysql-test/r/type_ranges.result:
Cleanup results after adding 2 columns to SHOW KEYS
mysql-test/t/bigint.test:
New test for SIGNED/UNSIGNED
mysql-test/t/key.test:
New test for SIGNED/UNSIGNED
mysql-test/t/query_cache.test:
Test for FOUND_ROWS()
sql-bench/crash-me.sh:
Safety fixes
sql/derror.cc:
Cleanup
sql/ha_berkeley.h:
New test for SIGNED/UNSIGNED
sql/ha_heap.h:
New test for SIGNED/UNSIGNED
sql/ha_innobase.cc:
New test for SIGNED/UNSIGNED
sql/ha_innobase.h:
New test for SIGNED/UNSIGNED
sql/ha_isam.h:
New test for SIGNED/UNSIGNED
sql/ha_myisam.cc:
New test for SIGNED/UNSIGNED
sql/ha_myisam.h:
New test for SIGNED/UNSIGNED
sql/handler.h:
New test for SIGNED/UNSIGNED
sql/item_func.cc:
Cleanup TIMESPEC usage
sql/item_func.h:
Added SIGNED / UNSIGNED casts
sql/lex.h:
Added SIGNED / UNSIGNED casts
sql/mysqld.cc:
Cleanup TIMESPEC usage
sql/net_pkg.cc:
Cleanup
sql/net_serv.cc:
Fixed core dump bug in net_clear()
sql/slave.cc:
Cleanup
sql/sql_cache.cc:
Back to using semaphores
sql/sql_cache.h:
Back to using semaphores
sql/sql_insert.cc:
Cleanup TIMESPEC usage
sql/sql_manager.cc:
Cleanup TIMESPEC usage
sql/sql_parse.cc:
Cleanup
sql/sql_repl.cc:
Cleanup TIMESPEC usage
sql/sql_show.cc:
Added 'Null' and 'Index_type' to SHOW INDEX.
sql/sql_table.cc:
Sort keys in table in a more logical order.
sql/sql_yacc.yy:
Support for SIGNED/UNSIGNED casts.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/bdb.result | 30 | ||||
-rw-r--r-- | mysql-test/r/bigint.result | 9 | ||||
-rw-r--r-- | mysql-test/r/fulltext.result | 6 | ||||
-rw-r--r-- | mysql-test/r/heap.result | 4 | ||||
-rw-r--r-- | mysql-test/r/innodb.result | 30 | ||||
-rw-r--r-- | mysql-test/r/isam.result | 8 | ||||
-rw-r--r-- | mysql-test/r/key.result | 9 | ||||
-rw-r--r-- | mysql-test/r/myisam.result | 12 | ||||
-rw-r--r-- | mysql-test/r/query_cache.result | 53 | ||||
-rw-r--r-- | mysql-test/r/select.result | 8 | ||||
-rw-r--r-- | mysql-test/r/show_check.result | 28 | ||||
-rw-r--r-- | mysql-test/r/type_ranges.result | 30 | ||||
-rw-r--r-- | mysql-test/t/bigint.test | 4 | ||||
-rw-r--r-- | mysql-test/t/key.test | 8 | ||||
-rw-r--r-- | mysql-test/t/query_cache.test | 28 |
15 files changed, 189 insertions, 78 deletions
diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index a7ddff5c532..e553105fcc7 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -167,10 +167,10 @@ optimize table t1; Table Op Msg_type Msg_text test.t1 optimize status OK show keys from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t1 0 PRIMARY 1 id A 39 NULL NULL -t1 1 parent_id 1 parent_id A 9 NULL NULL -t1 1 level 1 level A 3 NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 id A 39 NULL NULL BTREE +t1 1 parent_id 1 parent_id A 9 NULL NULL BTREE +t1 1 level 1 level A 3 NULL NULL BTREE drop table t1; CREATE TABLE t1 ( gesuchnr int(11) DEFAULT '0' NOT NULL, @@ -217,8 +217,8 @@ analyze table t1; Table Op Msg_type Msg_text test.t1 analyze status OK show keys from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t1 1 skr 1 a A 3 NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 skr 1 a A 3 NULL NULL YES BTREE drop table t1; create table t1 (a int,b varchar(20),key(a)) type=bdb; insert into t1 values (1,""), (2,"testing"); @@ -381,13 +381,13 @@ drop table t1; CREATE TABLE t1 (a int not null, b int not null,c int not null, key(a),primary key(a,b), unique(c),key(a),unique(b)); show index from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t1 0 PRIMARY 1 a A NULL NULL NULL -t1 0 PRIMARY 2 b A 0 NULL NULL -t1 0 b 1 b A 0 NULL NULL -t1 0 c 1 c A 0 NULL NULL -t1 1 a 1 a A NULL NULL NULL -t1 1 a_2 1 a A NULL NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 a A NULL NULL NULL BTREE +t1 0 PRIMARY 2 b A 0 NULL NULL BTREE +t1 0 c 1 c A 0 NULL NULL BTREE +t1 0 b 1 b A 0 NULL NULL BTREE +t1 1 a 1 a A NULL NULL NULL BTREE +t1 1 a_2 1 a A NULL NULL NULL BTREE drop table t1; create table t1 (col1 int not null, col2 char(4) not null, primary key(col1)); alter table t1 type=BDB; @@ -784,8 +784,8 @@ optimize table t1; Table Op Msg_type Msg_text test.t1 optimize status OK show keys from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t1 0 PRIMARY 1 a A 2 NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 a A 2 NULL NULL BTREE drop table t1; create table t1 (i int, j int )TYPE=BDB; insert into t1 values (1,2); diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index 1c4a94ef1ee..1618f3f27a2 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -55,3 +55,12 @@ select min(big),max(big),max(big)-1 from t1 group by a; min(big) max(big) max(big)-1 -1 9223372036854775807 9223372036854775806 drop table t1; +select UNSIGNED 1-2; +UNSIGNED 1-2 +18446744073709551615 +select SIGNED (UNSIGNED 1-2); +SIGNED (UNSIGNED 1-2) +-1 +select UNSIGNED '-1'; +UNSIGNED '-1' +18446744073709551615 diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index d3038acdc5c..6660a788646 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -101,9 +101,9 @@ match(ttxt.inhalt) against ('foobar'); id 3 show keys from t2; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t2 1 tig 1 ticket A NULL NULL NULL -t2 1 tix 1 inhalt A NULL 1 NULL FULLTEXT +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t2 1 tig 1 ticket A NULL NULL NULL YES BTREE +t2 1 tix 1 inhalt A NULL 1 NULL YES FULLTEXT show create table t2; Table Create Table t2 CREATE TABLE `t2` ( diff --git a/mysql-test/r/heap.result b/mysql-test/r/heap.result index 3acd0d14118..5495997324a 100644 --- a/mysql-test/r/heap.result +++ b/mysql-test/r/heap.result @@ -3,8 +3,8 @@ create table t1 (a int not null,b int not null, primary key (a)) type=heap comme insert into t1 values(1,1),(2,2),(3,3),(4,4); delete from t1 where a=1 or a=0; show keys from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t1 0 PRIMARY 1 a NULL NULL NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 a NULL NULL NULL NULL HASH select * from t1; a b 2 2 diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 8664cab0b84..1a48b6d6294 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -167,10 +167,10 @@ optimize table t1; Table Op Msg_type Msg_text test.t1 optimize error The handler for the table doesn't support check/repair show keys from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t1 0 PRIMARY 1 id A 87 NULL NULL -t1 1 parent_id 1 parent_id A 21 NULL NULL -t1 1 level 1 level A 4 NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 id A 87 NULL NULL BTREE +t1 1 parent_id 1 parent_id A 21 NULL NULL BTREE +t1 1 level 1 level A 4 NULL NULL BTREE drop table t1; CREATE TABLE t1 ( gesuchnr int(11) DEFAULT '0' NOT NULL, @@ -210,8 +210,8 @@ analyze table t1; Table Op Msg_type Msg_text test.t1 analyze error The handler for the table doesn't support check/repair show keys from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t1 1 skr 1 a A 1 NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 skr 1 a A 1 NULL NULL YES BTREE drop table t1; create table t1 (a int,b varchar(20),key(a)) type=innodb; insert into t1 values (1,""), (2,"testing"); @@ -353,13 +353,13 @@ drop table t1; CREATE TABLE t1 (a int not null, b int not null,c int not null, key(a),primary key(a,b), unique(c),key(a),unique(b)); show index from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t1 0 PRIMARY 1 a A NULL NULL NULL -t1 0 PRIMARY 2 b A 0 NULL NULL -t1 0 b 1 b A 0 NULL NULL -t1 0 c 1 c A 0 NULL NULL -t1 1 a 1 a A NULL NULL NULL -t1 1 a_2 1 a A NULL NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 a A NULL NULL NULL BTREE +t1 0 PRIMARY 2 b A 0 NULL NULL BTREE +t1 0 c 1 c A 0 NULL NULL BTREE +t1 0 b 1 b A 0 NULL NULL BTREE +t1 1 a 1 a A NULL NULL NULL BTREE +t1 1 a_2 1 a A NULL NULL NULL BTREE drop table t1; create table t1 (col1 int not null, col2 char(4) not null, primary key(col1)); alter table t1 type=innodb; @@ -726,8 +726,8 @@ optimize table t1; Table Op Msg_type Msg_text test.t1 optimize error The handler for the table doesn't support check/repair show keys from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t1 0 PRIMARY 1 a A 1 NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 a A 1 NULL NULL BTREE drop table t1; create table t1 (i int, j int ) TYPE=innodb; insert into t1 values (1,2); diff --git a/mysql-test/r/isam.result b/mysql-test/r/isam.result index baeda5537e5..d19352aad42 100644 --- a/mysql-test/r/isam.result +++ b/mysql-test/r/isam.result @@ -72,8 +72,8 @@ a int(11) PRI 0 select,insert,update,references b int(11) MUL 0 select,insert,update,references c int(11) 0 select,insert,update,references show index from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t1 0 PRIMARY 1 a A 4 NULL NULL -t1 1 b 1 b A 1 NULL NULL -t1 1 b 2 c A 4 NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 a A 4 NULL NULL BTREE +t1 1 b 1 b A 1 NULL NULL BTREE +t1 1 b 2 c A 4 NULL NULL BTREE drop table t1,t2; diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result index 0c73fc086c5..6dfe0809e7f 100644 --- a/mysql-test/r/key.result +++ b/mysql-test/r/key.result @@ -138,3 +138,12 @@ a b a 1 a 2 drop table t1; +create table t1 (a int not null unique, b int unique, c int, d int not null primary key, key(c), e int not null unique); +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 d A 0 NULL NULL BTREE +t1 0 a 1 a A 0 NULL NULL BTREE +t1 0 e 1 e A 0 NULL NULL BTREE +t1 0 b 1 b A NULL NULL NULL YES BTREE +t1 1 c 1 c A NULL NULL NULL YES BTREE +drop table t1; diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index efcc610cbd4..c5c69c1ba7b 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -37,16 +37,16 @@ optimize table t1; Table Op Msg_type Msg_text test.t1 optimize status OK show index from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t1 0 PRIMARY 1 a A 5 NULL NULL -t1 1 b 1 b A 1 NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 a A 5 NULL NULL BTREE +t1 1 b 1 b A 1 NULL NULL BTREE optimize table t1; Table Op Msg_type Msg_text test.t1 optimize status Table is already up to date show index from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t1 0 PRIMARY 1 a A 5 NULL NULL -t1 1 b 1 b A 1 NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 a A 5 NULL NULL BTREE +t1 1 b 1 b A 1 NULL NULL BTREE drop table t1; create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) type=myisam; insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4); diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index fa130deec19..632f64e25de 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -406,6 +406,59 @@ Variable_name Value Qcache_hits 6 drop database mysqltest; drop table t1; +create table t1 (i int not null); +insert into t1 (i) values (1),(2),(3),(4); +select SQL_CALC_FOUND_ROWS * from t1 limit 2; +i +1 +2 +select FOUND_ROWS(); +FOUND_ROWS() +4 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 6 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +select * from t1 where i=1; +i +1 +select FOUND_ROWS(); +FOUND_ROWS() +1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 6 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +select SQL_CALC_FOUND_ROWS * from t1 limit 2; +i +1 +2 +select FOUND_ROWS(); +FOUND_ROWS() +4 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +select * from t1 where i=1; +i +1 +select FOUND_ROWS(); +FOUND_ROWS() +1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 8 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +drop table t1; flush query cache; reset query cache; create table t1 (a int not null); diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 702d4a6de03..ee057b268fd 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -3225,10 +3225,10 @@ fld6 char(4) select,insert,update,references show full columns from t2 from test like 's%'; Field Type Null Key Default Extra Privileges show keys from t2; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t2 0 PRIMARY 1 auto A 1199 NULL NULL -t2 0 fld1 1 fld1 A 1199 NULL NULL -t2 1 fld3 1 fld3 A NULL NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE +t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE +t2 1 fld3 1 fld3 A NULL NULL NULL BTREE DO 1; DO benchmark(100,1+1),1,1; drop table t4, t3,t2, t1; diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index f66bf22b224..2530e5b09fb 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -21,10 +21,10 @@ check table t1 type=extended; Table Op Msg_type Msg_text test.t1 check status OK show index from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t1 0 PRIMARY 1 a A 5 NULL NULL -t1 1 b 1 b A 1 NULL NULL -t1 1 b 2 c A 5 NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 a A 5 NULL NULL BTREE +t1 1 b 1 b A 1 NULL NULL BTREE +t1 1 b 2 c A 5 NULL NULL BTREE insert into t1 values (5,5,5); Duplicate entry '5' for key 1 optimize table t1; @@ -54,20 +54,20 @@ 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 Comment -t1 0 PRIMARY 1 f1 A 1 NULL NULL -t1 0 PRIMARY 2 f2 A 3 NULL NULL -t1 0 PRIMARY 3 f3 A 9 NULL NULL -t1 0 PRIMARY 4 f4 A 18 NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 f1 A 1 NULL NULL BTREE +t1 0 PRIMARY 2 f2 A 3 NULL NULL BTREE +t1 0 PRIMARY 3 f3 A 9 NULL NULL BTREE +t1 0 PRIMARY 4 f4 A 18 NULL NULL BTREE repair table t1; Table Op Msg_type Msg_text test.t1 repair status OK show index from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t1 0 PRIMARY 1 f1 A 1 NULL NULL -t1 0 PRIMARY 2 f2 A 3 NULL NULL -t1 0 PRIMARY 3 f3 A 9 NULL NULL -t1 0 PRIMARY 4 f4 A 18 NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 f1 A 1 NULL NULL BTREE +t1 0 PRIMARY 2 f2 A 3 NULL NULL BTREE +t1 0 PRIMARY 3 f3 A 9 NULL NULL BTREE +t1 0 PRIMARY 4 f4 A 18 NULL NULL BTREE drop table t1; create temporary table t1 (a int not null); show create table t1; diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result index 22b4292fa39..fc7cc5255cf 100644 --- a/mysql-test/r/type_ranges.result +++ b/mysql-test/r/type_ranges.result @@ -64,21 +64,21 @@ longblob_col longblob select,insert,update,references options enum('one','two','tree') MUL one select,insert,update,references flags set('one','two','tree') select,insert,update,references show keys from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment -t1 0 PRIMARY 1 auto A 0 NULL NULL -t1 1 utiny 1 utiny A NULL NULL NULL -t1 1 tiny 1 tiny A NULL NULL NULL -t1 1 short 1 short A NULL NULL NULL -t1 1 any_name 1 medium A NULL NULL NULL -t1 1 longlong 1 longlong A NULL NULL NULL -t1 1 real_float 1 real_float A NULL NULL NULL -t1 1 ushort 1 ushort A NULL NULL NULL -t1 1 umedium 1 umedium A NULL NULL NULL -t1 1 ulong 1 ulong A NULL NULL NULL -t1 1 ulonglong 1 ulonglong A NULL NULL NULL -t1 1 ulonglong 2 ulong A NULL NULL NULL -t1 1 options 1 options A NULL NULL NULL -t1 1 options 2 flags A NULL NULL NULL +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 auto A 0 NULL NULL BTREE +t1 1 utiny 1 utiny A NULL NULL NULL BTREE +t1 1 tiny 1 tiny A NULL NULL NULL BTREE +t1 1 short 1 short A NULL NULL NULL BTREE +t1 1 any_name 1 medium A NULL NULL NULL BTREE +t1 1 longlong 1 longlong A NULL NULL NULL BTREE +t1 1 real_float 1 real_float A NULL NULL NULL BTREE +t1 1 ushort 1 ushort A NULL NULL NULL BTREE +t1 1 umedium 1 umedium A NULL NULL NULL BTREE +t1 1 ulong 1 ulong A NULL NULL NULL BTREE +t1 1 ulonglong 1 ulonglong A NULL NULL NULL BTREE +t1 1 ulonglong 2 ulong A NULL NULL NULL BTREE +t1 1 options 1 options A NULL NULL NULL BTREE +t1 1 options 2 flags A NULL NULL NULL BTREE CREATE UNIQUE INDEX test on t1 ( auto ) ; CREATE INDEX test2 on t1 ( ulonglong,ulong) ; CREATE INDEX test3 on t1 ( medium ) ; diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test index 52ae9ad35db..27ac346825b 100644 --- a/mysql-test/t/bigint.test +++ b/mysql-test/t/bigint.test @@ -29,3 +29,7 @@ alter table t1 modify big bigint not null; select min(big),max(big),max(big)-1 from t1; select min(big),max(big),max(big)-1 from t1 group by a; drop table t1; + +select UNSIGNED 1-2; +select SIGNED (UNSIGNED 1-2); +select UNSIGNED '-1'; diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test index a8417fad876..6fc975a1cb3 100644 --- a/mysql-test/t/key.test +++ b/mysql-test/t/key.test @@ -160,3 +160,11 @@ SELECT * FROM t1 WHERE a='a' AND b=2; SELECT * FROM t1 WHERE a='a' AND b in (2); SELECT * FROM t1 WHERE a='a' AND b in (1,2); drop table t1; + +# +# Test of create key order +# + +create table t1 (a int not null unique, b int unique, c int, d int not null primary key, key(c), e int not null unique); +show keys from t1; +drop table t1; diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index 8a577d0be05..280f2202af1 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -288,6 +288,34 @@ drop database mysqltest; drop table t1; # +# FOUND_ROWS() +# + +create table t1 (i int not null); +insert into t1 (i) values (1),(2),(3),(4); + +select SQL_CALC_FOUND_ROWS * from t1 limit 2; +select FOUND_ROWS(); +show status like "Qcache_hits"; +show status like "Qcache_queries_in_cache"; + +select * from t1 where i=1; +select FOUND_ROWS(); +show status like "Qcache_hits"; +show status like "Qcache_queries_in_cache"; + +select SQL_CALC_FOUND_ROWS * from t1 limit 2; +select FOUND_ROWS(); +show status like "Qcache_hits"; +show status like "Qcache_queries_in_cache"; + +select * from t1 where i=1; +select FOUND_ROWS(); +show status like "Qcache_hits"; +show status like "Qcache_queries_in_cache"; +drop table t1; + +# # Test insert delayed # |