summaryrefslogtreecommitdiff
path: root/storage/connect
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-07-26 00:05:58 +0200
committerSergei Golubchik <serg@mariadb.org>2015-07-27 10:52:22 +0200
commit6f14531b522a9fa854f98a2354d0fccf827b2013 (patch)
tree5d7a81693bfcb112d22681c9f47220787f850433 /storage/connect
parent00967e114cb4da4dca9bbc127e26facb08ede3ce (diff)
downloadmariadb-git-6f14531b522a9fa854f98a2354d0fccf827b2013.tar.gz
CONNECT: compiler warnings
and don't check table privileges in external_lock(F_UNLCK).
Diffstat (limited to 'storage/connect')
-rw-r--r--storage/connect/ha_connect.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index f1a223be10f..879814e1bd8 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -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)))
@@ -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);
@@ -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;
@@ -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");