Commit graph

49382 commits

Author SHA1 Message Date
unknown
53daf2e674 Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into  linux-st28.site:/home/martin/mysql/src/5.1o-bug30596


sql/sql_select.cc:
  Auto merged
2007-08-28 18:17:44 +02:00
unknown
22440b5387 Bug #30596 GROUP BY optimization gives wrong result order
The optimization that uses a unique index to remove GROUP BY did not 
ensure that the index was actually used, thus violating the ORDER BY
that is implied by GROUP BY.
Fixed by replacing GROUP BY with ORDER BY if the GROUP BY clause contains
a unique index over non-nullable field(s). In case GROUP BY ... ORDER BY 
null is used, GROUP BY is simply removed.


mysql-test/include/mix1.inc:
  Bug#30596: Test case for InnoDB
  Here, as opposed to for MyISAM, row lookup is done using index 
  whenever the index covers the group list.
mysql-test/r/distinct.result:
  Bug#30596: Changed test case. 
  Prior to Bug#16458, These queries use temp table and filesort. The
  bug was that they used a temp table. However, that patch removed
  filesort also, in which case we can no longer gurantee correct ordering.
mysql-test/r/group_by.result:
  Bug#30596: Correct result
  The test case for IGNORE INDEX FOR GROUP BY gets degraded performance 
  (unneccesary filesort). This is due to Bug#30665, which will be fixed separately.
mysql-test/r/innodb_mysql.result:
  Bug#30596: Test result
mysql-test/t/group_by.test:
  Bug#30596: Test case
sql/sql_select.cc:
  Bug#30596: The fix: 
  - replace GROUP BY with ORDER BY unless ORDER BY [NULL|<constant>]
  - make sure to use the keys for GROUP BY in this ORDER BY.
2007-08-28 18:01:29 +02:00
unknown
8c31792cae Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B28284-5.1-opt


include/my_pthread.h:
  Auto merged
2007-08-28 12:22:55 +03:00
unknown
e87d47ea30 Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-08-26 19:57:56 +05:00
unknown
46cf1fa104 Merge gleb.loc:/home/uchum/work/bk/5.1
into  gleb.loc:/home/uchum/work/bk/5.1-opt


sql/sql_select.cc:
  Auto merged
2007-08-26 19:49:50 +05:00
unknown
af8598bf4d Merge gleb.loc:/home/uchum/work/bk/5.0
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-08-26 19:47:23 +05:00
unknown
fb3a392f94 Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-08-25 23:30:52 +05:00
unknown
08fdc88215 Merge gleb.loc:/home/uchum/work/bk/5.1
into  gleb.loc:/home/uchum/work/bk/5.1-opt


sql/sql_select.cc:
  Auto merged
2007-08-25 23:28:23 +05:00
unknown
c81d4aacaf Merge gleb.loc:/home/uchum/work/bk/5.0
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-08-25 23:25:37 +05:00
unknown
92c9c80dfe Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt


mysql-test/r/type_bit.result:
  Auto merged
mysql-test/t/type_bit.test:
  Auto merged
sql/sql_select.cc:
  Merge with 5.0-opt.
2007-08-25 22:32:18 +05:00
unknown
5b03876f2e sql_select.cc:
Additional fix for the bug#30245.


sql/sql_select.cc:
  Additional fix for the bug#30245.
2007-08-25 17:32:17 +00:00
unknown
36553dfddc Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-marvel
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-08-25 12:33:23 +03:00
unknown
fe471aeda8 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel


client/mysqldump.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/status.result:
  Auto merged
sql/event_db_repository.cc:
  Auto merged
sql/event_queue.cc:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/ha_partition.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/log_event_old.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.h:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/t/status.test:
  Manual resolve with 5.1.
sql/log_event.cc:
  Manual resolve with 5.1.
sql/sql_yacc.yy:
  Manual resolve with 5.1.
2007-08-25 12:08:18 +03:00
unknown
863a430108 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-marvel
2007-08-25 11:39:56 +03:00
unknown
e19f49ae5e Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/30245-bug-5.0-opt-mysql


sql/sql_select.cc:
  Auto merged
2007-08-24 22:11:23 +00:00
unknown
ba6174cb4f Merge trift2.:/MySQL/M50/push-5.0
into  trift2.:/MySQL/M51/push-5.1


netware/Makefile.am:
  Auto merged
2007-08-24 23:47:31 +02:00
unknown
ac7f0f98d6 Merge trift2.:/MySQL/M50/netware2-5.0
into  trift2.:/MySQL/M50/push-5.0


netware/Makefile.am:
  Auto merged
2007-08-24 23:40:36 +02:00
unknown
35d6bc5551 Merge trift2.:/MySQL/M51/netware2-5.1
into  trift2.:/MySQL/M51/push-5.1


netware/BUILD/compile-netware-END:
  Auto merged
netware/Makefile.am:
  Auto merged
2007-08-24 23:29:19 +02:00
unknown
454063c5a9 Merge trift2.:/MySQL/M50/netware2-5.0
into  trift2.:/MySQL/M51/netware2-5.1


netware/BUILD/compile-netware-END:
  Auto merged
netware/Makefile.am:
  Manual merge.
2007-08-24 23:12:19 +02:00
unknown
4a801dde7e Fixes for the NetWare builds, discovered during 5.1.21-beta and backported to 5.0:
1) Ensure "init_db.sql" and "test_db-sql" really get built.

2) Ensure the "*.def" files with NetWare linker options get distributed to the proper directories.


netware/BUILD/compile-netware-END:
  Ensure the "*.def" files are built for NetWare.
  
  This is a backport of a 5.1 fix which may not be needed in 5.0 but cannot do any harm:
  the general "link_sources" step might fall victim to a cleanup which would be fatal
  just for NetWare, because of problems in the ordering of SUBDIR entries.
netware/Makefile.am:
  1) The scripts "init_db.sql" and "test_db.sql" must be built in the NetWare phase.
  
  2) Use "basename", not sed.
2007-08-24 23:07:59 +02:00
unknown
06d80f1119 Bug #28284: Test "mysqlslap" reports "out of memory"
When locking a "fast" mutex a static variable cpu_count 
was used as a flag to initialize itself on the first usage 
by calling sysconf() and setting non-zero value.
This is not thread and optimization safe on some 
platforms. That's why the global initialization needs 
to be done once in a designated function.
This will also speed up the usage (by a small bit) 
because it won't have to check if it's initialized on
every call.

Fixed by moving the fast mutexes initialization out of 
my_pthread_fastmutex_lock() to fastmutex_global_init()
and call it from my_init()


include/my_pthread.h:
  Bug #28284: move the fast mutexes initialization out of 
  my_pthread_fastmutex_lock() to fastmutex_global_init()
  and call it from my_init()
mysys/my_init.c:
  Bug #28284: move the fast mutexes initialization out of 
  my_pthread_fastmutex_lock() to fastmutex_global_init()
  and call it from my_init()
mysys/thr_mutex.c:
  Bug #28284: move the fast mutexes initialization out of 
  my_pthread_fastmutex_lock() to fastmutex_global_init()
  and call it from my_init()
2007-08-24 18:06:44 +03:00
unknown
e5447e467c Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-marvel
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-08-24 15:26:48 +03:00
unknown
c2d5b26a3c Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel


libmysql/libmysql.c:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/ha_partition.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2007-08-24 15:25:02 +03:00
unknown
aecc3606a9 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-marvel
2007-08-24 14:43:33 +03:00
unknown
2669e39d88 Merge trift2.:/MySQL/M50/push-5.0
into  trift2.:/MySQL/M51/push-5.1
2007-08-24 13:03:22 +02:00
unknown
9c4b35edef Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  trift2.:/MySQL/M51/push-5.1
2007-08-24 12:41:09 +02:00
unknown
b824ff95c9 Merge trift2.:/MySQL/M51/target-5.1.22
into  trift2.:/MySQL/M51/push-5.1


sql/ha_ndbcluster.cc:
  Auto merged
2007-08-24 12:38:26 +02:00
unknown
7d65f9e891 Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.0-build
into  trift2.:/MySQL/M50/push-5.0
2007-08-24 12:34:45 +02:00
unknown
fa91482f61 Merge trift2.:/MySQL/M51/tmp-5.1
into  trift2.:/MySQL/M51/push-5.1


mysql-test/suite/ndb/r/ndb_dd_ddl.result:
  Auto merged
2007-08-24 12:28:47 +02:00
unknown
420c80dd81 Merge trift2.:/MySQL/M50/push-5.0
into  trift2.:/MySQL/M51/push-5.1
2007-08-24 11:09:18 +02:00
unknown
8bcd19a0ae Merge trift2.:/MySQL/pushed/netware-5.1
into  trift2.:/MySQL/M51/push-5.1


