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 | |
parent | 15f60c1a733eced957384ac56317337fc5f32420 (diff) | |
download | mariadb-git-36ebd704dec83745c67249501c4343c140eb272b.tar.gz |
5.7.28
426 files changed, 5077 insertions, 2340 deletions
diff --git a/include/mysql/psi/mysql_file.h b/include/mysql/psi/mysql_file.h index fd28886d7bc..a7d0bcbc86b 100644 --- a/include/mysql/psi/mysql_file.h +++ b/include/mysql/psi/mysql_file.h @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2017, 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 Foundation, @@ -1306,12 +1313,12 @@ inline_mysql_file_rename( struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_name_locker) - (&state, key, PSI_FILE_RENAME, to, &locker); + (&state, key, PSI_FILE_RENAME, from, &locker); if (likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_rename(from, to, flags); - PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); + PSI_FILE_CALL(end_file_rename_wait)(locker, from, to, result); return result; } #endif @@ -1387,12 +1394,12 @@ inline_mysql_file_rename_with_symlink( struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_name_locker) - (&state, key, PSI_FILE_RENAME, to, &locker); + (&state, key, PSI_FILE_RENAME, from, &locker); if (likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_rename_with_symlink(from, to, flags); - PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); + PSI_FILE_CALL(end_file_rename_wait)(locker, from, to, result); return result; } #endif diff --git a/include/mysql/psi/mysql_idle.h b/include/mysql/psi/mysql_idle.h index 102304aa338..662de59f1d9 100644 --- a/include/mysql/psi/mysql_idle.h +++ b/include/mysql/psi/mysql_idle.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2013, 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 Foundation, diff --git a/include/mysql/psi/mysql_mdl.h b/include/mysql/psi/mysql_mdl.h index bb2b76c151c..0db0160c77d 100644 --- a/include/mysql/psi/mysql_mdl.h +++ b/include/mysql/psi/mysql_mdl.h @@ -1,13 +1,20 @@ /* Copyright (c) 2012, 2015, 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 Foundation, diff --git a/include/mysql/psi/mysql_memory.h b/include/mysql/psi/mysql_memory.h index 55dd8184b10..2955c9d303e 100644 --- a/include/mysql/psi/mysql_memory.h +++ b/include/mysql/psi/mysql_memory.h @@ -1,13 +1,20 @@ /* Copyright (c) 2012, 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 - 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 Foundation, diff --git a/include/mysql/psi/mysql_ps.h b/include/mysql/psi/mysql_ps.h index 485e1fbedfa..e68994d949c 100644 --- a/include/mysql/psi/mysql_ps.h +++ b/include/mysql/psi/mysql_ps.h @@ -1,13 +1,20 @@ -/* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2014, 2017, 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 @@ -36,6 +43,8 @@ inline_mysql_destroy_prepared_stmt(PREPARED_STMT) #define MYSQL_REPREPARE_PS(PREPARED_STMT) \ inline_mysql_reprepare_prepared_stmt(PREPARED_STMT) + #define MYSQL_SET_PS_TEXT(PREPARED_STMT, SQLTEXT, SQLTEXT_LENGTH) \ + inline_mysql_set_prepared_stmt_text(PREPARED_STMT, SQLTEXT, SQLTEXT_LENGTH) #else #define MYSQL_CREATE_PS(IDENTITY, ID, LOCKER, NAME, NAME_LENGTH, SQLTEXT, SQLTEXT_LENGTH) \ NULL @@ -45,6 +54,8 @@ do {} while (0) #define MYSQL_REPREPARE_PS(PREPARED_STMT) \ do {} while (0) + #define MYSQL_SET_PS_TEXT(PREPARED_STMT, SQLTEXT, SQLTEXT_LENGTH) \ + do {} while (0) #endif #ifdef HAVE_PSI_PS_INTERFACE @@ -83,6 +94,17 @@ inline_mysql_reprepare_prepared_stmt(PSI_prepared_stmt *prepared_stmt) if (prepared_stmt != NULL) PSI_PS_CALL(reprepare_prepared_stmt)(prepared_stmt); } + +static inline void +inline_mysql_set_prepared_stmt_text(PSI_prepared_stmt *prepared_stmt, + const char *text, + uint text_len) +{ + if (prepared_stmt != NULL) + { + PSI_PS_CALL(set_prepared_stmt_text)(prepared_stmt, text, text_len); + } +} #endif #endif diff --git a/include/mysql/psi/mysql_socket.h b/include/mysql/psi/mysql_socket.h index ad76e318b30..94e17c4f866 100644 --- a/include/mysql/psi/mysql_socket.h +++ b/include/mysql/psi/mysql_socket.h @@ -1,14 +1,20 @@ /* 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 the Free Software Foundation; version 2 of the -License. +This program is free software; you can redistribute it and/or modify +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. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +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 diff --git a/include/mysql/psi/mysql_sp.h b/include/mysql/psi/mysql_sp.h index 68fc468db1f..5eeea37f4c4 100644 --- a/include/mysql/psi/mysql_sp.h +++ b/include/mysql/psi/mysql_sp.h @@ -1,13 +1,20 @@ /* Copyright (c) 2013, 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 diff --git a/include/mysql/psi/mysql_stage.h b/include/mysql/psi/mysql_stage.h index 9c1623f4373..fa6dbc2df61 100644 --- a/include/mysql/psi/mysql_stage.h +++ b/include/mysql/psi/mysql_stage.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2014, 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 diff --git a/include/mysql/psi/mysql_statement.h b/include/mysql/psi/mysql_statement.h index 9c27933b069..597d15270a6 100644 --- a/include/mysql/psi/mysql_statement.h +++ b/include/mysql/psi/mysql_statement.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/include/mysql/psi/mysql_table.h b/include/mysql/psi/mysql_table.h index 00f75661b70..bad0ae3cdfd 100644 --- a/include/mysql/psi/mysql_table.h +++ b/include/mysql/psi/mysql_table.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2014, 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 Foundation, diff --git a/include/mysql/psi/mysql_thread.h b/include/mysql/psi/mysql_thread.h index c5ace991e0b..7f87192182f 100644 --- a/include/mysql/psi/mysql_thread.h +++ b/include/mysql/psi/mysql_thread.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 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 - 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 Foundation, diff --git a/include/mysql/psi/mysql_transaction.h b/include/mysql/psi/mysql_transaction.h index c80abf46228..41629395ee0 100644 --- a/include/mysql/psi/mysql_transaction.h +++ b/include/mysql/psi/mysql_transaction.h @@ -1,13 +1,20 @@ /* Copyright (c) 2013, 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 diff --git a/include/mysql/psi/psi.h b/include/mysql/psi/psi.h index 9fb62868e31..34422d31b8f 100644 --- a/include/mysql/psi/psi.h +++ b/include/mysql/psi/psi.h @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2017, 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 Foundation, @@ -1965,6 +1972,17 @@ typedef void (*end_file_close_wait_v1_t) (struct PSI_file_locker *locker, int rc); /** + Rename a file instrumentation close operation. + @param locker the file locker. + @param old_name name of the file to be renamed. + @param new_name name of the file after rename. + @param rc the rename operation return code (0 for success). +*/ +typedef void (*end_file_rename_wait_v1_t) + (struct PSI_file_locker *locker, const char *old_name, + const char *new_name, int rc); + +/** Start a new stage, and implicitly end the previous stage. @param key the key of the new stage @param src_file the source file name @@ -2344,6 +2362,15 @@ typedef void (*execute_prepared_stmt_v1_t) (PSI_statement_locker *locker, PSI_prepared_stmt* prepared_stmt); /** + Set the statement text for a prepared statment event. + @param prepared_stmt prepared statement. + @param text the prepared statement text + @param text_len the prepared statement text length +*/ +typedef void (*set_prepared_stmt_text_v1_t)(PSI_prepared_stmt *prepared_stmt, + const char *text, + uint text_len); +/** Get a digest locker for the current statement. @param locker a statement locker for the running thread */ @@ -2572,6 +2599,8 @@ struct PSI_v1 start_file_close_wait_v1_t start_file_close_wait; /** @sa end_file_close_wait_v1_t. */ end_file_close_wait_v1_t end_file_close_wait; + /** @sa rename_file_close_wait_v1_t. */ + end_file_rename_wait_v1_t end_file_rename_wait; /** @sa start_stage_v1_t. */ start_stage_v1_t start_stage; /** @sa get_current_stage_progress_v1_t. */ @@ -2658,6 +2687,8 @@ struct PSI_v1 reprepare_prepared_stmt_v1_t reprepare_prepared_stmt; /** @sa execute_prepared_stmt_v1_t. */ execute_prepared_stmt_v1_t execute_prepared_stmt; + /** @sa set_prepared_stmt_text_v1_t. */ + set_prepared_stmt_text_v1_t set_prepared_stmt_text; /** @sa digest_start_v1_t. */ digest_start_v1_t digest_start; /** @sa digest_end_v1_t. */ diff --git a/include/mysql/psi/psi_abi_v0.h b/include/mysql/psi/psi_abi_v0.h index cb6e225246d..da643cd3539 100644 --- a/include/mysql/psi/psi_abi_v0.h +++ b/include/mysql/psi/psi_abi_v0.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2013, 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 Foundation, diff --git a/include/mysql/psi/psi_abi_v1.h b/include/mysql/psi/psi_abi_v1.h index 54c49f0c518..723e5aa3216 100644 --- a/include/mysql/psi/psi_abi_v1.h +++ b/include/mysql/psi/psi_abi_v1.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, 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 Foundation, diff --git a/include/mysql/psi/psi_abi_v1.h.pp b/include/mysql/psi/psi_abi_v1.h.pp index f96c944df8e..10fcde7128e 100644 --- a/include/mysql/psi/psi_abi_v1.h.pp +++ b/include/mysql/psi/psi_abi_v1.h.pp @@ -550,6 +550,9 @@ typedef void (*start_file_close_wait_v1_t) (struct PSI_file_locker *locker, const char *src_file, uint src_line); typedef void (*end_file_close_wait_v1_t) (struct PSI_file_locker *locker, int rc); +typedef void (*end_file_rename_wait_v1_t) + (struct PSI_file_locker *locker, const char *old_name, + const char *new_name, int rc); typedef PSI_stage_progress* (*start_stage_v1_t) (PSI_stage_key key, const char *src_file, int src_line); typedef PSI_stage_progress* (*get_current_stage_progress_v1_t)(void); @@ -654,6 +657,9 @@ typedef void (*reprepare_prepared_stmt_v1_t) (PSI_prepared_stmt *prepared_stmt); typedef void (*execute_prepared_stmt_v1_t) (PSI_statement_locker *locker, PSI_prepared_stmt* prepared_stmt); +typedef void (*set_prepared_stmt_text_v1_t)(PSI_prepared_stmt *prepared_stmt, + const char *text, + uint text_len); typedef struct PSI_digest_locker * (*digest_start_v1_t) (struct PSI_statement_locker *locker); typedef void (*digest_end_v1_t) @@ -764,6 +770,7 @@ struct PSI_v1 end_file_wait_v1_t end_file_wait; start_file_close_wait_v1_t start_file_close_wait; end_file_close_wait_v1_t end_file_close_wait; + end_file_rename_wait_v1_t end_file_rename_wait; start_stage_v1_t start_stage; get_current_stage_progress_v1_t get_current_stage_progress; end_stage_v1_t end_stage; @@ -807,6 +814,7 @@ struct PSI_v1 destroy_prepared_stmt_v1_t destroy_prepared_stmt; reprepare_prepared_stmt_v1_t reprepare_prepared_stmt; execute_prepared_stmt_v1_t execute_prepared_stmt; + set_prepared_stmt_text_v1_t set_prepared_stmt_text; digest_start_v1_t digest_start; digest_end_v1_t digest_end; set_thread_connect_attrs_v1_t set_thread_connect_attrs; diff --git a/include/mysql/psi/psi_abi_v2.h b/include/mysql/psi/psi_abi_v2.h index bd7dd487902..385bc9a5c5e 100644 --- a/include/mysql/psi/psi_abi_v2.h +++ b/include/mysql/psi/psi_abi_v2.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2013, 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 Foundation, diff --git a/include/mysql/psi/psi_base.h b/include/mysql/psi/psi_base.h index 94cb5c9f51c..d9f2520c215 100644 --- a/include/mysql/psi/psi_base.h +++ b/include/mysql/psi/psi_base.h @@ -1,13 +1,25 @@ /* Copyright (c) 2008, 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 - 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. + + Without limiting anything contained in the foregoing, this file, + which is part of C Driver for MySQL (Connector/C), is also subject to the + Universal FOSS Exception, version 1.0, a copy of which can be found at + http://oss.oracle.com/licenses/universal-foss-exception. 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 Foundation, diff --git a/include/mysql/psi/psi_memory.h b/include/mysql/psi/psi_memory.h index 725b3ed77d0..d6915a11a72 100644 --- a/include/mysql/psi/psi_memory.h +++ b/include/mysql/psi/psi_memory.h @@ -1,13 +1,25 @@ /* Copyright (c) 2013, 2015, 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. + + Without limiting anything contained in the foregoing, this file, + which is part of C Driver for MySQL (Connector/C), is also subject to the + Universal FOSS Exception, version 1.0, a copy of which can be found at + http://oss.oracle.com/licenses/universal-foss-exception. 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 Foundation, diff --git a/mysql-test/suite/perfschema/include/transaction_nested_events_verifier.inc b/mysql-test/suite/perfschema/include/transaction_nested_events_verifier.inc index 05c7a834178..e81a42b4817 100644 --- a/mysql-test/suite/perfschema/include/transaction_nested_events_verifier.inc +++ b/mysql-test/suite/perfschema/include/transaction_nested_events_verifier.inc @@ -13,8 +13,7 @@ let $wait_timeout= 10; let $wait_condition= SELECT COUNT(*) > 0 FROM performance_schema.threads WHERE THREAD_ID = @con1_thread_id - AND (PROCESSLIST_STATE = 'Sleep' OR PROCESSLIST_STATE IS NULL) - AND PROCESSLIST_INFO IS NULL; + AND (PROCESSLIST_STATE = 'Sleep' OR PROCESSLIST_STATE IS NULL); --source include/wait_condition.inc if(!$success) { diff --git a/mysql-test/suite/perfschema/r/aggregate.result b/mysql-test/suite/perfschema/r/aggregate.result deleted file mode 100644 index ab927f544cf..00000000000 --- a/mysql-test/suite/perfschema/r/aggregate.result +++ /dev/null @@ -1,118 +0,0 @@ -"General cleanup" -drop table if exists t1; -update performance_schema.setup_instruments set enabled = 'NO'; -update performance_schema.setup_consumers set enabled = 'NO'; -truncate table performance_schema.file_summary_by_event_name; -truncate table performance_schema.file_summary_by_instance; -truncate table performance_schema.socket_summary_by_event_name; -truncate table performance_schema.socket_summary_by_instance; -truncate table performance_schema.events_waits_summary_global_by_event_name; -truncate table performance_schema.events_waits_summary_by_instance; -truncate table performance_schema.events_waits_summary_by_thread_by_event_name; -update performance_schema.setup_consumers set enabled = 'YES'; -update performance_schema.setup_instruments -set enabled = 'YES', timed = 'YES'; -create table t1 ( -id INT PRIMARY KEY, -b CHAR(100) DEFAULT 'initial value') -ENGINE=MyISAM; -insert into t1 (id) values (1), (2), (3), (4), (5), (6), (7), (8); -update performance_schema.setup_instruments SET enabled = 'NO'; -update performance_schema.setup_consumers set enabled = 'NO'; -set @dump_all=FALSE; -"Verifying file aggregate consistency" -SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ) -FROM performance_schema.file_summary_by_event_name AS e -JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.COUNT_READ <> SUM(i.COUNT_READ)) -OR @dump_all; -EVENT_NAME COUNT_READ SUM(i.COUNT_READ) -SELECT EVENT_NAME, e.COUNT_WRITE, SUM(i.COUNT_WRITE) -FROM performance_schema.file_summary_by_event_name AS e -JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.COUNT_WRITE <> SUM(i.COUNT_WRITE)) -OR @dump_all; -EVENT_NAME COUNT_WRITE SUM(i.COUNT_WRITE) -SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ) -FROM performance_schema.socket_summary_by_event_name AS e -JOIN performance_schema.socket_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.COUNT_READ <> SUM(i.COUNT_READ)) -OR @dump_all; -EVENT_NAME COUNT_READ SUM(i.COUNT_READ) -SELECT EVENT_NAME, e.COUNT_WRITE, SUM(i.COUNT_WRITE) -FROM performance_schema.socket_summary_by_event_name AS e -JOIN performance_schema.socket_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.COUNT_WRITE <> SUM(i.COUNT_WRITE)) -OR @dump_all; -EVENT_NAME COUNT_WRITE SUM(i.COUNT_WRITE) -SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_READ, SUM(i.SUM_NUMBER_OF_BYTES_READ) -FROM performance_schema.file_summary_by_event_name AS e -JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.SUM_NUMBER_OF_BYTES_READ <> SUM(i.SUM_NUMBER_OF_BYTES_READ)) -OR @dump_all; -EVENT_NAME SUM_NUMBER_OF_BYTES_READ SUM(i.SUM_NUMBER_OF_BYTES_READ) -SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_WRITE, SUM(i.SUM_NUMBER_OF_BYTES_WRITE) -FROM performance_schema.file_summary_by_event_name AS e -JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.SUM_NUMBER_OF_BYTES_WRITE <> SUM(i.SUM_NUMBER_OF_BYTES_WRITE)) -OR @dump_all; -EVENT_NAME SUM_NUMBER_OF_BYTES_WRITE SUM(i.SUM_NUMBER_OF_BYTES_WRITE) -"Verifying waits aggregate consistency (instance)" -SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(i.SUM_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.SUM_TIMER_WAIT < SUM(i.SUM_TIMER_WAIT)) -OR @dump_all; -EVENT_NAME SUM_TIMER_WAIT SUM(i.SUM_TIMER_WAIT) -SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(i.MIN_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.MIN_TIMER_WAIT > MIN(i.MIN_TIMER_WAIT)) -AND (MIN(i.MIN_TIMER_WAIT) != 0) -OR @dump_all; -EVENT_NAME MIN_TIMER_WAIT MIN(i.MIN_TIMER_WAIT) -SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(i.MAX_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.MAX_TIMER_WAIT < MAX(i.MAX_TIMER_WAIT)) -OR @dump_all; -EVENT_NAME MAX_TIMER_WAIT MAX(i.MAX_TIMER_WAIT) -"Verifying waits aggregate consistency (thread)" -SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(t.SUM_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t -USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.SUM_TIMER_WAIT < SUM(t.SUM_TIMER_WAIT)) -OR @dump_all; -EVENT_NAME SUM_TIMER_WAIT SUM(t.SUM_TIMER_WAIT) -SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(t.MIN_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t -USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.MIN_TIMER_WAIT > MIN(t.MIN_TIMER_WAIT)) -AND (MIN(t.MIN_TIMER_WAIT) != 0) -OR @dump_all; -EVENT_NAME MIN_TIMER_WAIT MIN(t.MIN_TIMER_WAIT) -SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(t.MAX_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t -USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.MAX_TIMER_WAIT < MAX(t.MAX_TIMER_WAIT)) -OR @dump_all; -EVENT_NAME MAX_TIMER_WAIT MAX(t.MAX_TIMER_WAIT) -update performance_schema.setup_consumers set enabled = 'YES'; -update performance_schema.setup_instruments -set enabled = 'YES', timed = 'YES'; -drop table test.t1; diff --git a/mysql-test/suite/perfschema/r/csv_table_io.result b/mysql-test/suite/perfschema/r/csv_table_io.result index cc8cebd680d..0e50dc24927 100644 --- a/mysql-test/suite/perfschema/r/csv_table_io.result +++ b/mysql-test/suite/perfschema/r/csv_table_io.result @@ -70,39 +70,39 @@ where event_name like 'wait/io/table/%' and object_schema in ("test") order by thread_id, event_id; event_name short_source object_type object_schema pretty_name operation number_of_bytes -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 3 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 3 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab delete 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 show global status like 'performance_schema_%'; Variable_name Value Performance_schema_accounts_lost 0 diff --git a/mysql-test/suite/perfschema/r/digest_table_full.result b/mysql-test/suite/perfschema/r/digest_table_full.result index cc2bc0a79c7..99da7acd971 100644 --- a/mysql-test/suite/perfschema/r/digest_table_full.result +++ b/mysql-test/suite/perfschema/r/digest_table_full.result @@ -113,7 +113,7 @@ SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARN SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest; SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS NULL NULL NULL 55 32 1 2 -statements_digest 21b6affb55f3e69c598b47257f4d0ec6 TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1 0 0 0 +statements_digest d24da32343f2b799f8a7ba1bdc45f83b TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1 0 0 0 SHOW GLOBAL VARIABLES LIKE "performance_schema_digests_size"; Variable_name Value performance_schema_digests_size 2 diff --git a/mysql-test/suite/perfschema/r/dml_file_instances.result b/mysql-test/suite/perfschema/r/dml_file_instances.result index d2564cb58dd..a13c570a5ad 100644 --- a/mysql-test/suite/perfschema/r/dml_file_instances.result +++ b/mysql-test/suite/perfschema/r/dml_file_instances.result @@ -18,3 +18,62 @@ UNLOCK TABLES; LOCK TABLES performance_schema.file_instances WRITE; ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_instances' UNLOCK TABLES; +### +### Bug#26152751: INNODB LEAKS MEMORY, PERFORMANCE_SCHEMA FILE_INSTANCES +### #SQL-IB3129987-252773.IBD +### +CREATE DATABASE db_26152751; +USE db_26152751; +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; +FILE_NAME +CREATE TABLE t_db_26152751 (a INT) ENGINE=MYISAM; +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; +FILE_NAME +t_db_26152751.frm +t_db_26152751.MYI +t_db_26152751.MYD +RENAME TABLE t_db_26152751 to t_db_26152751_new; +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; +FILE_NAME +t_db_26152751_new.frm +t_db_26152751_new.MYI +t_db_26152751_new.MYD +RENAME TABLE t_db_26152751_new to t_db_26152751; +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; +FILE_NAME +t_db_26152751.frm +t_db_26152751.MYI +t_db_26152751.MYD +ALTER TABLE t_db_26152751 ADD COLUMN b INT; +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; +FILE_NAME +t_db_26152751.frm +t_db_26152751.MYI +t_db_26152751.MYD +DROP TABLE t_db_26152751; +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; +FILE_NAME +CREATE TABLE t_db_26152751 (a INT) ENGINE=INNODB; +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; +FILE_NAME +t_db_26152751.frm +t_db_26152751.ibd +RENAME TABLE t_db_26152751 to t_db_26152751_new; +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; +FILE_NAME +t_db_26152751_new.frm +t_db_26152751_new.ibd +RENAME TABLE t_db_26152751_new to t_db_26152751; +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; +FILE_NAME +t_db_26152751.frm +t_db_26152751.ibd +ALTER TABLE t_db_26152751 ADD COLUMN b INT; +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; +FILE_NAME +t_db_26152751.frm +t_db_26152751.ibd +DROP TABLE t_db_26152751; +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; +FILE_NAME +DROP DATABASE db_26152751; diff --git a/mysql-test/suite/perfschema/r/dml_replication_group_member_stats.result b/mysql-test/suite/perfschema/r/dml_replication_group_member_stats.result index 0a148201335..f2d67f16734 100644 --- a/mysql-test/suite/perfschema/r/dml_replication_group_member_stats.result +++ b/mysql-test/suite/perfschema/r/dml_replication_group_member_stats.result @@ -1,9 +1,9 @@ SELECT * FROM performance_schema.replication_group_member_stats LIMIT 1; -CHANNEL_NAME VIEW_ID MEMBER_ID COUNT_TRANSACTIONS_IN_QUEUE COUNT_TRANSACTIONS_CHECKED COUNT_CONFLICTS_DETECTED COUNT_TRANSACTIONS_VALIDATING TRANSACTIONS_COMMITTED_ALL_MEMBERS LAST_CONFLICT_FREE_TRANSACTION +CHANNEL_NAME VIEW_ID MEMBER_ID COUNT_TRANSACTIONS_IN_QUEUE COUNT_TRANSACTIONS_CHECKED COUNT_CONFLICTS_DETECTED COUNT_TRANSACTIONS_ROWS_VALIDATING TRANSACTIONS_COMMITTED_ALL_MEMBERS LAST_CONFLICT_FREE_TRANSACTION SELECT * FROM performance_schema.replication_group_member_stats WHERE channel_name='FOO'; -CHANNEL_NAME VIEW_ID MEMBER_ID COUNT_TRANSACTIONS_IN_QUEUE COUNT_TRANSACTIONS_CHECKED COUNT_CONFLICTS_DETECTED COUNT_TRANSACTIONS_VALIDATING TRANSACTIONS_COMMITTED_ALL_MEMBERS LAST_CONFLICT_FREE_TRANSACTION +CHANNEL_NAME VIEW_ID MEMBER_ID COUNT_TRANSACTIONS_IN_QUEUE COUNT_TRANSACTIONS_CHECKED COUNT_CONFLICTS_DETECTED COUNT_TRANSACTIONS_ROWS_VALIDATING TRANSACTIONS_COMMITTED_ALL_MEMBERS LAST_CONFLICT_FREE_TRANSACTION INSERT INTO performance_schema.replication_group_member_stats SET channel_name='FOO', node_id=1; ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'replication_group_member_stats' diff --git a/mysql-test/suite/perfschema/r/dml_setup_instruments.result b/mysql-test/suite/perfschema/r/dml_setup_instruments.result index b1088a13628..3339b5a1a2c 100644 --- a/mysql-test/suite/perfschema/r/dml_setup_instruments.result +++ b/mysql-test/suite/perfschema/r/dml_setup_instruments.result @@ -16,7 +16,9 @@ wait/synch/mutex/sql/LOCK_audit_mask YES YES wait/synch/mutex/sql/LOCK_compress_gtid_table YES YES select * from performance_schema.setup_instruments where name like 'Wait/Synch/Rwlock/sql/%' - and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock') + and name not in ( +'wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock', +'wait/synch/rwlock/sql/LOCK_named_pipe_full_access_group') order by name limit 10; NAME ENABLED TIMED wait/synch/rwlock/sql/Binlog_relay_IO_delegate::lock YES YES diff --git a/mysql-test/suite/perfschema/r/dml_setup_timers.result b/mysql-test/suite/perfschema/r/dml_setup_timers.result index df6a78d7d54..ff08290175a 100644 --- a/mysql-test/suite/perfschema/r/dml_setup_timers.result +++ b/mysql-test/suite/perfschema/r/dml_setup_timers.result @@ -1,13 +1,23 @@ update performance_schema.setup_timers set timer_name='CYCLE' where name="wait"; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. update performance_schema.setup_timers set timer_name='NANOSECOND' where name="stage"; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. update performance_schema.setup_timers set timer_name='NANOSECOND' where name="statement"; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. update performance_schema.setup_timers set timer_name='MICROSECOND' where name="transaction"; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. update performance_schema.setup_timers set timer_name='MICROSECOND' where name="idle"; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.setup_timers; NAME TIMER_NAME idle MICROSECOND @@ -15,14 +25,20 @@ wait CYCLE stage NANOSECOND statement NANOSECOND transaction MICROSECOND +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.setup_timers where name='Wait'; NAME TIMER_NAME wait CYCLE +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.setup_timers where timer_name='CYCLE'; NAME TIMER_NAME wait CYCLE +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. insert into performance_schema.setup_timers set name='FOO', timer_name='CYCLE'; ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'setup_timers' @@ -31,6 +47,8 @@ set name='FOO'; ERROR HY000: Invalid performance_schema usage. update performance_schema.setup_timers set timer_name='MILLISECOND'; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.setup_timers; NAME TIMER_NAME idle MILLISECOND @@ -38,8 +56,12 @@ wait MILLISECOND stage MILLISECOND statement MILLISECOND transaction MILLISECOND +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. update performance_schema.setup_timers set timer_name='CYCLE'; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. delete from performance_schema.setup_timers; ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'setup_timers' delete from performance_schema.setup_timers @@ -51,14 +73,24 @@ LOCK TABLES performance_schema.setup_timers WRITE; UNLOCK TABLES; update performance_schema.setup_timers set timer_name='CYCLE' where name="wait"; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. update performance_schema.setup_timers set timer_name='NANOSECOND' where name="stage"; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. update performance_schema.setup_timers set timer_name='NANOSECOND' where name="statement"; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. update performance_schema.setup_timers set timer_name='MICROSECOND' where name="transaction"; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. update performance_schema.setup_timers set timer_name='MICROSECOND' where name="idle"; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.setup_timers; NAME TIMER_NAME idle MICROSECOND @@ -66,3 +98,5 @@ wait CYCLE stage NANOSECOND statement NANOSECOND transaction MICROSECOND +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. diff --git a/mysql-test/suite/perfschema/r/global_read_lock.result b/mysql-test/suite/perfschema/r/global_read_lock.result index b1836f0d961..f71601d281e 100644 --- a/mysql-test/suite/perfschema/r/global_read_lock.result +++ b/mysql-test/suite/perfschema/r/global_read_lock.result @@ -35,7 +35,7 @@ operation from performance_schema.events_waits_current where event_name like "wait/synch/cond/sql/MDL_context::COND_wait_status"; event_name short_source timer_end timer_wait operation -wait/synch/cond/sql/MDL_context::COND_wait_status mdl.cc: SET SET timed_wait +wait/synch/cond/sql/MDL_context::COND_wait_status SET SET timed_wait unlock tables; update performance_schema.setup_instruments set enabled='NO'; update performance_schema.setup_instruments set enabled='YES'; diff --git a/mysql-test/suite/perfschema/r/innodb_table_io.result b/mysql-test/suite/perfschema/r/innodb_table_io.result index 2734a4ec79b..286f0516e62 100644 --- a/mysql-test/suite/perfschema/r/innodb_table_io.result +++ b/mysql-test/suite/perfschema/r/innodb_table_io.result @@ -71,39 +71,39 @@ where event_name like 'wait/io/table/%' and object_schema in ("test") order by thread_id, event_id; event_name short_source object_type object_schema pretty_name operation number_of_bytes -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 3 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 3 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab delete 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 show global status like 'performance_schema_%'; Variable_name Value Performance_schema_accounts_lost 0 diff --git a/mysql-test/suite/perfschema/r/max_program_zero.result b/mysql-test/suite/perfschema/r/max_program_zero.result index a041a6575ef..54a203e8289 100644 --- a/mysql-test/suite/perfschema/r/max_program_zero.result +++ b/mysql-test/suite/perfschema/r/max_program_zero.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 0 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/memory_aggregate.result b/mysql-test/suite/perfschema/r/memory_aggregate.result index 25bb9e90140..bb1718ed13c 100644 --- a/mysql-test/suite/perfschema/r/memory_aggregate.result +++ b/mysql-test/suite/perfschema/r/memory_aggregate.result @@ -249,6 +249,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 2 2 set GLOBAL query_cache_size=1000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_1", 10); get_lock("marker_1", 10) 1 @@ -643,6 +645,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 3 3 set GLOBAL query_cache_size=2000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_2", 10); get_lock("marker_2", 10) 1 @@ -1415,6 +1419,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 4 4 set GLOBAL query_cache_size=500*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_3", 10); get_lock("marker_3", 10) 1 @@ -2105,6 +2111,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 6 6 set GLOBAL query_cache_size=4000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_4", 10); get_lock("marker_4", 10) 1 @@ -5584,3 +5592,5 @@ root 1 1 execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 1 1 +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_32bit.result b/mysql-test/suite/perfschema/r/memory_aggregate_32bit.result index d2e2fd6c285..5639a62cbc5 100644 --- a/mysql-test/suite/perfschema/r/memory_aggregate_32bit.result +++ b/mysql-test/suite/perfschema/r/memory_aggregate_32bit.result @@ -249,6 +249,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 2 2 set GLOBAL query_cache_size=1000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_1", 10); get_lock("marker_1", 10) 1 @@ -643,6 +645,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 3 3 set GLOBAL query_cache_size=2000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_2", 10); get_lock("marker_2", 10) 1 @@ -1415,6 +1419,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 4 4 set GLOBAL query_cache_size=500*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_3", 10); get_lock("marker_3", 10) 1 @@ -2105,6 +2111,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 6 6 set GLOBAL query_cache_size=4000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_4", 10); get_lock("marker_4", 10) 1 @@ -5584,3 +5592,5 @@ root 1 1 execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 1 1 +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_a.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_a.result index e7d70167c8f..f935a278cd7 100644 --- a/mysql-test/suite/perfschema/r/memory_aggregate_no_a.result +++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_a.result @@ -220,6 +220,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 2 2 set GLOBAL query_cache_size=1000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_1", 10); get_lock("marker_1", 10) 1 @@ -531,6 +533,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 3 3 set GLOBAL query_cache_size=2000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_2", 10); get_lock("marker_2", 10) 1 @@ -1111,6 +1115,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 4 4 set GLOBAL query_cache_size=500*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_3", 10); get_lock("marker_3", 10) 1 @@ -1610,6 +1616,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 6 6 set GLOBAL query_cache_size=4000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_4", 10); get_lock("marker_4", 10) 1 @@ -3996,3 +4004,5 @@ root 1 1 execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 1 1 +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_h.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_h.result index 4d1f7521268..445d6755f06 100644 --- a/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_h.result +++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_h.result @@ -170,6 +170,8 @@ user1 1 1 execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS set GLOBAL query_cache_size=1000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_1", 10); get_lock("marker_1", 10) 1 @@ -431,6 +433,8 @@ user2 1 1 execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS set GLOBAL query_cache_size=2000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_2", 10); get_lock("marker_2", 10) 1 @@ -936,6 +940,8 @@ user3 1 1 execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS set GLOBAL query_cache_size=500*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_3", 10); get_lock("marker_3", 10) 1 @@ -1385,6 +1391,8 @@ user4 2 2 execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS set GLOBAL query_cache_size=4000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_4", 10); get_lock("marker_4", 10) 1 @@ -3446,3 +3454,5 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS root 1 1 execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u.result index 6e8fc3796f4..21ce08a937e 100644 --- a/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u.result +++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u.result @@ -193,6 +193,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 2 2 set GLOBAL query_cache_size=1000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_1", 10); get_lock("marker_1", 10) 1 @@ -427,6 +429,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 3 3 set GLOBAL query_cache_size=2000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_2", 10); get_lock("marker_2", 10) 1 @@ -829,6 +833,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 4 4 set GLOBAL query_cache_size=500*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_3", 10); get_lock("marker_3", 10) 1 @@ -1151,6 +1157,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 6 6 set GLOBAL query_cache_size=4000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_4", 10); get_lock("marker_4", 10) 1 @@ -2424,3 +2432,5 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 1 1 +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u_no_h.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u_no_h.result index e3ba5da790f..fc17b177f57 100644 --- a/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u_no_h.result +++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u_no_h.result @@ -143,6 +143,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS set GLOBAL query_cache_size=1000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_1", 10); get_lock("marker_1", 10) 1 @@ -327,6 +329,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS set GLOBAL query_cache_size=2000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_2", 10); get_lock("marker_2", 10) 1 @@ -654,6 +658,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS set GLOBAL query_cache_size=500*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_3", 10); get_lock("marker_3", 10) 1 @@ -926,6 +932,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS set GLOBAL query_cache_size=4000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_4", 10); get_lock("marker_4", 10) 1 @@ -1874,3 +1882,5 @@ execute dump_users; USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_h.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_h.result index 0421a2ac851..bec6d10256e 100644 --- a/mysql-test/suite/perfschema/r/memory_aggregate_no_h.result +++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_h.result @@ -199,6 +199,8 @@ user1 1 1 execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS set GLOBAL query_cache_size=1000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_1", 10); get_lock("marker_1", 10) 1 @@ -543,6 +545,8 @@ user2 1 1 execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS set GLOBAL query_cache_size=2000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_2", 10); get_lock("marker_2", 10) 1 @@ -1240,6 +1244,8 @@ user3 1 1 execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS set GLOBAL query_cache_size=500*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_3", 10); get_lock("marker_3", 10) 1 @@ -1880,6 +1886,8 @@ user4 2 2 execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS set GLOBAL query_cache_size=4000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_4", 10); get_lock("marker_4", 10) 1 @@ -5034,3 +5042,5 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS root 1 1 execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_u.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_u.result index 4b2c5c57546..6191cbf6f67 100644 --- a/mysql-test/suite/perfschema/r/memory_aggregate_no_u.result +++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_u.result @@ -222,6 +222,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 2 2 set GLOBAL query_cache_size=1000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_1", 10); get_lock("marker_1", 10) 1 @@ -539,6 +541,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 3 3 set GLOBAL query_cache_size=2000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_2", 10); get_lock("marker_2", 10) 1 @@ -1133,6 +1137,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 4 4 set GLOBAL query_cache_size=500*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_3", 10); get_lock("marker_3", 10) 1 @@ -1646,6 +1652,8 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 6 6 set GLOBAL query_cache_size=4000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_4", 10); get_lock("marker_4", 10) 1 @@ -4012,3 +4020,5 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 1 1 +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_u_no_h.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_u_no_h.result index 73a124dc998..50324598db7 100644 --- a/mysql-test/suite/perfschema/r/memory_aggregate_no_u_no_h.result +++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_u_no_h.result @@ -172,6 +172,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS set GLOBAL query_cache_size=1000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_1", 10); get_lock("marker_1", 10) 1 @@ -439,6 +441,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS set GLOBAL query_cache_size=2000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_2", 10); get_lock("marker_2", 10) 1 @@ -958,6 +962,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS set GLOBAL query_cache_size=500*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_3", 10); get_lock("marker_3", 10) 1 @@ -1421,6 +1427,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS set GLOBAL query_cache_size=4000*1024; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select get_lock("marker_4", 10); get_lock("marker_4", 10) 1 @@ -3462,3 +3470,5 @@ execute dump_users; USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. diff --git a/mysql-test/suite/perfschema/r/memory_table_io.result b/mysql-test/suite/perfschema/r/memory_table_io.result index 687f39fc308..033c355dfa3 100644 --- a/mysql-test/suite/perfschema/r/memory_table_io.result +++ b/mysql-test/suite/perfschema/r/memory_table_io.result @@ -70,39 +70,39 @@ where event_name like 'wait/io/table/%' and object_schema in ("test") order by thread_id, event_id; event_name short_source object_type object_schema pretty_name operation number_of_bytes -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 3 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 3 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab delete 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 show global status like 'performance_schema_%'; Variable_name Value Performance_schema_accounts_lost 0 diff --git a/mysql-test/suite/perfschema/r/merge_table_io.result b/mysql-test/suite/perfschema/r/merge_table_io.result index 3fb3b26b3a3..e65cc45dc84 100644 --- a/mysql-test/suite/perfschema/r/merge_table_io.result +++ b/mysql-test/suite/perfschema/r/merge_table_io.result @@ -96,45 +96,45 @@ where event_name like 'wait/io/table/%' and object_schema in ("test") order by thread_id, event_id; event_name short_source object_type object_schema pretty_name operation number_of_bytes -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 3 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 3 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab delete 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 show global status like 'performance_schema_%'; Variable_name Value Performance_schema_accounts_lost 0 diff --git a/mysql-test/suite/perfschema/r/multi_table_io.result b/mysql-test/suite/perfschema/r/multi_table_io.result index ba9c5ba4ab4..3700d0eb06e 100644 --- a/mysql-test/suite/perfschema/r/multi_table_io.result +++ b/mysql-test/suite/perfschema/r/multi_table_io.result @@ -52,25 +52,25 @@ where event_name like 'wait/io/table/%' and object_schema in ('test','test1') order by thread_id, event_id; event_name short_source object_type object_schema pretty_name operation number_of_bytes -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test1 t2 insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 update 1 -wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test1 t2 update 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 delete 1 -wait/io/table/sql/handler handler.cc: TABLE test1 t2 delete 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test1 t2 insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test1 t2 fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test1 t2 fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test1 t2 fetch 1 +wait/io/table/sql/handler TABLE test t1 update 1 +wait/io/table/sql/handler TABLE test1 t2 fetch 1 +wait/io/table/sql/handler TABLE test1 t2 update 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test1 t2 fetch 1 +wait/io/table/sql/handler TABLE test t1 delete 1 +wait/io/table/sql/handler TABLE test1 t2 delete 1 show global status like 'performance_schema_%'; Variable_name Value Performance_schema_accounts_lost 0 diff --git a/mysql-test/suite/perfschema/r/myisam_file_io.result b/mysql-test/suite/perfschema/r/myisam_file_io.result index 0fe8710fe28..71876d53af6 100644 --- a/mysql-test/suite/perfschema/r/myisam_file_io.result +++ b/mysql-test/suite/perfschema/r/myisam_file_io.result @@ -20,28 +20,28 @@ where operation not like "tell" and event_name like "wait/io/file/myisam/%" order by thread_id, event_id; event_name short_source operation number_of_bytes short_name -wait/io/file/myisam/kfile mi_create.c: create NULL no_index_tab.MYI -wait/io/file/myisam/dfile mi_create.c: create NULL no_index_tab.MYD -wait/io/file/myisam/kfile mi_open.c: write 176 no_index_tab.MYI -wait/io/file/myisam/kfile mi_open.c: write 100 no_index_tab.MYI -wait/io/file/myisam/kfile mi_open.c: write 7 no_index_tab.MYI -wait/io/file/myisam/kfile mi_open.c: write 7 no_index_tab.MYI -wait/io/file/myisam/kfile mi_open.c: write 7 no_index_tab.MYI -wait/io/file/myisam/kfile mi_create.c: chsize 1024 no_index_tab.MYI -wait/io/file/myisam/dfile mi_create.c: close NULL no_index_tab.MYD -wait/io/file/myisam/kfile mi_create.c: close NULL no_index_tab.MYI -wait/io/file/myisam/kfile mi_open.c: open NULL no_index_tab.MYI -wait/io/file/myisam/kfile mi_open.c: read 24 no_index_tab.MYI -wait/io/file/myisam/kfile mi_open.c: seek NULL no_index_tab.MYI -wait/io/file/myisam/kfile mi_open.c: read 297 no_index_tab.MYI -wait/io/file/myisam/dfile mi_open.c: open NULL no_index_tab.MYD -wait/io/file/myisam/kfile mi_locking.c: write 3 no_index_tab.MYI -wait/io/file/myisam/dfile mi_dynrec.c: write 20 no_index_tab.MYD -wait/io/file/myisam/kfile mi_open.c: write 124 no_index_tab.MYI -wait/io/file/myisam/dfile mi_dynrec.c: write 20 no_index_tab.MYD -wait/io/file/myisam/kfile mi_open.c: write 124 no_index_tab.MYI -wait/io/file/myisam/dfile mi_dynrec.c: write 20 no_index_tab.MYD -wait/io/file/myisam/kfile mi_open.c: write 124 no_index_tab.MYI +wait/io/file/myisam/kfile create NULL no_index_tab.MYI +wait/io/file/myisam/dfile create NULL no_index_tab.MYD +wait/io/file/myisam/kfile write 176 no_index_tab.MYI +wait/io/file/myisam/kfile write 100 no_index_tab.MYI +wait/io/file/myisam/kfile write 7 no_index_tab.MYI +wait/io/file/myisam/kfile write 7 no_index_tab.MYI +wait/io/file/myisam/kfile write 7 no_index_tab.MYI +wait/io/file/myisam/kfile chsize 1024 no_index_tab.MYI +wait/io/file/myisam/dfile close NULL no_index_tab.MYD +wait/io/file/myisam/kfile close NULL no_index_tab.MYI +wait/io/file/myisam/kfile open NULL no_index_tab.MYI +wait/io/file/myisam/kfile read 24 no_index_tab.MYI +wait/io/file/myisam/kfile seek NULL no_index_tab.MYI +wait/io/file/myisam/kfile read 297 no_index_tab.MYI +wait/io/file/myisam/dfile open NULL no_index_tab.MYD +wait/io/file/myisam/kfile write 3 no_index_tab.MYI +wait/io/file/myisam/dfile write 20 no_index_tab.MYD +wait/io/file/myisam/kfile write 124 no_index_tab.MYI +wait/io/file/myisam/dfile write 20 no_index_tab.MYD +wait/io/file/myisam/kfile write 124 no_index_tab.MYI +wait/io/file/myisam/dfile write 20 no_index_tab.MYD +wait/io/file/myisam/kfile write 124 no_index_tab.MYI show global status like 'performance_schema_%'; Variable_name Value Performance_schema_accounts_lost 0 diff --git a/mysql-test/suite/perfschema/r/myisam_table_io.result b/mysql-test/suite/perfschema/r/myisam_table_io.result index 7db74596a07..9e5d95683ed 100644 --- a/mysql-test/suite/perfschema/r/myisam_table_io.result +++ b/mysql-test/suite/perfschema/r/myisam_table_io.result @@ -70,39 +70,39 @@ where event_name like 'wait/io/table/%' and object_schema in ("test") order by thread_id, event_id; event_name short_source object_type object_schema pretty_name operation number_of_bytes -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 3 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 3 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab delete 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 show global status like 'performance_schema_%'; Variable_name Value Performance_schema_accounts_lost 0 diff --git a/mysql-test/suite/perfschema/r/no_threads.result b/mysql-test/suite/perfschema/r/no_threads.result index 4631a3c34b2..21991b15931 100644 --- a/mysql-test/suite/perfschema/r/no_threads.result +++ b/mysql-test/suite/perfschema/r/no_threads.result @@ -32,16 +32,16 @@ select event_name, operation, left(source, locate(":", source)) as short_source from performance_schema.events_waits_current; event_name operation short_source -wait/synch/mutex/mysys/THR_LOCK_myisam lock mi_create.c: +wait/synch/mutex/mysys/THR_LOCK_myisam lock select event_name, operation, left(source, locate(":", source)) as short_source from performance_schema.events_waits_history; event_name operation short_source -wait/synch/mutex/mysys/THR_LOCK_myisam lock mi_create.c: +wait/synch/mutex/mysys/THR_LOCK_myisam lock select event_name, operation, left(source, locate(":", source)) as short_source from performance_schema.events_waits_history_long; event_name operation short_source -wait/synch/mutex/mysys/THR_LOCK_myisam lock mi_create.c: +wait/synch/mutex/mysys/THR_LOCK_myisam lock update performance_schema.setup_instruments set enabled='YES'; drop table test.t1; diff --git a/mysql-test/suite/perfschema/r/one_thread_per_con.result b/mysql-test/suite/perfschema/r/one_thread_per_con.result index d9b97a85d5f..de8964c036e 100644 --- a/mysql-test/suite/perfschema/r/one_thread_per_con.result +++ b/mysql-test/suite/perfschema/r/one_thread_per_con.result @@ -16,19 +16,19 @@ create table test.t3(a int) engine=MYISAM; "----------------- Connection default" execute stmt_dump_events using @tid; event_name short_source operation number_of_bytes -wait/synch/mutex/mysys/THR_LOCK_myisam mi_create.c: lock NULL +wait/synch/mutex/mysys/THR_LOCK_myisam lock NULL execute stmt_dump_thread using @tid; name thread/sql/one_connection execute stmt_dump_events using @tid; event_name short_source operation number_of_bytes -wait/synch/mutex/mysys/THR_LOCK_myisam mi_create.c: lock NULL +wait/synch/mutex/mysys/THR_LOCK_myisam lock NULL execute stmt_dump_thread using @tid; name thread/sql/one_connection execute stmt_dump_events using @tid; event_name short_source operation number_of_bytes -wait/synch/mutex/mysys/THR_LOCK_myisam mi_create.c: lock NULL +wait/synch/mutex/mysys/THR_LOCK_myisam lock NULL execute stmt_dump_thread using @tid; name thread/sql/one_connection diff --git a/mysql-test/suite/perfschema/r/ortho_iter.result b/mysql-test/suite/perfschema/r/ortho_iter.result index 22cf9d5ae62..dbb5eed68a5 100644 --- a/mysql-test/suite/perfschema/r/ortho_iter.result +++ b/mysql-test/suite/perfschema/r/ortho_iter.result @@ -238,11 +238,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/part_table_io.result b/mysql-test/suite/perfschema/r/part_table_io.result index 4c5d6764045..6a528e7928c 100644 --- a/mysql-test/suite/perfschema/r/part_table_io.result +++ b/mysql-test/suite/perfschema/r/part_table_io.result @@ -13,6 +13,8 @@ insert into marker set a = 1; create table test.no_index_tab ( a varchar(255) not null, b int not null) engine = MyISAM PARTITION BY KEY (b) PARTITIONS 2; +Warnings: +Warning 1287 The partition engine, used by table 'test.no_index_tab', is deprecated and will be removed in a future release. Please use native partitioning instead. insert into marker set a = 1; show create table test.no_index_tab; Table Create Table @@ -22,6 +24,8 @@ no_index_tab CREATE TABLE `no_index_tab` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (b) PARTITIONS 2 */ +Warnings: +Warning 1287 The partition engine, used by table 'test.no_index_tab', is deprecated and will be removed in a future release. Please use native partitioning instead. insert into marker set a = 1; insert into test.no_index_tab set a = 'foo', b = 1; insert into marker set a = 1; @@ -52,13 +56,18 @@ insert into marker set a = 1; optimize table test.no_index_tab; Table Op Msg_type Msg_text test.no_index_tab optimize status OK +test.no_index_tab optimize warning The partition engine, used by table 'test.no_index_tab', is deprecated and will be removed in a future release. Please use native partitioning instead. insert into marker set a = 1; select * from test.no_index_tab; a b bar 1 bar 2 +Warnings: +Warning 1287 The partition engine, used by table 'test.no_index_tab', is deprecated and will be removed in a future release. Please use native partitioning instead. insert into marker set a = 1; truncate table test.no_index_tab; +Warnings: +Warning 1287 The partition engine, used by table 'test.no_index_tab', is deprecated and will be removed in a future release. Please use native partitioning instead. insert into marker set a = 1; drop table test.no_index_tab; update performance_schema.setup_consumers set enabled='NO'; @@ -73,38 +82,38 @@ where event_name like 'wait/io/table/%' and object_schema in ("test") order by thread_id, event_id; event_name short_source object_type object_schema pretty_name operation number_of_bytes -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 3 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 3 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab delete 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 show global status like 'performance_schema_%'; Variable_name Value Performance_schema_accounts_lost 0 diff --git a/mysql-test/suite/perfschema/r/prepared_statements.result b/mysql-test/suite/perfschema/r/prepared_statements.result index c11b486094e..78ca2a65a1d 100644 --- a/mysql-test/suite/perfschema/r/prepared_statements.result +++ b/mysql-test/suite/perfschema/r/prepared_statements.result @@ -57,7 +57,7 @@ OBJECT_TYPE NULL OBJECT_SCHEMA NULL OBJECT_NAME NULL EVENT_NAME statement/sql/prepare_sql -SQL_TEXT PREPARE st1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse' +SQL_TEXT PREPARE st1 FROM ... OBJECT_TYPE NULL OBJECT_SCHEMA NULL OBJECT_NAME NULL @@ -77,13 +77,12 @@ OBJECT_TYPE NULL OBJECT_SCHEMA NULL OBJECT_NAME NULL EVENT_NAME statement/sql/prepare_sql -SQL_TEXT PREPARE st3 FROM 'INSERT INTO t1 SELECT * FROM t1 WHERE a<=?' +SQL_TEXT PREPARE st3 FROM ... OBJECT_TYPE NULL OBJECT_SCHEMA NULL OBJECT_NAME NULL EVENT_NAME statement/sql/prepare_sql -SQL_TEXT PREPARE st4 FROM -'(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a' +SQL_TEXT PREPARE st4 FROM ... OBJECT_TYPE NULL OBJECT_SCHEMA NULL OBJECT_NAME NULL @@ -164,7 +163,7 @@ OBJECT_TYPE NULL OBJECT_SCHEMA NULL OBJECT_NAME NULL EVENT_NAME statement/sql/prepare_sql -SQL_TEXT PREPARE st1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse' +SQL_TEXT PREPARE st1 FROM ... OBJECT_TYPE NULL OBJECT_SCHEMA NULL OBJECT_NAME NULL @@ -184,13 +183,12 @@ OBJECT_TYPE NULL OBJECT_SCHEMA NULL OBJECT_NAME NULL EVENT_NAME statement/sql/prepare_sql -SQL_TEXT PREPARE st3 FROM 'INSERT INTO t1 SELECT * FROM t1 WHERE a<=?' +SQL_TEXT PREPARE st3 FROM ... OBJECT_TYPE NULL OBJECT_SCHEMA NULL OBJECT_NAME NULL EVENT_NAME statement/sql/prepare_sql -SQL_TEXT PREPARE st4 FROM -'(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a' +SQL_TEXT PREPARE st4 FROM ... OBJECT_TYPE NULL OBJECT_SCHEMA NULL OBJECT_NAME NULL @@ -297,7 +295,7 @@ OBJECT_TYPE NULL OBJECT_SCHEMA NULL OBJECT_NAME NULL EVENT_NAME statement/sql/prepare_sql -SQL_TEXT PREPARE st1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse' +SQL_TEXT PREPARE st1 FROM ... OBJECT_TYPE NULL OBJECT_SCHEMA NULL OBJECT_NAME NULL @@ -317,13 +315,12 @@ OBJECT_TYPE NULL OBJECT_SCHEMA NULL OBJECT_NAME NULL EVENT_NAME statement/sql/prepare_sql -SQL_TEXT PREPARE st3 FROM 'INSERT INTO t1 SELECT * FROM t1 WHERE a<=?' +SQL_TEXT PREPARE st3 FROM ... OBJECT_TYPE NULL OBJECT_SCHEMA NULL OBJECT_NAME NULL EVENT_NAME statement/sql/prepare_sql -SQL_TEXT PREPARE st4 FROM -'(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a' +SQL_TEXT PREPARE st4 FROM ... OBJECT_TYPE NULL OBJECT_SCHEMA NULL OBJECT_NAME NULL diff --git a/mysql-test/suite/perfschema/r/privilege.result b/mysql-test/suite/perfschema/r/privilege.result index 10338898d34..d8e4abb704d 100644 --- a/mysql-test/suite/perfschema/r/privilege.result +++ b/mysql-test/suite/perfschema/r/privilege.result @@ -576,6 +576,8 @@ WHERE name LIKE 'wait/synch/mutex/%' OR name LIKE 'wait/synch/rwlock/%'; UPDATE performance_schema.setup_consumers SET enabled = 'YES'; UPDATE performance_schema.setup_timers SET timer_name = 'TICK'; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. TRUNCATE TABLE performance_schema.events_waits_history_long; TRUNCATE TABLE performance_schema.events_waits_history; TRUNCATE TABLE performance_schema.events_waits_current; @@ -586,9 +588,17 @@ flush privileges; UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES'; UPDATE performance_schema.setup_consumers SET enabled = 'YES'; UPDATE performance_schema.setup_timers SET timer_name = 'MICROSECOND' where name="idle"; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. UPDATE performance_schema.setup_timers SET timer_name = 'CYCLE' where name="wait"; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. UPDATE performance_schema.setup_timers SET timer_name = 'NANOSECOND' where name="stage"; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. UPDATE performance_schema.setup_timers SET timer_name = 'NANOSECOND' where name="statement"; +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. set sql_mode= @orig_sql_mode; Warnings: Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release. diff --git a/mysql-test/suite/perfschema/r/privilege_table_io.result b/mysql-test/suite/perfschema/r/privilege_table_io.result index 8e67048b182..356e2390bec 100644 --- a/mysql-test/suite/perfschema/r/privilege_table_io.result +++ b/mysql-test/suite/perfschema/r/privilege_table_io.result @@ -45,11 +45,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 @@ -110,26 +110,29 @@ where event_name like 'wait/io/table/%' and object_schema in ("test", "mysql") order by thread_id, event_id; event_name short_source object_type object_schema pretty_name operation number_of_bytes -wait/io/table/sql/handler handler.cc: TABLE mysql user fetch 1 -wait/io/table/sql/handler handler.cc: TABLE mysql user fetch 1 -wait/io/table/sql/handler handler.cc: TABLE mysql user fetch 1 -wait/io/table/sql/handler handler.cc: TABLE mysql user fetch 1 -wait/io/table/sql/handler handler.cc: TABLE mysql user fetch 1 -wait/io/table/sql/handler handler.cc: TABLE mysql user fetch 1 -wait/io/table/sql/handler handler.cc: TABLE mysql db fetch 1 -wait/io/table/sql/handler handler.cc: TABLE mysql db fetch 1 -wait/io/table/sql/handler handler.cc: TABLE mysql db fetch 1 -wait/io/table/sql/handler handler.cc: TABLE mysql db fetch 1 -wait/io/table/sql/handler handler.cc: TABLE mysql proxies_priv fetch 1 -wait/io/table/sql/handler handler.cc: TABLE mysql proxies_priv fetch 1 -wait/io/table/sql/handler handler.cc: TABLE mysql proxies_priv fetch 1 -wait/io/table/sql/handler handler.cc: TABLE mysql tables_priv fetch 1 -wait/io/table/sql/handler handler.cc: TABLE mysql tables_priv fetch 1 -wait/io/table/sql/handler handler.cc: TABLE mysql procs_priv fetch 1 -wait/io/table/sql/handler handler.cc: TABLE mysql servers fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 +wait/io/table/sql/handler TABLE mysql user fetch 1 +wait/io/table/sql/handler TABLE mysql user fetch 1 +wait/io/table/sql/handler TABLE mysql user fetch 1 +wait/io/table/sql/handler TABLE mysql user fetch 1 +wait/io/table/sql/handler TABLE mysql user fetch 1 +wait/io/table/sql/handler TABLE mysql user fetch 1 +wait/io/table/sql/handler TABLE mysql user fetch 1 +wait/io/table/sql/handler TABLE mysql db fetch 1 +wait/io/table/sql/handler TABLE mysql db fetch 1 +wait/io/table/sql/handler TABLE mysql db fetch 1 +wait/io/table/sql/handler TABLE mysql db fetch 1 +wait/io/table/sql/handler TABLE mysql db fetch 1 +wait/io/table/sql/handler TABLE mysql proxies_priv fetch 1 +wait/io/table/sql/handler TABLE mysql proxies_priv fetch 1 +wait/io/table/sql/handler TABLE mysql proxies_priv fetch 1 +wait/io/table/sql/handler TABLE mysql tables_priv fetch 1 +wait/io/table/sql/handler TABLE mysql tables_priv fetch 1 +wait/io/table/sql/handler TABLE mysql tables_priv fetch 1 +wait/io/table/sql/handler TABLE mysql procs_priv fetch 1 +wait/io/table/sql/handler TABLE mysql servers fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 show global status like 'performance_schema_%'; Variable_name Value Performance_schema_accounts_lost 0 diff --git a/mysql-test/suite/perfschema/r/query_cache.result b/mysql-test/suite/perfschema/r/query_cache.result index 60b3da24320..958e6105773 100644 --- a/mysql-test/suite/perfschema/r/query_cache.result +++ b/mysql-test/suite/perfschema/r/query_cache.result @@ -2,8 +2,14 @@ drop table if exists t1; create table t1 (a int not null); insert into t1 values (1), (2), (3); SET GLOBAL query_cache_size=1355776; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. flush query cache; +Warnings: +Warning 1681 'FLUSH QUERY CACHE' is deprecated and will be removed in a future release. reset query cache; +Warnings: +Warning 1681 'RESET QUERY CACHE' is deprecated and will be removed in a future release. flush status; select * from t1; a @@ -39,6 +45,8 @@ NULL select * from performance_schema.setup_timers where name='wait'; NAME TIMER_NAME wait {CYCLE_OR_NANOSECOND} +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. show global status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 @@ -54,6 +62,8 @@ NULL select * from performance_schema.setup_timers where name='wait'; NAME TIMER_NAME wait {CYCLE_OR_NANOSECOND} +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. show global status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 @@ -64,5 +74,7 @@ show global status like "Qcache_hits"; Variable_name Value Qcache_hits 1 SET GLOBAL query_cache_size= default; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. drop table t1; flush status; diff --git a/mysql-test/suite/perfschema/r/read_only.result b/mysql-test/suite/perfschema/r/read_only.result index 4a4e04acf34..0aa745151e5 100644 --- a/mysql-test/suite/perfschema/r/read_only.result +++ b/mysql-test/suite/perfschema/r/read_only.result @@ -1,5 +1,6 @@ use performance_schema; set @start_read_only= @@global.read_only; +set @start_super_read_only= @@global.super_read_only; set @orig_sql_mode= @@sql_mode; set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER','')); Warnings: @@ -11,7 +12,7 @@ set sql_mode= @orig_sql_mode; Warnings: Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release. flush privileges; -connect (con1, localhost, pfsuser, , test); +connect con1, localhost, pfsuser, , test; connection default; set global read_only=0; connection con1; @@ -35,13 +36,15 @@ show grants; Grants for pfsuser@localhost GRANT USAGE ON *.* TO 'pfsuser'@'localhost' GRANT SELECT, UPDATE ON `performance_schema`.* TO 'pfsuser'@'localhost' +# Update on perf_schema is allowed in read_only mode. select * from performance_schema.setup_instruments; update performance_schema.setup_instruments set enabled='NO'; update performance_schema.setup_instruments set enabled='YES'; connection default; grant super on *.* to pfsuser@localhost; flush privileges; -connect (con1, localhost, pfsuser, , test); +disconnect con1; +connect con1, localhost, pfsuser, , test; select @@global.read_only; @@global.read_only 1 @@ -53,6 +56,23 @@ select * from performance_schema.setup_instruments; update performance_schema.setup_instruments set enabled='NO'; update performance_schema.setup_instruments set enabled='YES'; connection default; +set global super_read_only=1; +connection con1; +select @@global.super_read_only; +@@global.super_read_only +1 +show grants; +Grants for pfsuser@localhost +GRANT SUPER ON *.* TO 'pfsuser'@'localhost' +GRANT SELECT, UPDATE ON `performance_schema`.* TO 'pfsuser'@'localhost' +select * from performance_schema.setup_instruments; +# Update is allowed in super_read_only on perf schema for +# super user. +update performance_schema.setup_instruments set enabled='NO'; +update performance_schema.setup_instruments set enabled='YES'; +disconnect con1; +connection default; set global read_only= @start_read_only; +set global super_read_only= @start_super_read_only; drop user pfsuser@localhost; flush privileges; diff --git a/mysql-test/suite/perfschema/r/relaylog.result b/mysql-test/suite/perfschema/r/relaylog.result index 06348cc9c6a..cec59acea9f 100644 --- a/mysql-test/suite/perfschema/r/relaylog.result +++ b/mysql-test/suite/perfschema/r/relaylog.result @@ -23,7 +23,7 @@ from performance_schema.file_summary_by_instance where file_name like "%master-%" order by file_name; FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE master-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY -master-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE +master-bin.index wait/io/file/sql/binlog_index MANY NONE MANY NONE select * from performance_schema.file_summary_by_instance where file_name like "%slave-%" order by file_name; FILE_NAME EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC @@ -39,7 +39,7 @@ from performance_schema.file_summary_by_instance where event_name like "%binlog%" order by file_name; FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE master-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY -master-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE +master-bin.index wait/io/file/sql/binlog_index MANY NONE MANY NONE select EVENT_NAME, if (count_read > 0, "MANY", "NONE") as COUNT_READ, @@ -51,7 +51,7 @@ where event_name like "%binlog%" order by event_name; EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE wait/io/file/sql/binlog MANY MANY MANY MANY wait/io/file/sql/binlog_cache NONE NONE NONE NONE -wait/io/file/sql/binlog_index MANY NONE NONE NONE +wait/io/file/sql/binlog_index MANY NONE MANY NONE wait/io/file/sql/binlog_index_cache NONE NONE NONE NONE select EVENT_NAME, @@ -119,10 +119,10 @@ where file_name like "%slave-%" order by file_name; FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE slave-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY -slave-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE +slave-bin.index wait/io/file/sql/binlog_index MANY NONE MANY NONE slave-relay-bin.000001 wait/io/file/sql/relaylog MANY MANY MANY MANY slave-relay-bin.000002 wait/io/file/sql/relaylog MANY MANY MANY MANY -slave-relay-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE +slave-relay-bin.index wait/io/file/sql/binlog_index MANY NONE MANY NONE "Expect a slave binlog + binlog_index" select substring(file_name, locate("slave-", file_name)) as FILE_NAME, @@ -135,8 +135,8 @@ from performance_schema.file_summary_by_instance where event_name like "%binlog%" order by file_name; FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE slave-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY -slave-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE -slave-relay-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE +slave-bin.index wait/io/file/sql/binlog_index MANY NONE MANY NONE +slave-relay-bin.index wait/io/file/sql/binlog_index MANY NONE MANY NONE select EVENT_NAME, if (count_read > 0, "MANY", "NONE") as COUNT_READ, diff --git a/mysql-test/suite/perfschema/r/rollback_table_io.result b/mysql-test/suite/perfschema/r/rollback_table_io.result index cb70a9be37e..6ec7dbdcad4 100644 --- a/mysql-test/suite/perfschema/r/rollback_table_io.result +++ b/mysql-test/suite/perfschema/r/rollback_table_io.result @@ -41,18 +41,18 @@ where event_name like 'wait/io/table/%' and object_schema in ('test') order by thread_id, event_id; event_name short_source object_type object_schema pretty_name operation number_of_bytes -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 delete 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 update 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test t1 delete 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test t1 update 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t1 insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 show global status like 'performance_schema_%'; Variable_name Value Performance_schema_accounts_lost 0 diff --git a/mysql-test/suite/perfschema/r/rpl_group_member_stats.result b/mysql-test/suite/perfschema/r/rpl_group_member_stats.result index 4ac0471ba55..fd36a774307 100644 --- a/mysql-test/suite/perfschema/r/rpl_group_member_stats.result +++ b/mysql-test/suite/perfschema/r/rpl_group_member_stats.result @@ -3,6 +3,6 @@ include/assert.inc [The value of view_id should not be present] include/assert.inc [The value of Count_Transactions_in_queue should be 0] include/assert.inc [The value of Count_Transactions_checked should be 0] include/assert.inc [The value of Count_conflicts_detected should be 0] -include/assert.inc [The value of Count_Transactions_validating should be 0] +include/assert.inc [The value of Count_Transactions_rows_validating should be 0] include/assert.inc [The value of Transactions_Committed_all_members should be 0] include/assert.inc [The value of Last_conflict_free_transaction should not be present] diff --git a/mysql-test/suite/perfschema/r/rpl_gtid_func.result b/mysql-test/suite/perfschema/r/rpl_gtid_func.result index 73e9525a271..3edbae26e31 100644 --- a/mysql-test/suite/perfschema/r/rpl_gtid_func.result +++ b/mysql-test/suite/perfschema/r/rpl_gtid_func.result @@ -56,7 +56,7 @@ select digest, digest_text, count_star from performance_schema.events_statements_summary_by_digest where digest_text like "%in_%_digest%"; digest digest_text count_star -dc3177eb15d923e08c09eef29cecd9a4 SELECT ? AS `in_master_digest` 1 +43677368d37ba0831ecd2322086c9cf5 SELECT ? AS `in_master_digest` 1 insert into test.marker values (2); **** On Slave **** select * from test.marker; @@ -99,7 +99,7 @@ select digest, digest_text, count_star from performance_schema.events_statements_summary_by_digest where digest_text like "%in_%_digest%"; digest digest_text count_star -d506c623d393ce3079467945b10cc01e SELECT ? AS `in_slave_digest` 1 +01f5f7c4c65eb61bb9a6afb7172c4a54 SELECT ? AS `in_slave_digest` 1 **** On Master **** delete from performance_schema.setup_objects where object_schema='master'; diff --git a/mysql-test/suite/perfschema/r/show_aggregate.result b/mysql-test/suite/perfschema/r/show_aggregate.result index 5f1f70f4bb0..20cee6f6013 100644 --- a/mysql-test/suite/perfschema/r/show_aggregate.result +++ b/mysql-test/suite/perfschema/r/show_aggregate.result @@ -510,6 +510,27 @@ variable_name h1 h2 h3 delta host Expected Handler_delete 6 0 0 6 6 OK Handler_rollback 6 0 0 6 6 OK ================================================================================ +TEST 8: FLUSH STATUS should clear account, host and user status +================================================================================ + +FLUSH STATUS; + +SELECT * FROM status_by_account WHERE user LIKE 'user%' AND variable_name IN ('handler_delete'); +USER HOST VARIABLE_NAME VARIABLE_VALUE +user1 localhost Handler_delete 0 +user2 localhost Handler_delete 0 +user3 localhost Handler_delete 0 + +SELECT * FROM status_by_host WHERE host IN ('localhost') AND variable_name IN ('handler_delete'); +HOST VARIABLE_NAME VARIABLE_VALUE +localhost Handler_delete 0 + +SELECT * FROM status_by_user WHERE user LIKE 'user%' AND variable_name IN ('handler_delete'); +USER VARIABLE_NAME VARIABLE_VALUE +user1 Handler_delete 0 +user2 Handler_delete 0 +user3 Handler_delete 0 +================================================================================ CLEANUP ================================================================================ DROP TABLE test.t1; diff --git a/mysql-test/suite/perfschema/r/show_coverage.result b/mysql-test/suite/perfschema/r/show_coverage.result index 1f620449bbf..532aeff5af1 100644 --- a/mysql-test/suite/perfschema/r/show_coverage.result +++ b/mysql-test/suite/perfschema/r/show_coverage.result @@ -102,14 +102,43 @@ SELECT variable_value FROM status_by_thread WHERE variable_name = "bytes_received" and thread_id = @thread_id INTO @bytes_after; # Expect bytes_before > bytes_after -SELECT @bytes_before > @bytes_after; -@bytes_before > @bytes_after +SELECT @bytes_before > @bytes_after AS 'Expect 1'; +Expect 1 1 # Expect bytes_after is zero -SELECT @bytes_after; -@bytes_after +SELECT @bytes_after AS 'Expect 0'; +Expect 0 0 +# TEST 6 +# +# Bug#28291258 FLUSH STATUS ADDS TWICE TO GLOBAL VALUES +# + +# Default connection + +# First connection +include/assert.inc [Global value requested from the first session must not change] + +# Generate a slow query + +SET long_query_time = 2; +SELECT SLEEP(4); +SLEEP(4) +0 +SET long_query_time = @@global.long_query_time; + +include/assert.inc [Global value requested from the first session after SLEEP() must increase by 1] +include/assert.inc [First session value must increase by 1] + +# Default connection +include/assert.inc [Global value requested from the default session after DISCONNECT must remain the same] +include/assert.inc [Default session value must remain zero] + +FLUSH STATUS; + +include/assert.inc [Global value requested from the default session after FLUSH must remain the same] +include/assert.inc [Default session value after FLUSH must remain zero] # CLEANUP set @@global.show_compatibility_56 = @show_compatibility_56_save; diff --git a/mysql-test/suite/perfschema/r/show_misc.result b/mysql-test/suite/perfschema/r/show_misc.result index ba0606121b2..3612139c68a 100644 --- a/mysql-test/suite/perfschema/r/show_misc.result +++ b/mysql-test/suite/perfschema/r/show_misc.result @@ -89,6 +89,22 @@ UNLOCK TABLES; DROP TABLE test.t1; ================================================================================ +Bug#28515475 BOGUS DATA WHEN ORDERING RESULTS FROM VARIABLES_BY_THREAD +================================================================================ +Verify the results from "WHERE variable_name IN(...)", particularly for those +variables that are listed after the deprecated variable gtid_executed. +The ORDER BY also forces an additional code path through rnd_pos(). + +SELECT variable_name FROM performance_schema.variables_by_thread +WHERE variable_name IN ('interactive_timeout','net_read_timeout','net_write_timeout','wait_timeout') +ORDER BY variable_name; +variable_name +interactive_timeout +net_read_timeout +net_write_timeout +wait_timeout + +================================================================================ CLEAN UP ================================================================================ set @@global.show_compatibility_56 = @show_compatibility_56_save; diff --git a/mysql-test/suite/perfschema/r/show_sanity.result b/mysql-test/suite/perfschema/r/show_sanity.result index d8969f91c19..71bc92a2c2f 100644 --- a/mysql-test/suite/perfschema/r/show_sanity.result +++ b/mysql-test/suite/perfschema/r/show_sanity.result @@ -407,7 +407,12 @@ where show_mode = "JUNK: GLOBAL-ONLY" and source = "I_S.SESSION_VARIABLES") order by show_mode, source, variable_name; SHOW_MODE SOURCE VARIABLE_NAME +5.6 I_S.SESSION_VARIABLES BINLOG_TRANSACTION_DEPENDENCY_HISTORY_SIZE +5.6 I_S.SESSION_VARIABLES BINLOG_TRANSACTION_DEPENDENCY_TRACKING 5.6 I_S.SESSION_VARIABLES GTID_EXECUTED +5.6 I_S.SESSION_VARIABLES INNODB_DEADLOCK_DETECT +5.6 I_S.SESSION_VARIABLES INNODB_STATS_INCLUDE_DELETE_MARKED +5.6 I_S.SESSION_VARIABLES KEYRING_OPERATIONS 5.6 I_S.SESSION_VARIABLES LOG_STATEMENTS_UNSAFE_FOR_BINLOG 5.6 I_S.SESSION_VARIABLES TLS_VERSION @@ -430,7 +435,12 @@ where show_mode = "JUNK: GLOBAL-ONLY" and source = "I_S.SESSION_VARIABLES") order by show_mode, source, variable_name; SHOW_MODE SOURCE VARIABLE_NAME +5.6 I_S.SESSION_VARIABLES BINLOG_TRANSACTION_DEPENDENCY_HISTORY_SIZE +5.6 I_S.SESSION_VARIABLES BINLOG_TRANSACTION_DEPENDENCY_TRACKING 5.6 I_S.SESSION_VARIABLES GTID_EXECUTED +5.6 I_S.SESSION_VARIABLES INNODB_DEADLOCK_DETECT +5.6 I_S.SESSION_VARIABLES INNODB_STATS_INCLUDE_DELETE_MARKED +5.6 I_S.SESSION_VARIABLES KEYRING_OPERATIONS 5.6 I_S.SESSION_VARIABLES LOG_STATEMENTS_UNSAFE_FOR_BINLOG 5.6 I_S.SESSION_VARIABLES TLS_VERSION diff --git a/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result index af8eea0a795..efd4eee876c 100644 --- a/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result +++ b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result @@ -7,6 +7,8 @@ # - the test might abort # # 0. Check, build or set prequisites +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. UPDATE performance_schema.threads SET INSTRUMENTED='NO' WHERE PROCESSLIST_ID = CONNECTION_ID(); # 1. Basic checks @@ -223,3 +225,5 @@ col2 # It must reset all counters. TRUNCATE TABLE performance_schema.socket_summary_by_instance; # 6. Cleanup +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. diff --git a/mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result index 16e6214bc53..dfaa82253bc 100644 --- a/mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result +++ b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result @@ -7,6 +7,8 @@ # - the test might abort # # 0. Check, build or set prequisites +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. UPDATE performance_schema.threads SET INSTRUMENTED='NO' WHERE PROCESSLIST_ID = CONNECTION_ID(); # 1. Basic checks @@ -226,3 +228,5 @@ col2 # It must reset all counters. TRUNCATE TABLE performance_schema.socket_summary_by_instance; # 6. Cleanup +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. diff --git a/mysql-test/suite/perfschema/r/start_server_1_digest.result b/mysql-test/suite/perfschema/r/start_server_1_digest.result new file mode 100644 index 00000000000..cf07022d344 --- /dev/null +++ b/mysql-test/suite/perfschema/r/start_server_1_digest.result @@ -0,0 +1,7 @@ +SELECT "Digest table has a size 1 and is full already." as use_case; +use_case +Digest table has a size 1 and is full already. +select SCHEMA_NAME, DIGEST, DIGEST_TEXT +from performance_schema.events_statements_summary_by_digest; +SCHEMA_NAME DIGEST DIGEST_TEXT +NULL NULL NULL diff --git a/mysql-test/suite/perfschema/r/start_server_disable_idle.result b/mysql-test/suite/perfschema/r/start_server_disable_idle.result index 291b2df5b6c..03373d66b78 100644 --- a/mysql-test/suite/perfschema/r/start_server_disable_idle.result +++ b/mysql-test/suite/perfschema/r/start_server_disable_idle.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_disable_stages.result b/mysql-test/suite/perfschema/r/start_server_disable_stages.result index fc993466da0..a2becc0b603 100644 --- a/mysql-test/suite/perfschema/r/start_server_disable_stages.result +++ b/mysql-test/suite/perfschema/r/start_server_disable_stages.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_disable_statements.result b/mysql-test/suite/perfschema/r/start_server_disable_statements.result index 5690b953a7c..1c9cfb977ee 100644 --- a/mysql-test/suite/perfschema/r/start_server_disable_statements.result +++ b/mysql-test/suite/perfschema/r/start_server_disable_statements.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_disable_transactions.result b/mysql-test/suite/perfschema/r/start_server_disable_transactions.result index 6040b395754..ca4e6842be4 100644 --- a/mysql-test/suite/perfschema/r/start_server_disable_transactions.result +++ b/mysql-test/suite/perfschema/r/start_server_disable_transactions.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_disable_waits.result b/mysql-test/suite/perfschema/r/start_server_disable_waits.result index de140166752..28deef3ef73 100644 --- a/mysql-test/suite/perfschema/r/start_server_disable_waits.result +++ b/mysql-test/suite/perfschema/r/start_server_disable_waits.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_innodb.result b/mysql-test/suite/perfschema/r/start_server_innodb.result index 81e3742e29c..740ed6cb25b 100644 --- a/mysql-test/suite/perfschema/r/start_server_innodb.result +++ b/mysql-test/suite/perfschema/r/start_server_innodb.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_low_digest.result b/mysql-test/suite/perfschema/r/start_server_low_digest.result index 3dff3c092eb..3911ae063b7 100644 --- a/mysql-test/suite/perfschema/r/start_server_low_digest.result +++ b/mysql-test/suite/perfschema/r/start_server_low_digest.result @@ -9,4 +9,4 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 SELECT event_name, digest, digest_text, sql_text FROM events_statements_history_long; event_name digest digest_text sql_text statement/sql/truncate de142fd9a2507cb67f197230081a2682 TRUNCATE TABLE truncate table events_statements_history_long -statement/sql/select 9c2f57893fb6bcec2ace71ddb389b46f SELECT ? + ? + SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 +statement/sql/select 4eaf50b33b47c3d02ab230606f197063 SELECT ? + ? + SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 diff --git a/mysql-test/suite/perfschema/r/start_server_low_digest_sql_length.result b/mysql-test/suite/perfschema/r/start_server_low_digest_sql_length.result index 69ec6c9cf35..906700ba273 100644 --- a/mysql-test/suite/perfschema/r/start_server_low_digest_sql_length.result +++ b/mysql-test/suite/perfschema/r/start_server_low_digest_sql_length.result @@ -9,4 +9,4 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 SELECT event_name, digest, digest_text, sql_text FROM events_statements_history_long; event_name digest digest_text sql_text statement/sql/truncate de142fd9a2507cb67f197230081a2682 TRUNCATE TABLE truncat... -statement/sql/select 9c2f57893fb6bcec2ace71ddb389b46f SELECT ? + ? + SELECT ... +statement/sql/select 4eaf50b33b47c3d02ab230606f197063 SELECT ? + ? + SELECT ... diff --git a/mysql-test/suite/perfschema/r/start_server_low_index.result b/mysql-test/suite/perfschema/r/start_server_low_index.result index f583d13221b..e829c460feb 100644 --- a/mysql-test/suite/perfschema/r/start_server_low_index.result +++ b/mysql-test/suite/perfschema/r/start_server_low_index.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 38 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_low_table_lock.result b/mysql-test/suite/perfschema/r/start_server_low_table_lock.result index a20d79330d8..b0f3bbadfdf 100644 --- a/mysql-test/suite/perfschema/r/start_server_low_table_lock.result +++ b/mysql-test/suite/perfschema/r/start_server_low_table_lock.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_account.result b/mysql-test/suite/perfschema/r/start_server_no_account.result index 733804c80a7..def072610a4 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_account.result +++ b/mysql-test/suite/perfschema/r/start_server_no_account.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result index 2d66ef5c8d3..276249c2b76 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result index 10df353cb40..b48a699e367 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_class.result b/mysql-test/suite/perfschema/r/start_server_no_file_class.result index 314a3a06b5f..11cae0adaf5 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_file_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_file_class.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result index 951963b75c4..5d2a9903cd8 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 0 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_host.result b/mysql-test/suite/perfschema/r/start_server_no_host.result index 7417569e0c9..cc848fa2edf 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_host.result +++ b/mysql-test/suite/perfschema/r/start_server_no_host.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_index.result b/mysql-test/suite/perfschema/r/start_server_no_index.result index 394ab639ff6..2233f2c7210 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_index.result +++ b/mysql-test/suite/perfschema/r/start_server_no_index.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 0 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_mdl.result b/mysql-test/suite/perfschema/r/start_server_no_mdl.result index 7ad5c986ff4..d9b6c8630e3 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_mdl.result +++ b/mysql-test/suite/perfschema/r/start_server_no_mdl.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 0 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_memory_class.result b/mysql-test/suite/perfschema/r/start_server_no_memory_class.result index 54e050e118f..ba3e9bea7d5 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_memory_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_memory_class.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 0 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result index c0ccb0dbfdc..4714f33e433 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -132,7 +134,7 @@ performance_schema_max_mutex_classes 0 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result index 17e0da8163c..41dc11311d4 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 0 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 @@ -153,7 +155,7 @@ show engine PERFORMANCE_SCHEMA status; show global status like "performance_schema%"; show global variables like "performance_schema_max_mutex_classes"; Variable_name Value -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 select count(*) > 0 from performance_schema.setup_instruments where name like "wait/synch/mutex/%"; count(*) > 0 diff --git a/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result b/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result index 0502645c735..1c047e94978 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result +++ b/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 0 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result index d7a3205dbab..a161f5d6aeb 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,7 +130,7 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result index 7ba50ac5de5..b81a6377aec 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 0 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 @@ -153,7 +155,7 @@ show engine PERFORMANCE_SCHEMA status; show global status like "performance_schema%"; show global variables like "performance_schema_max_rwlock_classes"; Variable_name Value -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 select count(*) > 0 from performance_schema.setup_instruments where name like "wait/synch/rwlock/%"; count(*) > 0 diff --git a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result index 15e7e0ae064..68c3086d5d8 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result +++ b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result index 8bc7d44ac22..a0020934260 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result +++ b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result index bf63f46abae..37e56a623e1 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 0 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result index c0b811b557c..ab454eb3ce1 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 0 diff --git a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result index 241ad9647a6..7a6e45269f0 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result index 9ff926c4b88..28ae3017e13 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result +++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result index 85470ae08f7..e08a4d879e9 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result +++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_statement_class.result b/mysql-test/suite/perfschema/r/start_server_no_statement_class.result index d0d9a478512..cb283dc4892 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_statement_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_statement_class.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result index 3733a288952..9ce6f38b500 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result +++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result index e6912b93e61..2d3640fa00c 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result +++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result index d432d236f82..d89e5ab03be 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result +++ b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result index 469d6cd2c89..6732eaa34f4 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 0 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_lock.result b/mysql-test/suite/perfschema/r/start_server_no_table_lock.result index e4e1e11e42d..b530246a27f 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_table_lock.result +++ b/mysql-test/suite/perfschema/r/start_server_no_table_lock.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result index 33f2f0edd93..cd900fec3f8 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result index 222e9e9c7bf..d69a8622f66 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result b/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result index ae7a5dbf92c..f6739aa055b 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result +++ b/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result index 8029fcb7723..581019a044f 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result +++ b/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_user.result b/mysql-test/suite/perfschema/r/start_server_no_user.result index b0d4d942dbd..a2a1bc121ee 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_user.result +++ b/mysql-test/suite/perfschema/r/start_server_no_user.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result index 24bcab8c332..ef82e08f55e 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result +++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result index 8d2bf728dc3..e67b8de7af8 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result +++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/start_server_nothing.result b/mysql-test/suite/perfschema/r/start_server_nothing.result index c6f19355595..7be6be09ba8 100644 --- a/mysql-test/suite/perfschema/r/start_server_nothing.result +++ b/mysql-test/suite/perfschema/r/start_server_nothing.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -304,6 +306,8 @@ wait stage statement transaction +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS select * from performance_schema.cond_instances; diff --git a/mysql-test/suite/perfschema/r/start_server_off.result b/mysql-test/suite/perfschema/r/start_server_off.result index 263f06125c2..34ef1183e19 100644 --- a/mysql-test/suite/perfschema/r/start_server_off.result +++ b/mysql-test/suite/perfschema/r/start_server_off.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 0 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -197,6 +199,8 @@ select * from performance_schema.setup_objects; OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED select * from performance_schema.setup_timers; NAME TIMER_NAME +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. insert into performance_schema.setup_objects values ('TABLE', 'myschema', 'myobject', 'YES', 'YES'); ERROR HY000: Invalid performance_schema usage. insert into performance_schema.setup_actors values ('myhost', 'mysuser', 'myrole', 'YES', 'YES'); diff --git a/mysql-test/suite/perfschema/r/start_server_on.result b/mysql-test/suite/perfschema/r/start_server_on.result index 81e3742e29c..740ed6cb25b 100644 --- a/mysql-test/suite/perfschema/r/start_server_on.result +++ b/mysql-test/suite/perfschema/r/start_server_on.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/statement_digest.result b/mysql-test/suite/perfschema/r/statement_digest.result index f4deac546e3..65631bd85ca 100644 --- a/mysql-test/suite/perfschema/r/statement_digest.result +++ b/mysql-test/suite/perfschema/r/statement_digest.result @@ -115,41 +115,41 @@ DROP TRIGGER trg; SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS, SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest; SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS -statements_digest 21b6affb55f3e69c598b47257f4d0ec6 TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1 0 0 0 -statements_digest 2ebcc6539c5c79b27a33707fbd4d70b0 SELECT ? FROM `t1` 2 0 0 0 -statements_digest 811c314bb8f68f4fdef9e30fa64acb0b SELECT ?, ... FROM `t1` 2 0 0 0 -statements_digest bc458c25be72e6f386b5c646bfd2a4ac SELECT ? FROM `t2` 1 0 0 0 -statements_digest ca8daaee4f2bac8419836ba3b57a945c SELECT ?, ... FROM `t2` 2 0 0 0 -statements_digest 15dbcb0276d0a32884e54f872e7550de INSERT INTO `t1` VALUES (?) 2 2 0 0 -statements_digest 69ed8a7ce05b795006d86cbbd31e0caa INSERT INTO `t2` VALUES (?) 1 1 0 0 -statements_digest a33fb1d856859fc46057c7dc869ce164 INSERT INTO `t3` VALUES (...) 4 4 0 0 -statements_digest a77bacee82e346244fbd5d405e9acf7d INSERT INTO `t4` VALUES (...) 1 1 0 0 -statements_digest 5546a45fece520aaa0140e6ac7a554ca INSERT INTO `t5` VALUES (...) 1 1 0 0 -statements_digest 45552b7cbc35f439bb0b2cc12b4d7004 INSERT INTO `t1` VALUES (?) /* , ... */ 2 7 0 0 -statements_digest 5e2ca7e5378a50395344cf8fb33c1289 INSERT INTO `t3` VALUES (...) /* , ... */ 1 3 0 0 -statements_digest 5a2455a3ad5daf8ad20bad0e1ba489d8 INSERT INTO `t5` VALUES (...) /* , ... */ 1 3 0 0 -statements_digest db2e552003c59f77b27e8a43513fa6df INSERT INTO `t6` VALUES (...) 5 5 0 0 -statements_digest 6d48e7bf6ebe1075c954ca4440c313f5 SELECT ? + ? 3 0 0 0 -statements_digest f29eded39dd5fa102f18987679dd0c14 SELECT ? 1 0 0 0 -statements_digest 3aeae35a7cad6d77a59795daa475ec95 CREATE SCHEMA `statements_digest_temp` 2 2 0 0 -statements_digest 853fcddb9ccd2b9bc89b2b9ebb86b63a DROP SCHEMA `statements_digest_temp` 2 0 0 0 -statements_digest 35c43fea9b2c2899c5ae8576b1b00879 SELECT ? FROM `no_such_table` 1 0 0 1 -statements_digest 0d6c1e5ce78bfc10f8f9d1c34883e431 CREATE TABLE `dup_table` ( `c` CHARACTER (?) ) 2 0 0 1 -statements_digest fba453490c48b500dc5497587ac52232 DROP TABLE `dup_table` 1 0 0 0 -statements_digest 8da8c367b38b366598c96c1f573b06ff INSERT IGNORE INTO `t11` VALUES (?) 1 1 1 0 +statements_digest d24da32343f2b799f8a7ba1bdc45f83b TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1 0 0 0 +statements_digest 2470c53bba1de70e17dee0ffecf92c73 SELECT ? FROM `t1` 2 0 0 0 +statements_digest 7aaf73121c2dc1961757af496028610b SELECT ?, ... FROM `t1` 2 0 0 0 +statements_digest 57175aac3e410f4a0df5900bf998b181 SELECT ? FROM `t2` 1 0 0 0 +statements_digest 7595674dce5accccec6d0a9c0918b689 SELECT ?, ... FROM `t2` 2 0 0 0 +statements_digest 02b23366d1c2eb07f271b27a92261850 INSERT INTO `t1` VALUES (?) 2 2 0 0 +statements_digest d6935b92b93f59d1d8580d71345bf785 INSERT INTO `t2` VALUES (?) 1 1 0 0 +statements_digest 0bed9d67f8f0eed70e23d8d652f850f1 INSERT INTO `t3` VALUES (...) 4 4 0 0 +statements_digest 5a4288f864ee631ce51c9a2250ee05f4 INSERT INTO `t4` VALUES (...) 1 1 0 0 +statements_digest 2f3f80af62a9a0bc3e65ade97b7d9b91 INSERT INTO `t5` VALUES (...) 1 1 0 0 +statements_digest 9282eb80534dd560d422f0ad3e2ef79e INSERT INTO `t1` VALUES (?) /* , ... */ 2 7 0 0 +statements_digest 84fd494f2106df4a7b68a7d64c38390c INSERT INTO `t3` VALUES (...) /* , ... */ 1 3 0 0 +statements_digest 8d8c2006b523c427db1f4a64d2a3071c INSERT INTO `t5` VALUES (...) /* , ... */ 1 3 0 0 +statements_digest 119634570de383d4e24bb246f9aa5093 INSERT INTO `t6` VALUES (...) 5 5 0 0 +statements_digest d8492e72ce015b008b8a29347b1574f0 SELECT ? + ? 3 0 0 0 +statements_digest 3d4fc22e33e10d7235eced3c75a84c2c SELECT ? 1 0 0 0 +statements_digest 228bd1e66dfaad7a93a08eec7cfdf840 CREATE SCHEMA `statements_digest_temp` 2 2 0 0 +statements_digest a1b8dbf6a71e58af1c93dbdb27f2979c DROP SCHEMA `statements_digest_temp` 2 0 0 0 +statements_digest 80ef2cc343a9725239f4d9d88e3ed77b SELECT ? FROM `no_such_table` 1 0 0 1 +statements_digest 66bbd419c604f474fe5a769c3d8f091c CREATE TABLE `dup_table` ( `c` CHARACTER (?) ) 2 0 0 1 +statements_digest ae27efa5e1da98d54b2bf2af9a492780 DROP TABLE `dup_table` 1 0 0 0 +statements_digest 164476310fd2576cb913120166b2f2b0 INSERT IGNORE INTO `t11` VALUES (?) 1 1 1 0 statements_digest feaff321c54a9c8e1e9508628f7a5a05 SHOW WARNINGS 1 0 0 0 -statements_digest da3836703213b71919f6583391fb7de4 PREPARE `stmt` FROM ? 1 0 0 0 -statements_digest b5243e9f1b9b0bbcc8cafd6e5acc78f7 EXECUTE `stmt` 2 0 0 0 -statements_digest 1943fb11508045f36626b11b1c2311b4 DEALLOCATE PREPARE `stmt` 1 0 0 0 -statements_digest 25794340d6b31e52b8a65f672acd1a02 CREATE PROCEDURE `p1` ( ) BEGIN SELECT * FROM `t12` ; END 1 0 0 0 -statements_digest 89b975550f7e8236ee7cc9dc1662cd04 CALL `p1` ( ) 2 0 0 0 -statements_digest c5ab254ec788be45b08ba6f3b41008b4 DROP PROCEDURE `p1` 1 0 0 0 -statements_digest 85e6b42a2024f757b5e43dd231827068 CREATE FUNCTION `func` ( `a` INTEGER , `b` INTEGER ) RETURNS INTEGER (?) RETURN `a` + `b` 1 0 0 0 -statements_digest 6de36a178c9394679a4b8d8d1113a65d SELECT `func` (...) 2 0 0 0 -statements_digest 98683f018cbb76cd482f47a48921513c DROP FUNCTION `func` 1 0 0 0 -statements_digest 3e0d38357bc7322944bdd51b4281f144 CREATE TRIGGER `trg` BEFORE INSERT ON `t12` FOR EACH ROW SET @? := ? 1 0 0 0 -statements_digest 2ea818b323d4449e3474db5f70e1bdea INSERT INTO `t12` VALUES (?) 2 2 0 0 -statements_digest 4dd34f225aced9cd2f50dafe64e01f1b DROP TRIGGER `trg` 1 0 0 0 +statements_digest ba5e1127c88c3b8737000ac83579c15b PREPARE `stmt` FROM ? 1 0 0 0 +statements_digest 9e1c48512fdded3c4e64f3ac9a786096 EXECUTE `stmt` 2 0 0 0 +statements_digest 26b3d4dd928dd5321d2a0e1e63d926f7 DEALLOCATE PREPARE `stmt` 1 0 0 0 +statements_digest 179e0cb3ea4542473dc88fd24b209049 CREATE PROCEDURE `p1` ( ) BEGIN SELECT * FROM `t12` ; END 1 0 0 0 +statements_digest cde8f1053b3b4a4d67658c9c8572e765 CALL `p1` ( ) 2 0 0 0 +statements_digest ff2582be3f542ec89d41ffc8ef018c2f DROP PROCEDURE `p1` 1 0 0 0 +statements_digest bae719145a0d1e65cbbdec759665bd79 CREATE FUNCTION `func` ( `a` INTEGER , `b` INTEGER ) RETURNS INTEGER (?) RETURN `a` + `b` 1 0 0 0 +statements_digest 27b8b33b381b70df85aa39ae223baa19 SELECT `func` (...) 2 0 0 0 +statements_digest a1686531a64227fc7d1e96f090462d7b DROP FUNCTION `func` 1 0 0 0 +statements_digest 3a668f739568e34b3ae67491f7938639 CREATE TRIGGER `trg` BEFORE INSERT ON `t12` FOR EACH ROW SET @? := ? 1 0 0 0 +statements_digest 5c24333d11c3e873088d2911f4589883 INSERT INTO `t12` VALUES (?) 2 2 0 0 +statements_digest e1ea7222497e0e50f3ee08a17ebd2542 DROP TRIGGER `trg` 1 0 0 0 #################################### # CLEANUP #################################### diff --git a/mysql-test/suite/perfschema/r/statement_digest_consumers.result b/mysql-test/suite/perfschema/r/statement_digest_consumers.result index e980940e8bc..1f66c5aa8b5 100644 --- a/mysql-test/suite/perfschema/r/statement_digest_consumers.result +++ b/mysql-test/suite/perfschema/r/statement_digest_consumers.result @@ -128,41 +128,41 @@ DROP TRIGGER trg; #################################### SELECT schema_name, digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest; schema_name digest digest_text count_star -statements_digest 21b6affb55f3e69c598b47257f4d0ec6 TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1 -statements_digest 2ebcc6539c5c79b27a33707fbd4d70b0 SELECT ? FROM `t1` 2 -statements_digest 811c314bb8f68f4fdef9e30fa64acb0b SELECT ?, ... FROM `t1` 2 -statements_digest bc458c25be72e6f386b5c646bfd2a4ac SELECT ? FROM `t2` 1 -statements_digest ca8daaee4f2bac8419836ba3b57a945c SELECT ?, ... FROM `t2` 2 -statements_digest 15dbcb0276d0a32884e54f872e7550de INSERT INTO `t1` VALUES (?) 2 -statements_digest 69ed8a7ce05b795006d86cbbd31e0caa INSERT INTO `t2` VALUES (?) 1 -statements_digest a33fb1d856859fc46057c7dc869ce164 INSERT INTO `t3` VALUES (...) 4 -statements_digest a77bacee82e346244fbd5d405e9acf7d INSERT INTO `t4` VALUES (...) 1 -statements_digest 5546a45fece520aaa0140e6ac7a554ca INSERT INTO `t5` VALUES (...) 1 -statements_digest 45552b7cbc35f439bb0b2cc12b4d7004 INSERT INTO `t1` VALUES (?) /* , ... */ 2 -statements_digest 5e2ca7e5378a50395344cf8fb33c1289 INSERT INTO `t3` VALUES (...) /* , ... */ 1 -statements_digest 5a2455a3ad5daf8ad20bad0e1ba489d8 INSERT INTO `t5` VALUES (...) /* , ... */ 1 -statements_digest db2e552003c59f77b27e8a43513fa6df INSERT INTO `t6` VALUES (...) 5 -statements_digest 6d48e7bf6ebe1075c954ca4440c313f5 SELECT ? + ? 3 -statements_digest f29eded39dd5fa102f18987679dd0c14 SELECT ? 1 -statements_digest 3aeae35a7cad6d77a59795daa475ec95 CREATE SCHEMA `statements_digest_temp` 2 -statements_digest 853fcddb9ccd2b9bc89b2b9ebb86b63a DROP SCHEMA `statements_digest_temp` 2 -statements_digest 35c43fea9b2c2899c5ae8576b1b00879 SELECT ? FROM `no_such_table` 1 -statements_digest 0d6c1e5ce78bfc10f8f9d1c34883e431 CREATE TABLE `dup_table` ( `c` CHARACTER (?) ) 2 -statements_digest fba453490c48b500dc5497587ac52232 DROP TABLE `dup_table` 1 -statements_digest 8da8c367b38b366598c96c1f573b06ff INSERT IGNORE INTO `t11` VALUES (?) 1 +statements_digest d24da32343f2b799f8a7ba1bdc45f83b TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1 +statements_digest 2470c53bba1de70e17dee0ffecf92c73 SELECT ? FROM `t1` 2 +statements_digest 7aaf73121c2dc1961757af496028610b SELECT ?, ... FROM `t1` 2 +statements_digest 57175aac3e410f4a0df5900bf998b181 SELECT ? FROM `t2` 1 +statements_digest 7595674dce5accccec6d0a9c0918b689 SELECT ?, ... FROM `t2` 2 +statements_digest 02b23366d1c2eb07f271b27a92261850 INSERT INTO `t1` VALUES (?) 2 +statements_digest d6935b92b93f59d1d8580d71345bf785 INSERT INTO `t2` VALUES (?) 1 +statements_digest 0bed9d67f8f0eed70e23d8d652f850f1 INSERT INTO `t3` VALUES (...) 4 +statements_digest 5a4288f864ee631ce51c9a2250ee05f4 INSERT INTO `t4` VALUES (...) 1 +statements_digest 2f3f80af62a9a0bc3e65ade97b7d9b91 INSERT INTO `t5` VALUES (...) 1 +statements_digest 9282eb80534dd560d422f0ad3e2ef79e INSERT INTO `t1` VALUES (?) /* , ... */ 2 +statements_digest 84fd494f2106df4a7b68a7d64c38390c INSERT INTO `t3` VALUES (...) /* , ... */ 1 +statements_digest 8d8c2006b523c427db1f4a64d2a3071c INSERT INTO `t5` VALUES (...) /* , ... */ 1 +statements_digest 119634570de383d4e24bb246f9aa5093 INSERT INTO `t6` VALUES (...) 5 +statements_digest d8492e72ce015b008b8a29347b1574f0 SELECT ? + ? 3 +statements_digest 3d4fc22e33e10d7235eced3c75a84c2c SELECT ? 1 +statements_digest 228bd1e66dfaad7a93a08eec7cfdf840 CREATE SCHEMA `statements_digest_temp` 2 +statements_digest a1b8dbf6a71e58af1c93dbdb27f2979c DROP SCHEMA `statements_digest_temp` 2 +statements_digest 80ef2cc343a9725239f4d9d88e3ed77b SELECT ? FROM `no_such_table` 1 +statements_digest 66bbd419c604f474fe5a769c3d8f091c CREATE TABLE `dup_table` ( `c` CHARACTER (?) ) 2 +statements_digest ae27efa5e1da98d54b2bf2af9a492780 DROP TABLE `dup_table` 1 +statements_digest 164476310fd2576cb913120166b2f2b0 INSERT IGNORE INTO `t11` VALUES (?) 1 statements_digest feaff321c54a9c8e1e9508628f7a5a05 SHOW WARNINGS 1 -statements_digest da3836703213b71919f6583391fb7de4 PREPARE `stmt` FROM ? 1 -statements_digest b5243e9f1b9b0bbcc8cafd6e5acc78f7 EXECUTE `stmt` 2 -statements_digest 1943fb11508045f36626b11b1c2311b4 DEALLOCATE PREPARE `stmt` 1 -statements_digest 25794340d6b31e52b8a65f672acd1a02 CREATE PROCEDURE `p1` ( ) BEGIN SELECT * FROM `t12` ; END 1 -statements_digest 89b975550f7e8236ee7cc9dc1662cd04 CALL `p1` ( ) 2 -statements_digest c5ab254ec788be45b08ba6f3b41008b4 DROP PROCEDURE `p1` 1 -statements_digest 85e6b42a2024f757b5e43dd231827068 CREATE FUNCTION `func` ( `a` INTEGER , `b` INTEGER ) RETURNS INTEGER (?) RETURN `a` + `b` 1 -statements_digest 6de36a178c9394679a4b8d8d1113a65d SELECT `func` (...) 2 -statements_digest 98683f018cbb76cd482f47a48921513c DROP FUNCTION `func` 1 -statements_digest 3e0d38357bc7322944bdd51b4281f144 CREATE TRIGGER `trg` BEFORE INSERT ON `t12` FOR EACH ROW SET @? := ? 1 -statements_digest 2ea818b323d4449e3474db5f70e1bdea INSERT INTO `t12` VALUES (?) 2 -statements_digest 4dd34f225aced9cd2f50dafe64e01f1b DROP TRIGGER `trg` 1 +statements_digest ba5e1127c88c3b8737000ac83579c15b PREPARE `stmt` FROM ? 1 +statements_digest 9e1c48512fdded3c4e64f3ac9a786096 EXECUTE `stmt` 2 +statements_digest 26b3d4dd928dd5321d2a0e1e63d926f7 DEALLOCATE PREPARE `stmt` 1 +statements_digest 179e0cb3ea4542473dc88fd24b209049 CREATE PROCEDURE `p1` ( ) BEGIN SELECT * FROM `t12` ; END 1 +statements_digest cde8f1053b3b4a4d67658c9c8572e765 CALL `p1` ( ) 2 +statements_digest ff2582be3f542ec89d41ffc8ef018c2f DROP PROCEDURE `p1` 1 +statements_digest bae719145a0d1e65cbbdec759665bd79 CREATE FUNCTION `func` ( `a` INTEGER , `b` INTEGER ) RETURNS INTEGER (?) RETURN `a` + `b` 1 +statements_digest 27b8b33b381b70df85aa39ae223baa19 SELECT `func` (...) 2 +statements_digest a1686531a64227fc7d1e96f090462d7b DROP FUNCTION `func` 1 +statements_digest 3a668f739568e34b3ae67491f7938639 CREATE TRIGGER `trg` BEFORE INSERT ON `t12` FOR EACH ROW SET @? := ? 1 +statements_digest 5c24333d11c3e873088d2911f4589883 INSERT INTO `t12` VALUES (?) 2 +statements_digest e1ea7222497e0e50f3ee08a17ebd2542 DROP TRIGGER `trg` 1 SELECT digest, digest_text FROM performance_schema.events_statements_current; digest digest_text #################################### diff --git a/mysql-test/suite/perfschema/r/statement_digest_long_query.result b/mysql-test/suite/perfschema/r/statement_digest_long_query.result index e7496a19743..74f407b61be 100644 --- a/mysql-test/suite/perfschema/r/statement_digest_long_query.result +++ b/mysql-test/suite/perfschema/r/statement_digest_long_query.result @@ -8,5 +8,5 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 #################################### SELECT schema_name, digest, digest_text, count_star FROM events_statements_summary_by_digest; schema_name digest digest_text count_star -performance_schema 7b21132f2eb5d27abf79d6f1cb853171 TRUNCATE TABLE `events_statements_summary_by_digest` 1 -performance_schema 13388524411c28030c7bbdc499ca3a3b SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? 1 +performance_schema cf0f15f15c6aa949ce95632095d6a2f5 TRUNCATE TABLE `events_statements_summary_by_digest` 1 +performance_schema 03e6b6726da02f6cde506ac276a61c08 SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? 1 diff --git a/mysql-test/suite/perfschema/r/statement_program_lost_inst.result b/mysql-test/suite/perfschema/r/statement_program_lost_inst.result index 4ad63857ab9..2f0ab6988f4 100644 --- a/mysql-test/suite/perfschema/r/statement_program_lost_inst.result +++ b/mysql-test/suite/perfschema/r/statement_program_lost_inst.result @@ -18,6 +18,8 @@ count(*) > 4 select count(*) from performance_schema.setup_timers; count(*) 5 +Warnings: +Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release. select * from performance_schema.accounts; select * from performance_schema.cond_instances; select * from performance_schema.events_stages_current; @@ -128,11 +130,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 7 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result index 1c2610ce28e..982a8e881be 100644 --- a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result +++ b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result @@ -77,11 +77,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result index c0fc1a54f20..9e56822f5d0 100644 --- a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result +++ b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result @@ -76,11 +76,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result index 22e02fbac8c..07c3d7c2a18 100644 --- a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result +++ b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result @@ -77,11 +77,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result index 4e0c5cadd8e..a718b2b513b 100644 --- a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result +++ b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result @@ -76,11 +76,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result index 640b486a5be..5b488993bfb 100644 --- a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result +++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result @@ -75,11 +75,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result index 8e33c76fc1f..f5e8efd76c5 100644 --- a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result +++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result @@ -74,11 +74,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result index af43f5f8c4c..62a20e15c0b 100644 --- a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result +++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result @@ -75,11 +75,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result index 7acad8eb6c0..37dba990a1d 100644 --- a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result +++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result @@ -74,11 +74,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_aggregate_off.result b/mysql-test/suite/perfschema/r/table_aggregate_off.result index c72c0e4d4cc..65b00404947 100644 --- a/mysql-test/suite/perfschema/r/table_aggregate_off.result +++ b/mysql-test/suite/perfschema/r/table_aggregate_off.result @@ -76,11 +76,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result index 9a953ef0188..68d47390d0f 100644 --- a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result +++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result @@ -77,11 +77,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result index 6cb153c5060..50744dd22d7 100644 --- a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result +++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result @@ -76,11 +76,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result index ed6f5c62572..8d53db6ed8d 100644 --- a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result +++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result @@ -77,11 +77,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result index 839430659ea..8ddf5262d11 100644 --- a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result +++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result @@ -76,11 +76,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result index b20c455a92b..91b32f148a9 100644 --- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result @@ -79,11 +79,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result index 5670a81c181..2567ab405b7 100644 --- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result @@ -78,11 +78,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result index 991869a1c87..4a671b79013 100644 --- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result @@ -79,11 +79,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result index 823c050a843..51605627ad5 100644 --- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result @@ -78,11 +78,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result index 10d8d67a742..699b2ce5409 100644 --- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result @@ -77,11 +77,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result index 3e9da5f520e..d0f4e078033 100644 --- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result @@ -76,11 +76,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result index 507db1eed22..aae364736a4 100644 --- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result @@ -77,11 +77,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result index 8b95b8404a6..c2501355b8a 100644 --- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result @@ -76,11 +76,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result index 6e6a5a3d1c3..45766897df3 100644 --- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result @@ -79,11 +79,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result index b3409b9ea5f..89faa9c12ac 100644 --- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result @@ -78,11 +78,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result index 1675f6c91cf..9c61d65df50 100644 --- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result @@ -79,11 +79,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result index 7c6a4dbc991..33925454953 100644 --- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result @@ -78,11 +78,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result index c96d610109d..9f30b3b7efc 100644 --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result @@ -79,11 +79,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result index 1b939367b5c..c1c3ccbd8d3 100644 --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result @@ -78,11 +78,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result index c8198bbbd07..7efb952bc0d 100644 --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result @@ -79,11 +79,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result index b35bb53199c..a40d332a4ef 100644 --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result @@ -78,11 +78,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result index 58442bf4589..264edae51f2 100644 --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result @@ -77,11 +77,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result index b86094d778a..fbf61a3c970 100644 --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result @@ -76,11 +76,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result index b6f70d3d3ed..bea2a5c1995 100644 --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result @@ -77,11 +77,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result index a81c7f4750f..639e29da7fa 100644 --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result @@ -76,11 +76,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result index 778cc635ec6..0f466c890c2 100644 --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result @@ -79,11 +79,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result index b1800ad07f4..e237be9270a 100644 --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result @@ -78,11 +78,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result index 6a6a48090cc..24d1786c543 100644 --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result @@ -79,11 +79,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result index 62f7fa01086..5bb0b38eec0 100644 --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result @@ -78,11 +78,11 @@ performance_schema_max_file_instances 10000 performance_schema_max_index_stat 5000 performance_schema_max_memory_classes 320 performance_schema_max_metadata_locks 10000 -performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_classes 210 performance_schema_max_mutex_instances 5000 performance_schema_max_prepared_statements_instances 100 performance_schema_max_program_instances 5000 -performance_schema_max_rwlock_classes 40 +performance_schema_max_rwlock_classes 50 performance_schema_max_rwlock_instances 5000 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 1000 diff --git a/mysql-test/suite/perfschema/r/table_name.result b/mysql-test/suite/perfschema/r/table_name.result index d6369ffc79e..3ee335991d8 100644 --- a/mysql-test/suite/perfschema/r/table_name.result +++ b/mysql-test/suite/perfschema/r/table_name.result @@ -13,7 +13,8 @@ INSERT INTO `sql_1` VALUES(1,'one'); SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; object_type object_schema object_name TABLE test #sql_1 TABLE test sql_1 @@ -25,7 +26,8 @@ DROP TABLE `sql_1`; SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; object_type object_schema object_name # @@ -41,7 +43,8 @@ INSERT INTO sql_temp2_innodb VALUES(1,'one'); SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; object_type object_schema object_name # Drop the tables, verify that the table objects are not created. @@ -51,7 +54,8 @@ DROP TABLE sql_temp2_innodb; SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; object_type object_schema object_name # @@ -73,7 +77,8 @@ INSERT INTO `#sql_temp3_innodb` VALUES(1,'one'); SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; object_type object_schema object_name # Drop the temporary tables. @@ -85,7 +90,8 @@ DROP TABLE `#sql_temp3_innodb`; SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; object_type object_schema object_name # @@ -102,7 +108,8 @@ INSERT INTO `#sql_temp4_myisam` VALUES(1,'one'); SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; object_type object_schema object_name # Truncate the MyISAM temporary tables, forcing them to be recreated as non-temporary. @@ -114,7 +121,8 @@ TRUNCATE TABLE `#sql_temp4_myisam`; SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; object_type object_schema object_name # Drop the recreated MyISAM tables; @@ -126,7 +134,8 @@ DROP TABLE `#sql_temp4_myisam`; SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; object_type object_schema object_name # @@ -141,7 +150,8 @@ ALTER TABLE t1 ADD COLUMN (b int); SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; object_type object_schema object_name # Drop the MyISAM table @@ -152,5 +162,6 @@ DROP TABLE t1; SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; object_type object_schema object_name diff --git a/mysql-test/suite/perfschema/r/table_schema.result b/mysql-test/suite/perfschema/r/table_schema.result index f216798803a..b980a8cd685 100644 --- a/mysql-test/suite/perfschema/r/table_schema.result +++ b/mysql-test/suite/perfschema/r/table_schema.result @@ -901,7 +901,7 @@ def performance_schema replication_connection_status THREAD_ID 4 NULL YES bigint def performance_schema replication_connection_status SERVICE_STATE 5 NULL NO enum 10 30 NULL NULL NULL utf8 utf8_general_ci enum('ON','OFF','CONNECTING') select,insert,update,references def performance_schema replication_connection_status COUNT_RECEIVED_HEARTBEATS 6 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references def performance_schema replication_connection_status LAST_HEARTBEAT_TIMESTAMP 7 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references Shows when the most recent heartbeat signal was received. -def performance_schema replication_connection_status RECEIVED_TRANSACTION_SET 8 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_general_ci text select,insert,update,references +def performance_schema replication_connection_status RECEIVED_TRANSACTION_SET 8 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select,insert,update,references def performance_schema replication_connection_status LAST_ERROR_NUMBER 9 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references def performance_schema replication_connection_status LAST_ERROR_MESSAGE 10 NULL NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select,insert,update,references def performance_schema replication_connection_status LAST_ERROR_TIMESTAMP 11 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references @@ -916,7 +916,7 @@ def performance_schema replication_group_member_stats MEMBER_ID 3 NULL NO char 3 def performance_schema replication_group_member_stats COUNT_TRANSACTIONS_IN_QUEUE 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references def performance_schema replication_group_member_stats COUNT_TRANSACTIONS_CHECKED 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references def performance_schema replication_group_member_stats COUNT_CONFLICTS_DETECTED 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references -def performance_schema replication_group_member_stats COUNT_TRANSACTIONS_VALIDATING 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references +def performance_schema replication_group_member_stats COUNT_TRANSACTIONS_ROWS_VALIDATING 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references def performance_schema replication_group_member_stats TRANSACTIONS_COMMITTED_ALL_MEMBERS 8 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select,insert,update,references def performance_schema replication_group_member_stats LAST_CONFLICT_FREE_TRANSACTION 9 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_general_ci text select,insert,update,references def performance_schema rwlock_instances NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references diff --git a/mysql-test/suite/perfschema/r/temp_table_io.result b/mysql-test/suite/perfschema/r/temp_table_io.result index 50ba7e1296b..a1b16c42108 100644 --- a/mysql-test/suite/perfschema/r/temp_table_io.result +++ b/mysql-test/suite/perfschema/r/temp_table_io.result @@ -70,20 +70,20 @@ where event_name like 'wait/io/table/%' and object_schema in ("test") order by thread_id, event_id; event_name short_source object_type object_schema pretty_name operation number_of_bytes -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 show global status like 'performance_schema_%'; Variable_name Value Performance_schema_accounts_lost 0 diff --git a/mysql-test/suite/perfschema/r/transaction.result b/mysql-test/suite/perfschema/r/transaction.result index c2a538bd741..3dd528f29bb 100644 --- a/mysql-test/suite/perfschema/r/transaction.result +++ b/mysql-test/suite/perfschema/r/transaction.result @@ -36,6 +36,8 @@ CALL clear_transaction_tables(); SELECT @@global.tx_isolation; @@global.tx_isolation REPEATABLE-READ +Warnings: +Warning 1287 '@@tx_isolation' is deprecated and will be removed in a future release. Please use '@@transaction_isolation' instead SELECT @@global.autocommit; @@global.autocommit 1 @@ -45,6 +47,8 @@ ROW SELECT @@tx_isolation; @@tx_isolation REPEATABLE-READ +Warnings: +Warning 1287 '@@tx_isolation' is deprecated and will be removed in a future release. Please use '@@transaction_isolation' instead SELECT @@autocommit; @@autocommit 0 diff --git a/mysql-test/suite/perfschema/r/trigger_table_io.result b/mysql-test/suite/perfschema/r/trigger_table_io.result index 70c78cb00c9..02821a481af 100644 --- a/mysql-test/suite/perfschema/r/trigger_table_io.result +++ b/mysql-test/suite/perfschema/r/trigger_table_io.result @@ -83,80 +83,80 @@ where event_name like 'wait/io/table/%' and object_schema in ("test") order by thread_id, event_id; event_name short_source object_type object_schema pretty_name operation number_of_bytes -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 update 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 update 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 update 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 update 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 update 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 update 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 update 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 update 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 delete 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 delete 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 delete 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 delete 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t2 insert 1 +wait/io/table/sql/handler TABLE test t1 insert 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t2 update 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t2 insert 1 +wait/io/table/sql/handler TABLE test t1 insert 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t2 update 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t1 fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t2 fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t2 update 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t1 update 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t2 update 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t2 update 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t1 update 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t2 update 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t1 fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t2 fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t2 delete 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t1 delete 1 +wait/io/table/sql/handler TABLE test t2 insert 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t2 fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t2 delete 1 +wait/io/table/sql/handler TABLE test t2 fetch 1 +wait/io/table/sql/handler TABLE test t1 delete 1 +wait/io/table/sql/handler TABLE test t2 insert 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test t1 fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test t2 fetch 2 show global status like 'performance_schema_%'; Variable_name Value Performance_schema_accounts_lost 0 diff --git a/mysql-test/suite/perfschema/r/view_table_io.result b/mysql-test/suite/perfschema/r/view_table_io.result index ec2f227d0da..5c13064a357 100644 --- a/mysql-test/suite/perfschema/r/view_table_io.result +++ b/mysql-test/suite/perfschema/r/view_table_io.result @@ -77,41 +77,41 @@ where event_name like 'wait/io/table/%' and object_schema in ("test") order by thread_id, event_id; event_name short_source object_type object_schema pretty_name operation number_of_bytes -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 3 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 -wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 3 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab update 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test no_index_tab delete 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test no_index_tab fetch 2 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 +wait/io/table/sql/handler TABLE test marker insert 1 show global status like 'performance_schema_%'; Variable_name Value Performance_schema_accounts_lost 0 diff --git a/mysql-test/suite/perfschema/t/aggregate.test b/mysql-test/suite/perfschema/t/aggregate.test deleted file mode 100644 index 4fcbeb22886..00000000000 --- a/mysql-test/suite/perfschema/t/aggregate.test +++ /dev/null @@ -1,196 +0,0 @@ -# Tests for PERFORMANCE_SCHEMA -# Verify that statistics aggregated by different criteria are consistent. - -## To skip the test with QC enabled till BUG#14830950 is fixed. --- source include/have_QC_Disabled.inc - ---source include/not_embedded.inc ---source include/have_perfschema.inc ---source include/no_protocol.inc - ---echo "General cleanup" - ---disable_warnings -drop table if exists t1; ---enable_warnings - ---source include/turn_off_only_full_group_by.inc - -update performance_schema.setup_instruments set enabled = 'NO'; -update performance_schema.setup_consumers set enabled = 'NO'; - -# Cleanup statistics -truncate table performance_schema.file_summary_by_event_name; -truncate table performance_schema.file_summary_by_instance; -truncate table performance_schema.socket_summary_by_event_name; -truncate table performance_schema.socket_summary_by_instance; -truncate table performance_schema.events_waits_summary_global_by_event_name; -truncate table performance_schema.events_waits_summary_by_instance; -truncate table performance_schema.events_waits_summary_by_thread_by_event_name; - -# Start recording data -update performance_schema.setup_consumers set enabled = 'YES'; -update performance_schema.setup_instruments - set enabled = 'YES', timed = 'YES'; - - -create table t1 ( - id INT PRIMARY KEY, - b CHAR(100) DEFAULT 'initial value') - ENGINE=MyISAM; - -insert into t1 (id) values (1), (2), (3), (4), (5), (6), (7), (8); - -# Stop recording data, so the select below don't add noise. -update performance_schema.setup_instruments SET enabled = 'NO'; -# Disable all consumers, for long standing waits -update performance_schema.setup_consumers set enabled = 'NO'; - -# Helper to debug -set @dump_all=FALSE; - -# Note that in general: -# - COUNT/SUM/MAX(file_summary_by_event_name) >= -# COUNT/SUM/MAX(file_summary_by_instance). -# - MIN(file_summary_by_event_name) <= -# MIN(file_summary_by_instance). -# There will be equality only when file instances are not removed, -# aka when a file is not deleted from the file system, -# because doing so removes a row in file_summary_by_instance. - -# Likewise: -# - COUNT/SUM/MAX(events_waits_summary_global_by_event_name) >= -# COUNT/SUM/MAX(events_waits_summary_by_instance) -# - MIN(events_waits_summary_global_by_event_name) <= -# MIN(events_waits_summary_by_instance) -# There will be equality only when an instrument instance -# is not removed, which is next to impossible to predictably guarantee -# in the server. -# For example, a MyISAM table removed from the table cache -# will cause a mysql_mutex_destroy on myisam/MYISAM_SHARE::intern_lock. -# Another example, a thread terminating will cause a mysql_mutex_destroy -# on sql/LOCK_delete -# Both cause a row to be deleted from events_waits_summary_by_instance. - -# Likewise: -# - COUNT/SUM/MAX(events_waits_summary_global_by_event_name) >= -# COUNT/SUM/MAX(events_waits_summary_by_thread_by_event_name) -# - MIN(events_waits_summary_global_by_event_name) <= -# MIN(events_waits_summary_by_thread_by_event_name) -# There will be equality only when no thread is removed, -# that is if no thread disconnects, or no sub thread ever completes. -# A thread completing will cause rows in -# events_waits_summary_by_thread_by_event_name to be removed. - ---echo "Verifying file aggregate consistency" - -# Since the code generating the load in this test does: -# - create table -# - insert -# - does not cause temporary tables to be used -# we can test for equality here for file aggregates. - -# If any of these queries returns data, the test failed. - -SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ) -FROM performance_schema.file_summary_by_event_name AS e -JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.COUNT_READ <> SUM(i.COUNT_READ)) -OR @dump_all; - -SELECT EVENT_NAME, e.COUNT_WRITE, SUM(i.COUNT_WRITE) -FROM performance_schema.file_summary_by_event_name AS e -JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.COUNT_WRITE <> SUM(i.COUNT_WRITE)) -OR @dump_all; - -SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ) -FROM performance_schema.socket_summary_by_event_name AS e -JOIN performance_schema.socket_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.COUNT_READ <> SUM(i.COUNT_READ)) -OR @dump_all; - -SELECT EVENT_NAME, e.COUNT_WRITE, SUM(i.COUNT_WRITE) -FROM performance_schema.socket_summary_by_event_name AS e -JOIN performance_schema.socket_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.COUNT_WRITE <> SUM(i.COUNT_WRITE)) -OR @dump_all; - -SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_READ, SUM(i.SUM_NUMBER_OF_BYTES_READ) -FROM performance_schema.file_summary_by_event_name AS e -JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.SUM_NUMBER_OF_BYTES_READ <> SUM(i.SUM_NUMBER_OF_BYTES_READ)) -OR @dump_all; - -SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_WRITE, SUM(i.SUM_NUMBER_OF_BYTES_WRITE) -FROM performance_schema.file_summary_by_event_name AS e -JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.SUM_NUMBER_OF_BYTES_WRITE <> SUM(i.SUM_NUMBER_OF_BYTES_WRITE)) -OR @dump_all; - ---echo "Verifying waits aggregate consistency (instance)" - -SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(i.SUM_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.SUM_TIMER_WAIT < SUM(i.SUM_TIMER_WAIT)) -OR @dump_all; - -SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(i.MIN_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.MIN_TIMER_WAIT > MIN(i.MIN_TIMER_WAIT)) -AND (MIN(i.MIN_TIMER_WAIT) != 0) -OR @dump_all; - -SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(i.MAX_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.MAX_TIMER_WAIT < MAX(i.MAX_TIMER_WAIT)) -OR @dump_all; - ---echo "Verifying waits aggregate consistency (thread)" - -SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(t.SUM_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t -USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.SUM_TIMER_WAIT < SUM(t.SUM_TIMER_WAIT)) -OR @dump_all; - -SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(t.MIN_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t -USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.MIN_TIMER_WAIT > MIN(t.MIN_TIMER_WAIT)) -AND (MIN(t.MIN_TIMER_WAIT) != 0) -OR @dump_all; - -SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(t.MAX_TIMER_WAIT) -FROM performance_schema.events_waits_summary_global_by_event_name AS e -JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t -USING (EVENT_NAME) -GROUP BY EVENT_NAME -HAVING (e.MAX_TIMER_WAIT < MAX(t.MAX_TIMER_WAIT)) -OR @dump_all; - - -# Cleanup - -update performance_schema.setup_consumers set enabled = 'YES'; -update performance_schema.setup_instruments - set enabled = 'YES', timed = 'YES'; - -drop table test.t1; ---source include/restore_sql_mode_after_turn_off_only_full_group_by.inc diff --git a/mysql-test/suite/perfschema/t/dml_file_instances.test b/mysql-test/suite/perfschema/t/dml_file_instances.test index f95f74fd61a..92174e222ba 100644 --- a/mysql-test/suite/perfschema/t/dml_file_instances.test +++ b/mysql-test/suite/perfschema/t/dml_file_instances.test @@ -33,3 +33,62 @@ UNLOCK TABLES; LOCK TABLES performance_schema.file_instances WRITE; UNLOCK TABLES; +--echo ### +--echo ### Bug#26152751: INNODB LEAKS MEMORY, PERFORMANCE_SCHEMA FILE_INSTANCES +--echo ### #SQL-IB3129987-252773.IBD +--echo ### + +CREATE DATABASE db_26152751; +USE db_26152751; + +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; + +CREATE TABLE t_db_26152751 (a INT) ENGINE=MYISAM; + +--replace_regex /.*\/t_db_26152751/t_db_26152751/ +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; + +RENAME TABLE t_db_26152751 to t_db_26152751_new; + +--replace_regex /.*\/t_db_26152751/t_db_26152751/ +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; + +RENAME TABLE t_db_26152751_new to t_db_26152751; + +--replace_regex /.*\/t_db_26152751/t_db_26152751/ +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; + +ALTER TABLE t_db_26152751 ADD COLUMN b INT; + +--replace_regex /.*\/t_db_26152751/t_db_26152751/ +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; + +DROP TABLE t_db_26152751; + +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; + +CREATE TABLE t_db_26152751 (a INT) ENGINE=INNODB; + +--replace_regex /.*\/t_db_26152751/t_db_26152751/ +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; + +RENAME TABLE t_db_26152751 to t_db_26152751_new; + +--replace_regex /.*\/t_db_26152751/t_db_26152751/ +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; + +RENAME TABLE t_db_26152751_new to t_db_26152751; + +--replace_regex /.*\/t_db_26152751/t_db_26152751/ +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; + +ALTER TABLE t_db_26152751 ADD COLUMN b INT; + +--replace_regex /.*\/t_db_26152751/t_db_26152751/ +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; + +DROP TABLE t_db_26152751; + +SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%"; + +DROP DATABASE db_26152751; diff --git a/mysql-test/suite/perfschema/t/dml_setup_instruments.test b/mysql-test/suite/perfschema/t/dml_setup_instruments.test index 3acf9c24e18..0a87600caba 100644 --- a/mysql-test/suite/perfschema/t/dml_setup_instruments.test +++ b/mysql-test/suite/perfschema/t/dml_setup_instruments.test @@ -25,7 +25,9 @@ select * from performance_schema.setup_instruments select * from performance_schema.setup_instruments where name like 'Wait/Synch/Rwlock/sql/%' - and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock') + and name not in ( + 'wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock', + 'wait/synch/rwlock/sql/LOCK_named_pipe_full_access_group') order by name limit 10; # COND_handler_count is dependent on the build (Windows only) diff --git a/mysql-test/suite/perfschema/t/read_only.test b/mysql-test/suite/perfschema/t/read_only.test index f65e919703c..92b17761e63 100644 --- a/mysql-test/suite/perfschema/t/read_only.test +++ b/mysql-test/suite/perfschema/t/read_only.test @@ -6,10 +6,12 @@ --source include/not_embedded.inc --source include/have_perfschema.inc +--enable_connect_log use performance_schema; set @start_read_only= @@global.read_only; +set @start_super_read_only= @@global.super_read_only; set @orig_sql_mode= @@sql_mode; set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER','')); @@ -17,15 +19,12 @@ grant SELECT, UPDATE on performance_schema.* to pfsuser@localhost; set sql_mode= @orig_sql_mode; flush privileges; ---echo connect (con1, localhost, pfsuser, , test); connect (con1, localhost, pfsuser, , test); ---echo connection default; connection default; set global read_only=0; ---echo connection con1; connection con1; select @@global.read_only; @@ -36,32 +35,27 @@ update performance_schema.setup_instruments set enabled='NO'; update performance_schema.setup_instruments set enabled='YES'; --enable_result_log ---echo connection default; connection default; set global read_only=1; ---echo connection con1; connection con1; select @@global.read_only; show grants; --disable_result_log +--echo # Update on perf_schema is allowed in read_only mode. select * from performance_schema.setup_instruments; ---error ER_OPTION_PREVENTS_STATEMENT update performance_schema.setup_instruments set enabled='NO'; ---error ER_OPTION_PREVENTS_STATEMENT update performance_schema.setup_instruments set enabled='YES'; --enable_result_log ---echo connection default; connection default; grant super on *.* to pfsuser@localhost; flush privileges; disconnect con1; ---echo connect (con1, localhost, pfsuser, , test); connect (con1, localhost, pfsuser, , test); select @@global.read_only; @@ -72,14 +66,31 @@ update performance_schema.setup_instruments set enabled='NO'; update performance_schema.setup_instruments set enabled='YES'; --enable_result_log +connection default; + +set global super_read_only=1; + +connection con1; + +select @@global.super_read_only; +show grants; +--disable_result_log +select * from performance_schema.setup_instruments; +--echo # Update is allowed in super_read_only on perf schema for +--echo # super user. +update performance_schema.setup_instruments set enabled='NO'; +update performance_schema.setup_instruments set enabled='YES'; +--enable_result_log + disconnect con1; --source include/wait_until_disconnected.inc ---echo connection default; connection default; set global read_only= @start_read_only; +set global super_read_only= @start_super_read_only; drop user pfsuser@localhost; flush privileges; +--disable_connect_log diff --git a/mysql-test/suite/perfschema/t/rpl_group_member_stats.test b/mysql-test/suite/perfschema/t/rpl_group_member_stats.test index 1bda1dd4102..256c6a69c26 100644 --- a/mysql-test/suite/perfschema/t/rpl_group_member_stats.test +++ b/mysql-test/suite/perfschema/t/rpl_group_member_stats.test @@ -32,8 +32,8 @@ --let $assert_cond= "$negatively_certified" = 0 --source include/assert.inc ---let $certification_db_size= query_get_value(SELECT Count_Transactions_validating from performance_schema.replication_group_member_stats, Count_Transactions_validating, 1) ---let $assert_text= The value of Count_Transactions_validating should be 0 +--let $certification_db_size= query_get_value(SELECT Count_Transactions_rows_validating from performance_schema.replication_group_member_stats, Count_Transactions_rows_validating, 1) +--let $assert_text= The value of Count_Transactions_rows_validating should be 0 --let $assert_cond= "$certification_db_size" = 0 --source include/assert.inc diff --git a/mysql-test/suite/perfschema/t/show_aggregate.test b/mysql-test/suite/perfschema/t/show_aggregate.test index e2f571100a4..b5c5d9355d7 100644 --- a/mysql-test/suite/perfschema/t/show_aggregate.test +++ b/mysql-test/suite/perfschema/t/show_aggregate.test @@ -280,6 +280,20 @@ SELECT variable_name, h1, h2, h3, delta, host, IF(host=delta,'OK','ERROR') Expec FROM test.status_results ORDER BY variable_name; + +--echo ================================================================================ +--echo TEST 8: FLUSH STATUS should clear account, host and user status +--echo ================================================================================ +--echo +FLUSH STATUS; +--echo +SELECT * FROM status_by_account WHERE user LIKE 'user%' AND variable_name IN ('handler_delete'); +--echo +SELECT * FROM status_by_host WHERE host IN ('localhost') AND variable_name IN ('handler_delete'); +--echo +SELECT * FROM status_by_user WHERE user LIKE 'user%' AND variable_name IN ('handler_delete'); + + --echo ================================================================================ --echo CLEANUP --echo ================================================================================ diff --git a/mysql-test/suite/perfschema/t/show_coverage.test b/mysql-test/suite/perfschema/t/show_coverage.test index ecf21a76a38..c4b06029534 100644 --- a/mysql-test/suite/perfschema/t/show_coverage.test +++ b/mysql-test/suite/perfschema/t/show_coverage.test @@ -7,6 +7,7 @@ --source include/have_perfschema.inc --source include/not_embedded.inc --source include/no_protocol.inc +--source include/count_sessions.inc select @@global.show_compatibility_56 into @show_compatibility_56_save; --echo @@ -111,14 +112,90 @@ SELECT variable_value FROM status_by_thread WHERE variable_name = "bytes_received" and thread_id = @thread_id INTO @bytes_after; --echo --echo # Expect bytes_before > bytes_after -SELECT @bytes_before > @bytes_after; +SELECT @bytes_before > @bytes_after AS 'Expect 1'; --echo --echo # Expect bytes_after is zero -SELECT @bytes_after; +SELECT @bytes_after AS 'Expect 0'; disconnect con1; +--source include/wait_until_count_sessions.inc + + +--echo +--echo # TEST 6 +--echo # +--echo # Bug#28291258 FLUSH STATUS ADDS TWICE TO GLOBAL VALUES +--echo # + +--echo +--echo # Default connection +--let $initial_global_value = query_get_value(SHOW GLOBAL STATUS LIKE 'Slow_queries', Value, 1) + +--source include/count_sessions.inc --echo +--echo # First connection +--connect (con1, localhost, root,,) + +## Global value requested from the first session must not change +--let $current_global_value = query_get_value(SHOW GLOBAL STATUS LIKE 'Slow_queries', Value, 1) +--let $assert_cond = $current_global_value - $initial_global_value = 0 +--let $assert_text = Global value requested from the first session must not change +--source include/assert.inc + +--echo +--echo # Generate a slow query +--echo +SET long_query_time = 2; +SELECT SLEEP(4); +SET long_query_time = @@global.long_query_time; +--echo + +## Global value requested from the first session after SLEEP() must increase by 1 +--let $current_global_value = query_get_value(SHOW GLOBAL STATUS LIKE 'Slow_queries', Value, 1) +--let $first_session_value = query_get_value(SHOW SESSION STATUS LIKE 'Slow_queries', Value, 1) +--let $assert_cond = $current_global_value - $initial_global_value = 1 +--let $assert_text = Global value requested from the first session after SLEEP() must increase by 1 +--source include/assert.inc +--let $assert_cond = $first_session_value = 1 +--let $assert_text = First session value must increase by 1 +--source include/assert.inc + +--connection default +--disconnect con1 +--source include/wait_until_count_sessions.inc + +--echo +--echo # Default connection +--connection default + +## Global value requested from the default session after DISCONNECT must remain the same +--let $current_global_value = query_get_value(SHOW GLOBAL STATUS LIKE 'Slow_queries', Value, 1) +--let $default_session_value = query_get_value(SHOW SESSION STATUS LIKE 'Slow_queries', Value, 1) +--let $assert_cond = $current_global_value - $initial_global_value = 1 +--let $assert_text = Global value requested from the default session after DISCONNECT must remain the same +--source include/assert.inc + +## Default session value must remain zero +--let $assert_cond = $default_session_value = 0 +--let $assert_text = Default session value must remain zero +--source include/assert.inc + +--echo +FLUSH STATUS; +--echo + +## Global value requested from the default session after FLUSH must remain the same +--let $current_global_value = query_get_value(SHOW GLOBAL STATUS LIKE 'Slow_queries', Value, 1) +--let $default_session_value = query_get_value(SHOW SESSION STATUS LIKE 'Slow_queries', Value, 1) +--let $assert_cond = $current_global_value - $initial_global_value = 1 +--let $assert_text = Global value requested from the default session after FLUSH must remain the same +--source include/assert.inc + +## Default session value after FLUSH must remain zero +--let $assert_cond = $default_session_value = 0 +--let $assert_text = Default session value after FLUSH must remain zero +--source include/assert.inc + --echo # CLEANUP set @@global.show_compatibility_56 = @show_compatibility_56_save; - diff --git a/mysql-test/suite/perfschema/t/show_misc.test b/mysql-test/suite/perfschema/t/show_misc.test index e56c859913b..39a6b65b6b5 100644 --- a/mysql-test/suite/perfschema/t/show_misc.test +++ b/mysql-test/suite/perfschema/t/show_misc.test @@ -75,6 +75,21 @@ UNLOCK TABLES; DROP TABLE test.t1; + +--echo +--echo ================================================================================ +--echo Bug#28515475 BOGUS DATA WHEN ORDERING RESULTS FROM VARIABLES_BY_THREAD +--echo ================================================================================ +--echo Verify the results from "WHERE variable_name IN(...)", particularly for those +--echo variables that are listed after the deprecated variable gtid_executed. +--echo The ORDER BY also forces an additional code path through rnd_pos(). +--echo + +SELECT variable_name FROM performance_schema.variables_by_thread + WHERE variable_name IN ('interactive_timeout','net_read_timeout','net_write_timeout','wait_timeout') + ORDER BY variable_name; + + --echo --echo ================================================================================ --echo CLEAN UP diff --git a/mysql-test/suite/perfschema/t/show_sanity.test b/mysql-test/suite/perfschema/t/show_sanity.test index 98073adacfe..cc54d1af744 100644 --- a/mysql-test/suite/perfschema/t/show_sanity.test +++ b/mysql-test/suite/perfschema/t/show_sanity.test @@ -502,6 +502,7 @@ insert into test.sanity values ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_ROLLBACK_ON_TIMEOUT"), ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_ROLLBACK_SEGMENTS"), ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_SAVED_PAGE_NUMBER_DEBUG"), + ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_SEMAPHORE_WAIT_TIMEOUT_DEBUG"), ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_SORT_BUFFER_SIZE"), ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_SPIN_WAIT_DELAY"), ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_STATS_AUTO_RECALC"), @@ -582,6 +583,7 @@ insert into test.sanity values ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MYISAM_USE_MMAP"), ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MYSQL_NATIVE_PASSWORD_PROXY_USERS"), ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "NAMED_PIPE"), + ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "NAMED_PIPE_FULL_ACCESS_GROUP"), ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "NDBINFO_DATABASE"), ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "NDBINFO_OFFLINE"), ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "NDBINFO_TABLE_PREFIX"), diff --git a/mysql-test/suite/perfschema/t/start_server_1_digest-master.opt b/mysql-test/suite/perfschema/t/start_server_1_digest-master.opt new file mode 100644 index 00000000000..e59be3eb02f --- /dev/null +++ b/mysql-test/suite/perfschema/t/start_server_1_digest-master.opt @@ -0,0 +1 @@ +--performance-schema-digests-size=1 diff --git a/mysql-test/suite/perfschema/t/start_server_1_digest.test b/mysql-test/suite/perfschema/t/start_server_1_digest.test new file mode 100644 index 00000000000..998d9a5eebe --- /dev/null +++ b/mysql-test/suite/perfschema/t/start_server_1_digest.test @@ -0,0 +1,15 @@ +# ----------------------------------------------------------------------- +# Tests for the performance schema statement Digests. +# ----------------------------------------------------------------------- + +--source include/not_embedded.inc +--source include/have_perfschema.inc +--source include/no_protocol.inc + +SELECT "Digest table has a size 1 and is full already." as use_case; + +select SCHEMA_NAME, DIGEST, DIGEST_TEXT + from performance_schema.events_statements_summary_by_digest; + + + diff --git a/mysql-test/suite/perfschema/t/statement_digest_long_query.test b/mysql-test/suite/perfschema/t/statement_digest_long_query.test index 3e967b9daf5..d8868e6b388 100644 --- a/mysql-test/suite/perfschema/t/statement_digest_long_query.test +++ b/mysql-test/suite/perfschema/t/statement_digest_long_query.test @@ -4,7 +4,14 @@ --source include/not_embedded.inc --source include/have_perfschema.inc +# Test requires: sp-protocol/ps-protocol/view-protocol/cursor-protocol disabled --source include/no_protocol.inc +# Thread stack overrun on solaris +let $have_solaris = `select convert(@@version_compile_os using latin1) LIKE ("solaris%")`; +if ($have_solaris) +{ + skip Test requires: 'not_solaris'; +} USE performance_schema; truncate table events_statements_summary_by_digest; diff --git a/mysql-test/suite/perfschema/t/table_name.test b/mysql-test/suite/perfschema/t/table_name.test index 00df678a392..20b50fa2265 100644 --- a/mysql-test/suite/perfschema/t/table_name.test +++ b/mysql-test/suite/perfschema/t/table_name.test @@ -32,7 +32,8 @@ INSERT INTO `sql_1` VALUES(1,'one'); --echo SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; --echo --echo # Drop the tables, verify that the table objects are removed. --echo @@ -41,7 +42,8 @@ DROP TABLE `sql_1`; --echo SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; --echo --echo # @@ -57,7 +59,8 @@ INSERT INTO sql_temp2_innodb VALUES(1,'one'); --echo SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; --echo --echo # Drop the tables, verify that the table objects are not created. --echo @@ -66,7 +69,8 @@ DROP TABLE sql_temp2_innodb; --echo SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; --echo --echo # @@ -84,7 +88,8 @@ INSERT INTO `#sql_temp3_innodb` VALUES(1,'one'); --echo SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; --echo --echo # Drop the temporary tables. --echo @@ -95,7 +100,8 @@ DROP TABLE `#sql_temp3_innodb`; --echo SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; --echo --echo # @@ -112,7 +118,8 @@ INSERT INTO `#sql_temp4_myisam` VALUES(1,'one'); --echo SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; --echo --echo # Truncate the MyISAM temporary tables, forcing them to be recreated as non-temporary. --echo @@ -123,7 +130,8 @@ TRUNCATE TABLE `#sql_temp4_myisam`; --echo SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; --echo --echo # Drop the recreated MyISAM tables; --echo @@ -134,7 +142,8 @@ DROP TABLE `#sql_temp4_myisam`; --echo SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; --echo --echo # @@ -150,7 +159,8 @@ ALTER TABLE t1 ADD COLUMN (b int); --echo SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; --echo --echo # Drop the MyISAM table --echo @@ -161,4 +171,5 @@ DROP TABLE t1; --echo SELECT object_type, object_schema, object_name FROM performance_schema.objects_summary_global_by_type -WHERE object_schema="test"; +WHERE object_schema="test" +ORDER BY object_name; diff --git a/storage/perfschema/CMakeLists.txt b/storage/perfschema/CMakeLists.txt index 3e4ad1414e9..3c463ae3073 100644 --- a/storage/perfschema/CMakeLists.txt +++ b/storage/perfschema/CMakeLists.txt @@ -1,14 +1,21 @@ -# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2019, 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 Foundation, @@ -19,7 +26,6 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/sql ${CMAKE_BINARY_DIR}/sql ${CMAKE_SOURCE_DIR}/regex - ${CMAKE_SOURCE_DIR}/extra/yassl/include ${SSL_INCLUDE_DIRS}) ADD_DEFINITIONS(-DMYSQL_SERVER) diff --git a/storage/perfschema/cursor_by_account.cc b/storage/perfschema/cursor_by_account.cc index 9bad70792cf..45ee1814a0b 100644 --- a/storage/perfschema/cursor_by_account.cc +++ b/storage/perfschema/cursor_by_account.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 diff --git a/storage/perfschema/cursor_by_account.h b/storage/perfschema/cursor_by_account.h index 5331d98c69e..ec025451414 100644 --- a/storage/perfschema/cursor_by_account.h +++ b/storage/perfschema/cursor_by_account.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 diff --git a/storage/perfschema/cursor_by_host.cc b/storage/perfschema/cursor_by_host.cc index 8a26dd5c1a3..28afce2ad33 100644 --- a/storage/perfschema/cursor_by_host.cc +++ b/storage/perfschema/cursor_by_host.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 diff --git a/storage/perfschema/cursor_by_host.h b/storage/perfschema/cursor_by_host.h index d48988b59e1..fa503e7ce20 100644 --- a/storage/perfschema/cursor_by_host.h +++ b/storage/perfschema/cursor_by_host.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 diff --git a/storage/perfschema/cursor_by_thread.cc b/storage/perfschema/cursor_by_thread.cc index 9eedd959fd3..c45e3dd0543 100644 --- a/storage/perfschema/cursor_by_thread.cc +++ b/storage/perfschema/cursor_by_thread.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 diff --git a/storage/perfschema/cursor_by_thread.h b/storage/perfschema/cursor_by_thread.h index c4d287dd8a3..5bcafc6e6af 100644 --- a/storage/perfschema/cursor_by_thread.h +++ b/storage/perfschema/cursor_by_thread.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 diff --git a/storage/perfschema/cursor_by_thread_connect_attr.cc b/storage/perfschema/cursor_by_thread_connect_attr.cc index 37ca356b426..e873e81672b 100644 --- a/storage/perfschema/cursor_by_thread_connect_attr.cc +++ b/storage/perfschema/cursor_by_thread_connect_attr.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/cursor_by_thread_connect_attr.h b/storage/perfschema/cursor_by_thread_connect_attr.h index ccc232aac71..a9b8271d0b0 100644 --- a/storage/perfschema/cursor_by_thread_connect_attr.h +++ b/storage/perfschema/cursor_by_thread_connect_attr.h @@ -1,13 +1,20 @@ /* Copyright (c) 2012, 2015, 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 Foundation, diff --git a/storage/perfschema/cursor_by_user.cc b/storage/perfschema/cursor_by_user.cc index 61f16c82349..c5c4ea57c9a 100644 --- a/storage/perfschema/cursor_by_user.cc +++ b/storage/perfschema/cursor_by_user.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 diff --git a/storage/perfschema/cursor_by_user.h b/storage/perfschema/cursor_by_user.h index ed27205325f..f7e43248a6a 100644 --- a/storage/perfschema/cursor_by_user.h +++ b/storage/perfschema/cursor_by_user.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 diff --git a/storage/perfschema/ha_perfschema.cc b/storage/perfschema/ha_perfschema.cc index aa4cfda2b83..903477902fe 100644 --- a/storage/perfschema/ha_perfschema.cc +++ b/storage/perfschema/ha_perfschema.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 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 - 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 Foundation, diff --git a/storage/perfschema/ha_perfschema.h b/storage/perfschema/ha_perfschema.h index bbeac749e14..e39fcc78714 100644 --- a/storage/perfschema/ha_perfschema.h +++ b/storage/perfschema/ha_perfschema.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs.cc b/storage/perfschema/pfs.cc index 3d3ce83b01b..584d6b017a8 100644 --- a/storage/perfschema/pfs.cc +++ b/storage/perfschema/pfs.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2017, 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 Foundation, @@ -58,6 +65,8 @@ #include "pfs_program.h" #include "pfs_prepared_stmt.h" +using std::min; + /* This is a development tool to investigate memory statistics, do not use in production. @@ -2379,8 +2388,8 @@ void pfs_set_thread_account_v1(const char *user, int user_len, DBUG_ASSERT((uint) user_len <= sizeof(pfs->m_username)); DBUG_ASSERT((host != NULL) || (host_len == 0)); DBUG_ASSERT(host_len >= 0); - DBUG_ASSERT((uint) host_len <= sizeof(pfs->m_hostname)); + host_len= min<size_t>(host_len, sizeof(pfs->m_hostname)); if (unlikely(pfs == NULL)) return; @@ -2998,9 +3007,7 @@ pfs_start_table_io_wait_v1(PSI_table_locker_state *state, if (! pfs_table->m_io_enabled) return NULL; - PFS_thread *pfs_thread= pfs_table->m_thread_owner; - - DBUG_ASSERT(pfs_thread == my_thread_get_THR_PFS()); + PFS_thread *pfs_thread= my_thread_get_THR_PFS(); uint flags; ulonglong timer_start= 0; @@ -3103,7 +3110,7 @@ pfs_start_table_lock_wait_v1(PSI_table_locker_state *state, if (! pfs_table->m_lock_enabled) return NULL; - PFS_thread *pfs_thread= pfs_table->m_thread_owner; + PFS_thread *pfs_thread= my_thread_get_THR_PFS(); PFS_TL_LOCK_TYPE lock_type; @@ -3516,7 +3523,12 @@ pfs_start_socket_wait_v1(PSI_socket_locker_state *state, if (flag_thread_instrumentation) { - PFS_thread *pfs_thread= pfs_socket->m_thread_owner; + /* + Do not use pfs_socket->m_thread_owner here, + as different threads may use concurrently the same socket, + for example during a KILL. + */ + PFS_thread *pfs_thread= my_thread_get_THR_PFS(); if (unlikely(pfs_thread == NULL)) return NULL; @@ -3888,6 +3900,8 @@ void pfs_end_idle_wait_v1(PSI_idle_locker* locker) if (thread->m_flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } @@ -3972,6 +3986,8 @@ void pfs_end_mutex_wait_v1(PSI_mutex_locker* locker, int rc) if (thread->m_flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } } @@ -4051,6 +4067,8 @@ void pfs_end_rwlock_rdwait_v1(PSI_rwlock_locker* locker, int rc) if (thread->m_flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } } @@ -4128,6 +4146,8 @@ void pfs_end_rwlock_wrwait_v1(PSI_rwlock_locker* locker, int rc) if (thread->m_flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } } @@ -4192,6 +4212,8 @@ void pfs_end_cond_wait_v1(PSI_cond_locker* locker, int rc) if (thread->m_flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } } @@ -4287,6 +4309,8 @@ void pfs_end_table_io_wait_v1(PSI_table_locker* locker, ulonglong numrows) if (thread->m_flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } @@ -4356,6 +4380,8 @@ void pfs_end_table_lock_wait_v1(PSI_table_locker* locker) if (thread->m_flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } @@ -4397,9 +4423,11 @@ pfs_end_file_open_wait_v1(PSI_file_locker *locker, switch (state->m_operation) { case PSI_FILE_STAT: + case PSI_FILE_RENAME: break; case PSI_FILE_STREAM_OPEN: case PSI_FILE_CREATE: + case PSI_FILE_OPEN: if (result != NULL) { PFS_file_class *klass= reinterpret_cast<PFS_file_class*> (state->m_class); @@ -4410,7 +4438,6 @@ pfs_end_file_open_wait_v1(PSI_file_locker *locker, state->m_file= reinterpret_cast<PSI_file*> (pfs_file); } break; - case PSI_FILE_OPEN: default: DBUG_ASSERT(false); break; @@ -4628,6 +4655,8 @@ void pfs_end_file_wait_v1(PSI_file_locker *locker, if (thread->m_flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } } @@ -4716,6 +4745,31 @@ void pfs_end_file_close_wait_v1(PSI_file_locker *locker, int rc) return; } +/** + Implementation of the file instrumentation interface. + @sa PSI_v1::end_file_rename_wait. +*/ +void pfs_end_file_rename_wait_v1(PSI_file_locker *locker, const char *old_name, + const char *new_name, int rc) +{ + PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker); + DBUG_ASSERT(state != NULL); + DBUG_ASSERT(state->m_operation == PSI_FILE_RENAME); + + if (rc == 0) + { + PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread); + + uint old_len= (uint)strlen(old_name); + uint new_len= (uint)strlen(new_name); + + find_and_rename_file(thread, old_name, old_len, new_name, new_len); + } + + pfs_end_file_wait_v1(locker, 0); + return; +} + PSI_stage_progress* pfs_start_stage_v1(PSI_stage_key key, const char *src_file, int src_line) { @@ -6223,6 +6277,8 @@ void pfs_end_socket_wait_v1(PSI_socket_locker *locker, size_t byte_count) if (thread->m_flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } @@ -6365,6 +6421,26 @@ void pfs_reprepare_prepared_stmt_v1(PSI_prepared_stmt* prepared_stmt) return; } +void pfs_set_prepared_stmt_text_v1(PSI_prepared_stmt *prepared_stmt, + const char *text, + uint text_len) +{ + PFS_prepared_stmt *pfs_prepared_stmt = + reinterpret_cast<PFS_prepared_stmt *>(prepared_stmt); + DBUG_ASSERT(pfs_prepared_stmt != NULL); + + uint max_len = COL_INFO_SIZE; + if (text_len > max_len) + { + text_len = max_len; + } + + memcpy(pfs_prepared_stmt->m_sqltext, text, text_len); + pfs_prepared_stmt->m_sqltext_length = text_len; + + return; +} + /** Implementation of the thread attribute connection interface @sa PSI_v1::set_thread_connect_attr. @@ -6887,6 +6963,8 @@ pfs_end_metadata_wait_v1(PSI_metadata_locker *locker, if (thread->m_flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } else @@ -6980,6 +7058,7 @@ PSI_v1 PFS_v1= pfs_end_file_wait_v1, pfs_start_file_close_wait_v1, pfs_end_file_close_wait_v1, + pfs_end_file_rename_wait_v1, pfs_start_stage_v1, pfs_get_current_stage_progress_v1, pfs_end_stage_v1, @@ -7023,6 +7102,7 @@ PSI_v1 PFS_v1= pfs_destroy_prepared_stmt_v1, pfs_reprepare_prepared_stmt_v1, pfs_execute_prepared_stmt_v1, + pfs_set_prepared_stmt_text_v1, pfs_digest_start_v1, pfs_digest_end_v1, pfs_set_thread_connect_attrs_v1, diff --git a/storage/perfschema/pfs.h b/storage/perfschema/pfs.h index 811c27006ae..ce90745dc45 100644 --- a/storage/perfschema/pfs.h +++ b/storage/perfschema/pfs.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 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 - 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 Foundation, diff --git a/storage/perfschema/pfs_account.cc b/storage/perfschema/pfs_account.cc index e8d36f8fdb5..fe644394829 100644 --- a/storage/perfschema/pfs_account.cc +++ b/storage/perfschema/pfs_account.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/pfs_account.h b/storage/perfschema/pfs_account.h index 29382e9c8bc..4b3e30806b8 100644 --- a/storage/perfschema/pfs_account.h +++ b/storage/perfschema/pfs_account.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/pfs_atomic.h b/storage/perfschema/pfs_atomic.h index 458d627dd95..6a9f8b3cb6f 100644 --- a/storage/perfschema/pfs_atomic.h +++ b/storage/perfschema/pfs_atomic.h @@ -1,13 +1,20 @@ /* Copyright (c) 2009, 2013, 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 Foundation, diff --git a/storage/perfschema/pfs_autosize.cc b/storage/perfschema/pfs_autosize.cc index feb12f3f8c7..7ce8b400a6b 100644 --- a/storage/perfschema/pfs_autosize.cc +++ b/storage/perfschema/pfs_autosize.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2012, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_buffer_container.cc b/storage/perfschema/pfs_buffer_container.cc index dfef125faa8..cd87cb247e2 100644 --- a/storage/perfschema/pfs_buffer_container.cc +++ b/storage/perfschema/pfs_buffer_container.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2014, 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 - 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 Foundation, @@ -64,8 +71,9 @@ PFS_program_container global_program_container(& default_program_allocator); PFS_buffer_default_allocator<PFS_prepared_stmt> default_prepared_stmt_allocator(& builtin_memory_prepared_stmt); PFS_prepared_stmt_container global_prepared_stmt_container(& default_prepared_stmt_allocator); -int PFS_account_allocator::alloc_array(PFS_account_array *array, size_t size) +int PFS_account_allocator::alloc_array(PFS_account_array *array) { + size_t size= array->m_max; size_t index; size_t waits_sizing= size * wait_class_max; size_t stages_sizing= size * stage_class_max; @@ -168,8 +176,9 @@ int PFS_account_allocator::alloc_array(PFS_account_array *array, size_t size) return 0; } -void PFS_account_allocator::free_array(PFS_account_array *array, size_t size) +void PFS_account_allocator::free_array(PFS_account_array *array) { + size_t size= array->m_max; size_t waits_sizing= size * wait_class_max; size_t stages_sizing= size * stage_class_max; size_t statements_sizing= size * statement_class_max; @@ -209,8 +218,9 @@ void PFS_account_allocator::free_array(PFS_account_array *array, size_t size) PFS_account_allocator account_allocator; PFS_account_container global_account_container(& account_allocator); -int PFS_host_allocator::alloc_array(PFS_host_array *array, size_t size) +int PFS_host_allocator::alloc_array(PFS_host_array *array) { + size_t size= array->m_max; PFS_host *pfs; size_t index; size_t waits_sizing= size * wait_class_max; @@ -316,8 +326,9 @@ int PFS_host_allocator::alloc_array(PFS_host_array *array, size_t size) return 0; } -void PFS_host_allocator::free_array(PFS_host_array *array, size_t size) +void PFS_host_allocator::free_array(PFS_host_array *array) { + size_t size= array->m_max; size_t waits_sizing= size * wait_class_max; size_t stages_sizing= size * stage_class_max; size_t statements_sizing= size * statement_class_max; @@ -357,8 +368,9 @@ void PFS_host_allocator::free_array(PFS_host_array *array, size_t size) PFS_host_allocator host_allocator; PFS_host_container global_host_container(& host_allocator); -int PFS_thread_allocator::alloc_array(PFS_thread_array *array, size_t size) +int PFS_thread_allocator::alloc_array(PFS_thread_array *array) { + size_t size= array->m_max; PFS_thread *pfs; PFS_events_statements *pfs_stmt; unsigned char *pfs_tokens; @@ -614,8 +626,9 @@ int PFS_thread_allocator::alloc_array(PFS_thread_array *array, size_t size) return 0; } -void PFS_thread_allocator::free_array(PFS_thread_array *array, size_t size) +void PFS_thread_allocator::free_array(PFS_thread_array *array) { + size_t size= array->m_max; size_t waits_sizing= size * wait_class_max; size_t stages_sizing= size * stage_class_max; size_t statements_sizing= size * statement_class_max; @@ -718,8 +731,9 @@ void PFS_thread_allocator::free_array(PFS_thread_array *array, size_t size) PFS_thread_allocator thread_allocator; PFS_thread_container global_thread_container(& thread_allocator); -int PFS_user_allocator::alloc_array(PFS_user_array *array, size_t size) +int PFS_user_allocator::alloc_array(PFS_user_array *array) { + size_t size= array->m_max; PFS_user *pfs; size_t index; size_t waits_sizing= size * wait_class_max; @@ -825,8 +839,9 @@ int PFS_user_allocator::alloc_array(PFS_user_array *array, size_t size) return 0; } -void PFS_user_allocator::free_array(PFS_user_array *array, size_t size) +void PFS_user_allocator::free_array(PFS_user_array *array) { + size_t size= array->m_max; size_t waits_sizing= size * wait_class_max; size_t stages_sizing= size * stage_class_max; size_t statements_sizing= size * statement_class_max; diff --git a/storage/perfschema/pfs_buffer_container.h b/storage/perfschema/pfs_buffer_container.h index 326d4e0b676..ed1a933f545 100644 --- a/storage/perfschema/pfs_buffer_container.h +++ b/storage/perfschema/pfs_buffer_container.h @@ -1,13 +1,20 @@ /* Copyright (c) 2014, 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 - 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 Foundation, @@ -70,7 +77,7 @@ class PFS_buffer_default_array public: typedef T value_type; - value_type *allocate(pfs_dirty_state *dirty_state, size_t max) + value_type *allocate(pfs_dirty_state *dirty_state) { uint index; uint monotonic; @@ -81,11 +88,11 @@ public: return NULL; monotonic= PFS_atomic::add_u32(& m_monotonic.m_u32, 1); - monotonic_max= monotonic + max; + monotonic_max= monotonic + m_max; - do + while (monotonic < monotonic_max) { - index= monotonic % max; + index= monotonic % m_max; pfs= m_ptr + index; if (pfs->m_lock.free_to_dirty(dirty_state)) @@ -94,7 +101,6 @@ public: } monotonic= PFS_atomic::add_u32(& m_monotonic.m_u32, 1); } - while (monotonic < monotonic_max); m_full= true; return NULL; @@ -106,9 +112,20 @@ public: m_full= false; } + T* get_first() + { + return m_ptr; + } + + T* get_last() + { + return m_ptr + m_max; + } + bool m_full; PFS_cacheline_uint32 m_monotonic; T * m_ptr; + size_t m_max; /** Container. */ PFS_opaque_container *m_container; }; @@ -123,16 +140,16 @@ public: : m_builtin_class(klass) {} - int alloc_array(array_type *array, size_t size) + int alloc_array(array_type *array) { array->m_ptr= NULL; array->m_full= true; array->m_monotonic.m_u32= 0; - if (size > 0) + if (array->m_max > 0) { array->m_ptr= PFS_MALLOC_ARRAY(m_builtin_class, - size, sizeof(T), T, MYF(MY_ZEROFILL)); + array->m_max, sizeof(T), T, MYF(MY_ZEROFILL)); if (array->m_ptr == NULL) return 1; array->m_full= false; @@ -140,10 +157,12 @@ public: return 0; } - void free_array(array_type *array, size_t size) + void free_array(array_type *array) { + DBUG_ASSERT(array->m_max > 0); + PFS_FREE_ARRAY(m_builtin_class, - size, sizeof(T), array->m_ptr); + array->m_max, sizeof(T), array->m_ptr); array->m_ptr= NULL; } @@ -171,6 +190,7 @@ public: { m_array.m_full= true; m_array.m_ptr= NULL; + m_array.m_max= 0; m_array.m_monotonic.m_u32= 0; m_lost= 0; m_max= 0; @@ -181,10 +201,11 @@ public: { if (max_size > 0) { - int rc= m_allocator->alloc_array(& m_array, max_size); + m_array.m_max= max_size; + int rc= m_allocator->alloc_array(& m_array); if (rc != 0) { - m_allocator->free_array(& m_array, max_size); + m_allocator->free_array(& m_array); return 1; } m_max= max_size; @@ -195,7 +216,7 @@ public: void cleanup() { - m_allocator->free_array(& m_array, m_max); + m_allocator->free_array(& m_array); } ulong get_row_count() const @@ -244,8 +265,8 @@ public: void apply(function_type fct) { - value_type *pfs= m_array.m_ptr; - value_type *pfs_last= pfs + m_max; + value_type *pfs= m_array.get_first(); + value_type *pfs_last= m_array.get_last(); while (pfs < pfs_last) { @@ -259,8 +280,8 @@ public: void apply_all(function_type fct) { - value_type *pfs= m_array.m_ptr; - value_type *pfs_last= pfs + m_max; + value_type *pfs= m_array.get_first(); + value_type *pfs_last= m_array.get_last(); while (pfs < pfs_last) { @@ -271,8 +292,8 @@ public: void apply(processor_type & proc) { - value_type *pfs= m_array.m_ptr; - value_type *pfs_last= pfs + m_max; + value_type *pfs= m_array.get_first(); + value_type *pfs_last= m_array.get_last(); while (pfs < pfs_last) { @@ -286,8 +307,8 @@ public: void apply_all(processor_type & proc) { - value_type *pfs= m_array.m_ptr; - value_type *pfs_last= pfs + m_max; + value_type *pfs= m_array.get_first(); + value_type *pfs_last= m_array.get_last(); while (pfs < pfs_last) { @@ -324,8 +345,8 @@ public: value_type *sanitize(value_type *unsafe) { intptr offset; - value_type *pfs= m_array.m_ptr; - value_type *pfs_last= pfs + m_max; + value_type *pfs= m_array.get_first(); + value_type *pfs_last= m_array.get_last(); if ((pfs <= unsafe) && (unsafe < pfs_last)) @@ -345,9 +366,9 @@ private: { DBUG_ASSERT(index <= m_max); - value_type *pfs_first= m_array.m_ptr; + value_type *pfs_first= m_array.get_first(); value_type *pfs= pfs_first + index; - value_type *pfs_last= pfs_first + m_max; + value_type *pfs_last= m_array.get_last(); while (pfs < pfs_last) { @@ -459,6 +480,7 @@ public: } DBUG_ASSERT(m_max_page_count <= PFS_PAGE_COUNT); + DBUG_ASSERT(0 < m_last_page_size); DBUG_ASSERT(m_last_page_size <= PFS_PAGE_SIZE); native_mutex_init(& m_critical_section, NULL); @@ -480,7 +502,7 @@ public: page= m_pages[i]; if (page != NULL) { - m_allocator->free_array(page, PFS_PAGE_SIZE); + m_allocator->free_array(page); delete page; m_pages[i]= NULL; } @@ -521,7 +543,6 @@ public: uint monotonic; uint monotonic_max; uint current_page_count; - uint page_logical_size; value_type *pfs; array_type *array; @@ -555,8 +576,7 @@ public: if (array != NULL) { - page_logical_size= get_page_logical_size(index); - pfs= array->allocate(dirty_state, page_logical_size); + pfs= array->allocate(dirty_state); if (pfs != NULL) { /* Keep a pointer to the parent page, for deallocate(). */ @@ -642,10 +662,11 @@ public: array= new array_type(); builtin_memory_scalable_buffer.count_alloc(sizeof (array_type)); - int rc= m_allocator->alloc_array(array, PFS_PAGE_SIZE); + array->m_max= get_page_logical_size(current_page_count); + int rc= m_allocator->alloc_array(array); if (rc != 0) { - m_allocator->free_array(array, PFS_PAGE_SIZE); + m_allocator->free_array(array); delete array; builtin_memory_scalable_buffer.count_free(sizeof (array_type)); m_lost++; @@ -672,8 +693,7 @@ public: } DBUG_ASSERT(array != NULL); - page_logical_size= get_page_logical_size(current_page_count); - pfs= array->allocate(dirty_state, page_logical_size); + pfs= array->allocate(dirty_state); if (pfs != NULL) { /* Keep a pointer to the parent page, for deallocate(). */ @@ -749,8 +769,8 @@ public: page= m_pages[i]; if (page != NULL) { - pfs= page->m_ptr; - pfs_last= pfs + PFS_PAGE_SIZE; + pfs= page->get_first(); + pfs_last= page->get_last(); while (pfs < pfs_last) { @@ -776,8 +796,8 @@ public: page= m_pages[i]; if (page != NULL) { - pfs= page->m_ptr; - pfs_last= pfs + PFS_PAGE_SIZE; + pfs= page->get_first(); + pfs_last= page->get_last(); while (pfs < pfs_last) { @@ -800,8 +820,8 @@ public: page= m_pages[i]; if (page != NULL) { - pfs= page->m_ptr; - pfs_last= pfs + PFS_PAGE_SIZE; + pfs= page->get_first(); + pfs_last= page->get_last(); while (pfs < pfs_last) { @@ -827,8 +847,8 @@ public: page= m_pages[i]; if (page != NULL) { - pfs= page->m_ptr; - pfs_last= pfs + PFS_PAGE_SIZE; + pfs= page->get_first(); + pfs_last= page->get_last(); while (pfs < pfs_last) { @@ -848,6 +868,12 @@ public: if (page != NULL) { uint index_2= index % PFS_PAGE_SIZE; + + if (index_2 >= page->m_max) + { + return NULL; + } + value_type *pfs= page->m_ptr + index_2; if (pfs->m_lock.is_populated()) @@ -876,8 +902,15 @@ public: return NULL; } - *has_more= true; uint index_2= index % PFS_PAGE_SIZE; + + if (index_2 >= page->m_max) + { + *has_more= false; + return NULL; + } + + *has_more= true; value_type *pfs= page->m_ptr + index_2; if (pfs->m_lock.is_populated()) @@ -901,8 +934,8 @@ public: page= m_pages[i]; if (page != NULL) { - pfs= page->m_ptr; - pfs_last= pfs + PFS_PAGE_SIZE; + pfs= page->get_first(); + pfs_last= page->get_last(); if ((pfs <= unsafe) && (unsafe < pfs_last)) @@ -925,6 +958,7 @@ private: { if (page_index + 1 < m_max_page_count) return PFS_PAGE_SIZE; + DBUG_ASSERT(page_index + 1 == m_max_page_count); return m_last_page_size; } @@ -939,7 +973,7 @@ private: value_type *pfs; value_type *pfs_last; - do + while (index_1 < PFS_PAGE_COUNT) { page= m_pages[index_1]; @@ -949,9 +983,9 @@ private: return NULL; } - pfs_first= page->m_ptr; + pfs_first= page->get_first(); pfs= pfs_first + index_2; - pfs_last= pfs_first + PFS_PAGE_SIZE; + pfs_last= page->get_last(); while (pfs < pfs_last) { @@ -968,7 +1002,6 @@ private: index_1++; index_2= 0; } - while (index_1 < PFS_PAGE_COUNT); index= m_max; return NULL; @@ -1277,7 +1310,7 @@ private: value_type *record= NULL; DBUG_ASSERT(partition_index < PFS_PARTITION_COUNT); - do + while (partition_index < PFS_PARTITION_COUNT) { sub_iterator_type sub_iterator= m_partitions[partition_index]->iterate(sub_index); record= sub_iterator.scan_next(found_sub_index); @@ -1291,7 +1324,6 @@ private: partition_index++; sub_index= 0; } - while (partition_index < PFS_PARTITION_COUNT); *found_partition= PFS_PARTITION_COUNT; *found_sub_index= 0; @@ -1366,7 +1398,7 @@ typedef PFS_cond_container::iterator_type PFS_cond_iterator; extern PFS_cond_container global_cond_container; #ifdef USE_SCALABLE -typedef PFS_buffer_scalable_container<PFS_file, 1024, 1024> PFS_file_container; +typedef PFS_buffer_scalable_container<PFS_file, 4 * 1024, 4 * 1024> PFS_file_container; #else typedef PFS_buffer_container<PFS_file> PFS_file_container; #endif @@ -1414,7 +1446,7 @@ typedef PFS_table_container::iterator_type PFS_table_iterator; extern PFS_table_container global_table_container; #ifdef USE_SCALABLE -typedef PFS_buffer_scalable_container<PFS_table_share, 1024, 1024> PFS_table_share_container; +typedef PFS_buffer_scalable_container<PFS_table_share, 4 * 1024, 4 * 1024> PFS_table_share_container; #else typedef PFS_buffer_container<PFS_table_share> PFS_table_share_container; #endif @@ -1422,7 +1454,7 @@ typedef PFS_table_share_container::iterator_type PFS_table_share_iterator; extern PFS_table_share_container global_table_share_container; #ifdef USE_SCALABLE -typedef PFS_buffer_scalable_container<PFS_table_share_index, 1024, 1024> PFS_table_share_index_container; +typedef PFS_buffer_scalable_container<PFS_table_share_index, 8 * 1024, 8 * 1024> PFS_table_share_index_container; #else typedef PFS_buffer_container<PFS_table_share_index> PFS_table_share_index_container; #endif @@ -1430,7 +1462,7 @@ typedef PFS_table_share_index_container::iterator_type PFS_table_share_index_ite extern PFS_table_share_index_container global_table_share_index_container; #ifdef USE_SCALABLE -typedef PFS_buffer_scalable_container<PFS_table_share_lock, 1024, 1024> PFS_table_share_lock_container; +typedef PFS_buffer_scalable_container<PFS_table_share_lock, 4 * 1024, 4 * 1024> PFS_table_share_lock_container; #else typedef PFS_buffer_container<PFS_table_share_lock> PFS_table_share_lock_container; #endif @@ -1466,8 +1498,8 @@ public: class PFS_account_allocator { public: - int alloc_array(PFS_account_array *array, size_t size); - void free_array(PFS_account_array *array, size_t size); + int alloc_array(PFS_account_array *array); + void free_array(PFS_account_array *array); }; #ifdef USE_SCALABLE @@ -1497,8 +1529,8 @@ public: class PFS_host_allocator { public: - int alloc_array(PFS_host_array *array, size_t size); - void free_array(PFS_host_array *array, size_t size); + int alloc_array(PFS_host_array *array); + void free_array(PFS_host_array *array); }; #ifdef USE_SCALABLE @@ -1540,8 +1572,8 @@ public: class PFS_thread_allocator { public: - int alloc_array(PFS_thread_array *array, size_t size); - void free_array(PFS_thread_array *array, size_t size); + int alloc_array(PFS_thread_array *array); + void free_array(PFS_thread_array *array); }; #ifdef USE_SCALABLE @@ -1571,8 +1603,8 @@ public: class PFS_user_allocator { public: - int alloc_array(PFS_user_array *array, size_t size); - void free_array(PFS_user_array *array, size_t size); + int alloc_array(PFS_user_array *array); + void free_array(PFS_user_array *array); }; #ifdef USE_SCALABLE diff --git a/storage/perfschema/pfs_builtin_memory.cc b/storage/perfschema/pfs_builtin_memory.cc index 461952e49b4..6955f1a8ec3 100644 --- a/storage/perfschema/pfs_builtin_memory.cc +++ b/storage/perfschema/pfs_builtin_memory.cc @@ -1,19 +1,27 @@ -/* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2014, 2019, 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 Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ #include "my_global.h" +#include "m_string.h" #include "pfs_global.h" #include "pfs_builtin_memory.h" @@ -108,7 +116,8 @@ static void init_builtin_memory_class(PFS_builtin_memory_class *klass, const cha klass->m_class.m_timed= false; /* Immutable */ klass->m_class.m_flags= PSI_FLAG_GLOBAL; klass->m_class.m_event_name_index= 0; - strncpy(klass->m_class.m_name, name, sizeof(klass->m_class.m_name)); + my_snprintf(klass->m_class.m_name, sizeof(klass->m_class.m_name), "%.*s", + PFS_MAX_INFO_NAME_LENGTH - 1, name); klass->m_class.m_name_length= strlen(name); DBUG_ASSERT(klass->m_class.m_name_length < sizeof(klass->m_class.m_name)); klass->m_class.m_timer= NULL; diff --git a/storage/perfschema/pfs_builtin_memory.h b/storage/perfschema/pfs_builtin_memory.h index 07e9e598a8a..1c00275d5b9 100644 --- a/storage/perfschema/pfs_builtin_memory.h +++ b/storage/perfschema/pfs_builtin_memory.h @@ -1,13 +1,20 @@ /* Copyright (c) 2014, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_check.cc b/storage/perfschema/pfs_check.cc index 9ab1650cb69..6496bf2f745 100644 --- a/storage/perfschema/pfs_check.cc +++ b/storage/perfschema/pfs_check.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2009, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_column_types.h b/storage/perfschema/pfs_column_types.h index 0020a79c3ce..cef9fcc4588 100644 --- a/storage/perfschema/pfs_column_types.h +++ b/storage/perfschema/pfs_column_types.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_column_values.cc b/storage/perfschema/pfs_column_values.cc index 82ed1020ddd..8372cb95efe 100644 --- a/storage/perfschema/pfs_column_values.cc +++ b/storage/perfschema/pfs_column_values.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_column_values.h b/storage/perfschema/pfs_column_values.h index 2dc778c1c5c..c730e6cb2d2 100644 --- a/storage/perfschema/pfs_column_values.h +++ b/storage/perfschema/pfs_column_values.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_con_slice.cc b/storage/perfschema/pfs_con_slice.cc index e3523863776..b6774f652c3 100644 --- a/storage/perfschema/pfs_con_slice.cc +++ b/storage/perfschema/pfs_con_slice.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/pfs_con_slice.h b/storage/perfschema/pfs_con_slice.h index f7362892189..149f7ea6845 100644 --- a/storage/perfschema/pfs_con_slice.h +++ b/storage/perfschema/pfs_con_slice.h @@ -1,13 +1,20 @@ /* 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 - 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 diff --git a/storage/perfschema/pfs_defaults.cc b/storage/perfschema/pfs_defaults.cc index 283c678e00f..bd6a9aab7fa 100644 --- a/storage/perfschema/pfs_defaults.cc +++ b/storage/perfschema/pfs_defaults.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_defaults.h b/storage/perfschema/pfs_defaults.h index bbb041504e2..7a3168cbc51 100644 --- a/storage/perfschema/pfs_defaults.h +++ b/storage/perfschema/pfs_defaults.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, 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 Foundation, diff --git a/storage/perfschema/pfs_digest.cc b/storage/perfschema/pfs_digest.cc index ccf20da411b..5e6131da712 100644 --- a/storage/perfschema/pfs_digest.cc +++ b/storage/perfschema/pfs_digest.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2017, 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 Foundation, @@ -47,7 +54,7 @@ bool flag_statements_digest= true; Current index in Stat array where new record is to be inserted. index 0 is reserved for "all else" case when entire array is full. */ -static PFS_ALIGNED PFS_cacheline_uint32 digest_index; +static PFS_ALIGNED PFS_cacheline_uint32 digest_monotonic_index; bool digest_full= false; LF_HASH digest_hash; @@ -65,7 +72,7 @@ int init_digest(const PFS_global_param *param) */ digest_max= param->m_digest_sizing; digest_lost= 0; - digest_index.m_u32= 1; + PFS_atomic::store_u32(& digest_monotonic_index.m_u32, 1); digest_full= false; if (digest_max == 0) @@ -108,6 +115,9 @@ int init_digest(const PFS_global_param *param) + index * pfs_max_digest_length, pfs_max_digest_length); } + /* Set record[0] as allocated. */ + statements_digest_stat_array[0].m_lock.set_allocated(); + return 0; } @@ -216,11 +226,13 @@ find_or_create_digest(PFS_thread *thread, memcpy(hash_key.m_schema_name, schema_name, schema_name_length); int res; - size_t safe_index; uint retry_count= 0; const uint retry_max= 3; + size_t safe_index; + size_t attempts= 0; PFS_statements_digest_stat **entry; PFS_statements_digest_stat *pfs= NULL; + pfs_dirty_state dirty_state; ulonglong now= my_micro_time(); @@ -254,55 +266,71 @@ search: return & pfs->m_stat; } - safe_index= PFS_atomic::add_u32(& digest_index.m_u32, 1); - if (safe_index >= digest_max) + while (++attempts <= digest_max) { - /* The digest array is now full. */ - digest_full= true; - pfs= &statements_digest_stat_array[0]; - - if (pfs->m_first_seen == 0) - pfs->m_first_seen= now; - pfs->m_last_seen= now; - return & pfs->m_stat; - } - - /* Add a new record in digest stat array. */ - pfs= &statements_digest_stat_array[safe_index]; - - /* Copy digest hash/LF Hash search key. */ - memcpy(& pfs->m_digest_key, &hash_key, sizeof(PFS_digest_key)); - - /* - Copy digest storage to statement_digest_stat_array so that it could be - used later to generate digest text. - */ - pfs->m_digest_storage.copy(digest_storage); - - pfs->m_first_seen= now; - pfs->m_last_seen= now; + safe_index= PFS_atomic::add_u32(& digest_monotonic_index.m_u32, 1) % digest_max; + if (safe_index == 0) + { + /* Record [0] is reserved. */ + continue; + } - res= lf_hash_insert(&digest_hash, pins, &pfs); - if (likely(res == 0)) - { - return & pfs->m_stat; - } + /* Add a new record in digest stat array. */ + DBUG_ASSERT(safe_index < digest_max); + pfs= &statements_digest_stat_array[safe_index]; - if (res > 0) - { - /* Duplicate insert by another thread */ - if (++retry_count > retry_max) + if (pfs->m_lock.is_free()) { - /* Avoid infinite loops */ - digest_lost++; - return NULL; + if (pfs->m_lock.free_to_dirty(& dirty_state)) + { + /* Copy digest hash/LF Hash search key. */ + memcpy(& pfs->m_digest_key, &hash_key, sizeof(PFS_digest_key)); + + /* + Copy digest storage to statement_digest_stat_array so that it could be + used later to generate digest text. + */ + pfs->m_digest_storage.copy(digest_storage); + + pfs->m_first_seen= now; + pfs->m_last_seen= now; + + res= lf_hash_insert(&digest_hash, pins, &pfs); + if (likely(res == 0)) + { + pfs->m_lock.dirty_to_allocated(& dirty_state); + return & pfs->m_stat; + } + + pfs->m_lock.dirty_to_free(& dirty_state); + + if (res > 0) + { + /* Duplicate insert by another thread */ + if (++retry_count > retry_max) + { + /* Avoid infinite loops */ + digest_lost++; + return NULL; + } + goto search; + } + + /* OOM in lf_hash_insert */ + digest_lost++; + return NULL; + } } - goto search; } - /* OOM in lf_hash_insert */ - digest_lost++; - return NULL; + /* The digest array is now full. */ + digest_full= true; + pfs= &statements_digest_stat_array[0]; + + if (pfs->m_first_seen == 0) + pfs->m_first_seen= now; + pfs->m_last_seen= now; + return & pfs->m_stat; } void purge_digest(PFS_thread* thread, PFS_digest_key *hash_key) @@ -329,10 +357,13 @@ void purge_digest(PFS_thread* thread, PFS_digest_key *hash_key) void PFS_statements_digest_stat::reset_data(unsigned char *token_array, size_t length) { + pfs_dirty_state dirty_state; + m_lock.set_dirty(& dirty_state); m_digest_storage.reset(token_array, length); m_stat.reset(); m_first_seen= 0; m_last_seen= 0; + m_lock.dirty_to_free(& dirty_state); } void PFS_statements_digest_stat::reset_index(PFS_thread *thread) @@ -362,11 +393,14 @@ void reset_esms_by_digest() statements_digest_stat_array[index].reset_data(statements_digest_token_array + index * pfs_max_digest_length, pfs_max_digest_length); } + /* Mark record[0] as allocated again. */ + statements_digest_stat_array[0].m_lock.set_allocated(); + /* Reset index which indicates where the next calculated digest information to be inserted in statements_digest_stat_array. */ - digest_index.m_u32= 1; + PFS_atomic::store_u32(& digest_monotonic_index.m_u32, 1); digest_full= false; } diff --git a/storage/perfschema/pfs_digest.h b/storage/perfschema/pfs_digest.h index 1f760c6dc24..a4aed040fa6 100644 --- a/storage/perfschema/pfs_digest.h +++ b/storage/perfschema/pfs_digest.h @@ -1,13 +1,20 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 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 - 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 Foundation, @@ -44,6 +51,9 @@ struct PFS_digest_key /** A statement digest stat record. */ struct PFS_ALIGNED PFS_statements_digest_stat { + /** Internal lock. */ + pfs_lock m_lock; + /** Digest Schema + MD5 Hash. */ PFS_digest_key m_digest_key; diff --git a/storage/perfschema/pfs_engine_table.cc b/storage/perfschema/pfs_engine_table.cc index f16d84adac7..2d0c38d366c 100644 --- a/storage/perfschema/pfs_engine_table.cc +++ b/storage/perfschema/pfs_engine_table.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2019, 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 Foundation, @@ -680,6 +687,16 @@ void PFS_engine_table::set_field_char_utf8(Field *f, const char* str, f2->store(str, len, &my_charset_utf8_bin); } +void PFS_engine_table::set_field_varchar(Field *f, + const CHARSET_INFO *cs, + const char* str, + uint len) +{ + DBUG_ASSERT(f->real_type() == MYSQL_TYPE_VARCHAR); + Field_varstring *f2= (Field_varstring*) f; + f2->store(str, len, cs); +} + void PFS_engine_table::set_field_varchar_utf8(Field *f, const char* str, uint len) { @@ -828,6 +845,31 @@ void initialize_performance_schema_acl(bool bootstrap) } } +static bool allow_drop_table_privilege() { + /* + The same DROP_ACL privilege is used for different statements, + in particular: + - TRUNCATE TABLE + - DROP TABLE + - ALTER TABLE + Here, we want to prevent DROP / ALTER while allowing TRUNCATE. + Note that we must also allow GRANT to transfer the truncate privilege. + */ + THD *thd= current_thd; + if (thd == NULL) { + return false; + } + + DBUG_ASSERT(thd->lex != NULL); + if ((thd->lex->sql_command != SQLCOM_TRUNCATE) && + (thd->lex->sql_command != SQLCOM_GRANT)) { + return false; + } + + return true; +} + + PFS_readonly_acl pfs_readonly_acl; ACL_internal_access_result @@ -851,7 +893,10 @@ PFS_readonly_world_acl::check(ulong want_access, ulong *save_priv) const { ACL_internal_access_result res= PFS_readonly_acl::check(want_access, save_priv); if (res == ACL_INTERNAL_ACCESS_CHECK_GRANT) - res= ACL_INTERNAL_ACCESS_GRANTED; + { + if (want_access == SELECT_ACL) + res= ACL_INTERNAL_ACCESS_GRANTED; + } return res; } @@ -879,7 +924,15 @@ PFS_truncatable_world_acl::check(ulong want_access, ulong *save_priv) const { ACL_internal_access_result res= PFS_truncatable_acl::check(want_access, save_priv); if (res == ACL_INTERNAL_ACCESS_CHECK_GRANT) - res= ACL_INTERNAL_ACCESS_GRANTED; + { + if (want_access == DROP_ACL) + { + if (allow_drop_table_privilege()) + res= ACL_INTERNAL_ACCESS_GRANTED; + } + else if (want_access == SELECT_ACL) + res= ACL_INTERNAL_ACCESS_GRANTED; + } return res; } diff --git a/storage/perfschema/pfs_engine_table.h b/storage/perfschema/pfs_engine_table.h index 280551df4d3..8ddb3a34c69 100644 --- a/storage/perfschema/pfs_engine_table.h +++ b/storage/perfschema/pfs_engine_table.h @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 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 - 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 Foundation, @@ -154,6 +161,14 @@ public: /** Helper, assign a value to a varchar utf8 field. @param f the field to set + @param cs the string character set + @param str the string to assign + @param len the length of the string to assign + */ + static void set_field_varchar(Field *f, const CHARSET_INFO *cs, const char *str, uint len); + /** + Helper, assign a value to a varchar utf8 field. + @param f the field to set @param str the string to assign @param len the length of the string to assign */ diff --git a/storage/perfschema/pfs_events.h b/storage/perfschema/pfs_events.h index 454fea195fd..c908f24b33f 100644 --- a/storage/perfschema/pfs_events.h +++ b/storage/perfschema/pfs_events.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/pfs_events_stages.cc b/storage/perfschema/pfs_events_stages.cc index a777a06bfa1..1b42df5164b 100644 --- a/storage/perfschema/pfs_events_stages.cc +++ b/storage/perfschema/pfs_events_stages.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_events_stages.h b/storage/perfschema/pfs_events_stages.h index f51904f0338..2ca521bada8 100644 --- a/storage/perfschema/pfs_events_stages.h +++ b/storage/perfschema/pfs_events_stages.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/pfs_events_statements.cc b/storage/perfschema/pfs_events_statements.cc index d755f72f6d9..f8324006c2c 100644 --- a/storage/perfschema/pfs_events_statements.cc +++ b/storage/perfschema/pfs_events_statements.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_events_statements.h b/storage/perfschema/pfs_events_statements.h index 9815e02305f..27894708a39 100644 --- a/storage/perfschema/pfs_events_statements.h +++ b/storage/perfschema/pfs_events_statements.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/pfs_events_transactions.cc b/storage/perfschema/pfs_events_transactions.cc index d6906ec73b2..884234913e8 100644 --- a/storage/perfschema/pfs_events_transactions.cc +++ b/storage/perfschema/pfs_events_transactions.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2013, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_events_transactions.h b/storage/perfschema/pfs_events_transactions.h index 7edea1821df..25c15e379b9 100644 --- a/storage/perfschema/pfs_events_transactions.h +++ b/storage/perfschema/pfs_events_transactions.h @@ -1,13 +1,20 @@ /* Copyright (c) 2013, 2015, 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 diff --git a/storage/perfschema/pfs_events_waits.cc b/storage/perfschema/pfs_events_waits.cc index 18f2c9f5527..3e6e0dddff4 100644 --- a/storage/perfschema/pfs_events_waits.cc +++ b/storage/perfschema/pfs_events_waits.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_events_waits.h b/storage/perfschema/pfs_events_waits.h index 4b39994bf75..d79b310073e 100644 --- a/storage/perfschema/pfs_events_waits.h +++ b/storage/perfschema/pfs_events_waits.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_global.cc b/storage/perfschema/pfs_global.cc index 6ffc4a38ef7..b79c6623be1 100644 --- a/storage/perfschema/pfs_global.cc +++ b/storage/perfschema/pfs_global.cc @@ -1,13 +1,21 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2017, 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 Foundation, @@ -22,6 +30,7 @@ #include "my_sys.h" #include "pfs_global.h" #include "pfs_builtin_memory.h" +#include "log.h" #include <stdlib.h> #include <string.h> @@ -129,11 +138,23 @@ void *pfs_malloc_array(PFS_builtin_memory_class *klass, size_t n, size_t size, m DBUG_ASSERT(klass != NULL); DBUG_ASSERT(n > 0); DBUG_ASSERT(size > 0); + void *ptr= NULL; size_t array_size= n * size; /* Check for overflow before allocating. */ if (is_overflow(array_size, n, size)) + { + sql_print_warning("Failed to allocate memory for %zu chunks each of size " + "%zu for buffer '%s' due to overflow", n, size, + klass->m_class.m_name); return NULL; - return pfs_malloc(klass, array_size, flags); + } + + if(NULL == (ptr= pfs_malloc(klass, array_size, flags))) + { + sql_print_warning("Failed to allocate %zu bytes for buffer '%s' due to " + "out-of-memory", array_size, klass->m_class.m_name); + } + return ptr; } /** @@ -242,4 +263,3 @@ uint pfs_get_socket_address(char *host, /* Return actual IP address string length */ return (strlen((const char*)host)); } - diff --git a/storage/perfschema/pfs_global.h b/storage/perfschema/pfs_global.h index 31a385c5aef..dd47e90f1db 100644 --- a/storage/perfschema/pfs_global.h +++ b/storage/perfschema/pfs_global.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_host.cc b/storage/perfschema/pfs_host.cc index fd08b5c6cd8..d5a39e8888d 100644 --- a/storage/perfschema/pfs_host.cc +++ b/storage/perfschema/pfs_host.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 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 @@ -274,11 +281,7 @@ void PFS_host::aggregate_memory(bool alive) void PFS_host::aggregate_status() { - /* - Aggregate STATUS_BY_HOST to: - - GLOBAL_STATUS - */ - m_status_stats.aggregate_to(& global_status_var); + /* No parent to aggregate to, clean the stats */ m_status_stats.reset(); } diff --git a/storage/perfschema/pfs_host.h b/storage/perfschema/pfs_host.h index 10dfdef0c6c..7f601381de6 100644 --- a/storage/perfschema/pfs_host.h +++ b/storage/perfschema/pfs_host.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/pfs_instr.cc b/storage/perfschema/pfs_instr.cc index cf31d6730a1..1c8f554c396 100644 --- a/storage/perfschema/pfs_instr.cc +++ b/storage/perfschema/pfs_instr.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 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 Foundation, @@ -864,7 +871,7 @@ search: pfs->m_class= klass; pfs->m_enabled= klass->m_enabled && flag_global_instrumentation; pfs->m_timed= klass->m_timed; - strncpy(pfs->m_filename, normalized_filename, normalized_length); + memcpy(pfs->m_filename, normalized_filename, normalized_length); pfs->m_filename[normalized_length]= '\0'; pfs->m_filename_length= normalized_length; pfs->m_file_stat.m_open_count= 1; @@ -906,6 +913,156 @@ search: } /** + Find a file instrumentation instance by name, and rename it + @param thread the executing instrumented thread + @param old_filename the file to be renamed + @param old_len the length in bytes of the old filename + @param new_filename the new file name + @param new_len the length in bytes of the new filename +*/ +void find_and_rename_file(PFS_thread *thread, const char *old_filename, + uint old_len, const char *new_filename, uint new_len) +{ + PFS_file *pfs; + + DBUG_ASSERT(thread != NULL); + + LF_PINS *pins= get_filename_hash_pins(thread); + if (unlikely(pins == NULL)) + { + global_file_container.m_lost++; + return; + } + + /* + Normalize the old file name. + */ + char safe_buffer[FN_REFLEN]; + const char *safe_filename; + + if (old_len >= FN_REFLEN) + { + memcpy(safe_buffer, old_filename, FN_REFLEN - 1); + safe_buffer[FN_REFLEN - 1]= 0; + safe_filename= safe_buffer; + } + else + safe_filename= old_filename; + + char buffer[FN_REFLEN]; + char dirbuffer[FN_REFLEN]; + size_t dirlen; + const char *normalized_filename; + uint normalized_length; + + dirlen= dirname_length(safe_filename); + if (dirlen == 0) + { + dirbuffer[0]= FN_CURLIB; + dirbuffer[1]= FN_LIBCHAR; + dirbuffer[2]= '\0'; + } + else + { + memcpy(dirbuffer, safe_filename, dirlen); + dirbuffer[dirlen]= '\0'; + } + + if (my_realpath(buffer, dirbuffer, MYF(0)) != 0) + { + global_file_container.m_lost++; + return; + } + + /* Append the unresolved file name to the resolved path */ + char *ptr= buffer + strlen(buffer); + char *buf_end= &buffer[sizeof(buffer)-1]; + if ((buf_end > ptr) && (*(ptr-1) != FN_LIBCHAR)) + *ptr++= FN_LIBCHAR; + if (buf_end > ptr) + strncpy(ptr, safe_filename + dirlen, buf_end - ptr); + *buf_end= '\0'; + + normalized_filename= buffer; + normalized_length= (uint)strlen(normalized_filename); + + PFS_file **entry; + entry= reinterpret_cast<PFS_file**> + (lf_hash_search(&filename_hash, pins, + normalized_filename, normalized_length)); + + if (entry && (entry != MY_ERRPTR)) + pfs= *entry; + else + { + lf_hash_search_unpin(pins); + return; + } + + lf_hash_delete(&filename_hash, pins, + pfs->m_filename, pfs->m_filename_length); + + /* + Normalize the new file name. + */ + if (new_len >= FN_REFLEN) + { + memcpy(safe_buffer, new_filename, FN_REFLEN - 1); + safe_buffer[FN_REFLEN - 1]= 0; + safe_filename= safe_buffer; + } + else + safe_filename= new_filename; + + dirlen= dirname_length(safe_filename); + if (dirlen == 0) + { + dirbuffer[0]= FN_CURLIB; + dirbuffer[1]= FN_LIBCHAR; + dirbuffer[2]= '\0'; + } + else + { + memcpy(dirbuffer, safe_filename, dirlen); + dirbuffer[dirlen]= '\0'; + } + + if (my_realpath(buffer, dirbuffer, MYF(0)) != 0) + { + global_file_container.m_lost++; + return; + } + + /* Append the unresolved file name to the resolved path */ + ptr= buffer + strlen(buffer); + buf_end= &buffer[sizeof(buffer)-1]; + if ((buf_end > ptr) && (*(ptr-1) != FN_LIBCHAR)) + *ptr++= FN_LIBCHAR; + if (buf_end > ptr) + strncpy(ptr, safe_filename + dirlen, buf_end - ptr); + *buf_end= '\0'; + + normalized_filename= buffer; + normalized_length= (uint)strlen(normalized_filename); + + memcpy(pfs->m_filename, normalized_filename, normalized_length); + pfs->m_filename[normalized_length]= '\0'; + pfs->m_filename_length= normalized_length; + + int res; + res= lf_hash_insert(&filename_hash, pins, &pfs); + + if (likely(res == 0)) + return; + else + { + global_file_container.deallocate(pfs); + global_file_container.m_lost++; + return; + } +} + +/** Release instrumentation for a file instance. @param pfs the file to release */ diff --git a/storage/perfschema/pfs_instr.h b/storage/perfschema/pfs_instr.h index 8741375e62e..a90e17983b6 100644 --- a/storage/perfschema/pfs_instr.h +++ b/storage/perfschema/pfs_instr.h @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2017, 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 Foundation, @@ -670,6 +677,9 @@ void destroy_thread(PFS_thread *pfs); PFS_file* find_or_create_file(PFS_thread *thread, PFS_file_class *klass, const char *filename, uint len, bool create); +void find_and_rename_file(PFS_thread *thread, const char *old_filename, + uint old_len, const char *new_filename, + uint new_len); void release_file(PFS_file *pfs); void destroy_file(PFS_thread *thread, PFS_file *pfs); diff --git a/storage/perfschema/pfs_instr_class.cc b/storage/perfschema/pfs_instr_class.cc index 35631bb2ea9..54046d52b70 100644 --- a/storage/perfschema/pfs_instr_class.cc +++ b/storage/perfschema/pfs_instr_class.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 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 Foundation, @@ -999,7 +1006,7 @@ static void init_instr_class(PFS_instr_class *klass, { DBUG_ASSERT(name_length <= PFS_MAX_INFO_NAME_LENGTH); memset(klass, 0, sizeof(PFS_instr_class)); - strncpy(klass->m_name, name, name_length); + memcpy(klass->m_name, name, name_length); klass->m_name_length= name_length; klass->m_flags= flags; klass->m_enabled= true; diff --git a/storage/perfschema/pfs_instr_class.h b/storage/perfschema/pfs_instr_class.h index 10339d937d0..20869e14eae 100644 --- a/storage/perfschema/pfs_instr_class.h +++ b/storage/perfschema/pfs_instr_class.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 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 - 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 Foundation, diff --git a/storage/perfschema/pfs_lock.h b/storage/perfschema/pfs_lock.h index c179d524935..e6d40d173d5 100644 --- a/storage/perfschema/pfs_lock.h +++ b/storage/perfschema/pfs_lock.h @@ -1,13 +1,20 @@ -/* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2009, 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 - 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 Foundation, @@ -207,6 +214,20 @@ struct pfs_lock } /** + Initialize a lock to dirty. + */ + void set_dirty(pfs_dirty_state *copy_ptr) + { + /* Do not set the version to 0, read the previous value. */ + uint32 copy= PFS_atomic::load_u32(&m_version_state); + /* Increment the version, set the DIRTY state */ + uint32 new_val= (copy & VERSION_MASK) + VERSION_INC + PFS_LOCK_DIRTY; + PFS_atomic::store_u32(&m_version_state, new_val); + + copy_ptr->m_version_state= new_val; + } + + /** Execute a dirty to free transition. This transition should be executed by the writer that owns the record. */ diff --git a/storage/perfschema/pfs_memory.cc b/storage/perfschema/pfs_memory.cc index 726f6206b07..c4e92d7d6b0 100644 --- a/storage/perfschema/pfs_memory.cc +++ b/storage/perfschema/pfs_memory.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2013, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_memory.h b/storage/perfschema/pfs_memory.h index 44b09614855..4dc21b892d5 100644 --- a/storage/perfschema/pfs_memory.h +++ b/storage/perfschema/pfs_memory.h @@ -1,13 +1,20 @@ /* Copyright (c) 2013, 2015, 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 diff --git a/storage/perfschema/pfs_prepared_stmt.cc b/storage/perfschema/pfs_prepared_stmt.cc index 4906d3d61cf..e3440560691 100644 --- a/storage/perfschema/pfs_prepared_stmt.cc +++ b/storage/perfschema/pfs_prepared_stmt.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2014, 2017, 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 Foundation, @@ -85,8 +92,12 @@ create_prepared_stmt(void *identity, pfs->reset_data(); /* Do the assignments. */ pfs->m_identity= identity; - strncpy(pfs->m_sqltext, sqltext, sqltext_length); + /* Set query text if available, else it will be set later. */ + if (sqltext_length > 0) + strncpy(pfs->m_sqltext, sqltext, sqltext_length); + pfs->m_sqltext_length= sqltext_length; + if (stmt_name != NULL) { pfs->m_stmt_name_length= stmt_name_length; diff --git a/storage/perfschema/pfs_prepared_stmt.h b/storage/perfschema/pfs_prepared_stmt.h index 3081626311a..4638266cce7 100644 --- a/storage/perfschema/pfs_prepared_stmt.h +++ b/storage/perfschema/pfs_prepared_stmt.h @@ -1,13 +1,20 @@ /* Copyright (c) 2014, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_program.cc b/storage/perfschema/pfs_program.cc index 1d6efa00e14..e8808b0b63a 100644 --- a/storage/perfschema/pfs_program.cc +++ b/storage/perfschema/pfs_program.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2013, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_program.h b/storage/perfschema/pfs_program.h index 35959dee7ca..0cbd24b8699 100644 --- a/storage/perfschema/pfs_program.h +++ b/storage/perfschema/pfs_program.h @@ -1,13 +1,20 @@ /* Copyright (c) 2013, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_server.cc b/storage/perfschema/pfs_server.cc index 82278367332..babbdedcd72 100644 --- a/storage/perfschema/pfs_server.cc +++ b/storage/perfschema/pfs_server.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_server.h b/storage/perfschema/pfs_server.h index bf9e58427e8..198436403fa 100644 --- a/storage/perfschema/pfs_server.h +++ b/storage/perfschema/pfs_server.h @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 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 Foundation, @@ -25,10 +32,10 @@ #define PFS_AUTOSIZE_VALUE (-1) #ifndef PFS_MAX_MUTEX_CLASS - #define PFS_MAX_MUTEX_CLASS 200 + #define PFS_MAX_MUTEX_CLASS 210 #endif #ifndef PFS_MAX_RWLOCK_CLASS - #define PFS_MAX_RWLOCK_CLASS 40 + #define PFS_MAX_RWLOCK_CLASS 50 #endif #ifndef PFS_MAX_COND_CLASS #define PFS_MAX_COND_CLASS 80 diff --git a/storage/perfschema/pfs_setup_actor.cc b/storage/perfschema/pfs_setup_actor.cc index 559c18640bc..56cf2dc111b 100644 --- a/storage/perfschema/pfs_setup_actor.cc +++ b/storage/perfschema/pfs_setup_actor.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_setup_actor.h b/storage/perfschema/pfs_setup_actor.h index cc7224f2bae..ba3faec2d38 100644 --- a/storage/perfschema/pfs_setup_actor.h +++ b/storage/perfschema/pfs_setup_actor.h @@ -1,13 +1,20 @@ /* 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 - 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 Foundation, diff --git a/storage/perfschema/pfs_setup_object.cc b/storage/perfschema/pfs_setup_object.cc index 637ecf535c8..f6414483aa7 100644 --- a/storage/perfschema/pfs_setup_object.cc +++ b/storage/perfschema/pfs_setup_object.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/pfs_setup_object.h b/storage/perfschema/pfs_setup_object.h index 9f9dcf0adac..c063970dcb5 100644 --- a/storage/perfschema/pfs_setup_object.h +++ b/storage/perfschema/pfs_setup_object.h @@ -1,13 +1,20 @@ /* 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 - 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 diff --git a/storage/perfschema/pfs_stat.h b/storage/perfschema/pfs_stat.h index 4670ed73dea..2032347aee3 100644 --- a/storage/perfschema/pfs_stat.h +++ b/storage/perfschema/pfs_stat.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_status.cc b/storage/perfschema/pfs_status.cc index 5d67bf2fa6f..61afcbfccd9 100644 --- a/storage/perfschema/pfs_status.cc +++ b/storage/perfschema/pfs_status.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_status.h b/storage/perfschema/pfs_status.h index 26b9974deda..0417976e9f2 100644 --- a/storage/perfschema/pfs_status.h +++ b/storage/perfschema/pfs_status.h @@ -1,13 +1,20 @@ /* Copyright (c) 2015, 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 diff --git a/storage/perfschema/pfs_timer.cc b/storage/perfschema/pfs_timer.cc index 68be91c7b5d..010c803c6c2 100644 --- a/storage/perfschema/pfs_timer.cc +++ b/storage/perfschema/pfs_timer.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_timer.h b/storage/perfschema/pfs_timer.h index 212254cd2fd..5b5b8451883 100644 --- a/storage/perfschema/pfs_timer.h +++ b/storage/perfschema/pfs_timer.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_user.cc b/storage/perfschema/pfs_user.cc index 868e37e2edf..42033065475 100644 --- a/storage/perfschema/pfs_user.cc +++ b/storage/perfschema/pfs_user.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/pfs_user.h b/storage/perfschema/pfs_user.h index bfb6e516b42..c67a7e1a3b5 100644 --- a/storage/perfschema/pfs_user.h +++ b/storage/perfschema/pfs_user.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/pfs_variable.cc b/storage/perfschema/pfs_variable.cc index 52a45e91b3c..3ff30d97497 100644 --- a/storage/perfschema/pfs_variable.cc +++ b/storage/perfschema/pfs_variable.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2015, 2016, 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 @@ -159,7 +166,7 @@ int PFS_system_variable_cache::do_materialize_global(void) if (match_scope(value->scope())) { /* Resolve value, convert to text, add to cache. */ - System_variable system_var(m_current_thd, show_var, m_query_scope); + System_variable system_var(m_current_thd, show_var, m_query_scope, false); m_cache.push_back(system_var); } } @@ -195,12 +202,14 @@ int PFS_system_variable_cache::do_materialize_all(THD *unsafe_thd) /* Get and lock a validated THD from the thread manager. */ if ((m_safe_thd= get_THD(unsafe_thd)) != NULL) { + DEBUG_SYNC(m_current_thd, "materialize_session_variable_array_THD_locked"); for (Show_var_array::iterator show_var= m_show_var_array.begin(); show_var->value && (show_var != m_show_var_array.end()); show_var++) { const char* name= show_var->name; sys_var *value= (sys_var *)show_var->value; DBUG_ASSERT(value); + bool ignore= false; if (value->scope() == sys_var::SESSION && (!my_strcasecmp(system_charset_info, name, "gtid_executed"))) @@ -225,10 +234,11 @@ int PFS_system_variable_cache::do_materialize_all(THD *unsafe_thd) This special case needs be removed once @@SESSION.GTID_EXECUTED is deprecated. */ - continue; + ignore= true; + } /* Resolve value, convert to text, add to cache. */ - System_variable system_var(m_safe_thd, show_var, m_query_scope); + System_variable system_var(m_safe_thd, show_var, m_query_scope, ignore); m_cache.push_back(system_var); } @@ -253,7 +263,7 @@ void PFS_system_variable_cache::set_mem_root(void) init_sql_alloc(PSI_INSTRUMENT_ME, &m_mem_sysvar, SYSVAR_MEMROOT_BLOCK_SIZE, 0); m_mem_sysvar_ptr= &m_mem_sysvar; } - m_mem_thd= my_thread_get_THR_MALLOC(); /* pointer to current THD mem_root */ + m_mem_thd= my_thread_get_THR_MALLOC(); /* pointer to current THD mem_root */ m_mem_thd_save= *m_mem_thd; /* restore later */ *m_mem_thd= &m_mem_sysvar; /* use temporary mem_root */ } @@ -327,17 +337,16 @@ int PFS_system_variable_cache::do_materialize_session(PFS_thread *pfs_thread) if (match_scope(value->scope())) { const char* name= show_var->name; + bool ignore= false; + if (value->scope() == sys_var::SESSION && (!my_strcasecmp(system_charset_info, name, "gtid_executed"))) { - /* - Please check PFS_system_variable_cache::do_materialize_all for - details about this special case. - */ - continue; + /* Deprecated. See PFS_system_variable_cache::do_materialize_all. */ + ignore= true; } /* Resolve value, convert to text, add to cache. */ - System_variable system_var(m_safe_thd, show_var, m_query_scope); + System_variable system_var(m_safe_thd, show_var, m_query_scope, ignore); m_cache.push_back(system_var); } } @@ -390,18 +399,17 @@ int PFS_system_variable_cache::do_materialize_session(PFS_thread *pfs_thread, ui if (match_scope(value->scope())) { const char* name= show_var->name; - /* - Please check PFS_system_variable_cache::do_materialize_all for - details about this special case. - */ - if ((my_strcasecmp(system_charset_info, name, "gtid_executed") != 0) || - (value->scope() != sys_var::SESSION && - (!my_strcasecmp(system_charset_info, name, "gtid_executed")))) + bool ignore= false; + + if (value->scope() == sys_var::SESSION && + (!my_strcasecmp(system_charset_info, name, "gtid_executed"))) { - /* Resolve value, convert to text, add to cache. */ - System_variable system_var(m_safe_thd, show_var, m_query_scope); - m_cache.push_back(system_var); + /* Deprecated. See PFS_system_variable_cache::do_materialize_all. */ + ignore= true; } + /* Resolve value, convert to text, add to cache. */ + System_variable system_var(m_safe_thd, show_var, m_query_scope, ignore); + m_cache.push_back(system_var); } } @@ -451,17 +459,17 @@ int PFS_system_variable_cache::do_materialize_session(THD *unsafe_thd) if (match_scope(value->scope())) { const char* name= show_var->name; + bool ignore= false; + if (value->scope() == sys_var::SESSION && (!my_strcasecmp(system_charset_info, name, "gtid_executed"))) { - /* - Please check PFS_system_variable_cache::do_materialize_all for - details about this special case. - */ - continue; + /* Deprecated. See PFS_system_variable_cache::do_materialize_all. */ + ignore= true; } /* Resolve value, convert to text, add to cache. */ - System_variable system_var(m_safe_thd, show_var, m_query_scope); + System_variable system_var(m_safe_thd, show_var, m_query_scope, ignore); + m_cache.push_back(system_var); } } @@ -487,7 +495,7 @@ int PFS_system_variable_cache::do_materialize_session(THD *unsafe_thd) */ System_variable::System_variable() : m_name(NULL), m_name_length(0), m_value_length(0), m_type(SHOW_UNDEF), m_scope(0), - m_charset(NULL), m_initialized(false) + m_ignore(false), m_charset(NULL), m_initialized(false) { m_value_str[0]= '\0'; } @@ -496,9 +504,9 @@ System_variable::System_variable() GLOBAL or SESSION system variable. */ System_variable::System_variable(THD *target_thd, const SHOW_VAR *show_var, - enum_var_type query_scope) + enum_var_type query_scope, bool ignore) : m_name(NULL), m_name_length(0), m_value_length(0), m_type(SHOW_UNDEF), m_scope(0), - m_charset(NULL), m_initialized(false) + m_ignore(ignore), m_charset(NULL), m_initialized(false) { init(target_thd, show_var, query_scope); } @@ -514,11 +522,21 @@ void System_variable::init(THD *target_thd, const SHOW_VAR *show_var, enum_mysql_show_type show_var_type= show_var->type; DBUG_ASSERT(show_var_type == SHOW_SYS); - THD *current_thread= current_thd; - + m_name= show_var->name; m_name_length= strlen(m_name); + /* Deprecated variables are ignored but must still be accounted for. */ + if (m_ignore) + { + m_value_str[0]= '\0'; + m_value_length= 0; + m_initialized= true; + return; + } + + THD *current_thread= current_thd; + /* Block remote target thread from updating this system variable. */ if (target_thd != current_thread) mysql_mutex_lock(&target_thd->LOCK_thd_sysvar); @@ -555,7 +573,6 @@ void System_variable::init(THD *target_thd, const SHOW_VAR *show_var, return; #endif - m_initialized= true; } @@ -1151,7 +1168,9 @@ void PFS_status_variable_cache::manifest(THD *thd, const SHOW_VAR *show_var_arra show_var_iter && show_var_iter->name; show_var_iter++) { - char value_buf[SHOW_VAR_FUNC_BUFF_SIZE+1]; /* work buffer */ + // work buffer, must be aligned to handle long/longlong values + my_aligned_storage<SHOW_VAR_FUNC_BUFF_SIZE+1, MY_ALIGNOF(longlong)> + value_buf; SHOW_VAR show_var_tmp; const SHOW_VAR *show_var_ptr= show_var_iter; /* preserve array pointer */ @@ -1169,7 +1188,7 @@ void PFS_status_variable_cache::manifest(THD *thd, const SHOW_VAR *show_var_arra */ for (const SHOW_VAR *var= show_var_ptr; var->type == SHOW_FUNC; var= &show_var_tmp) { - ((mysql_show_var_func)(var->value))(thd, &show_var_tmp, value_buf); + ((mysql_show_var_func)(var->value))(thd, &show_var_tmp, value_buf.data); } show_var_ptr= &show_var_tmp; } @@ -1232,12 +1251,10 @@ void Status_variable::init(const SHOW_VAR *show_var, STATUS_VAR *status_vars, en m_type= show_var->type; m_scope= show_var->scope; - const CHARSET_INFO *charset= system_charset_info; - /* Get the value of the status variable. */ const char *value; value= get_one_variable(current_thd, show_var, query_scope, m_type, - status_vars, &charset, m_value_str, &m_value_length); + status_vars, &m_charset, m_value_str, &m_value_length); m_value_length= MY_MIN(m_value_length, SHOW_VAR_FUNC_BUFF_SIZE); /* Returned value may reference a string other than m_value_str. */ @@ -1296,8 +1313,6 @@ void reset_pfs_status_stats() reset_status_by_account(); reset_status_by_user(); reset_status_by_host(); - /* Clear again, updated by previous aggregations. */ - reset_global_status(); } /** @} */ diff --git a/storage/perfschema/pfs_variable.h b/storage/perfschema/pfs_variable.h index bc08650ed23..d5cab96175a 100644 --- a/storage/perfschema/pfs_variable.h +++ b/storage/perfschema/pfs_variable.h @@ -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 @@ -137,10 +144,12 @@ class System_variable { public: System_variable(); - System_variable(THD *target_thd, const SHOW_VAR *show_var, enum_var_type query_scope); + System_variable(THD *target_thd, const SHOW_VAR *show_var, + enum_var_type query_scope, bool ignore); ~System_variable() {} - bool is_null() const {return !m_initialized;}; + bool is_null() const { return !m_initialized; } + bool is_ignored() const { return m_ignore; } public: const char *m_name; @@ -149,6 +158,7 @@ public: size_t m_value_length; enum_mysql_show_type m_type; int m_scope; + bool m_ignore; const CHARSET_INFO *m_charset; private: @@ -452,7 +462,16 @@ PFS_variable_cache<Var_type>::~PFS_variable_cache() template <class Var_type> THD *PFS_variable_cache<Var_type>::get_THD(THD *unsafe_thd) { - DBUG_ASSERT(unsafe_thd != NULL); + if (unsafe_thd == NULL) + { + /* + May happen, precisely because the pointer is unsafe + (THD just disconnected for example). + No need to walk Global_THD_manager for that. + */ + return NULL; + } + m_thd_finder.set_unsafe_thd(unsafe_thd); THD* safe_thd= Global_THD_manager::get_instance()->find_thd(&m_thd_finder); return safe_thd; diff --git a/storage/perfschema/pfs_visitor.cc b/storage/perfschema/pfs_visitor.cc index 25ba1d9df1c..b9d13283fb9 100644 --- a/storage/perfschema/pfs_visitor.cc +++ b/storage/perfschema/pfs_visitor.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 Foundation, diff --git a/storage/perfschema/pfs_visitor.h b/storage/perfschema/pfs_visitor.h index d1773f45bae..ba97c5057e9 100644 --- a/storage/perfschema/pfs_visitor.h +++ b/storage/perfschema/pfs_visitor.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 Foundation, diff --git a/storage/perfschema/table_accounts.cc b/storage/perfschema/table_accounts.cc index 32da94039e1..533eb758d38 100644 --- a/storage/perfschema/table_accounts.cc +++ b/storage/perfschema/table_accounts.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_accounts.h b/storage/perfschema/table_accounts.h index b8910feba5c..a760bb6327d 100644 --- a/storage/perfschema/table_accounts.h +++ b/storage/perfschema/table_accounts.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_all_instr.cc b/storage/perfschema/table_all_instr.cc index f425c337f48..921dd8c1771 100644 --- a/storage/perfschema/table_all_instr.cc +++ b/storage/perfschema/table_all_instr.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_all_instr.h b/storage/perfschema/table_all_instr.h index 762b85d167c..8fb27a32541 100644 --- a/storage/perfschema/table_all_instr.h +++ b/storage/perfschema/table_all_instr.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_esgs_by_account_by_event_name.cc b/storage/perfschema/table_esgs_by_account_by_event_name.cc index 6241b721477..9f33f68844e 100644 --- a/storage/perfschema/table_esgs_by_account_by_event_name.cc +++ b/storage/perfschema/table_esgs_by_account_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esgs_by_account_by_event_name.h b/storage/perfschema/table_esgs_by_account_by_event_name.h index 4335d1a5ddb..36cc3e51476 100644 --- a/storage/perfschema/table_esgs_by_account_by_event_name.h +++ b/storage/perfschema/table_esgs_by_account_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esgs_by_host_by_event_name.cc b/storage/perfschema/table_esgs_by_host_by_event_name.cc index 322764ba159..4847a3bc5b3 100644 --- a/storage/perfschema/table_esgs_by_host_by_event_name.cc +++ b/storage/perfschema/table_esgs_by_host_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esgs_by_host_by_event_name.h b/storage/perfschema/table_esgs_by_host_by_event_name.h index b4f0449f930..fb711031b2e 100644 --- a/storage/perfschema/table_esgs_by_host_by_event_name.h +++ b/storage/perfschema/table_esgs_by_host_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esgs_by_thread_by_event_name.cc b/storage/perfschema/table_esgs_by_thread_by_event_name.cc index 93f9f0d289f..268ef3ad3d3 100644 --- a/storage/perfschema/table_esgs_by_thread_by_event_name.cc +++ b/storage/perfschema/table_esgs_by_thread_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esgs_by_thread_by_event_name.h b/storage/perfschema/table_esgs_by_thread_by_event_name.h index 2adf4d70363..9f0e85c7bb0 100644 --- a/storage/perfschema/table_esgs_by_thread_by_event_name.h +++ b/storage/perfschema/table_esgs_by_thread_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esgs_by_user_by_event_name.cc b/storage/perfschema/table_esgs_by_user_by_event_name.cc index 393dd5f1247..14f0a2c0256 100644 --- a/storage/perfschema/table_esgs_by_user_by_event_name.cc +++ b/storage/perfschema/table_esgs_by_user_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esgs_by_user_by_event_name.h b/storage/perfschema/table_esgs_by_user_by_event_name.h index de726bd96fd..77bbb5963c4 100644 --- a/storage/perfschema/table_esgs_by_user_by_event_name.h +++ b/storage/perfschema/table_esgs_by_user_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esgs_global_by_event_name.cc b/storage/perfschema/table_esgs_global_by_event_name.cc index 6f9097c55f4..d288c3a2af5 100644 --- a/storage/perfschema/table_esgs_global_by_event_name.cc +++ b/storage/perfschema/table_esgs_global_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esgs_global_by_event_name.h b/storage/perfschema/table_esgs_global_by_event_name.h index 04724107287..5a1f3dd8090 100644 --- a/storage/perfschema/table_esgs_global_by_event_name.h +++ b/storage/perfschema/table_esgs_global_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esms_by_account_by_event_name.cc b/storage/perfschema/table_esms_by_account_by_event_name.cc index ad1915d1c95..627300e1a0b 100644 --- a/storage/perfschema/table_esms_by_account_by_event_name.cc +++ b/storage/perfschema/table_esms_by_account_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esms_by_account_by_event_name.h b/storage/perfschema/table_esms_by_account_by_event_name.h index 5c9d1b19a7e..e787184b214 100644 --- a/storage/perfschema/table_esms_by_account_by_event_name.h +++ b/storage/perfschema/table_esms_by_account_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esms_by_digest.cc b/storage/perfschema/table_esms_by_digest.cc index 6708294521e..4ffddfad0bc 100644 --- a/storage/perfschema/table_esms_by_digest.cc +++ b/storage/perfschema/table_esms_by_digest.cc @@ -1,13 +1,20 @@ -/* 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 - 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 @@ -245,11 +252,14 @@ int table_esms_by_digest::rnd_next(void) m_pos.next()) { digest_stat= &statements_digest_stat_array[m_pos.m_index]; - if (digest_stat->m_first_seen != 0) + if (digest_stat->m_lock.is_populated()) { - make_row(digest_stat); - m_next_pos.set_after(&m_pos); - return 0; + if (digest_stat->m_first_seen != 0) + { + make_row(digest_stat); + m_next_pos.set_after(&m_pos); + return 0; + } } } @@ -267,10 +277,13 @@ table_esms_by_digest::rnd_pos(const void *pos) set_position(pos); digest_stat= &statements_digest_stat_array[m_pos.m_index]; - if (digest_stat->m_first_seen != 0) + if (digest_stat->m_lock.is_populated()) { - make_row(digest_stat); - return 0; + if (digest_stat->m_first_seen != 0) + { + make_row(digest_stat); + return 0; + } } return HA_ERR_RECORD_DELETED; diff --git a/storage/perfschema/table_esms_by_digest.h b/storage/perfschema/table_esms_by_digest.h index 6130deb8117..777cbecb698 100644 --- a/storage/perfschema/table_esms_by_digest.h +++ b/storage/perfschema/table_esms_by_digest.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esms_by_host_by_event_name.cc b/storage/perfschema/table_esms_by_host_by_event_name.cc index 18fc0ff1fca..beb86875935 100644 --- a/storage/perfschema/table_esms_by_host_by_event_name.cc +++ b/storage/perfschema/table_esms_by_host_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esms_by_host_by_event_name.h b/storage/perfschema/table_esms_by_host_by_event_name.h index 090c629cf7f..82eecda4b67 100644 --- a/storage/perfschema/table_esms_by_host_by_event_name.h +++ b/storage/perfschema/table_esms_by_host_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esms_by_program.cc b/storage/perfschema/table_esms_by_program.cc index db727ca0ffe..65794021e99 100644 --- a/storage/perfschema/table_esms_by_program.cc +++ b/storage/perfschema/table_esms_by_program.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esms_by_program.h b/storage/perfschema/table_esms_by_program.h index ab1ee135cab..cc263878e28 100644 --- a/storage/perfschema/table_esms_by_program.h +++ b/storage/perfschema/table_esms_by_program.h @@ -1,13 +1,20 @@ /* Copyright (c) 2013, 2015, 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 diff --git a/storage/perfschema/table_esms_by_thread_by_event_name.cc b/storage/perfschema/table_esms_by_thread_by_event_name.cc index d0b2c2beb02..2094bd15d77 100644 --- a/storage/perfschema/table_esms_by_thread_by_event_name.cc +++ b/storage/perfschema/table_esms_by_thread_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esms_by_thread_by_event_name.h b/storage/perfschema/table_esms_by_thread_by_event_name.h index a7a01a6b313..98bcd1d7563 100644 --- a/storage/perfschema/table_esms_by_thread_by_event_name.h +++ b/storage/perfschema/table_esms_by_thread_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esms_by_user_by_event_name.cc b/storage/perfschema/table_esms_by_user_by_event_name.cc index 0219dc0544f..47e21e678fd 100644 --- a/storage/perfschema/table_esms_by_user_by_event_name.cc +++ b/storage/perfschema/table_esms_by_user_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esms_by_user_by_event_name.h b/storage/perfschema/table_esms_by_user_by_event_name.h index 7af1e68d933..cb39ece6a0f 100644 --- a/storage/perfschema/table_esms_by_user_by_event_name.h +++ b/storage/perfschema/table_esms_by_user_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esms_global_by_event_name.cc b/storage/perfschema/table_esms_global_by_event_name.cc index 4bfb80a8258..7d6befa0c11 100644 --- a/storage/perfschema/table_esms_global_by_event_name.cc +++ b/storage/perfschema/table_esms_global_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_esms_global_by_event_name.h b/storage/perfschema/table_esms_global_by_event_name.h index 4dd659c54c5..2de5126c9be 100644 --- a/storage/perfschema/table_esms_global_by_event_name.h +++ b/storage/perfschema/table_esms_global_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ets_by_account_by_event_name.cc b/storage/perfschema/table_ets_by_account_by_event_name.cc index 338ee8af30f..b7ba4d261c5 100644 --- a/storage/perfschema/table_ets_by_account_by_event_name.cc +++ b/storage/perfschema/table_ets_by_account_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ets_by_account_by_event_name.h b/storage/perfschema/table_ets_by_account_by_event_name.h index b255a519b45..98fb45f79dd 100644 --- a/storage/perfschema/table_ets_by_account_by_event_name.h +++ b/storage/perfschema/table_ets_by_account_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ets_by_host_by_event_name.cc b/storage/perfschema/table_ets_by_host_by_event_name.cc index f95e95cc0f3..ca1e47f9519 100644 --- a/storage/perfschema/table_ets_by_host_by_event_name.cc +++ b/storage/perfschema/table_ets_by_host_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ets_by_host_by_event_name.h b/storage/perfschema/table_ets_by_host_by_event_name.h index f6a1b375e0b..341c3878253 100644 --- a/storage/perfschema/table_ets_by_host_by_event_name.h +++ b/storage/perfschema/table_ets_by_host_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ets_by_thread_by_event_name.cc b/storage/perfschema/table_ets_by_thread_by_event_name.cc index 1403d5b45ac..29fa901a21b 100644 --- a/storage/perfschema/table_ets_by_thread_by_event_name.cc +++ b/storage/perfschema/table_ets_by_thread_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ets_by_thread_by_event_name.h b/storage/perfschema/table_ets_by_thread_by_event_name.h index 526bb8f37a0..ad63efa3f1a 100644 --- a/storage/perfschema/table_ets_by_thread_by_event_name.h +++ b/storage/perfschema/table_ets_by_thread_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ets_by_user_by_event_name.cc b/storage/perfschema/table_ets_by_user_by_event_name.cc index 53576674485..e84e9dad41e 100644 --- a/storage/perfschema/table_ets_by_user_by_event_name.cc +++ b/storage/perfschema/table_ets_by_user_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ets_by_user_by_event_name.h b/storage/perfschema/table_ets_by_user_by_event_name.h index d73e7e517ed..c3a1d0b5c0a 100644 --- a/storage/perfschema/table_ets_by_user_by_event_name.h +++ b/storage/perfschema/table_ets_by_user_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ets_global_by_event_name.cc b/storage/perfschema/table_ets_global_by_event_name.cc index 59dbfce892c..ebd5dd0f791 100644 --- a/storage/perfschema/table_ets_global_by_event_name.cc +++ b/storage/perfschema/table_ets_global_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ets_global_by_event_name.h b/storage/perfschema/table_ets_global_by_event_name.h index a29e9f07156..47c8828cb47 100644 --- a/storage/perfschema/table_ets_global_by_event_name.h +++ b/storage/perfschema/table_ets_global_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_events_stages.cc b/storage/perfschema/table_events_stages.cc index aa8b2ca5b84..73e3ce34be8 100644 --- a/storage/perfschema/table_events_stages.cc +++ b/storage/perfschema/table_events_stages.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 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 Foundation, @@ -162,8 +169,6 @@ table_events_stages_common::table_events_stages_common */ void table_events_stages_common::make_row(PFS_events_stages *stage) { - const char *base; - const char *safe_source_file; ulonglong timer_end; m_row_exists= false; @@ -194,15 +199,8 @@ void table_events_stages_common::make_row(PFS_events_stages *stage) m_row.m_name= klass->m_name; m_row.m_name_length= klass->m_name_length; - safe_source_file= stage->m_source_file; - if (unlikely(safe_source_file == NULL)) - return; - - base= base_name(safe_source_file); - m_row.m_source_length= my_snprintf(m_row.m_source, sizeof(m_row.m_source), - "%s:%d", base, stage->m_source_line); - if (m_row.m_source_length > sizeof(m_row.m_source)) - m_row.m_source_length= sizeof(m_row.m_source); + /* Disable source file and line to avoid stale __FILE__ pointers. */ + m_row.m_source_length= 0; if (klass->is_progress()) { diff --git a/storage/perfschema/table_events_stages.h b/storage/perfschema/table_events_stages.h index b867d470bd5..79cecedda7c 100644 --- a/storage/perfschema/table_events_stages.h +++ b/storage/perfschema/table_events_stages.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 Foundation, diff --git a/storage/perfschema/table_events_statements.cc b/storage/perfschema/table_events_statements.cc index 46cd75d3dc5..997e931ca45 100644 --- a/storage/perfschema/table_events_statements.cc +++ b/storage/perfschema/table_events_statements.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 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 Foundation, @@ -310,8 +317,6 @@ table_events_statements_common::table_events_statements_common void table_events_statements_common::make_row_part_1(PFS_events_statements *statement, sql_digest_storage *digest) { - const char *base; - const char *safe_source_file; ulonglong timer_end; m_row_exists= false; @@ -347,11 +352,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); @@ -385,15 +396,8 @@ void table_events_statements_common::make_row_part_1(PFS_events_statements *stat if (m_row.m_object_name_length > 0) memcpy(m_row.m_object_name, statement->m_object_name, m_row.m_object_name_length); - safe_source_file= statement->m_source_file; - if (unlikely(safe_source_file == NULL)) - return; - - base= base_name(safe_source_file); - m_row.m_source_length= my_snprintf(m_row.m_source, sizeof(m_row.m_source), - "%s:%d", base, statement->m_source_line); - if (m_row.m_source_length > sizeof(m_row.m_source)) - m_row.m_source_length= sizeof(m_row.m_source); + /* Disable source file and line to avoid stale __FILE__ pointers. */ + m_row.m_source_length= 0; memcpy(m_row.m_message_text, statement->m_message_text, sizeof(m_row.m_message_text)); m_row.m_sql_errno= statement->m_sql_errno; diff --git a/storage/perfschema/table_events_statements.h b/storage/perfschema/table_events_statements.h index 6496706bdfb..a06c8e0f1c6 100644 --- a/storage/perfschema/table_events_statements.h +++ b/storage/perfschema/table_events_statements.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 Foundation, diff --git a/storage/perfschema/table_events_transactions.cc b/storage/perfschema/table_events_transactions.cc index 7c258fc9b88..b34e10f5d77 100644 --- a/storage/perfschema/table_events_transactions.cc +++ b/storage/perfschema/table_events_transactions.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 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 Foundation, @@ -224,8 +231,6 @@ table_events_transactions_common::table_events_transactions_common */ void table_events_transactions_common::make_row(PFS_events_transactions *transaction) { - const char *base; - const char *safe_source_file; ulonglong timer_end; m_row_exists= false; @@ -255,15 +260,8 @@ void table_events_transactions_common::make_row(PFS_events_transactions *transac m_row.m_name= klass->m_name; m_row.m_name_length= klass->m_name_length; - safe_source_file= transaction->m_source_file; - if (unlikely(safe_source_file == NULL)) - return; - - base= base_name(safe_source_file); - m_row.m_source_length= (uint)my_snprintf(m_row.m_source, sizeof(m_row.m_source), - "%s:%d", base, transaction->m_source_line); - if (m_row.m_source_length > sizeof(m_row.m_source)) - m_row.m_source_length= sizeof(m_row.m_source); + /* Disable source file and line to avoid stale __FILE__ pointers. */ + m_row.m_source_length= 0; /* A GTID consists of the SID (source id) and GNO (transaction number). The SID is stored in transaction->m_sid and the GNO is stored in diff --git a/storage/perfschema/table_events_transactions.h b/storage/perfschema/table_events_transactions.h index 10056c85d03..e2eded16596 100644 --- a/storage/perfschema/table_events_transactions.h +++ b/storage/perfschema/table_events_transactions.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 Foundation, diff --git a/storage/perfschema/table_events_waits.cc b/storage/perfschema/table_events_waits.cc index c4e3eb90efb..932d6f7c3e1 100644 --- a/storage/perfschema/table_events_waits.cc +++ b/storage/perfschema/table_events_waits.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 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 Foundation, @@ -481,8 +488,6 @@ int table_events_waits_common::make_metadata_lock_object_columns(PFS_events_wait void table_events_waits_common::make_row(PFS_events_waits *wait) { PFS_instr_class *safe_class; - const char *base; - const char *safe_source_file; enum_timer_name timer_name= wait_timer; ulonglong timer_end; @@ -585,19 +590,9 @@ void table_events_waits_common::make_row(PFS_events_waits *wait) m_row.m_name= safe_class->m_name; m_row.m_name_length= safe_class->m_name_length; - /* - We are assuming this pointer is sane, - since it comes from __FILE__. - */ - safe_source_file= wait->m_source_file; - if (unlikely(safe_source_file == NULL)) - return; + /* Disable source file and line to avoid stale __FILE__ pointers. */ + m_row.m_source_length= 0; - base= base_name(wait->m_source_file); - m_row.m_source_length= my_snprintf(m_row.m_source, sizeof(m_row.m_source), - "%s:%d", base, wait->m_source_line); - if (m_row.m_source_length > sizeof(m_row.m_source)) - m_row.m_source_length= sizeof(m_row.m_source); m_row.m_operation= wait->m_operation; m_row.m_number_of_bytes= wait->m_number_of_bytes; m_row.m_flags= wait->m_flags; diff --git a/storage/perfschema/table_events_waits.h b/storage/perfschema/table_events_waits.h index 74aced71aff..ce71c797ef5 100644 --- a/storage/perfschema/table_events_waits.h +++ b/storage/perfschema/table_events_waits.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_events_waits_summary.cc b/storage/perfschema/table_events_waits_summary.cc index 7da688e6eb0..c2f7c478eb8 100644 --- a/storage/perfschema/table_events_waits_summary.cc +++ b/storage/perfschema/table_events_waits_summary.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_events_waits_summary.h b/storage/perfschema/table_events_waits_summary.h index 1d42f0e5615..53e86558e96 100644 --- a/storage/perfschema/table_events_waits_summary.h +++ b/storage/perfschema/table_events_waits_summary.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_ews_by_account_by_event_name.cc b/storage/perfschema/table_ews_by_account_by_event_name.cc index 3d2cca20f80..22910d10138 100644 --- a/storage/perfschema/table_ews_by_account_by_event_name.cc +++ b/storage/perfschema/table_ews_by_account_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ews_by_account_by_event_name.h b/storage/perfschema/table_ews_by_account_by_event_name.h index 1b433b50fe2..f42b9ab21fe 100644 --- a/storage/perfschema/table_ews_by_account_by_event_name.h +++ b/storage/perfschema/table_ews_by_account_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ews_by_host_by_event_name.cc b/storage/perfschema/table_ews_by_host_by_event_name.cc index d57d512bd6a..f36ef6eeaa3 100644 --- a/storage/perfschema/table_ews_by_host_by_event_name.cc +++ b/storage/perfschema/table_ews_by_host_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ews_by_host_by_event_name.h b/storage/perfschema/table_ews_by_host_by_event_name.h index abd809d4663..34de54fb246 100644 --- a/storage/perfschema/table_ews_by_host_by_event_name.h +++ b/storage/perfschema/table_ews_by_host_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ews_by_thread_by_event_name.cc b/storage/perfschema/table_ews_by_thread_by_event_name.cc index 4c9e491b0c5..a0269daab08 100644 --- a/storage/perfschema/table_ews_by_thread_by_event_name.cc +++ b/storage/perfschema/table_ews_by_thread_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ews_by_thread_by_event_name.h b/storage/perfschema/table_ews_by_thread_by_event_name.h index 414119d1884..73ca273be52 100644 --- a/storage/perfschema/table_ews_by_thread_by_event_name.h +++ b/storage/perfschema/table_ews_by_thread_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ews_by_user_by_event_name.cc b/storage/perfschema/table_ews_by_user_by_event_name.cc index 102008f1eaf..13a5e83abca 100644 --- a/storage/perfschema/table_ews_by_user_by_event_name.cc +++ b/storage/perfschema/table_ews_by_user_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ews_by_user_by_event_name.h b/storage/perfschema/table_ews_by_user_by_event_name.h index 742badd984c..21a66f69f7d 100644 --- a/storage/perfschema/table_ews_by_user_by_event_name.h +++ b/storage/perfschema/table_ews_by_user_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ews_global_by_event_name.cc b/storage/perfschema/table_ews_global_by_event_name.cc index c26789dc58f..099dcb308c2 100644 --- a/storage/perfschema/table_ews_global_by_event_name.cc +++ b/storage/perfschema/table_ews_global_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_ews_global_by_event_name.h b/storage/perfschema/table_ews_global_by_event_name.h index 19a1a378c30..25c010ba6d9 100644 --- a/storage/perfschema/table_ews_global_by_event_name.h +++ b/storage/perfschema/table_ews_global_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_file_instances.cc b/storage/perfschema/table_file_instances.cc index ec4217a4a3f..df79e3e92af 100644 --- a/storage/perfschema/table_file_instances.cc +++ b/storage/perfschema/table_file_instances.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_file_instances.h b/storage/perfschema/table_file_instances.h index 3b540e6dbe4..b2073e9c372 100644 --- a/storage/perfschema/table_file_instances.h +++ b/storage/perfschema/table_file_instances.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_file_summary_by_event_name.cc b/storage/perfschema/table_file_summary_by_event_name.cc index ab80b2b6a55..21ed56f18a3 100644 --- a/storage/perfschema/table_file_summary_by_event_name.cc +++ b/storage/perfschema/table_file_summary_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_file_summary_by_event_name.h b/storage/perfschema/table_file_summary_by_event_name.h index ff5046aafda..ec04478a59b 100644 --- a/storage/perfschema/table_file_summary_by_event_name.h +++ b/storage/perfschema/table_file_summary_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_file_summary_by_instance.cc b/storage/perfschema/table_file_summary_by_instance.cc index 8dcb3cadeb1..80c6b6b0e25 100644 --- a/storage/perfschema/table_file_summary_by_instance.cc +++ b/storage/perfschema/table_file_summary_by_instance.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_file_summary_by_instance.h b/storage/perfschema/table_file_summary_by_instance.h index 98389e94456..090c27b3dd0 100644 --- a/storage/perfschema/table_file_summary_by_instance.h +++ b/storage/perfschema/table_file_summary_by_instance.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_global_status.cc b/storage/perfschema/table_global_status.cc index 36dfa13efd3..75f57f2c60b 100644 --- a/storage/perfschema/table_global_status.cc +++ b/storage/perfschema/table_global_status.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 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 - 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 @@ -158,7 +165,7 @@ void table_global_status if (status_var->is_null()) return; m_row.m_variable_name.make_row(status_var->m_name, status_var->m_name_length); - m_row.m_variable_value.make_row(status_var->m_value_str, status_var->m_value_length); + m_row.m_variable_value.make_row(status_var); m_row_exists= true; } @@ -187,7 +194,7 @@ int table_global_status set_field_varchar_utf8(f, m_row.m_variable_name.m_str, m_row.m_variable_name.m_length); break; case 1: /* 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); diff --git a/storage/perfschema/table_global_status.h b/storage/perfschema/table_global_status.h index 5eee59cb51d..a97ea9d0041 100644 --- a/storage/perfschema/table_global_status.h +++ b/storage/perfschema/table_global_status.h @@ -1,13 +1,20 @@ /* Copyright (c) 2015, 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 diff --git a/storage/perfschema/table_global_variables.cc b/storage/perfschema/table_global_variables.cc index f11b979e21c..6c78a1a2459 100644 --- a/storage/perfschema/table_global_variables.cc +++ b/storage/perfschema/table_global_variables.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 @@ -149,10 +156,10 @@ void table_global_variables ::make_row(const System_variable *system_var) { m_row_exists= false; - if (system_var->is_null()) + if (system_var->is_null() || system_var->is_ignored()) return; 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); m_row_exists= true; } @@ -181,7 +188,7 @@ int table_global_variables set_field_varchar_utf8(f, m_row.m_variable_name.m_str, m_row.m_variable_name.m_length); break; case 1: /* 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); diff --git a/storage/perfschema/table_global_variables.h b/storage/perfschema/table_global_variables.h index e9ad7e59c30..b9124e76f65 100644 --- a/storage/perfschema/table_global_variables.h +++ b/storage/perfschema/table_global_variables.h @@ -1,13 +1,20 @@ /* Copyright (c) 2015, 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 diff --git a/storage/perfschema/table_helper.cc b/storage/perfschema/table_helper.cc index 32c9980974a..6459e993ccb 100644 --- a/storage/perfschema/table_helper.cc +++ b/storage/perfschema/table_helper.cc @@ -1,13 +1,20 @@ -/* 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 - 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 @@ -28,6 +35,7 @@ #include "pfs_instr.h" #include "pfs_program.h" #include "field.h" +#include "pfs_variable.h" int PFS_host_row::make_row(PFS_host *pfs) { @@ -801,14 +809,31 @@ void PFS_variable_name_row::make_row(const char* str, size_t length) m_str[m_length]= '\0'; } -void PFS_variable_value_row::make_row(const char* str, size_t length) +void PFS_variable_value_row::make_row(const Status_variable *var) +{ + make_row(var->m_charset, var->m_value_str, var->m_value_length); +} + +void PFS_variable_value_row::make_row(const System_variable *var) +{ + make_row(var->m_charset, var->m_value_str, var->m_value_length); +} + +void PFS_variable_value_row::make_row(const CHARSET_INFO *cs, const char* str, size_t length) { + DBUG_ASSERT(cs != NULL); DBUG_ASSERT(length <= sizeof(m_str)); if (length > 0) { memcpy(m_str, str, length); } m_length= length; + m_charset= cs; +} + +void PFS_variable_value_row::set_field(Field *f) +{ + PFS_engine_table::set_field_varchar(f, m_charset, m_str, m_length); } void PFS_user_variable_value_row::clear() diff --git a/storage/perfschema/table_helper.h b/storage/perfschema/table_helper.h index d5fc29992f6..cacce967663 100644 --- a/storage/perfschema/table_helper.h +++ b/storage/perfschema/table_helper.h @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 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 - 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 @@ -42,6 +49,8 @@ struct PFS_user; struct PFS_account; struct PFS_object_name; struct PFS_program; +class System_variable; +class Status_variable; /** @file storage/perfschema/table_helper.h @@ -634,10 +643,22 @@ public: struct PFS_variable_value_row { - void make_row(const char* str, size_t length); +public: + /** Set the row from a status variable. */ + void make_row(const Status_variable *var); + + /** Set the row from a system variable. */ + void make_row(const System_variable *var); + + /** Set a table field from the row. */ + void set_field(Field *f); + +private: + void make_row(const CHARSET_INFO *cs, const char* str, size_t length); char m_str[1024]; uint m_length; + const CHARSET_INFO *m_charset; }; struct PFS_user_variable_value_row diff --git a/storage/perfschema/table_host_cache.cc b/storage/perfschema/table_host_cache.cc index 284923ce277..d14032230b2 100644 --- a/storage/perfschema/table_host_cache.cc +++ b/storage/perfschema/table_host_cache.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_host_cache.h b/storage/perfschema/table_host_cache.h index 66d7966066c..61a8809bf19 100644 --- a/storage/perfschema/table_host_cache.h +++ b/storage/perfschema/table_host_cache.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_hosts.cc b/storage/perfschema/table_hosts.cc index 06ae8c23d95..3acdc7e7b1d 100644 --- a/storage/perfschema/table_hosts.cc +++ b/storage/perfschema/table_hosts.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_hosts.h b/storage/perfschema/table_hosts.h index 7687db2ee21..9d5f1bf20a6 100644 --- a/storage/perfschema/table_hosts.h +++ b/storage/perfschema/table_hosts.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_md_locks.cc b/storage/perfschema/table_md_locks.cc index d0967af732d..3f6e82c73fb 100644 --- a/storage/perfschema/table_md_locks.cc +++ b/storage/perfschema/table_md_locks.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2012, 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 Foundation, @@ -162,8 +169,6 @@ int table_metadata_locks::rnd_pos(const void *pos) void table_metadata_locks::make_row(PFS_metadata_lock *pfs) { pfs_optimistic_state lock; - const char *base; - const char *safe_source_file; m_row_exists= false; @@ -175,20 +180,8 @@ void table_metadata_locks::make_row(PFS_metadata_lock *pfs) m_row.m_mdl_duration= pfs->m_mdl_duration; m_row.m_mdl_status= pfs->m_mdl_status; - safe_source_file= pfs->m_src_file; - if (safe_source_file != NULL) - { - base= base_name(safe_source_file); - m_row.m_source_length= my_snprintf(m_row.m_source, - sizeof(m_row.m_source), - "%s:%d", base, pfs->m_src_line); - if (m_row.m_source_length > sizeof(m_row.m_source)) - m_row.m_source_length= sizeof(m_row.m_source); - } - else - { - m_row.m_source_length= 0; - } + /* Disable source file and line to avoid stale __FILE__ pointers. */ + m_row.m_source_length= 0; m_row.m_owner_thread_id= static_cast<ulong>(pfs->m_owner_thread_id); m_row.m_owner_event_id= static_cast<ulong>(pfs->m_owner_event_id); diff --git a/storage/perfschema/table_md_locks.h b/storage/perfschema/table_md_locks.h index eba03218333..40b6d2f6efb 100644 --- a/storage/perfschema/table_md_locks.h +++ b/storage/perfschema/table_md_locks.h @@ -1,13 +1,20 @@ /* Copyright (c) 2012, 2015, 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 Foundation, diff --git a/storage/perfschema/table_mems_by_account_by_event_name.cc b/storage/perfschema/table_mems_by_account_by_event_name.cc index e425d22effd..2fe8573b54d 100644 --- a/storage/perfschema/table_mems_by_account_by_event_name.cc +++ b/storage/perfschema/table_mems_by_account_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_mems_by_account_by_event_name.h b/storage/perfschema/table_mems_by_account_by_event_name.h index 54cf7a42d82..b6151246f34 100644 --- a/storage/perfschema/table_mems_by_account_by_event_name.h +++ b/storage/perfschema/table_mems_by_account_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_mems_by_host_by_event_name.cc b/storage/perfschema/table_mems_by_host_by_event_name.cc index fe42a06d870..3d18196fbd0 100644 --- a/storage/perfschema/table_mems_by_host_by_event_name.cc +++ b/storage/perfschema/table_mems_by_host_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_mems_by_host_by_event_name.h b/storage/perfschema/table_mems_by_host_by_event_name.h index 03b914fe137..1a55db2c9b3 100644 --- a/storage/perfschema/table_mems_by_host_by_event_name.h +++ b/storage/perfschema/table_mems_by_host_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_mems_by_thread_by_event_name.cc b/storage/perfschema/table_mems_by_thread_by_event_name.cc index 47a837ebb13..ea458d93cb6 100644 --- a/storage/perfschema/table_mems_by_thread_by_event_name.cc +++ b/storage/perfschema/table_mems_by_thread_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_mems_by_thread_by_event_name.h b/storage/perfschema/table_mems_by_thread_by_event_name.h index da9f7df249d..f8608198c2a 100644 --- a/storage/perfschema/table_mems_by_thread_by_event_name.h +++ b/storage/perfschema/table_mems_by_thread_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_mems_by_user_by_event_name.cc b/storage/perfschema/table_mems_by_user_by_event_name.cc index 726dad620c9..2f0f4ed0dac 100644 --- a/storage/perfschema/table_mems_by_user_by_event_name.cc +++ b/storage/perfschema/table_mems_by_user_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_mems_by_user_by_event_name.h b/storage/perfschema/table_mems_by_user_by_event_name.h index d247efa31e6..2791e1d3587 100644 --- a/storage/perfschema/table_mems_by_user_by_event_name.h +++ b/storage/perfschema/table_mems_by_user_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_mems_global_by_event_name.cc b/storage/perfschema/table_mems_global_by_event_name.cc index 6924fb4e8f4..f6b2114518f 100644 --- a/storage/perfschema/table_mems_global_by_event_name.cc +++ b/storage/perfschema/table_mems_global_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_mems_global_by_event_name.h b/storage/perfschema/table_mems_global_by_event_name.h index 029f5b4c781..14a54142f4e 100644 --- a/storage/perfschema/table_mems_global_by_event_name.h +++ b/storage/perfschema/table_mems_global_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_os_global_by_type.cc b/storage/perfschema/table_os_global_by_type.cc index c8604714121..4119e67ee62 100644 --- a/storage/perfschema/table_os_global_by_type.cc +++ b/storage/perfschema/table_os_global_by_type.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_os_global_by_type.h b/storage/perfschema/table_os_global_by_type.h index a0cc0019200..d36cc29bffb 100644 --- a/storage/perfschema/table_os_global_by_type.h +++ b/storage/perfschema/table_os_global_by_type.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_performance_timers.cc b/storage/perfschema/table_performance_timers.cc index bb1529b0517..84e0c1ad10c 100644 --- a/storage/perfschema/table_performance_timers.cc +++ b/storage/perfschema/table_performance_timers.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_performance_timers.h b/storage/perfschema/table_performance_timers.h index d4ea510aac5..b7a66daebab 100644 --- a/storage/perfschema/table_performance_timers.h +++ b/storage/perfschema/table_performance_timers.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_prepared_stmt_instances.cc b/storage/perfschema/table_prepared_stmt_instances.cc index 9cae5c72567..859e0a5277a 100644 --- a/storage/perfschema/table_prepared_stmt_instances.cc +++ b/storage/perfschema/table_prepared_stmt_instances.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2014, 2015, 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 diff --git a/storage/perfschema/table_prepared_stmt_instances.h b/storage/perfschema/table_prepared_stmt_instances.h index 709cbfa8d35..a17184d4312 100644 --- a/storage/perfschema/table_prepared_stmt_instances.h +++ b/storage/perfschema/table_prepared_stmt_instances.h @@ -1,13 +1,20 @@ /* Copyright (c) 2014, 2015, 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 diff --git a/storage/perfschema/table_replication_applier_configuration.cc b/storage/perfschema/table_replication_applier_configuration.cc index a88e0f82846..94e505a049d 100644 --- a/storage/perfschema/table_replication_applier_configuration.cc +++ b/storage/perfschema/table_replication_applier_configuration.cc @@ -1,14 +1,21 @@ /* - Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 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 @@ -65,7 +72,7 @@ table_replication_applier_configuration::m_share= NULL, /* write_row */ NULL, /* delete_all_rows */ table_replication_applier_configuration::get_row_count, - sizeof(PFS_simple_index), /* ref length */ + sizeof(pos_t), /* ref length */ &m_table_lock, &m_field_def, false, /* checked */ @@ -103,12 +110,10 @@ ha_rows table_replication_applier_configuration::get_row_count() int table_replication_applier_configuration::rnd_next(void) { Master_info *mi; - int res= HA_ERR_END_OF_FILE; - channel_map.rdlock(); for (m_pos.set_at(&m_next_pos); - m_pos.m_index < channel_map.get_max_channels() && res != 0; + m_pos.m_index < channel_map.get_max_channels(); m_pos.next()) { mi= channel_map.get_mi_at_pos(m_pos.m_index); @@ -117,12 +122,13 @@ int table_replication_applier_configuration::rnd_next(void) { make_row(mi); m_next_pos.set_after(&m_pos); - res= 0; + channel_map.unlock(); + return 0; } } channel_map.unlock(); - return res; + return HA_ERR_END_OF_FILE; } int table_replication_applier_configuration::rnd_pos(const void *pos) diff --git a/storage/perfschema/table_replication_applier_configuration.h b/storage/perfschema/table_replication_applier_configuration.h index e5ec69a64b8..b8b128ff2cb 100644 --- a/storage/perfschema/table_replication_applier_configuration.h +++ b/storage/perfschema/table_replication_applier_configuration.h @@ -1,14 +1,21 @@ /* - Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 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 @@ -48,6 +55,8 @@ struct st_row_applier_config { /** Table PERFORMANCE_SCHEMA.replication_applier_configuration */ class table_replication_applier_configuration: public PFS_engine_table { + typedef PFS_simple_index pos_t; + private: void make_row(Master_info *mi); @@ -60,9 +69,9 @@ private: /** True is the current row exists. */ bool m_row_exists; /** Current position. */ - PFS_simple_index m_pos; + pos_t m_pos; /** Next position. */ - PFS_simple_index m_next_pos; + pos_t m_next_pos; protected: /** diff --git a/storage/perfschema/table_replication_applier_status.cc b/storage/perfschema/table_replication_applier_status.cc index e0824b056fe..96dae833c8a 100644 --- a/storage/perfschema/table_replication_applier_status.cc +++ b/storage/perfschema/table_replication_applier_status.cc @@ -1,14 +1,21 @@ /* - Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 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 @@ -74,7 +81,7 @@ table_replication_applier_status::m_share= NULL, /* write_row */ NULL, /* delete_all_rows */ table_replication_applier_status::get_row_count, /* records */ - sizeof(PFS_simple_index), /* ref length */ + sizeof(pos_t), /* ref length */ &m_table_lock, &m_field_def, false, /* checked */ @@ -110,12 +117,10 @@ ha_rows table_replication_applier_status::get_row_count() int table_replication_applier_status::rnd_next(void) { Master_info *mi; - int res= HA_ERR_END_OF_FILE; - channel_map.rdlock(); for(m_pos.set_at(&m_next_pos); - m_pos.m_index < channel_map.get_max_channels() && res != 0; + m_pos.m_index < channel_map.get_max_channels(); m_pos.next()) { mi= channel_map.get_mi_at_pos(m_pos.m_index); @@ -124,12 +129,13 @@ int table_replication_applier_status::rnd_next(void) { make_row(mi); m_next_pos.set_after(&m_pos); - res= 0; + channel_map.unlock(); + return 0; } } channel_map.unlock(); - return res; + return HA_ERR_END_OF_FILE; } diff --git a/storage/perfschema/table_replication_applier_status.h b/storage/perfschema/table_replication_applier_status.h index 955439be6da..4fb62999bf3 100644 --- a/storage/perfschema/table_replication_applier_status.h +++ b/storage/perfschema/table_replication_applier_status.h @@ -1,14 +1,21 @@ /* - Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 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 @@ -59,6 +66,8 @@ struct st_row_applier_status { /** Table PERFORMANCE_SCHEMA.replication_applier_status */ class table_replication_applier_status: public PFS_engine_table { + typedef PFS_simple_index pos_t; + private: void make_row(Master_info *mi); @@ -71,9 +80,9 @@ private: /** True is the current row exists. */ bool m_row_exists; /** Current position. */ - PFS_simple_index m_pos; + pos_t m_pos; /** Next position. */ - PFS_simple_index m_next_pos; + pos_t m_next_pos; protected: /** diff --git a/storage/perfschema/table_replication_applier_status_by_coordinator.cc b/storage/perfschema/table_replication_applier_status_by_coordinator.cc index 5f2427bed67..47b13cbcb5b 100644 --- a/storage/perfschema/table_replication_applier_status_by_coordinator.cc +++ b/storage/perfschema/table_replication_applier_status_by_coordinator.cc @@ -1,14 +1,21 @@ /* - Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 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 @@ -85,7 +92,7 @@ table_replication_applier_status_by_coordinator::m_share= NULL, /* write_row */ NULL, /* delete_all_rows */ table_replication_applier_status_by_coordinator::get_row_count, - sizeof(PFS_simple_index), /* ref length */ + sizeof(pos_t), /* ref length */ &m_table_lock, &m_field_def, false, /* checked */ @@ -122,12 +129,10 @@ ha_rows table_replication_applier_status_by_coordinator::get_row_count() int table_replication_applier_status_by_coordinator::rnd_next(void) { Master_info *mi; - int res= HA_ERR_END_OF_FILE; - channel_map.rdlock(); for(m_pos.set_at(&m_next_pos); - m_pos.m_index < channel_map.get_max_channels() && res != 0; + m_pos.m_index < channel_map.get_max_channels(); m_pos.next()) { mi= channel_map.get_mi_at_pos(m_pos.m_index); @@ -144,12 +149,13 @@ int table_replication_applier_status_by_coordinator::rnd_next(void) { make_row(mi); m_next_pos.set_after(&m_pos); - res= 0; + channel_map.unlock(); + return 0; } } channel_map.unlock(); - return res; + return HA_ERR_END_OF_FILE; } int table_replication_applier_status_by_coordinator::rnd_pos(const void *pos) diff --git a/storage/perfschema/table_replication_applier_status_by_coordinator.h b/storage/perfschema/table_replication_applier_status_by_coordinator.h index 30a1f39ee46..5337bbaa2a0 100644 --- a/storage/perfschema/table_replication_applier_status_by_coordinator.h +++ b/storage/perfschema/table_replication_applier_status_by_coordinator.h @@ -1,14 +1,21 @@ /* - Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 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 @@ -65,6 +72,8 @@ struct st_row_coordinator { /** Table PERFORMANCE_SCHEMA.replication_applier_status_by_coordinator */ class table_replication_applier_status_by_coordinator: public PFS_engine_table { + typedef PFS_simple_index pos_t; + private: void make_row(Master_info *mi); @@ -77,9 +86,9 @@ private: /** True is the current row exists. */ bool m_row_exists; /** Current position. */ - PFS_simple_index m_pos; + pos_t m_pos; /** Next position. */ - PFS_simple_index m_next_pos; + pos_t m_next_pos; protected: /** diff --git a/storage/perfschema/table_replication_applier_status_by_worker.cc b/storage/perfschema/table_replication_applier_status_by_worker.cc index e4e99dc2325..5eebef920e7 100644 --- a/storage/perfschema/table_replication_applier_status_by_worker.cc +++ b/storage/perfschema/table_replication_applier_status_by_worker.cc @@ -1,14 +1,21 @@ /* - Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 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 @@ -94,7 +101,7 @@ table_replication_applier_status_by_worker::m_share= NULL, /* write_row */ NULL, /* delete_all_rows */ table_replication_applier_status_by_worker::get_row_count, /*records*/ - sizeof(PFS_simple_index), /* ref length */ + sizeof(pos_t), /* ref length */ &m_table_lock, &m_field_def, false, /* checked */ @@ -109,8 +116,7 @@ PFS_engine_table* table_replication_applier_status_by_worker::create(void) table_replication_applier_status_by_worker ::table_replication_applier_status_by_worker() : PFS_engine_table(&m_share, &m_pos), - m_row_exists(false), m_pos(), m_next_pos(), - m_applier_pos(0), m_applier_next_pos(0) + m_row_exists(false), m_pos(), m_next_pos() {} table_replication_applier_status_by_worker @@ -121,8 +127,6 @@ void table_replication_applier_status_by_worker::reset_position(void) { m_pos.reset(); m_next_pos.reset(); - m_applier_pos.m_index=0; - m_applier_next_pos.m_index=0; } ha_rows table_replication_applier_status_by_worker::get_row_count() @@ -138,52 +142,47 @@ int table_replication_applier_status_by_worker::rnd_next(void) { Slave_worker *worker; Master_info *mi; - int res= HA_ERR_END_OF_FILE; + size_t wc; channel_map.rdlock(); - /* - For each SQL Thread in all channels get the respective Master_info and - construct a row to display its status in - 'replication_applier_status_by_worker' table in case of single threaded - slave mode. - */ - for(m_applier_pos.set_at(&m_applier_next_pos); - m_applier_pos.m_index < channel_map.get_max_channels(); - m_applier_pos.next()) - { - mi= channel_map.get_mi_at_pos(m_applier_pos.m_index); - - if (mi && mi->host[0] && mi->rli && mi->rli->get_worker_count()==0) - { - make_row(mi); - m_applier_next_pos.set_after(&m_applier_pos); - - channel_map.unlock(); - return 0; - } - } - for (m_pos.set_at(&m_next_pos); - m_pos.has_more_channels(channel_map.get_max_channels()) && res != 0; + m_pos.has_more_channels(channel_map.get_max_channels()); m_pos.next_channel()) { mi= channel_map.get_mi_at_pos(m_pos.m_index_1); if (mi && mi->host[0]) { - worker= mi->rli->get_worker(m_pos.m_index_2); - if (worker) + wc= mi->rli->get_worker_count(); + + if (wc == 0) { - make_row(worker); - m_next_pos.set_after(&m_pos); - res= 0; + /* Single Thread Slave */ + make_row(mi); + m_next_pos.set_channel_after(&m_pos); + channel_map.unlock(); + return 0; + } + + for (; m_pos.m_index_2 < wc; m_pos.next_worker()) + { + /* Multi Thread Slave */ + + worker = mi->rli->get_worker(m_pos.m_index_2); + if (worker) + { + make_row(worker); + m_next_pos.set_after(&m_pos); + channel_map.unlock(); + return 0; + } } } } channel_map.unlock(); - return res; + return HA_ERR_END_OF_FILE; } int table_replication_applier_status_by_worker::rnd_pos(const void *pos) @@ -191,6 +190,7 @@ int table_replication_applier_status_by_worker::rnd_pos(const void *pos) Slave_worker *worker; Master_info *mi; int res= HA_ERR_RECORD_DELETED; + size_t wc; set_position(pos); @@ -201,22 +201,26 @@ int table_replication_applier_status_by_worker::rnd_pos(const void *pos) if (!mi || !mi->rli || !mi->host[0]) goto end; - DBUG_ASSERT(m_pos.m_index_1 < mi->rli->get_worker_count()); - /* - Display SQL Thread's status only in the case of single threaded mode. - */ - if (mi->rli->get_worker_count() == 0) + wc = mi->rli->get_worker_count(); + + if (wc == 0) { + /* Single Thread Slave */ make_row(mi); - res= 0; - goto end; + res=0; } - worker= mi->rli->get_worker(m_pos.m_index_2); - - if (worker != NULL) + else { - make_row(worker); - res= 0; + /* Multi Thread Slave */ + if (m_pos.m_index_2 < wc) + { + worker = mi->rli->get_worker(m_pos.m_index_2); + if (worker != NULL) + { + make_row(worker); + res=0; + } + } } end: diff --git a/storage/perfschema/table_replication_applier_status_by_worker.h b/storage/perfschema/table_replication_applier_status_by_worker.h index ed0ce7480b2..cc62dbee0a3 100644 --- a/storage/perfschema/table_replication_applier_status_by_worker.h +++ b/storage/perfschema/table_replication_applier_status_by_worker.h @@ -1,14 +1,21 @@ /* - Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 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 @@ -74,14 +81,16 @@ struct st_row_worker { }; /** - Index 1 for replication channel - Index 2 for worker + Position in table replication_applier_status_by_worker. + Index 1 for replication channel. + Index 2 for worker: + - position [0] is for Single Thread Slave (Master_info) + - position [1] .. [N] is for Multi Thread Slave (Slave_worker) */ -struct workers_per_channel -:public PFS_double_index +struct pos_replication_applier_status_by_worker : public PFS_double_index { - workers_per_channel() - :PFS_double_index(0,0) + + pos_replication_applier_status_by_worker() : PFS_double_index(0, 0) {} inline void reset(void) @@ -98,12 +107,26 @@ struct workers_per_channel m_index_1++; m_index_2= 0; } + + inline void next_worker() + { + m_index_2++; + } + + inline void + set_channel_after(const pos_replication_applier_status_by_worker *other) + { + m_index_1 = other->m_index_1 + 1; + m_index_2 = 0; + } }; /** Table PERFORMANCE_SCHEMA.replication_applier_status_by_worker */ class table_replication_applier_status_by_worker: public PFS_engine_table { + typedef pos_replication_applier_status_by_worker pos_t; + private: void make_row(Slave_worker *); /* @@ -121,13 +144,9 @@ private: /** True is the current row exists. */ bool m_row_exists; /** Current position. */ - workers_per_channel m_pos; - /** Next position. */ - workers_per_channel m_next_pos; - /** Current position. */ - PFS_simple_index m_applier_pos; + pos_t m_pos; /** Next position. */ - PFS_simple_index m_applier_next_pos; + pos_t m_next_pos; protected: /** diff --git a/storage/perfschema/table_replication_connection_configuration.cc b/storage/perfschema/table_replication_connection_configuration.cc index 8fe04802aac..88b1215a333 100644 --- a/storage/perfschema/table_replication_connection_configuration.cc +++ b/storage/perfschema/table_replication_connection_configuration.cc @@ -1,14 +1,21 @@ /* - Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 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 @@ -147,7 +154,7 @@ table_replication_connection_configuration::m_share= NULL, /* write_row */ NULL, /* delete_all_rows */ table_replication_connection_configuration::get_row_count, /* records */ - sizeof(PFS_simple_index), /* ref length */ + sizeof(pos_t), /* ref length */ &m_table_lock, &m_field_def, false, /* checked */ @@ -189,12 +196,10 @@ ha_rows table_replication_connection_configuration::get_row_count() int table_replication_connection_configuration::rnd_next(void) { Master_info *mi; - int res= HA_ERR_END_OF_FILE; - channel_map.rdlock(); for (m_pos.set_at(&m_next_pos); - m_pos.m_index < channel_map.get_max_channels() && res != 0; + m_pos.m_index < channel_map.get_max_channels(); m_pos.next()) { mi= channel_map.get_mi_at_pos(m_pos.m_index); @@ -203,12 +208,13 @@ int table_replication_connection_configuration::rnd_next(void) { make_row(mi); m_next_pos.set_after(&m_pos); - res= 0; + channel_map.unlock(); + return 0; } } channel_map.unlock(); - return res; + return HA_ERR_END_OF_FILE; } int table_replication_connection_configuration::rnd_pos(const void *pos) diff --git a/storage/perfschema/table_replication_connection_configuration.h b/storage/perfschema/table_replication_connection_configuration.h index f71aecefd0e..610670bfa78 100644 --- a/storage/perfschema/table_replication_connection_configuration.h +++ b/storage/perfschema/table_replication_connection_configuration.h @@ -1,14 +1,21 @@ /* - Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 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 @@ -93,6 +100,8 @@ struct st_row_connect_config { /** Table PERFORMANCE_SCHEMA.TABLE_REPLICATION_CONNECTION_CONFIGURATION. */ class table_replication_connection_configuration: public PFS_engine_table { + typedef PFS_simple_index pos_t; + private: void make_row(Master_info *); @@ -105,9 +114,9 @@ private: /** Current row */ st_row_connect_config m_row; /** Current position. */ - PFS_simple_index m_pos; + pos_t m_pos; /** Next position. */ - PFS_simple_index m_next_pos; + pos_t m_next_pos; protected: /** diff --git a/storage/perfschema/table_replication_connection_status.cc b/storage/perfschema/table_replication_connection_status.cc index e4e502a7f8c..0c296103b97 100644 --- a/storage/perfschema/table_replication_connection_status.cc +++ b/storage/perfschema/table_replication_connection_status.cc @@ -1,14 +1,21 @@ /* - Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 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 @@ -119,7 +126,7 @@ static const TABLE_FIELD_TYPE field_types[]= }, { {C_STRING_WITH_LEN("RECEIVED_TRANSACTION_SET")}, - {C_STRING_WITH_LEN("text")}, + {C_STRING_WITH_LEN("longtext")}, {NULL, 0} }, { @@ -151,7 +158,7 @@ table_replication_connection_status::m_share= NULL, /* write_row */ NULL, /* delete_all_rows */ table_replication_connection_status::get_row_count, /* records */ - sizeof(PFS_simple_index), /* ref length */ + sizeof(pos_t), /* ref length */ &m_table_lock, &m_field_def, false, /* checked */ @@ -190,12 +197,10 @@ ha_rows table_replication_connection_status::get_row_count() int table_replication_connection_status::rnd_next(void) { Master_info *mi= NULL; - int res= HA_ERR_END_OF_FILE; - channel_map.rdlock(); for (m_pos.set_at(&m_next_pos); - m_pos.m_index < channel_map.get_max_channels() && res != 0; + m_pos.m_index < channel_map.get_max_channels(); m_pos.next()) { mi= channel_map.get_mi_at_pos(m_pos.m_index); @@ -204,12 +209,13 @@ int table_replication_connection_status::rnd_next(void) { make_row(mi); m_next_pos.set_after(&m_pos); - res= 0; + channel_map.unlock(); + return 0; } } channel_map.unlock(); - return res; + return HA_ERR_END_OF_FILE; } int table_replication_connection_status::rnd_pos(const void *pos) diff --git a/storage/perfschema/table_replication_connection_status.h b/storage/perfschema/table_replication_connection_status.h index 6c95da19235..45376b33e76 100644 --- a/storage/perfschema/table_replication_connection_status.h +++ b/storage/perfschema/table_replication_connection_status.h @@ -1,14 +1,21 @@ /* - Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 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 @@ -91,6 +98,8 @@ struct st_row_connect_status { /** Table PERFORMANCE_SCHEMA.REPLICATION_CONNECTION_STATUS. */ class table_replication_connection_status: public PFS_engine_table { + typedef PFS_simple_index pos_t; + private: void make_row(Master_info *mi); @@ -103,9 +112,9 @@ private: /** Current row */ st_row_connect_status m_row; /** Current position. */ - PFS_simple_index m_pos; + pos_t m_pos; /** Next position. */ - PFS_simple_index m_next_pos; + pos_t m_next_pos; protected: /** diff --git a/storage/perfschema/table_replication_group_member_stats.cc b/storage/perfschema/table_replication_group_member_stats.cc index 91a7ff0a974..9c7f61817d1 100644 --- a/storage/perfschema/table_replication_group_member_stats.cc +++ b/storage/perfschema/table_replication_group_member_stats.cc @@ -1,14 +1,21 @@ /* - Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2014, 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 - 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 @@ -117,12 +124,12 @@ static void set_transactions_conflicts_detected(void* const context, row->trx_conflicts= value; } -static void set_transactions_in_validation(void* const context, - unsigned long long int value) +static void set_transactions_rows_in_validation(void* const context, + unsigned long long int value) { struct st_row_group_member_stats* row= static_cast<struct st_row_group_member_stats*>(context); - row->trx_validating= value; + row->trx_rows_validating= value; } @@ -161,7 +168,7 @@ static const TABLE_FIELD_TYPE field_types[]= {NULL, 0} }, { - {C_STRING_WITH_LEN("COUNT_TRANSACTIONS_VALIDATING")}, + {C_STRING_WITH_LEN("COUNT_TRANSACTIONS_ROWS_VALIDATING")}, {C_STRING_WITH_LEN("bigint")}, {NULL, 0} }, @@ -275,7 +282,7 @@ void table_replication_group_member_stats::make_row() m_row.trx_in_queue= 0; m_row.trx_checked= 0; m_row.trx_conflicts= 0; - m_row.trx_validating= 0; + m_row.trx_rows_validating= 0; // Set callbacks on GROUP_REPLICATION_GROUP_MEMBER_STATS_CALLBACKS. const GROUP_REPLICATION_GROUP_MEMBER_STATS_CALLBACKS callbacks= @@ -289,7 +296,7 @@ void table_replication_group_member_stats::make_row() &set_transactions_in_queue, &set_transactions_certified, &set_transactions_conflicts_detected, - &set_transactions_in_validation, + &set_transactions_rows_in_validation, }; // Query plugin and let callbacks do their job. @@ -345,7 +352,7 @@ int table_replication_group_member_stats::read_row_values(TABLE *table, set_field_ulonglong(f, m_row.trx_conflicts); break; case 6: /** certification_db_size */ - set_field_ulonglong(f, m_row.trx_validating); + set_field_ulonglong(f, m_row.trx_rows_validating); break; case 7: /** stable_set */ set_field_longtext_utf8(f, m_row.trx_committed, diff --git a/storage/perfschema/table_replication_group_member_stats.h b/storage/perfschema/table_replication_group_member_stats.h index a80f36772bc..0fa17be8143 100644 --- a/storage/perfschema/table_replication_group_member_stats.h +++ b/storage/perfschema/table_replication_group_member_stats.h @@ -1,14 +1,21 @@ /* - Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2014, 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 - 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 @@ -50,7 +57,7 @@ struct st_row_group_member_stats { ulonglong trx_in_queue; ulonglong trx_checked; ulonglong trx_conflicts; - ulonglong trx_validating; + ulonglong trx_rows_validating; char *trx_committed; size_t trx_committed_length; char last_cert_trx[Gtid::MAX_TEXT_LENGTH+1]; diff --git a/storage/perfschema/table_replication_group_members.cc b/storage/perfschema/table_replication_group_members.cc index b8619c71fc5..7aa4cf67fd9 100644 --- a/storage/perfschema/table_replication_group_members.cc +++ b/storage/perfschema/table_replication_group_members.cc @@ -2,13 +2,20 @@ Copyright (c) 2013, 2015, 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 diff --git a/storage/perfschema/table_replication_group_members.h b/storage/perfschema/table_replication_group_members.h index 8a0ab2640c8..e2ea07771c0 100644 --- a/storage/perfschema/table_replication_group_members.h +++ b/storage/perfschema/table_replication_group_members.h @@ -2,13 +2,20 @@ Copyright (c) 2013, 2015, 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 diff --git a/storage/perfschema/table_session_account_connect_attrs.cc b/storage/perfschema/table_session_account_connect_attrs.cc index 0502489bff0..3e142484770 100644 --- a/storage/perfschema/table_session_account_connect_attrs.cc +++ b/storage/perfschema/table_session_account_connect_attrs.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_session_account_connect_attrs.h b/storage/perfschema/table_session_account_connect_attrs.h index f40178ec020..80d747c2735 100644 --- a/storage/perfschema/table_session_account_connect_attrs.h +++ b/storage/perfschema/table_session_account_connect_attrs.h @@ -1,13 +1,20 @@ /* Copyright (c) 2012, 2015, 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 Foundation, diff --git a/storage/perfschema/table_session_connect.cc b/storage/perfschema/table_session_connect.cc index 1e1d6d3e1e7..1cac13ffcd3 100644 --- a/storage/perfschema/table_session_connect.cc +++ b/storage/perfschema/table_session_connect.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_session_connect.h b/storage/perfschema/table_session_connect.h index feb593bad6b..bbb63746e08 100644 --- a/storage/perfschema/table_session_connect.h +++ b/storage/perfschema/table_session_connect.h @@ -1,13 +1,20 @@ /* Copyright (c) 2012, 2015, 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 Foundation, diff --git a/storage/perfschema/table_session_connect_attrs.cc b/storage/perfschema/table_session_connect_attrs.cc index 45f5daf5aaf..e89481cc96d 100644 --- a/storage/perfschema/table_session_connect_attrs.cc +++ b/storage/perfschema/table_session_connect_attrs.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_session_connect_attrs.h b/storage/perfschema/table_session_connect_attrs.h index 788a68a95fd..dc44d3830f8 100644 --- a/storage/perfschema/table_session_connect_attrs.h +++ b/storage/perfschema/table_session_connect_attrs.h @@ -1,13 +1,20 @@ /* Copyright (c) 2012, 2015, 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 Foundation, diff --git a/storage/perfschema/table_session_status.cc b/storage/perfschema/table_session_status.cc index 32285bc3a4b..1051bac5071 100644 --- a/storage/perfschema/table_session_status.cc +++ b/storage/perfschema/table_session_status.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 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 - 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 @@ -153,7 +160,7 @@ void table_session_status { m_row_exists= false; m_row.m_variable_name.make_row(status_var->m_name, status_var->m_name_length); - m_row.m_variable_value.make_row(status_var->m_value_str, status_var->m_value_length); + m_row.m_variable_value.make_row(status_var); m_row_exists= true; } @@ -182,7 +189,7 @@ int table_session_status set_field_varchar_utf8(f, m_row.m_variable_name.m_str, m_row.m_variable_name.m_length); break; case 1: /* 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); diff --git a/storage/perfschema/table_session_status.h b/storage/perfschema/table_session_status.h index 4680586d2f8..24634fe47b5 100644 --- a/storage/perfschema/table_session_status.h +++ b/storage/perfschema/table_session_status.h @@ -1,13 +1,20 @@ /* Copyright (c) 2015, 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 diff --git a/storage/perfschema/table_session_variables.cc b/storage/perfschema/table_session_variables.cc index 55c5407c83f..3721ca31fe4 100644 --- a/storage/perfschema/table_session_variables.cc +++ b/storage/perfschema/table_session_variables.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 @@ -152,8 +159,10 @@ void table_session_variables ::make_row(const System_variable *system_var) { m_row_exists= false; + if (system_var->is_null() || system_var->is_ignored()) + return; 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); m_row_exists= true; } @@ -182,7 +191,7 @@ int table_session_variables set_field_varchar_utf8(f, m_row.m_variable_name.m_str, m_row.m_variable_name.m_length); break; case 1: /* 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); diff --git a/storage/perfschema/table_session_variables.h b/storage/perfschema/table_session_variables.h index 15c3ac8ea91..576bf73edbb 100644 --- a/storage/perfschema/table_session_variables.h +++ b/storage/perfschema/table_session_variables.h @@ -1,13 +1,20 @@ /* Copyright (c) 2015, 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 diff --git a/storage/perfschema/table_setup_actors.cc b/storage/perfschema/table_setup_actors.cc index 593dd1d45a9..9b561949d8c 100644 --- a/storage/perfschema/table_setup_actors.cc +++ b/storage/perfschema/table_setup_actors.cc @@ -1,13 +1,20 @@ /* 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 - 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 Foundation, diff --git a/storage/perfschema/table_setup_actors.h b/storage/perfschema/table_setup_actors.h index 0f5827ea13f..9f8a30c3efe 100644 --- a/storage/perfschema/table_setup_actors.h +++ b/storage/perfschema/table_setup_actors.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_setup_consumers.cc b/storage/perfschema/table_setup_consumers.cc index 78f4d74b359..9ba5231c84a 100644 --- a/storage/perfschema/table_setup_consumers.cc +++ b/storage/perfschema/table_setup_consumers.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_setup_consumers.h b/storage/perfschema/table_setup_consumers.h index b9c72c1d437..c1d1ba412ca 100644 --- a/storage/perfschema/table_setup_consumers.h +++ b/storage/perfschema/table_setup_consumers.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_setup_instruments.cc b/storage/perfschema/table_setup_instruments.cc index e3f0f065b64..d21c263d427 100644 --- a/storage/perfschema/table_setup_instruments.cc +++ b/storage/perfschema/table_setup_instruments.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_setup_instruments.h b/storage/perfschema/table_setup_instruments.h index d0e3119cf5b..4dc3c805f31 100644 --- a/storage/perfschema/table_setup_instruments.h +++ b/storage/perfschema/table_setup_instruments.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_setup_objects.cc b/storage/perfschema/table_setup_objects.cc index 0312793119f..20b7c95dd5e 100644 --- a/storage/perfschema/table_setup_objects.cc +++ b/storage/perfschema/table_setup_objects.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_setup_objects.h b/storage/perfschema/table_setup_objects.h index a759d0c8329..0310f4b7d99 100644 --- a/storage/perfschema/table_setup_objects.h +++ b/storage/perfschema/table_setup_objects.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_setup_timers.cc b/storage/perfschema/table_setup_timers.cc index f04aaf7e832..e95fb875521 100644 --- a/storage/perfschema/table_setup_timers.cc +++ b/storage/perfschema/table_setup_timers.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2017, 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 Foundation, @@ -24,6 +31,7 @@ #include "pfs_column_values.h" #include "pfs_timer.h" #include "field.h" +#include "derror.h" /* ER_THD */ #define COUNT_SETUP_TIMERS 5 @@ -90,6 +98,13 @@ table_setup_timers::m_share= PFS_engine_table* table_setup_timers::create(void) { + THD *thd = current_thd; + push_warning_printf(thd, + Sql_condition::SL_WARNING, + ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT, + ER_THD(thd, ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT), + "performance_schema.setup_timers"); + return new table_setup_timers(); } diff --git a/storage/perfschema/table_setup_timers.h b/storage/perfschema/table_setup_timers.h index c7dfec8f42b..cbfb9b27923 100644 --- a/storage/perfschema/table_setup_timers.h +++ b/storage/perfschema/table_setup_timers.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_socket_instances.cc b/storage/perfschema/table_socket_instances.cc index 1cf163ba981..59db5a10a63 100644 --- a/storage/perfschema/table_socket_instances.cc +++ b/storage/perfschema/table_socket_instances.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_socket_instances.h b/storage/perfschema/table_socket_instances.h index 99d0ba6c8cb..923a9afc4a9 100644 --- a/storage/perfschema/table_socket_instances.h +++ b/storage/perfschema/table_socket_instances.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_socket_summary_by_event_name.cc b/storage/perfschema/table_socket_summary_by_event_name.cc index 1a344b6de99..333e35731f6 100644 --- a/storage/perfschema/table_socket_summary_by_event_name.cc +++ b/storage/perfschema/table_socket_summary_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_socket_summary_by_event_name.h b/storage/perfschema/table_socket_summary_by_event_name.h index 8f5bbe82973..5c537b495c7 100644 --- a/storage/perfschema/table_socket_summary_by_event_name.h +++ b/storage/perfschema/table_socket_summary_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_socket_summary_by_instance.cc b/storage/perfschema/table_socket_summary_by_instance.cc index db5a9d9f62a..1f45e516504 100644 --- a/storage/perfschema/table_socket_summary_by_instance.cc +++ b/storage/perfschema/table_socket_summary_by_instance.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_socket_summary_by_instance.h b/storage/perfschema/table_socket_summary_by_instance.h index 55802ec5fba..45fa1b74557 100644 --- a/storage/perfschema/table_socket_summary_by_instance.h +++ b/storage/perfschema/table_socket_summary_by_instance.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_status_by_account.cc b/storage/perfschema/table_status_by_account.cc index 482c7924888..199475dc8b2 100644 --- a/storage/perfschema/table_status_by_account.cc +++ b/storage/perfschema/table_status_by_account.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 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 - 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 @@ -214,7 +221,7 @@ void table_status_by_account return; m_row.m_variable_name.make_row(status_var->m_name, status_var->m_name_length); - m_row.m_variable_value.make_row(status_var->m_value_str, status_var->m_value_length); + m_row.m_variable_value.make_row(status_var); if (!pfs_account->m_lock.end_optimistic_lock(&lock)) return; @@ -251,7 +258,7 @@ int table_status_by_account set_field_varchar_utf8(f, m_row.m_variable_name.m_str, m_row.m_variable_name.m_length); break; case 3: /* 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); diff --git a/storage/perfschema/table_status_by_account.h b/storage/perfschema/table_status_by_account.h index d1f46487da8..401a184d8f1 100644 --- a/storage/perfschema/table_status_by_account.h +++ b/storage/perfschema/table_status_by_account.h @@ -1,13 +1,20 @@ /* Copyright (c) 2015, 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 diff --git a/storage/perfschema/table_status_by_host.cc b/storage/perfschema/table_status_by_host.cc index 34ee6f615cf..289cfc3e444 100644 --- a/storage/perfschema/table_status_by_host.cc +++ b/storage/perfschema/table_status_by_host.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 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 - 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 @@ -210,7 +217,7 @@ void table_status_by_host return; m_row.m_variable_name.make_row(status_var->m_name, status_var->m_name_length); - m_row.m_variable_value.make_row(status_var->m_value_str, status_var->m_value_length); + m_row.m_variable_value.make_row(status_var); if (!pfs_host->m_lock.end_optimistic_lock(&lock)) return; @@ -246,7 +253,7 @@ int table_status_by_host 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); diff --git a/storage/perfschema/table_status_by_host.h b/storage/perfschema/table_status_by_host.h index 40639f05373..e4c6bf256ef 100644 --- a/storage/perfschema/table_status_by_host.h +++ b/storage/perfschema/table_status_by_host.h @@ -1,13 +1,20 @@ /* Copyright (c) 2015, 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 diff --git a/storage/perfschema/table_status_by_thread.cc b/storage/perfschema/table_status_by_thread.cc index eb954bb8ea1..c4f62b62199 100644 --- a/storage/perfschema/table_status_by_thread.cc +++ b/storage/perfschema/table_status_by_thread.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 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 - 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 @@ -204,7 +211,7 @@ void table_status_by_thread m_row.m_thread_internal_id= thread->m_thread_internal_id; m_row.m_variable_name.make_row(status_var->m_name, status_var->m_name_length); - m_row.m_variable_value.make_row(status_var->m_value_str, status_var->m_value_length); + m_row.m_variable_value.make_row(status_var); if (!thread->m_lock.end_optimistic_lock(&lock)) return; @@ -240,7 +247,7 @@ int table_status_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); diff --git a/storage/perfschema/table_status_by_thread.h b/storage/perfschema/table_status_by_thread.h index 4c14e3bb101..f8de21dc41e 100644 --- a/storage/perfschema/table_status_by_thread.h +++ b/storage/perfschema/table_status_by_thread.h @@ -1,13 +1,20 @@ /* Copyright (c) 2015, 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 diff --git a/storage/perfschema/table_status_by_user.cc b/storage/perfschema/table_status_by_user.cc index 462534dafd9..25f87a87faf 100644 --- a/storage/perfschema/table_status_by_user.cc +++ b/storage/perfschema/table_status_by_user.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 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 - 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 @@ -211,7 +218,7 @@ void table_status_by_user return; m_row.m_variable_name.make_row(status_var->m_name, status_var->m_name_length); - m_row.m_variable_value.make_row(status_var->m_value_str, status_var->m_value_length); + m_row.m_variable_value.make_row(status_var); if (!user->m_lock.end_optimistic_lock(&lock)) return; @@ -247,7 +254,7 @@ int table_status_by_user 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); diff --git a/storage/perfschema/table_status_by_user.h b/storage/perfschema/table_status_by_user.h index ec96a348c40..6b4a67b4e3f 100644 --- a/storage/perfschema/table_status_by_user.h +++ b/storage/perfschema/table_status_by_user.h @@ -1,13 +1,20 @@ /* Copyright (c) 2015, 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 diff --git a/storage/perfschema/table_sync_instances.cc b/storage/perfschema/table_sync_instances.cc index 8879712766c..2b416e6436a 100644 --- a/storage/perfschema/table_sync_instances.cc +++ b/storage/perfschema/table_sync_instances.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_sync_instances.h b/storage/perfschema/table_sync_instances.h index 527fd55262f..b60a0b89f3b 100644 --- a/storage/perfschema/table_sync_instances.h +++ b/storage/perfschema/table_sync_instances.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_table_handles.cc b/storage/perfschema/table_table_handles.cc index ba8e400d55f..e47debcb87c 100644 --- a/storage/perfschema/table_table_handles.cc +++ b/storage/perfschema/table_table_handles.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2012, 2015, 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 diff --git a/storage/perfschema/table_table_handles.h b/storage/perfschema/table_table_handles.h index 11002df63fa..0f1f76f4846 100644 --- a/storage/perfschema/table_table_handles.h +++ b/storage/perfschema/table_table_handles.h @@ -1,13 +1,20 @@ /* Copyright (c) 2012, 2015, 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 diff --git a/storage/perfschema/table_threads.cc b/storage/perfschema/table_threads.cc index 22335f7e8eb..e9e66dd5092 100644 --- a/storage/perfschema/table_threads.cc +++ b/storage/perfschema/table_threads.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_threads.h b/storage/perfschema/table_threads.h index 50e2fc8842e..408734850f9 100644 --- a/storage/perfschema/table_threads.h +++ b/storage/perfschema/table_threads.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/table_tiws_by_index_usage.cc b/storage/perfschema/table_tiws_by_index_usage.cc index 2ab235208b1..97f40110d5a 100644 --- a/storage/perfschema/table_tiws_by_index_usage.cc +++ b/storage/perfschema/table_tiws_by_index_usage.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_tiws_by_index_usage.h b/storage/perfschema/table_tiws_by_index_usage.h index 5d1b8bc9d65..1a130cd9c04 100644 --- a/storage/perfschema/table_tiws_by_index_usage.h +++ b/storage/perfschema/table_tiws_by_index_usage.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_tiws_by_table.cc b/storage/perfschema/table_tiws_by_table.cc index 59905b3e540..163541ad35d 100644 --- a/storage/perfschema/table_tiws_by_table.cc +++ b/storage/perfschema/table_tiws_by_table.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_tiws_by_table.h b/storage/perfschema/table_tiws_by_table.h index 0951f7c1a1b..5413d0c812f 100644 --- a/storage/perfschema/table_tiws_by_table.h +++ b/storage/perfschema/table_tiws_by_table.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_tlws_by_table.cc b/storage/perfschema/table_tlws_by_table.cc index 8cd85e45f43..f76b030a07d 100644 --- a/storage/perfschema/table_tlws_by_table.cc +++ b/storage/perfschema/table_tlws_by_table.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_tlws_by_table.h b/storage/perfschema/table_tlws_by_table.h index 827d39bd562..ee2cd04e27b 100644 --- a/storage/perfschema/table_tlws_by_table.h +++ b/storage/perfschema/table_tlws_by_table.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, 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 diff --git a/storage/perfschema/table_users.cc b/storage/perfschema/table_users.cc index d481f6ef49f..d998a962688 100644 --- a/storage/perfschema/table_users.cc +++ b/storage/perfschema/table_users.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_users.h b/storage/perfschema/table_users.h index 490775b2ca2..26bb66e9fa6 100644 --- a/storage/perfschema/table_users.h +++ b/storage/perfschema/table_users.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2015, 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 Foundation, diff --git a/storage/perfschema/table_uvar_by_thread.cc b/storage/perfschema/table_uvar_by_thread.cc index 8c21d975a02..c74f9369b00 100644 --- a/storage/perfschema/table_uvar_by_thread.cc +++ b/storage/perfschema/table_uvar_by_thread.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2013, 2015, 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 diff --git a/storage/perfschema/table_uvar_by_thread.h b/storage/perfschema/table_uvar_by_thread.h index 8ff3dbacb16..6cd39b4fcd6 100644 --- a/storage/perfschema/table_uvar_by_thread.h +++ b/storage/perfschema/table_uvar_by_thread.h @@ -1,13 +1,20 @@ /* Copyright (c) 2013, 2015, 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 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); diff --git a/storage/perfschema/table_variables_by_thread.h b/storage/perfschema/table_variables_by_thread.h index 90d9b4df7e6..d628707f9b4 100644 --- a/storage/perfschema/table_variables_by_thread.h +++ b/storage/perfschema/table_variables_by_thread.h @@ -1,13 +1,20 @@ /* Copyright (c) 2015, 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 diff --git a/storage/perfschema/unittest/CMakeLists.txt b/storage/perfschema/unittest/CMakeLists.txt index ef01904de37..f43d777d836 100644 --- a/storage/perfschema/unittest/CMakeLists.txt +++ b/storage/perfschema/unittest/CMakeLists.txt @@ -1,13 +1,20 @@ -# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2019, 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 @@ -75,6 +82,3 @@ ADD_TEST(pfs_connect_attr pfs_connect_attr-t) # ADD_EXECUTABLE(pfs_benchmark-t pfs_benchmark-t.cc pfs_benchmark_helper.cc) # TARGET_LINK_LIBRARIES(pfs_benchmark-t mytap perfschema mysys pfs_server_stubs) # ADD_TEST(pfs_benchmark pfs_benchmark-t) - -# On windows, pfs_connect_attr-t may depend on openssl dlls. -COPY_OPENSSL_DLLS(copy_openssl_pfs_unittest) diff --git a/storage/perfschema/unittest/conf.txt b/storage/perfschema/unittest/conf.txt index 8afd0b4dca7..2e355bafb6c 100644 --- a/storage/perfschema/unittest/conf.txt +++ b/storage/perfschema/unittest/conf.txt @@ -1,13 +1,20 @@ # Copyright (c) 2009, 2010, 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 Foundation, diff --git a/storage/perfschema/unittest/pfs-t.cc b/storage/perfschema/unittest/pfs-t.cc index cce43eebd1e..5fc2ea726a3 100644 --- a/storage/perfschema/unittest/pfs-t.cc +++ b/storage/perfschema/unittest/pfs-t.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2017, 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 Foundation, @@ -1386,7 +1393,8 @@ void test_locker_disabled() ok(socket_A1 != NULL, "instrumented"); /* Socket thread owner has not been set */ socket_locker= psi->start_socket_wait(&socket_state, socket_A1, PSI_SOCKET_SEND, 12, "foo.cc", 12); - ok(socket_locker == NULL, "no locker (no thread owner)"); + ok(socket_locker != NULL, "locker (owner not used)"); + psi->end_socket_wait(socket_locker, 10); /* Pretend the running thread is not instrumented */ /* ---------------------------------------------- */ @@ -1872,6 +1880,6 @@ int main(int, char **) MY_INIT("pfs-t"); do_all_tests(); - return 0; + return (exit_status()); } diff --git a/storage/perfschema/unittest/pfs_account-oom-t.cc b/storage/perfschema/unittest/pfs_account-oom-t.cc index 6d9967d1947..e43ab80e6cc 100644 --- a/storage/perfschema/unittest/pfs_account-oom-t.cc +++ b/storage/perfschema/unittest/pfs_account-oom-t.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2017, 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 Foundation, @@ -162,5 +169,5 @@ int main(int, char **) plan(12); MY_INIT("pfs_account-oom-t"); do_all_tests(); - return 0; + return (exit_status()); } diff --git a/storage/perfschema/unittest/pfs_connect_attr-t.cc b/storage/perfschema/unittest/pfs_connect_attr-t.cc index 346a8158d12..5be14bf65c6 100644 --- a/storage/perfschema/unittest/pfs_connect_attr-t.cc +++ b/storage/perfschema/unittest/pfs_connect_attr-t.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2017, 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 Foundation, @@ -341,5 +348,5 @@ int main(int, char **) diag("skipping the cp1251 tests : missing character set"); plan(59 + (cs_cp1251 ? 10 : 0)); do_all_tests(); - return 0; + return (exit_status()); } diff --git a/storage/perfschema/unittest/pfs_host-oom-t.cc b/storage/perfschema/unittest/pfs_host-oom-t.cc index fa27f8722bd..7686c8db4ee 100644 --- a/storage/perfschema/unittest/pfs_host-oom-t.cc +++ b/storage/perfschema/unittest/pfs_host-oom-t.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2017, 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 Foundation, @@ -135,6 +142,6 @@ int main(int, char **) plan(6); MY_INIT("pfs_host-oom-t"); do_all_tests(); - return 0; + return (exit_status()); } diff --git a/storage/perfschema/unittest/pfs_instr-oom-t.cc b/storage/perfschema/unittest/pfs_instr-oom-t.cc index db74c9cf2d3..6636b8a3c55 100644 --- a/storage/perfschema/unittest/pfs_instr-oom-t.cc +++ b/storage/perfschema/unittest/pfs_instr-oom-t.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2017, 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 Foundation, @@ -232,12 +239,14 @@ void test_oom() ok(cond_2 == NULL, "oom (create cond)"); /* Create file. */ - stub_alloc_always_fails = false; PFS_thread fake_thread; + rc = init_instruments(¶m); fake_thread.m_filename_hash_pins= NULL; init_file_hash(¶m); - rc = init_instruments(¶m); - ok(rc == 0, "instances init"); + + stub_alloc_always_fails = true; + file_2 = find_or_create_file(&fake_thread, &dummy_file_class, "dummy", 5, true); + ok(file_2 == NULL, "oom (create file)"); stub_alloc_always_fails= false; file_1= find_or_create_file(&fake_thread, &dummy_file_class, "dummy", 5, true); @@ -245,10 +254,6 @@ void test_oom() release_file(file_1); cleanup_instruments(); - stub_alloc_always_fails= true; - file_2= find_or_create_file(&fake_thread, &dummy_file_class, "dummy", 5, true); - ok(file_2 == NULL, "oom (create file)"); - /* Create socket. */ stub_alloc_always_fails = false; rc = init_instruments(¶m); @@ -299,6 +304,10 @@ void test_oom() stub_alloc_fails_after_count= 2; thread= psi->new_thread(thread_key_1, NULL, 0); ok(thread == NULL, "oom (per thread wait)"); + + cleanup_sync_class(); + cleanup_thread_class(); + cleanup_file_class(); cleanup_instruments(); /* Thread waits history sizing. */ @@ -309,6 +318,8 @@ void test_oom() stub_alloc_fails_after_count= 3; thread= psi->new_thread(thread_key_1, NULL, 0); ok(thread == NULL, "oom (thread waits history sizing)"); + + cleanup_thread_class(); cleanup_instruments(); /* Per thread stages. */ @@ -318,6 +329,9 @@ void test_oom() stub_alloc_fails_after_count= 3; thread= psi->new_thread(thread_key_1, NULL, 0); ok(thread == NULL, "oom (per thread stages)"); + + cleanup_stage_class(); + cleanup_thread_class(); cleanup_instruments(); cleanup_stage_class(); @@ -328,7 +342,9 @@ void test_oom() stub_alloc_fails_after_count= 3; thread= psi->new_thread(thread_key_1, NULL, 0); ok(thread == NULL, "oom (thread stages history sizing)"); + cleanup_instruments(); + cleanup_thread_class(); /* Per thread statements. */ memset(¶m, 0, sizeof(param)); @@ -338,8 +354,11 @@ void test_oom() stub_alloc_fails_after_count= 3; thread= psi->new_thread(thread_key_1, NULL, 0); ok(thread == NULL, "oom (per thread statements)"); - cleanup_instruments(); + + cleanup_stage_class(); cleanup_statement_class(); + cleanup_thread_class(); + cleanup_instruments(); /* Thread statements history sizing. */ memset(¶m, 0, sizeof(param)); @@ -348,6 +367,8 @@ void test_oom() stub_alloc_fails_after_count= 3; thread= psi->new_thread(thread_key_1, NULL, 0); ok(thread == NULL, "oom (thread statements history sizing)"); + + cleanup_thread_class(); cleanup_instruments(); /* Per thread transactions. */ @@ -358,6 +379,8 @@ void test_oom() thread= psi->new_thread(thread_key_1, NULL, 0); ok(thread == NULL, "oom (per thread transactions)"); transaction_class_max= 0; + + cleanup_thread_class(); cleanup_instruments(); /* Thread transactions history sizing. */ @@ -367,6 +390,8 @@ void test_oom() stub_alloc_fails_after_count= 3; thread= psi->new_thread(thread_key_1, NULL, 0); ok(thread == NULL, "oom (thread transactions history sizing)"); + + cleanup_thread_class(); cleanup_instruments(); /* Global stages. */ @@ -381,8 +406,9 @@ void test_oom() ok(rc == 0, "init stage class"); rc= init_instruments(& param); ok(rc == 1, "oom (global stages)"); - cleanup_instruments(); + cleanup_stage_class(); + cleanup_instruments(); /* Global statements. */ memset(¶m, 0, sizeof(param)); @@ -396,8 +422,9 @@ void test_oom() ok(rc == 0, "init statement class"); rc= init_instruments(¶m); ok(rc == 1, "oom (global statements)"); - cleanup_instruments(); + cleanup_statement_class(); + cleanup_instruments(); /* Global memory. */ memset(¶m, 0, sizeof(param)); @@ -411,8 +438,9 @@ void test_oom() ok(rc == 0, "init memory class"); rc= init_instruments(& param); ok(rc == 1, "oom (global memory)"); - cleanup_instruments(); + cleanup_memory_class(); + cleanup_instruments(); } void do_all_tests() @@ -422,9 +450,9 @@ void do_all_tests() int main(int, char **) { - plan(28); + plan(32); MY_INIT("pfs_instr-oom-t"); do_all_tests(); - return 0; + return (exit_status()); } diff --git a/storage/perfschema/unittest/pfs_instr-t.cc b/storage/perfschema/unittest/pfs_instr-t.cc index 55a7ed1549f..1446be96a57 100644 --- a/storage/perfschema/unittest/pfs_instr-t.cc +++ b/storage/perfschema/unittest/pfs_instr-t.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2017, 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 Foundation, @@ -476,6 +483,6 @@ int main(int, char **) plan(103); MY_INIT("pfs_instr-t"); do_all_tests(); - return 0; + return (exit_status()); } diff --git a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc index ee8f589d9f8..5cd8907bf0e 100644 --- a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc +++ b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2017, 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 Foundation, @@ -101,6 +108,6 @@ int main(int, char **) plan(11); MY_INIT("pfs_instr_info-oom-t"); do_all_tests(); - return 0; + return (exit_status()); } diff --git a/storage/perfschema/unittest/pfs_instr_class-t.cc b/storage/perfschema/unittest/pfs_instr_class-t.cc index 3e7a6bb6c1f..27ab065d314 100644 --- a/storage/perfschema/unittest/pfs_instr_class-t.cc +++ b/storage/perfschema/unittest/pfs_instr_class-t.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2017, 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 Foundation, @@ -738,6 +745,6 @@ int main(int, char **) plan(209); MY_INIT("pfs_instr_info-t"); do_all_tests(); - return 0; + return (exit_status()); } diff --git a/storage/perfschema/unittest/pfs_misc-t.cc b/storage/perfschema/unittest/pfs_misc-t.cc index adf6446f3f7..0bd55f50ddf 100644 --- a/storage/perfschema/unittest/pfs_misc-t.cc +++ b/storage/perfschema/unittest/pfs_misc-t.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2017, 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 Foundation, @@ -83,5 +90,5 @@ int main(int, char **) plan(3); MY_INIT("pfs_misc-t"); do_all_tests(); - return exit_status(); + return (exit_status()); } diff --git a/storage/perfschema/unittest/pfs_noop-t.cc b/storage/perfschema/unittest/pfs_noop-t.cc index 6894798f588..8ef11371519 100644 --- a/storage/perfschema/unittest/pfs_noop-t.cc +++ b/storage/perfschema/unittest/pfs_noop-t.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2013, 2017, 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 Foundation, @@ -144,6 +151,7 @@ void test_noop() PSI_server->end_file_wait(NULL, 0); PSI_server->start_file_close_wait(NULL, NULL, 0); PSI_server->end_file_close_wait(NULL, 0); + PSI_server->end_file_rename_wait(NULL, NULL, NULL, 0); PSI_server->start_stage(1, NULL, 0); PSI_stage_progress *progress; @@ -229,6 +237,6 @@ int main(int, char **) MY_INIT("pfs_noop-t"); test_noop(); - return 0; + return (exit_status()); } diff --git a/storage/perfschema/unittest/pfs_server_stubs.cc b/storage/perfschema/unittest/pfs_server_stubs.cc index 54c48009a7e..9b62de0095c 100644 --- a/storage/perfschema/unittest/pfs_server_stubs.cc +++ b/storage/perfschema/unittest/pfs_server_stubs.cc @@ -1,13 +1,21 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2017, 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 @@ -39,3 +47,7 @@ void reset_status_vars() { } +void sql_print_warning(const char *format, ...) +{ + /* Do not pollute the unit test output with annoying messages. */ +} diff --git a/storage/perfschema/unittest/pfs_timer-t.cc b/storage/perfschema/unittest/pfs_timer-t.cc index b2be48dfd35..e1e1595df38 100644 --- a/storage/perfschema/unittest/pfs_timer-t.cc +++ b/storage/perfschema/unittest/pfs_timer-t.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2017, 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 Foundation, @@ -117,6 +124,6 @@ int main(int, char **) plan(5); MY_INIT("pfs_timer-t"); do_all_tests(); - return 0; + return (exit_status()); } diff --git a/storage/perfschema/unittest/pfs_user-oom-t.cc b/storage/perfschema/unittest/pfs_user-oom-t.cc index 398e686aac4..b6d805f9710 100644 --- a/storage/perfschema/unittest/pfs_user-oom-t.cc +++ b/storage/perfschema/unittest/pfs_user-oom-t.cc @@ -1,13 +1,20 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2017, 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 Foundation, @@ -133,6 +140,6 @@ int main(int, char **) plan(6); MY_INIT("pfs_user-oom-t"); do_all_tests(); - return 0; + return (exit_status()); } diff --git a/storage/perfschema/unittest/stub_global_status_var.h b/storage/perfschema/unittest/stub_global_status_var.h index b1c72ccea44..bfb06b4e0d5 100644 --- a/storage/perfschema/unittest/stub_global_status_var.h +++ b/storage/perfschema/unittest/stub_global_status_var.h @@ -1,13 +1,20 @@ /* Copyright (c) 2015, 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 Foundation, diff --git a/storage/perfschema/unittest/stub_pfs_defaults.h b/storage/perfschema/unittest/stub_pfs_defaults.h index f4fa24245d5..8f8594f1cc7 100644 --- a/storage/perfschema/unittest/stub_pfs_defaults.h +++ b/storage/perfschema/unittest/stub_pfs_defaults.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 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 diff --git a/storage/perfschema/unittest/stub_pfs_global.h b/storage/perfschema/unittest/stub_pfs_global.h index c883927b040..8a18259203b 100644 --- a/storage/perfschema/unittest/stub_pfs_global.h +++ b/storage/perfschema/unittest/stub_pfs_global.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, diff --git a/storage/perfschema/unittest/stub_print_error.h b/storage/perfschema/unittest/stub_print_error.h index fe9857a5348..26a439a54ab 100644 --- a/storage/perfschema/unittest/stub_print_error.h +++ b/storage/perfschema/unittest/stub_print_error.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, 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 Foundation, |