Commit graph

68746 commits

Author SHA1 Message Date
Georgi Kodinov
4d63adff26 merge 2011-03-17 16:09:06 +02:00
Kent Boortz
c130b7b7d6 Merge 2011-03-17 15:02:28 +01:00
Georgi Kodinov
4bb5d2dce4 Bug #11766854: 60075: MYSQL_LOAD_CLIENT_PLUGIN DOESN'T CLEAR ERROR
Added the cleanup code.
Extended mysql_client_test to take --plugin-dir and --default_auth.
Added a C test case.
2011-03-17 15:52:49 +02:00
Alfranio Correia
45175655e1 merge mysql-5.5 (local) --> mysql-5.5 2011-03-17 13:25:44 +00:00
Nirbhay Choubey
d82d0f52c6 BUG#11766184 - 59234 : cmdline clients crash --defaults-extra-file
with no .cnf or .ini extension.

Fix for this bug was pushed as part of Bug#11765482.


mysql-test/r/mysqladmin.result:
  Added test case for Bug#11766184.
mysql-test/t/mysqladmin.test:
  Added test case for Bug#11766184.
2011-03-17 18:01:06 +05:30
Alfranio Correia
1957bd6627 merge mysql-5.5 (local) --> mysql-5.5 2011-03-17 12:12:25 +00:00
Nirbhay Choubey
0216713de6 Merge from mysql-5.1 -> mysql-5.5. 2011-03-17 16:31:31 +05:30
Nirbhay Choubey
99bf8c1991 Minor fix in mysqldump test. 2011-03-17 16:28:16 +05:30
Sven Sandberg
72fe4deccb BUG#11877618: rpl_slave_net_timeout fails in rpl_sync.inc (at sync_slave_with_master)
Problem: the test had not been updated after BUG#49978 was pushed
Fix: add 'set $rpl_only_running_threads= 1' to the end of the test
and update the result file.
Also, use include/assert.inc for an assertion (instead of relying
on result file comparison).
Also, move 'set @@global.slave_net_timeout' forwards, to get rid
of a warning.


mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result:
  updated result file
