17

I am writing a drop statement (in phpMyAdmin) to get rid of some unneeded tables in my database. If I run this query against our live database I am not seeing the full drop statement (it is getting truncated after 50 characters). If I run it against a copy of that database I get the full statement returned.

Any ideas why the behaviour would be different?

SET GROUP_CONCAT_MAX_LEN=10000;
SELECT CONCAT( 'DROP TABLE ', GROUP_CONCAT(table_name) , ';' ) 
AS statement FROM information_schema.tables 
WHERE table_schema = 'dbname' AND table_name LIKE 'prefix%';
András Váczi
  • 31,778
  • 13
  • 102
  • 151
jscar
  • 511
  • 1
  • 3
  • 9

1 Answers1

24

Turns out it was phpMyAdmin - needed to show full texts.

Just above the SQL output there is an 'Options' link. Click that and you will see Partial texts/Full texts radio buttons. enter image description here

Note, that when I went back to get the screenshot it was still set to Full Texts so I assume there is a cookie being set which may explain why it was different in one database to the other.

András Váczi
  • 31,778
  • 13
  • 102
  • 151
jscar
  • 511
  • 1
  • 3
  • 9