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:
@ -444,25 +444,28 @@ 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 (qc_info_was_tokenized(this_thread.info->status))
|
if (this_unit.log_level > QC_LOG_NOTHING)
|
||||||
{
|
{
|
||||||
// This suggests a callback from the parser into this module is not made.
|
if (qc_info_was_tokenized(this_thread.info->status))
|
||||||
format =
|
{
|
||||||
"Statement was classified only based on keywords, "
|
// This suggests a callback from the parser into this module is not made.
|
||||||
"even though the statement was parsed: \"%.*s%s\"";
|
format =
|
||||||
|
"Statement was classified only based on keywords, "
|
||||||
|
"even though the statement was parsed: \"%.*s%s\"";
|
||||||
|
|
||||||
MXS_WARNING(format, l, query, suffix);
|
MXS_WARNING(format, l, query, suffix);
|
||||||
}
|
}
|
||||||
else if (!qc_info_was_parsed(this_thread.info->status))
|
else if (!qc_info_was_parsed(this_thread.info->status))
|
||||||
{
|
{
|
||||||
// This suggests there are keywords that should be recognized but are not,
|
// This suggests there are keywords that should be recognized but are not,
|
||||||
// a tentative classification cannot be (or is not) made using the keywords
|
// a tentative classification cannot be (or is not) made using the keywords
|
||||||
// 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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"
|
Reference in New Issue
Block a user