List:Commits« Previous MessageNext Message »
From:Magne Mahre Date:October 23 2008 1:32pm
Subject:bzr commit into mysql-6.0 branch (magne.mahre:2739) Bug#36897
View as plain text  
#At file:///home/mm136784/z/mysql-6.0-runtime-fix36897/

 2739 Magne Mahre	2008-10-23
      Fixed Bug #36897 Falcon: "use tablespace" is possible
modified:
  sql/sql_db.cc

=== modified file 'sql/sql_db.cc'

=== modified file 'sql/sql_db.cc'
--- a/sql/sql_db.cc	2008-09-30 13:31:41 +0000
+++ b/sql/sql_db.cc	2008-10-23 11:31:01 +0000
@@ -2001,6 +2001,7 @@
 {
   char db_dir_path[FN_REFLEN];
   uint db_dir_path_len;
+  MY_STAT my_stat_result;
 
   db_dir_path_len= build_table_filename(db_dir_path, sizeof(db_dir_path),
                                         db_name, "", "", 0);
@@ -2008,6 +2009,14 @@
   if (db_dir_path_len && db_dir_path[db_dir_path_len - 1] == FN_LIBCHAR)
     db_dir_path[db_dir_path_len - 1]= 0;
 
+  /* Verify db_name is a directory */
+
+  if (! my_stat(db_dir_path, &my_stat_result, MYF(0)))
+    return TRUE;
+
+  if (! MY_S_ISDIR(my_stat_result.st_mode))
+    return TRUE;
+
   /* Check access. */
 
   return my_access(db_dir_path, F_OK);

Thread
bzr commit into mysql-6.0 branch (magne.mahre:2739) Bug#36897Magne Mahre23 Oct