Bug #85355 Call Stored-Procedure widget doesn't pass parameters
Submitted: 8 Mar 2017 3:24 Modified: 9 Mar 2017 5:49
Reporter: Brad Kent Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:6.3.x OS:Any
Assigned to: CPU Architecture:Any
Tags: stored procedure

[8 Mar 2017 3:24] Brad Kent
in the left-hand schemas pane (where tables, views, and stored procedures are quickly accessed), there is a "lightning bolt" icon next to stored procedures which launches a dialog to call the selected procedure.  The dialog prompts for parameter values..

It then creates SQL with empty values

set @_some_string_param = '';
set @_some_date_param = '0';
set @_some_int_param = 0;
call mydb.my_proc(@_some_string_param, @_some_date_param, @_some_int_param);
select @_some_param, @_some_date_param @_some_int_param;

and proceeds to execute it, often with the resulting "incorrect whatever value "0" for column whatever at row 1" type error

a)  dialog requires you to enter valid values
b)  wrong SQL gets executed, with potential for ill results
c)  must re-enter / modify the generated SQL with correct values

Surprised there's no open bug report for this

How to repeat:
use the "call stored procedure" "widget"
[8 Mar 2017 7:15] MySQL Verification Team
Hello Brad Kent,

Thank you for the bug report.
I'm not seeing this issue with WB 6.3.9 on Win7/macOS 10.12.x.
Could you please provide exact stored routine, and WB, OS details on which you are seeing this? This reminds me of Bug #80564

[8 Mar 2017 14:37] Brad Kent
Indeed, Bug #80564 (verified) is a duplicate (my search came up empty)

I've experienced this bug for aprox 2 years.

a most basic stored procedure:

USE `test_db`$$
CREATE PROCEDURE `delete_stuff` (_min BIGINT)

	DELETE FROM `important_table` WHERE 'some_value` >= _min;    



If I intend to delete stuff >= 1000000000
MySQL will instead delete stuff >= 0   (I'd classify this as "serious"?)
[9 Mar 2017 5:49] MySQL Verification Team
Thank you for confirming.
Marking this as duplicate of Bug #80564