Commit graph

53946 commits

Author SHA1 Message Date
unknown
b4b72fb306 Fix for bug #34928: Confusion by having Primary Key and Index
The bug is a regression introduced in 5.1 by the patch for bug28404.

Under some circumstances test_if_skip_sort_order() could leave some
data structures in an inconsistent state so that some parts of code
could assume the selected execution strategy for GROUP BY/DISTINCT as
a loose index scan (e.g. JOIN_TAB::is_using_loose_index_scan()), while
the actual strategy chosen was an ordered index scan, which led to
wrong data being returned.

Fixed test_if_skip_sort_order() so that when changing the type for a
join table, select->quick is reset not only for EXPLAIN, but for the 
actual join execution as well, to not confuse code that depends on its
value to determine the chosen GROUP BY/DISTINCT strategy.


mysql-test/r/distinct.result:
  Added a test case for bug #34928.
mysql-test/t/distinct.test:
  Added a test case for bug #34928.
sql/sql_select.cc:
  When changing the table's join type to JT_NEXT in 
  test_if_skip_sort_order(), also reset select->quick because other
  code may depend on its value to determine the GROUP BY/DISTINCT
  execution strategy.
2008-03-26 19:37:36 +03:00
unknown
0fe833f468 Merge stella.local:/home2/mydev/mysql-5.0-axmrg
into  stella.local:/home2/mydev/mysql-5.1-axmrg
2008-03-26 17:37:04 +01:00
unknown
98b7766053 Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg


mysql-test/t/query_cache.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
mysql-test/r/query_cache.result:
  SCCS merged
2008-03-26 17:36:12 +01:00
unknown
4eaa7303fc Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2008-03-26 16:48:46 +01:00
unknown
10d9d68d7c Post-merge fix 2008-03-26 16:22:10 +01:00
unknown
6d2976c044 Merge mail.hezx.com:/media/sda3/work/mysql/bkroot/mysql-5.1-new-rpl
into  mail.hezx.com:/media/sda3/work/mysql/bkwork/b33029_5.0_to_5.1_fails_on_dup_key/5.1


sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2008-03-26 21:40:44 +08:00
unknown
a5ac54566c Merge mail.hezx.com:/media/sda3/work/mysql/bkroot/mysql-5.0-rpl
into  mail.hezx.com:/media/sda3/work/mysql/bkwork/b33029_5.0_to_5.1_fails_on_dup_key/5.0
2008-03-26 21:37:34 +08:00
unknown
3a5a7ef44c 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


mysql-test/lib/mtr_report.pl:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2008-03-26 12:32:27 +02:00
unknown
27c0540bd8 Dummy change to force PushBuild. 2008-03-26 13:15:03 +03:00
unknown
c49632cf96 Dummy change to force PushBuild. 2008-03-26 13:14:30 +03:00
unknown
cebc10e3c0 Merge stella.local:/home2/mydev/mysql-5.1-ateam
into  stella.local:/home2/mydev/mysql-5.1-axmrg


mysql-test/r/federated.result:
  Auto merged
mysql-test/t/federated.test:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
storage/federated/ha_federated.cc:
  Auto merged
mysql-test/suite/binlog/r/binlog_unsafe.result:
  Manual merge
mysql-test/suite/binlog/t/binlog_unsafe.test:
  Manual merge
2008-03-26 10:56:03 +01:00
unknown
f77bca6940 Merge stella.local:/home2/mydev/mysql-5.0-axmrg
into  stella.local:/home2/mydev/mysql-5.1-axmrg


mysql-test/r/ctype_big5.result:
  Auto merged
mysql-test/r/ctype_euckr.result:
  Auto merged
mysql-test/r/ctype_gb2312.result:
  Auto merged
mysql-test/r/ctype_gbk.result:
  Auto merged
mysql-test/r/ctype_uca.result:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
sql/slave.cc:
  Auto merged
mysql-test/r/federated.result:
  Manual merge from 5.0
mysql-test/t/federated.test:
  Manual merge from 5.0
storage/federated/ha_federated.cc:
  Manual merge from 5.0
2008-03-26 10:51:16 +01:00
unknown
03c110ea21 Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg


mysql-test/r/ctype_big5.result:
  Auto merged
mysql-test/r/ctype_euckr.result:
  Auto merged
mysql-test/r/ctype_gb2312.result:
  Auto merged
