Commit graph

63848 commits

Author SHA1 Message Date
Bjorn Munch
4c1eb0c171 mtr: cleaned up some superfluos global warning suppressions 2011-03-30 14:33:53 +02:00
Marko Mäkelä
ddec6ecdd8 Bug#11877216 InnoDB too eager to commit suicide on a busy server
sync_array_print_long_waits(): Return the longest waiting thread ID
and the longest waited-for lock. Only if those remain unchanged
between calls in srv_error_monitor_thread(), increment
fatal_cnt. Otherwise, reset fatal_cnt.

Background: There is a built-in watchdog in InnoDB whose purpose is to
kill the server when some thread is stuck waiting for a mutex or
rw-lock. Before this fix, the logic was flawed.

The function sync_array_print_long_waits() returns TRUE if it finds a
lock wait that exceeds 10 minutes (srv_fatal_semaphore_wait_threshold).
The function srv_error_monitor_thread() will kill the server if this
happens 10 times in a row (fatal_cnt reaches 10), checked every 30
seconds. This is wrong, because this situation does not mean that the
server is hung. If the server is very busy for a little over 15
minutes, it will be killed.

Consider this example. Thread T1 is waiting for mutex M. Some time
later, threads T2..Tn start waiting for the same mutex M. If T1 keeps
waiting for 600 seconds, fatal_cnt will be incremented to 1. So far,
so good. Now, if M is granted to T1, the server was obviously not
stuck. But, T2..Tn keeps waiting, and their wait time will be longer
than 600 seconds. If 5 minutes later, some Tn has still been waiting
for more than 10 minutes for the mutex M, the server can be killed,
even though it is not stuck.

rb:622 approved by Jimmy Yang
2011-03-30 14:25:58 +03:00
Sergey Glukhov
a7d383cbb8 Bug#11766124 59164: VALGRIND: UNINITIALIZED VALUE IN NUMBER_TO_DATETIME
Valgrind warning happens due to missing NULL value check in
Item::get_date. The fix is to add this check.


mysql-test/r/func_time.result:
  test case
mysql-test/t/func_time.test:
  test case
sql/item.cc:
  added check for NULL value
2011-03-30 11:08:35 +04:00
Sergey Glukhov
3b7f044534 Bug#11766126 59166: ANOTHER DATETIME VALGRIND UNINITIALIZED WARNING
Valgrind warning happens because null values check happens too late
in Item_func_month::val_str(after result string calculation).The fix
is to check null value before result string calculation.


mysql-test/r/func_time.result:
  test case
mysql-test/t/func_time.test:
  test case
sql/item_timefunc.h:
  check null value before result string calculation.
2011-03-30 11:00:41 +04:00
Jon Olav Hauglid
4e26a41f3e Bug# 11763784 (former 56541)
ASSERTION TABLE->DB_STAT FAILED IN
SQL_BASE.CC::OPEN_TABLE() DURING I_S Q

This assert could be triggered if a statement requiring a name
lock on a table (e.g. DROP TRIGGER) executed concurrently
with an I_S query which also used the table.

One connection first started an I_S query that opened a given table.
Then another connection started a statement requiring a name lock
on the same table. This statement was blocked since the table was
in use by the I_S query. When the I_S query resumed and tried to
open the table again as part of get_all_tables(), it would encounter
a table instance with an old version number representing the pending
name lock. Since I_S queries ignore version checks and thus pending
name locks, it would try to continue. This caused it to encounter
the assert. The assert checked that the TABLE instance found with a
different version, was a real, open table. However, since this TABLE
instance instead represented a pending name lock, the check would
fail and trigger the assert.

This patch fixes the problem by removing the assert. It is ok for
TABLE::db_stat to be 0 in this case since the TABLE instance can
represent a pending name lock.

Test case added to lock_sync.test.
2011-03-29 10:09:05 +02:00
Mayank Prasad
08e472ff34 Bug#11751148 : show events shows events in other schema
Issue:
======
Test case Correction for bug#11751148.

