Bug #10304 Query Browser cannot create @variables or retrieve existing @variables
Submitted: 2 May 2005 1:12 Modified: 2 May 2005 4:01
Reporter: [ name withheld ] Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.1.7 OS:Windows (Windows XP)
Assigned to: CPU Architecture:Any

[2 May 2005 1:12] [ name withheld ]
Description:
I attempted to create variables for a prepared statement in version 1.1.7 for MySQL version 4.1.10a-nt. However, the Query browser did not create the variables correctly or return variables correctly set up under the command line.

How to repeat:
From Query Browser:
SET @var1 = 'USA';

From mysql command line:
mysql> select @var1;
+-------+
| @var1 |
+-------+
| NULL  |
+-------+

mysql> SET @var1 = 'BGD';
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT @var1;
+-------+
| @var1 |
+-------+
| BGD   |
+-------+
1 row in set (0.00 sec)

But, Query Browser returns a NULL value.

This also failed using the syntax SELCT @var3 := 'CAN';
[2 May 2005 1:15] [ name withheld ]
Correction... that was SELECT @var3 := 'CAN';
[2 May 2005 4:01] Jorge del Conde
This is not a bug.  You can only execute 1 statement at a given moment in query browser (the main screen), and each execution takes up 1 connection to mysql.  If you want to use multiple statements or issue queries in one persistent connection, please use the script mode.