summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/innodb.test31
-rw-r--r--mysql-test/t/subselect.test2
-rw-r--r--mysql-test/t/variables-master.opt2
-rw-r--r--mysql-test/t/warnings-master.opt1
-rw-r--r--mysql-test/t/warnings.test5
5 files changed, 40 insertions, 1 deletions
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index 9773d1ec17c..bf1756ede5c 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -813,3 +813,34 @@ insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000
SELECT col1 FROM t1 UNION SELECT col1 FROM t2 WHERE stamp <
'20020204120000' GROUP BY col1;
drop table t1,t2;
+
+#
+# Test by Francois MASUREL
+#
+
+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);
+drop table t1,t2;
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index 30cb7b05d74..8e8a3dfe1d4 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -678,6 +678,8 @@ INSERT INTO t1 VALUES (1);
UPDATE t1 SET i=i+(SELECT MAX(i) FROM (SELECT 1) t) WHERE i=(SELECT MAX(i));
-- error 1111
UPDATE t1 SET i=i+1 WHERE i=(SELECT MAX(i));
+--error 1109
+UPDATE t1 SET t.i=i+(SELECT MAX(i) FROM (SELECT 1) t);
drop table t1;
#
diff --git a/mysql-test/t/variables-master.opt b/mysql-test/t/variables-master.opt
index 5851d32ec31..a0577107f74 100644
--- a/mysql-test/t/variables-master.opt
+++ b/mysql-test/t/variables-master.opt
@@ -1 +1 @@
-max_join_size=10
+--max_join_size=10
diff --git a/mysql-test/t/warnings-master.opt b/mysql-test/t/warnings-master.opt
new file mode 100644
index 00000000000..3b8baeddb14
--- /dev/null
+++ b/mysql-test/t/warnings-master.opt
@@ -0,0 +1 @@
+--skip-isam
diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test
index 8cff8706c43..ab8c0b99ca5 100644
--- a/mysql-test/t/warnings.test
+++ b/mysql-test/t/warnings.test
@@ -26,3 +26,8 @@ show count(*) warnings;
create table t1(id int);
create table if not exists t1(id int);
select @@warning_count;
+drop table t1;
+
+create table t1 (id int) type=isam;
+alter table t1 type=isam;
+drop table t1;