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][MariaDB] Dbz crashes on DDL statement (non Latin chars in variables) #3672

Merged
merged 1 commit into from
Aug 24, 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
4 changes: 2 additions & 2 deletions sql/mariadb/MariaDBLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -1351,14 +1351,14 @@ STRING_USER_NAME_MARIADB: (
) '@';
LOCAL_ID: '@'
(
[A-Z0-9._$]+
[A-Z0-9._$\u0080-\uFFFF]+
| SQUOTA_STRING
| DQUOTA_STRING
| BQUOTA_STRING
);
GLOBAL_ID: '@' '@'
(
[A-Z0-9._$]+
[A-Z0-9._$\u0080-\uFFFF]+
| BQUOTA_STRING
);

Expand Down
12 changes: 11 additions & 1 deletion sql/mariadb/examples/fast/ddl_create.sql
Original file line number Diff line number Diff line change
Expand Up @@ -627,4 +627,14 @@ WITH my_values(val1, val2) AS (
(2, 'Two')
)
SELECT v.val1, v.val2 FROM my_values v;
#end
#end

#begin
CREATE DEFINER=`peuser`@`%` PROCEDURE `test_utf`()
BEGIN
SET @Ν_greece := 1, @N_latin := 'test';
SELECT
@Ν_greece
,@N_latin;
END
#end
4 changes: 2 additions & 2 deletions sql/mysql/Positive-Technologies/MySqlLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -1324,14 +1324,14 @@ IP_ADDRESS: (
);
LOCAL_ID: '@'
(
[A-Z0-9._$]+
[A-Z0-9._$\u0080-\uFFFF]+
| SQUOTA_STRING
| DQUOTA_STRING
| BQUOTA_STRING
);
GLOBAL_ID: '@' '@'
(
[A-Z0-9._$]+
[A-Z0-9._$\u0080-\uFFFF]+
| BQUOTA_STRING
);

Expand Down
10 changes: 10 additions & 0 deletions sql/mysql/Positive-Technologies/examples/ddl_create.sql
Original file line number Diff line number Diff line change
Expand Up @@ -672,3 +672,13 @@ SELECT 1;

END
#end

#begin
CREATE DEFINER=`peuser`@`%` PROCEDURE `test_utf`()
BEGIN
SET @Ν_greece := 1, @N_latin := 'test';
SELECT
@Ν_greece
,@N_latin;
END
#end
Loading