diff options
author | unknown <kostja@bodhi.(none)> | 2007-06-19 15:02:08 +0400 |
---|---|---|
committer | unknown <kostja@bodhi.(none)> | 2007-06-19 15:02:08 +0400 |
commit | a790eb7570b27a041d9895e7967b3a074caaa5af (patch) | |
tree | 049f115bcc8030374070b78c1c92774b66dfb47c /mysql-test/r | |
parent | 7d16183bd88bc8bef933d575a7eb1b47efc87056 (diff) | |
parent | 85962e0cbedf74d77adc89ef86f92174e893437f (diff) | |
download | mariadb-git-a790eb7570b27a041d9895e7967b3a074caaa5af.tar.gz |
Manual merge.
mysql-test/r/sp.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/handler.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/comments.result | 12 | ||||
-rw-r--r-- | mysql-test/r/log_tables.result | 68 | ||||
-rw-r--r-- | mysql-test/r/query_cache.result | 48 | ||||
-rw-r--r-- | mysql-test/r/sp.result | 128 | ||||
-rw-r--r-- | mysql-test/r/trigger.result | 16 | ||||
-rw-r--r-- | mysql-test/r/varbinary.result | 16 |
6 files changed, 286 insertions, 2 deletions
diff --git a/mysql-test/r/comments.result b/mysql-test/r/comments.result index a9106ce0538..98921c561d1 100644 --- a/mysql-test/r/comments.result +++ b/mysql-test/r/comments.result @@ -8,7 +8,7 @@ multi line comment */; ; ERROR 42000: Query was empty select 1 /*!32301 +1 */; -1 /*!32301 +1 +1 +1 2 select 1 /*!52301 +1 */; 1 @@ -26,3 +26,13 @@ select 1 # The rest of the row will be ignored 1 1 /* line with only comment */; +select 1/*!2*/; +ERROR 42000: 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 '2*/' at line 1 +select 1/*!000002*/; +ERROR 42000: 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 '2*/' at line 1 +select 1/*!999992*/; +1 +1 +select 1 + /*!00000 2 */ + 3 /*!99999 noise*/ + 4; +1 + 2 + 3 + 4 +10 diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result index 5a90c22fa06..ce3dabe3a56 100644 --- a/mysql-test/r/log_tables.result +++ b/mysql-test/r/log_tables.result @@ -287,3 +287,71 @@ slow_log slow_log_new drop table slow_log_new, general_log_new; use test; +SET GLOBAL LOG_OUTPUT = 'TABLE'; +SET GLOBAL general_log = 0; +FLUSH LOGS; +TRUNCATE TABLE mysql.general_log; +ALTER TABLE mysql.general_log ENGINE = MyISAM; +ALTER TABLE mysql.general_log +ADD COLUMN seq BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY; +SET GLOBAL general_log = 1; +FLUSH LOGS; +SELECT * FROM mysql.general_log; +event_time user_host thread_id server_id command_type argument seq +EVENT_TIME USER_HOST THREAD_ID SERVER_ID Query FLUSH LOGS 1 +EVENT_TIME USER_HOST THREAD_ID SERVER_ID Query SELECT * FROM mysql.general_log 2 +SELECT * FROM mysql.general_log; +event_time user_host thread_id server_id command_type argument seq +EVENT_TIME USER_HOST THREAD_ID SERVER_ID Query FLUSH LOGS 1 +EVENT_TIME USER_HOST THREAD_ID SERVER_ID Query SELECT * FROM mysql.general_log 2 +EVENT_TIME USER_HOST THREAD_ID SERVER_ID Query SELECT * FROM mysql.general_log 3 +SELECT "My own query 1"; +My own query 1 +My own query 1 +SELECT "My own query 2"; +My own query 2 +My own query 2 +SELECT * FROM mysql.general_log; +event_time user_host thread_id server_id command_type argument seq +EVENT_TIME USER_HOST THREAD_ID SERVER_ID Query FLUSH LOGS 1 +EVENT_TIME USER_HOST THREAD_ID SERVER_ID Query SELECT * FROM mysql.general_log 2 +EVENT_TIME USER_HOST THREAD_ID SERVER_ID Query SELECT * FROM mysql.general_log 3 +EVENT_TIME USER_HOST THREAD_ID SERVER_ID Query SELECT "My own query 1" 4 +EVENT_TIME USER_HOST THREAD_ID SERVER_ID Query SELECT "My own query 2" 5 +EVENT_TIME USER_HOST THREAD_ID SERVER_ID Query SELECT * FROM mysql.general_log 6 +SET GLOBAL general_log = 0; +FLUSH LOGS; +ALTER TABLE mysql.general_log DROP COLUMN seq; +ALTER TABLE mysql.general_log ENGINE = CSV; +SET @old_long_query_time:=@@long_query_time; +SET GLOBAL slow_query_log = 0; +FLUSH LOGS; +TRUNCATE TABLE mysql.slow_log; +ALTER TABLE mysql.slow_log ENGINE = MyISAM; +ALTER TABLE mysql.slow_log +ADD COLUMN seq BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY; +SET SESSION long_query_time = 1; +SET GLOBAL slow_query_log = 1; +FLUSH LOGS; +SELECT "My own slow query", sleep(2); +My own slow query sleep(2) +My own slow query 0 +SELECT "My own slow query", sleep(2); +My own slow query sleep(2) +My own slow query 0 +SELECT "My own slow query", sleep(2); +My own slow query sleep(2) +My own slow query 0 +SELECT "My own slow query", sleep(2); +My own slow query sleep(2) +My own slow query 0 +SELECT * FROM mysql.slow_log WHERE seq >= 2 LIMIT 3; +start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text seq +START_TIME USER_HOST QUERY_TIME 00:00:00 1 0 test NULL NULL 1 SELECT "My own slow query", sleep(2) 2 +START_TIME USER_HOST QUERY_TIME 00:00:00 1 0 test NULL NULL 1 SELECT "My own slow query", sleep(2) 3 +START_TIME USER_HOST QUERY_TIME 00:00:00 1 0 test NULL NULL 1 SELECT "My own slow query", sleep(2) 4 +SET GLOBAL slow_query_log = 0; +SET SESSION long_query_time =@old_long_query_time; +FLUSH LOGS; +ALTER TABLE mysql.slow_log DROP COLUMN seq; +ALTER TABLE mysql.slow_log ENGINE = CSV; diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 7b68cafd4a8..cf53ada9c20 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1438,6 +1438,54 @@ set GLOBAL query_cache_type=default; set GLOBAL query_cache_limit=default; set GLOBAL query_cache_min_res_unit=default; set GLOBAL query_cache_size= default; +drop database if exists db1; +drop database if exists db2; +set GLOBAL query_cache_size=15*1024*1024; +create database db1; +use db1; +create table t1(c1 int)engine=myisam; +insert into t1(c1) values (1); +select * from db1.t1 f; +c1 +1 +show status like 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 1 +rename schema db1 to db2; +show status like 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 0 +drop database db2; +set global query_cache_size=default; +drop database if exists db1; +drop database if exists db3; +set GLOBAL query_cache_size=15*1024*1024; +create database db1; +create database db3; +use db1; +create table t1(c1 int) engine=myisam; +use db3; +create table t1(c1 int) engine=myisam; +use db1; +insert into t1(c1) values (1); +use mysql; +select * from db1.t1; +c1 +1 +select c1+1 from db1.t1; +c1+1 +2 +select * from db3.t1; +c1 +show status like 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 3 +rename schema db1 to db2; +show status like 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 1 +drop database db2; +drop database db3; set GLOBAL query_cache_size=1000000; create table t1 (a char); insert into t1 values ('c'); diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 1c3fd53b0b2..98d73f7536c 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -6281,4 +6281,130 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI DROP VIEW v1; DROP FUNCTION metered; DROP TABLE t1; -End of 5.0 tests +drop procedure if exists proc_25411_a; +drop procedure if exists proc_25411_b; +drop procedure if exists proc_25411_c; +create procedure proc_25411_a() +begin +/* real comment */ +select 1; +/*! select 2; */ +select 3; +/*!00000 select 4; */ +/*!99999 select 5; */ +end +$$ +create procedure proc_25411_b( +/* real comment */ +/*! p1 int, */ +/*!00000 p2 int */ +/*!99999 ,p3 int */ +) +begin +select p1, p2; +end +$$ +create procedure proc_25411_c() +begin +select 1/*!,2*//*!00000,3*//*!99999,4*/; +select 1/*! ,2*//*!00000 ,3*//*!99999 ,4*/; +select 1/*!,2 *//*!00000,3 *//*!99999,4 */; +select 1/*! ,2 *//*!00000 ,3 *//*!99999 ,4 */; +select 1 /*!,2*/ /*!00000,3*/ /*!99999,4*/ ; +end +$$ +show create procedure proc_25411_a; +Procedure sql_mode Create Procedure +proc_25411_a CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_25411_a`() +begin +/* real comment */ +select 1; + select 2; +select 3; + select 4; + +end +call proc_25411_a(); +1 +1 +2 +2 +3 +3 +4 +4 +show create procedure proc_25411_b; +Procedure sql_mode Create Procedure +proc_25411_b CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_25411_b`( +/* real comment */ + p1 int, + p2 int + +) +begin +select p1, p2; +end +select name, param_list, body from mysql.proc where name like "%25411%"; +name param_list body +proc_25411_a begin +/* real comment */ +select 1; + select 2; +select 3; + select 4; + +end +proc_25411_b +/* real comment */ + p1 int, + p2 int + + begin +select p1, p2; +end +proc_25411_c begin +select 1,2,3; +select 1 ,2 ,3; +select 1,2 ,3 ; +select 1 ,2 ,3 ; +select 1 ,2 ,3 ; +end +call proc_25411_b(10, 20); +p1 p2 +10 20 +show create procedure proc_25411_c; +Procedure sql_mode Create Procedure +proc_25411_c CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_25411_c`() +begin +select 1,2,3; +select 1 ,2 ,3; +select 1,2 ,3 ; +select 1 ,2 ,3 ; +select 1 ,2 ,3 ; +end +call proc_25411_c(); +1 2 3 +1 2 3 +1 2 3 +1 2 3 +1 2 3 +1 2 3 +1 2 3 +1 2 3 +1 2 3 +1 2 3 +drop procedure proc_25411_a; +drop procedure proc_25411_b; +drop procedure proc_25411_c; +drop procedure if exists proc_26302; +create procedure proc_26302() +select 1 /* testing */; +show create procedure proc_26302; +Procedure sql_mode Create Procedure +proc_26302 CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_26302`() +select 1 /* testing */ +select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES +where ROUTINE_NAME = "proc_26302"; +ROUTINE_NAME ROUTINE_DEFINITION +proc_26302 select 1 /* testing */ +drop procedure proc_26302; diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index 59ed4511aed..ecaef458e92 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -1477,3 +1477,19 @@ DROP TABLE t1,t2; SET SESSION LOW_PRIORITY_UPDATES=DEFAULT; SET GLOBAL LOW_PRIORITY_UPDATES=DEFAULT; End of 5.0 tests +drop table if exists table_25411_a; +drop table if exists table_25411_b; +create table table_25411_a(a int); +create table table_25411_b(b int); +create trigger trg_25411a_ai after insert on table_25411_a +for each row +insert into table_25411_b select new.*; +select * from table_25411_a; +a +insert into table_25411_a values (1); +ERROR 42S02: Unknown table 'new' +select * from table_25411_a; +a +1 +drop table table_25411_a; +drop table table_25411_b; diff --git a/mysql-test/r/varbinary.result b/mysql-test/r/varbinary.result index f30af2ea1a3..6d39d8301c5 100644 --- a/mysql-test/r/varbinary.result +++ b/mysql-test/r/varbinary.result @@ -79,3 +79,19 @@ select length(a) from t1; length(a) 6 drop table t1; +drop table if exists table_28127_a; +drop table if exists table_28127_b; +create table table_28127_a(0b02 int); +show create table table_28127_a; +Table Create Table +table_28127_a CREATE TABLE `table_28127_a` ( + `0b02` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +create table table_28127_b(0b2 int); +show create table table_28127_b; +Table Create Table +table_28127_b CREATE TABLE `table_28127_b` ( + `0b2` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table table_28127_a; +drop table table_28127_b; |