Commit graph

1274 commits

Author SHA1 Message Date
Bjorn Munch
31f9d5fd16 second merge from main, with adaptions 2009-09-02 23:29:11 +02:00
Bjorn Munch
a829604260 first merge from main 2009-09-02 18:58:17 +02:00
Bjorn Munch
3a78dbe482 46996 workaruond 2009-09-01 13:38:17 +02:00
Bjorn Munch
5166a56d04 forgot : in rpl's disabled.def 2009-08-31 09:24:59 +02:00
unknown
a00ba9ebea Bug #44331 Restore of database with events produces warning in replication
Update the test case for BUG#44331 to fix the push build failure.
2009-08-31 10:26:01 +08:00
Bjorn Munch
02f67d5b1f yet another 42408 followup 2009-08-30 12:01:08 +02:00
Bjorn Munch
aa7e21c68f even more suppression fixes 2009-08-29 23:29:47 +02:00
unknown
f32c08bd0c Bug #44331 Restore of database with events produces warning in replication
If an EVENT is created without the DEFINER clause set explicitly or with it set  
to CURRENT_USER, the master and slaves become inconsistent. This issue stems from 
the fact that in both cases, the DEFINER is set to the CURRENT_USER of the current 
thread. On the master, the CURRENT_USER is the mysqld's user, while on the slave,  
the CURRENT_USER is empty for the SQL Thread which is responsible for executing 
the statement.

To fix the problem, we do what follows. If the definer is not set explicitly,  
a DEFINER clause is added when writing the query into binlog; if 'CURRENT_USER' is 
used as the DEFINER, it is replaced with the value of the current user before 
writing to binlog.

mysql-test/suite/rpl/r/rpl_create_if_not_exists.result:
  Updated the result file after fixing bug#44331
mysql-test/suite/rpl/r/rpl_drop_if_exists.result:
  Updated the result file after fixing bug#44331
mysql-test/suite/rpl/r/rpl_events.result:
  Test result of Bug#44331
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
  Updated the result file after fixing bug#44331
mysql-test/suite/rpl/t/rpl_events.test:
  Added test to verify if the definer is consistent between master and slave
  when the event is created without the DEFINER clause set explicitly or the
  DEFINER is set to CURRENT_USER
sql/events.cc:
  The "create_query_string" function is added to create a new query string 
  for removing executable comments.
sql/sql_yacc.yy:
  The remember_name token was added for recording the offset of EVENT_SYM.
2009-08-29 16:52:22 +08:00
Bjorn Munch
abe47a0ebe A few more suppression fixes after 42408 2009-08-29 10:30:59 +02:00
Bjorn Munch
fa4f05139d Bug #42408 Faulty regex for detecting [Warning] and [ERROR] in mysqld error log
Some follow-up test fixes after seeing effect in PB2
2009-08-28 16:13:27 +02:00
Alfranio Correia
f9e413a1a5 merge mysql-5.0-bugteam --> mysql-5.1-bugteam 2009-08-28 10:45:57 +01:00
Alfranio Correia
354f5f7bac BUG#46864 Incorrect update of InnoDB table on slave when using trigger with myisam table
Slave does not correctly handle "expected errors" leading to inconsistencies
between the mater and slave. Specifically, when a statement changes both
transactional and non-transactional tables, the transactional changes are
automatically rolled back on the master but the slave ignores the error and
does not roll them back thus leading to inconsistencies.
      
To fix the problem, we automatically roll back a statement that fails on
the slave but note that the transaction is not rolled back unless a "rollback"
command is in the relay log file.

mysql-test/extra/rpl_tests/rpl_mixing_engines.test:
  Enabled item 13.e which was disabled because of the bug fixed by the
  current and removed item 14 which was introduced by mistake.
2009-08-27 13:46:29 +01:00
Alfranio Correia
6c2b32515e BUG#28976 Mixing trans and non-trans tables in one transaction results in incorrect
binlog