mysql-test/r/events_bugs.result:
  Result file Correction for bug#11751148.
mysql-test/t/events_bugs.test:
  Test case Correction for bug#11751148.
2011-03-28 21:01:37 +05:30
Sergey Glukhov
47885f552b Bug#11766087 59125: VALGRIND UNINITIALISED VALUE WARNING IN ULL2DEC, LONGLONG2DECIMAL
Valgrind warning happens due to missing NULL value check in
Item_func::val_decimal. The fix is to add this check.


mysql-test/r/func_time.result:
  test case
mysql-test/t/func_time.test:
  test case
sql/item_func.cc:
  added check for NULL value
2011-03-28 17:27:44 +04:00
Sergey Glukhov
d6125b27b3 Bug#11765216 58154: UNINITIALIZED VARIABLE FORMAT IN STR_TO_DATE FUNCTION
Valgrind warning happens due to uninitialized cached_format_type field
which is used later in Item_func_str_to_date::val_str method.
The fix is to init cached_format_type field.


mysql-test/r/func_time.result:
  test case
mysql-test/t/func_time.test:
  test case
sql/item_timefunc.cc:
  init cached_format_type field
2011-03-28 17:24:25 +04:00
Georgi Kodinov
4ed8cb4a76 Added support for VS10.
Fixed RelWithDebugInfo bzr ignores.
2011-03-28 13:43:30 +03:00
Georgi Kodinov
cd71e11cc8 Fixed a test failure becase of a new warning caused by the fix for
Bug #11766769
2011-03-28 13:32:25 +03:00
Georgi Kodinov
a3ab0d92de Fixed a test failure in embedded because of the fix for BUG#11766769 2011-03-28 13:25:03 +03:00
Sergey Glukhov
2901548911 automerge 2011-03-28 13:09:02 +04:00
Magne Mahre
9ff72a1acf Bug#11900714 REMOVE LGPL LICENSED FILES IN MYSQL 5.1
The LGPL license is used in some legacy code, and to
adhere to current licensing polity, we remove those
files that are no longer used, and reorganize the
remaining LGPL code so it will be GPL licensed from
now on.
      
