Commit e672d3fb authored by Sergei Golubchik's avatar Sergei Golubchik

Merge branch 'merge/merge-perfschema-5.6' into 10.0

5.6.32
parents 57fbc603 0d8bb019
......@@ -205,7 +205,7 @@ maria_declare_plugin(perfschema)
0x0001,
pfs_status_vars,
NULL,
"5.6.29",
"5.6.32",
MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;
......
/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -340,11 +340,17 @@ void table_events_statements_common::make_row_part_1(PFS_events_statements *stat
CHARSET_INFO *cs= get_charset(statement->m_sqltext_cs_number, MYF(0));
size_t valid_length= statement->m_sqltext_length;
if (cs->mbmaxlen > 1)
if (cs != NULL)
{
int well_formed_error;
valid_length= cs->cset->well_formed_len(cs, statement->m_sqltext, statement->m_sqltext + valid_length,
valid_length, &well_formed_error);
if (cs->mbmaxlen > 1)
{
int well_formed_error;
valid_length= cs->cset->well_formed_len(cs,
statement->m_sqltext,
statement->m_sqltext + valid_length,
valid_length,
&well_formed_error);
}
}
m_row.m_sqltext.set_charset(cs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment