HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMajor

Output getting truncated in phpMyAdmin

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
phpmyadmingettingtruncatedoutput

Problem

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%';

Solution

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.

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.

Context

StackExchange Database Administrators Q#175426, answer score: 23

Revisions (0)

No revisions yet.