Mixing transactional (T) and non-transactional (N) tables on behalf of a
transaction may lead to inconsistencies among masters and slaves in STATEMENT
mode. The problem stems from the fact that although modifications done to
non-transactional tables on behalf of a transaction become immediately visible
to other connections they do not immediately get to the binary log and therefore
consistency is broken. Although there may be issues in mixing T and M tables in
STATEMENT mode, there are safe combinations that clients find useful.

In this bug, we fix the following issue. Mixing N and T tables in multi-level
(e.g. a statement that fires a trigger) or multi-table table statements (e.g.
update t1, t2...) were not handled correctly. In such cases, it was not possible
to distinguish when a T table was updated if the sequence of changes was N and T.
In a nutshell, just the flag "modified_non_trans_table" was not enough to reflect
that both a N and T tables were changed. To circumvent this issue, we check if an
engine is registered in the handler's list and changed something which means that
a T table was modified.

Check WL 2687 for a full-fledged patch that will make the use of either the MIXED or
ROW modes completely safe.

mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
  Truncate statement is wrapped in BEGIN/COMMIT.
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  Truncate statement is wrapped in BEGIN/COMMIT.
2009-08-27 00:13:03 +01:00
Bjorn Munch
3a76649291 Bug #42408 Faulty regex for detecting [Warning] and [ERROR] in mysqld error log
Enabled proper pattern for Warnings and ERRORs
Added some suppressions
2009-08-25 15:56:50 +02:00
Alfranio Correia
9a632549da auto-merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2009-08-24 10:24:52 +01:00
Alfranio Correia
78585a25ff BUG#46130 Slave does not correctly handle "expected errors"
In STATEMENT based replication, a statement that failed on the master but that
updated non-transactional tables is written to binary log with the error code
appended to it. On the slave, the statement is executed and the same error is
expected. However, when an "expected error" did not happen on the slave and was
either ignored or was related to a concurrency issue on the master, the slave
did not rollback the effects of the statement and as such inconsistencies might
happen.

To fix the problem, we automatically rollback a statement that should have
failed on a slave but succeded and whose expected failure is either ignored or
stems from a concurrency issue on the master.
2009-08-13 17:21:01 +01:00
Sergey Vojtovich
24e418df69 Merge mysql-5.1-innodb_plugin to mysql-5.1. 2009-08-11 18:05:25 +05:00
Mikael Ronstrom
72ab530436 Auto-merge 2009-08-03 12:14:48 +02:00
Mikael Ronstrom
1e0b8f74e1 Fixed two test cases for extended partitioning tests 2009-08-03 12:12:36 +02:00
Davi Arnaut
7d8b967a86 Bug#46265: Can not disable warning about unsafe statements for binary logging
If using statement based replication (SBR), repeatedly calling
statements which are unsafe for SBR will cause a warning message
to be written to the error for each statement. This might lead
to filling up the error log and there is no way to disable this
behavior.

The solution is to only log these message (about statements unsafe
for statement based replication) if the log_warnings option is set.

For example:

SET GLOBAL LOG_WARNINGS = 0;
INSERT INTO t1 VALUES(UUID());
SET GLOBAL LOG_WARNINGS = 1;
INSERT INTO t1 VALUES(UUID());

In this case the message will be printed only once:

[Warning] Statement may not be safe to log in statement format.
          Statement: INSERT INTO t1 VALUES(UUID())

mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result:
  Add test case result for Bug#46265
mysql-test/suite/binlog/t/binlog_stm_unsafe_warning-master.opt:
  Make log_error value available.
mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test:
  Add test case for Bug#46265
sql/sql_class.cc:
  Print warning only if the log_warnings is enabled.
2009-07-31 10:00:35 -03:00
Sergey Vojtovich
bae6276d45 Update to innoplug-1.0.4. 2009-07-30 17:42:56 +05:00
Alfranio Correia
d871bef758 auto-merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2009-07-28 23:39:58 +01:00
Alfranio Correia
043e09b543 BUG#41166 stored function requires "deterministic" if binlog_format is "statement"
If the log_bin_trust_function_creators option is not defined, creating a stored
function requires either one of the modifiers DETERMINISTIC, NO SQL, or READS
SQL DATA. Executing a stored function should also follows the same rules if in
STATEMENT mode. However, this was not happening and a wrong error was being
printed out: ER_BINLOG_ROW_RBR_TO_SBR.

