This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 270545 - SQL autocompletion is lost after IF in a PROCEDURE due to custom DELIMITER
Summary: SQL autocompletion is lost after IF in a PROCEDURE due to custom DELIMITER
Status: NEW
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: Dev
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-03 14:29 UTC by Xenos
Modified: 2017-05-12 08:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xenos 2017-05-03 14:29:48 UTC
That seems quiet specific, but it actually isn't. Consider this SQL file, that sets a procedure:


    DROP PROCEDURE IF EXISTS `assert`;
    -- Position 1
    DELIMITER $$
    -- Position 2
    CREATE PROCEDURE `assert`(IN `asserting` TINYINT(1) UNSIGNED, IN `code` INT UNSIGNED)
    	LANGUAGE SQL
    	DETERMINISTIC
    	CONTAINS SQL
    	SQL SECURITY INVOKER
    BEGIN
        -- Position 3
    	IF NOT(`asserting`) THEN
    		CALL throw('UserException', `code`, '{}');
    	END IF;
    	-- Position 4
    END$$
    -- Position 5
    DELIMITER ;
    -- Position 6

There, if you type "SELECT * FROM {Ctrl+Sp}" at each position, you have the following results:
Positon 1 → OK, works (suggests the tables name)
Positon 2 → OK, same
Positon 3 → OK, same
Positon 4 → FAILS, suggests the basic SQL keywords (CREATE, DROP, etc)
Positon 5 → OK, same
Positon 6 → OK, same

So in that very precise place "4", the autocompletion seems to fail.