Commit graph

1137 commits

Author SHA1 Message Date
Leonard Zhou
28f0e8cf77 Merge 2009-03-24 14:24:27 +08:00
Georgi Kodinov
596a9dbdfb Disabled the failing test case until bug #43440 is resolved 2009-03-23 11:38:54 +02:00
Alfranio Correia
c461c1b0ca Post-fix BUG#42861. 2009-03-23 01:07:25 +00:00
Alfranio Correia
ef0d5cc5f2 auto-merge 5.1-bugteam (local) --> 5.1-bugteam 2009-03-22 19:46:57 +00:00
Horst Hunger
667a004c53 Reviewed patch for Bug#39862. 2009-03-19 12:21:38 +01:00
Satya B
5c49e6ebb3 Merge 5.0-bugteam to 5.1-bugteam 2009-03-19 14:19:51 +05:30
Alfranio Correia
b97083dfc7 Bug #42861 Assigning invalid directories to --slave-load-tmpdir crashes the slave
Compiling with debug and assigning an invalid directory to --slave-load-tmpdir
was crashing the slave due to the following assertion DBUG_ASSERT(! is_set() ||
can_overwrite_status). This assertion assumes that a thread can change its
state once (i.e. ok,error, etc) before aborting, cleaning/resuming or completing
its execution unless the overwrite flag (i.e. can_overwrite_status) is true.

The Append_block_log_event::do_apply_event which is responsible for creating
temporary file(s) was not cleaning the thread state. Thus a failure while
trying to create a file in an invalid temporary directory was causing the crash.

To fix the problem we check if the temporary directory is valid before starting
the SQL Thread and reset the thread state before creating a file in
Append_block_log_event::do_apply_event.
2009-03-18 10:31:17 +00:00
Leonard Zhou
53849a24f9 Merge 2009-03-16 17:06:22 +08:00
Georgi Kodinov
6290bc7e61 addendum to the 22047 fix : updated funcs_1 test suite 2009-03-18 14:52:31 +02:00
Guangbao Ni
224376a796 Auto-merge from 5.1-bugteam 2009-03-18 15:02:06 +00:00
Guangbao Ni
0ba1cc2523 Bug #42217 mysql.procs_priv does not get replicated
mysql.procs_priv table itself does not get replicated.
Inserting routine privilege record into mysql.procs_priv table
is triggered by creating function/procedure statements
according to current user's privileges.
Because the current user of SQL thread has GLOBAL_ACL,
which doesn't need any check mysql.procs_priv privilege
when create/alter/execute routines.
Corresponding GLOBAL_ACL privilege user
doesn't insert routine privilege record into
mysql.procs_priv when creating a routine.

Fixed by switching the current user of SQL thread to definer user if
the definer user exists on slave.
That populates procs_priv, otherwise to keep the SQL thread
user and procs_priv remains unchanged.


mysql-test/suite/rpl/r/rpl_do_grant.result:
  Test case result for routine privilege when definer user exist or not on slave
mysql-test/suite/rpl/t/rpl_do_grant.test:
  Test case result for routine privilege when definer user exist or not on slave
sql/sql_parse.cc:
  Switch current user of SQL thread to definer user if the definer user
  existes on slave when checking whether the routine privilege is
  needed to insert mysql.procs_priv table or not.
2009-03-18 13:48:23 +00:00
Leonard Zhou
af53e5856a Merge 2009-03-18 11:05:48 +08:00
Patrick Crews
5b9903e1c8 Bug#41307: Tests using include/ndb_backup.inc won't work on Windows due to 'grep' call.
Re-recording of .result files for additional tests that use this include file.
2009-03-16 17:36:14 -04:00
Leonard Zhou
b42c29cfe3 BUG#22504 load data infile sql statement in replication architecture get error
The problem is issued because we set wrong start position and stop position of query string into binlog.
That two values are stored as part of head info of query string.
When we parse binlog, we first get position values then get the query string according position values.
But seems that two values are not calculated correctly after the parse of Yacc.

