Because we called SHOW TABLES, we mixed in base tables and views. Normally that is fine, their handling is almost identical, but the SHOW CREATE TABLE for views also returns 2 more columns.
This fix creates a Table interface and then has 2 implementations: baseTable and view. view pretty much just embeds baseTable, but overrides CreateSQL(), where it handles the 4 columns correctly.
Also added a test in backup_test.go wherein it creates a view. I expect the initial integration test to fail, but that is a test issue.
Fixes #275
Because we called
SHOW TABLES
, we mixed in base tables and views. Normally that is fine, their handling is almost identical, but theSHOW CREATE TABLE
for views also returns 2 more columns.This fix creates a
Table interface
and then has 2 implementations:baseTable
andview
.view
pretty much just embedsbaseTable
, but overridesCreateSQL()
, where it handles the 4 columns correctly.Also added a test in
backup_test.go
wherein it creates a view. I expect the initial integration test to fail, but that is a test issue.