| 290 | } |
| 291 | |
| 292 | void 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 |
no test coverage detected