I am curious as to how TOAD gathers some information out of the database. When I run an optimize table command in TOAD, the result set contains 1 row of 4 fields. I need to be able to gather the status of an 'optimize table' command from within a stored procedure, and more specifically, I need to gather the msg_text field that is returned when the optimize table command is run manually from within mysql. How do I do that?
I can easily obtain this when running from the command-line: # mysql -u root -p monitor -e "optimize table test\G" > test.out Enter password: # more test.out