summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-03-03 18:44:10 +0100
committerSergei Golubchik <serg@mariadb.org>2016-03-05 16:25:29 +0100
commitff93b77fd62bdb708e2b2b34f4e2202c12e727c4 (patch)
tree47b0e1bac37b65480da19faabd2fb85e3a947a58 /sql/sql_lex.cc
parent5a3a79ce5f20a862abdde505a683df1148e0dc37 (diff)
downloadmariadb-git-ff93b77fd62bdb708e2b2b34f4e2202c12e727c4.tar.gz
MDEV-9641 MDEV-9644 NULLIF assertions
* only copy args[0] to args[2] after fix_fields (when all item substitutions have already happened) * change QT_ITEM_FUNC_NULLIF_TO_CASE (that allows to print NULLIF as CASE) to QT_ITEM_ORIGINAL_FUNC_NULLIF (that prohibits it). So that NULLIF-to-CASE is allowed by default and only disabled explicitly for SHOW VIEW|FUNCTION|PROCEDURE and mysql_make_view. By default it is allowed (in particular in error messages and debug output, that can happen anytime before or after optimizer).
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 54d75338970..fd841094e68 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -2689,7 +2689,7 @@ void st_select_lex::print_order(String *str,
{
if (order->counter_used)
{
- if (query_type != QT_VIEW_INTERNAL)
+ if (!(query_type & QT_VIEW_INTERNAL))
{
char buffer[20];
size_t length= my_snprintf(buffer, 20, "%d", order->counter);