This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mysql -h172.17.0.2 -vve "SELECT @@version; DROP DATABASE IF EXISTS d1;CREATE DATABASE d1; CREATE TABLE d1.t1 (num int, KEY(num)); CREAT | |
E TABLE d1.t2 (num int, KEY(num), FOREIGN KEY (num) REFERENCES t1(num)); DROP DATABASE d1;" | |
-------------- | |
SELECT @@version | |
-------------- | |
+-----------+ | |
| @@version | | |
+-----------+ | |
| 8.3.0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Breakpoint 1, push_warning_printf (thd=thd@entry=0x7f7244b6dd30, severity=severity@entry=Sql_condition::SL_WARNING, code=code@entry=3170, | |
format=0x7f729d06a9a4 "Memory capacity of %llu bytes for '%s' exceeded. %s") at /home/yoku0825/mysql-8.0.36/sql/sql_error.cc:692 | |
692 if (format == nullptr) format = ER_THD_NONCONST(thd, code); | |
(gdb) bt | |
+bt | |
#0 push_warning_printf (thd=thd@entry=0x7f7244b6dd30, severity=severity@entry=Sql_condition::SL_WARNING, code=code@entry=3170, | |
format=0x7f729d06a9a4 "Memory capacity of %llu bytes for '%s' exceeded. %s") at /home/yoku0825/mysql-8.0.36/sql/sql_error.cc:692 | |
#1 0x0000000000ce4123 in handle_condition (sql_errno=34, level=<optimized out>, thd=0x7f7244b6dd30, this=<optimized out>) | |
at /home/yoku0825/mysql-8.0.36/sql/range_optimizer/internal.h:90 | |
#2 Range_optimizer_error_handler::handle_condition (this=<optimized out>, thd=0x7f7244b6dd30, sql_errno=<optimized out>, level=<optimized out>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd client | |
/opt/rh/devtoolset-11/root/usr/bin/g++ \ | |
-std=c++17 \ | |
-fno-omit-frame-pointer \ | |
-ftls-model=initial-exec \ | |
-B/opt/rh/devtoolset-11/root/usr/bin \ | |
\ | |
-O2 \ | |
-g \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql81 9> SHOW PARSE_TREE SELECT user, host, db, user.select_priv AS global_select, db.select_priv AS schema_select FROM mysql.user LEFT JOIN mysql.db USING(user, host)\G | |
*************************** 1. row *************************** | |
Show_parse_tree: { | |
"text": "SELECT user, host, db, user.select_priv AS global_select, db.select_priv AS schema_select FROM mysql.user LEFT JOIN mysql.db USING(user, host)", | |
"type": "PT_select_stmt", | |
"components": [ | |
{ | |
"text": "SELECT user, host, db, user.select_priv AS global_select, db.select_priv AS schema_select FROM mysql.user LEFT JOIN mysql.db USING(user, host)", | |
"type": "PT_query_expression", | |
"components": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------------------- | |
n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) | |
-------------------------------------------------------------------------------- | |
85 54,500,074,813 21,078,405,512 20,888,346,655 190,058,857 0 | |
86 54,512,142,231 21,078,405,512 20,888,346,655 190,058,857 0 | |
99.10% (20,888,346,655B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. | |
->40.12% (8,455,717,998B) 0x2078B1C: allocate (new_allocator.h:127) | |
| ->40.12% (8,455,717,998B) 0x2078B1C: allocate (alloc_traits.h:460) | |
| ->40.12% (8,455,717,998B) 0x2078B1C: _M_allocate (stl_vector.h:346) | |
| ->40.12% (8,455,717,998B) 0x2078B1C: void std::vector<unsigned char, std::allocator<unsigned char> >::_M_realloc_insert<unsigned char>(__gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MYSQL_ADD_PLUGIN(i_s_pid | |
i_s_pid.cc | |
MODULE_ONLY | |
MODULE_OUTPUT_NAME "i_s_pid" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ strace -e write /usr/mysql/8.0.30/bin/mysql -S /usr/mysql/8.0.30/data/mysql.sock -P 64080 --prompt="mysql80 \C> " -e "SELECT 1" | |
write(1, "+---+\n", 6+---+ | |
) = 6 | |
write(1, "| 1 |\n", 6| 1 | | |
) = 6 | |
write(1, "+---+\n", 6+---+ | |
) = 6 | |
write(1, "| 1 |\n", 6| 1 | | |
) = 6 | |
write(1, "+---+\n", 6+---+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql80 15> SHOW CREATE TABLE t1\G | |
*************************** 1. row *************************** | |
Table: t1 | |
Create Table: CREATE TABLE `t1` ( | |
`num` bigint unsigned NOT NULL AUTO_INCREMENT /*!80023 INVISIBLE */, | |
`val` varchar(32) COLLATE utf8mb4_ja_0900_as_cs DEFAULT NULL, | |
UNIQUE KEY `num` (`num`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_ja_0900_as_cs | |
1 row in set (0.00 sec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
master [localhost] {msandbox} ((none)) > ALTER TABLE d1.t1 ADD dummy_uuid VARCHAR(36) DEFAULT NULL UNIQUE; | |
Query OK, 0 rows affected (0.03 sec) | |
Records: 0 Duplicates: 0 Warnings: 0 | |
master [localhost] {msandbox} ((none)) > INSERT INTO d1.t1 VALUES (3, UUID()); | |
Query OK, 1 row affected (0.00 sec) | |
$ ./use_all -e "SELECT * FROM d1.t1" | |
# master | |
num dummy_uuid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
binlog_row_image = MINIMAL ### バイナリログのエントリあたりの容量を削減 | |
default_authentication_plugin = mysql_native_password ### 5.7, MariaDBとかから載せ替えるなら | |
event_scheduler = OFF ### 使ってなければお好みで。メモリリークあり | |
information_schema_stats_expiry = 0 ### SHOW TABLE STATUSが更新されない件 | |
innodb_buffer_pool_size = ? | |
skip-innodb_doublewrite ### 永続性そっちのけならアリ | |
innodb_flush_log_at_trx_commit = 2 ### 実はこれより ALTER INSTANCE DISABLE INNODB REDO_LOGの方が効く。ALTER INSTANCE .. はib_logfileに書き込まれるので対応するオプションはない。あと、正常終了しなかったときに二度と起動しなくなる | |
innodb_flush_method = O_DIRECT_NO_FSYNC | |
innodb_log_writer_threads = OFF ### もしCPU性能が低いVMとかの場合、これをOFFにするとちょっと速くなることがある |
NewerOlder