mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
c4298a3fb9
Refactoring code to add parameter to pack() and unpack() functions with purpose of indicating if data should be packed in little-endian or native order. Using new functions to always pack data for binary log in little-endian order. The purpose of this refactoring is to allow proper implementation of endian-agnostic pack() and unpack() functions. Eliminating several versions of virtual pack() and unpack() functions in favor for one single virtual function which is overridden in subclasses. Implementing pack() and unpack() functions for some field types that packed data in native format regardless of the value of the st_table_share::db_low_byte_first flag. The field types that were packed in native format regardless are: Field_real, Field_decimal, Field_tiny, Field_short, Field_medium, Field_long, Field_longlong, and Field_blob. Before the patch, row-based logging wrote the rows incorrectly on big-endian machines where the storage engine defined its own low_byte_first() to be FALSE on big-endian machines (the default is TRUE), while little-endian machines wrote the fields in correct order. The only known storage engine that does this is NDB. In effect, this means that row-based replication from or to a big-endian machine where the table was using NDB as storage engine failed if the other engine was either non-NDB or on a little-endian machine. With this patch, row-based logging is now always done in little-endian order, while ORDER BY uses the native order if the storage engine defines low_byte_first() to return FALSE for big-endian machines. In addition, the max_data_length() function available in Field_blob was generalized to the entire Field hierarchy to give the maximum number of bytes that Field::pack() will write.
15 lines
672 B
Text
15 lines
672 B
Text
#############################################################
|
|
# Author: JBM
|
|
# Date: 2006-02-24
|
|
# Purpose: Trying to test ability to replicate from cluster
|
|
# to innodb, or myisam, or replicate from innodb/myisam to
|
|
# cluster slave. Due to limitations I have created wrappers
|
|
# to be able to use the same code for all these different
|
|
# test and to have control over the tests.
|
|
##############################################################
|
|
-- source include/have_innodb.inc
|
|
-- source include/have_ndb.inc
|
|
-- source include/have_binlog_format_mixed_or_row.inc
|
|
-- source include/ndb_master-slave.inc
|
|
SET storage_engine=innodb;
|
|
--source extra/rpl_tests/rpl_ndb_2multi_eng.test
|