summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimizedevgen@moonbone.local2007-03-1012-25/+49
| | | | | | | away. Additional fix for bug#22331. Now Item_field prints its value in the case of the const field.
* sql_select.cc:evgen@moonbone.local2007-03-083-1/+3
| | | | | | Postfix for bug#22331 for windows platform. explain.test, explain.result: Cleanup after bugfix#22331.
* Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-optevgen@moonbone.local2007-03-0711-17/+109
|\ | | | | | | into moonbone.local:/mnt/gentoo64/work/25373-bug-5.0-opt-mysql
| * Merge moonbone.local:/mnt/gentoo64/work/22331-bug-5.0-opt-mysqlevgen@moonbone.local2007-03-078-15/+74
| |\ | | | | | | | | | into moonbone.local:/mnt/gentoo64/work/25373-bug-5.0-opt-mysql
| | * Bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimizedevgen@moonbone.local2007-03-078-15/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | away. During optimization stage the WHERE conditions can be changed or even be removed at all if they know for sure to be true of false. Thus they aren't showed in the EXPLAIN EXTENDED which prints conditions after optimization. Now if all elements of an Item_cond were removed this Item_cond is substituted for an Item_int with the int value of the Item_cond. If there were conditions that were totally optimized away then values of the saved cond_value and having_value will be printed instead.
| * | Bug#25373: Stored functions wasn't compared correctly which leads to a wrongevgen@moonbone.local2007-03-073-2/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | result. For built-in functions like sqrt() function names are hard-coded and can be compared by pointer. But this isn't the case for a used-defined stored functions - names there are dynamical and should be compared as strings. Now the Item_func::eq() function employs my_strcasecmp() function to compare used-defined stored functions names.
* | | Merge olga.mysql.com:/home/igor/mysql-5.0-optigor@olga.mysql.com2007-03-078-7/+61
|\ \ \ | | | | | | | | | | | | into olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug26560
| * \ \ Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-optgkodinov/kgeorge@magare.gmz2007-03-073-0/+27
| |\ \ \ | | | | | | | | | | | | | | | into magare.gmz:/home/kgeorge/mysql/autopush/B19342-5.0-opt
| | * \ \ Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-optevgen@moonbone.local2007-03-073-0/+27
| | |\ \ \ | | | |/ / | | |/| | | | | | | into moonbone.local:/mnt/gentoo64/work/25376-bug-5.0-opt-mysql
| | | * | Bug#25376: Incomplete setup of ORDER BY clause results in a wrong result.evgen@moonbone.local2007-03-063-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Functions over sum functions wasn't set up correctly for the ORDER BY clause which leads to a wrong order of the result set. The split_sum_func() function is called now for each ORDER BY item that contains a sum function to set it up correctly.
| * | | | Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-optgkodinov/kgeorge@magare.gmz2007-03-062-2/+12
| |\ \ \ \ | | |/ / / | |/| | | | | | | | into magare.gmz:/home/kgeorge/mysql/autopush/B19342-5.0-opt
| | * | | Bug#19342: additional test case for code coveragegkodinov/kgeorge@macbook.gmz2007-03-062-2/+12
| | | | |
| | * | | fixed win32 warninggkodinov/kgeorge@macbook.gmz2007-03-021-1/+1
| | | | |
| * | | | Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-optevgen@moonbone.local2007-03-054-5/+22
| |\ \ \ \ | | |_|/ / | |/| | | | | | | | into moonbone.local:/mnt/gentoo64/work/clean-5.0-opt-mysql
| | * | | Bug#25126: Wrongly resolved field leads to a crash.evgen@sunlight.local2007-03-044-6/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the ORDER BY clause gets fixed it's allowed to search in the current item_list in order to find aliased fields and expressions. This is ok for a SELECT but wrong for an UPDATE statement. If the ORDER BY clause will contain a non-existing field which is mentioned in the UPDATE set list then the server will crash due to using of non-existing (0x0) field. When an Item_field is getting fixed it's allowed to search item list for aliased expressions and fields only for selects.
* | | | | Fixed bug #26560.igor@olga.mysql.com2007-03-047-69/+195
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flag alias_name_used was not set on for the outer references in subqueries. It resulted in replacement of any outer reference resolved against an alias for a full field name when the frm representation of a view with a subquery was generated. If the subquery and the outer query referenced the same table in their from lists this replacement effectively changed the meaning of the view and led to wrong results for selects from this view. Modified several functions to ensure setting the right value of the alias_name_used flag for outer references resolved against aliases.
* | | | fixed win32 warningsgkodinov/kgeorge@magare.gmz2007-03-021-1/+1
| | | |
* | | | Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-optgkodinov/kgeorge@magare.gmz2007-03-025-8/+268
|\ \ \ \ | | | | | | | | | | | | | | | into magare.gmz:/home/kgeorge/mysql/autopush/B19342-5.0-opt
| * \ \ \ Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-optgkodinov/kgeorge@magare.gmz2007-03-025-8/+268
| |\ \ \ \ | | | |/ / | | |/| | | | | | | into magare.gmz:/home/kgeorge/mysql/autopush/B19342-5.0-opt
| | * | | Bug #19342:gkodinov/kgeorge@macbook.gmz2007-03-025-8/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several problems here : 1. The conversion to double of an hex string const item was not taking into account the unsigned flag. 2. IN was not behaving in the same was way as comparisons when performed over an INT/DATE/DATETIME/TIMESTAMP column and a constant. The ordinary comparisons in that case convert the constant to an INTEGER value and do int comparisons. Fixed the IN to do the same. 3. IN is not taking into account the unsigned flag when calculating <expr> IN (<int_const1>, <int_const2>, ...). Extended the implementation of IN to store and process the unsigned flag for its arguments.
* | | | | Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-optgkodinov/kgeorge@magare.gmz2007-03-023-1/+17
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | into magare.gmz:/home/kgeorge/mysql/autopush/B26537-5.0-opt
| * | | | Bug #26537: item_unhex() was not expected gkodinov/kgeorge@magare.gmz2007-03-023-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to return NULL for non-NULL arguments. This is not the case as it can return NULL for invalid hexidecimal strings. Fixed by setting the maybe_null flag.
* | | | | sql_base.cc:evgen@sunlight.local2007-03-021-1/+2
| | | | | | | | | | | | | | | | | | | | Post fix for bug#25122.
* | | | | Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-optevgen@moonbone.local2007-03-027-13/+19
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | into moonbone.local:/mnt/gentoo64/work/25122-bug-5.0-opt-mysql
| * | | | | Bug#25122: Views based on a self-joined table aren't insertable.evgen@moonbone.local2007-03-027-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When INSERT is done over a view the table being inserted into is checked to be unique among all views tables. But if the view contains self-joined table an error will be thrown even if all tables are used under different aliases. The unique_table() function now also checks tables' aliases when needed.
* | | | | | Correctly recognize Intel Core2Duo Extremegkodinov/kgeorge@magare.gmz2007-03-011-0/+4
| |/ / / / |/| | | | | | | | | | | | | | in build.
* | | | | removed unused variablegluh@mysql.com/eagle.(none)2007-02-271-1/+0
| | | | |
* | | | | Merge mysql.com:/home/gluh/MySQL/Merge/5.0gluh@mysql.com/eagle.(none)2007-02-2633-126/+779
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
| * | | | | item.cc, item.h:evgen@sunlight.local2007-02-262-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Post fix for bug#23800.
| * | | | | item.h:evgen@sunlight.local2007-02-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Post fix for bug#23800. Copy the table name of an Item_outer_ref to the conventional memory.
| * | | | | Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-optevgen@moonbone.local2007-02-244-0/+16
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | into moonbone.local:/mnt/gentoo64/work/23800-bug1-5.0-opt-mysql
| | * | | | | item.cc:evgen@moonbone.local2007-02-244-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Post fix for bug#23800. The Item_field constructor now increases the select_n_where_fields counter. sql_yacc.yy: Post fix for bug#23800. Take into account fields that might be added by subselects. sql_lex.h: Post fix for bug#23800. Added the select_n_where_fields variable to the st_select_lex class. sql_lex.cc: Post fix for bug#23800. Initialization of the select_n_where_fields variable.
| * | | | | | Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-optmhansson@dl145s.mysql.com2007-02-222-0/+45
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | | | | | | | | | into dl145s.mysql.com:/users/mhansson/mysql/autopush/5.0o-bug24010
| | * | | | | Bug #24010: INSERT INTO ... SELECT fails on unique constraint with data mhansson/martin@linux-st28.site2007-02-222-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it doesn't select. This bug was fixed along with bug #16861: User defined variable can have a wrong value if a tmp table was used. There the fix consisted of Item_func_set_user_var overloading the method Item::save_in_field. Consider the query from the test case: INSERT INTO foo( bar, baz ) SELECT bar, @newBaz := 1 + baz FROM foo WHERE quux <= 0.1; Here the assignment expression '@newBaz := 1 + baz' is represented by an Item_func_set_user_var. Its member method save_in_field, which writes the value of this assignment into the result field, writes the val_xxx() value, which is not updated at this point. In the fix introduced by the patch, the save_in_field method reads the actual variable value instead. See also comment for ChangeSet@1.2368.1.3, 2007-01-09 23:24:56+03:00, evgen@moonbone.local +4 -0 and comment for Item_func_set_user_var::save_in_field (item_func.cc)
| * | | | | | Merge moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.0-optevgen@moonbone.local2007-02-2111-41/+290
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | into moonbone.local:/mnt/gentoo64/work/23800-bug1-5.0-opt-mysql
| | * | | | | | Bug#23800: Outer fields in correlated subqueries is used in a temporary tableevgen@moonbone.local2007-02-2111-41/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | created for sorting. Any outer reference in a subquery was represented by an Item_field object. If the outer select employs a temporary table all such fields should be replaced with fields from that temporary table in order to point to the actual data. This replacement wasn't done and that resulted in a wrong subquery evaluation and a wrong result of the whole query. Now any outer field is represented by two objects - Item_field placed in the outer select and Item_outer_ref in the subquery. Item_field object is processed as a normal field and the reference to it is saved in the ref_pointer_array. Thus the Item_outer_ref is always references the correct field. The original field is substituted for a reference in the Item_field::fix_outer_field() function. New function called fix_inner_refs() is added to fix fields referenced from inner selects and to fix references (Item_ref objects) to these fields. The new Item_outer_ref class is a descendant of the Item_direct_ref class. It additionally stores a reference to the original field and designed to behave more like a field.
| * | | | | | | Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-optgkodinov/kgeorge@rakia.gmz2007-02-199-68/+105
| |\ \ \ \ \ \ \ | | | |_|/ / / / | | |/| | | | | | | | | | | | | into rakia.gmz:/home/kgeorge/mysql/autopush/B19717-5.0-opt
| | * | | | | | Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-optgkodinov/kgeorge@rakia.gmz2007-02-199-68/+105
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | into rakia.gmz:/home/kgeorge/mysql/autopush/B25831-5.0-opt
| | | * | | | | | Bug #25831: Deficiencies in INSERT ... SELECT ... field name resolving.gkodinov/kgeorge@macbook.gmz2007-02-199-68/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several problems fixed: 1. There was a "catch-all" context initialization in setup_tables() that was causing the table that we insert into to be visible in the SELECT part of an INSERT .. SELECT .. statement with no tables in its FROM clause. This was making sure all the under-initialized contexts in various parts of the code are not left uninitialized. Fixed by removing the "catch-all" statement and initializing the context in the parser. 2. Incomplete name resolution context when resolving the right-hand values in the ON DUPLICATE KEY UPDATE ... part of an INSERT ... SELECT ... caused columns from NATURAL JOIN/JOIN USING table references in the FROM clause of the select to be unavailable. Fixed by establishing a proper name resolution context. 3. When setting up the special name resolution context for problem 2 there was no check for cases where an aggregate function without a GROUP BY effectively takes the column from the SELECT part of an INSERT ... SELECT unavailable for ON DUPLICATE KEY UPDATE. Fixed by checking for that condition when setting up the name resolution context.
| * | | | | | | | Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-optgkodinov/kgeorge@rakia.gmz2007-02-1913-16/+295
| |\ \ \ \ \ \ \ \ | | |/ / / / / / / | | | | | | | | | | | | | | | | | | into rakia.gmz:/home/kgeorge/mysql/autopush/B19717-5.0-opt
| | * | | | | | | Adjusted results after fix for bug 25971.igor@olga.mysql.com2007-02-161-1/+1
| | | | | | | | |
| | * | | | | | | Adjusted results after fix for bug 25971.igor@olga.mysql.com2007-02-161-1/+1
| | | | | | | | |
| | * | | | | | | Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-optigor@olga.mysql.com2007-02-166-3/+94
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into olga.mysql.com:/home/igor/mysql-5.0-opt
| | | * \ \ \ \ \ \ Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-optevgen@moonbone.local2007-02-166-3/+94
| | | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into moonbone.local:/mnt/gentoo64/work/16630-bug-5.0-opt-mysql
| | | | * | | | | | | Bug#16630: The update fields of the INSERT .. SELECT .. ON DUPLICATE KEYevgen@moonbone.local2007-02-166-3/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UPDATE contains wrong data if the SELECT employs a temporary table. If the UPDATE values of the INSERT .. SELECT .. ON DUPLICATE KEY UPDATE statement contains fields from the SELECT part and the select employs a temporary table then those fields will contain wrong values because they aren't corrected to get data from the temporary table. The solution is to add these fields to the selects all_fields list, to store pointers to those fields in the selects ref_pointer_array and to access them via Item_ref objects. The substitution for Item_ref objects is done in the new function called Item_field::update_value_transformer(). It is called through the item->transform() mechanism at the end of the select_insert::prepare() function.
| | * | | | | | | | | Fixed bug #25971: indexes on text columns were ignored when ref accessesigor@olga.mysql.com2007-02-147-12/+200
| | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | were evaluated. According to the new rules for string comparison partial indexes on text columns can be used in the same cases when partial indexes on varchar columns can be used.
| * | | | | | | | | Bug#19717: The blackhole engine is returning an OK flag in gkodinov/kgeorge@macbook.gmz2007-02-143-1/+27
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | index_read(), whereas it must return HA_ERR_END_OF_FILE instead (as there are by definition no rows in a table of that engine.
* | | | | | | | | Compiler warning suppression fix: Add missing file to 'make dist'.knielsen@ymer.(none)2007-02-261-1/+2
| | | | | | | | |
* | | | | | | | | Merge monty@192.168.0.9:/home/my/mysql-5.0monty@mysql.com/hasky.mysql.fi2007-02-220-0/+0
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.0
| * \ \ \ \ \ \ \ \ Merge monty@bk-internal.mysql.com:/home/bk/mysql-5.0-marvelmonty@mysql.com/hasky.mysql.fi2007-02-222-1/+15
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.0