At 09:55 AM 12/6/2002, Chris Rogers wrote:
Use $dbh->{'info'} to notify yourself of warnings. This is the Perl equivalent of the C API function mysql_info(). See the MySQL manual for details.I have a question about the configuration of mysql. Let's say I have a field that is defined as a decimal(10,3). To my understanding that field will hold values up to 9999999.999. My problem is that if I do an insert or using that field with a value that exceeds the preset limits (ie: 12345678.123), mysql will change the value to the maximum allowed for that field and perform the requested action without an error. If you do this in the mysql, it produces a warning. If you do this via DBI, the action is performed and no indication is returned that there was a problem. OK, finally, here is my question: Can mysql be configured to fail on the insert or update a field with invalid data? If it cannot, is there a way to inform my perl script that there was a warning associated with the action?Thanks, Chris
-Mike
