spool command to file.

2007-05-21 Thread Ananda Kumar
Hi All, I am executing a script from mysql prompt as below mysql source ddl.txt I want to spool the out put of the above command to a file along with the sql statments. Can you please let me know what parameter should i set for the this. regards anandkl

Re: spool command to file.

2007-05-21 Thread Ananda Kumar
Hi Baron, This will give only the results of the command. It does not include sql statement. I need the sql statement to know which sql errored out. Database changed +--+ | count(*) | +--+ |5 | +--+ 1 row in set (0.00 sec) On 5/21/07, Baron Schwartz [EMAIL

Re: spool command to file.

2007-05-21 Thread Baron Schwartz
Hi, I see now -- you want to see which commands were executed from the file you sourced. As far as I know you cannot do this. You could add some debugging statements in the file, like SELECT 'about to drop the table'; Then in the output you will see this, and it may give you a hint as to

Re: spool command to file.

2007-05-21 Thread Ananda Kumar
Hi Baron, I cannot do this, becuase the file would be given by engineers and to be applied on mysql and i need to inform them about any error after i apply them in mysql db. regards anandkl On 5/21/07, Baron Schwartz [EMAIL PROTECTED] wrote: Hi, I see now -- you want to see which commands

Re: spool command to file.

2007-05-21 Thread Baron Schwartz
Hi, You could change your server's SQL mode to be as restrictive as possible (STRICT_TRANS_TABLES, etc) so the scripts cause errors, instead of warnings. Read the MySQL manual section on SQL mode and decide which things you want to throw errors. Not all things can be changed to errors; you

Re: spool command to file.

2007-05-21 Thread Ananda Kumar
Hi Baron, I will read about sql_mode. Also you scripting method sounds great. I will check on that. regards anandkl On 5/21/07, Baron Schwartz [EMAIL PROTECTED] wrote: Hi, You could change your server's SQL mode to be as restrictive as possible (STRICT_TRANS_TABLES, etc) so the scripts