1 # suite/funcs_1/datadict/statistics.inc
3 # Auxiliary script to be sourced by
6 # is_statistics_<engine>
9 # Check the content of information_schema.statistics about tables within the
10 # database '$database'.
13 # The variable $database has to be set before sourcing this script.
15 # let $database = db_data;
18 # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
20 # Create this script based on older scripts and new code.
23 --source suite/funcs_1/datadict/datadict.pre
26 DROP DATABASE IF EXISTS db_datadict;
28 CREATE DATABASE db_datadict;
30 # Create a low privileged user.
31 # Note: The database db_datadict is just a "home" for the low privileged user
32 # and not in the focus of testing.
33 --error 0,ER_CANNOT_USER
34 DROP USER testuser1@localhost;
35 CREATE USER testuser1@localhost;
36 GRANT SELECT ON db_datadict.* TO testuser1@localhost;
38 let $my_select = SELECT * FROM information_schema.statistics
40 ORDER BY table_schema,
table_name, index_name, seq_in_index, column_name;
41 --replace_column 10 #CARD#
44 --echo # Establish connection testuser1 (user=testuser1)
45 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
46 connect (testuser1,localhost,testuser1,,db_datadict);
47 --replace_column 10 #CARD#
50 --echo # Switch
to connection
default and close connection testuser1
53 DROP USER testuser1@localhost;
54 DROP DATABASE db_datadict;