Note:  This patch only removed LGPL licensed files
       in MySQL 5.1, and is the second of a set of
       patches to remove LGPL from all trees.
       (See Bug# 11840513 for details)
2011-03-28 10:47:30 +02:00
Sergey Glukhov
a88faf2a4a Bug#11764994 57900: CREATE TABLE .. SELECT ASSERTS SCALE >= 0 && PRECISION > 0 && SCALE <= PR
Assert fails due to overflow which happens in
Item_func_int_val::fix_num_length_and_dec() as
geometry functions have max_length value equal to
max_field_size(4294967295U). The fix is to skip
max_length calculation for some boundary cases.


mysql-test/r/func_math.result:
  test case
mysql-test/t/func_math.test:
  test case
sql/item_func.cc:
  skip max_length calculation
  if argument max_length is near max_field_size.
2011-03-28 12:35:50 +04:00
Vasil Dimov
08d598fb98 Store the '\0'-terminated query in row->trx_query
This problem was introduced in
marko.makela@oracle.com-20100514130815-ym7j7cfu88ro6km4
and is probably the reason for the following valgrind warning:

from http://bugs.mysql.com/52691 , http://bugs.mysql.com/file.php?id=16880 :

Version: '5.6.3-m5-valgrind-max-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
==14947== Thread 18:
==14947== Conditional jump or move depends on uninitialised value(s)
==14947==    at 0x4A06318: __GI_strlen (mc_replace_strmem.c:284)
==14947==    by 0x9F3D7A: fill_innodb_trx_from_cache(trx_i_s_cache_struct*, THD*, TABLE*) (i_s.cc:591)
==14947==    by 0x9F4D7D: trx_i_s_common_fill_table(THD*, TABLE_LIST*, Item*) (i_s.cc:1238)
==14947==    by 0x7689F3: get_schema_tables_result(JOIN*, enum_schema_table_state) (sql_show.cc:6745)
==14947==    by 0x715A75: JOIN::exec() (sql_select.cc:2861)
==14947==    by 0x7185BD: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3609)
==14947==    by 0x70E823: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:319)
==14947==    by 0x6F2305: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4557)
==14947==    by 0x6EAED4: mysql_execute_command(THD*) (sql_parse.cc:2135)
==14947==    by 0x6F44C9: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5597)
==14947==    by 0x6E864B: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1093)
==14947==    by 0x6E785E: do_command(THD*) (sql_parse.cc:815)
==14947==    by 0x6C18DD: do_handle_one_connection(THD*) (sql_connect.cc:771)
==14947==    by 0x6C146E: handle_one_connection (sql_connect.cc:707)
==14947==    by 0x30E1807760: start_thread (pthread_create.c:301)
==14947==    by 0x35EA670F: ???
==14947==  Uninitialised value was created by a heap allocation
==14947==    at 0x4A0515D: malloc (vg_replace_malloc.c:195)
==14947==    by 0xB4B948: mem_area_alloc (mem0pool.c:385)
==14947==    by 0xB4A27C: mem_heap_create_block (mem0mem.c:333)
==14947==    by 0xB4A530: mem_heap_add_block (mem0mem.c:446)
==14947==    by 0xB0D2A4: mem_heap_alloc (mem0mem.ic:186)
==14947==    by 0xB0D9C2: ha_storage_put_memlim (ha0storage.c:118)
==14947==    by 0xA479D8: fill_trx_row (trx0i_s.c:521)
==14947==    by 0xA490E9: fetch_data_into_cache (trx0i_s.c:1319)
==14947==    by 0xA491BA: trx_i_s_possibly_fetch_data_into_cache (trx0i_s.c:1352)
==14947==    by 0x9F4CE7: trx_i_s_common_fill_table(THD*, TABLE_LIST*, Item*) (i_s.cc:1221)
==14947==    by 0x7689F3: get_schema_tables_result(JOIN*, enum_schema_table_state) (sql_show.cc:6745)
==14947==    by 0x715A75: JOIN::exec() (sql_select.cc:2861)
==14947==    by 0x7185BD: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3609)
==14947==    by 0x70E823: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:319)
==14947==    by 0x6F2305: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4557)
==14947==    by 0x6EAED4: mysql_execute_command(THD*) (sql_parse.cc:2135)
==14947==    by 0x6F44C9: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5597)
==14947==    by 0x6E864B: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1093)
==14947==    by 0x6E785E: do_command(THD*) (sql_parse.cc:815)
==14947==    by 0x6C18DD: do_handle_one_connection(THD*) (sql_connect.cc:771)
==14947==    by 0x6C146E: handle_one_connection (sql_connect.cc:707)
==14947==    by 0x30E1807760: start_thread (pthread_create.c:301)
==14947==    by 0x35EA670F: ???