The patch makes the creation and execution compatible and prints out the correct
error ER_BINLOG_UNSAFE_ROUTINE when a stored function without one of the modifiers
above is executed in STATEMENT mode.
2009-07-28 18:44:38 +01:00
Luis Soares
cf505e4494 BUG#43046: mixed mode switch to row format with temp table lead
to wrong result
      
When using MIXED mode and issuing 'CREATE TEMPORARY TABLE t_tmp',
the statement is logged if the current binlogging mode is
STATEMENT. This causes the slave to replay the instruction and
create the temporary table as well. If there is no switch to ROW
mode, and later on a 'DROP TEMPORARY TABLE t_tmp' is issued, then
this statement will also be logged and the slave will
remove/close the temporary table.
      
However, if there is a switch to ROW mode between the CREATE and
DROP TEMPORARY table, the DROP statement will not be logged,
leaving the slave with a dangling temporary table.
      
This patch addresses this, by always logging a DROP TEMPORARY
TABLE IF EXISTS when in mixed mode and a drop statement is issued
for temporary table(s).

mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result:
  Updated result file.
mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test:
  Added test case.
sql/sql_table.cc:
  When dropping table(s) in mixed mode and current statement 
  logging is ROW, builds an extra DROP TEMPORARY TABLE IF 
  EXISTS for temporary tables that are being dropped. Later, 
  it logs the extra drop statement.
2009-07-26 22:48:24 +01:00
Alfranio Correia
216b2fbf6a auto-merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2009-07-19 09:19:15 +01:00
Alfranio Correia
f16fe16db0 BUG#46129 Failing mixed stm (with trans and non-trans tables) causes wrong seq in
binlog
      
The fix for BUG 43929 introduced a regression issue. In a nutshell, when a
statement that changes a non-transactional table fails, it is written to the
binary log with the error code appended. Unfortunately, after BUG 43929, this
failure was flushing the transactional chace causing mismatch between execution
and logging histories. To fix this issue, we avoid flushing the transactional
cache when a commit or rollback is not issued.
2009-07-18 21:07:56 +01:00
unknown
b6b5689549 Bug #45214 get_master_version_and_clock does not report error when queries fail
Append the patch for resolving the problems, which have been brought by commiting bug#45214.
2009-07-17 13:07:43 +08:00
unknown
aa4b8939a0 Bug #45214 get_master_version_and_clock does not report error when queries fail
The "get_master_version_and_clock(...)" function in sql/slave.cc ignores 
error and passes directly when queries fail, or queries succeed 
but the result retrieved is empty.
  
The "get_master_version_and_clock(...)" function should try to reconnect master
if queries fail because of transient network problems, and fail otherwise.
The I/O thread should print a warning if the some system variables do not 
exist on master (very old master)

mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test:
  Added test file for bug #45214
mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result:
  Added test result for bug #45214
mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test:
  Added test file for bug #45214
sql/slave.cc:
  The 'is_network_error()' function is added for checking if the error is caused by network.
  Added a new return value (2) to 'get_master_version_and_clock()' function result set 
  to indicate transient network errors when queries fail, and the caller should 
  try to reconnect in this case.
2009-07-16 14:56:43 +08:00
Bjorn Munch
6fed1e15c2 Bug #43005 main.init_connect fais on Windows in PB2
Server args containing spaces do not work on Windows
Fixed my_safe_rprocess-win to re-apply "" around such args
2009-07-15 14:20:56 +02:00
Ramil Kalimullin
422696d673 Addition to #45998 fix, result adjusted. 2009-07-15 15:25:44 +05:00
Ramil Kalimullin
1e56aea355 Fix for bug#45998: database crashes when running
"create as select" (innodb table)

