1 # suite/funcs_1/datadict/is_table_query.inc
3 # Check that every INFORMATION_SCHEMA table can be queried with a SELECT
4 # statement, just as if it were an ordinary user-defined table.
5 # (Requirement 3.2.1.1)
7 # The variable $is_table must be set before sourcing this script.
10 # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
12 # Create this script based on older scripts and new code.
15 DROP VIEW IF EXISTS
test.v1;
16 DROP PROCEDURE IF EXISTS
test.p1;
17 DROP FUNCTION IF EXISTS
test.f1;
19 eval CREATE VIEW
test.v1 AS SELECT * FROM information_schema.$is_table;
20 eval CREATE PROCEDURE
test.p1() SELECT * FROM information_schema.$is_table;
22 eval CREATE FUNCTION
test.f1() returns BIGINT
24 DECLARE counter BIGINT DEFAULT NULL;
25 SELECT COUNT(*) INTO counter FROM information_schema.$is_table;
31 # We are not interested to check the content here.
32 --echo # Attention: The printing of the next result sets is disabled.
34 eval SELECT * FROM information_schema.$is_table;
35 SELECT * FROM
test.v1;
41 DROP PROCEDURE
test.p1;
42 DROP FUNCTION
test.f1;