Bug #82659 Don't create a sql tab with alter store procedure or create statement
Submitted: 19 Aug 2016 19:01 Modified: 14 Jun 2018 20:19
Reporter: Carlos Motta Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S5 (Performance)
Version:6.3.7 OS:Microsoft Windows (Microsoft Windows 10 Home)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[19 Aug 2016 19:01] Carlos Motta
Description:
----[For better reports, please attach the log file after submitting. You can find it in C:\Users\Carlos\AppData\Roaming\MySQL\Workbench\log\wb.log]

When press right click mouse on a Store Procedure and select Alter Store Procedure...  don't open a sql tab with the sentence Alter Store Procedure...

When select Send to SQL Editor, and select  create statement, don't work.

How to repeat:
Create a Store Procedure, after try alter procedure, When press right click mouse on a Store Procedure and select Alter Store Procedure...

Create a statement  When select Send to SQL Editor, and select  create statement

log file:

$$

12:41:07 [WRN][SqlEditorSchemaTree]: Failed to create/alter `granito_natural`.`trasladar_estaciones`Failed to create/alter `granito_natural`.`Insertarejemplo`
[19 Aug 2016 19:21] Carlos Motta
log file

Attachment: wb.log (application/octet-stream, text), 11.92 KiB.

[19 Aug 2016 21:27] Miguel Solorzano
I can't repeat i.e: using sakila database. Are you connected remote or local?. Provide the create procedure statement.
[21 Aug 2016 14:52] Carlos Motta
I connect remote.
[22 Aug 2016 12:14] Miguel Solorzano
Thank you for the feedback. Are you able to connect with the remote server? There are in your log several access denied!.
[23 Aug 2016 3:34] Carlos Motta
The objects view and function when try  to alter ...  it did it and modify, but only in procedures, it don't anything. Don't display the tab with code, or nothing.  Is similar to a button with out events.
[23 Aug 2016 16:15] Umesh Shastry
Thank you for the feedback.
I observed while connected to a remote instance using connection method TCP/IP over SSH(no issues for standard TCP/IP connection method). Interestingly, it allows CREATE STORED PROCEDURE, CREATE FUNCTION etc but no action takes place when ALTER PROCEDURE is selected.
Error messages varies than reported but issue is same as reported.

21:35:33 [WRN][SqlEditorSchemaTree]: Failed to create/alter `test`.`new_procedure`Get special folder
21:38:01 [DB1][ mforms managed]: Get special folder
21:38:01 [DB1][ mforms managed]: Get special folder
21:38:01 [DB1][        WQE.net]: Docking new document (activate it: True)
21:38:01 [DB2][        WQE.net]: Switching main content tab
21:38:01 [DB2][        WQE.net]: Done switching main content tab
21:38:01 [DB3][   MySQL editor]: Start splitting
21:38:02 [DB1][        WQE.net]: About to close tab: new_procedure - Routine
21:38:02 [DB1][ mforms managed]: Showing a warning to the user
21:38:02 [DB1][ mforms managed]: Hiding the wait message
21:38:02 [DB2][ mforms managed]: Wait message was not visible, nothing to do
21:38:02 [DB1][ mforms managed]: About to show a custom message box
21:38:02 [DB1][ mforms managed]: Creating and showing custom message box
21:38:02 [DB1][ mforms managed]: Running custom message box
21:38:03 [DB1][ mforms managed]: Custom message box closed
21:38:03 [DB1][        WQE.net]: Can close tab: True
21:38:03 [DB2][        WQE.net]: Switching main content tab
21:38:03 [DB2][        WQE.net]: Done switching main content tab
21:38:07 [DB2][         parser]: Parse sql into catalog
21:38:07 [WRN][SqlEditorSchemaTree]: Failed to create/alter `test`.`new_procedure`Parse sql into catalog
21:38:16 [WRN][SqlEditorSchemaTree]: Failed to create/alter `test`.`new_procedure`Parse sql into catalog
21:38:18 [WRN][SqlEditorSchemaTree]: Failed to create/alter `test`.`new_procedure`Parse sql into catalog
21:38:20 [WRN][SqlEditorSchemaTree]: Failed to create/alter `test`.`new_procedure`Activating appview avid2

## This is the SP code

CREATE DEFINER=`ushastry`@`%` PROCEDURE `new_procedure`(OUT param1 INT)
BEGIN
 SELECT COUNT(*) INTO param1 FROM test.keyvalue;
END

-- Schema/table in use

create database if not exists test;
use test;
drop table if exists keyvalue;
CREATE TABLE `keyvalue` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name1` varchar(250),
  `name2` varchar(250),
  `name3` varchar(250),
  `name4` varchar(25),
  PRIMARY KEY (`id`, name1(10))
) ENGINE=innodb;

set @id:=0;

 insert into `keyvalue` values 
  (@id:=@id+1,md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000))
,  (@id:=@id+1,md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000))
, (@id:=@id+1,md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000))
, (@id:=@id+1,md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000));

 insert into `keyvalue`(`id`,`name1`,`name2`,`name3`,`name4`)
   select  @id:=@id+1,md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000)  from
    `keyvalue` k1, `keyvalue` k2, `keyvalue` k3, `keyvalue` k4,`keyvalue` k5,`keyvalue` k6, `keyvalue` k7, `keyvalue` k8, `keyvalue` k9,
`keyvalue` k0,`keyvalue` ka, `keyvalue` kb, `keyvalue` kc, `keyvalue` kd limit  100000;
[23 Aug 2016 16:17] Umesh Shastry
-- Noticed on Win7 with WB 6.3.7
[30 May 2018 9:00] Miguel Tadeu
Posted by developer:
 
Doesn't seem reproducible at this stage.
[14 Jun 2018 20:19] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 8.0.12 release, and here's the changelog entry:

With a connection made to a remote MySQL server, some context-menu
functionality stopped working. For example, right-clicking a valid stored
procedure from the Schemas list and selecting Alter Stored Procedure or
Create Stored Procedure did not open a tab in the editor as expected.

Thank you for the bug report.
[19 Jul 2018 8:46] Chiranjeevi Battula
http://bugs.mysql.com/bug.php?id=91711 marked as duplicate of this one.