summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2010-02-15 10:54:27 +0200
committerGeorgi Kodinov <joro@sun.com>2010-02-15 10:54:27 +0200
commit780566d4c5491f51cd9d058a8a2294462e3c5bbe (patch)
tree66d7f1429b8e019990c7b1e2f4111b150c6974fb /sql/sql_select.h
parenta4dd7f95c8a355009f317cff214568f220f0b6db (diff)
downloadmariadb-git-780566d4c5491f51cd9d058a8a2294462e3c5bbe.tar.gz
Addendum 2 for bug #46175: NULL read_view and consistent read assertion
Fixed a compilation warning.
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 8d3520bf9c8..b39827ef61b 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -769,7 +769,7 @@ protected:
if ((res= item->save_in_field(to_field, 1)))
{
if (!err)
- err= res;
+ err= res < 0 ? 1 : res; /* 1=STORE_KEY_FATAL */
}
/*
Item::save_in_field() may call Item::val_xxx(). And if this is a subquery
@@ -779,7 +779,7 @@ protected:
err= 1; /* STORE_KEY_FATAL */
}
null_key= to_field->is_null() || item->null_value;
- return ((err < 0 || err > 2) ? STORE_KEY_FATAL : (store_key_result) err);
+ return (err > 2 ? STORE_KEY_FATAL : (store_key_result) err);
}
};