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

Function create_insert_stmt_from_insert_delayed

sql/sql_insert.cc:670–680  ·  view source on GitHub ↗

Create a new query string for removing DELAYED keyword for multi INSERT DELAYED statement. @param[in] thd Thread handler @param[in] buf Query string @return 0 ok 1 error */

Source from the content-addressed store, hash-verified

668 1 error
669*/
670static int
671create_insert_stmt_from_insert_delayed(THD *thd, String *buf)
672{
673 /* Make a copy of thd->query() and then remove the "DELAYED" keyword */
674 if (buf->append(thd->query(), thd->query_length()) ||
675 buf->replace(thd->lex->keyword_delayed_begin_offset,
676 thd->lex->keyword_delayed_end_offset -
677 thd->lex->keyword_delayed_begin_offset, NULL, 0))
678 return 1;
679 return 0;
680}
681
682
683static void save_insert_query_plan(THD* thd, TABLE_LIST *table_list)

Callers 1

mysql_insertFunction · 0.85

Calls 4

query_lengthMethod · 0.80
appendMethod · 0.45
queryMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected