mirror of
https://github.com/MariaDB/server.git
synced 2026-05-03 13:45:34 +02:00
MDEV-22330: mysqlbinlog stops with an error Don't know how to handle column type: 255 meta: 4 (0004)
Analysis: ======== "mysqlbinlog -v" option will reconstruct row events and display them as commented SQL statements. If this option is given twice, the output includes comments to indicate column data types and some metadata. `log_event_print_value` is the function reponsible for printing values and their types. This function doesn't handle GEOMETRY type. Hence the above error gets printed. Fix: === Add support for GEOMETRY datatype.
This commit is contained in:
parent
e0f5e7bc9e
commit
15cd919535
3 changed files with 80 additions and 7 deletions
|
|
@ -339,7 +339,11 @@ a
|
|||
123.47
|
||||
999.99
|
||||
DROP TABLE t1dec102;
|
||||
flush logs;
|
||||
CREATE TABLE t1 (a GEOMETRY DEFAULT NULL);
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
INSERT INTO t1 VALUES (POINT(10,10));
|
||||
DROP TABLE t1;
|
||||
FLUSH LOGS;
|
||||
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
|
||||
|
|
@ -4623,6 +4627,56 @@ SET TIMESTAMP=1000000000/*!*/;
|
|||
DROP TABLE `t1dec102` /* generated by server */
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-321 ddl
|
||||
/*!100001 SET @@session.gtid_seq_no=321*//*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
CREATE TABLE t1 (a GEOMETRY DEFAULT NULL)
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-322
|
||||
/*!100001 SET @@session.gtid_seq_no=322*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
|
||||
### INSERT INTO `test`.`t1`
|
||||
### SET
|
||||
### @1=NULL /* GEOMETRY meta=4 nullable=1 is_null=1 */
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-323
|
||||
/*!100001 SET @@session.gtid_seq_no=323*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
|
||||
### INSERT INTO `test`.`t1`
|
||||
### SET
|
||||
### @1='\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00$@\x00\x00\x00\x00\x00\x00$@' /* GEOMETRY meta=4 nullable=1 is_null=0 */
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-324 ddl
|
||||
/*!100001 SET @@session.gtid_seq_no=324*//*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
DROP TABLE `t1` /* generated by server */
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Rotate to master-bin.000002 pos: 4
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
|
|
|
|||
|
|
@ -450,7 +450,19 @@ INSERT INTO t1dec102 VALUES (999.99);
|
|||
SELECT * FROM t1dec102 ORDER BY a;
|
||||
DROP TABLE t1dec102;
|
||||
|
||||
flush logs;
|
||||
|
||||
#
|
||||
# MDEV-22330: mysqlbinlog stops with an error Don't know how to handle column
|
||||
# type: 255 meta: 4 (0004)
|
||||
# Check support for GEOMETRY type with verbose mode.
|
||||
#
|
||||
CREATE TABLE t1 (a GEOMETRY DEFAULT NULL);
|
||||
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
INSERT INTO t1 VALUES (POINT(10,10));
|
||||
DROP TABLE t1;
|
||||
|
||||
FLUSH LOGS;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9]*[.][0-9]{1,3})[0-9e+-]*[^ ]*(.*(FLOAT|DOUBLE).*[*].)/\1...\2/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue