mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user