diff options
author | Igor Babaev <igor@askmonty.org> | 2013-08-18 12:29:06 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-08-18 12:29:06 -0700 |
commit | 7c85205d193dc8ecd8b2ce2796e271536f3b42b1 (patch) | |
tree | bec34ce98144ce63affeca27477ee934c41207a9 /sql/sql_lex.cc | |
parent | f0deff867a154879971560f83f62d96bb85140c0 (diff) | |
download | mariadb-git-7c85205d193dc8ecd8b2ce2796e271536f3b42b1.tar.gz |
Fixed bug mdev-4918.
The function SELECT_LEX::mark_const_derived() must take into account that
in DELETE ... RETURNING join == NULL.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index fd18d2f6c52..18908abbfcd 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -4085,7 +4085,8 @@ void SELECT_LEX::increase_derived_records(ha_rows records) void SELECT_LEX::mark_const_derived(bool empty) { TABLE_LIST *derived= master_unit()->derived; - if (!join->thd->lex->describe && derived) + /* join == NULL in DELETE ... RETURNING */ + if (!(join && join->thd->lex->describe) && derived) { if (!empty) increase_derived_records(1); |