diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/distinct.result | 32 | ||||
-rw-r--r-- | mysql-test/r/multi_update.result | 14 | ||||
-rw-r--r-- | mysql-test/t/multi_update.test | 4 |
3 files changed, 25 insertions, 25 deletions
diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index 809eb22f987..aefcba9ed9d 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -199,29 +199,29 @@ select distinct 1 from t1,t3 where t1.a=t3.a; 1 1 explain SELECT distinct t1.a from t1; -table type possible_keys key key_len ref rows Extra -t1 index NULL PRIMARY 4 NULL 2 Using index +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL PRIMARY 4 NULL 2 Using index explain SELECT distinct t1.a from t1 order by a desc; -table type possible_keys key key_len ref rows Extra -t1 index NULL PRIMARY 4 NULL 2 Using index +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL PRIMARY 4 NULL 2 Using index explain SELECT t1.a from t1 group by a order by a desc; -table type possible_keys key key_len ref rows Extra -t1 index NULL PRIMARY 4 NULL 2 Using index +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL PRIMARY 4 NULL 2 Using index explain SELECT distinct t1.a from t1 order by a desc limit 1; -table type possible_keys key key_len ref rows Extra -t1 index NULL PRIMARY 4 NULL 2 Using index +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL PRIMARY 4 NULL 2 Using index explain SELECT distinct a from t3 order by a desc limit 2; -table type possible_keys key key_len ref rows Extra -t3 index NULL a 5 NULL 204 Using index +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 index NULL a 5 NULL 204 Using index explain SELECT distinct a,b from t3 order by a+1; -table type possible_keys key key_len ref rows Extra -t3 ALL NULL NULL NULL NULL 204 Using temporary; Using filesort +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 ALL NULL NULL NULL NULL 204 Using temporary; Using filesort explain SELECT distinct a,b from t3 order by a limit 10; -table type possible_keys key key_len ref rows Extra -t3 index NULL a 5 NULL 204 Using temporary +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 index NULL a 5 NULL 204 Using temporary explain SELECT a,b from t3 group by a,b order by a+1; -table type possible_keys key key_len ref rows Extra -t3 ALL NULL NULL NULL NULL 204 Using temporary; Using filesort +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 ALL NULL NULL NULL NULL 204 Using temporary; Using filesort drop table t1,t2,t3,t4; CREATE TABLE t1 (name varchar(255)); INSERT INTO t1 VALUES ('aa'),('ab'),('ac'),('ad'),('ae'); diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 7d1f5bd53f6..8cf035343b1 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -182,13 +182,13 @@ insert into t1 values(1,1,NULL); insert into t2 values(1,10,NULL),(2,20,NULL); set timestamp=1038000000; UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n; -select * from t1; -n d t -1 10 20021123002000 -select * from t2; -n d t -1 10 20021127154957 -2 20 20021127154957 +select n,d,unix_timestamp(t) from t1; +n d unix_timestamp(t) +1 10 1038000000 +select n,d,unix_timestamp(t) from t2; +n d unix_timestamp(t) +1 10 1038401397 +2 20 1038401397 UPDATE t1,t2 SET 1=2 WHERE t1.n=t2.n; You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '1=2 WHERE t1.n=t2.n' at line 1 drop table t1,t2; diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index b79b0749c82..ff456b710c1 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -183,8 +183,8 @@ insert into t1 values(1,1,NULL); insert into t2 values(1,10,NULL),(2,20,NULL); set timestamp=1038000000; UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n; -select * from t1; -select * from t2; +select n,d,unix_timestamp(t) from t1; +select n,d,unix_timestamp(t) from t2; --error 1064 UPDATE t1,t2 SET 1=2 WHERE t1.n=t2.n; drop table t1,t2; |