summaryrefslogtreecommitdiff
path: root/mysql-test/t/insert.test
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-09-29 12:31:35 +0300
committerunknown <monty@narttu.mysql.fi>2003-09-29 12:31:35 +0300
commite03265d4d585a86b132c6119cb6363839c2f6e5b (patch)
tree0646d11c5212e91d6db4f7118acf7d5183cf88c9 /mysql-test/t/insert.test
parent3106e3119a2b3ee9155360279e48093d0e3b7d45 (diff)
downloadmariadb-git-e03265d4d585a86b132c6119cb6363839c2f6e5b.tar.gz
Removed random chars after filename for LOAD DATA INFILE (in mysqlbinlog)
Add quoting for use `database` for mysqlbinlog Removed test ins0000001 Add support for --replace for exec in mysqltest Don't refer to install dir in mysqlbinlog.result BitKeeper/deleted/.del-ins000001.result~f45c599efdf8352b: Delete: mysql-test/r/ins000001.result BitKeeper/deleted/.del-ins000001.test~2428ee5c9b1bc483: Delete: mysql-test/t/ins000001.test client/mysqlbinlog.cc: Removed random chars after filename for LOAD DATA INFILE client/mysqltest.c: Add support for --replace for 'exec' mysql-test/r/drop_temp_table.result: Updated results after quoting change mysql-test/r/fulltext_multi.result: Updated results after quoting change mysql-test/r/fulltext_order_by.result: Updated results after quoting change mysql-test/r/insert.result: New tests mysql-test/r/insert_select.result: Updated results after quoting change mysql-test/r/mix_innodb_myisam_binlog.result: Updated results after quoting change mysql-test/r/mysqlbinlog.result: Updated results after quoting change mysql-test/r/rpl_log.result: Updated results after quoting change mysql-test/t/fulltext_multi.test: Remove 'use' mysql-test/t/fulltext_order_by.test: Remove 'use' mysql-test/t/insert.test: Merge test with ins0000001.test mysql-test/t/mysqlbinlog.test: Don't refer to install dir in result sql/log_event.cc: Add quoting for use `database` for mysqlbinlog support-files/mysql.server.sh: Move pid_file test after arguments have been parsed
Diffstat (limited to 'mysql-test/t/insert.test')
-rw-r--r--mysql-test/t/insert.test26
1 files changed, 19 insertions, 7 deletions
diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test
index be585157e63..fbb9134ff7f 100644
--- a/mysql-test/t/insert.test
+++ b/mysql-test/t/insert.test
@@ -2,7 +2,7 @@
# Test of refering to old values
#
-drop table if exists t1;
+drop table if exists t1,t2;
create table t1 (a int not null);
insert into t1 values (1);
insert into t1 values (a+2);
@@ -62,13 +62,25 @@ select * from t1;
drop table t1;
#
+# Test if insert ... select distinct
+#
+
+create table t1 (email varchar(50));
+insert into t1 values ('sasha@mysql.com'),('monty@mysql.com'),('foo@hotmail.com'),('foo@aol.com'),('bar@aol.com');
+create table t2(id int not null auto_increment primary key, t2 varchar(50), unique(t2));
+insert into t2 (t2) select distinct substring(email, locate('@', email)+1) from t1;
+select * from t2;
+drop table t1,t2;
+
+#
# Test of mysqld crash with fully qualified column names
#
-drop database if exists foo;
-create database foo;
-use foo;
+--disable_warnings
+drop database if exists mysqltest;
+--enable_warnings
+create database mysqltest;
+use mysqltest;
create table t1 (c int);
-insert into foo.t1 set foo.t1.c = '1';
-drop database foo;
-
+insert into mysqltest.t1 set mysqltest.t1.c = '1';
+drop database mysqltest;