diff options
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/mysqldump.test | 2 | ||||
-rw-r--r-- | mysql-test/t/parser.test | 2 | ||||
-rw-r--r-- | mysql-test/t/select.test | 76 | ||||
-rw-r--r-- | mysql-test/t/system_mysql_db_fix40123.test | 2 | ||||
-rw-r--r-- | mysql-test/t/system_mysql_db_fix50030.test | 2 | ||||
-rw-r--r-- | mysql-test/t/system_mysql_db_fix50117.test | 2 | ||||
-rw-r--r-- | mysql-test/t/variables.test | 160 |
7 files changed, 42 insertions, 204 deletions
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 9f74f4ad9c0..0d8037a0e1f 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1453,7 +1453,7 @@ insert into u1 values (4); create view v1 (c1) as select * from t1; # Backup should not fail for Bug#21527. Flush priviliges test begins. ---exec $MYSQL_DUMP --skip-comments --add-drop-table --flush-privileges --ignore-table=mysql.general_log --ignore-table=mysql.slow_log --databases mysqldump_myDB mysql > $MYSQLTEST_VARDIR/tmp/bug21527.sql +--exec $MYSQL_DUMP --skip-comments --add-drop-table --flush-privileges --ignore-table=mysql.general_log --ignore-table=mysql.slow_log --ignore-table=mysql.transaction_registry --databases mysqldump_myDB mysql > $MYSQLTEST_VARDIR/tmp/bug21527.sql # Clean up connection root; diff --git a/mysql-test/t/parser.test b/mysql-test/t/parser.test index 98eaa7a7774..3be42eb0595 100644 --- a/mysql-test/t/parser.test +++ b/mysql-test/t/parser.test @@ -104,9 +104,7 @@ create table MIN (a int); drop table MIN; --error ER_PARSE_ERROR -create table NOW(a int); create table NOW (a int); -drop table NOW; --error ER_PARSE_ERROR create table POSITION(a int); diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index e8d5f9fa445..d216b003c78 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -25,13 +25,13 @@ if (`select @join_cache_level_for_select_test is not null`) } CREATE TABLE t1 ( - Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, + Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL ); INSERT INTO t1 VALUES (9410,9412); -select period from t1; +select period_ from t1; select * from t1; select t1.* from t1; @@ -1361,7 +1361,7 @@ select fld1,fld3 from t2 where fld1 like "25050_"; select distinct companynr from t2; select distinct companynr from t2 order by companynr; select distinct companynr from t2 order by companynr desc; -select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%"; +select distinct t2.fld3,period_ from t2,t1 where companynr=37 and fld3 like "O%"; select distinct fld3 from t2 where companynr = 34 order by fld3; select distinct fld3 from t2 limit 10; @@ -1374,26 +1374,26 @@ select distinct substring(fld3,1,3) as a from t2 having a like "A%" limit 10; # make a big table. create table t3 ( - period int not null, + period_ int not null, name char(32) not null, companynr int not null, price double(11,0), price2 double(11,0), - key (period), + key (period_), key (name) ); --disable_query_log -INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1001,"Iranizes",37,5987435,234724); -INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1002,"violinist",37,28357832,8723648); -INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1003,"extramarital",37,39654943,235872); -INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1004,"spates",78,726498,72987523); -INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1005,"cloakroom",78,98439034,823742); -INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1006,"gazer",101,834598,27348324); -INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1007,"hand",154,983543950,29837423); -INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1008,"tucked",311,234298,3275892); -INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1009,"gems",447,2374834,9872392); -INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1010,"clinker",512,786542,76234234); +INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1001,"Iranizes",37,5987435,234724); +INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1002,"violinist",37,28357832,8723648); +INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1003,"extramarital",37,39654943,235872); +INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1004,"spates",78,726498,72987523); +INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1005,"cloakroom",78,98439034,823742); +INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1006,"gazer",101,834598,27348324); +INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1007,"hand",154,983543950,29837423); +INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1008,"tucked",311,234298,3275892); +INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1009,"gems",447,2374834,9872392); +INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1010,"clinker",512,786542,76234234); --enable_query_log create temporary table tmp engine = myisam select * from t3; @@ -1462,39 +1462,39 @@ explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2 # Some test with ORDER BY and limit # -explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; -explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10; -explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10; +explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_; +explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_ limit 10; +explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t1.period_ limit 10; # # Search with a constant table. # -select period from t1; -select period from t1 where period=1900; -select fld3,period from t1,t2 where fld1 = 011401 order by period; +select period_ from t1; +select period_ from t1 where period_=1900; +select fld3,period_ from t1,t2 where fld1 = 011401 order by period_; # # Search with a constant table and several keyparts. (Rows are read only once # in the beginning of the search) # -select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001; +select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period_=1001; -explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period; +explain select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period_; # # Search with a constant table and several rows from another table # -select fld3,period from t2,t1 where companynr*10 = 37*10; +select fld3,period_ from t2,t1 where companynr*10 = 37*10; # # Search with a table reference and without a key. # t3 will be the main table. # -select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price; +select fld3,period_,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period_ >= 1001 and period_ <= 1002 and t2.companynr = 37 order by fld3,period_, price; # # Search with an interval on a table with full key on reference table. @@ -1502,7 +1502,7 @@ select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1 # t2nr will be checked. # -select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37; +select t2.fld1,fld3,period_,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period_ = 1001 and t2.companynr = 37; # # We need another table for join stuff.. @@ -1594,18 +1594,18 @@ explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr= # each record # -select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008; +select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period_ = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period_ = 1008; -select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; +select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009; -select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; +select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009; # # Test of many parenthesis levels # -select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); -select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6))); +select period_ from t1 where (((period_ > 0) or period_ < 10000 or (period_ = 1900)) and (period_=1900 and period_ <= 1901) or (period_=1903 and (period_=1903)) and period_>=1902) or ((period_=1904 or period_=1905) or (period_=1906 or period_>1907)) or (period_=1908 and period_ = 1909); +select period_ from t1 where ((period_ > 0 and period_ < 1) or (((period_ > 0 and period_ < 100) and (period_ > 10)) or (period_ > 10)) or (period_ > 0 and (period_ > 5 or period_ > 6))); select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1; @@ -1663,7 +1663,7 @@ select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 grou # Calculation with group functions # -select sum(Period)/count(*) from t1; +select sum(Period_)/count(*) from t1; select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr; select companynr,sum(price)/count(price) as avg from t3 group by companynr having avg > 70000000 order by avg; @@ -1753,13 +1753,13 @@ select max(t2nr) from t3 where price=983543950; # Test of alias # -select t1.period from t3 = t1 limit 1; -select t1.period from t1 as t1 limit 1; -select t1.period as "Nuvarande period" from t1 as t1 limit 1; -select period as ok_period from t1 limit 1; -select period as ok_period from t1 group by ok_period limit 1; +select t1.period_ from t3 = t1 limit 1; +select t1.period_ from t1 as t1 limit 1; +select t1.period_ as "Nuvarande period_" from t1 as t1 limit 1; +select period_ as ok_period from t1 limit 1; +select period_ as ok_period from t1 group by ok_period limit 1; select 1+1 as summa from t1 group by summa limit 1; -select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1; +select period_ as "Nuvarande period_" from t1 group by "Nuvarande period_" limit 1; # # Some simple show commands diff --git a/mysql-test/t/system_mysql_db_fix40123.test b/mysql-test/t/system_mysql_db_fix40123.test index fd1212d4ce6..af21540b94f 100644 --- a/mysql-test/t/system_mysql_db_fix40123.test +++ b/mysql-test/t/system_mysql_db_fix40123.test @@ -72,7 +72,7 @@ CREATE TABLE time_zone_leap_second ( Transition_time bigint signed NOT NULL, -- disable_query_log # Drop all tables created by this test -DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos; +DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, vtmd_template, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos; -- enable_query_log diff --git a/mysql-test/t/system_mysql_db_fix50030.test b/mysql-test/t/system_mysql_db_fix50030.test index c3e7dd7b9b1..c87366935ef 100644 --- a/mysql-test/t/system_mysql_db_fix50030.test +++ b/mysql-test/t/system_mysql_db_fix50030.test @@ -79,7 +79,7 @@ INSERT INTO servers VALUES ('test','localhost','test','root','', 0,'','mysql','r -- disable_query_log # Drop all tables created by this test -DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos; +DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, vtmd_template, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos; -- enable_query_log diff --git a/mysql-test/t/system_mysql_db_fix50117.test b/mysql-test/t/system_mysql_db_fix50117.test index dcc765ae132..af705ca790c 100644 --- a/mysql-test/t/system_mysql_db_fix50117.test +++ b/mysql-test/t/system_mysql_db_fix50117.test @@ -96,7 +96,7 @@ CREATE TABLE IF NOT EXISTS event ( db char(64) CHARACTER SET utf8 COLLATE utf8_b -- disable_query_log # Drop all tables created by this test -DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos; +DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, vtmd_template, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos; -- enable_query_log diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 8d831567252..67082fd48ff 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -1295,166 +1295,6 @@ DROP TABLE t1; --echo End of 5.1 tests -########################################################################### - ---echo ---echo # ---echo # Bug#34828: OF is taken as OFF and a value of 0 is set for variable SQL_notes. ---echo # ---echo - ---echo # Checking sql_notes... -SET @sql_notes_saved = @@sql_notes; - ---echo -SET @@sql_notes = ON; -SELECT @@sql_notes; - ---echo ---error ER_WRONG_VALUE_FOR_VAR -SET @@sql_notes = OF; -SELECT @@sql_notes; - ---echo -SET @@sql_notes = OFF; -SELECT @@sql_notes; - ---echo -SET @@sql_notes = @sql_notes_saved; - ---echo ---echo # Checking delay_key_write... -SET @delay_key_write_saved = @@delay_key_write; - ---echo -SET GLOBAL delay_key_write = ON; -SELECT @@delay_key_write; - ---echo ---error ER_WRONG_VALUE_FOR_VAR -SET GLOBAL delay_key_write = OF; -SELECT @@delay_key_write; - ---echo ---error ER_WRONG_VALUE_FOR_VAR -SET GLOBAL delay_key_write = AL; -SELECT @@delay_key_write; - ---echo -SET GLOBAL delay_key_write = OFF; -SELECT @@delay_key_write; - ---echo -SET GLOBAL delay_key_write = ALL; -SELECT @@delay_key_write; - ---echo -SET GLOBAL delay_key_write = @delay_key_write_saved; - ---echo ---echo # Checking sql_safe_updates... -SET @sql_safe_updates_saved = @@sql_safe_updates; - ---echo -SET @@sql_safe_updates = ON; -SELECT @@sql_safe_updates; - ---echo ---error ER_WRONG_VALUE_FOR_VAR -SET @@sql_safe_updates = OF; -SELECT @@sql_safe_updates; - ---echo -SET @@sql_safe_updates = OFF; -SELECT @@sql_safe_updates; - ---echo -SET @@sql_safe_updates = @sql_safe_updates_saved; - ---echo ---echo # Checking foreign_key_checks... -SET @foreign_key_checks_saved = @@foreign_key_checks; - ---echo -SET @@foreign_key_checks = ON; -SELECT @@foreign_key_checks; - ---echo ---error ER_WRONG_VALUE_FOR_VAR -SET @@foreign_key_checks = OF; -SELECT @@foreign_key_checks; - ---echo -SET @@foreign_key_checks = OFF; -SELECT @@foreign_key_checks; - ---echo -SET @@foreign_key_checks = @foreign_key_checks_saved; - ---echo ---echo # Checking unique_checks... -SET @unique_checks_saved = @@unique_checks; - ---echo -SET @@unique_checks = ON; -SELECT @@unique_checks; - ---echo ---error ER_WRONG_VALUE_FOR_VAR -SET @@unique_checks = OF; -SELECT @@unique_checks; - ---echo -SET @@unique_checks = OFF; -SELECT @@unique_checks; - ---echo -SET @@unique_checks = @unique_checks_saved; - ---echo ---echo # Checking sql_buffer_result... -SET @sql_buffer_result_saved = @@sql_buffer_result; - ---echo -SET @@sql_buffer_result = ON; -SELECT @@sql_buffer_result; - ---echo ---error ER_WRONG_VALUE_FOR_VAR -SET @@sql_buffer_result = OF; -SELECT @@sql_buffer_result; - ---echo -SET @@sql_buffer_result = OFF; -SELECT @@sql_buffer_result; - ---echo -SET @@sql_buffer_result = @sql_buffer_result_saved; - ---echo ---echo # Checking sql_quote_show_create... -SET @sql_quote_show_create_saved = @@sql_quote_show_create; - ---echo -SET @@sql_quote_show_create = ON; -SELECT @@sql_quote_show_create; - ---echo ---error ER_WRONG_VALUE_FOR_VAR -SET @@sql_quote_show_create = OF; -SELECT @@sql_quote_show_create; - ---echo -SET @@sql_quote_show_create = OFF; -SELECT @@sql_quote_show_create; - ---echo -SET @@sql_quote_show_create = @sql_quote_show_create_saved; - ---echo ---echo # End of Bug#34828. ---echo - --echo # Make sure we can manipulate with autocommit in the --echo # along with other variables. |