Problem Note 33847: An error occurs when you run a stored procedure on a MYSQL client with SAS/ACCESS® Interface to MySQL
An error occurs when you run a stored procedure on a MYSQL client with SAS/ACCESS® Interface to MySQL, even though stored procedures are allowed in MySQL 5.0 or later. The following message is generated by this error:
ERROR: Execute error: PROCEDURE <stored procedure name>
can't return a result set in the given context
Even though the stored procedure is run on MySQL, the error occurs in the SAS® System when results are returned from MySQL to SAS.
Select the Hot Fix tab in this note to access the hot fix for this issue.
After you install the hot fix, you can run stored procedures without encountering an error. However, you need to use the RESULTS=MEMORY option in the SQL procedure’s CONNECT statement, as follows:
proc sql;
connect to mysql(server='###.##.##.###' user=user-id
password=password database=databaseName
results=memory);
execute(MySQL-syntax-for-stored-procedure) by mysql;
disconnect from mysql;
quit;
Stored procedures are not supported when the RESULTS=SERVER or RESULTS=DISK options are used because these options do not bring in multiple result sets.
Operating System and Release Information
SAS System | SAS/ACCESS Interface to MySQL | Microsoft® Windows® for x64 | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP4 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Microsoft Windows XP Professional | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Windows Vista | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
64-bit Enabled AIX | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
64-bit Enabled HP-UX | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
64-bit Enabled Solaris | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Linux | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
Linux on Itanium | 9.1 TS1M3 SP4 | 9.2 TS1M0 |
*
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.
The MySQL 5.0 or later client now allows stored procedures. However, an error occurs in SAS if you try to run a stored procedure when you use SAS/ACCESS Interface to MySQL.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2009-05-05 15:33:08 |
Date Created: | 2008-11-05 15:56:02 |