mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 10:31:02 +02:00
Fix MySQL query to compute number of rows per table (#1128)
The CAST should target `unsigned` rather than `integer`, so that we are compatible with MySQL 5.7. Also empty tables might have NULL entries, which we transform to zero entries here, as expected by the Lisp code. Fixes #1127.
This commit is contained in:
parent
86b6a5cb80
commit
cb989e1155
@ -4,7 +4,7 @@
|
||||
-- excluding
|
||||
-- filter-list-to-where-clause excluding
|
||||
SELECT table_name,
|
||||
cast(data_length/avg_row_length as integer)
|
||||
coalesce(cast(data_length/avg_row_length as unsigned), 0)
|
||||
FROM information_schema.tables
|
||||
WHERE table_schema = '~a'
|
||||
and table_type = 'BASE TABLE'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user