summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-04-04 15:34:40 +0200
committerSergei Golubchik <serg@mariadb.org>2018-05-17 15:13:47 +0200
commit28dbdf3d79cfd39ffa2e1d087662ac82c9281d1d (patch)
tree7b93934b2e32c08e870351783f8933c62881cefa /sql/sql_class.h
parente17e7985999b10c602ba72258e9a4b6e5fb91ed5 (diff)
downloadmariadb-git-28dbdf3d79cfd39ffa2e1d087662ac82c9281d1d.tar.gz
MDEV-14551 Can't find record in table on multi-table update with ORDER BY
preserve positions if the multi-update join is using tmp table: * store positions in the tmp table if needed JOIN::add_fields_for_current_rowid() * take positions from the tmp table, not from file->position(): multi_update::prepare2()
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index bba1740b46f..0ff588a6d38 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -4981,7 +4981,7 @@ public:
unit= u;
return 0;
}
- virtual int prepare2(void) { return 0; }
+ virtual int prepare2(JOIN *join) { return 0; }
/*
Because of peculiarities of prepared statements protocol
we need to know number of columns in the result set (if
@@ -5225,7 +5225,7 @@ class select_insert :public select_result_interceptor {
enum_duplicates duplic, bool ignore);
~select_insert();
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
- virtual int prepare2(void);
+ virtual int prepare2(JOIN *join);
virtual int send_data(List<Item> &items);
virtual void store_values(List<Item> &values);
virtual bool can_rollback_data() { return 0; }
@@ -5277,7 +5277,7 @@ public:
// Needed for access from local class MY_HOOKS in prepare(), since thd is proteted.
const THD *get_thd(void) { return thd; }
const HA_CREATE_INFO *get_create_info() { return create_info; };
- int prepare2(void) { return 0; }
+ int prepare2(JOIN *join) { return 0; }
private:
TABLE *create_table_from_items(THD *thd,
@@ -5961,6 +5961,7 @@ public:
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
int send_data(List<Item> &items);
bool initialize_tables (JOIN *join);
+ int prepare2(JOIN *join);
int do_updates();
bool send_eof();
inline ha_rows num_found() const { return found; }