summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-04-10 11:33:47 +0200
committerSergei Golubchik <serg@mariadb.org>2018-05-17 15:13:47 +0200
commite17e7985999b10c602ba72258e9a4b6e5fb91ed5 (patch)
tree041a34266d19c2e414bffafd26f2cfd007a7b8c4 /sql/item_strfunc.h
parentc368878fac7de6cb65790249990d28dcbf0ea255 (diff)
downloadmariadb-git-e17e7985999b10c602ba72258e9a4b6e5fb91ed5.tar.gz
cleanup: simplify multi-update's juggling with positions
introduce Item_temptable_rowid() that is used to store table->file->position() in the temporary table record
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r--sql/item_strfunc.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index b3462a60d36..1132a947587 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -1751,5 +1751,24 @@ public:
{ return get_item_copy<Item_func_dyncol_list>(thd, this); }
};
-#endif /* ITEM_STRFUNC_INCLUDED */
+/*
+ this is used by JOIN_TAB::keep_current_rowid
+ and stores handler::position().
+ It has nothing to do with _rowid pseudo-column, that the parser supports.
+*/
+class Item_temptable_rowid :public Item_str_func
+{
+public:
+ TABLE *table;
+ Item_temptable_rowid(TABLE *table_arg);
+ const Type_handler *type_handler() const { return &type_handler_string; }
+ Field *create_tmp_field(bool group, TABLE *table)
+ { return create_table_field_from_handler(table); }
+ String *val_str(String *str);
+ const char *func_name() const { return "<rowid>"; }
+ void fix_length_and_dec();
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_temptable_rowid>(thd, this); }
+};
+#endif /* ITEM_STRFUNC_INCLUDED */