mysql-test/suite/large_tests/t/rpl_slave_net_timeout.test:
   - Got rid of warning "The requested value for the heartbeat period
     exceeds the value of `slave_net_timeout' seconds. A sensible
     value for the period should be less than the timeout." by
     changing order of "set slave_net_timeout" and
     "change master to master_heartbeat_period".
   - replaced result file comparison by include/assert.inc
   - added "let $rpl_only_running_threads= 1"
2011-03-17 11:31:42 +01:00
Kent Boortz
727cf96bc6 Merge 2011-03-16 23:26:19 +01:00
Kent Boortz
0394cff069 Removed the "Third-Party Component Notices" part from README 2011-03-16 23:11:25 +01:00
Kent Boortz
3e97851eb6 Removed the "Third-Party Component Notices" part 2011-03-16 23:04:29 +01:00
Alfranio Correia
967beb46a6 BUG#11877568 - RPL_SEMI_SYNC FAILS IN PB
Currently, rpl_semi_sync is failing in PB due to the warning message:

  "Slave SQL: slave SQL thread is being stopped in the middle of "
  "applying of a group having updated a non-transaction table; "
  "waiting for the group completion ..."

The problem started happening after the fix for BUG#11762407 what was
automatically suppressing some warning messages.

To fix the current issue, we suppress the aforementioned warning message
and exploit the opportunity to make the sentence clearer.
2011-03-16 16:38:30 +00:00
Luis Soares
99a8398f42 Fix for BUG#11868903 (BUG#59717).
Automerge: mysql-5.1 --> mysql-5.5
2011-03-16 15:16:41 +00: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
unknown
753c406994 Merge from mysql-5.5.10-release 2011-03-16 15:11:20 +01:00
Serge Kozlov
62e83ad8c0 bug#58525 postfix 2011-03-16 00:46:30 +03:00
Sven Sandberg
9cb096ac98 BUG#11872422: rpl_slave_load_remove_tmpfile fails sporadically in pb2
Problem: the test failed because errors were found in the error log.
The test case contains suppressions for an old version of the error message,
but the format of the error message has changed without updating the suppression.
Fix: Update the suppression. Also small fixes to improve the test.


mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result:
  update result file
mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile-slave.opt:
  Use variables instead of .opt files to avoid server restarts.
mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test:
  1. To fix the bug, we update the regular expression in mtr.add_suppression
     so that it matches the real error text.
  2. Use wait_for_slave_sql_error.inc when we wait for an error.
     This makes the test easier to understand and will produce better
     debug info if the test fails.
  3. Use server variables instead of command line options to set
     the @@GLOBAL.DEBUG variable. This avoids server restarts when
     running the test suite.
  4. Clarify the comment at the top of the file and add bug reference.
2011-03-15 16:12:41 +01:00
Dmitry Shulga
feb6d22328 Manual merge from mysql-5.1 for Bug#11764168 (56976: Severe denial
of service in prepared statements).

sql/sql_prepare.cc:
  At mysql_stmt_get_longdata(): instead of pushing an internal
  error handler (as done in 5.1-tree) we save, set and restore
  the statement's diagnostics area and warning info.
2011-03-15 18:57:36 +06: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
Jon Olav Hauglid
f94e7288e3 Bug #11765416 (former 58381)
FAILED DROP DATABASE CAN BREAK STATEMENT BASED REPLICATION

The first phase of DROP DATABASE is to delete the tables in the database.
If deletion of one or more of the tables fail (e.g. due to a FOREIGN KEY
constraint), DROP DATABASE will be aborted. However, some tables could
still have been deleted. The problem was that nothing would be written
to the binary log in this case, so any slaves would not delete these tables.
Therefore the master and the slaves would get out of sync.

This patch fixes the problem by making sure that DROP TABLE is written
to the binary log for the tables that were in fact deleted by the failed
DROP DATABASE statement.

Test case added to binlog.binlog_database.test.
2011-03-15 11:49:14 +01:00
Bjorn Munch
dd14e37661 Add warning suppression to test rpl.rpl_slave_load_remove_tmpfile 2011-03-15 10:58:54 +01:00
Chuck Bell
03fb2d30d5 Local merger for BUG#59752 2011-03-14 14:42:00 -04:00
Davi Arnaut
ebaf3de8b7 Merge of mysql-5.1 into mysql-5.5. 2011-03-14 15:06:44 -03: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
Magne Mahre
cf2af2bd6f Bug#11858960 - WINDOWS SERVICE FAILING TO START IMMEDIATELY AFTER
INSTALLATION

When starting mysqld as an MS Windows NT service, it crashed 
with "Error 1067: The process terminated unexpectedly".

The problem is that thread local variables are not allocated
and initialized properly when started as a service. When the
server is started as a regular executable, the problem does
not occur.

Analysis showed that this is a regression after the patch for 
Bug#11765237/Bug#11763065.   Before, the thread local storage
was initialized by the call chain:
win_main->my_basic_init->my_thread_basic_global_init->
my_thread_init

When the my_init() structure was changed, this initialization
was moved from win_main to mysqld_main.   When started as
a service win_main is run in a separate thread, which does
not have mysqld_main in its call path, so my_thread_init
is never called for this thread.

Added a call to my_thread_init / my_thread_end in the service
handler function, which solves the problem.
2011-03-14 14:03:48 +01:00
Alexander Nozdrin
2f5a462fdd A patch for Bug#11765297 (58251 - archive_plugin and blackhole_plugin
fails when running with ps-protocol).

The problem was that when running in --ps-protocol mode mysqltest.cc
didn't close created prepared statements. So, the plugins could not be
unistalled because there was a prepared statement using them.

A fix is to add a dummy statement that forces mysqltest.cc to close
the last prepared statement (which uses a plugin-defined table).
2011-03-14 14:03:08 +03:00
Chuck Bell
178bacbb3f BUG#59752 : mysql.user.plugin length (60) vs. mysql.plugin.name length (64)
This patch corrects the problem by fixing the definition and alterations
of the mysql.user table in the .sql files.

Also included are new result files for tests that examine the name 
column of the mysql.user table.
2011-03-11 10:15:57 -05:00
Joerg Bruehe
5e2c0f82c1 Fight a problem in internal test builds:
When a RPM test build in a non-release branch is done,
the $MYSQL_BINDIR variable ends in "/usr"
(rather than in "/usr/lib" as in a RPM release build),
this made test "file_contents" fail.

A branch for this case is added to the test.
The test result is unchanged.



mysql-test/t/file_contents.test:
  Fight a problem in internal test builds:
  
  When a RPM test build in a non-release branch is done,
  the $MYSQL_BINDIR variable ends in "/usr"
  (rather than in "/usr/lib" as in a RPM release build),
  this made test "file_contents" fail.
  
  Because of this, the old logic did not recognize
  that a RPM build is done (trailing '/' missing!)
  and took the tar.gz branch.
  Just removing the trailing '/' from the "/usr" is
  not enough, as the logic for RPMs used to replace
  "/lib" which is not present at all; rather, a new
  branch was added.
  
  To help in case of future problems, the error messages
  for a failing "open()" now also report "$MYSQL_BINDIR".
2011-03-11 16:00:53 +01:00
Bjorn Munch
c57be2cd3a null upmerge 2011-03-11 12:52:59 +01:00
Bjorn Munch
7fa456dae8 merge from 5.5-mtr 2011-03-11 12:51:51 +01:00
Bjorn Munch
52cb0b1e39 merge from 5.1-mtr 2011-03-11 12:49:14 +01:00
Mayank Prasad
b879731f1d merge from mysql5.1 for bug#11760210 2011-03-11 17:01:19 +05:30
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
Marc Alff
258e3bfc30 Test cleanup 2011-03-11 11:45:16 +01:00
Bjorn Munch
b506fdfca3 null upmerge 2011-03-11 10:33:37 +01:00
Bjorn Munch
268aa888b4 merge from 5.5 main 2011-03-11 10:12:58 +01:00
Bjorn Munch
782b44bc7f merge from 5.1 main 2011-03-11 10:07:34 +01:00
Marc Alff
70fd13346d Reworked the test case to be more robust. 2011-03-10 13:02:28 +01:00
Marc Alff
c5f0889670 Local merge 2011-03-10 09:47:53 +01:00
Marc Alff
3f2d2fe7b5 Local merge 2011-03-10 09:43:55 +01:00
Alexander Nozdrin
5653a71d3e Patch for Bug#11765684 (58674: SP-cache does not detect changes in
pre-locking list caused by triggers).

The thing is that CREATE TRIGGER / DROP TRIGGER may actually
change pre-locking list of (some) stored routines.

The SP-cache does not detect such changes. Thus if sp_head-instance
is cached in SP-cache, subsequent executions of the cached
sp_head will use inaccurate pre-locking list.

The patch is to invalidate SP-cache on CREATE TRIGGER / DROP TRIGGER.
2011-03-10 11:07:57 +03:00
Marc Alff
caee7f416f Implemented code review comments,
improved the result file readability.
2011-03-10 09:00:43 +01:00
Anitha Gopi
0b7e6f81af Skip tests in disabled-daily.list 2011-03-10 09:57:14 +05:30
Anitha Gopi
f561c9507b Skip the tests listed in disabled-weekly.list 2011-03-10 09:54:16 +05:30
Anitha Gopi
b7caa09215 Bug11817185# : Disabled MAIN.ARCHIVE-BIG.TEST 2011-03-10 09:47:49 +05:30
Mattias Jonsson
d3ca484f46 merge 2011-03-09 18:41:16 +01:00
Mattias Jonsson
ba85e3cf54 Merge of Bug#11766232 - bug#59297 2011-03-09 18:12:23 +01:00
Georgi Kodinov
01f218e896 merge mysql-5.1->mysql-5.5 2011-03-09 16:04:50 +02:00
Georgi Kodinov
dc1c65b618 merge mysql-5.0->mysql-5.1 2011-03-09 14:59:34 +02:00