An error occurred fetching the project authors.
- 19 Sep, 2007 1 commit
-
-
unknown authored
The parser uses ulonglong to store the LIMIT number. This number then is stored into a variable of type ha_rows. ha_rows is either 4 or 8 byte depending on the BIG_TABLES define from config.h So an overflow may occur (and LIMIT becomes zero) while storing an ulonglong value in ha_rows. Fixed by : 1. Using the maximum possible value for ha_rows on overflow 2. Defining BIG_TABLES for the windows builds (to match the others) include/config-win.h: Bug #30639: turn on BIG_TABLES for windows mysql-test/r/select.result: Bug #30639: test case mysql-test/t/select.test: Bug #30639: test case sql/sql_lex.cc: Bug #30639: Use the maximum possible number on overflow of LIMIT. This is valid because there won't be more rows anyway.
-
- 17 Aug, 2007 1 commit
-
-
unknown authored
-
- 15 Aug, 2007 1 commit
-
-
unknown authored
The bug caused memory corruption for some queries with top OR level in the WHERE condition if they contained equality predicates and other sargable predicates in disjunctive parts of the condition. The corruption happened because the upper bound of the memory allocated for KEY_FIELD and SARGABLE_PARAM internal structures containing info about potential lookup keys was calculated incorrectly in some cases. In particular it was calculated incorrectly when the WHERE condition was an OR formula with disjuncts being AND formulas including equalities and other sargable predicates. mysql-test/r/select.result: Added a test case for bug #30396. mysql-test/t/select.test: Added a test case for bug #30396. sql/item_cmpfunc.h: Removed max_members from the COND_EQUAL class as not useful anymore. sql/sql_base.cc: Added the max_equal_elems field to the st_select_lex structure. sql/sql_lex.cc: Added the max_equal_elems field to the st_select_lex structure. sql/sql_lex.h: Added the max_equal_elems field to the st_select_lex structure. The field contains the maximal number of elements in multiple equalities built for the query conditions. sql/sql_select.cc: Fixed bug #30396. The bug caused memory corruption for some queries with top OR level in the WHERE condition if they contained equality predicates and other sargable predicates in disjunctive parts of the condition. The corruption happened because the upper bound of the memory allocated for KEY_FIELD and SARGABLE_PARAM internal structures containing info about potential lookup keys was calculated incorrectly in some cases. In particular it was calculated incorrectly when the WHERE condition was an OR formula with disjuncts being AND formulas including equalities and other sargable predicates. The max_equal_elems field to the st_select_lex structure is used now to calculate the above mentioned upper bound. The field contains the maximal number of elements in multiple equalities built for the query conditions.
-
- 02 Aug, 2007 1 commit
-
-
unknown authored
The SELECT query with more than 31 nested dependent SELECT queries returned wrong result. New error message has been added: ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT. It will be reported as: "Too high level of nesting for select". sql/sql_parse.cc: Fixed bug #27352. The Item_sum::register_sum_func method has been modified to return TRUE on exceeding of allowed level of SELECT nesting and to report corresponding error message. sql/unireg.h: Fixed bug #27352. Constant definition has been added: maximal allowed level of SELECT nesting. mysql-test/t/select.test: Updated test case for bug #27352. mysql-test/r/select.result: Updated test case for bug #27352. sql/share/errmsg.txt: Fixed bug #27352. New error message has been added: ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT.
-
- 26 Jun, 2007 1 commit
-
-
unknown authored
Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/backup.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/events_bugs.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/events_trans.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/ndb_dd_basic.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/ndb_dd_ddl.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/ndb_gis.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/ndb_row_format.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_extraCol_innodb.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_extraCol_myisam.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_incident.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_ndb_extraCol.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_row_tabledefs_2myisam.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_row_tabledefs_3innodb.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_sp.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/select.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/show_check.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/sp.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/sp_gis.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/sp_trans.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/type_timestamp.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/warnings.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/xml.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/t/grant.test: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/t/partition_grant.test: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 sql/mysql_priv.h: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 sql/share/errmsg.txt: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1
-
- 29 May, 2007 1 commit
-
-
unknown authored
- Renamed "Using join cache" to "Using join buffer". - "Using join buffer" is now printed on the last table that "reads" from the join buffer cache. mysql-test/r/archive_gis.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/compress.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ctype_utf8.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/derived.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/distinct.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/func_group.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/func_group_innodb.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/gis.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/greedy_optimizer.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/group_by.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/group_min_max.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/index_merge_myisam.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/information_schema.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/innodb_gis.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/innodb_mysql.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/join.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/join_nested.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/key_diff.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/myisam.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ndb_condition_pushdown.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ndb_gis.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/range.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/row.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/select.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ssl.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ssl_compress.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/subselect.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/subselect3.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/union.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/view.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. sql/sql_select.cc: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch.
-
- 04 May, 2007 1 commit
-
-
unknown authored
- added join cache indication in EXPLAIN (Extra column). - prefer filesort over full scan over index for ORDER BY (because it's faster). - when switching from REF to RANGE because RANGE uses longer key turn off sort on the head table only as the resulting RANGE access is a candidate for join cache and we don't want to disable it by sorting on the first table only. mysql-test/r/archive_gis.result: bug #27531: join cache in EXPLAIN mysql-test/r/compress.result: bug #27531: - join cache in EXPLAIN. - prefer filesort over full scan over index for ORDER BY. mysql-test/r/ctype_utf8.result: bug #27531: join cache in EXPLAIN mysql-test/r/derived.result: bug #27531: join cache in EXPLAIN mysql-test/r/distinct.result: bug #27531: join cache in EXPLAIN mysql-test/r/func_group.result: bug #27531: join cache in EXPLAIN mysql-test/r/func_group_innodb.result: bug #27531: join cache in EXPLAIN mysql-test/r/gis.result: bug #27531: join cache in EXPLAIN mysql-test/r/greedy_optimizer.result: bug #27531: join cache in EXPLAIN mysql-test/r/group_by.result: bug #27531: join cache in EXPLAIN mysql-test/r/group_min_max.result: bug #27531: join cache in EXPLAIN mysql-test/r/index_merge_myisam.result: bug #27531: join cache in EXPLAIN mysql-test/r/information_schema.result: bug #27531: join cache in EXPLAIN mysql-test/r/innodb_gis.result: bug #27531: join cache in EXPLAIN mysql-test/r/innodb_mysql.result: bug #27531: join cache in EXPLAIN mysql-test/r/join.result: bug #27531: join cache in EXPLAIN mysql-test/r/join_nested.result: bug #27531: join cache in EXPLAIN mysql-test/r/key_diff.result: bug #27531: join cache in EXPLAIN mysql-test/r/myisam.result: bug #27531: join cache in EXPLAIN mysql-test/r/ndb_condition_pushdown.result: bug #27531: join cache in EXPLAIN mysql-test/r/ndb_gis.result: bug #27531: join cache in EXPLAIN mysql-test/r/range.result: bug #27531: join cache in EXPLAIN mysql-test/r/row.result: bug #27531: join cache in EXPLAIN mysql-test/r/select.result: bug #27531: - join cache in EXPLAIN. - prefer filesort over full scan over index for ORDER BY. mysql-test/r/ssl.result: bug #27531: - join cache in EXPLAIN. - prefer filesort over full scan over index for ORDER BY. mysql-test/r/ssl_compress.result: bug #27531: - join cache in EXPLAIN. - prefer filesort over full scan over index for ORDER BY. mysql-test/r/subselect.result: bug #27531: join cache in EXPLAIN mysql-test/r/subselect3.result: bug #27531: join cache in EXPLAIN mysql-test/r/union.result: bug #27531: join cache in EXPLAIN mysql-test/r/view.result: bug #27531: join cache in EXPLAIN sql/sql_select.cc: bug #27531: - join cache in EXPLAIN. - prefer filesort over full scan over index for ORDER BY. - disable sorting on the first table only when switching from REF to RANGE.
-
- 10 Apr, 2007 1 commit
-
-
unknown authored
Added a test case. The problem was fixed by the fix for bug #17379. The problem was that because of some conditions the optimizer always preferred range or full index scan access methods to lookup access methods even when the latter were much cheaper. mysql-test/r/select.result: Bug #19372: test case. The problem was fixed by the patch for bug #17379 mysql-test/t/select.test: Bug #19372: test case. The problem was fixed by the patch for bug #17379
-
- 26 Mar, 2007 1 commit
-
-
unknown authored
enabled the optional FOR JOIN to all the three clauses : USE, FORCE and IGNORE mysql-test/r/select.result: WL3527: 5.0 part: test cases mysql-test/t/select.test: WL3527: 5.0 part: test cases
-
- 12 Mar, 2007 1 commit
-
-
unknown authored
after single-row table substitution could lead to a wrong result set. The bug happened because the function Item_field::replace_equal_field erroniously assumed that any field included in a multiple equality with a constant has been already substituted for this constant. This not true for fields becoming constant after row substitutions for constant tables. mysql-test/r/select.result: Added a test case for bug #26963. mysql-test/t/select.test: Added a test case for bug #26963. sql/item.cc: Fixed bug #26963: invalid optimization of the pushdown conditions after single-row table substitution could lead to a wrong result set. The bug happened because the function Item_field::replace_equal_field erroneously assumed that any field included in a multiple equality with a constant has been already substituted for this constant. This not true for fields becoming constant after row substitutions for constant tables.
-
- 09 Mar, 2007 1 commit
-
-
unknown authored
be specified 5.0 part of the fix. Implements IGNORE INDEX FOR JOIN as a synonym of IGNORE INDEX for backward compatibility with the 5.1 fix. mysql-test/r/select.result: WL#3527: Extend IGNORE INDEX so places where index is ignored can be specified - test case mysql-test/t/select.test: WL#3527: Extend IGNORE INDEX so places where index is ignored can be specified - test case
-
- 15 Feb, 2007 1 commit
-
-
unknown authored
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. mysql-test/r/endspace.result: Adjusted results after the fix for bug #25971. mysql-test/r/innodb.result: Adjusted results after the fix for bug #25971. mysql-test/r/myisam.result: Adjusted results after the fix for bug #25971. mysql-test/r/select.result: Added a test case for bug #25971. mysql-test/r/type_blob.result: Adjusted results after the fix for bug #25971. mysql-test/t/select.test: Added a test case for bug #25971.
-
- 13 Feb, 2007 1 commit
-
-
unknown authored
-
- 06 Feb, 2007 1 commit
-
-
unknown authored
Ignoring error codes from type conversion allows default (wrong) values to go unnoticed in the formation of index search conditions. Fixed by correctly checking for conversion errors. mysql-test/r/select.result: Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison - test case mysql-test/t/select.test: Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison - test case sql/field.h: Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison - don't ignore coversion errors sql/field_conv.cc: Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison - don't ignore coversion errors sql/item.cc: Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison - don't ignore coversion errors
-
- 01 Feb, 2007 1 commit
-
-
unknown authored
The bug could cause choosing a sub-optimal execution plan for a single-table query if a unique index with many null keys were defined for the table. It happened because the code of the check_quick_keys function made an assumption that any key may occur in an unique index only once. Yet this is not true for keys with nulls that may have multiple occurrences in the index. mysql-test/r/null_key.result: Fixed bug #25407 Adjusted result after the fix. mysql-test/r/select.result: Added a test case for bug #25407. mysql-test/t/select.test: Added a test case for bug #25407.
-
- 22 Jan, 2007 2 commits
-
-
unknown authored
mysql-test/r/select.result: results adjusted.
-
unknown authored
We use INT_RESULT type if all arguments are of type INT for 'if', 'case', 'coalesce' functions regardless of arguments' unsigned flag, so sometimes we can exceed the INT bounds. mysql-test/r/select.result: Fix for bug #22026: Warning when using IF statement and large unsigned bigint - test result. mysql-test/t/select.test: Fix for bug #22026: Warning when using IF statement and large unsigned bigint - test case. sql/item_cmpfunc.cc: Fix for bug #22026: Warning when using IF statement and large unsigned bigint - take into account unsigned flags aggregating result types: return INT_RESULT only if two items with INT_RESULT type have equal unsigned_flags, otherwise return REAL_RESULT.
-
- 19 Jan, 2007 2 commits
-
-
unknown authored
After fix for bug#21798 JOIN stores the pointer to the buffer for sorting fields. It is used while sorting for grouping and for ordering. If ORDER BY clause has more elements then the GROUP BY clause then a memory overrun occurs. Now the length of the ORDER BY list is always passed to the make_unireg_sortorder() function and it allocates buffer big enough to be used for bigger list. sql/sql_delete.cc: Bug#25172: Not checked buffer size leads to a server crash. Length parameter is initialized to 0 for the make_unireg_sortorder() function. sql/sql_select.cc: Bug#25172: Not checked buffer size leads to a server crash. Now the length of the ORDER BY list is always passed to the make_unireg_sortorder() function and it allocates buffer big enough to be used for bigger list. sql/sql_table.cc: Bug#25172: Not checked buffer size leads to a server crash. Length parameter is initialized to 0 for the make_unireg_sortorder() function. sql/sql_update.cc: Bug#25172: Not checked buffer size leads to a server crash. Length parameter is initialized to 0 for the make_unireg_sortorder() function. mysql-test/r/select.result: Added a test case for bug#25172: Not checked buffer size leads to a server crash. mysql-test/t/select.test: Added a test case for bug#25172: Not checked buffer size leads to a server crash.
-
unknown authored
-
- 18 Jan, 2007 1 commit
-
-
unknown authored
-
- 03 Jan, 2007 1 commit
-
-
unknown authored
With MySQL 3.23 and 4.0, the syntax 'LIMIT N, -1' is accepted, and returns all the rows located after row N. This behavior, however, is not the intended result, and defeats the purpose of LIMIT, which is to constrain the size of a result set. With MySQL 4.1 and later, this construct is correctly detected as a syntax error. This fix does not change the production code, and only adds a new test case to improve test coverage in this area, to enforce in the test suite the intended behavior. mysql-test/r/select.result: Enforce that LIMIT N, -1 is illegal. mysql-test/t/select.test: Enforce that LIMIT N, -1 is illegal.
-
- 09 Dec, 2006 1 commit
-
-
unknown authored
Post-commit issues fixed * Test results for other tests fixed due to added error #s * Memory allocation/free issues found with running with valgrind * Fix to mysql-test-run shell script to run federated_server test (installs mysql.servers table properly) mysql-test/r/1st.result: WL #3031 New result for 1st test mysql-test/r/backup.result: WL #3031 Error codes differ due to addition of error codes for federated server errors (2) so all test results with hard-coded error #s will be off by two. New results generated. mysql-test/r/connect.result: WL #3031 Error codes differ due to addition of error codes for federated server errors (2) so all test results with hard-coded error #s will be off by two. New results generated. mysql-test/r/information_schema.result: WL #3031 Error codes differ due to addition of error codes for federated server errors (2) so all test results with hard-coded error #s will be off by two. New results generated. mysql-test/r/mysql.result: WL #3031 Error codes differ due to addition of error codes for federated server errors (2) so all test results with hard-coded error #s will be off by two. New results generated. mysql-test/r/mysqlcheck.result: WL #3031 Error codes differ due to addition of error codes for federated server errors (2) so all test results with hard-coded error #s will be off by two. New results generated. mysql-test/r/ndb_dd_basic.result: WL #3031 Error codes differ due to addition of error codes for federated server errors (2) so all test results with hard-coded error #s will be off by two. New results generated. mysql-test/r/ndb_dd_ddl.result: WL #3031 Error codes differ due to addition of error codes for federated server errors (2) so all test results with hard-coded error #s will be off by two. New results generated. mysql-test/r/select.result: WL #3031 Error codes differ due to addition of error codes for federated server errors (2) so all test results with hard-coded error #s will be off by two. New results generated. mysql-test/r/show_check.result: WL #3031 Error codes differ due to addition of error codes for federated server errors (2) so all test results with hard-coded error #s will be off by two. New results generated. mysql-test/r/sp.result: WL #3031 Error codes differ due to addition of error codes for federated server errors (2) so all test results with hard-coded error #s will be off by two. New results generated. mysql-test/r/sp_gis.result: WL #3031 Error codes differ due to addition of error codes for federated server errors (2) so all test results with hard-coded error #s will be off by two. New results generated. mysql-test/r/sp_trans.result: WL #3031 Error codes differ due to addition of error codes for federated server errors (2) so all test results with hard-coded error #s will be off by two. New results generated. mysql-test/r/system_mysql_db.result: WL #3031 Error codes differ due to addition of error codes for federated server errors (2) so all test results with hard-coded error #s will be off by two. New results generated. mysql-test/r/type_timestamp.result: WL #3031 Error codes differ due to addition of error codes for federated server errors (2) so all test results with hard-coded error #s will be off by two. New results generated. mysql-test/r/warnings.result: WL #3031 Error codes differ due to addition of error codes for federated server errors (2) so all test results with hard-coded error #s will be off by two. New results generated. mysql-test/r/xml.result: WL #3031 Error codes differ due to addition of error codes for federated server errors (2) so all test results with hard-coded error #s will be off by two. New results generated. scripts/mysql_create_system_tables.sh: WL #3031 Fixed old mysql-test-run.sh script to work with new mysql.servers table as reported by Cisco sql/sql_yacc.yy: WL# 3031 OPTIONS/options must be usable as table or column name. storage/federated/ha_federated.cc: WL# 3031 * Fixed allocation and free issues (warnings found with --valgrind) * Fixed cast issues * Made sure port was set accordingly
-
- 06 Dec, 2006 1 commit
-
-
unknown authored
Problem: storing >=8 byte hexadecimal values we don't check data. Fix: check if the data fits the {u}longlong range. mysql-test/r/select.result: Fix for bug #22533: Traditional: Too-long bit value not rejected. - test result. mysql-test/t/range.test: Fix for bug #22533: Traditional: Too-long bit value not rejected. - adjusted. mysql-test/t/select.test: Fix for bug #22533: Traditional: Too-long bit value not rejected. - test case. sql/item.cc: Fix for bug #22533: Traditional: Too-long bit value not rejected. - limit storing value to {U}LONGLONG_MAX in numeric context.
-
- 17 Oct, 2006 1 commit
-
-
unknown authored
-
- 16 Oct, 2006 2 commits
-
-
unknown authored
account predicates that become sargable after reading const tables. In some cases this resulted in choosing non-optimal execution plans. Now info of such potentially saragable predicates is saved in an array and after reading const tables we check whether this predicates has become saragable. mysql-test/r/select.result: Added a test case for bug #19579. mysql-test/t/select.test: Added a test case for bug #19579. sql/item_cmpfunc.cc: Fixed bug #19579: at range analysis optimizer did not take into account predicates that become sargable after reading const tables. Added a counter of between predicates. sql/sql_base.cc: Fixed bug #19579: at range analysis optimizer did not take into account predicates that become sargable after reading const tables. Added a counter of between predicates. sql/sql_lex.cc: Fixed bug #19579: at range analysis optimizer did not take into account predicates that become sargable after reading const tables. Added a counter of between predicates. sql/sql_lex.h: Fixed bug #19579: at range analysis optimizer did not take into account predicates that become sargable after reading const tables. Added a counter of between predicates. sql/sql_select.cc: Fixed bug #19579: at range analysis optimizer did not take into account predicates that become sargable after reading const tables. Now info of such potentially saragable predicates is saved in an array and after reading const tables we check whether this predicates has become saragable.
-
unknown authored
strings MySQL is setting the flag HA_END_SPACE_KEYS for all the keys that reference text or varchar columns with collation different than binary. This was done to handle correctly the situation where a lookup on such a key may return more than 1 row because of the presence of many rows that differ only by the amount of trailing space in the table's string column. Inserting such values however appears to violate the unique checks on INSERT/UPDATE. Thus that flag must not be set as it will prevent the optimizer from choosing a faster access method. This fix removes the setting of the HA_END_SPACE_KEYS flag. include/my_base.h: Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on strings - disabled HA_END_SPACE_KEY as it's no longer needed mysql-test/r/func_str.result: Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on strings - fixed explain in an existing case mysql-test/r/merge.result: Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on strings - fixed explain in an existing case mysql-test/r/select.result: Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on strings - test case mysql-test/r/subselect.result: Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on strings - fixed explain in an existing case mysql-test/t/select.test: Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on strings - test case
-
- 03 Oct, 2006 1 commit
-
-
unknown authored
-
- 29 Sep, 2006 1 commit
-
-
unknown authored
After the patch for big 21698 equality propagation stopped working for BETWEEN and IN predicates with STRING arguments. This changeset completes the solution of the above patch. mysql-test/r/select.result: Added a test case for bug #22735. mysql-test/t/select.test: Added a test case for bug #22735. sql/item_cmpfunc.h: Fixed bug #22753. After the patch for big 21698 equality propagation stopped working for BETWEEN and IN predicates with STRING arguments. This changeset completes the solution of the above patch. Added an implementation of the subst_argument_checker method for Item_func_opt_neg (the direct ancestor of Item_func_between and Item_func_in) which allows equality propagation for BETWEEN and IN predicates.
-
- 28 Sep, 2006 1 commit
-
-
unknown authored
while space allocation Under some circumstances DISTINCT clause can be converted to grouping. In such cases grouping is performed by all items in the select list. If an ORDER clause is present then items from it is prepended to group list. But the case with ORDER wasn't taken into account when allocating the array for sum functions. This leads to memory corruption and crash. The JOIN::alloc_func_list() function now allocates additional space if there is an ORDER by clause is specified and DISTINCT -> GROUP BY optimization is possible. mysql-test/t/select.test: Added the test case for bug#20503: Server crash due to the ORDER clause not taken into account while space allocation mysql-test/r/select.result: Added the test case for bug#20503: Server crash due to the ORDER clause not taken into account while space allocation sql/sql_select.cc: Fixed bug#20503: Server crash due to the ORDER clause not taken into account while space allocation The JOIN::alloc_func_list() function now allocates additional space if there is an ORDER by clause is specified and DISTINCT -> GROUP BY optimization is possible.
-
- 25 Aug, 2006 1 commit
-
-
unknown authored
const tables. This resulted in choosing extremely inefficient execution plans in same cases when distribution of data in joined were skewed (see the customer test case for the bug). mysql-test/r/select.result: Added a test case for bug #21390: wrong estimate of rows after elimination of const tables. Includded a test case that checks the code added by the patch that handles outer joins with no matches after substitution of a const table in an efficient way. mysql-test/t/select.test: Added a test case for bug #21390: wrong estimate of rows after elimination of const tables. Included a test case that checks the code added by the patch that handles outer joins with no matches after substitution of a const table in an efficient way. sql/sql_select.cc: Fixed bug #21390: wrong estimate of rows after elimination of const tables. This resulted in choosing extremely inefficient execution plans in same cases when distribution of data in joined were skewed (see the customer test case for the bug). Also added the code to handle outer joins with no matches after substitution of a const table in an efficient way. Corrected calculation of the null rejecting key conditions.
-
- 01 Aug, 2006 1 commit
-
-
unknown authored
-
- 31 Jul, 2006 1 commit
-
-
unknown authored
After merge fix mysql-test/r/select.result: After merge fix mysql-test/r/func_group.result: After merge fix sql/sql_select.cc: After merge fix
-
- 28 Jul, 2006 1 commit
-
-
unknown authored
- Make the range-et-al optimizer produce E(#table records after table condition is applied), - Make the join optimizer use this value, - Add "filtered" column to EXPLAIN EXTENDED to show fraction of records left after table condition is applied - Adjust test results, add comments mysql-test/r/archive_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/auto_increment.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bdb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bench_count_distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/binlog_stm_blackhole.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/case.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/cast.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_collate.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_cp1250_ch.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/date_formats.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/fulltext.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_crypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_default.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_encrypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_gconcat.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_group.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_if.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_in.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_like.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_math.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_op.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_regexp.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_set.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_str.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_system.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_test.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_time.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_by.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_min_max.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/having.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap_hash.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_innodb.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_ror.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/innodb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/insert_update.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join_nested.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/key_diff.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/myisam.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ndb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/negation_elimination.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/null.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/olap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/partition_pruning.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/query_cache.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/row.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_get_lock.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_master_pos_wait.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/select.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/subselect.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/type_blob.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/union.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/varbinary.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/variables.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/view.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/ctype_cp1250_ch.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/func_like.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/group_min_max.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror_cpk.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/join.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/partition_pruning.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column sql/opt_range.cc: BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows - estimate of #records that will match the table condition. sql/sql_class.cc: BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.cc: BUG#14940: - Make the join optimizer to use TABLE::quick_condition_rows= = E(#table records after filtering with table condition) - Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.h: BUG#14940: Added comments sql/table.h: BUG#14940: Added comments
-
- 26 Jul, 2006 2 commits
-
-
unknown authored
Correct merge
-
unknown authored
When optimizing conditions like 'a = <some_val> OR a IS NULL' so that they're united into a single condition on the key and checked together the server must check which value is the NULL value in a correct way : not only using ->is_null but also check if the expression doesn't depend on any tables referenced in the current statement. This additional check must be performed because that optimization takes place before the actual execution of the statement, so if the field was initialized to NULL from a previous statement the optimization would be applied incorrectly. mysql-test/r/select.result: Bug #21019: First result of SELECT COUNT(*) different than consecutive runs - test case mysql-test/t/select.test: Bug #21019: First result of SELECT COUNT(*) different than consecutive runs - test case. Note that ALTER TABLE is important here : it happens to leave the Field instance for t1.b set to NULL, witch is vital for demonstrating the problem fixed by this changeset. sql/sql_select.cc: Bug #21019: First result of SELECT COUNT(*) different than consecutive runs - check whether a value is null taking into account its table dependency.
-
- 25 Jul, 2006 1 commit
-
-
unknown authored
The problem was in that opt_sum_query() replaced MIN/MAX functions with the corresponding constant found in a key, but due to imprecise representation of float numbers, when evaluating the where clause, this comparison failed. When MIN/MAX optimization detects that all tables can be removed, also remove all conjuncts in a where clause that refer to these tables. As a result of this fix, these conditions are not evaluated twice, and in the case of float number comparisons we do not discard result rows due to imprecise float representation. As a side-effect this fix also corrects an unnoticed problem in bug 12882. mysql-test/r/func_group.result: BUG#20954 - test result adjustment. Adjusted the test result of bug 12882 which was not preperly fixed. The current patch corrects the problem that was fully corrected by the patch for 12882. The problem was that opt_sum_query() indicated that the optimizer may remove all tables because all MIN/MAX/COUNT functions are constants, but this lead to an empty result instead of NULL because the WHERE clause was still evaluated. The current fix removes all conjuncts in the where clause that reference the removed tables, and thus corrects the problem. mysql-test/r/select.result: BUG#20954 - added test mysql-test/r/subselect.result: BUG#20954 - test result adjustment. The fix removes those conditions in a where clause that refer to tables optimized away by MIN/MAX optimization (opt_sum_query()). mysql-test/t/select.test: BUG#20954 - added test sql/sql_select.cc: Fix for BUG#20954: avg(keyval) retuns 0.38 but max(keyval) returns an empty set When MIN/MAX optimization detects that all tables can be removed, also remove all conjuncts in a where clause that refer to these tables. As a result of this fix, these conditions are not evaluated twice, and in the case of float number comparisons we do not discard result rows due to imprecise float representation. As a side-effect this fix also corrects an unnoticed problem in bug 12882.
-
- 20 Jul, 2006 1 commit
-
-
unknown authored
The problem was that when converting a string to an exact number, rounding didn't work, because conversion didn't understand approximate numbers notation. Fix: a new function for string-to-number conversion was implemented, which is aware of approxinate number notation (with decimal point and exponent, e.g. -19.55e-1) include/m_ctype.h: Adding new function into MY_CHARSET_HANDLER Adding prototypes for 8bit and ucs2 functions. mysql-test/r/loaddata.result: Fixing results mysql-test/r/ps_2myisam.result: Fixing results mysql-test/r/ps_3innodb.result: Fixing results mysql-test/r/ps_4heap.result: Fixing results mysql-test/r/ps_5merge.result: Fixing results mysql-test/r/ps_6bdb.result: Fixing results mysql-test/r/rpl_rewrite_db.result: Fixing results mysql-test/r/select.result: Fixing results mysql-test/r/sp-vars.result: Fixing results mysql-test/r/strict.result: Fixing results mysql-test/r/view.result: Fixing results mysql-test/r/warnings.result: Fixing results mysql-test/t/strict.test: Fixing results sql/field.cc: Using new function strings/ctype-big5.c: Adding new function into the MY_CHARSET_HANDLER structure strings/ctype-bin.c: Adding new function into the MY_CHARSET_HANDLER structure strings/ctype-cp932.c: Adding new function into the MY_CHARSET_HANDLER structure strings/ctype-euc_kr.c: Adding new function into the MY_CHARSET_HANDLER structure strings/ctype-eucjpms.c: Adding new function into the MY_CHARSET_HANDLER structure strings/ctype-gb2312.c: Adding new function into the MY_CHARSET_HANDLER structure strings/ctype-gbk.c: Adding new function into the MY_CHARSET_HANDLER structure strings/ctype-latin1.c: Adding new function into the MY_CHARSET_HANDLER structure strings/ctype-simple.c: Implementing my_strntoull10_8bit Adding new function into MY_CHARSET_HANDLER strings/ctype-sjis.c: Adding new function into the MY_CHARSET_HANDLER structure strings/ctype-tis620.c: Adding new function into the MY_CHARSET_HANDLER structure strings/ctype-ucs2.c: Implementing UCS2 wrapper for 8bit version Adding new function into the MY_CHARSET_HANDLER structure strings/ctype-ujis.c: Adding new function into the MY_CHARSET_HANDLER structure strings/ctype-utf8.c: Adding new function into the MY_CHARSET_HANDLER structure mysql-test/r/round.result: New BitKeeper file ``mysql-test/r/round.result'' mysql-test/t/round.test: New BitKeeper file ``mysql-test/t/round.test''
-
- 17 Jul, 2006 1 commit
-
-
unknown authored
Test case for bug#10977 altered to make it work in both plain and ps-protocol modes. mysql-test/t/select.test: Test case for bug#10977 altered to make it work in both plain and ps-protocol modes. mysql-test/r/select.result: Test case for bug#10977 altered to make it work in both plain and ps-protocol modes.
-
- 15 Jul, 2006 1 commit
-
-
unknown authored
When an alias is set to a column leading spaces are removed from the alias. But when this is done on aliases set by user this can lead to confusion. Now Item::set_name() method issues the warning if leading spaces were removed from an alias set by user. New warning message is added. mysql-test/t/select.test: Added test case for bug#10977:No warning issued if a column name is truncated. mysql-test/r/select.result: Added test case for bug#10977:No warning issued if a column name is truncated. sql/sql_yacc.yy: Fixed bug#10977: No warning issued if a column name is truncated The is_autogenerated_name flag is set before set_name() method call. sql/item.cc: Fixed bug#10977: No warning issued if a column name is truncated Now Item::set_name() method issues the warning if leading spaces were removed from an alias set by user.
-
- 06 Jul, 2006 1 commit
-
-
unknown authored
Adding decimal "digits" in multiplication resulted in signed overflow and producing wrong results. Fixed by using large enough buffers and intermediary result types : dec2 (currently longlong) to hold result of adding decimal "digits" (currently int32). mysql-test/r/select.result: Bug #20569 Garbage in DECIMAL results from some mathematical functions * test suite for the bug mysql-test/t/select.test: Bug #20569 Garbage in DECIMAL results from some mathematical functions * test suite for the bug strings/decimal.c: Bug #20569 Garbage in DECIMAL results from some mathematical functions * fixed the overflow in adding decimal "digits"
-