mariadb/mysql-test/t/system_mysql_db_fix.test
unknown 57221d3d08 Eliminate most of the remaining hardcoded list of tests to skip
by adding check for embedded server within tests and splitting some
tests into multiple test files.


mysql-test/mysql-test-run.sh:
  Remove most of hardcoded list of tests to skip
mysql-test/r/ps_1general.result:
  Update results
mysql-test/r/timezone2.result:
  Update results
mysql-test/r/user_var.result:
  Update results
mysql-test/r/variables.result:
  Update results
mysql-test/t/mix_innodb_myisam_binlog.test:
  Disable test with embedded server
mysql-test/t/mysql_protocols.test:
  Disable test with embedded server
mysql-test/t/mysqlbinlog.test:
  Disable test with embedded server
mysql-test/t/mysqlbinlog2.test:
  Disable test with embedded server
mysql-test/t/mysqldump.test:
  Disable test with embedded server
mysql-test/t/packet.test:
  Disable test with embedded server
mysql-test/t/ps_1general.test:
  Move parts of test to new ps_grant
mysql-test/t/rename.test:
  Disable test with embedded server
mysql-test/t/show_check.test:
  Disable test with embedded server
mysql-test/t/system_mysql_db_fix.test:
  Disable test with embedded server
mysql-test/t/timezone2.test:
  Move part of test to timezone_grant
mysql-test/t/user_var.test:
  Move part of test to new user_var-binlog
mysql-test/t/variables.test:
  Move part of test to rpl_variables
2005-03-29 17:17:46 -08:00

85 lines
2.6 KiB
Text

# Embedded server doesn't support external clients
--source include/not_embedded.inc
#
# This is the test for mysql_fix_privilege_tables
#
-- disable_result_log
-- disable_query_log
use test;
# create system tables as in mysql-3.20
--disable_warnings
CREATE TABLE db (
Host char(60) binary DEFAULT '' NOT NULL,
Db char(32) binary DEFAULT '' NOT NULL,
User char(16) binary DEFAULT '' NOT NULL,
Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,
PRIMARY KEY Host (Host,Db,User),
KEY User (User)
)
type=ISAM;
--enable-warnings
INSERT INTO db VALUES ('%','test', '','Y','Y','Y','Y','Y','Y');
INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y');
--disable_warnings
CREATE TABLE host (
Host char(60) binary DEFAULT '' NOT NULL,
Db char(32) binary DEFAULT '' NOT NULL,
Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,
PRIMARY KEY Host (Host,Db)
)
type=ISAM;
--enable-warnings
--disable_warnings
CREATE TABLE user (
Host char(60) binary DEFAULT '' NOT NULL,
User char(16) binary DEFAULT '' NOT NULL,
Password char(16),
Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Reload_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Shutdown_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Process_priv enum('N','Y') DEFAULT 'N' NOT NULL,
PRIMARY KEY Host (Host,User)
)
type=ISAM;
--enable-warnings
INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y');
INSERT INTO user VALUES ('localhost','', '','N','N','N','N','N','N','N','N','N');
-- exec $MYSQL_FIX_SYSTEM_TABLES --database=test
-- enable_query_log
-- enable_result_log
-- source include/system_db_struct.inc
-- disable_query_log
DROP TABLE db, host, user, func, tables_priv, columns_priv, help_category, help_keyword, help_relation, help_topic, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type;
-- enable_query_log
# check that we droped all system tables
show tables;