summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-03-29 11:13:18 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-03-29 11:13:18 +0300
commitae6e214fd851a8a9d079494eec9903c89dd10fb2 (patch)
treeb206f873d02a5a2027671bb1cd900b77d1a3b820 /sql/sql_class.h
parent97f237e66dc58a617b6293d6a2624378333e8065 (diff)
parent020e7d89ebdcded3355c82cec93e0abef2898258 (diff)
downloadmariadb-git-ae6e214fd851a8a9d079494eec9903c89dd10fb2.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 573d70bbe00..369c58df416 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -4195,13 +4195,13 @@ public:
*/
DBUG_PRINT("debug",
("temporary_tables: %s, in_sub_stmt: %s, system_thread: %s",
- YESNO(has_thd_temporary_tables()), YESNO(in_sub_stmt),
+ YESNO(has_temporary_tables()), YESNO(in_sub_stmt),
show_system_thread(system_thread)));
if (in_sub_stmt == 0)
{
if (wsrep_binlog_format() == BINLOG_FORMAT_ROW)
set_current_stmt_binlog_format_row();
- else if (!has_thd_temporary_tables())
+ else if (!has_temporary_tables())
set_current_stmt_binlog_format_stmt();
}
DBUG_VOID_RETURN;
@@ -6852,6 +6852,19 @@ public:
}
void copy(MEM_ROOT *mem_root, const LEX_CSTRING &db,
const LEX_CSTRING &name);
+
+ static Database_qualified_name split(const LEX_CSTRING &txt)
+ {
+ DBUG_ASSERT(txt.str[txt.length] == '\0'); // Expect 0-terminated input
+ const char *dot= strchr(txt.str, '.');
+ if (!dot)
+ return Database_qualified_name(NULL, 0, txt.str, txt.length);
+ size_t dblen= dot - txt.str;
+ Lex_cstring db(txt.str, dblen);
+ Lex_cstring name(txt.str + dblen + 1, txt.length - dblen - 1);
+ return Database_qualified_name(db, name);
+ }
+
// Export db and name as a qualified name string: 'db.name'
size_t make_qname(char *dst, size_t dstlen) const
{