over two views when using syntax with curly braces.
Each outer join operation must be placed in a separate
nest. This was not done when the syntax with curly braces
was used. In some cases, in particular, for queries with outer
join operation over views it could cause a crash.
mysql-test/r/join_outer.result:
Added a test case for bug #19396.
mysql-test/t/join_outer.test:
Added a test case for bug #19396.
itself when executing queries referring to a view with GROUP BY
an expression containing non-constant interval.
It happened because Item_date_add_interval::eq neglected the
fact that the method can be applied to an expression of the form
date(col) + interval time_to_sec(col) second
at the time when col could not be evaluated yet.
An attempt to evaluate time_to_sec(col) in this method resulted
in a crash.
mysql-test/r/view.result:
Added a test case for bug #19490.
mysql-test/t/view.test:
Added a test case for bug #19490.
sql/item_timefunc.cc:
Fixed bug #19490. The bug that caused server crash manifested
itself when executing queries referring to a view with GROUP BY
an expression containing non-constant interval.
It happened because Item_date_add_interval::eq neglected the
fact that the method can be applied to an expression of the form
date(col) + interval time_to_sec(col) second
at the time when col could not be evaluated yet.
An attempt to evaluate time_to_sec(col) in this method resulted
in a crash.
The code of Item_date_add_interval::eq was corrected.
Change mode to -rw-rw-r--
include/decimal.h:
Change mode to -rw-rw-r--
mysql-test/r/archive_gis.result:
Change mode to -rw-rw-r--
mysql-test/r/bdb_gis.result:
Change mode to -rw-rw-r--
mysql-test/r/binlog.result:
Change mode to -rw-rw-r--
mysql-test/r/compress.result:
Change mode to -rw-rw-r--
mysql-test/r/federated_archive.result:
Change mode to -rw-rw-r--
mysql-test/r/federated_bug_13118.result:
Change mode to -rw-rw-r--
mysql-test/r/im_daemon_life_cycle.result:
Change mode to -rw-rw-r--
mysql-test/r/im_life_cycle.result:
Change mode to -rw-rw-r--
mysql-test/r/im_options_set.result:
Change mode to -rw-rw-r--
mysql-test/r/im_options_unset.result:
Change mode to -rw-rw-r--
mysql-test/r/im_utils.result:
Change mode to -rw-rw-r--
mysql-test/r/innodb-big.result:
Change mode to -rw-rw-r--
mysql-test/r/innodb_gis.result:
Change mode to -rw-rw-r--
mysql-test/r/innodb_notembedded.result:
Change mode to -rw-rw-r--
mysql-test/r/mysql.result:
Change mode to -rw-rw-r--
mysql-test/r/mysqldump-max.result:
Change mode to -rw-rw-r--
mysql-test/r/ndb_bitfield.result:
Change mode to -rw-rw-r--
mysql-test/r/ndb_condition_pushdown.result:
Change mode to -rw-rw-r--
mysql-test/r/ndb_gis.result:
Change mode to -rw-rw-r--
mysql-test/r/rpl_ignore_revoke.result:
Change mode to -rw-rw-r--
mysql-test/r/rpl_trigger.result:
Change mode to -rw-rw-r--
mysql-test/r/rpl_view.result:
Change mode to -rw-rw-r--
mysql-test/r/sp-code.result:
Change mode to -rw-rw-r--
mysql-test/r/sp-destruct.result:
Change mode to -rw-rw-r--
mysql-test/r/sp-dynamic.result:
Change mode to -rw-rw-r--
mysql-test/r/sp-vars.result:
Change mode to -rw-rw-r--
mysql-test/r/sp_trans.result:
Change mode to -rw-rw-r--
mysql-test/r/sum_distinct-big.result:
Change mode to -rw-rw-r--
mysql-test/r/trigger-compat.result:
Change mode to -rw-rw-r--
mysql-test/r/trigger-grant.result:
Change mode to -rw-rw-r--
mysql-test/r/trigger-trans.result:
Change mode to -rw-rw-r--
mysql-test/r/type_bit_innodb.result:
Change mode to -rw-rw-r--
mysql-test/r/type_newdecimal.result:
Change mode to -rw-rw-r--
mysql-test/r/user_limits.result:
Change mode to -rw-rw-r--
mysql-test/r/view_grant.result:
Change mode to -rw-rw-r--
mysql-test/r/view_query_cache.result:
Change mode to -rw-rw-r--
mysql-test/r/xa.result:
Change mode to -rw-rw-r--
mysql-test/std_data/bug16266.000001:
Change mode to -rw-rw-r--
mysql-test/std_data/vchar.frm:
Change mode to -rw-rw-r--
mysql-test/t/binlog-master.opt:
Change mode to -rw-rw-r--
mysql-test/t/binlog.test:
Change mode to -rw-rw-r--
mysql-test/t/flush_read_lock_kill-master.opt:
Change mode to -rw-rw-r--
mysql-test/t/flush_read_lock_kill.test:
Change mode to -rw-rw-r--
mysql-test/t/sp_trans.test:
Change mode to -rw-rw-r--
mysql-test/t/xa.test:
Change mode to -rw-rw-r--
mysys/my_mmap.c:
Change mode to -rw-rw-r--
sql/sql_array.h:
Change mode to -rw-rw-r--
strings/decimal.c:
Change mode to -rw-rw-r--
configure.in:
Auto merged
mysql-test/include/rpl_stmt_seq.inc:
Auto merged
mysql-test/r/blackhole.result:
Auto merged
mysql-test/r/ctype_cp932_binlog.result:
Auto merged
mysql-test/r/fulltext2.result:
Auto merged
mysql-test/r/ctype_ucs_binlog.result:
Auto merged
mysql-test/r/grant2.result:
Auto merged
mysql-test/r/innodb_handler.result:
Auto merged
mysql-test/r/insert_update.result:
Auto merged
mysql-test/r/ndb_update.result:
Auto merged
mysql-test/r/not_embedded_server.result:
Auto merged
mysql-test/r/repair.result:
Auto merged
mysql-test/r/query_cache_notembedded.result:
Auto merged
mysql-test/r/rpl_create_database.result:
Auto merged
mysql-test/r/rpl_multi_update3.result:
Auto merged
mysql-test/r/rpl_slave_status.result:
Auto merged
mysql-test/r/timezone_grant.result:
Auto merged
mysql-test/t/create_select_tmp.test:
Auto merged
mysql-test/t/gis-rtree.test:
Auto merged
mysql-test/t/grant2.test:
Auto merged
mysql-test/t/handler.test:
Auto merged
mysql-test/t/insert_update.test:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
mysql-test/t/repair.test:
Auto merged
mysql-test/t/rpl_ddl.test:
Auto merged
mysql-test/t/rpl_multi_query.test:
Auto merged
mysql-test/t/rpl_rewrite_db.test:
Auto merged
sql/sql_bitmap.h:
Auto merged
sql/sql_handler.cc:
Auto merged
zlib/Makefile.am:
Auto merged
mysql-test/std_data/trunc_binlog.000001:
SCCS merged
BitKeeper/deleted/.del-master-bin.001~8917149781db8413:
Auto merged
myisammrg/myrg_range.c:
Auto merged
mysql-test/r/innodb_handler.result:
Auto merged
mysql-test/r/repair.result:
Auto merged
mysql-test/std_data/trunc_binlog.000001:
Auto merged
mysql-test/t/bulk_replace.test:
Auto merged
mysql-test/t/create_select_tmp.test:
Auto merged
mysql-test/t/ctype_tis620.test:
Auto merged
mysql-test/t/handler.test:
Auto merged
mysql-test/t/innodb_handler.test:
Auto merged
mysql-test/t/repair.test:
Auto merged
mysql-test/t/rpl_commit_after_flush.test:
Auto merged
mysql-test/t/rpl_free_items.test:
Auto merged
sql/sql_handler.cc:
Auto merged
Change mode to -rw-rw-r--
dbug_add_tags.pl:
Change mode to -rwxrwxr--
dbug/dbug_add_tags.pl:
Change mode to -rwxrwxr--
myisammrg/myrg_range.c:
Change mode to -rw-rw-r--
mysql-test/r/innodb_handler.result:
Change mode to -rw-rw-r--
mysql-test/r/repair.result:
Change mode to -rw-rw-r--
mysql-test/std_data/master-bin.001:
Change mode to -rw-rw-r--
mysql-test/std_data/trunc_binlog.001:
Change mode to -rw-rw-r--
mysql-test/t/bulk_replace.test:
Change mode to -rw-rw-r--
mysql-test/t/create_select_tmp.test:
Change mode to -rw-rw-r--
mysql-test/t/ctype_tis620.test:
Change mode to -rw-rw-r--
mysql-test/t/handler.test:
Change mode to -rw-rw-r--
mysql-test/t/innodb_handler.test:
Change mode to -rw-rw-r--
mysql-test/t/mix_innodb_myisam_binlog-master.opt:
Change mode to -rw-rw-r--
mysql-test/t/repair.test:
Change mode to -rw-rw-r--
mysql-test/t/rpl_commit_after_flush.test:
Change mode to -rw-rw-r--
mysql-test/t/rpl_free_items-slave.opt:
Change mode to -rw-rw-r--
mysql-test/t/rpl_free_items.test:
Change mode to -rw-rw-r--
scripts/mysql_secure_installation.sh:
Change mode to -rw-rw-r--
sql/sql_handler.cc:
Change mode to -rw-rw-r--
support-files/mysql-multi.server.sh:
Change mode to -rw-rw-r--
replaced get_field(MEM_ROOT *mem, Field *field) with
get_field(MEM_ROOT *mem, Field *field, String *res).
It allows to avoid strlen().
mysql-test/r/information_schema.result:
Fix for bug#18177 any access to INFORMATION_SCHEMA.ROUTINES crashes
test case
mysql-test/t/information_schema.test:
Fix for bug#18177 any access to INFORMATION_SCHEMA.ROUTINES crashes
test case
mysql-test/r/information_schema.result:
Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
test case
mysql-test/r/join.result:
Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
result fix
mysql-test/t/information_schema.test:
Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
test case
into mysql.com:/home/mysql-5.0-10418
mysql-test/t/outfile.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
mysql-test/r/func_str.result:
expect NULL rather than error if file given to load_file() doesn't exist
mysql-test/r/outfile.result:
expect NULL rather than error if file given to load_file() doesn't exist
mysql-test/t/func_str.test:
show that load_file() will return NULL rather than throw an error
if file doesn't exist
- Don't kill the active connection to the server, instead read
the connection id, switch connection and kill the first one from there.
mysql-test/r/rpl_temporary.result:
Update test result
mysql-test/t/rpl_temporary.test:
Don't kill our own connection to the server as the result code differs depending
on platform.
a worse execution plan than in 4.1 for some queries.
It happened due the fact that at some conditions the
optimizer always preferred range or full index scan access
methods to lookup access methods even when the latter were much
cheaper.
The problem was not observed in 4.1 for the reported query
because the WHERE condition was not of a form that could
cause the problem.
Equality propagation introduced on 5.0 added an extra
predicate and changed the WHERE condition. The new condition
provoked the optimizer to make a bad choice.
The problem was fixed by the patch for bug 17379.
mysql-test/r/select.result:
Added a test case for bug #18940.
The problem was fixed by the patch for bug 17379.
mysql-test/t/select.test:
Added a test case for bug #18940.
The problem was fixed by the patch for bug 17379.
When a view statement is compiled on CREATE VIEW time, most of the
optimizations should not be done. Finding the right optimization
for a subquery is one of them.
Unfortunately the optimizer is resolving the column references of
the left expression of IN subqueries in the process of deciding
witch optimization to use (if needed). So there should be a
special case in Item_in_subselect::fix_fields() : check the
validity of the left expression of IN subqueries in CREATE VIEW
mode and then proceed as normal.
mysql-test/r/subselect.result:
test case
mysql-test/r/view.result:
chnaged explain due to column being resolved
mysql-test/t/subselect.test:
test case
sql/item_subselect.cc:
overloaded fix_fields to fix the left_expr in prepare_view_mode
sql/item_subselect.h:
fix_fields overloaded so it can prepare left_expr
Re-work best_access_path() and find_best() to reuse E(#rows(range access)) as
E(#rows(ref[_or_null](const) access) only when it is appropriate.
[This is the final cumulative patch]
mysql-test/r/select.result:
BUG#17379: Testcase
mysql-test/r/subselect.result:
BUG#17379: Updated test results
mysql-test/t/select.test:
BUG#17379: Testcase
sql/opt_range.cc:
BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
Make range optimizer together with TABLE::quick_* also return TABLE::quick_n_ranges
sql/sql_select.cc:
BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
Re-work best_access_path() to reuse E(#rows(range access)) as
E(#rows(ref[_or_null](const) access) only when it is appropriate.
sql/table.h:
BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
Make range optimizer together with TABLE::quick_* also return TABLE::quick_n_ranges
into mysql.com:/usr/home/ram/work/mysql-5.0
sql/item_timefunc.cc:
Auto merged
mysql-test/r/func_time.result:
merging
mysql-test/t/func_time.test:
merging
Correct a bug (that I introduced, after using Oracle's database software for
too many years) where the length of the database-sent data is incorrectly
used to infer NULLness.
client/mysql.cc:
No longer use the length of the data to infer whether it is NULL or not.
mysql-test/r/mysql.result:
Add result and version marker, and correct previous result.
mysql-test/t/mysql.test:
Add test and version marker
"alter table from MyISAM to MERGE lost data without errors and warnings"
Add new handlerton flag which prevent user from altering table storage
engine to storage engines which would lose data. Both 'blackhole' and
'merge' are marked with the new flag.
Tests included.
mysql-test/r/blackhole.result:
test for bug#10952
mysql-test/r/merge.result:
test for bug#10952
mysql-test/t/blackhole.test:
test for bug#10952
mysql-test/t/merge.test:
test for bug#10952
sql/ha_blackhole.cc:
Bug#10952
shouldn't be able to alter a table into a blackhole
sql/ha_myisammrg.cc:
Bug#10952
shouldn't be able to alter a table into a merge
sql/handler.h:
Bug#10952
new handlerton flag
sql/sql_table.cc:
Bug#10952
If alter is changing engine, check if new engine allows creating table
via ALTER statement.
When converting DISTINCT to GROUP BY where the columns are from the covering
index and they are quoted twice in the SELECT list the optimizer is creating
improper processing sequence. This is because of the fact that the columns
of the covering index are not recognized as such and treated as non-index
columns.
Generally speaking duplicate columns can safely be removed from the GROUP
BY/DISTINCT list because this will not add or remove new rows in the
resulting set. Duplicates can be removed even if they are not consecutive
(as is the case for ORDER BY, where the duplicate columns can be removed
only if they are consecutive).
So we can safely transform "SELECT DISTINCT a,a FROM ... ORDER BY a" to
"SELECT a,a FROM ... GROUP BY a ORDER BY a" instead of
"SELECT a,a FROM .. GROUP BY a,a ORDER BY a". We can even transform
"SELECT DISTINCT a,b,a FROM ... ORDER BY a,b" to
"SELECT a,b,a FROM ... GROUP BY a,b ORDER BY a,b".
The fix to this bug consists of checking for duplicate columns in the SELECT
list when constructing the GROUP BY list in transforming DISTINCT to GROUP
BY and skipping the ones that are already in.
mysql-test/r/distinct.result:
test case for the bug without loose index scan
mysql-test/r/group_min_max.result:
test case for the bug
mysql-test/t/distinct.test:
test case for the bug without loose index scan
mysql-test/t/group_min_max.test:
test case for the bug
sql/sql_select.cc:
duplicates check and removal