Commit graph

897 commits

Author SHA1 Message Date
Mats Kindahl
acfd0ff7de The test rpl_blackhole was executed even when
there were no blackhole installed. This patch
adds a check for that.

mysql-test/suite/rpl/t/rpl_blackhole.test:
  Adding include of have_blackhole.
2008-10-03 12:52:01 +02:00
Georgi Kodinov
2ab558dec6 Bug #38370: The test ndb.ndb_index_ordered fails with the community features on
The problem was caused by a wrong merge. Fixed by enabling the correct ndb variables
initialization.

mysql-test/suite/ndb/t/disabled.def:
  Bug #38370: remove disabled test case
sql/mysqld.cc:
  Bug #38370: corrected a wrong merge to have all the NDB variables intiialized
  correctly
2008-10-03 13:10:09 +03:00
Andrei Elkin
b41e081805 Bug #28786 binlog_killed.test fails: 'reset master' does not reset binlogging
The test failed originally -- did not reset binlogging - for the reason
identified by bug@15580.
However it never can be run on the embedded platfrom for yet another cause -
the embedded can not KILL query.
      
Comments added to the test particularly relating `reset master'
to the mentioned bug.

mysql-test/suite/binlog/t/binlog_killed.test:
  adding commets explaining why the test has to have include/not_embedded.inc guard.
2008-10-03 10:53:33 +03:00
Mats Kindahl
f2a7af7b5f Merging with 5.1-5.1.29-rc. 2008-10-03 09:36:22 +02:00
Mats Kindahl
690fd28adf Bug #38360: BLACKHOLE replication with RBR is broken
Incremental patch to add comments to test cases.
2008-10-02 21:13:15 +02:00
Matthias Leich
32488ef0a0 Merge 5.0 -> 5.1 of fix for Bug#38427
"Data too long" in some configurations, tests "<ENGINE>_func_view" fail
2008-10-02 14:12:08 +02:00
Matthias Leich
14f372c966 Fix for Bug#38427 "Data too long" in some configurations,
tests "<ENGINE>_func_view" fail
2008-10-02 13:47:16 +02:00
Mats Kindahl
8d9cf89e96 Bug #38360: BLACKHOLE replication with RBR is broken
The Blackhole engine did not support row-based replication
since the delete_row(), update_row(), and the index and range
searching functions were not implemented.

This patch adds row-based replication support for the
Blackhole engine by implementing the two functions mentioned
above, and making the engine pretend that it has found the
correct row to delete or update when executed from the slave
SQL thread by implementing index and range searching functions.

It is necessary to only pretend this for the SQL thread, since
a SELECT executed on the Blackhole engine will otherwise never
return EOF, causing a livelock.


mysql-test/extra/binlog_tests/blackhole.test:
  Blackhole now handles row-based replication.
mysql-test/extra/rpl_tests/rpl_blackhole.test:
  Test helper file for testing that blackhole actually
  writes something to the binary log on the slave.
mysql-test/suite/binlog/t/binlog_multi_engine.test:
  Replication now handles row-based replcation.
mysql-test/suite/rpl/t/rpl_blackhole.test:
  Test that Blackhole works with primary key, index, or none.
sql/log_event.cc:
  Correcting code to only touch filler bits and leave
  all other bits alone. It is necessary since there is
  no guarantee that the engine will be able to fill in
  the bits correctly (e.g., the blackhole engine).
storage/blackhole/ha_blackhole.cc:
  Adding definitions for update_row() and delete_row() to return OK
  when executed from the slave SQL thread with thd->query == NULL
  (indicating that row-based replication events are being processed).
  
  Changing rnd_next(), index_read(), index_read_idx(), and
  index_read_last() to return OK when executed from the slave SQL
  thread (faking that the row has been found so that processing
  proceeds to update/delete the row).
storage/blackhole/ha_blackhole.h:
  Enabling row capabilities for engine.
  Defining write_row(), update_row(), and delete_row().
  Making write_row() private (as it should be).
2008-10-02 11:02:38 +02:00
Ramil Kalimullin
6037e8ec49 Merge 2008-10-02 10:56:07 +05:00
Sergei Golubchik
cf4aa88993 merged 2008-10-01 23:20:07 +02:00
Matthias Leich
369206342c Fix for Bug#37744 Expected result of "<engine>_storedproc" test
is inconsistent
+ several improvements
Details:
- The subtest with assignment of floating point numbers to
  DECIMAL parameters in functions and procedures checks
  now that the final DECIMAL value is the same as if we assign
  the floating point numbers to columns, user variables etc.
  = The impact of math libs or truncation must be the same.
- Remove storage engine variants of this test because the
  stored procedure properties tested do not depend on
  the storage engine.
  Use the fastest storage engine (MEMORY) for any tables
  needed.
- reset global sort_buffer_size to startup value
- Partially improved formatting.
2008-10-01 19:50:08 +02:00
Georgi Kodinov
71e061db68 merged 5.1-5.1.29 -> 5.1-bugteam 2008-10-01 17:48:38 +03:00
Sven Sandberg
b920fb4512 BUG#38269: pushbuild gives valgrind error in ha_statistic_increment for rpl_temporary
Re-enabling failing test case because server logs were lost in pushbuild, so we need to run it again.


mysql-test/suite/rpl/t/disabled.def:
  Re-enabling failing test case because server logs were lost in pushbuild, so we need to run it again.
2008-10-01 16:02:04 +02:00
unknown
905003c535 Maria tests moved to separate suite. The suite made default for execution.
mysql-test/mysql-test-run.pl:
  The maria suite made default for execution.
mysql-test/suite/maria:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-autozerofill.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-big.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-big2.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-connect.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-gis-rtree-dynamic.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-gis-rtree-trans.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-gis-rtree.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-mvcc.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-no-logging.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-page-checksum.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-preload.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-purge.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-recover.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-recovery-big.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-recovery-bitmap.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-recovery-rtree-ft.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-recovery.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria-recovery2.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria2.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria3.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/maria_notembedded.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/r/ps_maria.result:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-autozerofill.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-big.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-big2.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-connect.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-gis-rtree-dynamic.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-gis-rtree-trans.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-gis-rtree.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-mvcc.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-no-logging.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-page-checksum.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-preload.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-purge.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-recover-master.opt:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-recover.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-recovery-big-master.opt:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-recovery-big.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-recovery-bitmap-master.opt:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-recovery-bitmap.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-recovery-master.opt:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-recovery-rtree-ft-master.opt:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-recovery-rtree-ft.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-recovery.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-recovery2-master.opt:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria-recovery2.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria2.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria3.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/maria_notembedded.test:
  Maria tests moved to separate suite.
mysql-test/suite/maria/t/ps_maria.test:
  Maria tests moved to separate suite.
2008-10-01 15:13:39 +03:00
Mattias Jonsson
22e0319620 merge 2008-10-01 12:14:55 +02:00
Georgi Kodinov
63a3ce6ef0 merged 5.1-5.1.29-rc -> 5.1-bugteam 2008-10-01 12:47:25 +03:00
Patrick Crews
446fd5044c Merge 5.0 -> 5.1 2008-09-30 15:32:35 -04:00
Davi Arnaut
0406d409ea Bug#34306: Can't make copy of log tables when server binary log is enabled
The problem is that when statement-based replication was enabled,
statements such as INSERT INTO .. SELECT FROM .. and CREATE TABLE
.. SELECT FROM need to grab a read lock on the source table that
does not permit concurrent inserts, which would in turn be denied
if the source table is a log table because log tables can't be
locked exclusively.

The solution is to not take such a lock when the source table is
a log table as it is unsafe to replicate log tables under statement
based replication. Furthermore, the read lock that does not permits
concurrent inserts is now only taken if statement-based replication
is enabled and if the source table is not a log table.

include/thr_lock.h:
  Introduce yet another lock type that my get upgraded depending
  on the binary log format. This is not a optimal solution but
  can be easily improved later.
mysql-test/r/log_tables.result:
  Add test case result for Bug#34306
mysql-test/suite/binlog/r/binlog_stm_row.result:
  Add test case result for Bug#34306
mysql-test/suite/binlog/t/binlog_stm_row.test:
  Add test case for Bug#34306
mysql-test/t/log_tables.test:
  Add test case for Bug#34306
sql/lock.cc:
  Assert that TL_READ_DEFAULT is not a real lock type.
sql/mysql_priv.h:
  Export new function.
sql/mysqld.cc:
  Remove using_update_log.
sql/sql_base.cc:
  Introduce function that returns the appropriate read lock type
  depending on how the statement is going to be replicated. It will
  only take a TL_READ_NO_INSERT log if the binary is enabled and the
  binary log format is statement-based and the table is not a log table.
sql/sql_parse.cc:
  Remove using_update_log.
sql/sql_update.cc:
  Use new function to choose read lock type.
sql/sql_yacc.yy:
  The lock type is now decided at open_tables time. This old behavior was
  actually misleading as the binary log format can be dynamically switched
  and this would not change for statements that have already been parsed
  when the binary log format is changed (ie: prepared statements).
2008-09-29 10:53:40 -03:00
Mattias Jonsson
1d583e50d8 merge 2008-09-23 12:24:30 +03:00
Patrick Crews
e411b5f595 Bug#37312 Make tests binlog_row_innodb_stat and binlog_stm_innodb_stat more robust
Trimmed some error-prone and variable portions of the test and added 'flush status' to ensure deterministic test
2008-09-22 15:15:52 -04:00
Mattias Jonsson
84760783e9 Bug#37803: Test "partition_alter2_innodb" exhausts resources (time and/or memory)
It is a very big test and as such it takes a lot of time.

Solution is to divide the test in two parts, one for testing increasing
column size and one for decreasing size.

The innodb branch does extended tests (that myisam is not) due to the
$do_pk_tests variabel, that is the reason why the innodb branch takes
longer.

No increase of memory usage in innodb was found when analyzing, (tested
with looping some millions time of create/drop and alter commands)

The memory exhaust discovered in the test is due to mysqltest which
stores the result in memory (result-file) and this was the biggest
result file in the test framework, so by dividing the test into two
parts also cuts the memory usage of mysqltest.

mysql-test/suite/parts/inc/partition_alter2_1.inc:
  Bug#37803: Test "partition_alter2_innodb" exhausts resources (time and/or memory)
  
  Splitted the test into two parts (one for increasing column size
  and one for decreasing)
  
  This leads to lower test case time (to avoid test case timeout)
  and less memory consumption of mysqltest (due to smaller result file)
mysql-test/suite/parts/inc/partition_alter2_2.inc:
  Bug#37803: Test "partition_alter2_innodb" exhausts resources (time and/or memory)
  
  Splitted the test into two parts (one for increasing column size
  and one for decreasing)
  
  This leads to lower test case time (to avoid test case timeout)
  and less memory consumption of mysqltest (due to smaller result file)
mysql-test/suite/parts/r/partition_alter2_1_innodb.result:
  Bug#37803: Test "partition_alter2_innodb" exhausts resources (time and/or memory)
  
  Splitted the test into two parts (one for increasing column size
  and one for decreasing)
  
  This leads to lower test case time (to avoid test case timeout)
  and less memory consumption of mysqltest (due to smaller result file)
mysql-test/suite/parts/r/partition_alter2_1_myisam.result:
  Bug#37803: Test "partition_alter2_innodb" exhausts resources (time and/or memory)
  
  Splitted the test into two parts (one for increasing column size
  and one for decreasing)
  
  This leads to lower test case time (to avoid test case timeout)
  and less memory consumption of mysqltest (due to smaller result file)
mysql-test/suite/parts/r/partition_alter2_2_innodb.result:
  Bug#37803: Test "partition_alter2_innodb" exhausts resources (time and/or memory)
  
  Splitted the test into two parts (one for increasing column size
  and one for decreasing)
  
  This leads to lower test case time (to avoid test case timeout)
  and less memory consumption of mysqltest (due to smaller result file)
mysql-test/suite/parts/r/partition_alter2_2_myisam.result:
  Bug#37803: Test "partition_alter2_innodb" exhausts resources (time and/or memory)
  
  Splitted the test into two parts (one for increasing column size
  and one for decreasing)
  
  This leads to lower test case time (to avoid test case timeout)
  and less memory consumption of mysqltest (due to smaller result file)
mysql-test/suite/parts/t/disabled.def:
  Bug#37803: Test "partition_alter2_innodb" exhausts resources (time and/or memory)
  
  Removed the test completely (since it has never been supported)
mysql-test/suite/parts/t/partition_alter2_1_innodb.test:
  Bug#37803: Test "partition_alter2_innodb" exhausts resources (time and/or memory)
  
  Splitted the test into two parts (one for increasing column size
  and one for decreasing)
  
  This leads to lower test case time (to avoid test case timeout)
  and less memory consumption of mysqltest (due to smaller result file)
mysql-test/suite/parts/t/partition_alter2_1_myisam.test:
  Bug#37803: Test "partition_alter2_innodb" exhausts resources (time and/or memory)
  
  Splitted the test into two parts (one for increasing column size
  and one for decreasing)
  
  This leads to lower test case time (to avoid test case timeout)
  and less memory consumption of mysqltest (due to smaller result file)
mysql-test/suite/parts/t/partition_alter2_2_innodb.test:
  Bug#37803: Test "partition_alter2_innodb" exhausts resources (time and/or memory)
  
  Splitted the test into two parts (one for increasing column size
  and one for decreasing)
  
  This leads to lower test case time (to avoid test case timeout)
  and less memory consumption of mysqltest (due to smaller result file)
mysql-test/suite/parts/t/partition_alter2_2_myisam.test:
  Bug#37803: Test "partition_alter2_innodb" exhausts resources (time and/or memory)
  
  Splitted the test into two parts (one for increasing column size
  and one for decreasing)
  
  This leads to lower test case time (to avoid test case timeout)
  and less memory consumption of mysqltest (due to smaller result file)
mysql-test/suite/parts/t/partition_alter2_ndb.test:
  Bug#37803: Test "partition_alter2_innodb" exhausts resources (time and/or memory)
  
  Removing test since ndb has never supported these tests
2008-09-18 12:02:48 +03:00
Chad MILLER
cf2b5e8b5b Merge Bug#37312. 2008-09-18 03:57:59 -04:00
Patrick Crews
7eb271ba43 Bug#39803 Test rpl.rpl_truncate_7ndb_2 failing
Fixed bad path in .test file
Moved test to suite/rpl_ndb (per Cluster QA)
Re-recorded .result file to updated expected results.
2008-09-15 15:13:43 -04:00
Martin Skold
08421a83ba bug #31231 mysql_alter_table() tries to drop a non-existing table
bug#31233 mysql_alter_table() fails to drop UNIQUE KEY

mysql-test/suite/ndb/r/ndb_alter_table.result:
  bug#31233 mysql_alter_table() fails to drop UNIQUE KEY: added test cases
mysql-test/suite/ndb/t/ndb_alter_table.test:
  bug#31233 mysql_alter_table() fails to drop UNIQUE KEY: added test cases
sql/ha_ndbcluster.cc:
  bug#31233 mysql_alter_table() fails to drop UNIQUE KEY: Removed check for non-pk
  tables, not needed when mysql_alter_table checks apropriate flags
sql/mysql_priv.h:
  bug #31231  mysql_alter_table() tries to drop a non-existing table: added FRM_ONLY
  flag
sql/sql_table.cc:
  bug #31231  mysql_alter_table() tries to drop a non-existing table
  Don't invoke handler for tables defined with FRM_ONLY flag.
  bug#31233 mysql_alter_table() fails to drop UNIQUE KEY
  When a table is defined without an explicit primary key
  mysql will choose the first found unique index defined over
  non-nullable fields (if such an index exists). This means
  that if such an index is added (the first) or dropped (the last)
  through an alter table, this equals adding or dropping a primary key.
  The implementation for on-line add/drop index did not consider
  this semantics. This patch ensures that only handlers with the
   correctly defined flags (see handler.h for explanation of the flags):
  HA_ONLINE_ADD_PK_INDEX
  HA_ONLINE_ADD_PK_INDEX_NO_WRITES
  HA_ONLINE_DROP_PK_INDEX
  HA_ONLINE_DROP_PK_INDEX_NO_WRITES
  are invoked for such on-line operations. All others handlers must
  perform a full (offline) alter table.
2008-09-15 11:19:56 +02:00
Georgi Kodinov
9d668de5c6 merged 5.1.29-rc into 5.1-bugteam 2008-09-10 12:44:21 +03:00
Mats Kindahl
589355f0f5 Bug #39106:
SUPER is not required to change binlog format for session

A user without SUPER privileges can change the value of the
session variable BINLOG_FORMAT, causing problems for a DBA.

This changeset requires a user to have SUPER privileges to
change the value of the session variable BINLOG_FORMAT, and
not only the global variable BINLOG_FORMAT.


mysql-test/suite/binlog/t/binlog_grant.test:
  Adding test to test grants needed for SQL_LOG_BIN and BINLOG_FORMAT.
sql/set_var.cc:
  Adding code to check that user has SUPER permission
  needed to change the value of BINLOG_FORMAT.
sql/set_var.h:
  Adding function sys_var_thd_binlog_format::check()
2008-09-09 12:19:31 +02:00
Chad MILLER
9f3ca227ff Bug#37312: Make test binlog_{row,stm}_innodb_stat more robust
The size of the Innodb_buffer_pool_pages differs by one byte on row versus statement
log, so neuter the last position of the stringified decimal representation.  Innobase
says the size isn't very important in any case.

Also, split out the "mixed" format to its own file, as mtr seems to dislike having only 
stm and row but not mix.
2008-09-08 16:23:55 -04:00
Mattias Jonsson
be63f0af4f Bug#38804: Query deadlock causes all tables to be inaccessible.
Problem was a mutex added in bug n 27405 for solving a problem
with auto_increment in partitioned innodb tables.
(in ha_partition::write_row over partitions file->ha_write_row)

Solution is to use the patch for bug#33479, which refines the
usage of mutexes for auto_increment.

Backport of bug-33479 from 6.0:

Bug-33479: auto_increment failures in partitioning

Several problems with auto_increment in partitioning
(with MyISAM, InnoDB. Locking issues, not handling
multi-row INSERTs properly etc.)

Changed the auto_increment handling for partitioning:
Added a ha_data variable in table_share for storage engine specific data
such as auto_increment value handling in partitioning, also see WL 4305
and using the ha_data->mutex to lock around read + update.

The idea is this:
Store the table's reserved auto_increment value in
the TABLE_SHARE and use a mutex to, lock it for reading and updating it
and unlocking it, in one block. Only accessing all partitions
when it is not initialized.
Also allow reservations of ranges, and if no one has done a reservation
afterwards, lower the reservation to what was actually used after
the statement is done (via release_auto_increment from WL 3146).
The lock is kept from the first reservation if it is statement based
replication and a multi-row INSERT statement where the number of
candidate rows to insert is not known in advance (like INSERT SELECT,
LOAD DATA, unlike INSERT VALUES (row1), (row2),,(rowN)).

This should also lead to better concurrancy (no need to have a mutex
protection around write_row in all cases)
and work with any local storage engine.

mysql-test/suite/parts/inc/partition_auto_increment.inc:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: auto_increment failures in partitioning
  
  Test source file for testing auto_increment
mysql-test/suite/parts/r/partition_auto_increment_archive.result:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: auto_increment failures in partitioning
  
  result file for testing auto_increment
mysql-test/suite/parts/r/partition_auto_increment_blackhole.result:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: auto_increment failures in partitioning
  
  result file for testing auto_increment
mysql-test/suite/parts/r/partition_auto_increment_innodb.result:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: auto_increment failures in partitioning
  
  result file for testing auto_increment
mysql-test/suite/parts/r/partition_auto_increment_memory.result:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: auto_increment failures in partitioning
  
  result file for testing auto_increment
mysql-test/suite/parts/r/partition_auto_increment_myisam.result:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: auto_increment failures in partitioning
  
  result file for testing auto_increment
mysql-test/suite/parts/r/partition_auto_increment_ndb.result:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: auto_increment failures in partitioning
  
  result file for testing auto_increment
mysql-test/suite/parts/t/partition_auto_increment_archive.test:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: auto_increment failures in partitioning
  
  test file for testing auto_increment
mysql-test/suite/parts/t/partition_auto_increment_blackhole.test:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: auto_increment failures in partitioning
  
  test file for testing auto_increment
mysql-test/suite/parts/t/partition_auto_increment_innodb.test:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: auto_increment failures in partitioning
  
  test file for testing auto_increment
mysql-test/suite/parts/t/partition_auto_increment_memory.test:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: auto_increment failures in partitioning
  
  test file for testing auto_increment
mysql-test/suite/parts/t/partition_auto_increment_myisam.test:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: auto_increment failures in partitioning
  
  test file for testing auto_increment
mysql-test/suite/parts/t/partition_auto_increment_ndb.test:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: auto_increment failures in partitioning
  
  test file for testing auto_increment
sql/ha_partition.cc:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: Failures using auto_increment and partitioning
  
  Changed ha_partition::get_auto_increment from file->get_auto_increment
  to file->info(HA_AUTO_STATUS), since it is works better with InnoDB
  (InnoDB can have issues with partitioning and auto_increment,
  where get_auto_increment sometimes can return a non updated value.)
  
  Using the new table_share->ha_data for keeping the auto_increment
  value, shared by all instances of the same table.
  It is read+updated when holding a auto_increment specific mutex.
  Also added release_auto_increment to decrease gaps if possible.
  And a lock for multi-row INSERT statements where the number of candidate
  rows to insert is not known in advance (like INSERT SELECT, LOAD DATA;
  Unlike INSERT INTO (row1),(row2),,(rowN)).
  Fixed a small bug, copied++ to (*copied)++ and the same for deleted.
  Changed from current_thd, to ha_thd()
sql/ha_partition.h:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: Failures using auto_increment and partitioning
  
  Added a new struct HA_DATA_PARTITION to be used in table_share->ha_data
  Added a private function to set auto_increment values if needed
  Removed the restore_auto_increment (the hander version is better)
  Added lock/unlock functions for auto_increment handling.
  Changed copied/deleted to const.
sql/handler.h:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: auto_increment failures in partitioning
  
  Added const for changed_partitions
  Added comments about SQLCOM_TRUNCATE for delete_all_rows
sql/table.h:
  Bug#38804: Query deadlock causes all tables to be inaccessible.
  Backporting from 6.0 of:
  Bug-33479: Failures using auto_increment and partitioning
  
  Added a variable in table_share: ha_data for storage of storage engine
  specific data (such as auto_increment handling in partitioning).
2008-09-08 15:30:01 +02:00
Mats Kindahl
dbbb48c3c7 BUG#32709: Assertion failed: trx_data->empty(), file log.cc
Incremental fixes: updating a comment and fixing a result file.

sql/sql_class.h:
  Changing comment.
2008-09-03 22:52:54 +02:00
Mats Kindahl
02a4354044 Bug #32709: Assertion failed: trx_data->empty(), file log.cc
The assertion indicates that some data was left in the transaction
cache when the server was shut down, which means that a previous
statement did not commit or rollback correctly.

What happened was that a bug in the rollback of a transactional
table caused the transaction cache to be emptied, but not reset.
The error can be triggered by having a failing UPDATE or INSERT,
on a transactional table, causing an implicit rollback.

Fixed by always flushing the pending event to reset the state
properly.


mysql-test/extra/rpl_tests/rpl_row_basic.test:
  Testing that a failed update (that writes some rows to the
  transaction cache) does not cause the transaction cache to
  hold on to the data or forget to reset the transaction cache.
sql/log.cc:
  Added call to remove pending event when the transaction cache
  is emptied instead of written to binary log. The call will also
  clear the outstanding table map count so that the cache is not
  left it in a state of "empty but not reset".
  
  Added function MYSQL_BIN_LOG::remove_pending_rows_event().
sql/log.h:
  Added function MYSQL_BIN_LOG::remove_pending_rows_event().
sql/sql_class.cc:
  Adding function THD::binlog_remove_pending_rows_event().
sql/sql_class.h:
  Adding function THD::binlog_remove_pending_rows_event().
2008-09-03 22:04:07 +02:00
Mats Kindahl
1017b6c8be Updating result files for rpl_ndb test suite. 2008-09-03 12:27:01 +02:00
Andrei Elkin
2f8c0a1675 Bug#36099 replicate-do-db affects replaying RBR events with mysqlbinlog
The replication filtering rules were inappropiately applied when
executing BINLOG pseudo-query.  The rules are supposed to be active
only at times when the slave's sql thread executes an event.
            
Fixed with correcting a condition to call replication rules only if
the slave sql thread executes the event.

mysql-test/suite/rpl/r/rpl_binlog_query_filter_rules.result:
  new result file
mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules-master.opt:
  a filtering option that would refuse to replicate a row event of the main test on
  slave
mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules.test:
  a regression test for the bug
sql/log_event.cc:
  avoiding to call the filtering rules if the execution thread is not a slave.
2008-09-03 13:01:18 +03:00
Mats Kindahl
dbe008cc8c Post-merge fixes to update result files. 2008-09-01 11:27:41 +02:00
Mats Kindahl
d6d2f77f06 Merging 5.0-bugteam into 5.1-bugteam 2008-09-01 11:00:52 +02:00
Matthias Leich
6c85783c20 Merge into local tree 2008-08-28 13:39:53 +02:00
Mats Kindahl
84b81e6c95 Merging 5.1 into 5.1-rpl-merge 2008-08-27 20:52:44 +02:00
Mats Kindahl
fc31480fac Automerge 2008-08-27 16:21:10 +02:00
Mats Kindahl
554203f60b Result file change. 2008-08-27 16:17:55 +02:00
Mats Kindahl
f295ea2f02 Automerge 2008-08-27 11:05:04 +02:00
Mats Kindahl
2d62bacf28 Merge b38773-5.1-rpl-merge into 5.1-rpl-merge 2008-08-27 11:02:37 +02:00
Mats Kindahl
0203409175 Bug #38773: DROP DATABASE cause switch to stmt-mode when there are temporary
tables open

When executing a DROP DATABASE statement in ROW mode and having temporary
tables open at the same time, the existance of temporary tables prevent
the server from switching back to row mode after temporarily switching to
statement mode to handle the logging of the statement.

Fixed the problem by removing the code to switch to statement mode and added
code to temporarily disable the binary log while dropping the objects in the
database.


mysql-test/extra/binlog_tests/database.test:
  Added test to ensure that DROP DATABASE does not affect the replication mode.
sql/sql_db.cc:
  Removed code that clears the current_stmt_binlog_row_based flag.
  Added code to disable the binary log while dropping the objects
  in a database.
2008-08-27 10:40:11 +02:00
He Zhenxing
4e6de6ed27 Fix cherry picking patch of BUG#37051
mysql-test/include/wait_for_slave_sql_error_and_skip.inc:
  include/start_slave.inc not exist yet, changed to start slave and source include/wait_for_slave_to_start.inc
mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result:
  update result
2008-08-26 20:11:56 +08:00
He Zhenxing
923f61039e Cherry picking patch for BUG#37051 2008-08-26 18:01:49 +08:00
Alexander Barkov
d45e478cc7 Merging latest changes. 2008-08-26 14:58:23 +05:00
Matthias Leich
1ffdec61a1 Fix for Bug#38270 Test "processlist_priv_ps" fails on varying "processlist" output
Details of the fix:
- wrong command and state in processlist -> insert poll routine
- unexpected additional session -> abort if unexpected session found
2008-08-21 16:38:49 +02:00
Mattias Jonsson
5d5d1a814d Backport of patch for Bug#34604 (from 6.0)
post push fix for bug#20129, test failed due to non existing
source files.

mysql-test/Makefile.am:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Test parts.partition_repair_myisam failed because the corrupted
  pre fabricated files was not included in the dist-file.
mysql-test/suite/parts/r/partition_special_innodb.result:
  Bug#34604: hander::ha_rnd_end(): Assertion inited==RND failed
  
  updated result file
mysql-test/suite/parts/t/partition_special_innodb-master.opt:
  Bug#34604: hander::ha_rnd_end(): Assertion inited==RND failed
  
  Added parameter to speed up the test.
  Set to 2 seconds to be working on slow machines.
mysql-test/suite/parts/t/partition_special_innodb.test:
  Bug#34604: hander::ha_rnd_end(): Assertion inited==RND failed
  
  Added test for verifying the bug (without the patch in
  ha_partition.cc, this crashes a debug compiled server)
sql/ha_partition.cc:
  Bug#34604: hander::ha_rnd_end(): Assertion inited==RND failed
  
  In some cases error was not properly propagated through
  ha_partition::rnd_next.
  
  Will now return the error code from the partitions rnd_next and
  update m_part_spec.start_part and m_last_part properly.
  This makes the inited state to be correct.
2008-08-20 17:29:14 +02:00
Sven Sandberg
bbb45c158f Bug#35807 - INSTALL PLUGIN replicates row-based, but not stmt-based
INSTALL PLUGIN and UNINSTALL PLUGIN worked with statement-based and
mixed-mode replication only, but not with row-based replication.

There is no statement-based replication of these statements.
But there was row-based replication of the inserts and deletes
to and from the mysql.plugin table.

The fix is to suppress binlogging during insert and delete to
and from the mysql.plugin table.


mysql-test/suite/rpl/r/rpl_plugin_load.result:
  new result file
mysql-test/suite/rpl/t/rpl_plugin_load-master.opt:
  new opt file
mysql-test/suite/rpl/t/rpl_plugin_load-slave.opt:
  new opt file
mysql-test/suite/rpl/t/rpl_plugin_load.test:
  new test
sql/sql_plugin.cc:
  Suppress binlogging during insert and delete to/from the
  mysql.plugin table.
2008-08-19 17:35:56 +02:00
Mattias Jonsson
55bf4addb6 merge 2008-08-19 12:26:30 +02:00
Mattias Jonsson
ad15cd6882 Post push fix for valgrind warning in ha_partition.cc
Bug#35161
Fixed memory leak when failing to open a partition.

Bug#20129
Added tests for verifying REPAIR PARTITION.

mysql-test/std_data/parts/t1_will_crash#P#p1_first_1024.MYD:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
  
  (see mysql-test/suite/parts/t/partition_repair_myisam.test
  Created by:
  CREATE TABLE t1_will_crash (
    a VARCHAR(255),
    b INT,
    c LONGTEXT,
    PRIMARY KEY (a, b))ENGINE=MyISAM
  PARTITION BY HASH (b)
  PARTITIONS 7;
  INSERT INTO t1_will_crash VALUES ...
  and then
  head -c 1024 var/master-data/test/t1_will_crash#P#p1.MYD
  into this file.
mysql-test/std_data/parts/t1_will_crash#P#p2.MYD:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
  
  (see mysql-test/suite/parts/t/partition_repair_myisam.test)
  copy of file right after _mi_mark_file_changed in mi_write
  was done.
mysql-test/std_data/parts/t1_will_crash#P#p2.MYI:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
  
  (see mysql-test/suite/parts/t/partition_repair_myisam.test)
  copy of file right after _mi_mark_file_changed in mi_write
  was done.
mysql-test/std_data/parts/t1_will_crash#P#p3.MYI:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
  
  (see mysql-test/suite/parts/t/partition_repair_myisam.test)
  copy of file right after *share->write_record was done.
mysql-test/std_data/parts/t1_will_crash#P#p4.MYI:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
  
  (see mysql-test/suite/parts/t/partition_repair_myisam.test)
  copy of file right after flush_cached_blocks
mysql-test/std_data/parts/t1_will_crash#P#p6.MYD:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
  
  (see mysql-test/suite/parts/t/partition_repair_myisam.test)
  copy of file right after _mi_write_part_record in
  write_dynamic_record returned for the first time.
mysql-test/std_data/parts/t1_will_crash#P#p6_2.MYD:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
  
  (see mysql-test/suite/parts/t/partition_repair_myisam.test)
  copy of file right after _mi_write_part_record in
  write_dynamic_record returned for the second time.
mysql-test/std_data/parts/t1_will_crash#P#p6_3.MYD:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
  
  (see mysql-test/suite/parts/t/partition_repair_myisam.test)
  copy of file right after _mi_write_part_record in
  write_dynamic_record returned for the third time.
  (data file fully updated).
mysql-test/suite/parts/r/partition_recover_myisam.result:
  Bug#35161
  
  Renamed since it was a test of recover
  and to make repair free for use without
  --myisam-recover
mysql-test/suite/parts/r/partition_repair_myisam.result:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
  
  New result file for testing CHECK/REPAIR of partitioned tables
mysql-test/suite/parts/t/partition_recover_myisam-master.opt:
  Bug#35161
  
  Renamed since it was a test of recover
  and to make repair free for use without
  --myisam-recover
mysql-test/suite/parts/t/partition_recover_myisam.test:
  Bug#35161
  
  Renamed since it was a test of recover
  and to make repair free for use without
  --myisam-recover
mysql-test/suite/parts/t/partition_repair_myisam.test:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... not working
  
  New test file for testing CHECK/REPAIR of partitioned tables
sql/ha_partition.cc:
  Bug#35161
  
  Fix of memory leak when open of partition failed.
2008-08-19 11:44:22 +02:00
Chad MILLER
86fd86ed98 Merge from 5.0-bugteam. 2008-08-15 16:42:29 -04:00
Davi Arnaut
986a27fb03 Merge from mysql-5.1 main. 2008-08-15 12:58:19 -03:00
He Zhenxing
7bf8e29b99 Auto merge from mysql-5.1 main 2008-08-14 14:27:18 +08:00
Matthias Leich
d23e8e06a1 Fix for Bug#37853
Test "funcs_1.processlist_val_ps" fails in various ways
+ corrections of logic in poll routines
+ minor improvements
2008-08-13 21:44:54 +02:00
Serge Kozlov
f2188dc323 Bug#18817, removing --binlog-format option from .opt files 2008-08-13 23:12:51 +04:00
Mattias Jonsson
642bf9022a manual merge of bug#37402 2008-08-12 12:26:23 +02:00
He Zhenxing
44d0fcddf1 Apply tomas's patch to fix rpl_row_basic.test, this can fix BUG#37884,
BUG#38369, enable rpl_row_basic_7ndb test
2008-08-12 17:09:36 +08:00
Mattias Jonsson
bdab488391 Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt

Updated result files after merge

mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Updated result file after merge
mysql-test/suite/parts/t/disabled.def:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Enabled two tests after fixing the bug.
2008-08-12 10:02:30 +02:00
Mattias Jonsson
1c06de1fd6 manual merge of Bug#20129 into 5.1-bugteam 2008-08-11 20:06:08 +02:00
Mattias Jonsson
f50c4207f2 Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt

The main problem was that ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR
PARTITION took another code path (over mysql_alter_table instead of
mysql_admin_table) which differs in two ways:
1) alter table opens the tables in a different way than admin tables do
   resulting in returning with error before it tried the command
2) alter table does not start to send any diagnostic rows to the client
   which the lower admin functions continue to use -> resulting in
   assertion crash

The fix:
Remapped ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION to use
the same code path as ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE t.
Adding check in mysql_admin_table to setup the partition list for
which partitions that should be used.


Partitioned tables will still not work with
REPAIR TABLE/PARTITION USE_FRM, since that requires moving partitions
to tables, REPAIR TABLE t USE_FRM, and check that the data still
fulfills the partitioning function and then move the table back to
being a partition.

NOTE: I have removed the following functions from the handler
interface:
analyze_partitions, check_partitions, optimize_partitions,
repair_partitions
Since they are not longer needed.
THIS ALTERS THE STORAGE ENGINE API

mysql-test/r/handler_innodb.result:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Added a note result row.
mysql-test/r/innodb.result:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Added a note result row.
mysql-test/r/innodb_mysql.result:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Added a note result row.
mysql-test/r/partition.result:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
  tables.
mysql-test/r/trigger-trans.result:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Added a note result row.
mysql-test/suite/ndb/r/ndb_partition_key.result:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
  tables.
mysql-test/suite/ndb/t/ndb_partition_key.test:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
  tables.
mysql-test/suite/parts/inc/partition_alter4.inc:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
  tables.
mysql-test/suite/parts/r/partition_alter4_innodb.result:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
  tables.
mysql-test/suite/parts/r/partition_alter4_myisam.result:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
  tables.
mysql-test/suite/rpl/r/rpl_failed_optimize.result:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Added a note result row.
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Added a note result row.
mysql-test/t/partition.test:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
  tables.
sql/ha_partition.cc:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Added a function for returning admin commands result rows
  Updated handle_opt_partitions to handle admin commands result rows,
  and some error filtering (as mysql_admin_table do).
  
  Removed the functions analyze/check/optimize/repair_partitions
  since they have no longer any use.
sql/ha_partition.h:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Removed analyze/check/optimize/repair_partitions since they
  are no longer are needed.
sql/handler.cc:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Removed analyze/check/optimize/repair_partitions since they
  are no longer are needed.
sql/handler.h:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Removed analyze/check/optimize/repair_partitions since they
  are no longer are needed.
sql/mysql_priv.h:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Added set_part_state for reuse of code in mysql_admin_table.
  (Originally fond in sql/sql_partition.cc:prep_alter_part_table)
sql/protocol.cc:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Added one assert and a debug print.
sql/sql_partition.cc:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Refactored code for setting up partition state, set_part_state,
  now used in both prep_alter_part_table and
  sql_table.cc:mysql_admin_table.
  Removed code for handling ANALYZE/CHECK/OPTIMIZE/REPAIR partitions,
  since it is now handled by mysql_admin_table.
sql/sql_table.cc:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Added functionality in mysql_admin_table to work with partitioned
  tables.
  Fixed a possible assertion bug for HA_ADMIN_TRY_ALTER
  (If analyze would output a row, it fails since the row was already
  started).
sql/sql_yacc.yy:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Remapped ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION
  to use the same code path as ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE
  instead of taking the ALTER TABLE path.
  Added reset of alter_info for ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE
  since it is now used by partitioned tables.
storage/myisam/mi_check.c:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Changed warning message from "Found X parts  Should be: Y parts"
  to "Found X key parts. Should be Y", since it could be confusing
  with partitioned tables.
2008-08-11 20:02:03 +02:00
Mattias Jonsson
2ace7dc939 merge into an updated 5.1-bugteam tree 2008-08-11 16:15:39 +02:00
Sven Sandberg
5101f124e8 merge 5.1 main -> 5.1-rpl-testfixes
all changes automerged without conflicts
2008-07-29 19:55:46 +02:00
Sven Sandberg
c6bf7ead8f BUG#38068: binlog_stm_binlog fails sporadically in pushbuild
Post-push fix: updated some result files that were affected
by the previous fix to this bug.


mysql-test/suite/binlog/r/binlog_killed_simulate.result:
  Updated result file.
mysql-test/suite/binlog/r/binlog_row_binlog.result:
  Updated result file.
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
  Updated result file.
mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result:
  Updated result file.
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  Updated result file.
mysql-test/suite/rpl/r/rpl_stm_log.result:
  Updated result file.
2008-07-29 17:36:13 +02:00
Alexander Barkov
480554a76a Bug#36597 Testsuite "jp": Suspicious results for some tests using sjis
Problem: Extra new line appeared in jisx0208_sjis2.dat in a mistake, which
broke jp_convert_sjis and jp_select_sjis tests.
Fix: removing extra line

  mysql-test/suite/jp/std_data/jisx0208_sjis2.dat:
      removing wrong extra new line

  mysql-test/suite/jp/t/disabled.def:     
      activating disabled tests
2008-07-29 10:43:57 +05:00
Patrick Crews
e195149b43 Bug#38383 - Certain funcs_1 trig tests are failing on Pushbuild.
Removing duplicate 'setup' portions of these include files.  Likely an editor error created dupe lines.
This is causing many Pushbuild errors
2008-07-25 13:14:52 -04:00
Georgi Kodinov
c7fc78c3b2 merge of 5.1-main to 5.1-bugteam 2008-07-25 18:06:47 +03:00
Georgi Kodinov
e113042588 Disabled 5.1 tests (and reported bugs)
mysql-test/suite/ndb/t/disabled.def:
  disabled failing test in 5.1-bzr
mysql-test/suite/rpl_ndb/t/disabled.def:
  disabled failing test in 5.1-bzr
2008-07-25 13:32:05 +03:00
Horst Hunger
94ba5b8914 Merge from parent. 2008-07-24 09:49:29 +02:00
Sven Sandberg
159505f82b BUG#38068: binlog_stm_binlog fails sporadically in pushbuild
Problem: binlog_stm_binlog runs INSERT DELAYED queries, and
then prints the contents of the binlog. Before checking the
contents of the binlog, the test waits until the rows have
appeared in the table. However, this is not enough, since
INSERT DELAYED does not write rows to the binlog at the same
time as it writes them to the table. So there is a race.
Fix: Add a FLUSH TABLES before SHOW BINLOG EVENTS. That
waits until the insert_delayed thread is done.


mysql-test/extra/binlog_tests/binlog_insert_delayed.test:
  - Added FLUSH TABLES, so that SHOW BINLOG EVENTS becomes
  deterministic.
  - Added comments.
  - Removed unnecessary 'set @@session.auto_increment_increment'
  statements.
  - Removed unnecessary check that the number of rows inserted
  to the table is 11.
mysql-test/suite/binlog/r/binlog_stm_binlog.result:
  updated result file
2008-07-23 18:56:39 +02:00
Sven Sandberg
d8c838c27a BUG#37733: rpl.rpl_flushlog_loop 'row' fails sporadically on pushbuild
BUG#37884: rpl_row_basic_2myisam and rpl_row_basic_3innodb fail sporadically in pushbuild
These have been fixed in 5.1-rpl. Re-applying fix for BUG#37884
in 5.1-bugteam, and disabling rpl_flushlog_loop for BUG#37733 in
5.1-bugteam.


mysql-test/extra/rpl_tests/rpl_row_basic.test:
  Missing sync_slave_with_master added.
mysql-test/suite/rpl/t/disabled.def:
  Disabling rpl_flushlog_loop until the fixed version gets
  merged from 5.1-rpl
2008-07-23 16:34:02 +02:00
Horst Hunger
ea4b396303 Final fix for bug#36522 in 5.1. This new fix was necessary due to fix of bug 37708. 2008-07-23 16:06:44 +02:00
Sven Sandberg
7978905c5c BUG#37493: rpl_trunc_temp.test nondeterministic
Problem: the test waits for a 'DROP TEMPORARY TABLE' event to
appear in the master's binlog, then checks on the slave whether
the number of temporary tables has decreased. The slave does
not sync, causing a race.
Fix: check for the 'DROP TEMPORARY TABLE' event on slave
instead of on master.


mysql-test/suite/rpl/t/rpl_trunc_temp.test:
  - Fixed BUG#37493 by waiting for the event on the slave
  instead of on the master.
  - Added comments.
2008-07-23 12:13:55 +02:00
Kristofer Pettersson
14afcb436f merge 5.1->5.1-bugteam 2008-07-22 12:56:36 +02:00
Sven Sandberg
6334196bd7 BUG#38269: pushbuild gives valgrind error in ha_statistic_increment for rpl_temporary
This does not fix the bug. It only disables the failing test.


mysql-test/suite/rpl/t/disabled.def:
  disable rpl_temporary
2008-07-21 21:05:06 +02:00
Timothy Smith
9e6621b861 Up-merge of merges, some criss-cross resolved with --weave. 2008-07-19 02:31:33 -06:00
Sven Sandberg
b51c2eb3aa BUG#38077: rpl_incident At line 22: query 'SELECT * ...' Table 'test.t1' doesn't exist
This is not a fix to the bug. It only adds debug info, so
that we can analyze the bug better next time it happens.
Please revert the patch after the bug is fixed.


mysql-test/suite/rpl/t/rpl_incident.test:
  Added debug info. This will only be printed if the
  test fails.
2008-07-18 15:07:14 +02:00
Andrei Elkin
7d1bc0a4f9 Bug #36818 rpl_server_id1 fails expecting slave has stopped
the reason for the failure is that io thread passes through a sequence of state
changes before it eventually got stuck at the expect running state as NO.
It's unreasonble to wait for the running status while the whole idea of the test is
to get to the IO thread error.

Fixed with changing the waiting condition.

mysql-test/suite/rpl/r/rpl_server_id1.result:
  results changed
mysql-test/suite/rpl/t/disabled.def:
  re-enabling rpl_server_id1
mysql-test/suite/rpl/t/rpl_server_id1.test:
  deploying the exact waiting condition i.e to wait for the slave io error.
2008-07-18 14:53:16 +03:00
Sven Sandberg
620c4878b3 BUG#38178: rpl_loaddata_map fails sporadically in pushbuild
Problem: master binlog has 'create table t1'. Master binlog
was removed before slave could replicate it. In test's cleanup
code, master did 'drop table t1', which caused slave sql
thread to stop with an error since slave sql thread did not
know about t1.
Fix: t1 is just an auxiliary construction, only needed on
master. Hence, we turn off binlogging before t1 is created,
drop t1 as soon as we don't need it anymore, and then turn
on binlogging again.


mysql-test/include/show_binlog_events.inc:
  Filter out directories and block_len from
  LOAD DATA INFILE events.
mysql-test/suite/rpl/r/rpl_loaddata_map.result:
  updated result file
mysql-test/suite/rpl/t/rpl_loaddata_map.test:
  Turn off binlogging while t1 is used, drop t1 as soon
  as we don't need it anymore, and turn on binlogging again.
  Also added some comments and replaced 'show binlog events'
  by 'source include/show_binlog_events.inc'.
2008-07-18 13:34:19 +02:00
Andrei Elkin
f8e8332100 Bug #34647 rpl_temporary discovers more than one dump thread and fails to select
Many dump threads can exist due to a way the new version of mtr governs suites.

For this immediate problem the test is refined not to use I_S but rather to reconnect
explicitly with preserving logics of a an old target bug fixes verification.

mysql-test/suite/rpl/r/rpl_temporary.result:
  results changed
mysql-test/suite/rpl/t/rpl_temporary.test:
  refining the bug#17284 test to avoid counting dump threads in favor to reconnect
  explicitly with preserving the orig logics.
2008-07-18 11:20:55 +03:00
Sven Sandberg
ca505ca2bd BUG#38170: rpl_variables failed on pushbuild: could not sync with master
Problem: the test set @@global.init_slave to garbage at a time
which was not guaranteed to be after the time when the slave's
SQL thread used it. That would cause the slave's SQL thread to
stop in rare cases.
Fix: The test does not care about the value of
@@global.init_slave, except that it should be different on
master and slave. Hence, we set @@global.init_slave to
something that is valid SQL.


mysql-test/suite/rpl/r/rpl_variables.result:
  updated result file.
mysql-test/suite/rpl/t/rpl_variables.test:
  Set @@global.init_slave to something that is valid SQL.
2008-07-17 18:26:59 +02:00
Joerg Bruehe
1c3f323ac7 Merge main 5.1 to 5.1-build 2008-07-14 12:50:31 +02:00
Joerg Bruehe
b69b20b2d6 Merge 5.1.26-rc to 5.1-build for further pushing it to the main tree. 2008-07-11 20:51:10 +02:00
Mattias Jonsson
c1e54765da Bug#37402: Mysql cant read partitioned table with capital letter in the name
Problem was that ha_partition had HA_FILE_BASED flag set
(since it uses a .par file), but after open it uses the first partitions
flags, which results in different case handling for create and for
open.

Solution was to change the underlying partition name so it was consistent.
(Only happens when lower_case_table_names = 2, i.e. Mac OS X and storage
engines without HA_FILE_BASED, like InnoDB and Memory.)

(Recommit after adding rename of check_lowercase_names to
get_canonical_filename, and moved it from handler.h to mysql_priv.h)

NOTE: if a mixed case name for a partitioned table was created when
lower_case_table_name = 2 it should be renamed or dropped before using
the updated version (See bug#37402 for more info)

mysql-test/include/have_case_insensitive_file_system.inc:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  Added include file.
mysql-test/include/have_lowercase0.inc:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  moved case insensitive file system to a new file, leaving only
  lower_case_table_names.
mysql-test/include/have_lowercase2.inc:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  Added include file.
mysql-test/lib/mtr_report.pl:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  Removed a duplicate row and suppressed warning about setting
  lower_case_table_names to 2 on case sensitive file systems.
mysql-test/r/case_insensitive_file_system.require:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  Added requirement file.
mysql-test/r/lowercase0.require:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  moved case insensitive file system to a new file, leaving only
  lower_case_table_names.
mysql-test/suite/parts/inc/partition_mgm.inc:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New include file for testing partitioning management functions for different
  settings of lower_case_table_names.
mysql-test/suite/parts/r/partition_mgm_lc0_archive.result:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New result file.
mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New result file.
mysql-test/suite/parts/r/partition_mgm_lc0_memory.result:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New result file.
mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New result file.
mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New result file.
mysql-test/suite/parts/r/partition_mgm_lc1_archive.result:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New result file.
mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New result file.
mysql-test/suite/parts/r/partition_mgm_lc1_memory.result:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New result file.
mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New result file.
mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New result file.
mysql-test/suite/parts/r/partition_mgm_lc2_archive.result:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New result file.
mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New result file.
mysql-test/suite/parts/r/partition_mgm_lc2_memory.result:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New result file.
mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New result file.
mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New result file.
mysql-test/suite/parts/t/partition_mgm_lc0_archive.test:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New test file.
mysql-test/suite/parts/t/partition_mgm_lc0_innodb.test:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New test file.
mysql-test/suite/parts/t/partition_mgm_lc0_memory.test:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New test file.
mysql-test/suite/parts/t/partition_mgm_lc0_myisam.test:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New test file.
mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New test file.
mysql-test/suite/parts/t/partition_mgm_lc1_archive-master.opt:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New opt file.
mysql-test/suite/parts/t/partition_mgm_lc1_archive.test:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New test file.
mysql-test/suite/parts/t/partition_mgm_lc1_innodb-master.opt:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New opt file.
mysql-test/suite/parts/t/partition_mgm_lc1_innodb.test:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New test file.
mysql-test/suite/parts/t/partition_mgm_lc1_memory-master.opt:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New opt file.
mysql-test/suite/parts/t/partition_mgm_lc1_memory.test:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New test file.
mysql-test/suite/parts/t/partition_mgm_lc1_myisam-master.opt:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New opt file.
mysql-test/suite/parts/t/partition_mgm_lc1_myisam.test:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New test file.
mysql-test/suite/parts/t/partition_mgm_lc1_ndb-master.opt:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New opt file.
mysql-test/suite/parts/t/partition_mgm_lc1_ndb.test:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New test file.
mysql-test/suite/parts/t/partition_mgm_lc2_archive-master.opt:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New opt file.
mysql-test/suite/parts/t/partition_mgm_lc2_archive.test:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New test file.
mysql-test/suite/parts/t/partition_mgm_lc2_innodb-master.opt:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New opt file.
mysql-test/suite/parts/t/partition_mgm_lc2_innodb.test:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New test file.
mysql-test/suite/parts/t/partition_mgm_lc2_memory-master.opt:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New opt file.
mysql-test/suite/parts/t/partition_mgm_lc2_memory.test:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New test file.
mysql-test/suite/parts/t/partition_mgm_lc2_myisam-master.opt:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New opt file.
mysql-test/suite/parts/t/partition_mgm_lc2_myisam.test:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New test file.
mysql-test/suite/parts/t/partition_mgm_lc2_ndb-master.opt:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New opt file.
mysql-test/suite/parts/t/partition_mgm_lc2_ndb.test:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  New test file.
mysql-test/t/lowercase_table3.test:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  Moved case sensitive file system to a specific inc-file instead of
  included in lowercase0.inc
sql/ha_partition.cc:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  Problem was that ha_partition had HA_FILE_BASED set
  (since it uses a .par file), but after open it uses the first partitions
  table_flags(), which results in different case handling for create and for
  open.
  
  Solution was to change the underlying partition name so it was consistent.
  (Only happens when lower_case_table_names = 2, i.e. Mac OS X)
sql/handler.cc:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  Renamed check_lowercase_names to get_canonical_filename, and exported it
  so that ha_partition.cc can use the function.
sql/mysql_priv.h:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  Renamed check_lowercase_names to get_canonical_filename, and exported it
  so that ha_partition.cc can use the function.
2008-07-11 01:14:13 +02:00
Gleb Shchepa
2334691f87 merge 5.1-main --> 5.1-bugteam 2008-07-10 03:01:41 +05:00
Gleb Shchepa
fa00dfe6b9 merge 5.0-main --> 5.0-bugteam 2008-07-10 00:54:20 +05:00
Matthias Leich
1d9fab7f4d Upmerge 5.0 -> 5.1 2008-07-09 20:55:23 +02:00
Mattias Jonsson
c4b408f96d merge 2008-07-09 15:15:11 +02:00
Matthias Leich
a81572bc42 1. Fix for Bug#37160
"funcs_2: The tests do not check if optional character
               sets exist."
2. Minor cleanup
2008-07-09 13:22:07 +02:00
Mattias Jonsson
d4b0fcc90a Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
The problem is that relying on the output of the 'ls' command is not
portable as its behavior is not the same between systems and it might
even not be available at all in (Windows).

So I added list_files that relies on the portable mysys library instead.
(and also list_files_write_file and list_files_append_file,
since the test was using '--exec ls' in that way.)

client/mysqltest.c:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  To be able to replace the use of '--exec ls' I have added
  list_files, list_files_write_file and list_files_append_file.
  
  list_files <dirname> [<filename incl. wild-cards>]
  is equivalent to 'ls <dirname>/[<filename incl. wild-cards>]'
  
  list_files_write_file creates/overwrites a file with the content
  list_files_append_file creates/appends a file with the content
  list_files* return a sorted output.
mysql-test/r/mysqltest.result:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  result file change, due to added test of the new list_files command.
mysql-test/suite/parts/inc/partition_check_drop.inc:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  Using the new list_files instead of 'ls'.
  
  Changed the use of local variables (ls_file, file_list)
  and server variable (@aux).
mysql-test/suite/parts/inc/partition_layout.inc:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  Using the new list_files instead of 'ls'.
mysql-test/suite/parts/inc/partition_layout_check1.inc:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  Using the new list_files instead of 'ls'.
mysql-test/suite/parts/inc/partition_layout_check2.inc:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  Replaces '--exec ls' with list_files.
  Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  Replaces '--exec ls' with list_files.
  Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_alter1_1_myisam.result:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  Replaces '--exec ls' with list_files.
  Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_alter1_2_myisam.result:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  Replaces '--exec ls' with list_files.
  Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_alter2_myisam.result:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  Replaces '--exec ls' with list_files.
  Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_alter3_innodb.result:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  Replaces '--exec ls' with list_files.
  Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_alter3_myisam.result:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  Replaces '--exec ls' with list_files.
  Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_basic_innodb.result:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  Replaces '--exec ls' with list_files.
  Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_basic_myisam.result:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  Replaces '--exec ls' with list_files.
  Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_basic_symlink_myisam.result:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  Replaces '--exec ls' with list_files.
  Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_engine_myisam.result:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  Replaces '--exec ls' with list_files.
  Removal of the directory part of file listing.
mysql-test/suite/parts/r/partition_syntax_myisam.result:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  Replaces '--exec ls' with list_files.
  Removal of the directory part of file listing.
mysql-test/t/mysqltest.test:
  Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
  
  Adding test for the new mysqltest commands list_files,
  list_files_write_file and list_files_append_file.
2008-07-09 13:19:04 +02:00
Marc Alff
5cf61bd344 Fixed remaining test failure 2008-07-08 13:17:28 -06:00
Marc Alff
1c9cf4b06c Bug#37525 funcs_1: <engine>_storedproc.test fail
Fixed the test to expect the correct result.
The previous test script was in fact affected by 26030,
and wrongly expected a ER_PARSE_ERROR error.
2008-07-08 10:32:02 -06:00
Mattias Jonsson
c2c4cd1e28 merge 2008-07-07 23:08:29 +02:00
Mattias Jonsson
d11d5cfca8 Bug#35745: SELECT COUNT(*) is not correct for some partitioned tables.
problem was that ha_partition::records was not implemented, thus
using the default handler::records, which is not correct if the engine
does not support HA_STATS_RECORDS_IS_EXACT.
Solution was to implement ha_partition::records as a wrapper around
the underlying partitions records.

The rows column in explain partitions will now include the total
number of records in the partitioned table.

(recommit after removing out-commented code)
2008-07-07 22:42:19 +02:00
Mattias Jonsson
ce30b928b7 Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
Problem was that auto_repair, is_crashed and check_and_repair was not
implemented in ha_partition.

Solution, implemented them as loop over all partitions for is_crashed and
check_and_repair, and using the first partition for auto_repair.

(Recommit after fixing review comments)

mysql-test/lib/mtr_report.pl:
  Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
  
  Added filter for crashed tables, when testing auto repair
mysql-test/std_data/corrupt_t1#P#p1.MYI:
  Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
  
  Corrupt MYI file for testing auto repair
mysql-test/std_data/corrupt_t1.MYI:
  Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
  
  Corrupt MYI file for testing auto repair
mysql-test/suite/parts/r/partition_repair_myisam.result:
  Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
  
  Result file for testing auto repair of crashed myisam partitions
mysql-test/suite/parts/t/partition_repair_myisam-master.opt:
  Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
  
  opt file for testing auto repair of crashed myisam partitions
mysql-test/suite/parts/t/partition_repair_myisam.test:
  Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
  
  Test file for testing auto repair of crashed myisam partitions
sql/ha_partition.cc:
  Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
  
  Added auto_repair as returning the first partitions auto_repair
  Added is_crashed and check_and_repair as loop over all partitions
sql/ha_partition.h:
  Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
  
  Activating check_and_repair, auto_repair and is_crashed
2008-07-07 17:54:42 +02:00
Sven Sandberg
25b6b026a7 BUG#37200: rpl_switch_stm_row_mixed fails sporadically in pushbuild
This bug has been fixed in two slightly different ways in
6.0-rpl and {5.1,6.0}-bugteam. To avoid future merge
problems, I'm now copying the 6.0-rpl fix to 5.1-bugteam.
2008-07-03 10:27:25 +02:00
Sven Sandberg
ec73d940b1 BUG#37200: rpl_switch_stm_row_mixed fails sporadically in pushbuild
The previous fix for the bug was incomplete. The test failed
because t2 did not exist on the slave (since the slave was
lagging) when the
wait_condition was executed. Fixed by inserting
sync_slave_with_master just after t2 was created.
2008-07-02 17:04:45 +02:00
Guilhem Bichot
3e37fb35b1 Back-port of changes made to 6.0-maria (to remove compiler warnings or fix simple test failures)
in the last days: substitution in tests has to work for absolute datadir (/dev/shm/...);
internal temp tables (like information_schema) can be Maria; Maria may not be compiled in; splitting
too long maria.test in two; mtr --embedded runs in mysql-test not mysql-test/var/master-data
so we need some absolute paths in tests; can't restart mysqld in --embedded; missing DBUG_VOID_RETURN in
mysqltest.c (fix from Serg); is_collation_character_set_applicability.test was too long name
which broke tar's 99-char limit.
2008-07-01 22:47:09 +02:00
Patrick Crews
12607d4b66 upmerge into 5.1 2008-07-01 15:07:34 -04:00
Patrick Crews
9393ae3dff Bug#37380 - Test funcs_1.is_columns_myisam_embedded fails on OS X
Test was failing due to the addition of a '\x05' character in result sets
Latest builds of the server have shown this problem to have disappeared.
Removing code within the test that disables the test on Mac OS X.

Recommit due to tree error on earlier, approved patch.
2008-07-01 14:44:47 -04:00
Mattias Jonsson
67174b712b Bug#36732: many disabled ndb tests in test suite parts
REORGANIZE TEST parts WHERE ENGINE='NDB' ;)

Updated tests for better matching NDB's limitations.

Removed some duplicate tests.

mysql-test/suite/parts/inc/part_supported_sql_funcs_delete.inc:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Added variable for NDB (since it does not support
  DROP PARTITION)
mysql-test/suite/parts/inc/partition_alter_11.inc:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Assigning directly to variable without going
  through the server.
mysql-test/suite/parts/inc/partition_bigint.inc:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Added --sorted_result for consistency
  lowered number of partitions for use with NDB
  (NDB can only do maximum of 8 partitions)
mysql-test/suite/parts/inc/partition_int.inc:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Added --sorted_result for consistency
  lowered number of partitions for use with NDB
  (NDB can only do maximum of 8 partitions)
mysql-test/suite/parts/inc/partition_mediumint.inc:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Added --sorted_result for consistency
  lowered number of partitions for use with NDB
  (NDB can only do maximum of 8 partitions)
mysql-test/suite/parts/inc/partition_smallint.inc:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Added --sorted_result for consistency
  lowered number of partitions for use with NDB
  (NDB can only do maximum of 8 partitions)
mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Made it work better with NDB
mysql-test/suite/parts/inc/partition_tinyint.inc:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Added --sorted_result for consistency
  lowered number of partitions for use with NDB
  (NDB can only do maximum of 8 partitions)
mysql-test/suite/parts/r/ndb_blob_partition.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Removing this duplicate test since it already
  exists (and updated) in suite/ndb
mysql-test/suite/parts/r/ndb_dd_backuprestore.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Updated result file
mysql-test/suite/parts/r/ndb_partition_error.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Removing this duplicate test since it already
  exists (and updated) in suite/ndb
mysql-test/suite/parts/r/ndb_partition_key.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Removing this duplicate test since it already
  exists (and updated) in suite/ndb
mysql-test/suite/parts/r/ndb_partition_list.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Removing this duplicate test since it already
  exists (and updated) in suite/ndb
mysql-test/suite/parts/r/ndb_partition_range.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Removing this duplicate test since it already
  exists (and updated) in suite/ndb
mysql-test/suite/parts/r/part_supported_sql_func_ndb.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Updated result file
mysql-test/suite/parts/r/partition_alter1_1_innodb.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Updated result file
mysql-test/suite/parts/r/partition_alter1_1_myisam.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Updated result file
mysql-test/suite/parts/r/partition_alter1_2_innodb.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Updated result file.
  Diff bigger than necessary, due to bzr diff bug.
mysql-test/suite/parts/r/partition_alter1_2_myisam.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Updated result file
mysql-test/suite/parts/r/partition_alter2_innodb.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Updated result file
mysql-test/suite/parts/r/partition_alter2_myisam.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Updated result file
mysql-test/suite/parts/r/partition_engine_ndb.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Updated result file
mysql-test/suite/parts/r/partition_int_innodb.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Updated result file
mysql-test/suite/parts/r/partition_int_myisam.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Updated result file
mysql-test/suite/parts/r/partition_int_ndb.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Updated result file
mysql-test/suite/parts/r/rpl_ndb_dd_partitions.result:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Removing this duplicate test since it already
  exists (and updated) in suite/rpl_ndb
mysql-test/suite/parts/t/disabled.def:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Removed some duplicate tests, fixed some tests.
  Removed the 'runs too long on PB' test from
  disabled.def and made them to require 'big-test'.
mysql-test/suite/parts/t/ndb_blob_partition.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Removing this duplicate test since it already
  exists (and updated) in suite/ndb
mysql-test/suite/parts/t/ndb_dd_backuprestore.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Added new=on for allowing test of
  hash/range and list partitioning.
mysql-test/suite/parts/t/ndb_partition_error.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Removing this duplicate test since it already
  exists (and updated) in suite/ndb
mysql-test/suite/parts/t/ndb_partition_key.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Removing this duplicate test since it already
  exists (and updated) in suite/ndb
mysql-test/suite/parts/t/ndb_partition_list.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Removing this duplicate test since it already
  exists (and updated) in suite/ndb
mysql-test/suite/parts/t/ndb_partition_range.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Removing this duplicate test since it already
  exists (and updated) in suite/ndb
mysql-test/suite/parts/t/part_supported_sql_func_ndb.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Added new=on for allowing test of
  hash/range and list partitioning.
  Added ndb restriction variables.
mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  requiring big-test instead of disable it.
mysql-test/suite/parts/t/partition_alter1_1_ndb.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  requiring big-test instead of disable it.
mysql-test/suite/parts/t/partition_alter1_2_ndb.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  requiring big-test instead of disable it.
mysql-test/suite/parts/t/partition_alter2_ndb.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Added new=on for allowing test of
  hash/range and list partitioning.
mysql-test/suite/parts/t/partition_basic_ndb.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Added new=on for allowing test of
  hash/range and list partitioning.
mysql-test/suite/parts/t/partition_bit_ndb.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Added new=on for allowing test of
  hash/range and list partitioning.
mysql-test/suite/parts/t/partition_engine_ndb.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Added new=on for allowing test of
  hash/range and list partitioning.
mysql-test/suite/parts/t/partition_int_ndb.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Added new=on for allowing test of
  hash/range and list partitioning.
mysql-test/suite/parts/t/partition_syntax_ndb.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Added new=on for allowing test of
  hash/range and list partitioning.
mysql-test/suite/parts/t/partition_value_ndb.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Added new=on for allowing test of
  hash/range and list partitioning.
mysql-test/suite/parts/t/rpl_ndb_dd_partitions.test:
  Bug#36732: many disabled ndb tests in test suite parts
  
  Removing this duplicate test since it already
  exists (and updated) in suite/rpl_ndb
2008-07-01 20:38:15 +02:00
Matthias Leich
2ed83dd95f Upmerge 5.0 -> 5.1 2008-07-01 14:21:50 +02:00