Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MySQL] Avoid confusing label and IPv6 address #3606

Merged
merged 2 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sql/mysql/Positive-Technologies/MySqlLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ STRING_USER_NAME: (
);
IP_ADDRESS: (
[0-9]+ '.' [0-9.]+
| [0-9A-F:]+ ':' [0-9A-F:]+
| [0-9A-F]* ':' [0-9A-F]* ':' [0-9A-F:]+
);
LOCAL_ID: '@'
(
Expand Down
2 changes: 2 additions & 0 deletions sql/mysql/Positive-Technologies/examples/ddl_alter.sql
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ alter definer = current_user sql security invoker view my_view4(c1, 1c, _, c1_2)
-- Alter user
ALTER USER 'mattias.hultman' DEFAULT ROLE `prod-spain-mysql-read-only`@`%`;
rename user user1@100.200.1.1 to user2@100.200.1.2;
rename user user1@100.200.1.1 to user2@2001:0db8:85a3:0000:0000:8a2e:0370:7334;
rename user user1@100.200.1.1 to user2@::1;
alter user 'user'@'%' IDENTIFIED BY 'newpassword' RETAIN CURRENT PASSWORD;
ALTER USER 'test_dual_pass'@'%' IDENTIFIED BY RANDOM PASSWORD RETAIN CURRENT PASSWORD;
ALTER USER 'test_dual_pass'@'%' IDENTIFIED BY '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' RETAIN CURRENT PASSWORD;
Expand Down
14 changes: 13 additions & 1 deletion sql/mysql/Positive-Technologies/examples/ddl_create.sql
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,18 @@ BEGIN
END -- //-- delimiter ;
#end
#begin
-- delimiter //
CREATE PROCEDURE doiterate(p1 INT)
-- label which can be parsed as a beginning of IPv6 address
aaa:BEGIN
label1:LOOP
SET p1 = p1 + 1;
IF p1 < 10 THEN ITERATE label1; END IF;
LEAVE label1;
END LOOP label1;
END -- //-- delimiter ;
#end
#begin
CREATE DEFINER=`system_user`@`%` PROCEDURE `update_order`(IN orderID bigint(11))
BEGIN insert into order_config(order_id, attribute, value, performer)
SELECT orderID, 'first_attr', 'true', 'AppConfig'
Expand Down Expand Up @@ -659,4 +671,4 @@ DECLARE array VARCHAR(50);
SELECT 1;

END
#end
#end
Loading