Commit 3f82fccc authored by Matthias Leich's avatar Matthias Leich

Fix for Bug#42836 Funcs_1 storedproc and storedproc_08 tests failing

parent c72c5495
...@@ -103,7 +103,7 @@ END// ...@@ -103,7 +103,7 @@ END//
... now check what is stored: ... now check what is stored:
----------------------------- -----------------------------
SELECT * FROM information_schema.routines; SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
SPECIFIC_NAME fn_1 SPECIFIC_NAME fn_1
ROUTINE_CATALOG NULL ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc ROUTINE_SCHEMA db_storedproc
...@@ -208,75 +208,6 @@ DEFINER root@localhost ...@@ -208,75 +208,6 @@ DEFINER root@localhost
CHARACTER_SET_CLIENT latin1 CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME add_suppression
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME add_suppression
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_testcase
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_testcase
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name != 'timestamp' ORDER BY VARIABLE_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY columns_in_mysql; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.proc, mysql.procs_priv, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_warnings
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_warnings
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT file_name, line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1; SHOW CREATE FUNCTION fn_1;
Function fn_1 Function fn_1
sql_mode sql_mode
...@@ -390,7 +321,7 @@ ALTER FUNCTION fn_2 MODIFIES SQL DATA; ...@@ -390,7 +321,7 @@ ALTER FUNCTION fn_2 MODIFIES SQL DATA;
... now check what is stored: ... now check what is stored:
----------------------------- -----------------------------
SELECT * FROM information_schema.routines; SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
SPECIFIC_NAME fn_1 SPECIFIC_NAME fn_1
ROUTINE_CATALOG NULL ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc ROUTINE_SCHEMA db_storedproc
...@@ -495,75 +426,6 @@ DEFINER root@localhost ...@@ -495,75 +426,6 @@ DEFINER root@localhost
CHARACTER_SET_CLIENT latin1 CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME add_suppression
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME add_suppression
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_testcase
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_testcase
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name != 'timestamp' ORDER BY VARIABLE_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY columns_in_mysql; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.proc, mysql.procs_priv, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_warnings
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_warnings
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT file_name, line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1; SHOW CREATE FUNCTION fn_1;
Function fn_1 Function fn_1
sql_mode sql_mode
...@@ -670,7 +532,7 @@ ALTER FUNCTION fn_2 CONTAINS SQL; ...@@ -670,7 +532,7 @@ ALTER FUNCTION fn_2 CONTAINS SQL;
... now check what is stored: ... now check what is stored:
----------------------------- -----------------------------
SELECT * FROM information_schema.routines; SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
SPECIFIC_NAME fn_1 SPECIFIC_NAME fn_1
ROUTINE_CATALOG NULL ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc ROUTINE_SCHEMA db_storedproc
...@@ -775,75 +637,6 @@ DEFINER root@localhost ...@@ -775,75 +637,6 @@ DEFINER root@localhost
CHARACTER_SET_CLIENT latin1 CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME add_suppression
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME add_suppression
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_testcase
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_testcase
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name != 'timestamp' ORDER BY VARIABLE_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY columns_in_mysql; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.proc, mysql.procs_priv, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_warnings
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_warnings
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT file_name, line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1; SHOW CREATE FUNCTION fn_1;
Function fn_1 Function fn_1
sql_mode sql_mode
......
...@@ -348,13 +348,13 @@ for each row set @test_var2='trig1_a'; ...@@ -348,13 +348,13 @@ for each row set @test_var2='trig1_a';
create trigger trig_db2.trig2 before insert on trig_db2.t1 create trigger trig_db2.trig2 before insert on trig_db2.t1
for each row set @test_var3='trig2'; for each row set @test_var3='trig2';
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers order by trigger_name; from information_schema.triggers
where trigger_schema like 'trig_db%'
order by trigger_name;
trigger_schema trigger_name event_object_table trigger_schema trigger_name event_object_table
mtr gs_insert global_suppressions
trig_db1 trig1_a t1 trig_db1 trig1_a t1
trig_db1 trig1_b t1 trig_db1 trig1_b t1
trig_db2 trig2 t1 trig_db2 trig2 t1
mtr ts_insert test_suppressions
set @test_var1= '', @test_var2= '', @test_var3= ''; set @test_var1= '', @test_var2= '', @test_var3= '';
insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352); insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352);
insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352); insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352);
......
...@@ -90,10 +90,10 @@ f1 ...@@ -90,10 +90,10 @@ f1
Trigger 3.5.4.1 Trigger 3.5.4.1
drop trigger trg1; drop trigger trg1;
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers order by trigger_name; from information_schema.triggers
where trigger_schema = 'db_drop'
order by trigger_name;
trigger_schema trigger_name event_object_table trigger_schema trigger_name event_object_table
mtr gs_insert global_suppressions
mtr ts_insert test_suppressions
Insert into t1 values ('Insert no trigger 3.5.4.1'); Insert into t1 values ('Insert no trigger 3.5.4.1');
Select * from t1 order by f1; Select * from t1 order by f1;
f1 f1
...@@ -151,12 +151,8 @@ Select * from t1; ...@@ -151,12 +151,8 @@ Select * from t1;
f1 f1
Trigger 3.5.4.4 Trigger 3.5.4.4
Drop database db_drop4; Drop database db_drop4;
Show databases; Show databases like 'db_drop4';
Database Database (db_drop4)
information_schema
mtr
mysql
test
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers from information_schema.triggers
where information_schema.triggers.trigger_name='trg4'; where information_schema.triggers.trigger_name='trg4';
......
...@@ -104,7 +104,7 @@ END// ...@@ -104,7 +104,7 @@ END//
... now check what is stored: ... now check what is stored:
----------------------------- -----------------------------
SELECT * FROM information_schema.routines; SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
SPECIFIC_NAME fn_1 SPECIFIC_NAME fn_1
ROUTINE_CATALOG NULL ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc ROUTINE_SCHEMA db_storedproc
...@@ -209,75 +209,6 @@ DEFINER root@localhost ...@@ -209,75 +209,6 @@ DEFINER root@localhost
CHARACTER_SET_CLIENT latin1 CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME add_suppression
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME add_suppression
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_testcase
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_testcase
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name != 'timestamp' ORDER BY VARIABLE_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY columns_in_mysql; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.proc, mysql.procs_priv, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_warnings
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_warnings
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT file_name, line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1; SHOW CREATE FUNCTION fn_1;
Function fn_1 Function fn_1
sql_mode NO_ENGINE_SUBSTITUTION sql_mode NO_ENGINE_SUBSTITUTION
...@@ -391,7 +322,7 @@ ALTER FUNCTION fn_2 MODIFIES SQL DATA; ...@@ -391,7 +322,7 @@ ALTER FUNCTION fn_2 MODIFIES SQL DATA;
... now check what is stored: ... now check what is stored:
----------------------------- -----------------------------
SELECT * FROM information_schema.routines; SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
SPECIFIC_NAME fn_1 SPECIFIC_NAME fn_1
ROUTINE_CATALOG NULL ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc ROUTINE_SCHEMA db_storedproc
...@@ -496,75 +427,6 @@ DEFINER root@localhost ...@@ -496,75 +427,6 @@ DEFINER root@localhost
CHARACTER_SET_CLIENT latin1 CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME add_suppression
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME add_suppression
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_testcase
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_testcase
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name != 'timestamp' ORDER BY VARIABLE_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY columns_in_mysql; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.proc, mysql.procs_priv, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_warnings
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_warnings
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT file_name, line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1; SHOW CREATE FUNCTION fn_1;
Function fn_1 Function fn_1
sql_mode NO_ENGINE_SUBSTITUTION sql_mode NO_ENGINE_SUBSTITUTION
...@@ -671,7 +533,7 @@ ALTER FUNCTION fn_2 CONTAINS SQL; ...@@ -671,7 +533,7 @@ ALTER FUNCTION fn_2 CONTAINS SQL;
... now check what is stored: ... now check what is stored:
----------------------------- -----------------------------
SELECT * FROM information_schema.routines; SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
SPECIFIC_NAME fn_1 SPECIFIC_NAME fn_1
ROUTINE_CATALOG NULL ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc ROUTINE_SCHEMA db_storedproc
...@@ -776,75 +638,6 @@ DEFINER root@localhost ...@@ -776,75 +638,6 @@ DEFINER root@localhost
CHARACTER_SET_CLIENT latin1 CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME add_suppression
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME add_suppression
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_testcase
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_testcase
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name != 'timestamp' ORDER BY VARIABLE_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY columns_in_mysql; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.proc, mysql.procs_priv, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_warnings
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_warnings
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT file_name, line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1; SHOW CREATE FUNCTION fn_1;
Function fn_1 Function fn_1
sql_mode NO_ENGINE_SUBSTITUTION sql_mode NO_ENGINE_SUBSTITUTION
......
...@@ -349,13 +349,13 @@ for each row set @test_var2='trig1_a'; ...@@ -349,13 +349,13 @@ for each row set @test_var2='trig1_a';
create trigger trig_db2.trig2 before insert on trig_db2.t1 create trigger trig_db2.trig2 before insert on trig_db2.t1
for each row set @test_var3='trig2'; for each row set @test_var3='trig2';
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers order by trigger_name; from information_schema.triggers
where trigger_schema like 'trig_db%'
order by trigger_name;
trigger_schema trigger_name event_object_table trigger_schema trigger_name event_object_table
mtr gs_insert global_suppressions
trig_db1 trig1_a t1 trig_db1 trig1_a t1
trig_db1 trig1_b t1 trig_db1 trig1_b t1
trig_db2 trig2 t1 trig_db2 trig2 t1
mtr ts_insert test_suppressions
set @test_var1= '', @test_var2= '', @test_var3= ''; set @test_var1= '', @test_var2= '', @test_var3= '';
insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352); insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352);
insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352); insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352);
......
...@@ -91,10 +91,10 @@ f1 ...@@ -91,10 +91,10 @@ f1
Trigger 3.5.4.1 Trigger 3.5.4.1
drop trigger trg1; drop trigger trg1;
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers order by trigger_name; from information_schema.triggers
where trigger_schema = 'db_drop'
order by trigger_name;
trigger_schema trigger_name event_object_table trigger_schema trigger_name event_object_table
mtr gs_insert global_suppressions
mtr ts_insert test_suppressions
Insert into t1 values ('Insert no trigger 3.5.4.1'); Insert into t1 values ('Insert no trigger 3.5.4.1');
Select * from t1 order by f1; Select * from t1 order by f1;
f1 f1
...@@ -152,12 +152,8 @@ Select * from t1; ...@@ -152,12 +152,8 @@ Select * from t1;
f1 f1
Trigger 3.5.4.4 Trigger 3.5.4.4
Drop database db_drop4; Drop database db_drop4;
Show databases; Show databases like 'db_drop4';
Database Database (db_drop4)
information_schema
mtr
mysql
test
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers from information_schema.triggers
where information_schema.triggers.trigger_name='trg4'; where information_schema.triggers.trigger_name='trg4';
......
...@@ -104,7 +104,7 @@ END// ...@@ -104,7 +104,7 @@ END//
... now check what is stored: ... now check what is stored:
----------------------------- -----------------------------
SELECT * FROM information_schema.routines; SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
SPECIFIC_NAME fn_1 SPECIFIC_NAME fn_1
ROUTINE_CATALOG NULL ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc ROUTINE_SCHEMA db_storedproc
...@@ -209,75 +209,6 @@ DEFINER root@localhost ...@@ -209,75 +209,6 @@ DEFINER root@localhost
CHARACTER_SET_CLIENT latin1 CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME add_suppression
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME add_suppression
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_testcase
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_testcase
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name != 'timestamp' ORDER BY VARIABLE_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY columns_in_mysql; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.proc, mysql.procs_priv, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_warnings
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_warnings
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT file_name, line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1; SHOW CREATE FUNCTION fn_1;
Function fn_1 Function fn_1
sql_mode NO_ENGINE_SUBSTITUTION sql_mode NO_ENGINE_SUBSTITUTION
...@@ -391,7 +322,7 @@ ALTER FUNCTION fn_2 MODIFIES SQL DATA; ...@@ -391,7 +322,7 @@ ALTER FUNCTION fn_2 MODIFIES SQL DATA;
... now check what is stored: ... now check what is stored:
----------------------------- -----------------------------
SELECT * FROM information_schema.routines; SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
SPECIFIC_NAME fn_1 SPECIFIC_NAME fn_1
ROUTINE_CATALOG NULL ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc ROUTINE_SCHEMA db_storedproc
...@@ -496,75 +427,6 @@ DEFINER root@localhost ...@@ -496,75 +427,6 @@ DEFINER root@localhost
CHARACTER_SET_CLIENT latin1 CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME add_suppression
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME add_suppression
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_testcase
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_testcase
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name != 'timestamp' ORDER BY VARIABLE_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY columns_in_mysql; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.proc, mysql.procs_priv, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_warnings
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_warnings
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT file_name, line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1; SHOW CREATE FUNCTION fn_1;
Function fn_1 Function fn_1
sql_mode NO_ENGINE_SUBSTITUTION sql_mode NO_ENGINE_SUBSTITUTION
...@@ -671,7 +533,7 @@ ALTER FUNCTION fn_2 CONTAINS SQL; ...@@ -671,7 +533,7 @@ ALTER FUNCTION fn_2 CONTAINS SQL;
... now check what is stored: ... now check what is stored:
----------------------------- -----------------------------
SELECT * FROM information_schema.routines; SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
SPECIFIC_NAME fn_1 SPECIFIC_NAME fn_1
ROUTINE_CATALOG NULL ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc ROUTINE_SCHEMA db_storedproc
...@@ -776,75 +638,6 @@ DEFINER root@localhost ...@@ -776,75 +638,6 @@ DEFINER root@localhost
CHARACTER_SET_CLIENT latin1 CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME add_suppression
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME add_suppression
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_testcase
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_testcase
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name != 'timestamp' ORDER BY VARIABLE_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY columns_in_mysql; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.proc, mysql.procs_priv, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_warnings
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_warnings
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT file_name, line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1; SHOW CREATE FUNCTION fn_1;
Function fn_1 Function fn_1
sql_mode NO_ENGINE_SUBSTITUTION sql_mode NO_ENGINE_SUBSTITUTION
......
...@@ -349,13 +349,13 @@ for each row set @test_var2='trig1_a'; ...@@ -349,13 +349,13 @@ for each row set @test_var2='trig1_a';
create trigger trig_db2.trig2 before insert on trig_db2.t1 create trigger trig_db2.trig2 before insert on trig_db2.t1
for each row set @test_var3='trig2'; for each row set @test_var3='trig2';
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers order by trigger_name; from information_schema.triggers
where trigger_schema like 'trig_db%'
order by trigger_name;
trigger_schema trigger_name event_object_table trigger_schema trigger_name event_object_table
mtr gs_insert global_suppressions
trig_db1 trig1_a t1 trig_db1 trig1_a t1
trig_db1 trig1_b t1 trig_db1 trig1_b t1
trig_db2 trig2 t1 trig_db2 trig2 t1
mtr ts_insert test_suppressions
set @test_var1= '', @test_var2= '', @test_var3= ''; set @test_var1= '', @test_var2= '', @test_var3= '';
insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352); insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352);
insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352); insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352);
......
...@@ -91,10 +91,10 @@ f1 ...@@ -91,10 +91,10 @@ f1
Trigger 3.5.4.1 Trigger 3.5.4.1
drop trigger trg1; drop trigger trg1;
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers order by trigger_name; from information_schema.triggers
where trigger_schema = 'db_drop'
order by trigger_name;
trigger_schema trigger_name event_object_table trigger_schema trigger_name event_object_table
mtr gs_insert global_suppressions
mtr ts_insert test_suppressions
Insert into t1 values ('Insert no trigger 3.5.4.1'); Insert into t1 values ('Insert no trigger 3.5.4.1');
Select * from t1 order by f1; Select * from t1 order by f1;
f1 f1
...@@ -152,12 +152,8 @@ Select * from t1; ...@@ -152,12 +152,8 @@ Select * from t1;
f1 f1
Trigger 3.5.4.4 Trigger 3.5.4.4
Drop database db_drop4; Drop database db_drop4;
Show databases; Show databases like 'db_drop4';
Database Database (db_drop4)
information_schema
mtr
mysql
test
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers from information_schema.triggers
where information_schema.triggers.trigger_name='trg4'; where information_schema.triggers.trigger_name='trg4';
......
...@@ -103,7 +103,7 @@ END// ...@@ -103,7 +103,7 @@ END//
... now check what is stored: ... now check what is stored:
----------------------------- -----------------------------
SELECT * FROM information_schema.routines; SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
SPECIFIC_NAME fn_1 SPECIFIC_NAME fn_1
ROUTINE_CATALOG NULL ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc ROUTINE_SCHEMA db_storedproc
...@@ -208,75 +208,6 @@ DEFINER root@localhost ...@@ -208,75 +208,6 @@ DEFINER root@localhost
CHARACTER_SET_CLIENT latin1 CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME add_suppression
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME add_suppression
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_testcase
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_testcase
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name != 'timestamp' ORDER BY VARIABLE_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY columns_in_mysql; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.proc, mysql.procs_priv, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_warnings
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_warnings
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT file_name, line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1; SHOW CREATE FUNCTION fn_1;
Function fn_1 Function fn_1
sql_mode sql_mode
...@@ -390,7 +321,7 @@ ALTER FUNCTION fn_2 MODIFIES SQL DATA; ...@@ -390,7 +321,7 @@ ALTER FUNCTION fn_2 MODIFIES SQL DATA;
... now check what is stored: ... now check what is stored:
----------------------------- -----------------------------
SELECT * FROM information_schema.routines; SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
SPECIFIC_NAME fn_1 SPECIFIC_NAME fn_1
ROUTINE_CATALOG NULL ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc ROUTINE_SCHEMA db_storedproc
...@@ -495,75 +426,6 @@ DEFINER root@localhost ...@@ -495,75 +426,6 @@ DEFINER root@localhost
CHARACTER_SET_CLIENT latin1 CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME add_suppression
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME add_suppression
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_testcase
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_testcase
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name != 'timestamp' ORDER BY VARIABLE_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY columns_in_mysql; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.proc, mysql.procs_priv, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_warnings
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_warnings
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT file_name, line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1; SHOW CREATE FUNCTION fn_1;
Function fn_1 Function fn_1
sql_mode sql_mode
...@@ -670,7 +532,7 @@ ALTER FUNCTION fn_2 CONTAINS SQL; ...@@ -670,7 +532,7 @@ ALTER FUNCTION fn_2 CONTAINS SQL;
... now check what is stored: ... now check what is stored:
----------------------------- -----------------------------
SELECT * FROM information_schema.routines; SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
SPECIFIC_NAME fn_1 SPECIFIC_NAME fn_1
ROUTINE_CATALOG NULL ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc ROUTINE_SCHEMA db_storedproc
...@@ -775,75 +637,6 @@ DEFINER root@localhost ...@@ -775,75 +637,6 @@ DEFINER root@localhost
CHARACTER_SET_CLIENT latin1 CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME add_suppression
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME add_suppression
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_testcase
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_testcase
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name != 'timestamp' ORDER BY VARIABLE_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY columns_in_mysql; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.proc, mysql.procs_priv, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME check_warnings
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA mtr
ROUTINE_NAME check_warnings
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT file_name, line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <modified>
LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1; SHOW CREATE FUNCTION fn_1;
Function fn_1 Function fn_1
sql_mode sql_mode
......
...@@ -348,13 +348,13 @@ for each row set @test_var2='trig1_a'; ...@@ -348,13 +348,13 @@ for each row set @test_var2='trig1_a';
create trigger trig_db2.trig2 before insert on trig_db2.t1 create trigger trig_db2.trig2 before insert on trig_db2.t1
for each row set @test_var3='trig2'; for each row set @test_var3='trig2';
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers order by trigger_name; from information_schema.triggers
where trigger_schema like 'trig_db%'
order by trigger_name;
trigger_schema trigger_name event_object_table trigger_schema trigger_name event_object_table
mtr gs_insert global_suppressions
trig_db1 trig1_a t1 trig_db1 trig1_a t1
trig_db1 trig1_b t1 trig_db1 trig1_b t1
trig_db2 trig2 t1 trig_db2 trig2 t1
mtr ts_insert test_suppressions
set @test_var1= '', @test_var2= '', @test_var3= ''; set @test_var1= '', @test_var2= '', @test_var3= '';
insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352); insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352);
insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352); insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352);
......
...@@ -90,10 +90,10 @@ f1 ...@@ -90,10 +90,10 @@ f1
Trigger 3.5.4.1 Trigger 3.5.4.1
drop trigger trg1; drop trigger trg1;
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers order by trigger_name; from information_schema.triggers
where trigger_schema = 'db_drop'
order by trigger_name;
trigger_schema trigger_name event_object_table trigger_schema trigger_name event_object_table
mtr gs_insert global_suppressions
mtr ts_insert test_suppressions
Insert into t1 values ('Insert no trigger 3.5.4.1'); Insert into t1 values ('Insert no trigger 3.5.4.1');
Select * from t1 order by f1; Select * from t1 order by f1;
f1 f1
...@@ -151,12 +151,8 @@ Select * from t1; ...@@ -151,12 +151,8 @@ Select * from t1;
f1 f1
Trigger 3.5.4.4 Trigger 3.5.4.4
Drop database db_drop4; Drop database db_drop4;
Show databases; Show databases like 'db_drop4';
Database Database (db_drop4)
information_schema
mtr
mysql
test
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers from information_schema.triggers
where information_schema.triggers.trigger_name='trg4'; where information_schema.triggers.trigger_name='trg4';
......
...@@ -2,15 +2,14 @@ ...@@ -2,15 +2,14 @@
# #
# used from .../storedproc_08.inc to show all created / altered routines # used from .../storedproc_08.inc to show all created / altered routines
let $message= ... now check what is stored:; --echo
--source include/show_msg.inc --echo ... now check what is stored:
--echo -----------------------------
--vertical_results --vertical_results
#--replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss"
--replace_column 16 <modified> 17 <created> --replace_column 16 <modified> 17 <created>
SELECT * FROM information_schema.routines; SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc';
SHOW CREATE FUNCTION fn_1; SHOW CREATE FUNCTION fn_1;
......
...@@ -72,7 +72,7 @@ delimiter ;// ...@@ -72,7 +72,7 @@ delimiter ;//
CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( 'abc' ); CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( 'abc' );
--replace_column 5 <modified> 6 <created> --replace_column 5 <modified> 6 <created>
SHOW PROCEDURE STATUS; SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
--disable_warnings --disable_warnings
DROP PROCEDURE IF EXISTS sp1; DROP PROCEDURE IF EXISTS sp1;
...@@ -90,7 +90,7 @@ delimiter ;// ...@@ -90,7 +90,7 @@ delimiter ;//
CALL sp1( 34 ); CALL sp1( 34 );
--replace_column 5 <modified> 6 <created> --replace_column 5 <modified> 6 <created>
SHOW PROCEDURE STATUS; SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
--disable_warnings --disable_warnings
DROP PROCEDURE IF EXISTS sp1; DROP PROCEDURE IF EXISTS sp1;
...@@ -108,7 +108,7 @@ delimiter ;// ...@@ -108,7 +108,7 @@ delimiter ;//
CALL sp1( 34 ); CALL sp1( 34 );
--replace_column 5 <modified> 6 <created> --replace_column 5 <modified> 6 <created>
SHOW PROCEDURE STATUS; SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
--disable_warnings --disable_warnings
DROP PROCEDURE IF EXISTS sp1; DROP PROCEDURE IF EXISTS sp1;
...@@ -126,7 +126,7 @@ delimiter ;// ...@@ -126,7 +126,7 @@ delimiter ;//
CALL sp1( 34 ); CALL sp1( 34 );
--replace_column 5 <modified> 6 <created> --replace_column 5 <modified> 6 <created>
SHOW PROCEDURE STATUS; SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
--disable_warnings --disable_warnings
DROP PROCEDURE IF EXISTS sp1; DROP PROCEDURE IF EXISTS sp1;
...@@ -191,9 +191,9 @@ BEGIN ...@@ -191,9 +191,9 @@ BEGIN
END// END//
delimiter ;// delimiter ;//
--replace_column 5 <modified> 6 <created> --replace_column 5 <modified> 6 <created>
SHOW PROCEDURE STATUS; SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
--replace_column 5 <modified> 6 <created> --replace_column 5 <modified> 6 <created>
SHOW FUNCTION STATUS; SHOW FUNCTION STATUS WHERE db = 'db_storedproc';
let $test_value = 1.7976931348623157493578e+308; let $test_value = 1.7976931348623157493578e+308;
--source suite/funcs_1/storedproc/param_check.inc --source suite/funcs_1/storedproc/param_check.inc
...@@ -245,7 +245,7 @@ delimiter ;// ...@@ -245,7 +245,7 @@ delimiter ;//
CALL sp1( "value1" ); CALL sp1( "value1" );
--replace_column 5 <modified> 6 <created> --replace_column 5 <modified> 6 <created>
SHOW PROCEDURE STATUS; SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
--disable_warnings --disable_warnings
DROP PROCEDURE IF EXISTS sp1; DROP PROCEDURE IF EXISTS sp1;
...@@ -262,7 +262,7 @@ delimiter ;// ...@@ -262,7 +262,7 @@ delimiter ;//
CALL sp1( "value1, value1" ); CALL sp1( "value1, value1" );
--replace_column 5 <modified> 6 <created> --replace_column 5 <modified> 6 <created>
SHOW PROCEDURE STATUS; SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
--disable_warnings --disable_warnings
DROP PROCEDURE IF EXISTS sp1; DROP PROCEDURE IF EXISTS sp1;
...@@ -279,7 +279,7 @@ delimiter ;// ...@@ -279,7 +279,7 @@ delimiter ;//
CALL sp1( "value1" ); CALL sp1( "value1" );
--replace_column 5 <modified> 6 <created> --replace_column 5 <modified> 6 <created>
SHOW PROCEDURE STATUS; SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
--disable_warnings --disable_warnings
DROP PROCEDURE IF EXISTS sp1; DROP PROCEDURE IF EXISTS sp1;
......
...@@ -458,7 +458,9 @@ let $message= Testcase 3.5.2.1/2/3:; ...@@ -458,7 +458,9 @@ let $message= Testcase 3.5.2.1/2/3:;
create trigger trig_db2.trig2 before insert on trig_db2.t1 create trigger trig_db2.trig2 before insert on trig_db2.t1
for each row set @test_var3='trig2'; for each row set @test_var3='trig2';
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers order by trigger_name; from information_schema.triggers
where trigger_schema like 'trig_db%'
order by trigger_name;
set @test_var1= '', @test_var2= '', @test_var3= ''; set @test_var1= '', @test_var2= '', @test_var3= '';
insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352); insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352);
......
...@@ -60,7 +60,9 @@ let $message= Testcase 3.5.4.1:; ...@@ -60,7 +60,9 @@ let $message= Testcase 3.5.4.1:;
connection con1_super; connection con1_super;
drop trigger trg1; drop trigger trg1;
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers order by trigger_name; from information_schema.triggers
where trigger_schema = 'db_drop'
order by trigger_name;
connection con1_general; connection con1_general;
Insert into t1 values ('Insert no trigger 3.5.4.1'); Insert into t1 values ('Insert no trigger 3.5.4.1');
Select * from t1 order by f1; Select * from t1 order by f1;
...@@ -160,7 +162,7 @@ let $message= Testcase 3.5.4.4:; ...@@ -160,7 +162,7 @@ let $message= Testcase 3.5.4.4:;
Select * from t1; Select * from t1;
connection con1_super; connection con1_super;
Drop database db_drop4; Drop database db_drop4;
Show databases; Show databases like 'db_drop4';
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers from information_schema.triggers
where information_schema.triggers.trigger_name='trg4'; where information_schema.triggers.trigger_name='trg4';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment