1# suite/funcs_1/datadict/statistics.inc 2# 3# Auxiliary script to be sourced by 4# is_statistics_is 5# is_statistics_mysql 6# is_statistics_<engine> 7# 8# Purpose: 9# Check the content of information_schema.statistics about tables within the 10# database '$database'. 11# 12# Usage: 13# The variable $database has to be set before sourcing this script. 14# Example: 15# let $database = db_data; 16# 17# Author: 18# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of 19# testsuite funcs_1 20# Create this script based on older scripts and new code. 21# 22 23--source suite/funcs_1/datadict/datadict.pre 24 25--disable_warnings 26DROP DATABASE IF EXISTS db_datadict; 27--enable_warnings 28CREATE DATABASE db_datadict; 29 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 34DROP USER testuser1@localhost; 35CREATE USER testuser1@localhost; 36GRANT SELECT ON db_datadict.* TO testuser1@localhost; 37 38let $my_select = SELECT * FROM information_schema.statistics 39$my_where 40ORDER BY table_schema, table_name, index_name, seq_in_index, column_name; 41--replace_column 10 #CARD# 42eval $my_select; 43 44--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK 45connect (testuser1,localhost,testuser1,,db_datadict); 46--replace_column 10 #CARD# 47eval $my_select; 48 49connection default; 50disconnect testuser1; 51DROP USER testuser1@localhost; 52DROP DATABASE db_datadict; 53