diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-07-04 15:23:01 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-09-27 09:57:40 +0200 |
commit | 9f1a0b87850a0926b5d7065e75d29f22bb6dcd09 (patch) | |
tree | c6447c89ae9b63cf4c8f72071cf0a60eb697f762 /sql/sql_lex.cc | |
parent | e3fdabd501d9b8efaf0ca65f930af438f7fe993f (diff) | |
download | mariadb-git-bb-10.4-MDEV-29022.tar.gz |
MDEV-29022 add_slave destroy child list and has dead codebb-10.4-MDEV-29022
Nowdays subquery in a UNION's ORDER BY placed correctly in fake select,
the only problem was incorrect Name_resolution_contect is fixed by this
patch in parsing, so we do not need scanning/reseting of ORDER BY of
a union.
(in 10.4 all work in parser correctly)
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 3d1837fe698..8922c6b541b 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -2506,23 +2506,9 @@ void st_select_lex_node::include_down(st_select_lex_node *upper) } -void st_select_lex_node::add_slave(st_select_lex_node *slave_arg) +void st_select_lex_node::attach_single(st_select_lex_node *slave_arg) { - for (; slave; slave= slave->next) - if (slave == slave_arg) - return; - - if (slave) - { - st_select_lex_node *slave_arg_slave= slave_arg->slave; - /* Insert in the front of list of slaves if any. */ - slave_arg->include_neighbour(slave); - /* include_neighbour() sets slave_arg->slave=0, restore it. */ - slave_arg->slave= slave_arg_slave; - /* Count on include_neighbour() setting the master. */ - DBUG_ASSERT(slave_arg->master == this); - } - else + DBUG_ASSERT(slave == 0); { slave= slave_arg; slave_arg->master= this; |