dbanon icon indicating copy to clipboard operation
dbanon copied to clipboard

panic: interface conversion: sqlparser.Statement is nil, not *sqlparser.CreateTable

Open JaisDK opened this issue 4 years ago • 1 comments

Hello, I am getting an error when I run dbanon. Do you know what this error could relate to? The dbanon.log file is empty.

root@af1ae37f315b:/app# mysqldump -h mariadb -B oastest | dbanon -config=application/configs/anonymize.yml -log-level=debug > anonymized.sql
panic: interface conversion: sqlparser.Statement is nil, not *sqlparser.CreateTable

goroutine 1 [running]:
github.com/mpchadwick/dbanon/src.findNextTable(0xc00037ae80, 0x39)
        /Users/maxchadwick/go/src/github.com/mpchadwick/dbanon/src/create_table.go:27 +0x417
github.com/mpchadwick/dbanon/src.LineProcessor.ProcessLine(0xaedb67, 0x9, 0xc000272ea0, 0xbb93c0, 0xc0000a8130, 0xc0000839d0, 0xc00037ae80, 0x39, 0xc00037ae40, 0x3b)
        /Users/maxchadwick/go/src/github.com/mpchadwick/dbanon/src/processor.go:25 +0xdd
main.main()
        /Users/maxchadwick/go/src/github.com/mpchadwick/dbanon/main.go:112 +0x706
mysqldump: Got errno 32 on write

I've tried running it on both a MySQL 5.6 and MariaDB 10.4 inside a docker container, same result for both.

JaisDK avatar Feb 18 '21 21:02 JaisDK

Would it be possible to share the contents from your mysqldump file that causes this to reproduce? Understand sharing a full dump file could definitely have some privacy concerns but if the specific line(s) where it's choking doesn't have any sensitive data I'd like to take a look.

mpchadwick avatar Jul 16 '22 00:07 mpchadwick

Closing due to inactivity.

mpchadwick avatar Jun 20 '23 01:06 mpchadwick