Is it not possible to show warnings when using mysqlimport?
Asked Answered
B

2

15

This article: http://www.linuxask.com/questions/how-to-show-the-warnings-during-mysqlimport

says it is not possible to show warnings when using mysqlimport:

When you use mysqlimport to import data from text file, the number of warnings will be displayed at the end of import. But there is no way to show the actual warnings message.

Is that accurate? I have a server which does not allow LOAD DATA INFILE.

Bergstein answered 3/10, 2011 at 22:23 Comment(5)
Do you have reason to believe it's not accurate?Plott
No, none. But I want very much for it to be inaccurate. It seems a bit crazy that mysqlimport would show you that warnings were created but that there would be no way whatsoever to see what they were.Bergstein
It's got a verbose mode and a debugging log - maybe one of those helps? dev.mysql.com/doc/refman/5.0/en/mysqlimport.htmlPlott
I've been using verbose. I'll try the logging, thanks!Bergstein
@Pekka웃 the debugging log with --debug=filename.log was not working, it looks like it is just enabled for debug builds: bugs.mysql.com/bug.php?id=66854Fransen
B
12

The answer is - no you cannot output warnings from mysqlimport.

Bergstein answered 31/7, 2012 at 21:6 Comment(0)
O
11

I used the mysql CLI tool, passing an equivalent "LOAD DATA ..." command followed by a semicolon, followed by "SHOW WARNINGS". The resulting display is helpful in finding detail on each warning.

For example:

mysql <options> -e "LOAD DATA LOCAL INFILE 'foo' INTO TABLE bar; SHOW WARNINGS"
Outhe answered 27/8, 2015 at 19:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.