1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

fix pfs_digest* tests.

a different fix for
    Bug#14069132 : STATEMENT DIGESTS DUPLICATE CALL STATEMENTS OF THE SAME NORMALIZED FORM
This commit is contained in:
Sergei Golubchik
2013-07-14 19:44:37 +02:00
parent 48c54cd355
commit ff82741d0a
4 changed files with 81 additions and 83 deletions

View File

@ -6138,7 +6138,7 @@ void mysql_parse(THD *thd, char *rawbuf, uint length,
{
LEX *lex= thd->lex;
bool err= parse_sql(thd, parser_state, NULL);
bool err= parse_sql(thd, parser_state, NULL, true);
if (!err)
{
@ -6246,7 +6246,7 @@ bool mysql_test_parse_for_slave(THD *thd, char *rawbuf, uint length)
lex_start(thd);
mysql_reset_thd_for_next_command(thd, opt_userstat_running);
if (!parse_sql(thd, & parser_state, NULL) &&
if (!parse_sql(thd, & parser_state, NULL, true) &&
all_tables_not_ok(thd, lex->select_lex.table_list.first))
error= 1; /* Ignore question */
thd->end_statement();
@ -8119,9 +8119,8 @@ extern int MYSQLparse(void *thd); // from sql_yacc.cc
@retval TRUE on parsing error.
*/
bool parse_sql(THD *thd,
Parser_state *parser_state,
Object_creation_ctx *creation_ctx)
bool parse_sql(THD *thd, Parser_state *parser_state,
Object_creation_ctx *creation_ctx, bool do_pfs_digest)
{
bool ret_value;
DBUG_ENTER("parse_sql");
@ -8143,7 +8142,7 @@ bool parse_sql(THD *thd,
#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
/* Start Digest */
thd->m_parser_state->m_lip.m_digest_psi=
MYSQL_DIGEST_START(thd->m_statement_psi);
MYSQL_DIGEST_START(do_pfs_digest ? thd->m_statement_psi : NULL);
#endif
/* Parse the query. */