mysql-test/r/ctype_gbk.result:
  Auto merged
mysql-test/r/ctype_uca.result:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result:
  Auto merged
mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/rpl_rli.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/lib/mtr_report.pl:
  SCCS merged
2008-03-26 10:27:00 +01:00
unknown
7587a8710d Merge stella.local:/home2/mydev/mysql-5.0-ateam
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2008-03-26 09:34:37 +01:00
unknown
0d6f9bad70 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg


mysql-test/r/ctype_big5.result:
  Auto merged
mysql-test/r/ctype_cp932.result:
  Auto merged
mysql-test/r/ctype_euckr.result:
  Auto merged
mysql-test/r/ctype_gb2312.result:
  Auto merged
mysql-test/r/ctype_gbk.result:
  Auto merged
mysql-test/r/ctype_uca.result:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
sql/slave.cc:
  Auto merged
2008-03-26 09:33:55 +01:00
unknown
3ca4bb96a4 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-8759
2008-03-25 17:49:47 -06:00
unknown
a1d5a59c2a Manual merge
mysql-test/r/sp-code.result:
  manual merge, adjust test results
2008-03-25 17:48:05 -06:00
unknown
ce047d4b8d Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-opt
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-opt-merge


mysql-test/r/sp-code.result:
  Auto merged
mysql-test/t/sp-code.test:
  Auto merged
2008-03-25 17:35:34 -06:00
unknown
a1de91e708 Bug#35559 - plugin_load.test creates warnings
plugin_load.test created lines in the warnings files and made
pushbuild cells yellow. Some pushbuild systems are configured
so that they don't build the ha_example plugin. Trying to load
them creates error messages in the error log. These were copied
to the warnings file.

Fixed by ignoring expected error messages for non-existent
ha_example.


mysql-test/lib/mtr_report.pl:
  Bug#35559 - plugin_load.test creates warnings
  Ignore expected error messages for non-existent ha_example.
2008-03-25 21:30:45 +01:00
unknown
ca57d04083 Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1
into  quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
2008-03-25 23:09:05 +03:00
unknown
c3641cd513 Bug#35272: @@global.key_buffer_size = 4294967295 let the server crash
When trying to get the requested amount of memory for the keybuffer,
the out of memory could be signaled if one of the tentative allocations
fail. Later the server would crash (debug assert) when trying to send
a ok packet with a error set.

The solution is only to signal the error if all tentative allocations
for the keybuffer fail.


mysql-test/r/key_cache.result:
  Add test case result for Bug#35272
mysql-test/t/key_cache.test:
  Add test case for Bug#35272
mysys/mf_keycache.c:
  Don't set error on my_large_malloc if allocation fails.
  Set the error if all tentative allocations failed.
2008-03-25 15:53:57 -03:00
unknown
18801aa829 Bug#20906 (Multiple assignments in SET in stored routine produce incorrect
instructions)

This bug can not be reproduced in the current version,
adding the test case to the test suite for coverage, no code change.


mysql-test/r/sp-code.result:
  Bug#20906 (Multiple assignments in SET in stored routine produce incorrect
  instructions)
mysql-test/t/sp-code.test:
  Bug#20906 (Multiple assignments in SET in stored routine produce incorrect
  instructions)
2008-03-25 11:20:11 -06:00
unknown
3e28618f38 Merge mysql.com:/home/svoj/devel/mysql/BUG35509/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG34768/mysql-5.1-engines


mysql-test/t/federated.test:
  Auto merged
storage/federated/ha_federated.cc:
  Use local.
2008-03-25 20:28:43 +04:00
unknown
2d5a444d1f Fix for Bug #27944 Filtering THD::client capabilities
The server used to trust blindly information from the client about
its capabilities. During the connection handshake the server sends
information about what it supports and then the client sends back a
set of capabilities which cover all of the server's or less.
Before this changeset the server didn't check whether the flags sent
by the client were valid for the server. For example, if the server
doesn't support compressed protocol but the client does and sends that
bit turned on, the server didn't check it. The change make the server code
less error prone to problems related to the value of THD::client_capabilities.

Clearly there is no vulnerability being fixed but this is a maintainenance
fix to prevent misusage in the future.


include/mysql_com.h:
  List all CLIENT flags in a common defition. Add also a definition
  which excludes flags, which are optoinal.
sql/sql_connect.cc:
  Renamed client_flags to server_capabilities to reflect what
  the server supports. Only allow from the client the flags the
  server supports.
