Commit graph

9 commits

Author SHA1 Message Date
Daniel Black
d7d8c2c287 MDEV-31566: Fix buffer overrun of column_json function (postfix)
Test case failed --view protocol. Revert to using table for data
in the test.
2024-05-10 13:39:10 +10:00
He Guohua
867747204a MDEV-31566 Fix buffer overrun of column_json function
The accounting of the limit variable that represents the
amount of space left it the buffer was incorrect.

Also there was 1 or 2 bytes left to write that occured without
the buffer length being checked.

Review: Sanja Byelkin
2024-05-09 10:45:15 +10:00
Alexander Barkov
29bb321f04 MDEV-33788 HEX(COLUMN_CREATE(.. AS CHAR ...)) fails with --view-protocol
Item_func_dyncol_create::print_arguments() printed only CHARSET clause
without COLLATE.

Therefore,

HEX(column_create(1,'1212' AS CHAR CHARACTER SET utf8mb3 COLLATE utf8mb3_bin))

inside a VIEW changed to just:

HEX(column_create(1,'1212' AS CHAR CHARACTER SET utf8mb3))

which changed the collation ID seen in the HEX output.

Note, the collation ID inside column_create() is not really much important.
(It's only important what the character set is).
And for COLLATE, the more important thing is what's later written
in the AS clause of COLUMN_GET:

SELECT
   COLUMN_GET(
    column_create(1,'1212' AS CHAR CHARACTER SET utf8mb3 COLLATE utf8mb3_bin)
    column_nr AS type  -- this type is more important
   );

Still, let's add the COLLATE clause into the COLUMN_CREATE() print output,
although it's not important for now for anything else than just the HEX output.
At least to make VIEW work in a more predictable way with HEX(COLUMN_CREATE()).

Also, in the future we can start using somehow the collation ID written inside
COLUMN_CREATE(), for example by making the `AS type` clause optional in
COLUMN_GET():
  COLUMN_GET(dyncol_blob, column_nr [AS type]);
instead of:
  COLUMN_GET(dyncol_blob, column_nr AS type);

SQL Server compatibility layer may need this for
the SQL_Variant data type support.
2024-03-29 05:45:06 +04:00
Alexander Barkov
d5aff2d551 MDEV-32465 dyncol changes under view protocol
Dyncol functions like column_create() encode the
current character set inside the value.
So they cannot be used with --view-protocol.

This patch changes only --disable_view_protocol to
--disable_service_connection.
2023-11-02 07:07:55 +04:00
Oleksandr Byelkin
d594f1e531 Removing MDEV-27871 because it is not a bug
Part 1
2023-10-13 14:09:22 +02:00
Oleksandr Byelkin
50a2e8b189 MDEV-32140: Valgrind/MSAN warnings in dynamic_column_update_move_left
Do not manipulate empty dynamic column, just better return empty dynamic column from the begining.
(it is also optimisation)
2023-09-26 13:56:05 +02:00
Lena Startseva
72ba96a48e MDEV-27691: make working view-protocol
Tests with checking metadata or that cannot be run with
the view-protocol are excluded from --view-protocol.
For tests that do not allow the use of an additional connection,
the util connection is disabled with "--disable_service_connection".
Also cases with bugs for --view-protocol are disabled.
2022-09-23 17:36:20 +07:00
Monty
a071e0e029 Merge branch '10.2' into 10.3 2019-09-03 13:17:32 +03:00
Michael Widenius
a7abddeffa Create 'main' test directory and move 't' and 'r' there 2018-03-29 13:59:44 +03:00
Renamed from mysql-test/t/dyncol.test (Browse further)