mirror of
https://github.com/MariaDB/server.git
synced 2026-01-23 11:54:49 +01:00
66 lines
2.6 KiB
Text
66 lines
2.6 KiB
Text
# Test clone all error conditions
|
|
--source include/not_embedded.inc
|
|
--let $CLONE_DATADIR = $MYSQL_TMP_DIR/data_new
|
|
--let $MYSQLD_DATADIR= `select @@datadir;`
|
|
|
|
--echo # 1. PLUGIN not loaded - clone local
|
|
--let $clone_err = ER_PLUGIN_IS_NOT_LOADED
|
|
--replace_result $CLONE_DATADIR CLONE_DATADIR
|
|
--error $clone_err
|
|
--eval CLONE LOCAL DATA DIRECTORY = '$CLONE_DATADIR'
|
|
--let $clone_err = 0
|
|
|
|
--echo # 1A. PLUGIN not installed - Uninstall plugin
|
|
--error ER_SP_DOES_NOT_EXIST
|
|
UNINSTALL PLUGIN clone;
|
|
|
|
--replace_result $MARIADB_CLONE_SO CLONE_PLUGIN
|
|
--eval INSTALL PLUGIN clone SONAME '$MARIADB_CLONE_SO'
|
|
|
|
--echo # 1B. PLUGIN already loaded - Install plugin
|
|
--replace_result $MARIADB_CLONE_SO CLONE_PLUGIN
|
|
--error ER_PLUGIN_INSTALLED
|
|
--eval INSTALL PLUGIN clone SONAME '$MARIADB_CLONE_SO'
|
|
|
|
--echo #1C. Clone data without error
|
|
--replace_result $CLONE_DATADIR CLONE_DATADIR
|
|
--eval CLONE LOCAL DATA DIRECTORY = '$CLONE_DATADIR'
|
|
|
|
--echo # 2A. Incorrect PATH - Relative path
|
|
--let $CLONE_DATADIR = ./data
|
|
--let $clone_err = ER_WRONG_VALUE
|
|
--replace_result $CLONE_DATADIR CLONE_DATADIR
|
|
--error $clone_err
|
|
--eval CLONE LOCAL DATA DIRECTORY = '$CLONE_DATADIR'
|
|
--let $clone_err = 0
|
|
--let $CLONE_DATADIR = $MYSQL_TMP_DIR/data_new
|
|
|
|
--echo # 2B. Incorrect PATH - Too long
|
|
--let $CLONE_DATADIR = $MYSQL_TMP_DIR/data_new/a#######################################################b#######################################################################################b#####################################################################################b######################################################################################b######################################################################################b#############################################################################################################
|
|
--let $clone_err = ER_PATH_LENGTH
|
|
--replace_result $CLONE_DATADIR CLONE_DATADIR
|
|
--error $clone_err
|
|
--eval CLONE LOCAL DATA DIRECTORY = '$CLONE_DATADIR'
|
|
--let $clone_err = 0
|
|
--let $CLONE_DATADIR = $MYSQL_TMP_DIR/data_new
|
|
|
|
--echo # 2C. Incorrect PATH - Within data directory
|
|
--let $CLONE_DATADIR = $MYSQLD_DATADIR/data
|
|
--let $clone_err = ER_PATH_IN_DATADIR
|
|
--replace_result $CLONE_DATADIR CLONE_DATADIR
|
|
--error $clone_err
|
|
--eval CLONE LOCAL DATA DIRECTORY = '$CLONE_DATADIR'
|
|
--let $clone_err = 0
|
|
--let $CLONE_DATADIR = $MYSQL_TMP_DIR/data_new
|
|
|
|
--echo # 2D. Incorrect PATH - data directory exists
|
|
--let $clone_err = ER_DB_CREATE_EXISTS
|
|
--replace_result $CLONE_DATADIR CLONE_DATADIR
|
|
--error $clone_err
|
|
--eval CLONE LOCAL DATA DIRECTORY = '$CLONE_DATADIR'
|
|
--let $clone_err = 0
|
|
|
|
--echo #Cleanup
|
|
UNINSTALL PLUGIN clone;
|
|
|
|
--rmdir $CLONE_DATADIR
|