Commit graph

916 commits

Author SHA1 Message Date
Alfranio Correia
ba4a5e8c3c merge 5.1-bugteam --> 5.1-bugteam (local) 2009-01-29 11:30:02 +00:00
Alfranio Correia
23d032c34e BUG#35583 mysqlbinlog replay fails with ERROR 1146 when temp tables are used
When using CREATE TEMPORARY TABLE LIKE to create a temporary table, 
or using TRUNCATE to delete all rows of a temporary table, they 
did not set the tmp_table_used flag, and cause the omission of
"SET @@session.pseudo_thread_id" when dumping binlog with mysqlbinlog,
and cause error when replay the statements.
      
This patch fixed the problem by setting tmp_table_used in these two
cases. (Done by He Zhenxing 2009-01-12)


mysql-test/suite/binlog/r/binlog_tmp_table.result:
  Add test case for BUG#35583
mysql-test/suite/binlog/t/binlog_tmp_table.test:
  Add test case for BUG#35583
sql/sql_delete.cc:
  set thd->tmp_table_used when truncate temporary table
sql/sql_table.cc:
  set thd->tmp_table_used when using create like to create temporary tables
2009-01-28 14:35:12 +00:00
Alfranio Correia
d9ccc5b6bf auto-merge 5.1-bugteam --> 5.1-bugteam (local) 2009-01-28 10:37:12 +00:00
Alfranio Correia
0888d7c0a8 BUG#36391: "mysqlbinlog creates invalid charset statements"
The fix for BUG#20103 "Escaping with backslash does not work as expected"
was implemented too greedy though in that it not only changes the behavior
of backslashes within strings but in general, so disabling command shortcuts
like \G or \C (which in turn leads to Bug #36391: "mysqlbinlog creates invalid charset
statements").
      
The fix allows the escaping with backslash to take place only inside a string, 
thus enabling the execution of command shortcuts and presevering the fix for
BUG#20103.
2009-01-27 20:49:37 +00:00
Andrei Elkin
da8df39c14 Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
Fixing pb failures caused by mtr invokes the test with --tmpdir to which
there are  sensitive operations in the test
and setup_fake_relay_log.inc also needed --secure-file-priv for its own separate
directory.

Fixed with removing SELECT INTO OUTFILE and deploying --exec echo instead in the marco.
The test's opt file should contain --secure-file-priv=$MYSQL_TEST_DIR as the test
operations deal with files located in $MYSQL_TEST_DIR.

mysql-test/include/setup_fake_relay_log.inc:
  Refining setup_fake_relay_log.inc to not use --secure-file-priv sensitive feature.
  The latter should remain available for the test.
2009-01-27 13:33:30 +02:00
Horst Hunger
2255610125 Modified fix for bug#36876 due to reviews: See bug report. 2009-01-26 16:34:41 +01:00
Andrei Elkin
b33437f18a Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
Overriding a default value of --secure-file-priv on pb.mtr to be $MYSQLTEST_VARDIR which 
makes pb's mtr happy to execute the regression test for the bug.


mysql-test/suite/rpl/t/rpl_cross_version-master.opt:
  satisfying pb's mtr that uses --vardir to shm.
2009-01-26 17:24:43 +02:00
Andrei Elkin
5f7750ce6a Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
Overriding a default value of --secure-file-priv on pb.mtr with a value allowable 
the test to pass on pb.

mysql-test/suite/rpl/t/rpl_cross_version-master.opt:
  Overriding a default value of --secure-file-priv with a value allowable the test to pass on pb.
2009-01-26 16:49:42 +02:00
Andrei Elkin
db337eb8d8 Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
an additional changeset to remove printing a path name.

mysql-test/suite/rpl/r/rpl_cross_version.result:
  removing a local exec env dependency
mysql-test/suite/rpl/t/rpl_cross_version.test:
  refining a test to not have local exec env dependency.
2009-01-23 19:15:27 +02:00
Andrei Elkin
00ca9099e6 merge from 5.1-bt to a local tree. 2009-01-23 19:10:13 +02:00
Andrei Elkin
8c3389f386 Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
It's a regression issue.
The reason of the bug appeared to be an error introduced into 5.1 source code.
A piece of code in Create_file_log_event::do_apply_event() did not have test
coverage which made make test and pb unaware.
      
Fixed with inverting the old value of the return value from 
Create_file_log_event::do_apply_event().
The rpl test suite is extended with `rpl_cross_version' the file to hold 
regression cases similar to the current.


mysql-test/suite/rpl/r/rpl_cross_version.result:
  new results file
mysql-test/suite/rpl/t/rpl_cross_version-master.opt:
  options to the server to be able to start replication to itself
mysql-test/suite/rpl/t/rpl_cross_version.test:
  regression test for bug#31240.
sql/log_event.cc:
  Correcting the return value from  Create_file_log_event::do_apply_event()
2009-01-22 16:55:14 +02:00
Serge Kozlov
4562b69fed Bug#30128: The reason that sometimes events were executed because without STARTS
clause server fires immediately after creating event and time between create and delete
event sometimes is enough for firing. So adding STARTS clause moves first execution in
future after drop of event
1. Added STARTS clause for CREATE EVENT.
2. Updated result file.
2009-01-21 18:48:12 +03:00
He Zhenxing
45140a8ea3 Auto merge 2009-01-14 17:32:25 +08:00
He Zhenxing
f2c122bf90 BUG#41986 Replication slave does not pick up proper AUTO_INCREMENT value for Innodb tables
The next number (AUTO_INCREMENT) field of the table for write
rows events are not initialized, and cause some engines (innodb)
not correctly update the tables's auto_increment value.

This patch fixed this problem by honor next number fields if present.

mysql-test/extra/rpl_tests/rpl_auto_increment.test:
  Add test code for BUG#41986
mysql-test/suite/rpl/r/rpl_auto_increment.result:
  update test result file for BUG#41986
sql/log_event.cc:
  set next_number_field before writing rows, and reset next_number_field after finished writing rows
2009-01-14 16:27:32 +08:00
Matthias Leich
ec1b0874b6 Merge into actual tree 2009-01-13 16:42:37 +01:00
Matthias Leich
9cef800a07 Merge of fix for bug
41932 funcs_1: is_collation_character_set_applicability path too long for tar
into GCA tree
2009-01-13 14:26:24 +01:00
Patrick Crews
fed5e97733 Bug#41888: Test binlog.binlog_database causing binlog_innodb to fail on Pushbuild.
Added cleanup of status variables to the end of binlog_database.
Re-recorded .result file to account for cleanup statement.
NOTE:  binlog.binlog_innodb also has had an FLUSH STATUS; statement added to it as well, but
adding this cleanup as a preventative measure.
2009-01-12 18:45:35 -05:00
Horst Hunger
4e5177268a Patch for bug#36875: Inserted review results. 2009-01-08 19:13:57 +01:00
Timothy Smith
a58bc1bef3 Auto-merge from upstream 5.1-bugteam 2009-01-08 03:16:22 +01:00
Timothy Smith
88cd7a98a5 Fix a few problems after latest bunch of InnoDB snapshot changes:
The binlog_innodb test was sensitive to what tests ran before it.  Now run
FLUSH STATUS before performing operations that need to be checked.

sys_var_thd_ulong::update() was improperly casting an option value from
ulonglong to ulong before comparing it to the max allowed value.  On systems
where ulong and ulonglong are of different size, this caused values greater
than ULONG_MAX to wrap around (not be truncated to ULONG_MAX, which appears to
have been the intention of the original coder), and caused some checks to work
incorrectly.  This wasn't generally visible to the user, because later checks
would prevent the wrapped-around value from being used.  But it caused warning
messages to differ between 32- and 64-bit platforms.  Fix is to just remove the
cast.  Also added a DBUG_ASSERT to ensure that the value really is capped
properly before finally stuffing it into the ulong.
2009-01-08 03:06:54 +01:00
Matthias Leich
a97db2bb7d Fix of Bug#41932 funcs_1: is_collation_character_set_applicability path too long for tar 2009-01-07 22:38:03 +01:00
Sven Sandberg
28e672dbe7 BUG#41793: rpl_binlog_corruption disabled in main (needs new mtr)
Disabled rpl_binlog_corruption since it requires the new mtr,
which only exists in 5.1-rpl / 6.0-rpl.
Please re-enable the test in 5.1-rpl / 6.0-rpl.


mysql-test/suite/rpl/t/disabled.def:
  Disabled rpl_binlog_corruption since it requires the new mtr,
  which only exists in 5.1-rpl / 6.0-rpl.
2008-12-30 09:48:19 +01:00
Sven Sandberg
ba835f89ba BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event
Problem: When an Incident_log_event contains a bad incident number on disk,
the server crashes with an assertion.
Fix: Don't validate input with assertions. Use errors.

mysql-test/include/cleanup_fake_relay_log.inc:
  Added auxiliary file to restore things that setup_fake_relay_log.inc did.
mysql-test/include/setup_fake_relay_log.inc:
  Added auxiliary file to setup replication from an existing relay log.
mysql-test/std_data/bug40482-bin.000001:
  Binlog file for rpl.rpl_binlog_corruption
mysql-test/suite/rpl/t/rpl_binlog_corruption.test:
  New test file.
sql/log_event.cc:
  Check that the incident number is correct at the time the event is constructed.
  Do not assert it at the time it is printed.
sql/log_event.h:
  Incident_log_event::is_valid() should verify that the incident number is valid.
sql/rpl_constants.h:
  Incident numbers should be hard-coded, since they may appear in files.
2008-12-29 17:04:10 +01:00
Timothy Smith
4dc447e1ea Auto-merge from 5.1-bugteam 2008-12-19 01:56:58 +01:00
Sergey Glukhov
75344d3d3b Bug#29263 disabled storage engines omitted in SHOW ENGINES
Static disabled plugins|engines and dynamic plugins which installed but disabled
are not visible in I_S PLUGINS|ENGINES tables because they are not stored into
global plugin array.
The fix: add such plugins|engines to plugin array with PLUGIN_IS_DISABLED status.
I_S.ENGINES 'Transactions', 'XA', 'Savepoints' fields have NULL value in this case.


mysql-test/r/warnings_engine_disabled.result:
  test result
mysql-test/suite/funcs_1/r/is_columns_is.result:
  result fix
mysql-test/suite/funcs_1/r/is_engines.result:
  result fix
mysql-test/t/warnings_engine_disabled.test:
  test case
sql/sql_plugin.cc:
  store disabled plugins|engines into plugin array
sql/sql_plugin.h:
  added PLUGIN_IS_DISABLED flag
sql/sql_show.cc:
  added filling of 'engines'&'plugins' tables with disabled engines|plugins
2008-12-17 19:45:34 +04:00
Timothy Smith
22d47a6c36 Update test result file for binlog_innodb.result; the tested values (change in binlog_cache_use status variable) don't change, just the starting value is reduced. 2008-12-15 23:58:16 +01:00
Luis Soares
32c1790ba8 BUG#38826
Merge from 5.0-bugteam. Additional fix for unused ret variable warning.
2008-12-11 13:29:09 +00:00
Patrick Crews
7abb33a7c1 merge 2008-12-10 11:50:01 -05:00
Luis Soares
83b1f54508 push to 5.1-buteam tree. 2008-12-10 10:51:43 +00:00
Mattias Jonsson
4721520cdf merge 2008-12-10 09:11:59 +01:00
Patrick Crews
c81b519a10 merge 2008-12-09 13:34:17 -05:00
Patrick Crews
c130d8cdc3 merge 2008-12-09 12:21:22 -05:00
Horst Hunger
1da82b612a due to merge 2008-12-09 17:34:31 +01:00
Patrick Crews
e23900e1c3 merge 2008-12-09 11:05:01 -05:00
Sergey Glukhov
79a047c555 automerge 2008-12-09 19:52:50 +04:00
Sergey Glukhov
6673677803 updated test results
mysql-test/suite/parts/r/partition_bit_innodb.result:
  updated test result
mysql-test/suite/parts/r/partition_bit_myisam.result:
  updated test result
2008-12-09 19:31:22 +04:00
Horst Hunger
b53c4d0bac due to merge 2008-12-09 16:15:07 +01:00
Matthias Leich
1e189e52d9 Merge of fix for Bug 40904 into GCA tree 2008-12-09 15:11:53 +01:00
Andrei Elkin
ed7b41d60e Bug #33420 Test 'rpl_packet' fails randomly with changed "Exec_Master_Log_Pos"
binlog_row_mix_innodb_myisam resutls are corrected.
The last operations prior the dup error is
TRUNCATE table t2;
Therefore after
--error ER_DUP_ENTRY
INSERT INTO t2 select * from t1;
table t2 must be empty, and that is what the updated results confirm.


mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
  results changed due to Bug #33420 fixing.
2008-12-08 21:40:25 +02:00
Andrei Elkin
6dec2c1f6a merging 5.1-bt to a local tree. 2008-12-08 21:26:32 +02:00
Andrei Elkin
255418d978 Bug #40221 Replication failure on RBR + UPDATE the primary key
Extending bug#40221 regression test: 1. include INSERT 2. convert prim key + autoinc to
unique.

mysql-test/suite/binlog/r/binlog_innodb_row.result:
  results changed.
mysql-test/suite/binlog/t/binlog_innodb_row.test:
  Extending bug#40221 regression test to include the INSERT  dup key errored-out case.
2008-12-08 17:07:08 +02:00
Andrei Elkin
3383003787 merge bug#33420, bug#41173 on bt 5.0 -> 5.1 2008-12-08 16:42:59 +02:00
Matthias Leich
ce942b3995 Fix for Bug#40904 20 tests in 5.1 are disabled in a bad manner
- remove totally wrong (syntax) entries from disabled.def
- remove entries belonging to deleted tests from disabled.def
- correct the comments (correct the bug mentioned) of entries in disabled.def
- remove never completed tests which were accidently pushed
2008-12-08 15:36:42 +01:00
Mats Kindahl
b831d619bb Merging patch with 5.1-bugteam. 2008-12-08 11:32:24 +01:00
Horst Hunger
7586134814 Fix for Bug#36878 after review by Matthias: Only one line in the result files of 32 bit and 64 bit platforms differed and made problems on 64 bit machine with 32 bit mysqld. The removal of the separation into 32 bit and 64 bit versions of that test fixes also this problem. 2008-12-05 16:43:13 +01:00
Mats Kindahl
832770842e Bug #40116:
Uncommited changes are replicated and stay on slave after
rollback on master

Making test slightly more generic and robust.

mysql-test/suite/rpl/t/rpl_trigger.test:
  Adding code to check that InnoDB is available on slave as well.
  Making code slightly more generic.
2008-12-05 10:23:27 +01:00
Luis Soares
73326c1069 BUG#38826 Race in MYSQL_LOG::purge_logs is impossible to debug in production
BUG#39325 Server crash inside MYSQL_LOG::purge_first_log halts replicaiton

The patch reverses the order of the purging and updating events for log and
relay-log.info/index files respectively.

This solves the problem of having holes caused by crashes happening between updating
info/index files and purging logs.

This patch also contains an aditional test case for testing the crashing before purge logs.
      
NOTE1: This is a combined patch for BUG#38826 and BUG#39325. This patch is based on
bugteam tree and takes into account reviewers suggestions.

NOTE2: Merge from 5.0-bugteam
2008-12-04 14:07:56 +00:00
Mattias Jonsson
8adc9d1b86 Bug#40515: Query on a partitioned table does not return
'lock wait timeout exceeded'

Problem was a bug in the implementation of scan in partitioning
which masked the error code from the partition's handler.

Fixed by returning the value from the underlying handler.

mysql-test/suite/parts/r/partition_special_innodb.result:
  Bug#40515: Query on a partitioned table does not return
  'lock wait timeout exceeded'
  
  Updated test result
mysql-test/suite/parts/t/partition_special_innodb.test:
  Bug#40515: Query on a partitioned table does not return
  'lock wait timeout exceeded'
  
  Updated test case for covering the bug.
sql/ha_partition.cc:
  Bug#40515: Query on a partitioned table does not return
  'lock wait timeout exceeded'
  
  Removing redeclaration of result variable,
  which resulted in never returning the correct return value.
2008-12-04 10:47:25 +01:00
Patrick Crews
06a9022f30 Bug#40177: Test funcs_1.storedproc failing on Pushbuild
Altered param_check to disable warnings on system-sensitive operations
and added some notes / possible TODO
Re-recorded.result file to account for change
2008-12-03 21:44:07 -05:00
Mats Kindahl
43e9d5b3d5 Bug #40116: Uncommited changes are replicated and stay on slave
after rollback on master

When starting a transaction with a statement containing changes
to both transactional tables and non-transactional tables, the
statement is considered as non-transactional and is therefore
written directly to the binary log. This behaviour was present
in 5.0, and has propagated to 5.1.

If a trigger containing a change of a non-transactional table is
added to a transactional table, any changes to the transactional
table is "tainted" as non-transactional.

This patch solves the problem by removing the existing "hack" that
allows non-transactional statements appearing first in a transaction
to be written directly to the binary log. Instead, anything inside
a transaction is treaded as part of the transaction and not written
to the binary log until the transaction is committed.

mysql-test/suite/rpl/t/rpl_row_create_table.test:
  Removing positions from SHOW BINLOG EVENTS and using
  reset_master_and_slave to start on a fresh binary log each time.
mysql-test/suite/rpl/t/rpl_slave_skip.test:
  Adding explicit commit in AUTOCOMMIT=0 to make test work correctly.
mysql-test/suite/rpl/t/rpl_trigger.test:
  Adding test case for BUG#40116.
sql/log.cc:
  Changing commit logic in binlog_commit() to only commit when
  committing a real transaction or committing a punch transaction.
2008-12-03 20:55:49 +01:00