Commit e99af2a3 authored by Olivier Bertrand's avatar Olivier Bertrand

-- Fix warnings from the new GCC 7

  modified:   storage/connect/ha_connect.cc

-- Set NULL false in SetJsonValue
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/tabjson.cpp
parent ad2a4c42
...@@ -1468,7 +1468,7 @@ void *ha_connect::GetColumnOption(PGLOBAL g, void *field, PCOLINFO pcf) ...@@ -1468,7 +1468,7 @@ void *ha_connect::GetColumnOption(PGLOBAL g, void *field, PCOLINFO pcf)
case MYSQL_TYPE_VARCHAR: case MYSQL_TYPE_VARCHAR:
case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_VAR_STRING:
pcf->Flags |= U_VAR; pcf->Flags |= U_VAR;
/* no break */ // fall through
default: default:
pcf->Type= MYSQLtoPLG(fp->type(), &v); pcf->Type= MYSQLtoPLG(fp->type(), &v);
break; break;
...@@ -2587,7 +2587,7 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond) ...@@ -2587,7 +2587,7 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond)
case Item_func::LE_FUNC: vop= OP_LE; break; case Item_func::LE_FUNC: vop= OP_LE; break;
case Item_func::GE_FUNC: vop= OP_GE; break; case Item_func::GE_FUNC: vop= OP_GE; break;
case Item_func::GT_FUNC: vop= OP_GT; break; case Item_func::GT_FUNC: vop= OP_GT; break;
case Item_func::IN_FUNC: vop= OP_IN; case Item_func::IN_FUNC: vop= OP_IN; /* fall through */
case Item_func::BETWEEN: case Item_func::BETWEEN:
ismul= true; ismul= true;
neg= ((Item_func_opt_neg *)condf)->negated; neg= ((Item_func_opt_neg *)condf)->negated;
...@@ -2842,9 +2842,10 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) ...@@ -2842,9 +2842,10 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond)
case Item_func::GT_FUNC: vop= OP_GT; break; case Item_func::GT_FUNC: vop= OP_GT; break;
case Item_func::LIKE_FUNC: vop= OP_LIKE; break; case Item_func::LIKE_FUNC: vop= OP_LIKE; break;
case Item_func::ISNOTNULL_FUNC: case Item_func::ISNOTNULL_FUNC:
neg = true; neg = true;
// fall through
case Item_func::ISNULL_FUNC: vop= OP_NULL; break; case Item_func::ISNULL_FUNC: vop= OP_NULL; break;
case Item_func::IN_FUNC: vop= OP_IN; case Item_func::IN_FUNC: vop= OP_IN; /* fall through */
case Item_func::BETWEEN: case Item_func::BETWEEN:
ismul= true; ismul= true;
neg= ((Item_func_opt_neg *)condf)->negated; neg= ((Item_func_opt_neg *)condf)->negated;
...@@ -2971,6 +2972,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) ...@@ -2971,6 +2972,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond)
break; break;
} // endif ODBC } // endif ODBC
// fall through
case MYSQL_TYPE_DATE: case MYSQL_TYPE_DATE:
if (tty == TYPE_AM_ODBC) { if (tty == TYPE_AM_ODBC) {
strcat(s, "{d '"); strcat(s, "{d '");
...@@ -4383,7 +4385,7 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd, ...@@ -4383,7 +4385,7 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd,
if (newmode == MODE_WRITE) { if (newmode == MODE_WRITE) {
switch (thd_sql_command(thd)) { switch (thd_sql_command(thd)) {
case SQLCOM_LOCK_TABLES: case SQLCOM_LOCK_TABLES:
locked= 2; locked= 2; // fall through
case SQLCOM_CREATE_TABLE: case SQLCOM_CREATE_TABLE:
case SQLCOM_INSERT: case SQLCOM_INSERT:
case SQLCOM_LOAD: case SQLCOM_LOAD:
...@@ -6197,6 +6199,7 @@ int ha_connect::create(const char *name, TABLE *table_arg, ...@@ -6197,6 +6199,7 @@ int ha_connect::create(const char *name, TABLE *table_arg,
DBUG_RETURN(HA_ERR_INTERNAL_ERROR); DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
} // endif tabname } // endif tabname
// fall through
case TAB_MYSQL: case TAB_MYSQL:
#if defined(WITH_PARTITION_STORAGE_ENGINE) #if defined(WITH_PARTITION_STORAGE_ENGINE)
if (!part_info) if (!part_info)
......
...@@ -328,6 +328,8 @@ PVAL JSNX::MakeJson(PGLOBAL g, PJSON jsp) ...@@ -328,6 +328,8 @@ PVAL JSNX::MakeJson(PGLOBAL g, PJSON jsp)
void JSNX::SetJsonValue(PGLOBAL g, PVAL vp, PJVAL val, int n) void JSNX::SetJsonValue(PGLOBAL g, PVAL vp, PJVAL val, int n)
{ {
if (val) { if (val) {
vp->SetNull(false);
if (Jb) { if (Jb) {
vp->SetValue_psz(Serialize(g, val->GetJsp(), NULL, 0)); vp->SetValue_psz(Serialize(g, val->GetJsp(), NULL, 0));
} else switch (val->GetValType()) { } else switch (val->GetValType()) {
......
...@@ -1406,6 +1406,8 @@ PVAL JSONCOL::MakeJson(PGLOBAL g, PJSON jsp) ...@@ -1406,6 +1406,8 @@ PVAL JSONCOL::MakeJson(PGLOBAL g, PJSON jsp)
void JSONCOL::SetJsonValue(PGLOBAL g, PVAL vp, PJVAL val, int n) void JSONCOL::SetJsonValue(PGLOBAL g, PVAL vp, PJVAL val, int n)
{ {
if (val) { if (val) {
vp->SetNull(false);
switch (val->GetValType()) { switch (val->GetValType()) {
case TYPE_STRG: case TYPE_STRG:
case TYPE_INTG: case TYPE_INTG:
......
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