diff options
author | unknown <igor@olga.mysql.com> | 2007-01-17 20:13:45 -0800 |
---|---|---|
committer | unknown <igor@olga.mysql.com> | 2007-01-17 20:13:45 -0800 |
commit | af3216862354eea44e594eb9216252c7b260fb3e (patch) | |
tree | 5c9fbe39dd901f2e87ebe248ac26c2bde025d765 /mysql-test/r/sp-code.result | |
parent | 759a028c20412d26802d479724de932a288a3e43 (diff) | |
download | mariadb-git-af3216862354eea44e594eb9216252c7b260fb3e.tar.gz |
Fixed bug #25580: incorrect stored representations of views in cases
when they contain the '!' operator.
Added an implementation for the method Item_func_not::print.
The method encloses any NOT expression into extra parentheses to avoid
incorrect stored representations of views that use the '!' operators.
Without this change when a view was created that contained
the expression !0*5 its stored representation contained not this
expression but rather the expression not(0)*5 .
The operator '!' is of a higher precedence than '*', while NOT is
of a lower precedence than '*'. That's why the expression !0*5
is interpreted as not(0)*5, while the expression not(0)*5 is interpreted
as not((0)*5) unless sql_mode is set to HIGH_NOT_PRECEDENCE.
Now we translate !0*5 into (not(0))*5.
mysql-test/r/sp-code.result:
Adjusted results after the fix of bug 25580.
mysql-test/r/subselect.result:
Adjusted results after the fix of bug 25580.
mysql-test/r/view.result:
Added a test case for bug #25580.
mysql-test/t/view.test:
Added a test case for bug #25580.
sql/item_cmpfunc.cc:
Fixed bug #25580: incorrect stored representations of views in cases
when they contain the '!' operator.
Added an implementation for the method Item_func_not::print.
The method encloses the NOT expression into extra parenthesis to avoid
incorrect stored representations of views that use the '!' operators.
sql/item_cmpfunc.h:
Fixed bug #25580: incorrect stored representations of views in cases
when they contain the '!' operator.
Added an implementation for the method Item_func_not::print.
The method encloses the NOT expression into extra parenthesis to avoid
incorrect stored representations of views that use the '!' operators.
Diffstat (limited to 'mysql-test/r/sp-code.result')
-rw-r--r-- | mysql-test/r/sp-code.result | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/sp-code.result b/mysql-test/r/sp-code.result index 4ae38861d29..8fea85b7cd7 100644 --- a/mysql-test/r/sp-code.result +++ b/mysql-test/r/sp-code.result @@ -187,7 +187,7 @@ Pos Instruction 32 set v_dig@4 (v_dig@4 + 1) 33 stmt 4 "update sudoku_work set dig = v_dig wh..." 34 set v_tcounter@6 (v_tcounter@6 + 1) -35 jump_if_not 37(37) not(`test`.`sudoku_digit_ok`(v_row@7,v_col@8,v_dig@4)) +35 jump_if_not 37(37) (not(`test`.`sudoku_digit_ok`(v_row@7,v_col@8,v_dig@4))) 36 jump 15 37 set v_i@3 (v_i@3 + 1) 38 jump 15 |