Bug #45372 mysqltest: --cursor-protocol fails in case of SELECT ... INTO
Submitted: 8 Jun 2009 12:47 Modified: 8 Jun 2009 12:47
Reporter: Matthias Leich Email Updates:
Status: Analyzing Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:5.0,5.1,5.4,6.0 OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[8 Jun 2009 12:47] Matthias Leich
Description:
My test script:
---------------
SELECT 1 INTO @aux;

Outcome without any "--*-protocol":
-----------------------------------
SELECT 1 INTO @aux;

Outcome with  "--cursor-protocol":
----------------------------------
query 'SELECT 1 INTO @aux' failed:
   1323: Cursor SELECT must not have INTO

I assume "--cursor-protocol" converts the select to
something like:
   CREATE PROCEDURE .....
   BEGIN
   DECLARE ... CURSOR FOR SELECT 1 INTO @aux;
   ....
   END |
which of course earns
1323: Cursor SELECT must not have INTO
     

How to repeat:
See above

Suggested fix:
Please make that mysqltest does not transform
   SELECT ... INTO ...
to statement sequencies using cursors.
Just runs SELECTs containing INTO like
other SQL commands (Example: UPDATE ).

I do not see a problem if the fix starts in 5.1
and not with 5.0.
[13 Oct 2021 5:35] Mary Pena
system is failing.