summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <venu@myvenu.com>2003-05-21 00:12:09 -0700
committerunknown <venu@myvenu.com>2003-05-21 00:12:09 -0700
commita8e5dcb449cf6af8eb76b7cc8ad65e19663d8107 (patch)
tree390fab0240f652c5c3ddbf153549ac34cb5c1b2b /mysql-test/r
parent61fd4d561d3c421930823250c8e9039ff7c281e9 (diff)
parentc121cb748d9432561664ad020c3c48431fe2a48c (diff)
downloadmariadb-git-a8e5dcb449cf6af8eb76b7cc8ad65e19663d8107.tar.gz
Resolve merge colflict
mysql-test/r/create.result: Auto merged mysql-test/r/isam.result: Auto merged mysql-test/r/subselect.result: Auto merged scripts/make_win_src_distribution.sh: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_load.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_update.cc: Auto merged include/mysqld_error.h: Resolve merge colflict by changing the warning codes
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/bdb.result2
-rw-r--r--mysql-test/r/create.result4
-rw-r--r--mysql-test/r/innodb.result39
-rw-r--r--mysql-test/r/insert_update.result8
-rw-r--r--mysql-test/r/isam.result6
-rw-r--r--mysql-test/r/rpl_flush_tables.result40
-rw-r--r--mysql-test/r/rpl_loaddata.result2
-rw-r--r--mysql-test/r/rpl_misc_functions.result21
-rw-r--r--mysql-test/r/subselect.result13
-rw-r--r--mysql-test/r/type_blob.result2
-rw-r--r--mysql-test/r/variables.result2
-rw-r--r--mysql-test/r/warnings.result82
12 files changed, 131 insertions, 90 deletions
diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result
index 2c7d3136369..7f0612a011f 100644
--- a/mysql-test/r/bdb.result
+++ b/mysql-test/r/bdb.result
@@ -203,7 +203,7 @@ a
2
check table t1;
Table Op Msg_type Msg_text
-test.t1 check error The handler for the table doesn't support check
+test.t1 check error The storage enginge for the table doesn't support check
drop table t1;
create table t1 (a int,b varchar(20)) type=bdb;
insert into t1 values (1,""), (2,"testing");
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 0b31d31e955..f5394e0ddf9 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -25,7 +25,7 @@ Warnings:
Note 1051 Unknown table 't1'
Note 1051 Unknown table 't2'
create table t1 (b char(0) not null, index(b));
-The used table handler can't index column 'b'
+The used storage engine can't index column 'b'
create table t1 (a int not null auto_increment,primary key (a)) type=heap;
create table t1 (a int not null,b text) type=heap;
The used table type doesn't support BLOB/TEXT columns
@@ -271,6 +271,8 @@ SELECT @@table_type;
@@table_type
GEMINI
CREATE TABLE t1 (a int not null);
+Warnings:
+Warning 1259 Using storage engine MYISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index 765f6050466..51669f563de 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -165,7 +165,7 @@ level id parent_id
1 1007 101
optimize table t1;
Table Op Msg_type Msg_text
-test.t1 optimize error The handler for the table doesn't support optimize
+test.t1 optimize error The storage enginge for the table doesn't support optimize
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 id A # NULL NULL BTREE
@@ -189,7 +189,7 @@ create table t1 (a int) type=innodb;
insert into t1 values (1), (2);
optimize table t1;
Table Op Msg_type Msg_text
-test.t1 optimize error The handler for the table doesn't support optimize
+test.t1 optimize error The storage enginge for the table doesn't support optimize
delete from t1 where a = 1;
select * from t1;
a
@@ -208,7 +208,7 @@ create index skr on t1 (a);
insert into t1 values (3,""), (4,"testing");
analyze table t1;
Table Op Msg_type Msg_text
-test.t1 analyze error The handler for the table doesn't support analyze
+test.t1 analyze error The storage enginge for the table doesn't support analyze
show keys from t1;
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
@@ -724,7 +724,7 @@ world 2
hello 1
optimize table t1;
Table Op Msg_type Msg_text
-test.t1 optimize error The handler for the table doesn't support optimize
+test.t1 optimize error The storage enginge for the table doesn't support optimize
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 a A 2 NULL NULL BTREE
@@ -800,7 +800,7 @@ id id3
UNLOCK TABLES;
DROP TABLE t1;
create table t1 (a char(20), unique (a(5))) type=innodb;
-Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the table handler doesn't support unique sub keys
+Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the store engine doesn't support unique sub keys
create table t1 (a char(20), index (a(5))) type=innodb;
show create table t1;
Table Create Table
@@ -1215,3 +1215,32 @@ col1
2
3
drop table t1,t2;
+CREATE TABLE t1 (
+`id` int(10) unsigned NOT NULL auto_increment,
+`id_object` int(10) unsigned default '0',
+`id_version` int(10) unsigned NOT NULL default '1',
+label varchar(100) NOT NULL default '',
+`description` text,
+PRIMARY KEY (`id`),
+KEY `id_object` (`id_object`),
+KEY `id_version` (`id_version`)
+) TYPE=InnoDB;
+INSERT INTO t1 VALUES("6", "3382", "9", "Test", NULL), ("7", "102", "5", "Le Pekin (Test)", NULL),("584", "1794", "4", "Test de resto", NULL),("837", "1822", "6", "Test 3", NULL),("1119", "3524", "1", "Societe Test", NULL),("1122", "3525", "1", "Fournisseur Test", NULL);
+CREATE TABLE t2 (
+`id` int(10) unsigned NOT NULL auto_increment,
+`id_version` int(10) unsigned NOT NULL default '1',
+PRIMARY KEY (`id`),
+KEY `id_version` (`id_version`)
+) TYPE=InnoDB;
+INSERT INTO t2 VALUES("3524", "1"),("3525", "1"),("1794", "4"),("102", "5"),("1822", "6"),("3382", "9");
+SELECT t2.id, t1.label FROM t2 INNER JOIN
+(SELECT t1.id_object as id_object FROM t1 WHERE t1.label LIKE '%test%') AS lbl
+ON (t2.id = lbl.id_object) INNER JOIN t1 ON (t2.id = t1.id_object);
+id label
+3382 Fournisseur Test
+102 Fournisseur Test
+1794 Fournisseur Test
+1822 Fournisseur Test
+3524 Fournisseur Test
+3525 Fournisseur Test
+drop table t1,t2;
diff --git a/mysql-test/r/insert_update.result b/mysql-test/r/insert_update.result
index 8cc79564679..068f7c68286 100644
--- a/mysql-test/r/insert_update.result
+++ b/mysql-test/r/insert_update.result
@@ -48,4 +48,12 @@ a b c
3 4 120
5 0 30
8 9 60
+INSERT t1 VALUES (2,1,11), (7,4,40) ON DUPLICATE KEY UPDATE c=c+VALUES(a);
+SELECT *, VALUES(a) FROM t1;
+a b c VALUES(a)
+1 2 10 NULL
+3 4 127 NULL
+5 0 30 NULL
+8 9 60 NULL
+2 1 11 NULL
DROP TABLE t1;
diff --git a/mysql-test/r/isam.result b/mysql-test/r/isam.result
index 7032e506b91..6621be98073 100644
--- a/mysql-test/r/isam.result
+++ b/mysql-test/r/isam.result
@@ -57,14 +57,14 @@ test.t1 optimize status OK
check table t1,t2;
Table Op Msg_type Msg_text
test.t1 check status OK
-test.t2 check error The handler for the table doesn't support check
+test.t2 check error The storage enginge for the table doesn't support check
repair table t1,t2;
Table Op Msg_type Msg_text
test.t1 repair status OK
-test.t2 repair error The handler for the table doesn't support repair
+test.t2 repair error The storage enginge for the table doesn't support repair
check table t2,t1;
Table Op Msg_type Msg_text
-test.t2 check error The handler for the table doesn't support check
+test.t2 check error The storage enginge for the table doesn't support check
test.t1 check status OK
lock tables t1 write;
check table t2,t1;
diff --git a/mysql-test/r/rpl_flush_tables.result b/mysql-test/r/rpl_flush_tables.result
new file mode 100644
index 00000000000..40a35f4e0ca
--- /dev/null
+++ b/mysql-test/r/rpl_flush_tables.result
@@ -0,0 +1,40 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+create table t1 (a int);
+insert into t1 values (10);
+create table t2 (a int);
+create table t3 (a int) type=merge union(t1);
+create table t4 (a int);
+insert into t4 select * from t3;
+rename table t1 to t5, t2 to t1;
+flush no_write_to_binlog tables;
+show binlog events;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
+master-bin.000001 79 Query 1 79 use `test`; create table t1 (a int)
+master-bin.000001 137 Query 1 137 use `test`; insert into t1 values (10)
+master-bin.000001 198 Query 1 198 use `test`; create table t2 (a int)
+master-bin.000001 256 Query 1 256 use `test`; create table t3 (a int) type=merge union(t1)
+master-bin.000001 335 Query 1 335 use `test`; create table t4 (a int)
+master-bin.000001 393 Query 1 393 use `test`; insert into t4 select * from t3
+master-bin.000001 459 Query 1 459 use `test`; rename table t1 to t5, t2 to t1
+select * from t3;
+a
+flush tables;
+show binlog events;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
+master-bin.000001 79 Query 1 79 use `test`; create table t1 (a int)
+master-bin.000001 137 Query 1 137 use `test`; insert into t1 values (10)
+master-bin.000001 198 Query 1 198 use `test`; create table t2 (a int)
+master-bin.000001 256 Query 1 256 use `test`; create table t3 (a int) type=merge union(t1)
+master-bin.000001 335 Query 1 335 use `test`; create table t4 (a int)
+master-bin.000001 393 Query 1 393 use `test`; insert into t4 select * from t3
+master-bin.000001 459 Query 1 459 use `test`; rename table t1 to t5, t2 to t1
+master-bin.000001 525 Query 1 525 use `test`; flush tables
+select * from t3;
+a
diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result
index 305868b04fd..5b7aab3df74 100644
--- a/mysql-test/r/rpl_loaddata.result
+++ b/mysql-test/r/rpl_loaddata.result
@@ -7,7 +7,7 @@ start slave;
create table t1(a int not null auto_increment, b int, primary key(a) );
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
-load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' ignore 1 lines;
+load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;
create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
insert into t3 select * from t2;
select * from t1;
diff --git a/mysql-test/r/rpl_misc_functions.result b/mysql-test/r/rpl_misc_functions.result
new file mode 100644
index 00000000000..a687063706d
--- /dev/null
+++ b/mysql-test/r/rpl_misc_functions.result
@@ -0,0 +1,21 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+create table t1(id int, i int, r1 int, r2 int, p varchar(100));
+insert into t1 values(1, connection_id(), 0, 0, "");
+insert into t1 values(2, 0, rand()*1000, rand()*1000, "");
+set sql_log_bin=0;
+insert into t1 values(6, 0, rand(), rand(), "");
+delete from t1 where id=6;
+set sql_log_bin=1;
+insert into t1 values(3, 0, 0, 0, password('does_this_work?'));
+insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?'));
+select * into outfile 'rpl_misc_functions.outfile' from t1;
+create table t2 like t1;
+load data local infile './var/master-data/test/rpl_misc_functions.outfile' into table t2;
+select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p);
+id i r1 r2 p id i r1 r2 p
+stop slave;
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index c9e05a9f22d..1a4701d8d0e 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -294,6 +294,10 @@ patient_uq clinic_uq
1 1
1 2
2 2
+explain select * from t6 where exists (select * from t7 where uq = clinic_uq);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t6 ALL NULL NULL NULL NULL 4 Using where
+2 DEPENDENT SUBQUERY t7 eq_ref PRIMARY PRIMARY 4 t6.clinic_uq 1
select * from t1 where a= (select a from t2,t4 where t2.b=t4.b);
Column: 'a' in field list is ambiguous
drop table if exists t1,t2,t3;
@@ -1095,6 +1099,8 @@ UPDATE t1 SET i=i+(SELECT MAX(i) FROM (SELECT 1) t) WHERE i=(SELECT MAX(i));
Invalid use of group function
UPDATE t1 SET i=i+1 WHERE i=(SELECT MAX(i));
Invalid use of group function
+UPDATE t1 SET t.i=i+(SELECT MAX(i) FROM (SELECT 1) t);
+Unknown table 't' in field list
drop table t1;
CREATE TABLE t1 (
id int(11) default NULL
@@ -1119,3 +1125,10 @@ select -10 IN (select a from t1 FORCE INDEX (indexa));
-10 IN (select a from t1 FORCE INDEX (indexa))
NULL
drop table t1;
+create table t1 (id int not null auto_increment primary key, salary int, key(salary));
+insert into t1 (salary) values (100),(1000),(10000),(10),(500),(5000),(50000);
+explain SELECT id FROM t1 where salary = (SELECT MAX(salary) FROM t1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ref salary salary 5 const 1 Using where
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
+drop table t1;
diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result
index 62fe54ba217..6d1b1189185 100644
--- a/mysql-test/r/type_blob.result
+++ b/mysql-test/r/type_blob.result
@@ -347,7 +347,7 @@ a 1
hello 1
drop table t1;
create table t1 (a text, key (a(300)));
-Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the table handler doesn't support unique sub keys
+Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the store engine doesn't support unique sub keys
create table t1 (a text, key (a(255)));
drop table t1;
CREATE TABLE t1 (
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index 8d45c5cf5e9..5e613418ea1 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -50,7 +50,7 @@ Variable_name Value
max_join_size 100
show global variables like 'max_join_size';
Variable_name Value
-max_join_size HA_POS_ERROR
+max_join_size 10
set GLOBAL max_join_size=2000;
show global variables like 'max_join_size';
Variable_name Value
diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result
index 059606a62e1..d055511a50a 100644
--- a/mysql-test/r/warnings.result
+++ b/mysql-test/r/warnings.result
@@ -1,24 +1,13 @@
-drop table if exists t1, t2;
+drop table if exists t1;
Warnings:
Note 1051 Unknown table 't1'
-Note 1051 Unknown table 't2'
create table t1 (a int);
insert into t1 values (1);
insert into t1 values ("hej");
-Warnings:
-Warning 1263 Data truncated for column 'a' at row 1
insert into t1 values ("hej"),("då");
-Warnings:
-Warning 1263 Data truncated for column 'a' at row 1
-Warning 1263 Data truncated for column 'a' at row 2
set SQL_WARNINGS=1;
insert into t1 values ("hej");
-Warnings:
-Warning 1263 Data truncated for column 'a' at row 1
insert into t1 values ("hej"),("då");
-Warnings:
-Warning 1263 Data truncated for column 'a' at row 1
-Warning 1263 Data truncated for column 'a' at row 2
drop table t1;
set SQL_WARNINGS=0;
drop temporary table if exists not_exists;
@@ -42,71 +31,10 @@ select @@warning_count;
@@warning_count
0
drop table t1;
-create table t1(a tinyint, b int not null, c date, d char(5));
-load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ',';
-Warnings:
-Warning 1261 Data truncated, NULL supplied to NOT NULL column 'b' at row 2
-Warning 1263 Data truncated for column 'd' at row 3
-Warning 1263 Data truncated for column 'c' at row 4
-Warning 1259 Record count is fewer than the column count at row 5
-Warning 1263 Data truncated for column 'b' at row 6
-Warning 1260 Record count is more than the column count at row 7
-Warning 1262 Data truncated, out of range for column 'a' at row 8
-select @@warning_count;
-@@warning_count
-7
-drop table t1;
-create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5));
-insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test');
+create table t1 (id int) type=isam;
Warnings:
-Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 1
-Warning 1262 Data truncated, out of range for column 'b' at row 2
-Warning 1263 Data truncated for column 'c' at row 2
-Warning 1262 Data truncated, out of range for column 'a' at row 3
-Warning 1262 Data truncated, out of range for column 'b' at row 3
-Warning 1263 Data truncated for column 'c' at row 3
-alter table t1 modify c char(4);
+Warning 1259 Using storage engine MYISAM for table 't1'
+alter table t1 type=isam;
Warnings:
-Warning 1263 Data truncated for column 'c' at row 1
-Warning 1263 Data truncated for column 'c' at row 2
-alter table t1 add d char(2);
-update t1 set a=NULL where a=10;
-Warnings:
-Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 2
-update t1 set c='mysql ab' where c='test';
-Warnings:
-Warning 1263 Data truncated for column 'c' at row 4
-update t1 set d=c;
-Warnings:
-Warning 1263 Data truncated for column 'd' at row 1
-Warning 1263 Data truncated for column 'd' at row 2
-Warning 1263 Data truncated for column 'd' at row 3
-Warning 1263 Data truncated for column 'd' at row 4
-create table t2(a tinyint NOT NULL, b char(3));
-insert into t2 select b,c from t1;
-Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warning 1263 Data truncated for column 'b' at row 2
-Warning 1263 Data truncated for column 'b' at row 3
-Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 4
-Warning 1263 Data truncated for column 'b' at row 4
-drop table t1, t2;
-create table t1(a char(10));
-alter table t1 add b char;
-set max_error_count=10;
-update t1 set b=a;
-Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warning 1263 Data truncated for column 'b' at row 2
-Warning 1263 Data truncated for column 'b' at row 3
-Warning 1263 Data truncated for column 'b' at row 4
-Warning 1263 Data truncated for column 'b' at row 5
-Warning 1263 Data truncated for column 'b' at row 6
-Warning 1263 Data truncated for column 'b' at row 7
-Warning 1263 Data truncated for column 'b' at row 8
-Warning 1263 Data truncated for column 'b' at row 9
-Warning 1263 Data truncated for column 'b' at row 10
-select @@warning_count;
-@@warning_count
-50
+Warning 1259 Using storage engine MYISAM for table 't1'
drop table t1;