Skip to content

Commit

Permalink
[release-19.0] Fix wrong assignment to sql_id_opt in the parser (#1…
Browse files Browse the repository at this point in the history
…5862) (#15869)

Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com>
  • Loading branch information
vitess-bot[bot] and frouioui committed May 8, 2024
1 parent 1b595d4 commit 830f68a
Show file tree
Hide file tree
Showing 3 changed files with 529 additions and 524 deletions.
3 changes: 3 additions & 0 deletions go/vt/sqlparser/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3697,6 +3697,9 @@ var (
}, {
input: "select _ascii 'b' 'a' 'c'",
output: "select _ascii 'bac' from dual",
}, {
input: "SELECT id, coalesce( (SELECT Json_arrayagg(Json_array(id)) FROM (SELECT *, Row_number() over (ORDER BY users.order ASC) FROM unsharded as users WHERE users.purchaseorderid = orders.id) users), json_array()) AS users, coalesce( (SELECT json_arrayagg(json_array(id)) FROM (SELECT *, row_number() over (ORDER BY tests.order ASC) FROM unsharded as tests WHERE tests.purchaseorderid = orders.id) tests), json_array()) AS tests FROM unsharded as orders WHERE orders.id = 'xxx'",
output: "select id, coalesce((select Json_arrayagg(json_array(id)) from (select *, row_number() over ( order by users.`order` asc) from unsharded as users where users.purchaseorderid = orders.id) as users), json_array()) as users, coalesce((select json_arrayagg(json_array(id)) from (select *, row_number() over ( order by tests.`order` asc) from unsharded as tests where tests.purchaseorderid = orders.id) as tests), json_array()) as tests from unsharded as orders where orders.id = 'xxx'",
}, {
input: `kill connection 18446744073709551615`,
}, {
Expand Down
Loading

0 comments on commit 830f68a

Please sign in to comment.