I was just looking for the same thing.
When I run INSERTs using the standard phpMyAdmin "insert" form, the rows will be inserted, but a red bar will appear indicating any warnings. But when I did the volume insert, no warnings appeared, and instead a green bar appeared, and simply talked about the number of lines affected (giving the impression that everything went well, but in fact it may not be).
I found that I had to send the SHOW WARNINGS manually. For example, when I run this query, I put both statements in the phpMyAdmin SQL field.
INSERT INTO test2 SELECT * FROM test1; SHOW WARNINGS;
This gave a list of warnings like the following ...
Level Code Message Warning 1265 Data truncated for column 'a' at row 1 Warning 1265 Data truncated for column 'a' at row 3 Warning 1265 Data truncated for column 'b' at row 3 Warning 1366 Incorrect integer value: 'x' for column 'b' at row...
Notes:
- You cannot run the
SHOW WARNINGS later; it will be empty. It should be in the box with your initial request when you click "Go." This is because MySQL only contains warnings for the last query you requested. Each time you click a link or button phpMyAdmin launches all kinds of other queries in the database, and therefore your previous warnings are lost. phpMyAdmin does NOT support displaying multiple results from a user request. So this is how one SQL script does NOT work ... (since version 3.4.10.1)
INSERT INTO test2 VALUES ('my text', 'something else'); SHOW WARNINGS;
Although the method above does not work in phpMyAdmin, it MUST work fine in the MySQL command line client. So use this if you need to.
If you have multiple inserts and want to show all warnings, you need to bind them together as one INSERT . For instance:
INSERT INTO test2 VALUES ('my text', 'something else'), ('my text', 'something else'); SHOW WARNINGS;
source share