You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wp db query no longer formats a table since 2.12.0 #290
After updating to the 2.12.0, the output is no longer rendered as a table and I cannot find a flag to get a table output again:
$ wp cli updateYou have version 2.11.0. Would you like to update to 2.12.0? [y/n] yDownloading from https://github.com/wp-cli/wp-cli/releases/download/v2.12.0/wp-cli-2.12.0.phar...md5 hash verified: a592bbf68fc5143bfad5800cb4947253New version works. Proceeding to replace.Success: Updated WP-CLI to 2.12.0.
$ wp db query 'SELECT 1, 1, 1'1 1 11 1 1
When reverting back to 2.11.0, the table output works again:
I'll try and look into that when I can (part of the problem is the particular tests for the query command don't require a table, so it didn't detect that the default changed).
A work around for now is to manually pass --table or -t which will be forwarded on to the MySQL command and print the table. Previously, MySQL / MariaDB did auto detection to see if printing to a terminal and added the table, but that stopped working due to the PR above (the table itself comes from MySQL not any of our code).
Some thought would need to be given for a proper fix that retains the feature added above
Activity
swissspidy commentedon Jul 14, 2025
@mrsdizzie could this perhaps be related to the table formatting work on the php-cli-utils package?
mrsdizzie commentedon Jul 15, 2025
It is actually from #277
I'll try and look into that when I can (part of the problem is the particular tests for the
querycommand don't require a table, so it didn't detect that the default changed).mrsdizzie commentedon Jul 15, 2025
A work around for now is to manually pass
--tableor-twhich will be forwarded on to the MySQL command and print the table. Previously, MySQL / MariaDB did auto detection to see if printing to a terminal and added the table, but that stopped working due to the PR above (the table itself comes from MySQL not any of our code).Some thought would need to be given for a proper fix that retains the feature added above
Fix missing table on wb db query output