diff options
author | unknown <pem@mysql.comhem.se> | 2004-05-28 19:43:06 +0200 |
---|---|---|
committer | unknown <pem@mysql.comhem.se> | 2004-05-28 19:43:06 +0200 |
commit | b0921b1f5a1f610b04641a83d0d7b21e3fe46d84 (patch) | |
tree | acfbe5dd51eab312289261b3f572fa68ce012884 /sql | |
parent | 72139b18aac3d799afea1c0ffe8a4dee92d2420d (diff) | |
download | mariadb-git-b0921b1f5a1f610b04641a83d0d7b21e3fe46d84.tar.gz |
Fixed BUG#2460: Crash wih Stored Procedure and UNION.
mysql-test/r/sp.result:
Added test case for BUG#2460.
mysql-test/t/sp.test:
Added test case for BUG#2460.
sql/sql_union.cc:
When called from stored procedures, tabs might be reset already.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_union.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 794fbc74c73..81f64400400 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -457,7 +457,9 @@ int st_select_lex_unit::exec() else { JOIN_TAB *tab,*end; - for (tab=join->join_tab,end=tab+join->tables ; tab != end ; tab++) + for (tab=join->join_tab, end=tab+join->tables ; + tab && tab != end ; + tab++) { delete tab->select; delete tab->quick; |