Problem: code constructing "CREATE TABLE..." statement
doesn't take into account that current database is not set
in some cases. That may lead to a server crash.

Fix: check if current database is set.


mysql-test/extra/binlog_tests/binlog.test:
  Fix for bug#45998: database crashes when running
  "create as select" (innodb table)
    - test case.
mysql-test/suite/binlog/r/binlog_row_binlog.result:
  Fix for bug#45998: database crashes when running
  "create as select" (innodb table)
    - test result.
sql/sql_show.cc:
  Fix for bug#45998: database crashes when running
  "create as select" (innodb table)
    - added check if there's current database set.
2009-07-14 20:07:29 +05:00
Sergey Vojtovich
058cd62565 Merge 5.1-bugteam -> 5.1-innodb_plugin. 2009-07-14 15:06:04 +05:00
Georgi Kodinov
def7b58466 automerge 2009-08-17 17:14:51 +03:00
unknown
fce4fa362c BUG#45574 CREATE IF NOT EXISTS is not binlogged if the object exists
There is an inconsistency with DROP DATABASE|TABLE|EVENT IF EXISTS and
CREATE DATABASE|TABLE|EVENT IF NOT EXISTS. DROP IF EXISTS statements are
binlogged even if either the DB, TABLE or EVENT does not exist. In
contrast, Only the CREATE EVENT IF NOT EXISTS is binlogged when the EVENT
exists.  

This patch fixes the following cases for all the replication formats:
CREATE DATABASE IF NOT EXISTS.
CREATE TABLE IF NOT EXISTS,
CREATE TABLE IF NOT EXISTS ... LIKE,
CREAET TABLE IF NOT EXISTS ... SELECT.

sql/sql_insert.cc:
  Part of the code was moved from the create_table_from_items to select_create::prepare.
  When replication is row based, CREATE TABLE IF NOT EXISTS.. SELECT is binlogged if the table exists.
2009-08-13 10:48:57 +08:00
unknown
7b8d509b2d Manual Merge 2009-08-12 13:31:56 +08:00
V Narayanan
584fe5d625 merging with mysql-5.1-bugteam 2009-07-09 12:22:56 +05:30
Satya B
02e70f1691 Bug#35111 - Truncate a MyISAM partitioned table does not reset
the auto_increment value
      
This is an alternative patch that instead of allowing RECREATE TABLE
on TRUNCATE TABLE it implements reset_auto_increment that is called
after delete_all_rows.

Note: this bug was fixed by Mattias Jonsson:
Pusing this patch: http://lists.mysql.com/commits/70370


mysql-test/suite/parts/r/partition_auto_increment_memory.result:
  Bug#35111: Truncate a MyISAM partitioned table does not reset
  the auto_increment value
mysql-test/suite/parts/r/partition_auto_increment_myisam.result:
  Bug#35111: Truncate a MyISAM partitioned table does not reset
  the auto_increment value
sql/ha_partition.cc:
  Bug#35111: Truncate a MyISAM partitioned table does not reset
  the auto_increment value
  
  Added reset_auto_increment, to be used after delete_all_rows
  to simulate truncate.
storage/heap/ha_heap.cc:
  Bug#35111: Truncate a MyISAM partitioned table does not reset
  the auto_increment value
  
  Added reset_auto_increment, to be used after delete_all_rows
  to simulate truncate
storage/heap/ha_heap.h:
  Bug#35111: Truncate a MyISAM partitioned table does not reset
  the auto_increment value
  
  Added reset_auto_increment, to be used after delete_all_rows
  to simulate truncate
storage/myisam/ha_myisam.cc:
  Bug#35111: Truncate a MyISAM partitioned table does not reset
  the auto_increment value
  
  Added reset_auto_increment, to be used after delete_all_rows
  to simulate truncate.
storage/myisam/ha_myisam.h:
  Bug#35111: Truncate a MyISAM partitioned table does not reset
  the auto_increment value
  
  Added reset_auto_increment, to be used after delete_all_rows
  to simulate truncate.
2009-07-08 17:41:34 +05:30
V Narayanan
2e8eb6ce94 Bug#45983 ibmdb2i_create_index_option=1 not working for primary key
With ibmdb2i_create_index_option set to 1, creating an IBMDB2I table
with a primary key should produce an additional index that uses EBCDIC
hexadecimal sorting. However, this does not work. Adding indexes that
are not primary keys does work. The ibmdb2i_create_index_option should
be honoured when creating a table with a primary key.

This patch adds code to the create() function to check for the value
of the ibmdb2i_create_index_option variable and, when appropriate, to 
generate a *HEX-based shadow index in DB2 for the primary key. Previously 
this behavior was limited to secondary indexes.

Additionally, this patch restricts the creation of shadow indexes to
cases in which a non-*HEX sort sequence is used, as the documentation
for ibmdb2i_create_index_option describes. Previously, the shadow index
would in some cases be created even when the MySQL-specific index used
*HEX sorting, leading to redundant indexes.

Finally, the code used to generate the list of fields for indexes 
and the code used to generate the SQL statement for the shadow
indexes has been refactored into individual functions.

mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45983.result:
  Bug#45983 ibmdb2i_create_index_option=1 not working for primary key
  
  Result file for the test case.
mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45983.test:
  Bug#45983 ibmdb2i_create_index_option=1 not working for primary key
  
  Add tests to verify that the ibmdb2i_create_index_option is being honoured
  when creating a table with a primary key.
storage/ibmdb2i/ha_ibmdb2i.cc:
  Bug#45983 ibmdb2i_create_index_option=1 not working for primary key
  
  - Add code to the create() function to check for the value of the
    ibmdb2i_create_index_option variable and, when appropriate, to 
    generate a *HEX-based shadow index in DB2 for the primary key.
  
  - Restrict the creation of shadow indexes to cases in which a
    non-*HEX sort sequence is used.
  
  - Refractor code used to generate the list of fields for indexes
    and the code used to generate the SQL statement for the shadow
    indexes into individual functions.
storage/ibmdb2i/ha_ibmdb2i.h:
  Bug#45983 ibmdb2i_create_index_option=1 not working for primary key
  
  Add function prototypes for the functions that.
  
  - Generate the list of fields for indexes
  - Generate the SQL statement for the shadow
    indexes
2009-07-08 14:40:01 +05:30
Patrick Crews
1eb64fa651 merge 2009-07-07 10:27:42 -04:00
Patrick Crews
61425acb3d Bug#37746: Arithmetic range ("int") is smaller than expected
Added code to the .test file to skip this test on Win64 for PB2 stability.
Please remove this code when the bug is fixed.
2009-07-07 10:19:38 -04:00
V Narayanan
6155562ca9 merging with mysql-5.1-bugteam. 2009-07-07 12:06:35 +05:30
Patrick Crews
869e6bd19f Bug#44920: MTR2 is not processing master.opt input properly on Windows.
Had attempted to disable this test on Windows only, but the nature of this bug
does not allow for this.  The master.opt file is processed before anything in 
in the actual test.  As a result, we must use disabled.def files to ensure
these tests are skipped on the problematic platforms.

Removed Windows-only code and updated the proper disabled.def files accordingly.
2009-07-06 18:20:17 -04:00
Georgi Kodinov
ba83235f42 Bug #45974: disable test case in 5.1-bugteam 2009-07-06 18:17:39 +03:00
V Narayanan
0c66f4a64a Bug#45803 Inaccurate estimates for partial key values with IBMDB2I
Some collations were causing IBMDB2I to report
inaccurate key range estimations to the optimizer
for LIKE clauses that select substrings. This can
be seen by running EXPLAIN. This problem primarily
affects multi-byte and unicode character sets.

This patch involves substantial changes to several
modules. There are a number of problems with the
character set and collation handling. These problems
have been or are being fixed,  and a comprehensive
test has been included which should provide much
better coverage than there was before. This test
is enabled only for IBM i 6.1, because that version
has support for the greatest number of collations.

