diff options
author | unknown <monty@mysql.com> | 2004-10-07 10:50:13 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-10-07 10:50:13 +0300 |
commit | 96e7be58c86335d68c5c79b750244e2762d6e319 (patch) | |
tree | 2ca781cd075a86d68ada5b4565202c8f62a8d84a /mysql-test/t | |
parent | bbab9ec678f9e8a0309f0b018cf6d22cd93acf84 (diff) | |
download | mariadb-git-96e7be58c86335d68c5c79b750244e2762d6e319.tar.gz |
After merge fixes
Some bigger code changes was necessary becasue of the multi-table-update and the new HANDLER code
include/hash.h:
Added back function that's was used in 4.0
mysql-test/r/delete.result:
Update results after merge
mysql-test/r/flush_table.result:
Update results after merge
mysql-test/r/func_str.result:
Update results after merge
mysql-test/r/handler.result:
Update results after merge
Change is big becasue in MySQL 4.1 you are not allowed to qualify the handler alias with a databasename
mysql-test/r/multi_update.result:
More startup cleanups
mysql-test/r/rename.result:
More startup-cleanups
mysql-test/r/select.result:
More startup cleanups
mysql-test/r/show_check.result:
More startup-cleanups
mysql-test/t/ctype_latin1_de.test:
Cleanup
mysql-test/t/derived.test:
Portability fix
mysql-test/t/handler.test:
Update results after merge
Change is big becasue in MySQL 4.1 you are not allowed to qualify the handler alias with a databasename
mysql-test/t/multi_update.test:
More startup cleanups
mysql-test/t/range.test:
More comments
mysql-test/t/rename.test:
More startup cleanups
mysql-test/t/select.test:
More startup cleanups
mysql-test/t/show_check.test:
More startup cleanups
mysql-test/t/type_timestamp.test:
Add back test deleted during merge
sql/item_cmpfunc.cc:
After merge fixes
sql/item_func.cc:
Remove compiler warning
sql/mysql_priv.h:
After merge fixes
sql/mysqld.cc:
After merge fixes
sql/sql_acl.cc:
More debugging
sql/sql_base.cc:
After merge fixes
(This fix was needed bacause of multi-table-update reopens tables)
sql/sql_handler.cc:
After merge fixes
sql/sql_lex.h:
After merge fixes
sql/sql_select.cc:
After merge fixes
sql/sql_show.cc:
After merge fixes
sql/sql_table.cc:
After merge fixes
Simple cleanup of mysql_discard_or_import_tablespace
sql/sql_update.cc:
After merge fixes
Rework mysql_multi_update to take into account derived tables.
sql/sql_yacc.yy:
After merge fixes
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/ctype_latin1_de.test | 1 | ||||
-rw-r--r-- | mysql-test/t/derived.test | 2 | ||||
-rw-r--r-- | mysql-test/t/handler.test | 30 | ||||
-rw-r--r-- | mysql-test/t/multi_update.test | 11 | ||||
-rw-r--r-- | mysql-test/t/range.test | 3 | ||||
-rw-r--r-- | mysql-test/t/rename.test | 2 | ||||
-rw-r--r-- | mysql-test/t/select.test | 2 | ||||
-rw-r--r-- | mysql-test/t/show_check.test | 4 | ||||
-rw-r--r-- | mysql-test/t/type_timestamp.test | 12 |
9 files changed, 47 insertions, 20 deletions
diff --git a/mysql-test/t/ctype_latin1_de.test b/mysql-test/t/ctype_latin1_de.test index 472a3db648e..1c9576c1c56 100644 --- a/mysql-test/t/ctype_latin1_de.test +++ b/mysql-test/t/ctype_latin1_de.test @@ -89,7 +89,6 @@ drop table t1; # # Bug #5447 Select does not find records # -DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( autor varchar(80) NOT NULL default '', PRIMARY KEY (autor) diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index fbfd3ccdef1..64e3fe8929b 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -101,7 +101,7 @@ SELECT a.x FROM (SELECT 1 AS x) AS a HAVING a.x = 1; # # Connect without a database create table t1 select 1 as a; -connect (con1,localhost,mysqltest_1,,*NO-ONE*,$MASTER_MYPORT,master.sock); +connect (con1,localhost,mysqltest_1,,*NO-ONE*,$MASTER_MYPORT,$MASTER_MYSOCK); connection con1; --error 1046 select 2 as a from (select * from t1) b; diff --git a/mysql-test/t/handler.test b/mysql-test/t/handler.test index b7fe5d10297..3de8e8ae784 100644 --- a/mysql-test/t/handler.test +++ b/mysql-test/t/handler.test @@ -174,30 +174,34 @@ handler t1 open; # Check accesibility of all the tables. # use test; ---error 1109; +--error 1064 handler test.t1 read first limit 9; +--error 1064 handler test_test.t1 read first limit 9; handler t1 read first limit 9; +--error 1064 handler test_test.t2 read first limit 9; handler t2 read first limit 9; + # # Cleanup. # +--error 1064 handler test_test.t1 close; ---error 1109; handler t1 close; drop table test_test.t1; +--error 1064 handler test_test.t2 close; ---error 1109; handler t2 close; drop table test_test.t2; drop database test_test; + # use test; ---error 1109; +--error 1064 handler test.t1 close; ---error 1109; +--error 1109 handler t1 close; drop table test.t1; @@ -234,7 +238,7 @@ handler t2 open t1; --error 1066 handler t3 open t1; handler t1 read first limit 9; ---error 1109 +--error 1064 handler test.t1 close; --error 1066 handler test.t1 open h1; @@ -246,11 +250,11 @@ handler t1 read first limit 9; handler h1 read first limit 9; handler h2 read first limit 9; handler h3 read first limit 9; -handler test.h2 read first limit 9; ---error 1109 +handler h2 read first limit 9; +--error 1064 handler test.h1 close; -handler test_test.t1 close; -handler test_test.h1 close; +handler t1 close; +handler h1 close; handler h2 close; --error 1109 handler t1 read first limit 9; @@ -259,12 +263,12 @@ handler h1 read first limit 9; --error 1109 handler h2 read first limit 9; handler h3 read first limit 9; -handler test_test.h3 read first limit 9; +handler h3 read first limit 9; use test_test; handler h3 read first limit 9; ---error 1109 +--error 1064 handler test.h3 read first limit 9; -handler test_test.h3 close; +handler h3 close; use test; drop table t3; drop table t2; diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index e56636bd2ba..e2aebd014f8 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -5,6 +5,11 @@ --disable_warnings drop table if exists t1,t2,t3; drop database if exists mysqltest; +--error 0,1141 +revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; +--error 0,1141 +revoke all privileges on mysqltest.* from mysqltest_1@localhost; +delete from mysql.user where user=_binary'mysqltest_1'; --enable_warnings create table t1(id1 int not null auto_increment primary key, t char(12)); @@ -383,10 +388,10 @@ select * from t2; drop table t1, t2; # -# prevelege chexk for multiupdate with other tables +# privilege check for multiupdate with other tables # -connect (root,localhost,root,,test,$MASTER_MYPORT,master.sock); +connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); connection root; --disable_warnings create database mysqltest; @@ -396,7 +401,7 @@ create table mysqltest.t2 (a int, b int, primary key (a)); create table mysqltest.t3 (a int, b int, primary key (a)); grant select on mysqltest.* to mysqltest_1@localhost; grant update on mysqltest.t1 to mysqltest_1@localhost; -connect (user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,master.sock); +connect (user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK); connection user1; update t1, t2 set t1.b=1 where t1.a=t2.a; update t1, t2 set t1.b=(select t3.b from t3 where t1.a=t3.a) where t1.a=t2.a; diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test index 61886221fcf..cd6620f7126 100644 --- a/mysql-test/t/range.test +++ b/mysql-test/t/range.test @@ -423,6 +423,9 @@ select count(*) from t1 where x=0; select count(*) from t1 where x<0; select count(*) from t1 where x < -16; select count(*) from t1 where x = -16; +# The following query returns wrong value because the range optimizer can't +# handle search on a signed value for an unsigned parameter. This will be fixed in +# 5.0 select count(*) from t1 where x > -16; select count(*) from t1 where x = 18446744073709551601; diff --git a/mysql-test/t/rename.test b/mysql-test/t/rename.test index e6dc6ce9456..497ff721c99 100644 --- a/mysql-test/t/rename.test +++ b/mysql-test/t/rename.test @@ -5,7 +5,7 @@ --disable_warnings drop table if exists t0,t1,t2,t3,t4; # Clear up from other tests (to ensure that SHOW TABLES below is right) -drop table if exists t0,t5,t6,t7,t8,t9; +drop table if exists t0,t5,t6,t7,t8,t9,t1_1,t1_2,t9_1,t9_2; --enable_warnings create table t0 SELECT 1,"table 1"; diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index 4490f97765b..c260c7777e2 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -8,6 +8,8 @@ --disable_warnings drop table if exists t1,t2,t3,t4; +# The following may be left from older tests +drop table if exists t1_1,t1_2,t9_1,t9_2; --enable_warnings CREATE TABLE t1 ( diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 759ed7d22b3..681127eab5e 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -5,6 +5,10 @@ --disable_warnings drop table if exists t1,t2; drop database if exists mysqltest; + +delete from mysql.user where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; +delete from mysql.db where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; +flush privileges; --enable_warnings create table t1 (a int not null primary key, b int not null,c int not null, key(b,c)); diff --git a/mysql-test/t/type_timestamp.test b/mysql-test/t/type_timestamp.test index d3bda858b8b..5978c24ddc4 100644 --- a/mysql-test/t/type_timestamp.test +++ b/mysql-test/t/type_timestamp.test @@ -62,6 +62,17 @@ INSERT INTO t1 VALUES ("2030-01-01","2030-01-01 00:00:00",20300101000000); SELECT * FROM t1; drop table t1; +create table t1 (t2 timestamp(2), t4 timestamp(4), t6 timestamp(6), + t8 timestamp(8), t10 timestamp(10), t12 timestamp(12), + t14 timestamp(14)); +insert t1 values (0,0,0,0,0,0,0), +("1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", +"1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", +"1997-12-31 23:47:59"); +select * from t1; +select * from t1; +drop table t1; + # # Let us check if we properly treat wrong datetimes and produce proper warnings # (for both strings and numbers) @@ -270,7 +281,6 @@ drop table t1; # Test for bug #4131, TIMESTAMP columns missing minutes and seconds when # using GROUP BY in @@new=1 mode. # -set new=1; create table t1 (a char(2), t timestamp); insert into t1 values ('a', '2004-01-01 00:00:00'), ('a', '2004-01-01 01:00:00'), ('b', '2004-02-01 00:00:00'); |