diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-12-11 21:39:26 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-12-11 21:39:26 +0100 |
commit | 36ebd704dec83745c67249501c4343c140eb272b (patch) | |
tree | f37c35461584549349c6a56dbe94fa5fb4420c52 /storage/perfschema/table_variables_by_thread.cc | |
parent | 15f60c1a733eced957384ac56317337fc5f32420 (diff) | |
download | mariadb-git-36ebd704dec83745c67249501c4343c140eb272b.tar.gz |
5.7.28
Diffstat (limited to 'storage/perfschema/table_variables_by_thread.cc')
-rw-r--r-- | storage/perfschema/table_variables_by_thread.cc | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/storage/perfschema/table_variables_by_thread.cc b/storage/perfschema/table_variables_by_thread.cc index 41eb5f3111e..702bfd07d02 100644 --- a/storage/perfschema/table_variables_by_thread.cc +++ b/storage/perfschema/table_variables_by_thread.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2018, 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software @@ -186,7 +193,7 @@ void table_variables_by_thread { pfs_optimistic_state lock; m_row_exists= false; - if (system_var->is_null()) + if (system_var->is_null() || system_var->is_ignored()) return; /* Protect this reader against a thread termination */ @@ -194,7 +201,7 @@ void table_variables_by_thread m_row.m_thread_internal_id= thread->m_thread_internal_id; m_row.m_variable_name.make_row(system_var->m_name, system_var->m_name_length); - m_row.m_variable_value.make_row(system_var->m_value_str, system_var->m_value_length); + m_row.m_variable_value.make_row(system_var); if (!thread->m_lock.end_optimistic_lock(&lock)) return; @@ -230,7 +237,7 @@ int table_variables_by_thread set_field_varchar_utf8(f, m_row.m_variable_name.m_str, m_row.m_variable_name.m_length); break; case 2: /* VARIABLE_VALUE */ - set_field_varchar_utf8(f, m_row.m_variable_value.m_str, m_row.m_variable_value.m_length); + m_row.m_variable_value.set_field(f); break; default: DBUG_ASSERT(false); |