mysql-test/suite/ibmdb2i/r/ibmdb2i_collations.result:
  Bug#45803 Inaccurate estimates for partial key values with IBMDB2I
  
  result file for test case.
mysql-test/suite/ibmdb2i/t/ibmdb2i_collations.test:
  Bug#45803 Inaccurate estimates for partial key values with IBMDB2I
  
  Tests for character sets and collations. This test
  is enabled only for IBM i 6.1, because that version
  has support for the greatest number of collations.
storage/ibmdb2i/db2i_conversion.cc:
  Bug#45803 Inaccurate estimates for partial key values with IBMDB2I
  
  - Added support in convertFieldChars to enable records_in_range
    to determine how many substitute characters were inserted and
    to suppress conversion warnings.
  
  - Fixed bug which was causing all multi-byte and Unicode fields
    to be created as UTF16 (CCSID 1200) fields in DB2. The corrected
    code will now create UCS2 fields as UCS2 (CCSID 13488), UTF8
    fields (except for utf8_general_ci) as UTF8 (CCSID 1208), and
    all other multi-byte or Unicode fields as UTF16.  This will only
    affect tables that are newly created through the IBMDB2I storage
    engine. Existing IBMDB2I tables will retain the original CCSID
    until recreated. The existing behavior is believed to be
    functionally correct, but it may negatively impact performance
    by causing unnecessary character conversion. Additionally, users
    accessing IBMDB2I tables through DB2 should be aware that mixing 
    tables created before and after this change may require extra type
    casts or other workarounds.  For this reason, users who have
    existing IBMDB2I tables using a Unicode collation other than
    utf8_general_ci are encouraged to recreate their tables (e.g.
    ALTER TABLE t1 ENGINE=IBMDB2I) in order to get the updated CCSIDs
    associated with their DB2 tables.
  
  - Improved error reporting for unsupported character sets by forcing
    a check for the iconv conversion table at table creation time,
    rather than at data access time.
storage/ibmdb2i/db2i_myconv.h:
  Bug#45803 Inaccurate estimates for partial key values with IBMDB2I
  
  Fix to set errno when iconv fails.
storage/ibmdb2i/db2i_rir.cc:
  Bug#45803 Inaccurate estimates for partial key values with IBMDB2I
  
  Significant improvements were made to the records_in_range code
  that handles partial length string data in keys for optimizer plan
  estimation. Previously, to obtain an estimate for a partial key
  value, the implementation would perform any necessary character
  conversion and then attempt to determine the unpadded length of
  the partial key by searching for the minimum or maximum sort
  character. While this algorithm was sufficient for most single-byte
  character sets, it did not treat Unicode and multi-byte strings
  correctly. Furthermore, due to an operating system limitation,
  partial keys having UTF8 collations (ICU sort sequences in DB2)
  could not be estimated with this method.
  
  With this patch, the code no longer attempts to explicitly determine
  the unpadded length of the key. Instead, the entire key is converted
  (if necessary), including padding, and then passed to the operating
  system for estimation. Depending on the source and target character
  sets and collations, additional logic is required to correctly
  handle cases in which MySQL uses unconvertible or differently
  -weighted values to pad the key. The bulk of the patch exists
  to implement this additional logic.
storage/ibmdb2i/ha_ibmdb2i.h:
  Bug#45803 Inaccurate estimates for partial key values with IBMDB2I
  
  The convertFieldChars declaration was updated to support additional 
  optional behaviors.
2009-07-06 14:19:32 +05:30
Alfranio Correia
8ba57fa3c9 BUG#44581 Slave stops when transaction with non-transactional table gets lock wait
timeout
            
In STMT and MIXED modes, a statement that changes both non-transactional and
transactional tables must be written to the binary log whenever there are
changes to non-transactional tables. This means that the statement gets into the
binary log even when the changes to the transactional tables fail. In particular
, in the presence of a failure such statement is annotated with the error number
and wrapped in a begin/rollback. On the slave, while applying the statement, it
is expected the same failure and the rollback prevents the transactional changes
to be persisted.
            
