-
Notifications
You must be signed in to change notification settings - Fork 986
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
2,152 additions
and
697 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: CI-3p-postgresql | ||
run-name: '${{ github.event.workflow_run && github.event.workflow_run.head_branch || github.ref_name }} ${{ github.workflow }} ${{ github.event.workflow_run && github.event.workflow_run.head_sha || github.sha }}' | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_run: | ||
workflows: [ CI-trigger ] | ||
types: [ completed ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.workflow_run && github.event.workflow_run.head_branch || github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
run: | ||
if: ${{ github.event.workflow_run && github.event.workflow_run.conclusion == 'success' || ! github.event.workflow_run }} | ||
uses: sysown/proxysql/.github/workflows/ci-3p-postgresql.yml@GH-Actions | ||
secrets: inherit | ||
with: | ||
trigger: ${{ toJson(github) }} | ||
infradb: ${{ vars.MATRIX_3P_POSTGRESQL_infradb_pgsql }} | ||
connector: ${{ vars.MATRIX_3P_POSTGRESQL_connector_pgsql }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
deps/mariadb-client-library/mariadb_lib.c.metadata_column_check.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff --git libmariadb/mariadb_lib.c libmariadb/mariadb_lib.c | ||
index 027167f1..58b8283a 100644 | ||
--- libmariadb/mariadb_lib.c | ||
+++ libmariadb/mariadb_lib.c | ||
@@ -3021,6 +3021,12 @@ MYSQL_FIELD *ma_duplicate_resultset_metadata(MYSQL_FIELD *fields, size_t count, | ||
return result; | ||
} | ||
|
||
+static uint8_t mysql_encode_length(uint64_t len) { | ||
+ if (len < 251) { return 1; } | ||
+ if (len < 65536) { return 3; } | ||
+ if (len < 16777216) { return 4; } | ||
+ return 9; | ||
+} | ||
|
||
int mthd_my_read_query_result(MYSQL *mysql) | ||
{ | ||
@@ -3070,6 +3076,13 @@ get_info: | ||
|
||
if (has_metadata) | ||
{ | ||
+ // integrity-check: the length encoding of the field count from 'column-count' packet | ||
+ // must match the packet length from header, otherwise packet is malformed. | ||
+ ulong enc_len = mysql_encode_length(field_count); | ||
+ if (enc_len != length) { | ||
+ my_set_error(mysql, CR_MALFORMED_PACKET, SQLSTATE_UNKNOWN, 0); | ||
+ return -1; | ||
+ } | ||
// read packet metadata | ||
mysql->fields = | ||
mthd_my_read_metadata(mysql, field_count, 7 + ma_extended_type_info_rows(mysql)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.