mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
WL#5151: Conversion between different types when replicating
Fixing minor error when printing SQL types from master and cleaning some code. Updating result files.
This commit is contained in:
@@ -256,7 +256,7 @@ Replicate_Ignore_Table #
|
|||||||
Replicate_Wild_Do_Table
|
Replicate_Wild_Do_Table
|
||||||
Replicate_Wild_Ignore_Table
|
Replicate_Wild_Ignore_Table
|
||||||
Last_Errno 1641
|
Last_Errno 1641
|
||||||
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'bit(8)' to type 'bit(5)'
|
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'bit(64)' to type 'bit(5)'
|
||||||
Skip_Counter 0
|
Skip_Counter 0
|
||||||
Exec_Master_Log_Pos #
|
Exec_Master_Log_Pos #
|
||||||
Relay_Log_Space #
|
Relay_Log_Space #
|
||||||
@@ -274,7 +274,7 @@ Master_SSL_Verify_Server_Cert No
|
|||||||
Last_IO_Errno #
|
Last_IO_Errno #
|
||||||
Last_IO_Error #
|
Last_IO_Error #
|
||||||
Last_SQL_Errno 1641
|
Last_SQL_Errno 1641
|
||||||
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'bit(8)' to type 'bit(5)'
|
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'bit(64)' to type 'bit(5)'
|
||||||
SELECT COUNT(*) FROM t1;
|
SELECT COUNT(*) FROM t1;
|
||||||
COUNT(*)
|
COUNT(*)
|
||||||
0
|
0
|
||||||
@@ -310,7 +310,7 @@ Replicate_Ignore_Table #
|
|||||||
Replicate_Wild_Do_Table
|
Replicate_Wild_Do_Table
|
||||||
Replicate_Wild_Ignore_Table
|
Replicate_Wild_Ignore_Table
|
||||||
Last_Errno 1641
|
Last_Errno 1641
|
||||||
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'bit(5)' to type 'bit(11)'
|
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'bit(12)' to type 'bit(11)'
|
||||||
Skip_Counter 0
|
Skip_Counter 0
|
||||||
Exec_Master_Log_Pos #
|
Exec_Master_Log_Pos #
|
||||||
Relay_Log_Space #
|
Relay_Log_Space #
|
||||||
@@ -328,7 +328,7 @@ Master_SSL_Verify_Server_Cert No
|
|||||||
Last_IO_Errno #
|
Last_IO_Errno #
|
||||||
Last_IO_Error #
|
Last_IO_Error #
|
||||||
Last_SQL_Errno 1641
|
Last_SQL_Errno 1641
|
||||||
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'bit(5)' to type 'bit(11)'
|
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'bit(12)' to type 'bit(11)'
|
||||||
SELECT COUNT(*) FROM t1;
|
SELECT COUNT(*) FROM t1;
|
||||||
COUNT(*)
|
COUNT(*)
|
||||||
0
|
0
|
||||||
|
@@ -116,17 +116,11 @@ max_display_length_for_field(enum_field_types sql_type, unsigned int metadata)
|
|||||||
return 8;
|
return 8;
|
||||||
|
|
||||||
case MYSQL_TYPE_BIT:
|
case MYSQL_TYPE_BIT:
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
Decode the size of the bit field from the master.
|
Decode the size of the bit field from the master.
|
||||||
from_len is the length in bytes from the master
|
|
||||||
from_bit_len is the number of extra bits stored in the master record
|
|
||||||
*/
|
*/
|
||||||
uint from_len= (metadata >> 8U) & 0x00ff;
|
DBUG_ASSERT((metadata & 0xff) <= 7);
|
||||||
uint from_bit_len= metadata & 0x00ff;
|
return 8 * (metadata >> 8U) + (metadata & 0x00ff);
|
||||||
DBUG_ASSERT(from_bit_len <= 7);
|
|
||||||
return 8 * from_len + from_bit_len;
|
|
||||||
}
|
|
||||||
|
|
||||||
case MYSQL_TYPE_VAR_STRING:
|
case MYSQL_TYPE_VAR_STRING:
|
||||||
case MYSQL_TYPE_VARCHAR:
|
case MYSQL_TYPE_VARCHAR:
|
||||||
@@ -422,7 +416,7 @@ void show_sql_type(enum_field_types type, uint16 metadata, String *str)
|
|||||||
case MYSQL_TYPE_BIT:
|
case MYSQL_TYPE_BIT:
|
||||||
{
|
{
|
||||||
CHARSET_INFO *cs= str->charset();
|
CHARSET_INFO *cs= str->charset();
|
||||||
int bit_length= (metadata >> 8) + (metadata & 0xFF);
|
int bit_length= 8 * (metadata >> 8) + (metadata & 0xFF);
|
||||||
uint32 length=
|
uint32 length=
|
||||||
cs->cset->snprintf(cs, (char*) str->ptr(), str->alloced_length(),
|
cs->cset->snprintf(cs, (char*) str->ptr(), str->alloced_length(),
|
||||||
"bit(%d)", bit_length);
|
"bit(%d)", bit_length);
|
||||||
|
Reference in New Issue
Block a user