summaryrefslogtreecommitdiffstats
path: root/sql/item.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/sql/item.h b/sql/item.h
index b967b4cc..6f552385 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -28,6 +28,7 @@
#include "field.h" /* Derivation */
#include "sql_type.h"
#include "sql_time.h"
+#include "sql_schema.h"
#include "mem_root_array.h"
#include "cset_narrowing.h"
@@ -1015,6 +1016,19 @@ public:
expressions with subqueries in the ORDER/GROUP clauses.
*/
String *val_str() { return val_str(&str_value); }
+ String *val_str_null_to_empty(String *to)
+ {
+ String *res= val_str(to);
+ if (res)
+ return res;
+ to->set_charset(collation.collation);
+ to->length(0);
+ return to;
+ }
+ String *val_str_null_to_empty(String *to, bool null_to_empty)
+ {
+ return null_to_empty ? val_str_null_to_empty(to) : val_str(to);
+ }
virtual Item_func *get_item_func() { return NULL; }
const MY_LOCALE *locale_from_val_str();
@@ -1986,7 +2000,8 @@ public:
QT_ITEM_IDENT_SKIP_DB_NAMES |
QT_ITEM_IDENT_SKIP_TABLE_NAMES |
QT_NO_DATA_EXPANSION |
- QT_TO_SYSTEM_CHARSET),
+ QT_TO_SYSTEM_CHARSET |
+ QT_FOR_FRM),
LOWEST_PRECEDENCE);
}
virtual void print(String *str, enum_query_type query_type);
@@ -5482,6 +5497,14 @@ public:
return (this->*processor)(arg);
}
/*
+ Built-in schema, e.g. mariadb_schema, oracle_schema, maxdb_schema
+ */
+ virtual const Schema *schema() const
+ {
+ // A function does not belong to a built-in schema by default
+ return NULL;
+ }
+ /*
This method is used for debug purposes to print the name of an
item to the debug log. The second use of this method is as
a helper function of print() and error messages, where it is