MCPcopy Create free account
hub / github.com/MariaDB/server / push_warning_syntax_error

Method push_warning_syntax_error

sql/opt_hints_parser.cc:292–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290}
291
292void Parser::push_warning_syntax_error(THD *thd, uint start_lineno)
293{
294 DBUG_ASSERT(m_start <= m_ptr);
295 DBUG_ASSERT(m_ptr <= m_end);
296 const char *msg= ER_THD(thd, ER_WARN_OPTIMIZER_HINT_SYNTAX_ERROR);
297 ErrConvString txt(m_look_ahead_token.str, strlen(m_look_ahead_token.str),
298 thd->variables.character_set_client);
299 /*
300 start_lineno is the line number on which the whole hint started.
301 Add the line number of the current tokenizer position inside the hint
302 (in case hints are written in multiple lines).
303 */
304 push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
305 ER_PARSE_ERROR, ER_THD(thd, ER_PARSE_ERROR),
306 msg, txt.ptr(), start_lineno + lineno());
307}
308
309/*
310 Resolve a parsed table level hint, i.e. set up proper Opt_hint_* structures

Callers 1

parse_optimizer_hintsMethod · 0.80

Calls 2

push_warning_printfFunction · 0.85
ptrMethod · 0.45

Tested by

no test coverage detected