diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-10-18 23:33:06 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-10-18 23:33:06 +0200 |
commit | 68baf07dcd985376fae9d24c12ee0ff560b61e8f (patch) | |
tree | 175f775e9847a50e7b51162573ae24f276abea96 /mysql-test/suite | |
parent | cbaf6e6b61241db6e97648c73dbeb0a15614a7aa (diff) | |
parent | 362c2bca3e170031d33622f27d978c9570d0a9f5 (diff) | |
download | mariadb-git-68baf07dcd985376fae9d24c12ee0ff560b61e8f.tar.gz |
5.3 merge
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/plugins/r/pam.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/plugins/t/pam.test | 2 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/r/ignore_db_dirs_basic.result | 49 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/t/ignore_db_dirs_basic-master.opt | 11 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/t/ignore_db_dirs_basic.test | 38 |
5 files changed, 100 insertions, 2 deletions
diff --git a/mysql-test/suite/plugins/r/pam.result b/mysql-test/suite/plugins/r/pam.result index 432fb48eb5a..86303206b3b 100644 --- a/mysql-test/suite/plugins/r/pam.result +++ b/mysql-test/suite/plugins/r/pam.result @@ -4,7 +4,7 @@ create user pam_test; grant proxy on pam_test to test_pam; # # athentication is successful, challenge/pin are ok -# note that current_user() differts from user() +# note that current_user() differs from user() # Challenge input first. Enter: not very secret challenge diff --git a/mysql-test/suite/plugins/t/pam.test b/mysql-test/suite/plugins/t/pam.test index 587a2380f94..68fa349a444 100644 --- a/mysql-test/suite/plugins/t/pam.test +++ b/mysql-test/suite/plugins/t/pam.test @@ -26,7 +26,7 @@ EOF --echo # --echo # athentication is successful, challenge/pin are ok ---echo # note that current_user() differts from user() +--echo # note that current_user() differs from user() --echo # --exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good.txt diff --git a/mysql-test/suite/sys_vars/r/ignore_db_dirs_basic.result b/mysql-test/suite/sys_vars/r/ignore_db_dirs_basic.result new file mode 100644 index 00000000000..55d61800a39 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/ignore_db_dirs_basic.result @@ -0,0 +1,49 @@ +select @@ignore_db_dirs; +@@ignore_db_dirs +e,lost+found,.mysqlgui,ignored_db +# Check that SHOW DATABASES ignores all directories from +# @@ignore_db_dirs and all directories with names starting +# with '.' +SHOW DATABASES; +Database +information_schema +#mysql50#.otherdir +mtr +mysql +performance_schema +test +USE ignored_db; +ERROR 42000: Incorrect database name 'ignored_db' +SELECT * FROM ignored_db.t1; +ERROR 42000: Incorrect database name 'ignored_db' +CALL ignored_db.p1(); +ERROR 42000: Incorrect database name 'ignored_db' +SELECT COUNT(*) FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME='ignored_db'; +COUNT(*) +1 +CREATE DATABASE ignored_db; +ERROR 42000: Incorrect database name 'ignored_db' +CREATE DATABASE `lost+found`; +USE `lost+found`; +CREATE TABLE t1(id INT); +INSERT INTO t1 VALUES (1), (2); +SELECT * FROM `lost+found`.t1; +id +1 +2 +SHOW DATABASES; +Database +information_schema +#mysql50#.otherdir +lost+found +mtr +mysql +performance_schema +test +DROP DATABASE `lost+found`; +SET @@global.ignore_db_dirs = 'aha'; +ERROR HY000: Variable 'ignore_db_dirs' is a read only variable +SET @@local.ignore_db_dirs = 'aha'; +ERROR HY000: Variable 'ignore_db_dirs' is a read only variable +SET @@ignore_db_dirs = 'aha'; +ERROR HY000: Variable 'ignore_db_dirs' is a read only variable diff --git a/mysql-test/suite/sys_vars/t/ignore_db_dirs_basic-master.opt b/mysql-test/suite/sys_vars/t/ignore_db_dirs_basic-master.opt new file mode 100644 index 00000000000..30ee4f67284 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/ignore_db_dirs_basic-master.opt @@ -0,0 +1,11 @@ +--ignore-db-dir=a +--ignore-db-dir=b +--ignore-db-dir=c +--ignore-db-dir= +--ignore-db-dir=d +--ignore-db-dir x +--ignore-db-dir= +--ignore-db-dir=e +--ignore-db-dir=lost+found +--ignore-db-dir=.mysqlgui +--ignore-db-dir=ignored_db diff --git a/mysql-test/suite/sys_vars/t/ignore_db_dirs_basic.test b/mysql-test/suite/sys_vars/t/ignore_db_dirs_basic.test new file mode 100644 index 00000000000..9544fc540f9 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/ignore_db_dirs_basic.test @@ -0,0 +1,38 @@ +select @@ignore_db_dirs; +let $MYSQLD_DATADIR= `select @@datadir`; + +mkdir $MYSQLD_DATADIR/.mysqlgui; +mkdir $MYSQLD_DATADIR/.otherdir; +mkdir $MYSQLD_DATADIR/lost+found; +mkdir $MYSQLD_DATADIR/ignored_db; +--echo # Check that SHOW DATABASES ignores all directories from +--echo # @@ignore_db_dirs and all directories with names starting +--echo # with '.' +SHOW DATABASES; +--error ER_WRONG_DB_NAME +USE ignored_db; +--error ER_WRONG_DB_NAME +SELECT * FROM ignored_db.t1; +--error ER_WRONG_DB_NAME +CALL ignored_db.p1(); +SELECT COUNT(*) FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME='ignored_db'; +--error ER_WRONG_DB_NAME +CREATE DATABASE ignored_db; +CREATE DATABASE `lost+found`; +USE `lost+found`; +CREATE TABLE t1(id INT); +INSERT INTO t1 VALUES (1), (2); +SELECT * FROM `lost+found`.t1; +SHOW DATABASES; +DROP DATABASE `lost+found`; +rmdir $MYSQLD_DATADIR/.mysqlgui; +rmdir $MYSQLD_DATADIR/.otherdir; +rmdir $MYSQLD_DATADIR/lost+found; +rmdir $MYSQLD_DATADIR/ignored_db; + +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.ignore_db_dirs = 'aha'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@local.ignore_db_dirs = 'aha'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@ignore_db_dirs = 'aha'; |