diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2021-04-16 11:55:52 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2021-04-21 10:21:47 +0400 |
commit | 59f3399e29f214073ae957e81af7d72d187802f0 (patch) | |
tree | a7092742c82c96c809ecacff45e01af214b57f72 /mysql-test/suite/json | |
parent | 277aa532f358a9abb8b3e7ab572e6a7c7985e04f (diff) | |
download | mariadb-git-59f3399e29f214073ae957e81af7d72d187802f0.tar.gz |
MDEV-25420 JSON_TABLE: ASAN heap-buffer-overflow in Protocol::net_store_data or consequent failures.
Create_tmp_table::add_field didn't consider BIT type field for
null_counter.
Diffstat (limited to 'mysql-test/suite/json')
-rw-r--r-- | mysql-test/suite/json/r/json_table.result | 9 | ||||
-rw-r--r-- | mysql-test/suite/json/t/json_table.test | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/suite/json/r/json_table.result b/mysql-test/suite/json/r/json_table.result index 59197c89881..8b5fc2bb40f 100644 --- a/mysql-test/suite/json/r/json_table.result +++ b/mysql-test/suite/json/r/json_table.result @@ -832,5 +832,14 @@ x TEXT PATH '$[9]')) AS jt GROUP BY x; x COUNT(*) NULL 1 # +# MDEV-25408 JSON_TABLE: AddressSanitizer CHECK failed in Binary_string::realloc_raw. +# +SELECT * FROM JSON_TABLE('{}', '$' COLUMNS( +a TEXT EXISTS PATH '$', b VARCHAR(40) PATH '$', c BIT(60) PATH '$', d VARCHAR(60) PATH '$', e BIT(62) PATH '$', +f FOR ORDINALITY, g INT PATH '$', h VARCHAR(36) PATH '$', i DATE PATH '$', j CHAR(4) PATH '$' + )) AS jt; +a b c d e f g h i j +1 NULL NULL NULL +# # End of 10.6 tests # diff --git a/mysql-test/suite/json/t/json_table.test b/mysql-test/suite/json/t/json_table.test index 8ad0157aea1..dae538e9f9e 100644 --- a/mysql-test/suite/json/t/json_table.test +++ b/mysql-test/suite/json/t/json_table.test @@ -729,5 +729,12 @@ SELECT x, COUNT(*) FROM JSON_TABLE( '{}', '$' COLUMNS( x TEXT PATH '$[9]')) AS jt GROUP BY x; --echo # +--echo # MDEV-25408 JSON_TABLE: AddressSanitizer CHECK failed in Binary_string::realloc_raw. +--echo # +SELECT * FROM JSON_TABLE('{}', '$' COLUMNS( + a TEXT EXISTS PATH '$', b VARCHAR(40) PATH '$', c BIT(60) PATH '$', d VARCHAR(60) PATH '$', e BIT(62) PATH '$', + f FOR ORDINALITY, g INT PATH '$', h VARCHAR(36) PATH '$', i DATE PATH '$', j CHAR(4) PATH '$' + )) AS jt; +--echo # --echo # End of 10.6 tests --echo # |