MXS-1025: All logging now behing the log_level

Earlier a successful parsing but failure to classify was always
logged.
This commit is contained in:
Johan Wikman
2016-11-23 14:47:24 +02:00
parent 35620f8dae
commit d9642dd5ae
2 changed files with 26 additions and 15 deletions

View File

@ -444,7 +444,9 @@ static void parse_query_string(const char* query, size_t len)
} }
} }
} }
else else if (!this_thread.info->initializing) // If we are initializing, the query will not be classified.
{
if (this_unit.log_level > QC_LOG_NOTHING)
{ {
if (qc_info_was_tokenized(this_thread.info->status)) if (qc_info_was_tokenized(this_thread.info->status))
{ {
@ -462,7 +464,8 @@ static void parse_query_string(const char* query, size_t len)
// seen and/or a callback from the parser into this module is not made. // seen and/or a callback from the parser into this module is not made.
format = "Statement was parsed, but not classified: \"%.*s%s\""; format = "Statement was parsed, but not classified: \"%.*s%s\"";
MXS_ERROR(format, l, query, suffix); MXS_WARNING(format, l, query, suffix);
}
} }
} }

View File

@ -34,3 +34,11 @@ set @`TeST`=4;
# (Sqlite3 error: SQL logic error or missing database, unrecognized token: "@"): "set @=4" # (Sqlite3 error: SQL logic error or missing database, unrecognized token: "@"): "set @=4"
# #
# sqlite3GetToken needs to be modified to accept a quoted variable name. # sqlite3GetToken needs to be modified to accept a quoted variable name.
SAVEPOINT sa_savepoint_1
#warning: [qc_sqlite] Statement was neither parsed nor recognized from keywords
# (Sqlite3 error: SQL logic error or missing database, near "SNAPSHOT": syntax error): "SNAPSHOT s"
RELEASE SAVEPOINT sa_savepoint_1
# warning: [qc_sqlite] Statement was neither parsed nor recognized from keywords
# (Sqlite3 error: SQL logic error or missing database, near "RELEASE": syntax error): "RELEASE SNAPSHOT s"