We don't want to touch so much of yacc because it may influence other codes.
So just add one space after 'INTO' key word when parsing.
This can easily resolve the problem.

mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
  Test result
mysql-test/suite/rpl/t/rpl_loaddatalocal.test:
  Test case
sql/log_event.cc:
  Add space after 'INTO'.
2009-03-16 16:21:29 +08:00
Patrick Crews
386ae7db17 merge 5.0 -> 5.1 2009-03-15 18:39:48 -04:00
Andrei Elkin
b105e8f5bc merge from 5.1-bt to a local branch 2009-03-13 22:02:16 +02:00
Andrei Elkin
e2177e81dc merge from 5.1-bt to a local branch 2009-03-13 21:49:37 +02:00
Georgi Kodinov
7ac3f3f1be addendum to bug #36540 : fix the funcs_1 test suite. 2009-03-13 11:16:32 +02:00
Tatiana A. Nurnberg
8370242323 manual merge for 40657 beautification 2009-03-12 17:55:10 +01:00
Leonard Zhou
9952412798 BUG#39858 rpl.rpl_rotate (rpl.rpl_rotate_logs) failed on pushbuild: result mismatch
The method to purge binary log files produces different results in some platforms.
The reason is that the purge time is calculated based on table modified time and
that can't guarantee to purge master-bin.000002 in all platforms.(eg. windows)

Use a new way that sets the time to purge binlog file 1 second after the last
modified time of master-bin.000002.
That can be sure that the file is always deleted in any platform.

mysql-test/suite/rpl/r/rpl_rotate_logs.result:
  Test result
mysql-test/suite/rpl/t/rpl_rotate_logs.test:
  Test file
2009-03-12 17:48:41 +08:00
Davi Arnaut
402bc523b2 Bug#36540: CREATE EVENT and ALTER EVENT statements fail with large server_id
The problem is that creating a event could fail if the value of
the variable server_id didn't fit in the originator column of
the event system table. The cause is two-fold: it was possible
to set server_id to a value outside the documented range (from
0 to 2^32-1) and the originator column of the event table didn't
have enough room for values in this range.

The log tables (general_log and slow_log) also don't have a proper
column type to store the server_id and having a large server_id
value could prevent queries from being logged.

The solution is to ensure that all system tables that store the
server_id value have a proper column type (int unsigned) and that
the variable can't be set to a value that is not within the range.

mysql-test/r/events_bugs.result:
  Add test case result for Bug#36540
mysql-test/r/log_tables.result:
  Update column type.
mysql-test/r/system_mysql_db.result:
  Update column type.
mysql-test/r/variables.result:
  Add test case result for server_id value range.
mysql-test/suite/sys_vars/r/server_id_basic_64.result:
  Update test case results.
mysql-test/t/events_bugs.test:
  Add test case for Bug#36540
mysql-test/t/log_tables.test:
  Fix column type.
mysql-test/t/variables.test:
  Add test case for server_id value range.
scripts/mysql_system_tables.sql:
  Columns that store the server_id value must be of type INT UNSIGNED,
  fix event (originator), general_log and slow_log (server_id) tables
  in accordance.
scripts/mysql_system_tables_fix.sql:
  Columns that store the server_id value must be of type INT UNSIGNED,
  fix event (originator), general_log and slow_log (server_id) tables
  in accordance.
sql/mysqld.cc:
  Set min and max values for the server_id variable.
  Unfortunately we can't easily change server_id variable type
  from ulong to uint32 because of the sys_var classes.
2009-03-11 17:30:56 -03:00
Georgi Kodinov
a43992d78c Revert the push for bug #39858 2009-03-11 17:19:18 +02:00
Leonard Zhou
16d7c26b71 Merge 2009-03-11 14:10:50 +08:00
Leonard Zhou
3c5c878715 BUG#39858 rpl.rpl_rotate (rpl.rpl_rotate_logs) failed on pushbuild: result mismatch
The method to purge binary log files produces different results in some platforms.
The reason is that the purge time is calculated based on table modified time and
that can't guarantee to purge master-bin.000002 in all platforms.(eg. windows)

