To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=72870
                 Issue #|72870
                 Summary|MySQL smallint values incorrect with JDBC driver
               Component|Database access
                 Version|OOo 2.1
                Platform|Macintosh
                     URL|
              OS/Version|Mac OS X
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|none
             Assigned to|dbaneedsconfirm
             Reported by|mcarland





------- Additional comments from [EMAIL PROTECTED] Thu Dec 21 22:55:33 -0800 
2006 -------
When connecting to a MySQL 4.0.24 server with either the 3.1.14, 2.0.14, or
2.0.4 JDBC driver, 'smallint' columns are appearing as zero in 'Queries' and
'Tables', and large values when used in 'Reports'. The actual values are between
400 and 1200.

This also occurred with OOo 2.0.

'int' fields display properly. If the 'smallint' field is part of an expression,
it also displays properly.

With the following table:

mysql> describe job;
+----------+----------------------+------+-----+------------+----------------+
| Field    | Type                 | Null | Key | Default    | Extra          |
+----------+----------------------+------+-----+------------+----------------+
| jobid    | int(10) unsigned     |      | PRI | NULL       | auto_increment |
| clientid | int(10) unsigned     |      |     | 0          |                |
| day      | date                 |      |     | 0000-00-00 |                |
| hours    | smallint(5) unsigned |      |     | 0          |                |
| miles    | smallint(5) unsigned | YES  |     | NULL       |                |
+----------+----------------------+------+-----+------------+----------------+

select hours from job;

displays all zeros, but

select hours + 0 from job;

displays the correct values. I assume because the expression result is an 'int'.

'jobid' and 'clientid' display properly, and 'miles' behaves like 'job'.

Using the same JDBC driver, the attached Java code displays the correct values.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to