Bug #12489 use of CAST in views
| Submitted: | 10 Aug 2005 11:53 | Modified: | 1 Sep 2005 0:34 |
|---|---|---|---|
| Reporter: | Manjit Patel | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
| Version: | 5.0.7-beta-standard | OS: | Linux (Redhat Linux AS3 AMD64) |
| Assigned to: | Evgeny Potemkin | CPU Architecture: | Any |
[10 Aug 2005 11:53]
Manjit Patel
[23 Aug 2005 16:27]
J Jorgenson
I've experienced a similar issue when using multiple CAST statements when a creating a view.
[28 Aug 2005 17:25]
Hartmut Holzgraefe
also breaks SHOW CREATE VIEW, seems to be a bug in the view query rewriter? a simpler test case: create view v1 as select strcmp(cast(42 as char),'1'); these two work though: create view v1 as select cast(42 as char); create view v1 as select concat(cast(42 as char),'1');
[28 Aug 2005 17:30]
Hartmut Holzgraefe
The following view definition should perform the expected operation without triggering the bug (and with less overhead): CREATE VIEW myView AS SELECT tbl1.ID, if(tbl1.done = 1, 'Yes', 'No') AS Done FROM table1 tbl1;
[30 Aug 2005 20:53]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/29059
[30 Aug 2005 21:09]
Evgeny Potemkin
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. Fixed in 5.0.12, cset 1.1918.1.1
[1 Sep 2005 0:34]
Paul DuBois
Noted in 5.0.12 changelog.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.055 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.