Loading mysql-test/r/view.result +6 −0 Original line number Diff line number Diff line Loading @@ -2135,3 +2135,9 @@ DESCRIBE v1; ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) DROP TABLE t1; DROP VIEW v1; create table t1 (f1 char); create view v1 as select strcmp(f1,'a') from t1; select * from v1; strcmp(f1,'a') drop view v1; drop table t1; mysql-test/t/view.test +9 −0 Original line number Diff line number Diff line Loading @@ -1995,3 +1995,12 @@ ALTER TABLE t1 CHANGE COLUMN f4 f4x CHAR(5); DESCRIBE v1; DROP TABLE t1; DROP VIEW v1; # # Bug #12489 wrongly printed strcmp() function results in creation of broken # view create table t1 (f1 char); create view v1 as select strcmp(f1,'a') from t1; select * from v1; drop view v1; drop table t1; sql/item_cmpfunc.h +1 −0 Original line number Diff line number Diff line Loading @@ -427,6 +427,7 @@ class Item_func_strcmp :public Item_bool_func2 longlong val_int(); optimize_type select_optimize() const { return OPTIMIZE_NONE; } const char *func_name() const { return "strcmp"; } void print(String *str) { Item_func::print(str); } }; Loading Loading
mysql-test/r/view.result +6 −0 Original line number Diff line number Diff line Loading @@ -2135,3 +2135,9 @@ DESCRIBE v1; ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) DROP TABLE t1; DROP VIEW v1; create table t1 (f1 char); create view v1 as select strcmp(f1,'a') from t1; select * from v1; strcmp(f1,'a') drop view v1; drop table t1;
mysql-test/t/view.test +9 −0 Original line number Diff line number Diff line Loading @@ -1995,3 +1995,12 @@ ALTER TABLE t1 CHANGE COLUMN f4 f4x CHAR(5); DESCRIBE v1; DROP TABLE t1; DROP VIEW v1; # # Bug #12489 wrongly printed strcmp() function results in creation of broken # view create table t1 (f1 char); create view v1 as select strcmp(f1,'a') from t1; select * from v1; drop view v1; drop table t1;
sql/item_cmpfunc.h +1 −0 Original line number Diff line number Diff line Loading @@ -427,6 +427,7 @@ class Item_func_strcmp :public Item_bool_func2 longlong val_int(); optimize_type select_optimize() const { return OPTIMIZE_NONE; } const char *func_name() const { return "strcmp"; } void print(String *str) { Item_func::print(str); } }; Loading