Use a new way that sets the time to purge binlog file 1 second after the last modified time of master-bin.000002.
That can be sure that the file is always deleted in any platform.

mysql-test/suite/rpl/r/rpl_rotate_logs.result:
  Test result
mysql-test/suite/rpl/t/rpl_rotate_logs.test:
  Change 'purge time' 1 sencond after the last modified time of master-bin.000002.
2009-03-11 13:35:58 +08:00
Patrick Crews
4d99f10126 merge 5.0 -> 5.1 2009-03-09 13:45:40 -04:00
Patrick Crews
636d8c5062 Fix of failing funcs_1 tests.
Changes are due to changes in precision.
Re-record of .result files to account for new server precision.
2009-03-09 11:32:07 -04:00
Andrei Elkin
67ed422313 Bug #40559 assertion failed in check_binlog_magic
The reason of the bug is in that the test makes a trick with relay log files and
did not reset fully at the end.
If mtr does not restart the test the new SQL thread tried to work with the old time
session data.

Fixed with deploying RESET slave at the clean-up.

mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test:
  adding RESET slave to force active mi and rli data struct to be reset.
  The slave SQL thread will deal with a fresh structures each time it restarts.
2009-03-06 20:19:29 +02:00
Tatiana A. Nurnberg
cee070e1bb manual merge 2009-03-06 16:11:34 +01:00
Luis Soares
5833903889 BUG#39753: Replication failure on MIXED + bit + myisam + no PK
When using mixed mode the record values stored inside the storage
engine differed from the ones computed from the row event. This
happened because the prepare_record function was calling
empty_record macro causing some don't care bits to be left set.
                          
Replacing the empty_record plus explicitly setting defaults with 
restore_record to restore the record default values fixes this.
2009-03-05 20:54:53 +01:00
Sergey Glukhov
aa5441e1c6 automerge 2009-03-05 15:58:04 +04:00
Guangbao Ni
d65f6b54ca Auto merged 2009-03-05 19:01:46 +00:00
Guangbao Ni
4f0f021c33 BUG#41980 SBL, INSERT .. SELECT .. LIMIT = ERROR, even when @@SQL_LOG_BIN is 0 !
When binlog_format is STATEMENT and the statement is unsafe before,
the unsafe warning/error message was issued without checking
whether the SQL_LOG_BIN was turned on or not.
      
Fixed with adding a sql_log_bin_toplevel flag in THD to check
whether SQL_LOG_BIN is ON in current session whatever the current is in sp or not.


mysql-test/suite/binlog/r/binlog_unsafe.result:
  Test case result for unsafe warning/error message
mysql-test/suite/binlog/t/binlog_unsafe.test:
  Test case for unsafe message warning/error
sql/set_var.cc:
  Adding a function set_option_log_bin_bit() which specailly handles to
  the change of SQL_LOG_BIN bit in order to set sql_log_bin_toplevel
  according to SQL_LOG_BIN current value at the same time.
sql/sql_class.cc:
  Initialize the flag sql_log_bin_toplevel in THD::init(),
  and add the condition to check whether unsafe ror message was issued.
sql/sql_class.h:
  Add a sql_log_bin_toplevel flag in THD to indicate whether the toplevel SQL_LOG_BIN is
2009-03-05 18:39:02 +00:00
Sergey Glukhov
326de4957a Bug#42758 INFORMATION_SCHEMA.COLUMNS is inconsistent
remove 'unsigned', 'zerofill' attributes
from DATA_TYPE column value.


mysql-test/suite/funcs_1/r/is_columns_innodb.result:
  result fix
mysql-test/suite/funcs_1/r/is_columns_memory.result:
  result fix
mysql-test/suite/funcs_1/r/is_columns_myisam.result:
  result fix
sql/sql_show.cc:
  remove 'unsigned', 'zerofill' attributes 
  from DATA_TYPE column value.
2009-03-05 15:15:47 +04:00
Staale Smedseng
61f905cfa1 Missing change to funcs_1.myisam_views after push of Bug#29458 2009-03-04 13:18:56 +01:00
Leonard Zhou
63c9bb320f BUG#39526 sql_mode not retained in binary log for CREATE PROCEDURE
Set wrong sql_mode when creating a procedure. 
So that the sql_mode can't be writen into binary log correctly.
      
