Bug #16686 Only first warning is returned.

Submitted: 20 Jan 2006 20:56 Modified: 3 Apr 2006 20:53
Reporter: Andre Timmer Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / J Severity:S2 (Serious)
Version:3.1.12 OS:Solaris (Solaris)
Assigned to: Assigned Account CPU Architecture:Any

[20 Jan 2006 20:56] Andre Timmer
Description:
A insert statement that gives to warning when using mysql prompt in Unix.
Gives only one when using JDBC.

How to repeat:
Create table:

CREATE TABLE `organizationaddress` (
  `bookid` int(11) NOT NULL default '0',
  `organizationnr` int(11) NOT NULL default '0',
  `type` char(1) collate utf8_bin NOT NULL default '',
  `streetname` varchar(24) collate utf8_bin NOT NULL default '',
  `streetnr` int(11) NOT NULL default '0',
  `streetnrext` varchar(4) collate utf8_bin NOT NULL default '',
  `zipcode` varchar(6) collate utf8_bin NOT NULL default '',
  `city` varchar(24) collate utf8_bin NOT NULL default '',
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin ;

Test following statement, once using mysql command:

Suggested fix:
insert into organizationaddress (bookid, organizationnr, type, streetname, streetnr, streetnrext, zipcode, city) values (3, -1, 'Pxx',  'xxxxxxxxxxxxxxxxxxxxxxx', 6999999900019, '', '', '');   

show warnings;
--> 2 warnings

When using JDBC it gives only 1 warning (drop and recreate table first):
        try {
	      st = conn.createStatement();
	      rows = st.executeUpdate(statement);
       } catch (SQLWarning e) {
          SQLWarning warning = st.getWarnings();
          
          while (warning != null) {
             System.out.println("Warning: " +warning);
             warning = warning.getNextWarning();
          }
[20 Jan 2006 21:14] Andre Timmer
Add a few more x's.
[3 Apr 2006 20:53] Mark Matthews
Duplicate of BUG#18740.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.060 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.