(gdb) bt
#0  0x0000000004a06318 in _vgrZU_libcZdsoZa___GI_strlen (str=0x3026bfa0 "insert into `blobtest` set `data`='pkefxxpkalpabzgrczlxefkreqljeqbvzrcnhvhsjsfnvxzjsltfuincffigdkmhvvcmnseluzgbtedrfmxvnrdmzesbinjgwvharkpgjplrlnqudfidbqwgbykupycxzyikzqincnsjrxgncqzlgyqwjdbjulztgsffxpjgymsnntdibvklwqylmwhsmdskmllxuwafabdjnwlyofknwuixiyrgnplmerfdewgizkdhznitesfqepsqbbwkdepkmjoseyxjofmmjaqdipwopfrwidmhqbtovdslvayxcnpewzhppeetblccppniamezibuoinvlxkafpcmozawtplfpepxwlwhymsuraezcwvjqzwogsozodlsfzjiyrcaljjhqwdrcjawvelhefzzaexvcbyorlcyupqwgjuamiqpiputtndjwcsuyzdfhuxswuowhrzdvriwrxqmcqthvzzzvivbabbnhdbtcfdtgssvmirrcddnytnctcvqplwytxxzxelldhwahalzxvgynaiwjyezhxqhlsqudngekocfvlbqprxqhyhwbaomgqiwkpfguohuvlnhtrsszgacxhhzeppyqwfwabiqzgyzkperiidyunrykopysvlcxwhrcboetjltawdjergalsfvaxncmzoznryumrjmncvhvxqvqhhbznnifkguuiffmlrbmgwtzvnuwlaguixqadkupfhasbbxnwkrvsfhrqanfmvjtzfqodtutkjlxfcogtsjywrdgmzgszjtsmimaelsveayqrwviqwwefeziuaqsqpauxpnzhaxjtkdfvvodniwezskbxfxszyniyzkzxngcfwgjlyrlskmrzxqnptwlilsxybuguafxxkvryyjrnkhhcmxuusitaflaiuxjhyfnzkahlgmaszujqmfdhyppdnpweqanmvzgjfyzjolbmprhnuuxextcaxzicfvsuochprmlf"...) at mc_replace_strmem.c:284
#1  0x00000000009f3d7b in fill_innodb_trx_from_cache (cache=0x1462440, thd=0x2a495000, table=0x2a422500) at /home/sbester/build/bzr/mysql-trunk/storage/innobase/handler/i_s.cc:591
#2  0x00000000009f4d7e in trx_i_s_common_fill_table (thd=0x2a495000, tables=0x2a4c3ec0) at /home/sbester/build/bzr/mysql-trunk/storage/innobase/handler/i_s.cc:1238
#3  0x00000000007689f4 in get_schema_tables_result (join=0x30f90c40, executed_place=PROCESSED_BY_JOIN_EXEC) at /home/sbester/build/bzr/mysql-trunk/sql/sql_show.cc:6745
#4  0x0000000000715a76 in JOIN::exec (this=0x30f90c40) at /home/sbester/build/bzr/mysql-trunk/sql/sql_select.cc:2861
#5  0x00000000007185be in mysql_select (thd=0x2a495000, rref_pointer_array=0x2a497590, tables=0x2a4c3ec0, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2684619520, result=0x30319720, unit=0x2a496d28, select_lex=0x2a497378) at /home/sbester/build/bzr/mysql-trunk/sql/sql_select.cc:3609
#6  0x000000000070e824 in handle_select (thd=0x2a495000, lex=0x2a496c78, result=0x30319720, setup_tables_done_option=0) at /home/sbester/build/bzr/mysql-trunk/sql/sql_select.cc:319
#7  0x00000000006f2306 in execute_sqlcom_select (thd=0x2a495000, all_tables=0x2a4c3ec0) at /home/sbester/build/bzr/mysql-trunk/sql/sql_parse.cc:4557
#8  0x00000000006eaed5 in mysql_execute_command (thd=0x2a495000) at /home/sbester/build/bzr/mysql-trunk/sql/sql_parse.cc:2135
#9  0x00000000006f44ca in mysql_parse (thd=0x2a495000, rawbuf=0x30d80060 "select * from innodb_trx", length=24, parser_state=0x35ea5540) at /home/sbester/build/bzr/mysql-trunk/sql/sql_parse.cc:5597
#10 0x00000000006e864c in dispatch_command (command=COM_QUERY, thd=0x2a495000, packet=0x30bb4e31 "select * from innodb_trx", packet_length=24) at /home/sbester/build/bzr/mysql-trunk/sql/sql_parse.cc:1093
#11 0x00000000006e785f in do_command (thd=0x2a495000) at /home/sbester/build/bzr/mysql-trunk/sql/sql_parse.cc:815
#12 0x00000000006c18de in do_handle_one_connection (thd_arg=0x2a495000) at /home/sbester/build/bzr/mysql-trunk/sql/sql_connect.cc:771
#13 0x00000000006c146f in handle_one_connection (arg=0x2a495000) at /home/sbester/build/bzr/mysql-trunk/sql/sql_connect.cc:707
#14 0x00000030e1807761 in start_thread (arg=0x35ea6710) at pthread_create.c:301
#15 0x00000030e14e14ed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
(gdb) frame 1
#1  0x00000000009f3d7b in fill_innodb_trx_from_cache (cache=0x1462440, thd=0x2a495000, table=0x2a422500) at /home/sbester/build/bzr/mysql-trunk/storage/innobase/handler/i_s.cc:591
591                                     row->trx_query_cs);
(gdb) list
586                     if (row->trx_query) {
587                             /* store will do appropriate character set
588                             conversion check */
589                             fields[IDX_TRX_QUERY]->store(
590                                     row->trx_query, strlen(row->trx_query),
591                                     row->trx_query_cs);
592                             fields[IDX_TRX_QUERY]->set_notnull();
593                     } else {
594                             fields[IDX_TRX_QUERY]->set_null();
595                     }
2011-03-28 11:34:12 +03:00
Sergey Glukhov
ff23f5360e Bug#11766424 59527: DECIMAL_BIN_SIZE: ASSERTION `SCALE >= 0 && PRECISION > 0 && SCALE <= PRE
Assertion happens due to missing initialization of unsigned_flag
for Item_func_set_user_var object. It leads to incorrect
calculation of decimal field size.
The fix is to add initialization of unsigned_flag.


