| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the GROUP BY clause contains a column reference that can be resolved to
both an aliased column in the SELECT list, and to a column in the FROM clause,
the group column is resolved to the column in the FROM clause (for ANSI conformance).
However, it may be so that the user's intent is just the other way around, and he/she
gets the query results grouped by a completely different column than expexted.
This patch adds a warning in such cases that tells the user that there is potential
ambiguity in the group column.
sql/sql_select.cc
- Added a warning when a GROUP column is ambiguous due to that there is a
column reference with the same name both in the SELECT and FROM clauses.
In this case we resolve to the column in FROM clause and warn the user
of a possible ambiguity.
- More extensive comments.
- Changed the function to return bool instead of int (as in other places).
mysql-test/t/group_by.test
Added test for BUG#11211.
mysql-test/r/group_by.result
Added test for BUG#11211.
|
|
|
|
|
| |
- post-review fix regarding Item_fields
- added test for the changed name resolution
|
|
|
|
| |
- more tests, post-review changes, bug-fixes, simplifications, and improved comments
|
|
|
|
|
|
|
| |
- Changed name resolution for GROUP BY so that derived columns do not shadow table columns
from the FROM clause. As a result GROUP BY now is handled as a true ANSI extentsion.
- Issue a warning when HAVING is resolved into ambiguous columns, and prefer the columns from
the GROUP BY clause over SELECT columns.
|
| |
|
|\
| |
| |
| |
| | |
(Includes merge of arena code in 4.1 and 5.0)
|
| |
| |
| |
| | |
Fixed bug in end space handle for WHERE text_column="constant"
|
| | |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
from the select list and TEXT field
make setup_copy_fields to insert Item_copy_string for blobs in
the beginning of the copy_funcs (push_back instead of push_front)
the thing is that Item_copy_string::copy for function can call
Item_copy_string::val_int for blob via Item_ref.
But if Item_copy_string::copy for blob isn't called before,
it's value will be wrong.
So all the Item_copy_string::copy for blobs should be called before
Item_copy_string::copy for functions.
|
|/ /
| |
| |
| | |
(BUG#4609)
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
is_used_lock(), char_lengtrh(), bit_xor()
added string length for more speed
made code covarage for print() method of Item
fixed printability of some items (SCRUM) (WL#1274)
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
Better fix for format('nan')
Fix for HAVING COUNT(DISTINCT...)
|
| |
| |
| |
| | |
code cleanup
|
|/ |
|
|
|
|
| |
Fix problem with HAVING and MAX() IS NOT NULL
|
|
|
|
|
| |
Portability fixes.
Don't delete temporary tables on FLUSH tables.
|
| |
|
|
|
|
|
|
| |
Fix for consistent 0000-00-00 date handling
Close + open binary logs on flush tables
Fix for AVG() in HAVING.
|
|
Fixed bug with HEAP tables on windows
Fixed bug with HAVING on empty tables
|