diff options
author | unknown <sanja@askmonty.org> | 2011-11-28 12:42:14 +0200 |
---|---|---|
committer | unknown <sanja@askmonty.org> | 2011-11-28 12:42:14 +0200 |
commit | 5412e82c01aa126448af8c64279e2cb9a7ffdd38 (patch) | |
tree | 36baa453eedce2045fc7efcbf57c43f1a6c69fa0 /sql/sql_view.cc | |
parent | 17b4e4a194ea513f776bab5010d88d24a51b9d9e (diff) | |
download | mariadb-git-5412e82c01aa126448af8c64279e2cb9a7ffdd38.tar.gz |
Fixed LP BUG#747278
The problem was that when we have single row subquery with no rows
Item_cache(es) which represent result row was not null and being
requested via element_index() returned random value.
The fix is setting all Item_cache(es) in NULL before executing the
query (reset() method) which guaranty NULL value of whole query
or its elements requested in any way if no rows was found.
set_null() method was added to Item_cache to guaranty correct NULL
value in case of reseting the cache.
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 9d71a61f411..669b6aa14fb 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1691,6 +1691,8 @@ frm_type_enum mysql_frm_type(THD *thd, char *path, enum legacy_db_type *dbt) *dbt= DB_TYPE_UNKNOWN; + + if ((file= my_open(path, O_RDONLY | O_SHARE, MYF(0))) < 0) DBUG_RETURN(FRMTYPE_ERROR); error= my_read(file, (uchar*) header, sizeof(header), MYF(MY_NABP)); |