mysql-test/r/variables.result:
  test case
mysql-test/t/variables.test:
  test case
sql/item_func.cc:
  add initialization of unsigned_flag.
2011-03-28 12:28:30 +04:00
Sergey Glukhov
d499851be0 Bug#11766112 59151:UNINITIALIZED VALUES IN EXTRACT_DATE_TIME WITH STR_TO_DATE(SPACE(..) ...
Valgrind warining happens due to missing
'end of the string' check. The fix is to
check if we reached the end of the string.


mysql-test/r/func_time.result:
  test case
mysql-test/t/func_time.test:
  test case
sql/item_timefunc.cc:
  check if we reached the end of
  the string after leading spaces skipping.
2011-03-28 11:53:18 +04:00
Sven Sandberg
f1b638d33c BUG#11766427, BUG#59539: Filter by server id in mysqlbinlog fails
Problem: mysqlbinlog --server-id may filter out Format_description_log_events.
If mysqlbinlog does not process the Format_description_log_event,
then mysqlbinlog cannot read the rest of the binary log correctly.
This can have the effect that mysqlbinlog crashes, generates an error,
or generates output that causes mysqld to crash, generate an error,
or corrupt data.
Fix: Never filter out Format_description_log_events. Also, never filter
out Rotate_log_events.


client/mysqlbinlog.cc:
  Process Format_description_log_events even when the
  server_id does not match the number given by --server-id.
mysql-test/t/mysqlbinlog.test:
  Add test case.
2011-03-25 15:16:13 +01:00
Georgi Kodinov
5af973582d merge 2011-03-25 14:57:25 +02:00
Mattias Jonsson
e0887df8e1 Bug#11766249 bug#59316: PARTITIONING AND INDEX_MERGE MEMORY LEAK
When executing row-ordered-retrieval index merge,
the handler was cloned, but it used the wrong
memory root, so instead of allocating memory
on the thread/query's mem_root, it used the table's
mem_root, resulting in non released memory in the
table object, and was not freed until the table was
closed.

Solution was to ensure that memory used during cloning
of a handler was allocated from the correct memory root.

This was implemented by fixing handler::clone() to also
take a name argument, so it can be used with partitioning.
And in ha_partition only allocate the ha_partition's ref, and
call the original ha_partition partitions clone() and set at cloned
partitions.