Unfortunately, statements that fail due to concurrency issues (e.g. deadlocks,
timeouts) are logged in the same way causing the slave to stop as the statements
are applied sequentially by the SQL Thread. To fix this bug, we automatically
ignore concurrency failures on the slave. Specifically, the following failures
are ignored: ER_LOCK_WAIT_TIMEOUT, ER_LOCK_DEADLOCK and ER_XA_RBDEADLOCK.
2009-07-06 09:02:14 +01:00
Matthias Leich
a01b9e2922 Merge 5.0 -> 5.1 of fix for bug 45902 2009-07-02 15:40:27 +02:00
V Narayanan
fdf1461a4f Bug#45793 macce charset causes error with IBMDB2I
Creating an IBMDB2I table with the macce character set
is successful, but any attempt to insert data into the
table was failing.

This was happening because the character set name "macce"
is not a valid iconv descriptor for IBM i PASE. This patch
adds an override to convertTextDesc to use the equivalent
valid iconv descriptor "IBM-1282" instead.

mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45793.result:
  Bug#45793 macce charset causes error with IBMDB2I
  
  Result file for the test case.
mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45793.test:
  Bug#45793 macce charset causes error with IBMDB2I
  
  Add a testcase for the macce charater set.
storage/ibmdb2i/db2i_charsetSupport.cc:
  Bug#45793 macce charset causes error with IBMDB2I
  
  The character set name "macce" is not a valid iconv
  descriptor for IBM i PASE. Add an override to convertTextDesc
  to use the equivalent valid iconv descriptor "IBM-1282" 
  instead.
2009-07-02 13:34:23 +05:30
Luis Soares
38088ef6a4 merge: 5.1-bt bug branch --> 5.1-bt latest 2009-06-30 19:40:38 +01:00
Luis Soares
40e87bcf2b merge: 5.1-bt bug branch --> 5.1-bt latest 2009-06-29 12:00:58 +01:00
V Narayanan
db044ad94f Bug#45196 Some collations do not sort correctly with IBMDB2I
Some collations--including cp1250_czech_cs,latin2_czech_cs,
ucs2/utf8_czech_ci, ucs2/utf8_danish_ci--are not being
sorted correctly by the IBMDB2I storage engine. This
was being caused because the sort order used by DB2 is
incompatible with the order expected by MySQL.

This patch removes support for the cp1250_czech_cs and
latin2_czech_cs collations because it has been determined
that the sort order used by DB2 is incompatible with the
order expected by MySQL. Users needing a czech collation
with IBMDB2I are encouraged to use a Unicode-based collation 
instead of these single-byte collations. This patch also
modifies the DB2 sort sequence used for ucs2/utf8_czech_ci
and ucs2/utf8_danish_ci collations to better match the
sorting expected by MySQL. This will only affect indexes
or tables that are newly created through the IBMDB2I storage
engine. Existing IBMDB2I tables will retain the old sort
sequence until recreated.

mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45196.result:
  Bug#45196  Some collations do not sort correctly with IBMDB2I
  
  Result file for the test case.
mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45196.test:
  Bug#45196  Some collations do not sort correctly with IBMDB2I
  
  Adding tests for testing the sort order with the modified collations.
storage/ibmdb2i/db2i_collationSupport.cc:
  Bug#45196  Some collations do not sort correctly with IBMDB2I
  
  Remove the support for the cp1250_czech_cs and latin2_czech_cs 
  collations because it has been determined that the sort order
  used by DB2 is incompatible with the order expected by MySQL.
  Users needing a czech collation with IBMDB2I are encouraged to
  use a Unicode-based collation instead of these single-byte
  collations. This patch also modifies the DB2 sort sequence
  used for ucs2/utf8_czech_ci and ucs2/utf8_danish_ci collations
  to better match the sorting expected by MySQL. This will only 
  affect indexes or tables that are newly created through the
  IBMDB2I storage engine. Existing IBMDB2I tables will retain
  the old sort sequence until recreated.
2009-06-29 07:32:17 +05:30