Skip to content

Commit 6f14531

Browse files
committed
CONNECT: compiler warnings
and don't check table privileges in external_lock(F_UNLCK).
1 parent 00967e1 commit 6f14531

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

storage/connect/ha_connect.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ int GetIntegerTableOption(PGLOBAL g, PTOS options, char *opname, int idef)
11141114
else if (!stricmp(opname, "Compressed"))
11151115
opval= (options->compressed);
11161116

1117-
if (opval == NO_IVAL) {
1117+
if (opval == (ulonglong)NO_IVAL) {
11181118
char *pv;
11191119

11201120
if ((pv= GetListOption(g, opname, options->oplist)))
@@ -4427,15 +4427,16 @@ int ha_connect::external_lock(THD *thd, int lock_type)
44274427
xmod= MODE_ANY; // For info commands
44284428
DBUG_RETURN(rc);
44294429
} // endif MODE_ANY
4430-
4431-
DBUG_ASSERT(table && table->s);
4432-
4430+
else
44334431
if (check_privileges(thd, options, table->s->db.str)) {
44344432
strcpy(g->Message, "This operation requires the FILE privilege");
44354433
htrc("%s\n", g->Message);
44364434
DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
44374435
} // endif check_privileges
44384436

4437+
4438+
DBUG_ASSERT(table && table->s);
4439+
44394440
// Table mode depends on the query type
44404441
newmode= CheckMode(g, thd, newmode, &xcheck, &cras);
44414442

@@ -5028,7 +5029,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
50285029
char *nsp= NULL, *cls= NULL;
50295030
#endif // __WIN__
50305031
int port= 0, hdr= 0, mxr= 0, mxe= 0, rc= 0;
5031-
int cop __attribute__((unused))= 0, lrecl= 0;
5032+
int cop __attribute__((unused))= 0;
50325033
#if defined(ODBC_SUPPORT)
50335034
POPARM sop = NULL;
50345035
char *ucnc = NULL;
@@ -5074,7 +5075,6 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
50745075
hdr= (int)topt->header;
50755076
tbl= topt->tablist;
50765077
col= topt->colist;
5077-
lrecl= (int)topt->lrecl;
50785078

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

0 commit comments

Comments
 (0)