summaryrefslogtreecommitdiff
path: root/mysql-test/t/union.test
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-10120: Wrong result of UNION .. ORDER BY GROUP_CONCAT()Varun Gupta2020-07-101-6/+15
| | | | | Reject queries that have aggregate functions with UNION as these are not allowed by standard.
* Updated mtr files to support different compiled in optionsMonty2019-09-011-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows one to run the test suite even if any of the following options are changed: - character-set-server - collation-server - join-cache-level - log-basename - max-allowed-packet - optimizer-switch - query-cache-size and query-cache-type - skip-name-resolve - table-definition-cache - table-open-cache - Some innodb options etc Changes: - Don't print out the value of system variables as one can't depend on them to being constants. - Don't set global variables to 'default' as the default may not be the same as the test was started with if there was an additional option file. Instead save original value and reset it at end of test. - Test that depends on the latin1 character set should include default_charset.inc or set the character set to latin1 - Test that depends on the original optimizer switch, should include default_optimizer_switch.inc - Test that depends on the value of a specific system variable should set it in the test (like optimizer_use_condition_selectivity) - Split subselect3.test into subselect3.test and subselect3.inc to make it easier to set and reset system variables. - Added .opt files for test that required specfic options that could be changed by external configuration files. - Fixed result files in rockdsb & tokudb that had not been updated for a while.
* Merge 10.1 into 10.2Marko Mäkelä2019-01-171-0/+35
|\
| * Merge 10.0 into 10.1Marko Mäkelä2019-01-171-0/+35
| |\
| | * MDEV-13784: query causes seg faultVarun Gupta2019-01-061-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | When we have a nested subquery then a subquery that was a dependent subquery may change to an independent one when we optimizer the inner subqueries. This is handled st_select_lex::optimize_unflattened_subqueries. Currently a subquery that was changed to independent from dependent after optimization phase incorrectly shows dependent in the output of Explain, this happens because we don't update used_tables for the WHERE clause, ON clause, etc after the optimization phase.
* | | Merge 10.1 into 10.2Marko Mäkelä2018-08-021-0/+15
|\ \ \ | |/ /
| * | Merge branch '10.0' into 10.1Oleksandr Byelkin2018-07-311-0/+15
| |\ \ | | |/
| | * Merge remote-tracking branch 'mysql/5.5' into 5.5Oleksandr Byelkin2018-07-291-0/+15
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not accept: 1. We did not have this problem (fixed earlier and better) d982e717aba67227ec40761a21a4211db91aa0e2 Bug#27510150: MYSQLDUMP FAILS FOR SPECIFIC --WHERE CLAUSES 2. We do not have such options (an DBUG_ASSERT put just in case) bbc2e37fe4e0ca3a7cfa1437a763dc43829e98e2 Bug#27759871: BACKRONYM ISSUE IS STILL IN MYSQL 5.7 3. Serg fixed it in other way in this release: e48d775c6f066add457fa8cfb2ebc4d5ff0c7613 Bug#27980823: HEAP OVERFLOW VULNERABILITIES IN MYSQL CLIENT LIBRARY
| | | * Bug#27197235 USER VARIABLE + UINON + DECIMAL COLUMN RETURNSAjo Robert2018-04-101-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WRONG VALUES User variables will have the default session collation associated with it. And a select which uses it as part of a union may infer the collation while type merging. This leads to problems when the result is of DECIMAL type. Setting the appropriate collation of DECIMAL result type is missing in 5.7 code base. Added code to set appropriate collation when the result is of DECIMAL type during Item_type_holder::join_types().
| | | * Bug #17059925: UNIONS COMPUTES ROWS_EXAMINED INCORRECTLYmithun2014-05-081-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ISSUE: ------ For UNION of selects, rows examined by the query will be sum of rows examined by individual select operations and rows examined for union operation. The value of session level global counter that is used to count the rows examined by a select statement should be accumulated and reset before it is used for next select statement. But we have missed to reset the same. Because of this examined row count of a select query is accounted more than once. SOLUTION: --------- In union reset the session level global counter used to accumulate count of examined rows after its value is saved.
| | | * merge 5.1-security => 5.5-securityTor Didriksen2011-07-111-0/+41
| | | |\
| | | | * Bug#11765255 - 58201: VALGRIND/CRASH WHEN ORDERING BY MULTIPLE AGGREGATE ↵Tor Didriksen2011-07-111-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FUNCTIONS We must allocate a larger ref_pointer_array. We failed to account for extra items allocated here: #0 find_order_in_list uint el= all_fields.elements; all_fields.push_front(order_item); /* Add new field to field list. */ ref_pointer_array[el]= order_item; order->item= ref_pointer_array + el; #1 setup_order #2 setup_without_group #3 JOIN::prepare
| | | * | Bug#58970 Problem Subquery (without referencing a table) Magne Mahre2011-01-101-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and Order By When having a UNION statement in a subquery, with no referenced tables (or only a reference to the virtual table 'dual'), the UNION did not allow an ORDER BY clause. i.e: SELECT(SELECT 1 AS a UNION SELECT 0 AS a ORDER BY a) AS b or SELECT(SELECT 1 AS a FROM dual UNION SELECT 0 as a ORDER BY a) AS b In addition, an ORDER BY / LIMIT clause was not accepted in subqueries even for single SELECT statements with no referenced tables (or with 'dual' as table reference) i.e: SELECT(SELECT 1 AS a ORDER BY a) AS b or SELECT(SELECT 1 AS a FROM dual ORDER BY a) AS b The fix was to allow an optional ORDER BY/LIMIT clause to the grammar for these cases. See also: Bug#57986
| | | * | Bug#57986 ORDER BY clause is not used after a UNION, Magne Mahre2011-01-101-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if embedded in a SELECT An ORDER BY clause was bound to the incorrect (sub-)statement when used in a UNION context. In a query like: SELECT * FROM a UNION SELECT * FROM b ORDER BY c the result of SELECT * FROM b is sorted, and then combined with a. The correct behaviour is that the ORDER BY clause should be applied on the final set. Similar behaviour was seen on LIMIT clauses as well. In a UNION statement, there will be a select_lex object for each of the two selects, and a select_lex_unit object that describes the UNION itself. Similarly, the same behaviour was also seen on derived tables. The bug was caused by using a grammar rule for ORDER BY and LIMIT that bound these elements to thd->lex->current_select, which points to the last of the two selects, instead of to the fake_select_lex member of the master select_lex_unit object.
| | | * | some test fixes after merging 57840Bjorn Munch2010-11-061-1/+1
| | | | |
| | | * | WL#5370 Keep forward-compatibility when changing 2010-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'CREATE TABLE IF NOT EXISTS ... SELECT' behaviour BUG#47132, BUG#47442, BUG49494, BUG#23992 and BUG#48814 will disappear automatically after the this patch. BUG#55617 is fixed by this patch too. This is the 5.5 part. It implements: - 'CREATE TABLE IF NOT EXISTS ... SELECT' statement will not insert anything and binlog anything if the table already exists. It only generate a warning that table already exists. - A couple of test cases for the behavior changing.
| | | * | Manual merge from mysql-trunk-merge.Alexander Nozdrin2010-01-191-0/+55
| | | |\ \ | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: - configure.in - include/m_string.h - mysql-test/extra/rpl_tests/rpl_row_func003.test - mysql-test/r/mysqlbinlog.result - mysql-test/r/union.result - mysql-test/suite/binlog/r/binlog_killed_simulate.result - mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result - mysql-test/suite/binlog/r/binlog_unsafe.result - mysql-test/suite/binlog/t/binlog_unsafe.test - mysql-test/suite/rpl/r/rpl_loaddata_fatal.result - mysql-test/suite/rpl/r/rpl_loaddata_map.result - mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result - mysql-test/suite/rpl/r/rpl_stm_log.result - mysql-test/suite/rpl/t/rpl_optimize.test - mysql-test/t/mysqlbinlog.test - mysql-test/t/union.test - sql/rpl_utility.h - sql/sql_union.cc - strings/Makefile.am
| | | | * Addendum to Bug #49734 : fixed an unstable test case.Georgi Kodinov2010-01-061-0/+2
| | | | |
| | | | * Bug #49734: Crash on EXPLAIN EXTENDED UNION ... ORDER BY <any ↵Georgi Kodinov2009-12-221-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | non-const-function> Several problems fixed : 1. Non constant expressions in UNION ... ORDER BY were not correctly cleaned up in st_select_lex_unit::cleanup() causing crashes in EXPLAIN EXTENDED because of fields quoted by these expressions pointing to the already freed temporary table used to calculate the UNION. Fixed by correctly cleaning up expressions of any depth. 2. Subqueries in the order by part of UNION ... ORDER BY ... caused a crash in EXPLAIN EXTENDED because of a transformation attempt made during EXPLAIN EXTENDED execution. Fixed by not doing the transformation when in EXPLAIN. 3. Fulltext functions caused crash when in the ORDER BY part of an un-parenthesized UNION that gets "promoted" to be valid for the whole union, e.g. SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY MATCHES (a) AGAINST ('abc' IN BOOLEAN MODE). This is a case that demonstrates a more general problem of parts of the query being moved to another level. When doing such transformation late in the optimization run when most of the flags about the contents of the query are already aggregated it's possible to "split" the flags so that they correctly reflect the new queries after the transformation. In specific the ST_SELECT_LEX::ftfunc_list is holding all the free text function for all the parts of the second SELECT in the UNION and we don't know what part of that is in the ORDER BY that we're to move to the UNION level and what part is about the other parts of the second SELECT. Fixed by throwing and error when such statements are about to be processed by adding a check for the presence of MATCH() inside the ORDER BY clause that's going to get promoted to UNION. To workaround this new limitation one must parenthesize the UNION SELECTs and provide a real global ORDER BY for the UNION outside of the parenthesis.
| | | * | Backport of Bug#33204 from mysql-pe toMartin Hansson2009-11-101-82/+42
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql-next-mr-bugfixing. Bug no 32858 was fixed in two different ways in what was then called mysql 5.1 and 6.0. The fix in 6.0 was very different since bugfix no 33204 was present. Furthermore, the two fixes were not compatible. Hence in order to backport Bug#33204 to the 5.1-based mysql-next-mr-bugfixing, it was necessary to remove the 5.1 fix of 32858 and apply the 6.0 version of the fix.
| | | * 5.0-bugteam->5.1-bugteam mergeSergey Glukhov2009-05-151-0/+12
| | | |\
| | | | * Bug#43612 crash with explain extended, union, order bySergey Glukhov2009-05-151-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In UNION if we use last SELECT without braces and this SELECT have ORDER BY clause, such clause belongs to global UNION. It is parsed like last SELECT part and used further as 'unit->global_parameters->order_list' value. During DESCRIBE EXTENDED we call select_lex->print_order() for last SELECT where order fields refer to tmp table which already freed. It leads to crash. The fix is clean up global_parameters->order_list instead of fake_select_lex->order_list.
| | | | * Automerge.Alexey Kopytov2009-03-271-0/+15
| | | | |\
| | | * | \ Automerge.Alexey Kopytov2009-03-271-0/+15
| | | |\ \ \
| | | | * \ \ Manual merge.Alexey Kopytov2009-03-271-0/+15
| | | | |\ \ \ | | | | | | |/ | | | | | |/|
| | | | | * | Fix for bug #43432: Union on floats does unnecessary rounding Alexey Kopytov2009-03-271-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UNION could convert fixed-point FLOAT(M,D)/DOUBLE(M,D) columns to FLOAT/DOUBLE when aggregating data types from the SELECT substatements. While there is nothing particularly wrong with this behavior, especially when M is greater than the hardware precision limits, it could be confusing in cases when all SELECT statements in a union have the same FLOAT(M,D)/DOUBLE(M,D) columns with equal precision specifications listed in the same position. Since the manual is quite vague on what data type should be returned in such cases, the bug was fixed by implementing the most 'expected' behavior: do not convert FLOAT(M,D)/DOUBLE(M,D) to anything else if all SELECT statements in a UNION have the same precision for that column.
| | | * | | | Bug#43329 Prepared for push on 5.1Bernt M. Johnsen2009-03-191-10/+33
| | | |\ \ \ \ | | | | |/ / / | | | |/| | / | | | | | |/ | | | | |/|
| | | | * | Bug#43329 prepared for commit on 5.0Bernt M. Johnsen2009-03-181-10/+33
| | | | |/
| | | | * Merge mhansson@bk-internal:/home/bk/mysql-5.0-optmhansson/martin@linux-st28.site2007-12-191-0/+22
| | | | |\ | | | | | | | | | | | | | | | | | | into linux-st28.site:/home/martin/mysql/src/bug32848/my50-bug32848
| | | * | | A fix for Bug#22891 "session level max_allowed_packet can beStaale Smedseng2008-11-201-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set but is ignored". This patch makes @@session.max_allowed_packed and @@session.net_buffer_length read-only as suggested in the bug report. The user will have to use SET GLOBAL (and reconnect) to alter the session values of these variables. The error string ER_VARIABLE_IS_READONLY is introduced. Tests are modified accordingly.
| | | * | | Bug #32858: Erro: "Incorrect usage of UNION and INTO" does not take gkodinov/kgeorge@magare.gmz2008-05-131-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subselects into account It is forbidden to use the SELECT INTO construction inside UNION statements unless on the last SELECT of the union. The parser records whether it has seen INTO or not when parsing a UNION statement. But if the INTO was legally used in an outer query, an error is thrown if UNION is seen in a subquery. Fixed in 5.0 by remembering the nesting level of INTO tokens and mitigate the error unless it collides with the UNION.
| | | * | | Merge mhansson@bk-internal:/home/bk/mysql-5.1-optmhansson/martin@linux-st28.site2007-12-211-0/+22
| | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | 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/+24
| | | | |\ \ \ | | | | | | |/ | | | | | |/| | | | | | | | 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/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 magare.gmz:/home/kgeorge/mysql/autopush/B19390-5.0-optgkodinov/kgeorge@magare.gmz2007-12-181-0/+44
| | | |\ \ \ \ | | | | |/ / / | | | |/| | / | | | | | |/ | | | | |/| into magare.gmz:/home/kgeorge/mysql/work/B19390-5.1-opt
| | | | * | Merge mhansson@bk-internal:/home/bk/mysql-5.0-optmhansson/martin@linux-st28.site2007-12-151-0/+57
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | into linux-st28.site:/home/martin/mysql/src/bug32858/my50-bug32858-push
| | | | | * | Bug #32858: Erro: "Incorrect usage of UNION and INTO" does not take mhansson/martin@linux-st28.site2007-12-131-0/+59
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subselects into account It is forbidden to use the SELECT INTO construction inside UNION statements unless on the last SELECT of the union. The parser records whether it has seen INTO or not when parsing a UNION statement. But if the INTO was legally used in an outer query, an error is thrown if UNION is seen in a subquery. Fixed in 5.0 by remembering the nesting level of INTO tokens and mitigate the error unless it collides with the UNION.
| | | | * | Fixed bug #27848.igor@olga.mysql.com2007-12-141-0/+44
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a union without braces, the order by at the end is applied to the overall union. It therefore should not interfere with the individual select parts of the union. Fixed by changing our parser rules appropriately.
| | | * | Merge mysql.com:/home/hf/work/mrg/mysql-5.0-optholyfoot/hf@hfmain.(none)2007-03-221-0/+9
| | | |\ \ | | | | |/ | | | | | | | | | | into mysql.com:/home/hf/work/mrg/mysql-5.1-opt
| | | | * Bug#23345: Wrongly allowed INTO in a non-last select of a UNION.evgen@moonbone.local2007-03-211-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INTO clause can be specified only for the last select of a UNION and it receives the result of the whole query. But it was wrongly allowed in non-last selects of a UNION which leads to a confusing query result. Now INTO allowed only in the last select of a UNION.
| | | * | Merge mysql.com:/home/hf/work/mrg/mysql-5.0-optholyfoot/hf@hfmain.(none)2007-03-091-0/+13
| | | |\ \ | | | | |/ | | | | | | | | | | into mysql.com:/home/hf/work/mrg/mysql-5.1-opt
| | | | * Fixed bug #26661: crash when order by clause in a unionigor@olga.mysql.com2007-03-091-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | construct references invalid name. Derived tables currently cannot use outer references. Thus there is no outer context for them. The 4.1 code takes this fact into account while the Item_field::fix_outer_field code of 5.0 lost the check that blocks any attempts to resolve names in outer context for derived tables.
| | | * | Added more tests of field conversions.jani@a88-112-41-254.elisa-laajakaista.fi2006-09-261-0/+15
| | | | |
| | | * | Fix for bug#20208jani@a88-112-41-254.elisa-laajakaista.fi2006-09-261-0/+30
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A better fix for bug#10025. Fixed test case plus added new tests. After fixing Bug#20208 "Blobs greater than 8K are being truncated to 8K" the fix to bug#10025 "Misleading error with COLLATE mediumtext and UNION" became more accurate. Earlier mediumtext got converted to longtext, although mediumtext was enough to contain the results. Now it converts correctly to mediumtext, if the length does not exceed that and if none of the original fields were type longtext. Type longtext still converts correctly to type longtext, as the extra tests prove.
| | | * Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0msvensson@neptunus.(none)2006-08-031-2/+10
| | | |\ | | | | | | | | | | | | | | | into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
| | | | * Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-optevgen@moonbone.local2006-07-221-2/+10
| | | | |\ | | | | | | | | | | | | | | | | | | into moonbone.local:/work/autopush/12185-bug-5.0-opt-mysql
| | | | | * Fixed bug#12185: Data type aggregation may produce wrong resultevgen@moonbone.local2006-07-221-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Item::tmp_table_field_from_field_type() function creates Field_datetime object instead of Field_timestamp object for timestamp field thus always changing data type is a tmp table is used. The Field_blob object constructor which is used in the Item::tmp_table_field_from_field_type() is always setting packlength field of newly created blob to 4. This leads to changing fields data type for example from the blob to the longblob if a temporary table is used. The Item::make_string_field() function always converts Field_string objects to Field_varstring objects. This leads to changing data type from the char/binary to varchar/varbinary. Added appropriate Field_timestamp object constructor for using in the Item::tmp_table_field_from_field_type() function. Added Field_blob object constructor which sets pack length according to max_length argument. The Item::tmp_table_field_from_field_type() function now creates Field_timestamp object for a timestamp field. The Item_type_holder::display_length() now returns correct NULL length NULL length. The Item::make_string_field() function now doesn't change Field_string to Field_varstring in the case of Item_type_holder. The Item::tmp_table_field_from_field_type() function now uses the Field_blob constructor which sets packlength according to max_length.
| | | * | | Bug #16881: password() and union selectjimw@rama.(none)2006-07-211-0/+7
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was only demonstrated by the use of PASSWORD(), it was not related to that function at all. The calculation of the size of a field in the results of a UNION did not take into account the possible growth of a string field when being converted to the aggregated character set.
| | | * | Fixed bug#18175: The nest_level counter wasn't decremented for union parts whichevgen@moonbone.local2006-06-151-0/+48
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resulted in a wrong error message. The nest_level counter indicates the depth of nesting for a subselect. It is needed to properly resolve aggregate functions in nested subselects. Obviously it shouldn't be incremented for UNION parts because they have the same level of nesting. This counter was incremented by 1 in the mysql_new_select() function for any new select and wasn't decremented for UNION parts. This resulted in wrongly reported error messages. Now the nest_level counter is decremented by 1 for any union part.
| | | * Merge mysql.com:/usr/home/bar/mysql-4.1.b15949bar@mysql.com2006-03-061-1/+10
| | | |\ | | | | | | | | | | | | | | | into mysql.com:/usr/home/bar/mysql-5.0