この記事は ConoHaのカレンダー | Advent Calendar 2023 と MySQLのカレンダー | Advent Calendar 2023 の5日目の記事です。
去年は CentOS 9 Stream でビルドしたらしい。
- 日々の覚書: また今年もConoHaの上でMySQLをビルドする季節がやってきた
- 2021年 ConoHaの上でひたすらMySQLをビルドする 2021
-
2020年 日々の覚書: 今年もConoHa …
この記事は ConoHaのカレンダー | Advent Calendar 2023 と MySQLのカレンダー | Advent Calendar 2023 の5日目の記事です。
去年は CentOS 9 Stream でビルドしたらしい。
2020年 日々の覚書: 今年もConoHa …
TL;DR
呼び出し元 | エントリーポイント | リスト関数 |
---|---|---|
SHOW PROCESSLIST (option=OFF) | mysqld_list_processes | Global_THD_manager::do_for_all_thd_copy |
information_schema.processlist | fill_schema_processlist | Global_THD_manager::do_for_all_thd_copy |
performance_schema.processlist | table_processlist::make_row | table_processlist::read_row_values |
SHOW PROCESSLIST (option=ON) | table_processlist::make_row | table_processlist::read_row_values |
Global_THD_manager::do_for_all_thd_copy
は …TL;DR
cmake
する時に -DMINIMAL_RELWITHDEBINFO=OFF
する
gdbでmysqldにアタッチした時に色々見つからなくて困った。thdとか全然見えない。
$ gdb -p $(pidof mysqld)
(gdb) b PT_show_processlist::make_cmd
+b PT_show_processlist::make_cmd
Breakpoint 1 at 0x122eaec: file /home/yoku0825/mysql-8.0.35/sql/parse_tree_nodes.cc, line 2722.
(gdb) c
+c
Continuing.
[Switching to Thread 0x7fe5dc2e9700 (LWP 13041)]
Breakpoint 1, PT_show_processlist::make_cmd () at /home/yoku0825/mysql-8.0.35/sql/parse_tree_nodes.cc:2722
2722 lex->sql_command = m_sql_command;
(gdb) n
+n
2725 bool use_pfs = pfs_processlist_enabled;
(gdb) n
+n
2727 m_sql_cmd.set_use_pfs(use_pfs);
(gdb) p use_pfs
+p use_pfs
No symbol "use_pfs" in current context.
(gdb) n
+n
2728 if (use_pfs) {
(gdb) p use_pfs …
[さらに読む]
TL;DR
user@'%'
と user@'xxx'
の
両方があって 認証が ‘xxx’ の方で行われた場合
、そのセッションは user@'%'
と user@'xxx'
の両方の権限を持つ謎仕様があった
In addition, the treatment of
%by the server as a synonym for localhost when checking
privileges (that is, privileges granted to 'myuser'@'%' are also
granted to 'myuser'@'localhost') is now also deprecated as of
MySQL 8.2.0 and thus also subject to removal in a future version
of MySQL. (WL #14280, WL #15676)
はこれを指しているような気がする