diff options
author | unknown <monty@mashka.mysql.fi> | 2002-11-11 15:57:35 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2002-11-11 15:57:35 +0200 |
commit | e01c75e4ff25b0c5c2211fe1336ac787ccadf596 (patch) | |
tree | af6d24e40719efd42eef9d7580ef497455ddd45d /sql/sql_yacc.yy | |
parent | 266014998a057087f0fd7f4c4d75536f8b0fc93d (diff) | |
download | mariadb-git-e01c75e4ff25b0c5c2211fe1336ac787ccadf596.tar.gz |
Fixed that NULL and 0 returns 0 instead of NULL
This is coded to not cause a speed impact on top level AND expressions where we don't care if an AND expression returns 0 or NULL
mysql-test/r/bdb.result:
Fix results after serges last patch
mysql-test/r/innodb.result:
Fix results after serges last patch
mysql-test/r/null.result:
Update for new AND handling of NULL
scripts/mysqld_safe.sh:
Fix 'isroot' test to work even if user is not root
sql/item.h:
Fixed that NULL and 0 returns 0 instead of NULL
sql/item_cmpfunc.cc:
Fixed that NULL and 0 returns 0 instead of NULL
sql/item_cmpfunc.h:
Fixed that NULL and 0 returns 0 instead of NULL
sql/sql_base.cc:
Fixed that NULL and 0 returns 0 instead of NULL
sql/sql_parse.cc:
Fixed that NULL and 0 returns 0 instead of NULL
sql/sql_select.cc:
Fixed that NULL and 0 returns 0 instead of NULL
sql/sql_yacc.yy:
Fixed that NULL and 0 returns 0 instead of NULL
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 911fc12d9c4..93532d013b5 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -2178,15 +2178,25 @@ opt_table_alias: where_clause: /* empty */ { Select->where= 0; } - | WHERE expr { Select->where= $2; }; + | WHERE expr + { + Select->where= $2; + if ($2) + $2->top_level_item(); + } + ; having_clause: /* empty */ | HAVING { Select->create_refs=1; } expr { SELECT_LEX *sel=Select; - sel->having= $3; sel->create_refs=0; - }; + sel->having= $3; + sel->create_refs=0; + if ($3) + $3->top_level_item(); + } + ; opt_escape: ESCAPE_SYM TEXT_STRING { $$= $2.str; } |