2008-03-25 18:18:58 +02:00
unknown
f1bb7c2019 Merge host.loc:/home/uchum/work/5.0-opt
into  host.loc:/home/uchum/work/5.1-opt


sql/sql_show.cc:
  Auto merged
mysql-test/r/information_schema.result:
  Merge with 5.0-opt.
mysql-test/t/information_schema.test:
  Merge with 5.0-opt.
2008-03-25 19:49:27 +04:00
unknown
d62c9e33ca information_schema.test, information_schema.result:
Minor test case cleanup after bug#34529.


mysql-test/r/information_schema.result:
  Minor test case cleanup after bug#34529.
mysql-test/t/information_schema.test:
  Minor test case cleanup after bug#34529.
2008-03-25 19:44:27 +04:00
unknown
bccc041dc9 Merge pilot.mysql.com:/data/msvensson/mysql/mysql-5.1
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-rpl
2008-03-25 16:28:02 +01:00
unknown
266790e8f7 Bug#34761 Mysql-test-run.pl script hangs on Windows
mysql-test/mysql-test-run.pl:
  Group all code to find extra suites together
  Fix problem with infinite loop by using splitdir to split the path
  Use a hash to map clone name -> extr suite
2008-03-25 16:27:23 +01:00
unknown
b84d4a8235 Merge bk-internal:/home/bk/mysql-5.1-rpl
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-rpl
2008-03-25 16:02:06 +01:00
unknown
891e811a25 Merge trift2.:/MySQL/M50/push-5.0
into  trift2.:/MySQL/M51/push-5.1
2008-03-25 15:36:23 +01:00
unknown
00991357b6 Merge trift2.:/MySQL/M51/mysql-5.1
into  trift2.:/MySQL/M51/push-5.1
2008-03-25 15:34:23 +01:00
unknown
e01bedb253 Merge trift2.:/MySQL/M51/mysql-5.1
into  trift2.:/MySQL/M51/push-5.1
2008-03-25 15:24:24 +01:00
unknown
2daa016827 Eliminating compiler warnings.
sql/set_var.h:
  Changing order of initializer list for sys_var class constructor to
  eliminate compiler warning.
mysql-test/suite/binlog/combinations:
  New BitKeeper file ``mysql-test/suite/binlog/combinations''
2008-03-25 15:20:42 +01:00
unknown
811fb145ea BUG#34789 - drop server/create server leaks memory !
BUG#34790 - 'create server' doesn't handle out of memory scenario
            well enough

This is an addition to fixes for these bugs, which makes gcov
happy.


mysql-test/r/federated.result:
  CREATE SERVER is only tested by federated_server.test, which requires
  big-test option. Added dummy test case to make gcov happy.
mysql-test/t/federated.test:
  CREATE SERVER is only tested by federated_server.test, which requires
  big-test option. Added dummy test case to make gcov happy.
sql/sql_parse.cc:
  Make gcov happy.
2008-03-25 17:37:53 +04:00
unknown
2b2ae926f4 BUG#34768 - nondeterministic INSERT using LIMIT logged in stmt mode
if binlog_format=mixed

Addition to fix for BUG#34768: fixed test case failures discovered
by pushbuild.


mysql-test/suite/binlog/r/binlog_stm_ps.result:
  Fixed binlog_stm_ps failure when binlog format is statement:
  - this test case makes sence only if binlog format is statement,
    thus execute it only in this mode;
  - added a warning that insert ... select ... limit is not safe
    to execute in statement mode.
mysql-test/suite/binlog/t/binlog_stm_ps.test:
  Fixed binlog_stm_ps failure when binlog format is statement:
  - this test case makes sence only if binlog format is statement,
    thus execute it only in this mode;
  - added a warning that insert ... select ... limit is not safe
    to execute in statement mode.
mysql-test/suite/rpl/t/rpl_optimize.test:
  rpl_optimize test may be executed in various binlog format modes.
  In statement mode delete ... limit issues a warning, in mixed and
  row modes it does not.
  
  Fixed a test case so it is still possible to execute it in all binlog
  format modes by ignoring delete ... limit warnings.
mysql-test/suite/rpl/t/rpl_user_variables.test:
  rpl_user_variables test may be executed in various binlog format modes.
  In statement mode insert ... select ... limit issues a warning,
  in mixed and row modes it does not.
  
  Fixed a test case so it is still possible to execute it in all binlog
  format modes by ignoring insert ... select ... limit warnings.
