Commit 0a01953c authored by Sergei Golubchik's avatar Sergei Golubchik

compiler warnings

parent 1fe92fb8
...@@ -693,8 +693,8 @@ char *ha_connect::GetStringOption(char *opname, char *sdef) ...@@ -693,8 +693,8 @@ char *ha_connect::GetStringOption(char *opname, char *sdef)
opval= (char*)GetDBName(NULL); // Current database opval= (char*)GetDBName(NULL); // Current database
else if (!stricmp(opname, "Type")) // Default type else if (!stricmp(opname, "Type")) // Default type
opval= (!options) ? NULL : opval= (!options) ? NULL :
(options->srcdef) ? "MYSQL" : (options->srcdef) ? (char*)"MYSQL" :
(options->tabname) ? "PROXY" : "DOS"; (options->tabname) ? (char*)"PROXY" : (char*)"DOS";
else if (!stricmp(opname, "User")) // Connected user else if (!stricmp(opname, "User")) // Connected user
opval= (char *) "root"; opval= (char *) "root";
else if (!stricmp(opname, "Host")) // Connected user host else if (!stricmp(opname, "Host")) // Connected user host
...@@ -792,7 +792,7 @@ int ha_connect::GetIntegerOption(char *opname) ...@@ -792,7 +792,7 @@ int ha_connect::GetIntegerOption(char *opname)
else if (!stricmp(opname, "Compressed")) else if (!stricmp(opname, "Compressed"))
opval= (options->compressed); opval= (options->compressed);
if (opval == NO_IVAL && options && options->oplist) if (opval == (ulonglong)NO_IVAL && options && options->oplist)
if ((pv= GetListOption(xp->g, opname, options->oplist))) if ((pv= GetListOption(xp->g, opname, options->oplist)))
opval= (unsigned)atoll(pv); opval= (unsigned)atoll(pv);
...@@ -2799,7 +2799,7 @@ bool ha_connect::IsSameIndex(PIXDEF xp1, PIXDEF xp2) ...@@ -2799,7 +2799,7 @@ bool ha_connect::IsSameIndex(PIXDEF xp1, PIXDEF xp2)
int ha_connect::external_lock(THD *thd, int lock_type) int ha_connect::external_lock(THD *thd, int lock_type)
{ {
int rc= 0; int rc= 0;
bool del= false, xcheck=false, cras= false; bool xcheck=false, cras= false;
MODE newmode; MODE newmode;
PTOS options= GetTableOptionStruct(table); PTOS options= GetTableOptionStruct(table);
PGLOBAL g= GetPlug(thd, xp); PGLOBAL g= GetPlug(thd, xp);
...@@ -2949,7 +2949,6 @@ int ha_connect::external_lock(THD *thd, int lock_type) ...@@ -2949,7 +2949,6 @@ int ha_connect::external_lock(THD *thd, int lock_type)
// break; // break;
case SQLCOM_DELETE: case SQLCOM_DELETE:
case SQLCOM_DELETE_MULTI: case SQLCOM_DELETE_MULTI:
del= true;
case SQLCOM_TRUNCATE: case SQLCOM_TRUNCATE:
newmode= MODE_DELETE; newmode= MODE_DELETE;
break; break;
...@@ -3207,7 +3206,7 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to) ...@@ -3207,7 +3206,7 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to)
/* 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; ha_table_option_struct *pos;
char key[MAX_DBKEY_LENGTH], db[128], tabname[128]; char key[MAX_DBKEY_LENGTH], db[128], tabname[128];
int rc; int rc = 0;
uint key_length; uint key_length;
TABLE_SHARE *share; TABLE_SHARE *share;
THD *thd= current_thd; THD *thd= current_thd;
...@@ -3253,7 +3252,7 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to) ...@@ -3253,7 +3252,7 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to)
err: err:
free_table_share(share); free_table_share(share);
fin: fin:
DBUG_RETURN(0); DBUG_RETURN(rc);
} // end of delete_or_rename_table } // end of delete_or_rename_table
int ha_connect::delete_table(const char *name) int ha_connect::delete_table(const char *name)
......
...@@ -78,8 +78,8 @@ TABLE_SHARE *GetTableShare(PGLOBAL g, THD *thd, const char *db, ...@@ -78,8 +78,8 @@ TABLE_SHARE *GetTableShare(PGLOBAL g, THD *thd, const char *db,
//table_list.init_one_table(db, strlen(db), name, strlen(name), //table_list.init_one_table(db, strlen(db), name, strlen(name),
// NULL, TL_IGNORE); // NULL, TL_IGNORE);
k = sprintf(key, "%s", db); k = sprintf(key, "%s", db) + 1;
k += sprintf(key + ++k, "%s", name); k += sprintf(key + k, "%s", name);
key[++k] = 0; key[++k] = 0;
if (!(s = alloc_table_share(db, name, key, ++k))) { if (!(s = alloc_table_share(db, name, key, ++k))) {
......
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