ERROR: Open cursor error: MySQL client ran out of memory.
" />
SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 31117: The MySQL client might run out of memory if a large results set is produced with SAS/ACCESS® Interface to MYSQL

DetailsCodeHotfixAboutRate It

The following error message is written to the SAS log if the MySQL result set does not fit in memory:

    ERROR: Open cursor error: MySQL client ran out of memory. 

The problem occurs because SAS/ACCESS Interface to MYSQL stores a results set in memory by default.

In SAS/ACCESS Interface to MySQL, the new LIBNAME statement option RESULTS= has been implemented to circumvent this issue. Values for this option are as follows:

  • MEMORY—Specifies that the query results should be stored in the client machine's memory. MEMORY is the default value.
  • SERVER—Specifies that the query results should be stored on a server. The server must be able to evaluate the entire query. If it cannot evaluate the entire query, the software writes the following message to the log:
    Commands out of sync
    In such a case, you should use RESULTS=MEMORY or RESULTS=DISK instead.
  • DISK—Specifies that the query results should be stored in a temporary disk file on the client machine. This storage method enables the application to run complex queries with result sets large enough to cause an out-of-memory error. The size of a results set is limited only to the free space on the disk that is used for the temporary file.

Select the Hot Fix tab in this note to access the hot fix for this issue.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/ACCESS Interface to MySQLLinux9.1 TS1M3 SP49.2 TS1M0
64-bit Enabled Solaris9.1 TS1M3 SP49.2 TS1M0
64-bit Enabled HP-UX9.1 TS1M3 SP49.2 TS1M0
64-bit Enabled AIX9.1 TS1M3 SP49.2 TS1M0
Windows Vista9.1 TS1M3 SP49.2 TS1M0
Solaris for x649.1 TS1M3 SP49.2 TS1M0
Linux on Itanium9.1 TS1M3 SP49.2 TS1M0
Microsoft Windows XP Professional9.1 TS1M3 SP49.2 TS1M0
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3 SP49.2 TS1M0
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3 SP49.2 TS1M0
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3 SP49.2 TS1M0
Microsoft Windows NT Workstation9.1 TS1M3 SP4
Microsoft Windows 2000 Professional9.1 TS1M3 SP4
Microsoft Windows 2000 Server9.1 TS1M3 SP4
Microsoft Windows 2000 Datacenter Server9.1 TS1M3 SP4
Microsoft Windows 2000 Advanced Server9.1 TS1M3 SP4
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.