List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:March 17 1999 12:48pm
Subject:C-API
View as plain text  
>>>>> "Harry" == Harry Brueckner <brueckner@stripped> writes:

Harry> Hello,
Harry> I have a question regarding the C-API or maybe even MySQL itself.

Harry> I would like to detect if my application hits the border of a column e.g. if a
Harry> field is defined as tinyint and the application tries to insert a value >
> 127.
Harry> MySQL cuts off this value and inserts/updates it as 127 but it would be nice if
Harry> there would be a way to detect that something went wrong.

Harry> Proofreading every statement isnt a very fast way to check if a value was cut
Harry> off or not. :-)

I could provide a 'SET SQL_option' for INSERT statments to handle this.

Which one would you prefere:

- All warnings are treated as errors.  In this case MySQL could say
 'Illegal value 'xxx' for column 'xxx'"

- That one should be able to get a 'mysql_info' results even for
  single line inserts.

Any other options?

Regards,
Monty



Thread
C-APIHarry Brueckner17 Mar
  • C-APIMichael Widenius17 Mar
    • Re: C-APIHarry Brueckner17 Mar