Commit 14f3d5a6 authored by unknown's avatar unknown

- Fix a GCC compile error (crosses initialization of pos) an change

  _O_CREAT to O_CREAT

modified:
  storage/connect/ha_connect.cc
  
- Change mode to -x

modified:
  mysql-test/suite/connect/t/index.test*
  storage/connect/filamap.cpp*
parent b2101687
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
...@@ -3180,6 +3180,7 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to) ...@@ -3180,6 +3180,7 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to)
{ {
DBUG_ENTER("ha_connect::delete_or_rename_table"); DBUG_ENTER("ha_connect::delete_or_rename_table");
/* We have to retrieve the information about this table options. */ /* We have to retrieve the information about this table options. */
ha_table_option_struct *pos;
#if defined(WIN32) #if defined(WIN32)
const char *fmt= ".\\%[^\\]\\%s"; const char *fmt= ".\\%[^\\]\\%s";
#else // !WIN32 #else // !WIN32
...@@ -3193,7 +3194,7 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to) ...@@ -3193,7 +3194,7 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to)
THD *thd= current_thd; THD *thd= current_thd;
if (sscanf(name, fmt, db, tabname) != 2) if (sscanf(name, fmt, db, tabname) != 2)
DBUG_RETURN(0); goto fin;
table_list.db= (char*) db; table_list.db= (char*) db;
table_list.table_name= (char*) tabname; table_list.table_name= (char*) tabname;
...@@ -3201,14 +3202,14 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to) ...@@ -3201,14 +3202,14 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to)
// share contains the option struct that we need // share contains the option struct that we need
if (!(share= alloc_table_share(&table_list, key, key_length))) if (!(share= alloc_table_share(&table_list, key, key_length)))
DBUG_RETURN(0); goto fin;
// Get the share info from the .frm file // Get the share info from the .frm file
if (open_table_def(thd, share, db_flags)) if (open_table_def(thd, share, db_flags))
goto err; goto err;
// Now we can work // Now we can work
ha_table_option_struct *pos= share->option_struct; pos= share->option_struct;
if (IsFileType(GetTypeID(pos->type)) && !pos->filename) { if (IsFileType(GetTypeID(pos->type)) && !pos->filename) {
// This is a table whose files must be erased or renamed */ // This is a table whose files must be erased or renamed */
...@@ -3253,6 +3254,7 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to) ...@@ -3253,6 +3254,7 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to)
// Done no more need for this // Done no more need for this
err: err:
free_table_share(share); free_table_share(share);
fin:
DBUG_RETURN(0); DBUG_RETURN(0);
} // end of delete_or_rename_table } // end of delete_or_rename_table
...@@ -3937,7 +3939,7 @@ int ha_connect::create(const char *name, TABLE *table_arg, ...@@ -3937,7 +3939,7 @@ int ha_connect::create(const char *name, TABLE *table_arg,
strcat(strcat(strcpy(dbpath, "./"), table->s->db.str), "/"); strcat(strcat(strcpy(dbpath, "./"), table->s->db.str), "/");
PlugSetPath(fn, buf, dbpath); PlugSetPath(fn, buf, dbpath);
if ((h= ::open(fn, _O_CREAT, 0666)) == -1) { if ((h= ::open(fn, O_CREAT, 0666)) == -1) {
sprintf(g->Message, "Cannot create file %s", fn); sprintf(g->Message, "Cannot create file %s", fn);
push_warning(table->in_use, push_warning(table->in_use,
MYSQL_ERROR::WARN_LEVEL_WARN, 0, g->Message); MYSQL_ERROR::WARN_LEVEL_WARN, 0, g->Message);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment