diff options
author | unknown <monty@narttu.mysql.fi> | 2003-07-03 11:55:36 +0300 |
---|---|---|
committer | unknown <monty@narttu.mysql.fi> | 2003-07-03 11:55:36 +0300 |
commit | 2373397e13d4004816b61df38a234906eb361e0d (patch) | |
tree | 4e483a8cee2c75d62005137058f7fc6cf866aaf7 /mysql-test/r | |
parent | 582d23a188c03568e0a6b2638e1b643ad9c6b714 (diff) | |
download | mariadb-git-2373397e13d4004816b61df38a234906eb361e0d.tar.gz |
Cleaner implementation if INSERT ... SELECT with same tables
Tests cleanup (put drop database first in tests)
client/mysql.cc:
Cleanup of code in last pull
include/config-win.h:
Remove HAVE_CHSIZE on windows as it's not 64 bit clean
include/my_global.h:
Portability fix
mysql-test/r/drop.result:
Clean up results
mysql-test/r/flush.result:
Clean up results
mysql-test/r/grant_cache.result:
Clean up results
mysql-test/r/innodb.result:
Clean up results
mysql-test/r/insert_select.result:
Clean up results
mysql-test/r/merge.result:
Clean up results
mysql-test/r/query_cache.result:
Clean up results
mysql-test/t/drop.test:
Clean up tests
mysql-test/t/flush.test:
Clean up tests
mysql-test/t/grant_cache.test:
Clean up tests
mysql-test/t/innodb.test:
Clean up tests
mysql-test/t/insert_select.test:
Added more tests
mysql-test/t/merge.test:
Test of bug 515
mysql-test/t/query_cache.test:
Clean up tests
mysql-test/t/symlink.test:
Clean up tests
sql/mysql_priv.h:
Cleaner implementation if INSERT ... SELECT with same tables
sql/sql_lex.h:
Cleaner implementation if INSERT ... SELECT with same tables
sql/sql_list.h:
Indentation cleanup
sql/sql_parse.cc:
Cleaner implementation if INSERT ... SELECT with same tables
sql/sql_yacc.yy:
Cleaner implementation if INSERT ... SELECT with same tables
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/ctype_cp1251.result | 24 | ||||
-rw-r--r-- | mysql-test/r/drop.result | 2 | ||||
-rw-r--r-- | mysql-test/r/flush.result | 2 | ||||
-rw-r--r-- | mysql-test/r/grant_cache.result | 1 | ||||
-rw-r--r-- | mysql-test/r/innodb.result | 1 | ||||
-rw-r--r-- | mysql-test/r/insert_select.result | 20 | ||||
-rw-r--r-- | mysql-test/r/merge.result | 12 | ||||
-rw-r--r-- | mysql-test/r/query_cache.result | 3 |
8 files changed, 61 insertions, 4 deletions
diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result new file mode 100644 index 00000000000..a1f860e1f83 --- /dev/null +++ b/mysql-test/r/ctype_cp1251.result @@ -0,0 +1,24 @@ +drop table if exists t1; +create table t1 (a varchar(10) not null); +insert into t1 values ("a"),("ab"),("abc"); +select * from t1; +a +a +ab +abc +select a, left(a,1) as b from t1; +a b +a a +ab a +abc a +select a, left(a,1) as b from t1 group by a; +a b +a a +ab a +abc a +SELECT DISTINCT RIGHT(a,1) from t1; +RIGHT(a,1) +a +b +c +drop table t1; diff --git a/mysql-test/r/drop.result b/mysql-test/r/drop.result index 178c3a8cb4f..5c732aebbcc 100644 --- a/mysql-test/r/drop.result +++ b/mysql-test/r/drop.result @@ -1,5 +1,4 @@ drop table if exists t1; -drop table if exists t1; drop table t1; Unknown table 't1' create table t1(n int); @@ -24,7 +23,6 @@ n drop database if exists mysqltest; create database mysqltest; drop database mysqltest; -drop database if exists mysqltest; flush tables with read lock; create database mysqltest; Got one of the listed errors diff --git a/mysql-test/r/flush.result b/mysql-test/r/flush.result index 7080f2b6145..8dc73e446c7 100644 --- a/mysql-test/r/flush.result +++ b/mysql-test/r/flush.result @@ -1,4 +1,5 @@ drop table if exists t1; +drop database if exists mysqltest; create temporary table t1(n int not null primary key); drop table if exists t2; create table t2(n int); @@ -11,7 +12,6 @@ drop table t2; Table 't2' was locked with a READ lock and can't be updated drop table t2; unlock tables; -drop database if exists mysqltest; create database mysqltest; create table mysqltest.t1(n int); insert into mysqltest.t1 values (23); diff --git a/mysql-test/r/grant_cache.result b/mysql-test/r/grant_cache.result index 3892765f587..fca6864cc63 100644 --- a/mysql-test/r/grant_cache.result +++ b/mysql-test/r/grant_cache.result @@ -1,4 +1,5 @@ drop table if exists test.t1,mysqltest.t1,mysqltest.t2; +drop database if exists mysqltest; reset query cache; flush status; create database if not exists mysqltest; diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 465d4faf0bc..cb6c8397c5a 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1,4 +1,5 @@ drop table if exists t1,t2,t3; +drop database if exists mysqltest; create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) type=innodb; insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt'); select id, code, name from t1 order by id; diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index dff5d0ff3ca..c007191b562 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -566,4 +566,24 @@ a 5 5 5 +insert into t1 select * from t1,t1; +Not unique table/alias: 't1' +drop table t1,t2; +create table t1 (a int not null primary key, b char(10)); +create table t2 (a int not null, b char(10)); +insert into t1 values (1,"t1:1"),(3,"t1:3"); +insert into t2 values (2,"t2:2"), (3,"t2:3"); +insert into t1 select * from t2; +Duplicate entry '3' for key 1 +select * from t1; +a b +1 t1:1 +3 t1:3 +2 t2:2 +replace into t1 select * from t2; +select * from t1; +a b +1 t1:1 +3 t2:3 +2 t2:2 drop table t1,t2; diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 0bffc93c284..cf39faea41b 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -596,3 +596,15 @@ AND file_code = '0000000115' LIMIT 1; table type possible_keys key key_len ref rows Extra t2 const PRIMARY,files PRIMARY 33 const,const 1 DROP TABLE IF EXISTS t1, t2; +create table t1 (x int, y int, index xy(x, y)); +create table t2 (x int, y int, index xy(x, y)); +create table t3 (x int, y int, index xy(x, y)) type=merge union=(t1,t2); +insert into t1 values(1, 2); +insert into t2 values(1, 3); +select * from t3 where x = 1 and y < 5 order by y; +x y +1 2 +1 3 +select * from t3 where x = 1 and y < 5 order by y desc; +x y +drop table t1,t2,t3; diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 6abd572b3d9..0ef0cab423b 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -3,6 +3,7 @@ flush query cache; reset query cache; flush status; drop table if exists t1,t2,t3,t11,t21, mysqltest.t1; +drop database if exists mysqltest; create table t1 (a int not null); insert into t1 values (1),(2),(3); select * from t1; @@ -357,7 +358,7 @@ show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 0 drop table t1,t2; -create database if not exists mysqltest; +create database mysqltest; create table mysqltest.t1 (i int not null auto_increment, a int, primary key (i)); insert into mysqltest.t1 (a) values (1); select * from mysqltest.t1 where i is null; |