2008-03-25 17:28:12 +04:00
unknown
d6fc09af43 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2008-03-25 14:09:16 +01:00
unknown
a928353868 Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0-rt
into  quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1-rt-merged


sql/sql_delete.cc:
  Auto merged
2008-03-25 14:54:48 +03:00
unknown
6cd3a1503b Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1
into  quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1-rt-merged


sql/sql_delete.cc:
  Auto merged
2008-03-25 14:54:08 +03:00
unknown
4816e7b7fb Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0
into  quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0-rt-merged


sql/sql_delete.cc:
  Auto merged
2008-03-25 14:53:23 +03:00
unknown
5ad505dda2 BUG#35509 - Federated leaks memory when connecting to
localhost/default port

When creating federated table that points to unspecified host or
localhost on unspecified port or port is 0, small memory leak occurs.

This happens because we make a copy of unix socket path, which is
never freed.

With this fix we do not make a copy of unix socket path, instead
share->socket points to MYSQL_UNIX_ADDR constant directly.

This fix is covered by a test case for BUG34788.

Affects 5.0 only.


mysql-test/t/federated.test:
  A test case for BUG#35509.
sql/ha_federated.cc:
  When creating federated table we call parse_url() to check if connect
  string is correct. parse_url() may make a copy of unix socket path if
  port is not specified or 0 and host is not specified or 'localhost'.
  This copy is never freed.
  
  As there is no need to make a copy of unix socket path, let
  share->socket point to MYSQL_UNIX_ADDR directly.
2008-03-25 12:47:57 +04:00
unknown
33dde6ebfa Patch for bug 28386 enabled table logging for all tests in
mysql_client_test causing a severe slowdown and increase
in memory usage, especially for test cases with long queries.

The solution is to enable the general log only in tests that
actually need the general log and disable it during the
execution of all other tests.


tests/mysql_client_test.c:
  Selectively enable and disable the general log.
2008-03-24 22:39:48 -03:00
unknown
00be935419 Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  riffraff.(none):/data0/autopush/my50-bug34529
2008-03-24 16:19:50 +01:00
unknown
11504a87d1 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/warnings-5.1-opt
2008-03-24 09:10:20 +02:00
unknown
af8742a71b Merge mysql.com:/home/hf/work/33334/my50-33334
into  mysql.com:/home/hf/work/33334/my51-33334


client/mysqltest.c:
  Auto merged
2008-03-23 21:57:36 +04:00
unknown
25b29c37a9 Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/33334/my51-33334


client/mysqltest.c:
  Auto merged
2008-03-23 21:55:02 +04:00
unknown
21bd55afec Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/33334/my50-33334


client/mysqltest.c:
  Auto merged
2008-03-23 21:53:36 +04:00
unknown
eb90f297aa Merge mysql.com:/home/hf/work/33334/my50-33334
into  mysql.com:/home/hf/work/33334/my51-33334


client/mysqltest.c:
  Auto merged
mysql-test/r/flush.result:
  SCCS merged
mysql-test/t/flush.test:
  SCCS merged
2008-03-23 20:35:00 +04:00
unknown
7bcbc7f2d5 merge bug 26461 to 5.1-opt 2008-03-23 14:29:35 +02:00
unknown
28cd75fec4 Fix for Bug#34274: Invalid handling of 'DEFAULT 0'
for YEAR data type.

The problem was that for some unknown reason 0 was not allowed
as a default value for YEAR data type. That was coded before BK.
However the Manual does not say a word about such a limitation.
Also, it looks inconsistent with other data types.

The fix is to allow 0 as a default value.


mysql-test/r/create.result:
  Update result file.
mysql-test/t/create.test:
  Add a test case for Bug#34274: Invalid handling of 'DEFAULT 0'
  for YEAR data type.
sql/unireg.cc:
  Allow 0 as a default value for YEAR data type.
2008-03-22 11:32:24 +03:00
unknown
9965de17ba Fix result files (Bug#21854).
mysql-test/r/information_schema_db.result:
  Update result file.
mysql-test/r/sp-security.result:
  Update result file.
mysql-test/r/trigger_notembedded.result:
  Update result file.
mysql-test/r/view_grant.result:
  Update result file.
2008-03-22 11:01:31 +03:00