mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 07:35:32 +02:00
Merge with 4.0.18
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union mysql-test/r/ctype_tis620.result-old: Merge rename: mysql-test/r/ctype_tis620.result -> mysql-test/r/ctype_tis620.result-old BUILD/compile-pentium-max: Auto merged BitKeeper/etc/config: Auto merged Build-tools/Bootstrap: Auto merged Build-tools/Do-compile: Auto merged configure.in: Auto merged mysql-test/t/ctype_tis620.test-old: Merge rename: mysql-test/t/ctype_tis620.test -> mysql-test/t/ctype_tis620.test-old Docs/Makefile.am: Auto merged client/mysqldump.c: Auto merged client/mysqltest.c: Auto merged include/my_global.h: Auto merged include/my_pthread.h: Auto merged include/my_sys.h: Auto merged include/myisam.h: Auto merged innobase/btr/btr0cur.c: Auto merged innobase/ibuf/ibuf0ibuf.c: Auto merged innobase/include/dict0dict.h: Auto merged innobase/include/srv0srv.h: Auto merged innobase/include/ut0mem.h: Auto merged innobase/log/log0log.c: Auto merged innobase/row/row0ins.c: Auto merged innobase/row/row0sel.c: Auto merged innobase/srv/srv0start.c: Auto merged innobase/ut/ut0mem.c: Auto merged myisam/mi_check.c: Auto merged myisam/mi_dynrec.c: Auto merged myisam/mi_key.c: Auto merged myisam/myisam_ftdump.c: Auto merged myisam/myisamdef.h: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/alter_table.result: Auto merged mysql-test/r/bdb.result: Auto merged mysql-test/r/bigint.result: Auto merged mysql-test/r/fulltext.result: Auto merged
This commit is contained in:
commit
5b2c312627
229 changed files with 6995 additions and 3728 deletions
|
|
@ -307,11 +307,19 @@ exit2:
|
|||
|
||||
|
||||
/*
|
||||
Drop all tables in a database.
|
||||
Drop all tables in a database and the database itself
|
||||
|
||||
db-name is already validated when we come here
|
||||
If thd == 0, do not write any messages; This is useful in replication
|
||||
when we want to remove a stale database before replacing it with the new one
|
||||
SYNOPSIS
|
||||
mysql_rm_db()
|
||||
thd Thread handle
|
||||
db Database name in the case given by user
|
||||
It's already validated when we come here
|
||||
if_exists Don't give error if database doesn't exists
|
||||
silent Don't generate errors
|
||||
|
||||
RETURN
|
||||
0 ok (Database dropped)
|
||||
-1 Error generated
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -319,7 +327,7 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
|
|||
{
|
||||
long deleted=0;
|
||||
int error = 0;
|
||||
char path[FN_REFLEN+16];
|
||||
char path[FN_REFLEN+16], tmp_db[NAME_LEN+1];
|
||||
MY_DIR *dirp;
|
||||
DBUG_ENTER("mysql_rm_db");
|
||||
|
||||
|
|
@ -351,6 +359,14 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
|
|||
}
|
||||
goto exit;
|
||||
}
|
||||
if (lower_case_table_names)
|
||||
{
|
||||
/* Convert database to lower case */
|
||||
strmov(tmp_db, db);
|
||||
casedn_str(tmp_db);
|
||||
db= tmp_db;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&LOCK_open);
|
||||
remove_db_from_cache(db);
|
||||
pthread_mutex_unlock(&LOCK_open);
|
||||
|
|
@ -426,7 +442,7 @@ exit2:
|
|||
|
||||
/*
|
||||
Removes files with known extensions plus all found subdirectories that
|
||||
are 2 digits (raid directories).
|
||||
are 2 hex digits (raid directories).
|
||||
thd MUST be set when calling this function!
|
||||
*/
|
||||
|
||||
|
|
@ -451,8 +467,10 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
|
|||
DBUG_PRINT("info",("Examining: %s", file->name));
|
||||
|
||||
/* Check if file is a raid directory */
|
||||
if (my_isdigit(&my_charset_latin1,file->name[0]) &&
|
||||
my_isdigit(&my_charset_latin1,file->name[1]) &&
|
||||
if ((my_isdigit(&my_charset_latin1, file->name[0]) ||
|
||||
(file->name[0] >= 'a' && file->name[0] <= 'f')) &&
|
||||
(my_isdigit(&my_charset_latin1, file->name[1]) ||
|
||||
(file->name[1] >= 'a' && file->name[1] <= 'f')) &&
|
||||
!file->name[2] && !level)
|
||||
{
|
||||
char newpath[FN_REFLEN];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue