Commit graph

30216 commits

Author SHA1 Message Date
unknown
5b593939ee Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2
2006-05-13 12:02:47 -07:00
unknown
fbafa42bf3 Fixed bug #19396: a crash for a an outer join operation
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.
2006-05-13 11:56:05 -07:00
unknown
fe3ac3007a Bug#17048 CREATE TABLE ... SELECT truncate values
remove initialization of unsigned_flag for Item_decimal


mysql-test/r/case.result:
  Bug#17048 CREATE TABLE ... SELECT truncate values
  result fix
mysql-test/r/metadata.result:
  Bug#17048 CREATE TABLE ... SELECT truncate values
  result fix
mysql-test/r/ps_2myisam.result:
  Bug#17048 CREATE TABLE ... SELECT truncate values
  result fix
mysql-test/r/ps_3innodb.result:
  Bug#17048 CREATE TABLE ... SELECT truncate values
  result fix
mysql-test/r/ps_4heap.result:
  Bug#17048 CREATE TABLE ... SELECT truncate values
  result fix
mysql-test/r/ps_5merge.result:
  Bug#17048 CREATE TABLE ... SELECT truncate values
  result fix
mysql-test/r/ps_6bdb.result:
  Bug#17048 CREATE TABLE ... SELECT truncate values
  result fix
mysql-test/r/ps_7ndb.result:
  Bug#17048 CREATE TABLE ... SELECT truncate values
  result fix
mysql-test/r/type_float.result:
  Bug#17048 CREATE TABLE ... SELECT truncate values
  result fix
mysql-test/r/type_newdecimal.result:
  Bug#17048 CREATE TABLE ... SELECT truncate values
  result fix
2006-05-13 13:13:05 +05:00
unknown
e7f87bd0b7 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2
2006-05-12 18:29:49 -07:00
unknown
7bb4f77828 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.


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.
2006-05-12 18:24:38 -07:00
unknown
b572680177 Many files:
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--
2006-05-12 19:00:11 +02:00
unknown
ed91760047 Merge
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
2006-05-12 18:53:48 +02:00
unknown
db2556fdbe Many files:
Change mode to -rw-rw-r--
Ereport.pl, Ecreate.pl, Ecompare.pl:
  Change mode to -rwxrwxr--


bdb/dist/s_dir:
  Change mode to -rw-rw-r--
myisam/ftbench/Ecompare.pl:
  Change mode to -rwxrwxr--
myisam/ftbench/Ecreate.pl:
  Change mode to -rwxrwxr--
myisam/ftbench/Ereport.pl:
  Change mode to -rwxrwxr--
myisam/ftbench/README:
  Change mode to -rw-rw-r--
myisammrg/myrg_rnext_same.c:
  Change mode to -rw-rw-r--
mysql-test/include/rpl_stmt_seq.inc:
  Change mode to -rw-rw-r--
mysql-test/misc/kill_master.sh:
  Change mode to -rw-rw-r--
mysql-test/r/blackhole.result:
  Change mode to -rw-rw-r--
mysql-test/r/ctype_cp1250_ch.result:
  Change mode to -rw-rw-r--
mysql-test/r/ctype_cp932_binlog.result:
  Change mode to -rw-rw-r--
mysql-test/r/ctype_euckr.result:
  Change mode to -rw-rw-r--
mysql-test/r/ctype_gb2312.result:
  Change mode to -rw-rw-r--
mysql-test/r/ctype_ucs_binlog.result:
  Change mode to -rw-rw-r--
mysql-test/r/fulltext2.result:
  Change mode to -rw-rw-r--
mysql-test/r/func_des_encrypt.result:
  Change mode to -rw-rw-r--
mysql-test/r/grant2.result:
  Change mode to -rw-rw-r--
mysql-test/r/insert_update.result:
  Change mode to -rw-rw-r--
mysql-test/r/ndb_database.result:
  Change mode to -rw-rw-r--
mysql-test/r/ndb_update.result:
  Change mode to -rw-rw-r--
mysql-test/r/not_embedded_server.result:
  Change mode to -rw-rw-r--
mysql-test/r/query_cache_notembedded.result:
  Change mode to -rw-rw-r--
mysql-test/r/rpl_create_database.result:
  Change mode to -rw-rw-r--
mysql-test/r/rpl_drop_db.result:
  Change mode to -rw-rw-r--
mysql-test/r/rpl_dual_pos_advance.result:
  Change mode to -rw-rw-r--
mysql-test/r/rpl_insert_select.result:
  Change mode to -rw-rw-r--
mysql-test/r/rpl_multi_update3.result:
  Change mode to -rw-rw-r--
mysql-test/r/rpl_multi_update4.result:
  Change mode to -rw-rw-r--
mysql-test/r/rpl_slave_status.result:
  Change mode to -rw-rw-r--
mysql-test/r/rpl_trunc_temp.result:
  Change mode to -rw-rw-r--
mysql-test/r/timezone_grant.result:
  Change mode to -rw-rw-r--
mysql-test/std_data/master-bin.000001:
  Change mode to -rw-rw-r--
mysql-test/t/ctype_latin1.test:
  Change mode to -rw-rw-r--
mysql-test/t/fulltext2.test:
  Change mode to -rw-rw-r--
mysql-test/t/gis-rtree.test:
  Change mode to -rw-rw-r--
mysql-test/t/grant2.test:
  Change mode to -rw-rw-r--
mysql-test/t/insert_update.test:
  Change mode to -rw-rw-r--
mysql-test/t/mysqltest.test:
  Change mode to -rw-rw-r--
mysql-test/t/rpl_ddl.test:
  Change mode to -rw-rw-r--
mysql-test/t/rpl_insert_ignore.test:
  Change mode to -rw-rw-r--
mysql-test/t/rpl_multi_query.test:
  Change mode to -rw-rw-r--
mysql-test/t/rpl_rewrite_db-slave.opt:
  Change mode to -rw-rw-r--
mysql-test/t/rpl_rewrite_db.test:
  Change mode to -rw-rw-r--
mysql-test/t/subselect2.test:
  Change mode to -rw-rw-r--
mysql-test/t/union-master.opt:
  Change mode to -rw-rw-r--
mysys/mf_tempdir.c:
  Change mode to -rw-rw-r--
mysys/my_crc32.c:
  Change mode to -rw-rw-r--
mysys/my_gethwaddr.c:
  Change mode to -rw-rw-r--
mysys/my_getsystime.c:
  Change mode to -rw-rw-r--
scripts/mysql_prepare_privilege_tables_for_5.sql:
  Change mode to -rw-rw-r--
sql/sql_bitmap.h:
  Change mode to -rw-rw-r--
zlib/Makefile.am:
  Change mode to -rw-rw-r--
2006-05-12 18:28:48 +02:00
unknown
3f1a945d25 Merge
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
2006-05-12 18:19:36 +02:00
unknown
fa9b0268ab Many files:
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--
2006-05-12 17:51:37 +02:00
unknown
63f71b5b6e Merge mysql.com:/home/kgeorge/mysql/5.0/clean
into  mysql.com:/home/kgeorge/mysql/5.0/B7549


mysql-test/r/subselect.result:
  Auto merged
2006-05-12 17:04:04 +03:00
unknown
9ffa09be96 Fix for bug#18177 any access to INFORMATION_SCHEMA.ROUTINES crashes
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
2006-05-12 17:34:36 +05:00
unknown
7c5b743843 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Merge/5.0
2006-05-12 15:53:50 +05:00
unknown
81878d7ab6 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Merge/5.0
2006-05-12 15:48:41 +05:00
unknown
97b4446aca Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-05-12 12:44:31 +02:00
unknown
e52288b5bf merge fixies BUG#10418 4.1 -> 5.0 2006-05-12 12:31:22 +02:00
unknown
a1a0efd307 Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-05-12 12:25:24 +02:00
unknown
5697820b84 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-05-12 12:24:06 +02:00
unknown
c351651319 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Merge/5.0
2006-05-12 15:10:23 +05:00
unknown
af797c16fe Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
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
2006-05-12 15:09:25 +05:00
unknown
f7d265a99c Correct spelling errors 2006-05-12 11:00:34 +02:00
unknown
98912fb95c Merge mysql.com:/home/mysql-4.1-10418
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
2006-05-12 10:27:20 +02:00
unknown
42c47bcbbc Merge neptunus.(none):/home/msvensson/mysql/my50-bug19709
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-05-12 09:55:31 +02:00
unknown
acf1879938 Bug#19709 rpl_tmporary fails on powermacg5
- 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.
2006-05-12 09:13:37 +02:00
unknown
5c6d923f30 Added a test case for bug #18940:in 5.0 the optimizer chose
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.
2006-05-11 19:47:00 -07:00
unknown
c982af51da configure.in:
Stepped up to 4.0.28


configure.in:
  Stepped up to 4.0.28
2006-05-11 19:48:57 +02:00
unknown
60bb69aa04 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.(none):/home/cmiller/work/mysql/mysql-5.0-maint


client/mysql.cc:
  Auto merged
2006-05-11 09:14:09 -04:00
unknown
aeaaa45626 BUG#7549: Missing error message for invalid view selection with subquery.
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
2006-05-11 15:30:54 +03:00
unknown
ec83dd7c61 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/mysql-4.1-10418
2006-05-11 12:48:49 +02:00
unknown
e42692c0a9 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/mysql-5.0-19263
2006-05-11 01:18:15 +02:00
unknown
0720c110ce Merge 2006-05-10 22:15:08 +02:00
unknown
bc1815aa3d mysql.spec.sh:
Compile in all character sets in Max (bug#14918)


support-files/mysql.spec.sh:
  Compile in all character sets in Max (bug#14918)
2006-05-10 21:53:01 +02:00
unknown
8db63fd52f Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  production.mysql.com:/usersnfs/rkalimullin/mysql-5.0
2006-05-10 18:52:31 +02:00
unknown
a8693be9d9 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  production.mysql.com:/usersnfs/rkalimullin/mysql-5.0
2006-05-10 17:09:15 +02:00
unknown
b02a34f2bf Merge cmiller@bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.(none):/home/cmiller/mysql-5.0__bug19564
2006-05-10 10:47:01 -04:00
unknown
3fa6432b09 BUG#17379 Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
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
2006-05-10 17:40:20 +04:00
unknown
af4d487a96 Merge mysql.com:/usr/home/ram/work/mysql-4.1
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
2006-05-10 18:27:42 +05:00
unknown
fe578d38a1 Merge cmiller@bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.(none):/home/cmiller/mysql-5.0__bug19564
2006-05-10 09:03:42 -04:00
unknown
3f73225669 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b18501


sql/item_timefunc.cc:
  Auto merged
2006-05-10 13:27:48 +05:00
unknown
588082712a Merge mysql.com:/home/kgeorge/mysql/5.0/clean
into  mysql.com:/home/kgeorge/mysql/5.0/B18068


sql/sql_select.cc:
  Auto merged
2006-05-10 09:38:40 +03:00
unknown
2e72ae3d81 Bug#19564: mysql displays NULL instead of space
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
2006-05-09 22:35:51 -04:00
unknown
481493a6fc Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/psergey/mysql-5.0-best_access_path_j-push
2006-05-10 06:35:50 +04:00
unknown
2ba465f4c5 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/psergey/mysql-5.0-best_access_path_j-push


sql/sql_select.cc:
  Auto merged
2006-05-10 04:14:09 +04:00
unknown
dac69dd4a2 Merge xiphis.org:/home/antony/work2/p1-bug10952.1
into  xiphis.org:/home/antony/work2/mysql-5.0-engines-merge
2006-05-09 15:12:32 -07:00
unknown
f61748b796 Merge acurtis@bk-internal:/home/bk/mysql-5.0-engines
into  xiphis.org:/home/antony/work2/p1-bug10952.1


sql/handler.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
2006-05-09 13:34:31 -07:00
unknown
6116d0176b bug#10952
"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.
2006-05-09 13:31:46 -07:00
unknown
baae7a97d9 BUG#18068: SELECT DISTINCT (with duplicates and covering index)
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
2006-05-09 18:13:01 +03:00
unknown
3923cfd98a Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-05-09 13:27:57 +02:00
unknown
2d54e69270 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-05-09 13:26:30 +02:00
unknown
d6c2616c3f Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/marty/MySQL/mysql-5.0
2006-05-09 12:36:38 +02:00