Restore the current session sql_mode right before generating the binlog event
when creating a procedure.

mysql-test/suite/binlog/r/binlog_sql_mode.result:
  Test result
mysql-test/suite/binlog/t/binlog_sql_mode.test:
  Test file for sql_mode testing
sql/sp.cc:
  Restore the current session sql_mode right before generating the binlog event.
2009-02-28 09:35:18 +08:00
Tatiana A. Nurnberg
fe09326edf automerge 2009-02-27 21:43:43 +01:00
Staale Smedseng
8eb09f0149 Commit for merge and push 2009-02-27 17:06:23 +02:00
Staale Smedseng
97b68934bc Recommit for merging and pushing 2009-02-27 16:11:15 +02:00
Patrick Crews
df09ddaced Bug#40178: Test main.completion_type_func does not clean up / needs to be rewritten
Revised the test to include a test of completion_type = 1 as well as making the test more readable / worthwhile
Removed the master.opt file as it was redundant / unnecessary.

mysql-test/suite/sys_vars/t/completion_type_func-master.opt:
  Removed as redundant.  Test uses include/have_innodb.inc.
2009-02-24 16:20:00 +02:00
Leonard Zhou
2b3dfbc176 merge 2009-02-23 16:29:39 +08:00
Leonard Zhou
61d706a4f0 Bug#40013 mixed replication: row based format could lead to stale tmp tables on the
slave.

In mixed mode, if we create a temporary table and do some update which switch to ROW format,
the format will keep in ROW format until the session ends or the table is dropped explicitly. 
When the session ends, the temp table is dropped automaticly at cleanup time.
but it checks only current binlog format and so skip insertion of DROP TABLE instructions into binlog.
So the temp table can't be dropped correctly at slave.

Our solution is that when closing temp tables at cleanup time we check both binlog format and binlog mode,
and we could write DROP TABLE instructions into binlog if current binlog format is ROW but in MIX mode.

mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result:
  Test result file.
mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test:
  Test file.
sql/sql_base.cc:
  Didn't do binloging when both current format and default format are ROW.
2009-02-23 11:26:38 +08:00
Alfranio Correia
d822ab8957 BUG#38174 secure-file-priv breaks LOAD DATA INFILE replication in statement mode
If secure-file-priv was set on slave, it became unable to execute
LOAD DATA INFILE statements sent from master using mixed or
statement-based replication.
                  
This patch fixes the issue by ignoring this security restriction
and checking if the files are created and read by the slave in the
--slave-load-tmpdir while executing the SQL Thread.
2009-02-21 09:36:07 +00:00
Patrick Crews
11a206a37c auto merge 2009-02-20 08:37:07 -05:00
Mattias Jonsson
330f9fb5a5 merge into an updated 5.1-bugteam. 2009-02-20 11:21:45 +01:00
Mattias Jonsson
3d156e223e pre push test result update for bug#38719
Updated with the correct error message.
2009-02-20 10:27:32 +01:00
Patrick Crews
e9b4b536f3 merge 5.0 -> 5.1
These are only 5.0's fixes being merged.
5.1 and 6.0 Unix-removals will occur in different patches.
2009-02-19 18:24:25 -05:00
Serge Kozlov
b86dc86ee9 Bug#41423.
1. Constant values of binlog positions replaced by seeking them in binlog/relay log.
2. Updated result file
2009-02-19 23:29:12 +03:00
Mattias Jonsson
5f58510a09 Backport of test results for Bug#38719 from 6.0 to 5.1
post push fix, Bug#38719, additional test cases updated
2009-02-18 22:35:28 +01:00
Mattias Jonsson
bf442fcaae Backport of bug#36001 from 6.0 to 5.1 2009-02-18 21:22:56 +01:00
Matthias Leich
fecaef26af Merge of fix for Bug 42836 into GCA tree 2009-02-16 20:43:34 +01:00