summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2006-06-28 19:34:04 +0400
committerunknown <evgen@moonbone.local>2006-06-28 19:34:04 +0400
commita68075513a87c9b75e4b7165221a79d9e08c056d (patch)
tree3c5baf35e4a619852c09b91014b8172b38a30001 /mysql-test
parente2bf3f0318b9b641127ff63c2f8e2b282554cf39 (diff)
parent907acc785da95878f0ff7eb6a5b88b5b18e713a8 (diff)
downloadmariadb-git-a68075513a87c9b75e4b7165221a79d9e08c056d.tar.gz
Manual merge
mysql-test/r/ctype_utf8.result: Auto merged mysql-test/r/insert_select.result: Auto merged mysql-test/r/key.result: Auto merged mysql-test/r/view_grant.result: Auto merged mysql-test/t/key.test: Auto merged mysql-test/t/view_grant.test: Auto merged sql/field.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/insert_select.result5
-rw-r--r--mysql-test/r/key.result10
-rw-r--r--mysql-test/r/view_grant.result12
-rw-r--r--mysql-test/t/insert_select.test9
-rw-r--r--mysql-test/t/key.test11
-rw-r--r--mysql-test/t/view_grant.test20
6 files changed, 67 insertions, 0 deletions
diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result
index bcad0460acc..390e76caf2c 100644
--- a/mysql-test/r/insert_select.result
+++ b/mysql-test/r/insert_select.result
@@ -690,3 +690,8 @@ CREATE TABLE t1 (a int PRIMARY KEY);
INSERT INTO t1 values (1), (2);
INSERT INTO t1 SELECT a + 2 FROM t1 LIMIT 1;
DROP TABLE t1;
+CREATE TABLE t1 (x int, y int);
+CREATE TABLE t2 (z int, y int);
+CREATE TABLE t3 (a int, b int);
+INSERT INTO t3 (SELECT x, y FROM t1 JOIN t2 USING (y) WHERE z = 1);
+DROP TABLE IF EXISTS t1,t2,t3;
diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result
index 68174774531..af1db92b1ef 100644
--- a/mysql-test/r/key.result
+++ b/mysql-test/r/key.result
@@ -330,6 +330,16 @@ alter table t1 add key (c1,c1,c2);
ERROR 42S21: Duplicate column name 'c1'
drop table t1;
create table t1 (
+i1 INT NOT NULL,
+i2 INT NOT NULL,
+UNIQUE i1idx (i1),
+UNIQUE i2idx (i2));
+desc t1;
+Field Type Null Key Default Extra
+i1 int(11) NO UNI
+i2 int(11) NO UNI
+drop table t1;
+create table t1 (
c1 int,
c2 varchar(20) not null,
primary key (c1),
diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result
index ad6028b8a8c..5f91127d284 100644
--- a/mysql-test/r/view_grant.result
+++ b/mysql-test/r/view_grant.result
@@ -649,3 +649,15 @@ DROP VIEW mysqltest_db1.view1;
DROP TABLE mysqltest_db1.t1;
DROP SCHEMA mysqltest_db1;
DROP USER mysqltest_db1@localhost;
+CREATE DATABASE test1;
+CREATE DATABASE test2;
+CREATE TABLE test1.t0 (a VARCHAR(20));
+CREATE TABLE test2.t1 (a VARCHAR(20));
+CREATE VIEW test2.t3 AS SELECT * FROM test1.t0;
+CREATE OR REPLACE VIEW test.v1 AS
+SELECT ta.a AS col1, tb.a AS col2 FROM test2.t3 ta, test2.t1 tb;
+DROP VIEW test.v1;
+DROP VIEW test2.t3;
+DROP TABLE test2.t1, test1.t0;
+DROP DATABASE test2;
+DROP DATABASE test1;
diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test
index 0b9a0e86ba9..05953a1fd49 100644
--- a/mysql-test/t/insert_select.test
+++ b/mysql-test/t/insert_select.test
@@ -238,3 +238,12 @@ INSERT INTO t1 SELECT a + 2 FROM t1 LIMIT 1;
DROP TABLE t1;
# End of 4.1 tests
+
+#
+# Bug #18080: INSERT ... SELECT ... JOIN results in ambiguous field list error
+#
+CREATE TABLE t1 (x int, y int);
+CREATE TABLE t2 (z int, y int);
+CREATE TABLE t3 (a int, b int);
+INSERT INTO t3 (SELECT x, y FROM t1 JOIN t2 USING (y) WHERE z = 1);
+DROP TABLE IF EXISTS t1,t2,t3;
diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test
index f95cee8e8eb..34a66febcac 100644
--- a/mysql-test/t/key.test
+++ b/mysql-test/t/key.test
@@ -326,6 +326,17 @@ alter table t1 add key (c1,c1,c2);
drop table t1;
#
+# Bug#11228: DESC shows arbitrary column as "PRI"
+#
+create table t1 (
+ i1 INT NOT NULL,
+ i2 INT NOT NULL,
+ UNIQUE i1idx (i1),
+ UNIQUE i2idx (i2));
+desc t1;
+drop table t1;
+
+#
# Bug#12565 - ERROR 1034 when running simple UPDATE or DELETE
# on large MyISAM table
#
diff --git a/mysql-test/t/view_grant.test b/mysql-test/t/view_grant.test
index 2a1977702c2..801bd13fab7 100644
--- a/mysql-test/t/view_grant.test
+++ b/mysql-test/t/view_grant.test
@@ -852,3 +852,23 @@ DROP VIEW mysqltest_db1.view1;
DROP TABLE mysqltest_db1.t1;
DROP SCHEMA mysqltest_db1;
DROP USER mysqltest_db1@localhost;
+#
+# BUG#20482: failure on Create join view with sources views/tables
+# in different schemas
+#
+--disable_warnings
+CREATE DATABASE test1;
+CREATE DATABASE test2;
+--enable_warnings
+
+CREATE TABLE test1.t0 (a VARCHAR(20));
+CREATE TABLE test2.t1 (a VARCHAR(20));
+CREATE VIEW test2.t3 AS SELECT * FROM test1.t0;
+CREATE OR REPLACE VIEW test.v1 AS
+ SELECT ta.a AS col1, tb.a AS col2 FROM test2.t3 ta, test2.t1 tb;
+
+DROP VIEW test.v1;
+DROP VIEW test2.t3;
+DROP TABLE test2.t1, test1.t0;
+DROP DATABASE test2;
+DROP DATABASE test1;