summaryrefslogtreecommitdiff
path: root/sql/item.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge host.loc:/home/uchum/work/PA/5.0-opt-34763gshchepa/uchum@host.loc2008-03-201-6/+9
|\ | | | | | | into host.loc:/home/uchum/work/5.1-opt
| * Fixed bug #34763.gshchepa/uchum@host.loc2008-03-141-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Queries like: SELECT ROW(1, 2) IN (SELECT t1.a, 2) FROM t1 GROUP BY t1.a or SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2) FROM t1 GROUP BY t1.a lead to assertion failure in the Item_in_subselect::row_value_transformer method in debugging build, or to unexpected error message in release build: ERROR 1247 (42S22): Reference '<list ref>' not supported (forward reference in item list) Unexpected error message and assertion failure have been eliminated.
| * Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-optkaa@kaamos.(none)2008-02-171-0/+31
| |\ | | | | | | | | | into kaamos.(none):/data/src/opt/mysql-5.0-opt
| | * Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-optgkodinov/kgeorge@magare.gmz2008-02-151-0/+31
| | |\ | | | | | | | | | | | | into magare.gmz:/home/kgeorge/mysql/autopush/B31887-5.0-opt
| * | \ Merge kaamos.(none):/data/src/mysql-5.0kaa@kaamos.(none)2008-02-171-12/+55
| |\ \ \ | | |/ / | | | | | | | | into kaamos.(none):/data/src/opt/mysql-5.0-opt
* | | | Merge kaamos.(none):/data/src/mysql-5.1kaa@kaamos.(none)2008-03-121-13/+113
|\ \ \ \ | | | | | | | | | | | | | | | into kaamos.(none):/data/src/opt/mysql-5.1-opt
| * \ \ \ Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-opttnurnberg@white.intern.koehntopp.de2008-03-101-1/+26
| |\ \ \ \ | | | | | | | | | | | | | | | | | | into mysql.com:/misc/mysql/34749/51-34749
| | * \ \ \ Merge mysql.com:/misc/mysql/34749/50-34749tnurnberg@white.intern.koehntopp.de2008-03-101-1/+26
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | into mysql.com:/misc/mysql/34749/51-34749
| | | * | | | Bug#34749: Server crash when using NAME_CONST() with an aggregate functiontnurnberg@mysql.com/white.intern.koehntopp.de2008-02-281-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NAME_CONST('whatever', -1) * MAX(whatever) bombed since -1 was not seen as constant, but as FUNCTION_UNARY_MINUS(constant) while we are at the same time pretending it was a basic const item. This confused the aggregate handlers in exciting ways. We now make NAME_CONST() behave more consistently.
| * | | | | | Fixed duplicate defition warning for bug 31887gkodinov/kgeorge@magare.gmz2008-02-181-0/+1
| | | | | | |
| * | | | | | Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.1-optkaa@kaamos.(none)2008-02-171-0/+31
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | into kaamos.(none):/data/src/opt/mysql-5.1-opt
| | * \ \ \ \ \ Merge magare.gmz:/home/kgeorge/mysql/work/B31887-5.0-optgkodinov/kgeorge@magare.gmz2008-02-161-0/+31
| | |\ \ \ \ \ \ | | | | |_|_|_|/ | | | |/| | | | | | | | | | | | into magare.gmz:/home/kgeorge/mysql/work/B31887-5.1-opt
| | | * | | | | Bug #31887: DML Select statement not returning same results gkodinov/kgeorge@magare.gmz2008-02-151-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when executed in version 5 Zero fill is a field attribute only. So we can't always propagate constants for zerofill fields : the values and expression results don't have that flag. Fixed by converting the const value to a string and using that in const propagation when the context allows it. Disable const propagation for fields with ZEROFILL flag in all the other cases.
| * | | | | | | Merge kaamos.(none):/data/src/mysql-5.1kaa@kaamos.(none)2008-02-171-12/+55
| |\ \ \ \ \ \ \ | | |/ / / / / / | | | | | | | | | | | | | | | | into kaamos.(none):/data/src/opt/mysql-5.1-opt
| | * | | | | | Merge kaamos.(none):/data/src/opt/mysql-5.0-optkaa@kaamos.(none)2008-02-131-0/+43
| | |\ \ \ \ \ \ | | | | |_|_|_|/ | | | |/| | | | | | | | | | | | into kaamos.(none):/data/src/opt/mysql-5.1-opt
| | | * | | | | Merge mbp:src/opt/bug33389/my50-bug25162kaa@kaamos.(none)2008-02-121-12/+12
| | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | into kaamos.(none):/data/src/opt/mysql-5.0-opt
| | | * | | | | | Fixed bug #33833.igor@olga.mysql.com2008-01-261-0/+43
| | | | |_|_|/ / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two disjuncts containing equalities of the form key=const1 and key=const2 can be merged into one if const1 is equal to const2. To check it the common collation of the constants were used rather than the collation of the field key. For example when the default collation of the constants was cases insensitive while the collation of the field was case sensitive, then two or-ed equality predicates key='b' and key='B' incorrectly were merged into one f='b'. As a result ref access was used instead of range access and wrong result sets were returned in many cases. Fixed the problem by comparing constant in the or-ed predicate with collation of the key field.
| | * | | | | | Merge mbp.:/Users/kaa/src/opt/bug33389/my50-bug25162kaa@mbp.2008-02-121-12/+12
| | |\ \ \ \ \ \ | | | | |/ / / / | | | |/| | / / | | | |_|_|/ / | | |/| | | | into mbp.:/Users/kaa/src/opt/bug33389/my51-bug25162
| | | * | | | Fix for bug #33389: Selecting from a view into a table from within SPkaa@mbp.2008-02-121-12/+12
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | or trigger crashes server Under some circumstances a combination of VIEWs, subselects with outer references and PS/SP/triggers could lead to use of uninitialized memory and server crash as a result. Fixed by changing the code in Item_field::fix_fields() so that in cases when the field is a VIEW reference, we first check whether the field is also an outer reference, and mark it appropriately before returning.
* | | | | | Merge buzz.(none):/home/davi/mysql-5.0-runtimedavi@buzz.(none)2008-02-281-4/+9
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | into buzz.(none):/home/davi/mysql-5.1-runtime
| * | | | | | Post-merge fix for Bug 33851. The initialization order of membersdavi@mysql.com/endora.local2008-02-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | must match the order which they were declared in the class definition.
| * | | | | | Bug#33851 Passing UNSIGNED param to EXECUTE returns ERROR 1210davi@mysql.com/endora.local2008-02-281-3/+8
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that passing anything other than a integer to a limit clause in a prepared statement would fail. This limitation was introduced to avoid replication problems (e.g: replicating the statement with a string argument would cause a parse failure in the slave). The solution is to convert arguments to the limit clause to a integer value and use this converted value when persisting the query to the log.
* | | | | | Fix for Bug#30217: Views: changes in metadata behaviouranozdrin/alik@quad.2008-02-221-36/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | between 5.0 and 5.1. The problem was that in the patch for Bug#11986 it was decided to store original query in UTF8 encoding for the INFORMATION_SCHEMA. This approach however turned out to be quite difficult to implement properly. The main problem is to preserve the same IS-output after dump/restore. So, the fix is to rollback to the previous functionality, but also to fix it to support multi-character-set-queries properly. The idea is to generate INFORMATION_SCHEMA-query from the item-tree after parsing view declaration. The IS-query should: - be completely in UTF8; - not contain character set introducers. For more information, see WL4052.
* | | | | | Fix for Bug#32538: View definition picks up character set,anozdrin/alik@quad.2008-02-121-2/+6
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | but not collation. The problem here was that text literals in a view were always dumped with character set introducer. That lead to loosing collation information. The fix is to dump character set introducer only if it was in the original query. That is now possible because there is no problem any more of loss of character set of string literals in views -- after WL#4052 the view is dumped in the original character set.
* | | | | Manual merge of Bug 33798davi@mysql.com/endora.local2008-02-081-4/+1
| | | | |
* | | | | Merge mysql.com:/Users/davi/mysql/mysql-5.0-runtimedavi@endora.local2008-02-081-1/+5
|\ \ \ \ \ | |/ / / / | | | | | | | | | | into mysql.com:/Users/davi/mysql/mysql-5.1-runtime
| * | | | Bug#33798 prepared statements improperly handle large unsigned intsdavi@mysql.com/endora.local2008-02-081-1/+5
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unsignedness of large integer user variables was not being properly preserved when feeded to prepared statements. This was happening because the unsigned flags wasn't being updated when converting the user variable is converted to a parameter. The solution is to copy the unsigned flag when converting the user variable to a parameter and take the unsigned flag into account when converting the integer to a string.
| * | | Merge mhansson@bk-internal:/home/bk/mysql-5.0-optmhansson/martin@linux-st28.site2008-01-111-1/+2
| |\ \ \ | | | | | | | | | | | | | | | into linux-st28.site:/home/martin/mysql/src/bug31797/my50-bug31797-pushee
* | \ \ \ Merge ramayana.hindu.god:/home/tsmith/m/bk/51tsmith@ramayana.hindu.god2008-01-251-1/+2
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | into ramayana.hindu.god:/home/tsmith/m/bk/maint/51
| * | | | Merge mhansson@bk-internal:/home/bk/mysql-5.1-optmhansson/martin@linux-st28.site2008-01-111-1/+2
| |\ \ \ \ | | | | | | | | | | | | | | | | | | into linux-st28.site:/home/martin/mysql/src/bug31797/my51-bug31797-pushee
| | * \ \ \ Merge linux-st28.site:/home/martin/mysql/src/bug31797/my50-bug31797mhansson/martin@linux-st28.site2008-01-111-1/+2
| | |\ \ \ \ | | | | |/ / | | | |/| | | | | | | | into linux-st28.site:/home/martin/mysql/src/bug31797/my51-bug31797
| | | * | | Bug#31797: error while parsing subqueries -- WHERE is parsed as HAVINGmhansson/martin@linux-st28.site2008-01-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name resolution for correlated subqueries and HAVING clauses failed to distinguish which of two was being performed when there was a reference to an outer aliased field. Fixed by adding the condition that HAVING clause name resulotion is being performed.
* | | | | | Merge ramayana.hindu.god:/home/tsmith/m/bk/51tsmith@ramayana.hindu.god2008-01-221-1/+5
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | into ramayana.hindu.god:/home/tsmith/m/bk/maint/51
| * | | | | Merge macbook.gmz:/Users/kgeorge/mysql/work/B33256-5.0-optgkodinov/kgeorge@macbook.gmz2008-01-081-1/+1
| |\ \ \ \ \ | | | |_|/ / | | |/| | | | | | | | | into macbook.gmz:/Users/kgeorge/mysql/work/B33256-5.1-opt
| | * | | | Bug #33256: CREATE ... SELECT creates obsolete table gkodinov/kgeorge@macbook.gmz2007-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | w/ Field_date instead of Field_newdate Field_date was still used in temp table creation. Fixed by using Field_newdate consistently throughout the server except when reading tables defined with older MySQL version. No test suite is possible because both Field_date and Field_newdate return the same values in all the metadata calls.
| | * | | | Merge mhansson@bk-internal:/home/bk/mysql-5.0-optmhansson/martin@linux-st28.site2007-12-191-0/+4
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | into linux-st28.site:/home/martin/mysql/src/bug32848/my50-bug32848
| * | \ \ \ \ Merge mhansson@bk-internal:/home/bk/mysql-5.1-optmhansson/martin@linux-st28.site2007-12-211-0/+4
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | into linux-st28.site:/home/martin/mysql/src/bug32848/my51-bug32848
| | * \ \ \ \ \ Merge linux-st28.site:/home/martin/mysql/src/bug32848/my50-bug32848-gcamhansson/martin@linux-st28.site2007-12-201-0/+4
| | |\ \ \ \ \ \ | | | | |/ / / / | | | |/| / / / | | | |_|/ / / | | |/| | | | into linux-st28.site:/home/martin/mysql/src/bug32848/my51-bug32848-gca
| | | * | | | Bug#32848: Data type conversion bug in union subselects in MySQL 5.0.38mhansson/martin@linux-st28.site2007-12-111-0/+4
| | | | |/ / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two problems when inferring the correct field types resulting from UNION queries. - If the type is NULL for all corresponding fields in the UNION, the resulting type would be NULL, while the type is BINARY(0) if there is just a single SELECT NULL. - If one SELECT in the UNION uses a subselect, a temporary table is created to represent the subselect, and the result type defaults to a STRING type, hiding the fact that the type was unknown(just a NULL value). Fixed by remembering whenever a field was created from a NULL value and pass type NULL to the type coercion if that is the case, and creating a string field as result of UNION only if the type would otherwise be NULL.
* | | | | | Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maintserg@janus.mylan2007-12-201-9/+19
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | into janus.mylan:/usr/home/serg/Abk/mysql-5.1
| * | | | | Merge mysql.com:/home/gluh/MySQL/Merge/5.0-optgluh@eagle.(none)2007-12-131-7/+7
| |\ \ \ \ \ | | | |_|/ / | | |/| | | | | | | | | into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
| | * | | | Merge mysql.com:/home/gluh/MySQL/Merge/5.0gluh@eagle.(none)2007-12-131-8/+8
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
| | | * | | | Fixed bug #27545.igor@olga.mysql.com2007-12-071-7/+7
| | | | |_|/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both arguments of the function NAME_CONST must be constant expressions. This constraint is checked in the Item_name_const::fix_fields method. Yet if the argument of the function was not a constant expression no error message was reported. As a result the client hanged waiting for a response. Now the function Item_name_const::fix_fields reports an error message when any of the additional context conditions imposed on the function NAME_CONST is not satisfied.
| * | | | | Merge mysql.com:/home/gluh/MySQL/Merge/5.1gluh@eagle.(none)2007-12-131-1/+1
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
| | * \ \ \ \ Merge magare.gmz:/home/kgeorge/mysql/work/B32400-5.0-optgkodinov/kgeorge@magare.gmz2007-11-231-1/+1
| | |\ \ \ \ \ | | | | |/ / / | | | |/| | | | | | | | | | into magare.gmz:/home/kgeorge/mysql/work/B32400-5.1-opt
| | | * | | | Bug #32400: Complex SELECT query returns correct result gkodinov/kgeorge@magare.gmz2007-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | only on some occasions Referencing an element from the SELECT list in a WHERE clause is not permitted. The namespace of the WHERE clause is the table columns only. This was not enforced correctly when resolving outer references in sub-queries. Fixed by not allowing references to aliases in a sub-query in WHERE.
| * | | | | | Merge mysql.com:/home/ram/work/b32559/b32559.5.0ramil/ram@ramil.myoffice.izhnet.ru2007-11-291-1/+11
| |\ \ \ \ \ \ | | |/ / / / / | |/| | / / / | | | |/ / / | | |/| | | into mysql.com:/home/ram/work/b32559/b32559.5.1
| | * | | | Fix for bug #32559: connection hangs on query with name_constramil/ram@mysql.com/ramil.myoffice.izhnet.ru2007-11-271-1/+11
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: passing a non-constant name to the NAME_CONST function results in a crash. Fix: check the NAME_CONST name argument; return fake item type if we got non-constant argument(s).
* | | | | Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maintcmiller@zippy.cornsilk.net2007-12-141-517/+493
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
| * | | | Doxygenization of comments.cmiller@zippy.cornsilk.net2007-10-111-517/+493
| | | | |