Skip to content

Commit

Permalink
CONNECT: compiler warnings
Browse files Browse the repository at this point in the history
and don't check table privileges in external_lock(F_UNLCK).
  • Loading branch information
vuvova committed Jul 27, 2015
1 parent 00967e1 commit 6f14531
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions storage/connect/ha_connect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ int GetIntegerTableOption(PGLOBAL g, PTOS options, char *opname, int idef)
else if (!stricmp(opname, "Compressed"))
opval= (options->compressed);

if (opval == NO_IVAL) {
if (opval == (ulonglong)NO_IVAL) {
char *pv;

if ((pv= GetListOption(g, opname, options->oplist)))
Expand Down Expand Up @@ -4427,15 +4427,16 @@ int ha_connect::external_lock(THD *thd, int lock_type)
xmod= MODE_ANY; // For info commands
DBUG_RETURN(rc);
} // endif MODE_ANY

DBUG_ASSERT(table && table->s);

else
if (check_privileges(thd, options, table->s->db.str)) {
strcpy(g->Message, "This operation requires the FILE privilege");
htrc("%s\n", g->Message);
DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
} // endif check_privileges


DBUG_ASSERT(table && table->s);

// Table mode depends on the query type
newmode= CheckMode(g, thd, newmode, &xcheck, &cras);

Expand Down Expand Up @@ -5028,7 +5029,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
char *nsp= NULL, *cls= NULL;
#endif // __WIN__
int port= 0, hdr= 0, mxr= 0, mxe= 0, rc= 0;
int cop __attribute__((unused))= 0, lrecl= 0;
int cop __attribute__((unused))= 0;
#if defined(ODBC_SUPPORT)
POPARM sop = NULL;
char *ucnc = NULL;
Expand Down Expand Up @@ -5074,7 +5075,6 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
hdr= (int)topt->header;
tbl= topt->tablist;
col= topt->colist;
lrecl= (int)topt->lrecl;

if (topt->oplist) {
host= GetListOption(g, "host", topt->oplist, "localhost");
Expand Down

0 comments on commit 6f14531

Please sign in to comment.