Bug #31220 SQLFetch or SQLFetchScroll returns negative data length using SQL_C_WCHAR
Submitted: 27 Sep 2007 0:22 Modified: 14 Mar 2008 18:41
Reporter: Viktor Ferenczi Email Updates:
Status: Closed Impact on me:
Category:Connector / ODBC Severity:S2 (Serious)
Version:3.51.20r750 OS:Linux (Ubuntu Feisty, up-to-date)
Assigned to: Jess Balint CPU Architecture:Any
Tags: buffer, crash, LENGTH, negative, overflow, segfault, segmentation fault, SQLFetch, SQLFetchScroll, string, varchar

File: Maximum allowed size is 3MB.

If the data you need to attach is more than 3MB, you should create a compressed archive of the data and a README file that describes the data with a filename that includes the bug number (recommended filename: mysql-bug-data-31220.zip) and upload one to sftp.oracle.com. A free Oracle Web (SSO) account (the one you use to login bugs.mysql.com) and a client that supports SFTP are required in order to access the SFTP server.

To upload the file to sftp.oracle.com:

  1. Open an SFTP client and connect to sftp.oracle.com. Specify port 2021 and remote directory /support/incoming/.
  2. Log in with your newly created Oracle Web account (email address) and password.
  3. Upload the archive to /support/incoming.
  4. Once you have uploaded the file, add a comment to this bug to notify us about it.
Example: sftp -oPort=2021 -oUser=email sftp.oracle.com:/support/incoming

Usage Notes: This directory is unlistable, which means that once you have uploaded your file, you will not be able to see it. A file cannot be uploaded more than once with the same filename. The filename must be changed before attempting to upload the file again. The filename should always start with mysql-bug- prefix. Files are retained on the SFTP server for 7 days and then permanently removed.

[27 Sep 2007 0:25] Viktor Ferenczi
unixODBC trace output

Attachment: mysql-unixODBC-trace.log.bz2 (application/x-bzip, text), 25.33 KiB.

[3 Oct 2007 14:53] Bogdan Degtyariov
Test case with _W functions

Attachment: bug31220.c (text/plain), 2.73 KiB.

[23 Feb 2008 5:37] Jess Balint
fix + test

Attachment: bug31220.diff (application/octet-stream, text), 1.91 KiB.