Skip to content

Commit c6e46b5

Browse files
committed
1 parent 466c36d commit c6e46b5

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/audit_handler.cc

+20-1
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,25 @@ static bool parse_length_encoded_string(
833833
, data_length
834834
, nchars_max
835835
);
836+
#elif MYSQL_VERSION_ID >= 80031
837+
/*
838+
TODO: Migrate the data itself to UTF8MB4,
839+
this is still UTF8MB3 printed in a UTF8MB4 column.
840+
*/
841+
const char *well_formed_error_pos = NULL, *cannot_convert_error_pos = NULL,
842+
*from_end_pos = NULL;
843+
copy_length = well_formed_copy_nchars(
844+
&my_charset_utf8mb3_bin
845+
, dest
846+
, dest_size
847+
, from_cs
848+
, *ptr
849+
, data_length
850+
, nchars_max
851+
, &well_formed_error_pos
852+
, &cannot_convert_error_pos
853+
, &from_end_pos
854+
);
836855
#else
837856
/*
838857
TODO: Migrate the data itself to UTF8MB4,
@@ -1086,7 +1105,7 @@ ssize_t Audit_json_formatter::event_format(ThdSesData *pThdData, IWriter *writer
10861105
uint errors = 0;
10871106

10881107
size_t len = copy_and_convert(to, to_amount,
1089-
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100504
1108+
#if (defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100504) || (!defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 80031)
10901109
&my_charset_utf8mb3_general_ci,
10911110
#else
10921111
&my_charset_utf8_general_ci,

0 commit comments

Comments
 (0)