diff options
author | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-01-24 00:09:23 +0300 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-01-24 00:09:23 +0300 |
commit | 4a1b59b7ab1e09f23e82ec8274e5d1fa0c067b4f (patch) | |
tree | 5e503468493119925995d64ea920534747a99d04 /sql/sql_select.h | |
parent | 83f7a74bd4c5884a3ca082b7d5cc308ffe194ab7 (diff) | |
parent | 4a10f7b46c9ebbd9af89f37f64df40981459b788 (diff) | |
download | mariadb-git-4a1b59b7ab1e09f23e82ec8274e5d1fa0c067b4f.tar.gz |
Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index e049e4ed765..a84fa65a548 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -718,6 +718,12 @@ public: my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set); int res= item->save_in_field(to_field, 1); + /* + Item::save_in_field() may call Item::val_xxx(). And if this is a subquery + we need to check for errors executing it and react accordingly + */ + if (!res && table->in_use->is_error()) + res= 2; dbug_tmp_restore_column_map(table->write_set, old_map); null_key= to_field->is_null() || item->null_value; return (err != 0 || res > 2 ? STORE_KEY_FATAL : (store_key_result) res); @@ -751,6 +757,12 @@ protected: if (!err) err= res; } + /* + Item::save_in_field() may call Item::val_xxx(). And if this is a subquery + we need to check for errors executing it and react accordingly + */ + if (!err && to_field->table->in_use->is_error()) + err= 2; } null_key= to_field->is_null() || item->null_value; return (err > 2 ? STORE_KEY_FATAL : (store_key_result) err); |