Fix of .bzrignore on Windows with VS 2010
2011-03-25 12:36:02 +01:00
Georgi Kodinov
dcf6b68d08 Bug #11766769: 59959: SMALL VALUES OF --MAX-ALLOWED-PACKET
ARE NOT BEING HONORED

max_allowed_packet works in conjunction with net_buffer_length.
max_allowed_packet is an upper bound of net_buffer_length.
So it doesn't make sense to set the upper limit lower than the value.
Added a warning (using ER_UNKNOWN_ERRROR and a specific message)
when this is done (in the log at startup and when setting either 
max_allowed_packet or the net_buffer_length variables)
Added a test case.
Fixed several tests that broke the above rule.
2011-03-25 12:57:27 +02:00
Luis Soares
f24b6702e9 Automerging bzr bundle attached to bug report into latest mysql-5.1. 2011-03-24 10:58:48 +00:00
Luis Soares
b489c89f73 BUG#11766865: 60091: RBR + NO PK + UPDATE NULL VALUE --> SLAVE BREAK WITH ERROR HA_ERR_END_OF_
The slave was not able to find the correct row in the innodb
table, because the row fetched from the innodb table would not
match the before image. This happened because the (don't care)
bytes in the NULLed fields would change once the row was stored
in the storage engine (from zero to the default value). This
would make bulk memory comparison (using memcmp) to fail.
  
We fix this by taking a preventing measure and avoiding memcmp
for tables that contain nullable fields. Therefore, we protect
the slave search routine from engines that return arbitrary
values for don't care bytes (in the nulled fields). Instead, the
slave thread will only check null_bits and those fields that are
not set to NULL when comparing the before image against the
storage engine row.

mysql-test/extra/rpl_tests/rpl_record_compare.test:
  Added test case to the include file so that this is tested 
  with more than one engine.
mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result:
  Result update.
mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result:
  Result update.
mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test:
  Moved the include file last, so that the result from
  BUG#11766865 is not intermixed with the result for
  BUG#11760454.
sql/log_event.cc:
  Skips memory comparison if the table has nullable 
  columns and compares only non-nulled fields in the
  field comparison loop.
2011-03-24 10:52:40 +00:00
Bjorn Munch
4518a0ee8a merge from 5.1-mtr 2011-03-23 10:48:09 +01:00
Magne Mahre
6093ae49e2 Null merge (from mysql-5.0) 2011-03-22 16:28:42 +01:00
Magne Mahre
326b97cf8e Post-push fix for Bug 11896296
Didn't build on Solaris.
2011-03-22 16:27:32 +01:00
Bjorn Munch
761ba8349d merge from 5.1 main 2011-03-22 15:38:41 +01:00
Magne Mahre
015f7bcf0c Null merge 2011-03-22 13:53:35 +01:00
Magne Mahre
55e4223712 Bug#11896296 REMOVE LGPL LICENSED FILES IN MYSQL 5.0
The LGPL license is used in some legacy code, and to
adhere to current licensing polity, we remove those
files that are no longer used, and reorganize the
remaining LGPL code so it will be GPL licensed from
now on.

Note:  This patch only removed LGPL licensed files
       in MySQL 5.0, and is the first of a set of
       patches to remove LGPL from all trees.
       (See Bug# 11840513 for details)



include/my_compare.h:
  Mostly code moved in from my_handler
include/my_global.h:
  AIX-only code.   Function used to be in my_port.c
  Inlining instead.
libmysql/Makefile.shared:
  my_gethostbyname and my_port is removed
myisam/mi_check.c:
  ha_find_null is moved from my_handler and made static.
2011-03-22 13:50:14 +01:00
Georgi Kodinov
5e62a9db2e Bug #11763135: 55812: MYSQL AB SHOULD NOT BE AUTHOR, EVEN IN EXAMPLE
Fixed the author and the copyright.
2011-03-21 17:54:40 +02:00
MySQL Build Team
590fa98628 fixing 38697/11749301 2011-03-21 20:23:39 +01:00
Mayank Prasad
c8b724b2aa Bug #11751148 : show events shows events in other schema
Issue:
------
Due to prefix match, database like 'k' was matching with 'ka' and events of 'ka' we getting displayed for 'show event' of 'k'.

Resolution:
-----------
Scan for listing of events in a schema is made to be done on exact match of database (schema) name instead of just prefix.

mysql-test/r/events_bugs.result:
  modified expected file with the expected results.
mysql-test/t/events_bugs.test:
  added a test case to reproduce the scenario.
sql/event_db_repository.cc:
  Scan for schema name is made to be done on exact db name match.
2011-03-21 21:32:47 +05:30
Ramil Kalimullin
91688f1d30 Null merge of the backported fix for bug#51875/#11759554 from mysq-5.0. 2011-03-21 09:24:22 +03:00
Ramil Kalimullin
1077c85fe3 Fix for bug#51875/#11759554 backported from mysql-5.1. 2011-03-21 09:21:14 +03:00
Bjorn Munch
c85237485a Bug #11885854 MYSQLTEST: PS-PROTOCOL IMPLIED BY CURSOR-PROTOCOL LOST AFTER ENABLE_PS_PROTOCOL
The condition cursor-protocol => ps-protocol was done at "current setting" level"
Moved it to "set by command line" level
2011-03-18 12:13:54 +01:00
Vinay Fisrekar
8eae8e8d62 Bug#11766500 - 59624: FUNCS_1 SUITE TESTS FAILING WITH RESULT DIFFERENCE WHEN RUN USING EMBEDDED MODE
Updating result files
2011-03-18 16:35:57 +05:30
Kent Boortz
6019cc9d46 Merge 2011-03-17 15:06:25 +01:00
Nirbhay Choubey
99bf8c1991 Minor fix in mysqldump test. 2011-03-17 16:28:16 +05:30
Kent Boortz
654eea3588 Merge 2011-03-16 23:33:12 +01:00
Kent Boortz
bf222ccf73 Removed the "Third-Party Component Notices" part from README 2011-03-16 23:07:05 +01:00
Kent Boortz
3e97851eb6 Removed the "Third-Party Component Notices" part 2011-03-16 23:04:29 +01:00
Luis Soares
6041d9c886 Fix for BUG#11868903 (BUG#59717)
There is a race between two threads: user thread and the dump
thread. The former sets a debug instruction that makes the latter wait
before processing an Xid event. There can be cases that the dump
thread has not yet processed the previous Xid event, causing it to
wait one Xid event too soon, thus causing sync_slave_with_master never
to resume.
      
We fix this by moving the instructions that set the debug variable
after calling sync_slave_with_master.
2011-03-16 15:11:54 +00:00
Bjorn Munch
ebba068d26 Bug #11762804 55442: MYSQLD DEBUG CRASHES WHILE RUNNING MYISAM_CRASH_BEFORE_FLUSH_KEYS.TEST
This will cause affected tests to skip if CrashReporter would popup
Found 5 tests that needed modification
2011-03-15 16:06:59 +01:00
Dmitry Shulga
9320dca994 Fixed Bug#11764168 "56976: SEVERE DENIAL OF SERVICE IN PREPARED STATEMENTS".
The problem was that server didn't check resulting size of prepared
statement argument which was set using mysql_send_long_data() API.
By calling mysql_send_long_data() several times it was possible
to create overly big string and thus force server to allocate
memory for it. There was no way to limit this allocation.

The solution is to add check for size of result string against
value of max_long_data_size start-up parameter. When intermediate
string exceeds max_long_data_size value an appropriate error message
is emitted.

We can't use existing max_allowed_packet parameter for this purpose
since its value is limited by 1GB and therefore using it as a limit
for data set through mysql_send_long_data() API would have been an
incompatible change. Newly introduced max_long_data_size parameter
gets value from max_allowed_packet parameter unless its value is
specified explicitly. This new parameter is marked as deprecated
and will be eventually replaced by max_allowed_packet parameter.
Value of max_long_data_size parameter can be set only at server
startup.


mysql-test/t/variables.test:
  Added checking for new start-up parameter max_long_data_size.
sql/item.cc:
  Added call to my_message() when accumulated string exceeds
  max_long_data_size value. my_message() calls error handler
  that was installed in mysql_stmt_get_longdata before call
  to Item_param::set_longdata.
  
  The error handler then sets state, last_error and last_errno
  fields for current statement to values which correspond to
  error which was caught.
sql/mysql_priv.h:
  Added max_long_data_size variable declaration.
sql/mysqld.cc:
  Added support for start-up parameter 'max_long_data_size'.
  This parameter limits size of data which can be sent from
  client to server using mysql_send_long_data() API.
sql/set_var.cc:
  Added variable 'max_long_data_size' into list of variables
  displayed by command 'show variables'.
sql/sql_prepare.cc:
  Added error handler class Set_longdata_error_handler.
  This handler is used to catch any errors that can be
  generated during execution of Item_param::set_longdata().
  
  Source code snippet that makes checking for statement's state 
  during statement execution is moved from Prepared_statement::execute()
  to Prepared_statement::execute_loop() in order not to call
  set_parameters() when statement has failed during
  set_long_data() execution. If this hadn't been done
  the call to set_parameters() would have failed.
tests/mysql_client_test.c:
  A testcase for the bug #56976 was added.
2011-03-15 17:36:12 +06:00
Marko Mäkelä
4f4b404e59 Bug#11849231 inflateInit() invoked without initializing all memory
According to the zlib documentation, next_in and avail_in
must be initialized before invoking inflateInit or inflateInit2.
Furthermore, the zalloc function must clear the allocated memory.

btr_copy_zblob_prefix(): Replace the d_stream parameter with buf,len
and return the copied length.

page_zip_decompress(): Invoke inflateInit2 a little later.

page_zip_zalloc(): Rename from page_zip_alloc().
Invoke mem_heap_zalloc() instead of mem_heap_alloc().

rb:619 approved by Jimmy Yang
2011-03-15 12:01:02 +02:00
Davi Arnaut
07106d4ad9 Bug#11765202: Dbug_violation_helper::~Dbug_violation_helper(): Assertion `!_entered' failed.
Add a missing DBUG_RETURN function test_if_number().
2011-03-14 15:03:22 -03:00
Bjorn Munch
52cb0b1e39 merge from 5.1-mtr 2011-03-11 12:49:14 +01:00
Mayank Prasad
d2e36e4258 BUG #11760210: 52596: SSL_CIPHER_LIST NOT SET OR RETURNED FOR "SHOW STATUS LIKE 'SSL_CIPHER_LIST'"
Issue:
      SSL_CIPHER set to a specific CIPHER name was not getting picked up by SHOW STATUS Command.

Solution:
      If specific cipher name is specified, avoid overwriting of Cipher List with default Cipher names.


extra/yassl/src/yassl_int.cpp:
  If user specified Cipher name is there, avoid populating default
  cipher names' list.
mysql-test/r/ssl_cipher.result:
  Expected file for ssl_cipher.test test case
mysql-test/t/ssl_cipher-master.opt:
  Server option file for ssl_cipher.test test case.
mysql-test/t/ssl_cipher.test:
  Test case to verify that user specified SSL cipher name is shown in SHOW STATUS Command.
2011-03-11 16:16:34 +05:30
Bjorn Munch
782b44bc7f merge from 5.1 main 2011-03-11 10:07:34 +01:00
Mattias Jonsson
ba85e3cf54 Merge of Bug#11766232 - bug#59297 2011-03-09 18:12:23 +01:00