[MDEV-22330] mysqlbinlog stops with an error Don't know how to handle column type: 255 meta: 4 (0004) Created: 2020-04-21  Updated: 2020-10-06  Resolved: 2020-09-28

Status: Closed
Project: MariaDB Server
Component/s: GIS, Replication, Server
Affects Version/s: 10.1, 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.1.48, 10.2.35, 10.3.26, 10.4.16, 10.5.7

Type: Bug Priority: Major
Reporter: Anton Avramov Assignee: Sujatha Sivakumar (Inactive)
Resolution: Fixed Votes: 0
Labels: Sprint
Environment:

Debian


Attachments: File MDEV-mysqlbinlog-error.output    

 Description   

From some time now when I try to use mysqlbinlog with the --verbose option I get an error:
Error: Don't know how to handle column type: 255 meta: 4 (0004)

If I don't use the --verbose option it seams to work fine but I cannot see the query executed.

Since the binlog file is too large I'm attaching here only the output that I've narrowed using --start-datetime --stop-datetime from the command without the verbose option.

If you need the binlog file itself, please give instruction how to send it in a secure way since I don't want the hole file to be made available public.



 Comments   
Comment by Anton Avramov [ 2020-04-21 ]

The problem seams to be with a column of type geometry DEFAULT NULL
And the insert statement has a value of null for that column

Comment by Elena Stepanova [ 2020-05-04 ]

Thanks for the report and for narrowing down the problem.

Reproducible as described on 10.3-10.5, including old 10.3 releases.
Not reproducible on 10.2.

--source include/have_binlog_format_row.inc
 
RESET MASTER;
create table t1 (a GEOMETRY DEFAULT NULL);
insert into t1 values (NULL);
FLUSH BINARY LOGS;
--let $datadir= `select @@datadir`
--exec $MYSQL_BINLOG --verbose $datadir/master-bin.000001
 
# Cleanup
DROP TABLE t1;

10.3 644d9f38

RESET MASTER;
create table t1 (a GEOMETRY DEFAULT NULL);
insert into t1 values (NULL);
FLUSH BINARY LOGS;
bug.t                                    [ fail ]
        Test ended at 2020-05-05 02:13:22
 
CURRENT_TEST: bug.t
 
Error: Don't know how to handle column type: 255 meta: 4 (0004)
mysqltest: At line 8: exec of '/data/bld/10.3-debug/bin/mysqlbinlog --defaults-file=/data/bld/10.3-debug/mysql-test/var/my.cnf --local-load=/data/bld/10.3-debug/mysql-test/var/tmp --verbose /data/bld/10.3-debug/mysql-test/var/mysqld.1/data//master-bin.000001' failed, error: 256, status: 1, errno: 11
Output from before failure:

Comment by Sujatha Sivakumar (Inactive) [ 2020-08-11 ]

The issue exists in 10.1 and above. The error message gets printed as part of comment as shown below

#200811 16:43:38 server id 1  end_log_pos 566 	Write_rows: table id 31 flags: STMT_END_F
 
BINLOG '
Yn0yXxMBAAAAKgAAABgCAAAAAB8AAAAAAAEABHRlc3QAAnQxAAH/AQQB
Yn0yXxcBAAAAHgAAADYCAAAAAB8AAAAAAAEAAf//
### INSERT INTO `test`.`t1`
### SET
###   @1=!! Don't know how to handle column type=255 meta=4 (0004)'/*!*/;
# at 566
#200811 16:43:38 server id 1  end_log_pos 635 	Query	thread_id=4	exec_time=0	error_code=0
SET TIMESTAMP=1597144418/*!*/;
COMMIT

Comment by Sujatha Sivakumar (Inactive) [ 2020-08-17 ]

Hello holyfoot

Please review the fix for MDEV-22330.

Patch: https://github.com/MariaDB/server/commit/5dc2ebae47481afe5b0769f0e0463d64b77143c0

Test results: http://buildbot.askmonty.org/buildbot/grid?category=main&branch=bb-10.1-sujatha

Thank you.

Comment by Sujatha Sivakumar (Inactive) [ 2020-08-18 ]

Hello Andrei,

Can you please review the following changes.
Since the patch is specific to GEOMETRY type I requested Holyfoot's review and it is complete.

Patch: https://github.com/MariaDB/server/commit/5dc2ebae47481afe5b0769f0e0463d64b77143c0

Test results: http://buildbot.askmonty.org/buildbot/grid?category=main&branch=bb-10.1-sujatha

Comment by Andrei Elkin [ 2020-09-15 ]

The patch looks good but I am not sure about the produced comments' usability. Please clarify.

Comment by Sujatha Sivakumar (Inactive) [ 2020-09-28 ]

Fix pushed to 10.1.47. Merged changes upto 10.4.

Generated at Thu Feb 08 09:13:55 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.