netware/Makefile.am:
  Auto merged
2007-08-24 11:02:34 +02:00
unknown
7c3c98e72c Merge trift2.:/MySQL/pushed/netware-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-08-24 10:58:14 +02:00
unknown
c19b9ab71d Merge trift2.:/MySQL/pushed/netware-5.0
into  trift2.:/MySQL/pushed/netware-5.1


netware/Makefile.am:
  Auto merged
2007-08-24 10:50:11 +02:00
unknown
5eccf587d5 NetWare packages were missing the scripts to initialize the database: add them. 2007-08-24 10:47:13 +02:00
unknown
82e0bd23e9 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build
2007-08-24 10:14:08 +02:00
unknown
3fa6127979 Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build


libmysql/libmysql.c:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/ha_partition.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2007-08-24 10:13:03 +02:00
unknown
5b59f374da Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-08-24 09:55:47 +02:00
unknown
0aefd73b3d Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/28430/my51-28430
2007-08-24 07:51:58 +05:00
unknown
9723a9365e Merge bk-internal.mysql.com:/data0/bk/mysql-5.0-opt
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-opt


mysql-test/r/query_cache.result:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
2007-08-23 23:27:30 +02:00
unknown
30f5bb9ec8 Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/users/gshchepa/mysql-5.1-opt


sql/item.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
2007-08-23 21:38:24 +02:00
unknown
294a43ec5e Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/users/gshchepa/mysql-5.0-opt


sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
2007-08-23 21:28:33 +02:00
unknown
f0d1ac25c3 Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format.
In the ha_partition::position() we didn't calculate the number
of the partition of the record. We used m_last_part value instead,
relying on that it is set in other place like previous call of a method
like ::write_row(). In replication we don't call any of these befor
position(). Delete_rows_log_event::do_exec_row calls find_and_fetch_row.
In case of InnoDB-based PARTITION table, we have HA_PRIMARY_KEY_REQUIRED_FOR_POSITION
enabled, so use position() / rnd_pos() calls to fetch the record.

Fixed by adding partition_id calculation to the ha_partition::position()


sql/ha_partition.h:
   Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format.
  column_bitmaps_signal interface added
sql/ha_partition.cc:
  Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format.
  Calculate the number of the partition in ha_partition::position().
  ha_partition::column_bitmaps_signal() implemented
mysql-test/r/partition_pruning.result:
  Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format.
  test result fixed
2007-08-23 23:34:48 +05:00
unknown
aa52d6d703 Merge trift2.:/MySQL/M50/push-5.0
into  trift2.:/MySQL/M51/push-5.1
2007-08-23 19:58:42 +02:00
unknown
48f72746f6 Merge trift2.:/MySQL/M50/netware-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-08-23 19:47:42 +02:00
unknown
82b2ad46ce Merge trift2.:/MySQL/M51/netware-5.1
into  trift2.:/MySQL/M51/push-5.1


netware/Makefile.am:
  Auto merged
2007-08-23 19:43:21 +02:00
unknown
189af51528 Merge trift2.:/MySQL/M50/netware-5.0
into  trift2.:/MySQL/M51/netware-5.1


BitKeeper/deleted/.del-isamchk.def:
  Auto merged
BitKeeper/deleted/.del-isamlog.def:
  Auto merged
BitKeeper/deleted/.del-pack_isam.def:
  Auto merged
netware/Makefile.am:
  Auto merged
2007-08-23 18:46:07 +02:00
unknown
42bd0a4a6f Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-target-5.1.22
2007-08-23 16:25:35 +02:00
unknown
43ab87e0d3 Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt


sql/sql_select.cc:
  Auto merged
2007-08-23 19:24:18 +05:00
unknown
9e72aacf10 BUG#30017 log-slave-updates incorrect behavior for cluster
- let the receiving injector thread decide what to do
(recommit for 5.1.22 target)


sql/ha_ndbcluster.cc:
  BUG#30017 log-slave-updates incorrect behavior for cluster
  - let the receiving injector thread decide what to do
sql/ha_ndbcluster_binlog.cc:
  BUG#30017 log-slave-updates incorrect behavior for cluster
  - let the receiving injector thread decide what to do
2007-08-23 16:13:21 +02:00
unknown
a59096c554 Merge jmiller@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22
into  mysql.com:/data1/mysql-5.1-target-5.1.22
2007-08-23 15:33:05 +02:00