diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-04-04 15:34:40 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-05-17 15:13:47 +0200 |
commit | 28dbdf3d79cfd39ffa2e1d087662ac82c9281d1d (patch) | |
tree | 7b93934b2e32c08e870351783f8933c62881cefa /sql/sql_select.h | |
parent | e17e7985999b10c602ba72258e9a4b6e5fb91ed5 (diff) | |
download | mariadb-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_select.h')
-rw-r--r-- | sql/sql_select.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index 20c2370d650..2cc47f6ec3b 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -1438,6 +1438,9 @@ public: enum { QEP_NOT_PRESENT_YET, QEP_AVAILABLE, QEP_DELETED} have_query_plan; + // if keep_current_rowid=true, whether they should be saved in temporary table + bool tmp_table_keep_current_rowid; + /* Additional WHERE and HAVING predicates to be considered for IN=>EXISTS subquery transformation of a JOIN object. @@ -1543,6 +1546,7 @@ public: pushdown_query= 0; original_join_tab= 0; explain= NULL; + tmp_table_keep_current_rowid= 0; all_fields= fields_arg; if (&fields_list != &fields_arg) /* Avoid valgrind-warning */ @@ -1776,6 +1780,7 @@ private: void cleanup_item_list(List<Item> &items) const; bool add_having_as_table_cond(JOIN_TAB *tab); bool make_aggr_tables_info(); + bool add_fields_for_current_rowid(JOIN_TAB *cur, List<Item> *fields); }; enum enum_with_bush_roots { WITH_BUSH_ROOTS, WITHOUT_BUSH_ROOTS}; |