1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix bug #12489 wrongly printed strcmp() function results in creation of broken

view.

For Item_func_strcmp print() was not defined and for this class was called
print_op of it's parent class. Because of this strcmp() was printed wrongly
and this results int creation of broken view.

Added function Item_func_strcmp::print() which correctly prints strcmp()
function.


sql/item_cmpfunc.h:
  Fix bug #12489 wrongly printed strcmp() function results in creation of broken view.
mysql-test/r/view.result:
  Test case for bug #12489 wrongly printed strcmp() function results in creation of broken view.
mysql-test/t/view.test:
  Test case for bug #12489 wrongly printed strcmp() function results in creation of broken view.
This commit is contained in:
unknown
2005-08-31 00:54:41 +04:00
parent 8d17360181
commit 0ccb16d636
3 changed files with 16 additions and 0 deletions

View File

@ -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;

View File

@ -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;