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
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.SQLException; | |
public class MySQLConnectionExample { | |
// Define JDBC URL (database name, host, and port can be modified as needed) | |
private static final String URL_format = "jdbc:mysql://127.0.0.1:64080/d1?useSSL=%s&allowPublicKeyRetrieval=%s"; | |
public static void main(String[] args) { | |
// Ensure that both username and password are provided as arguments |
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
(gdb) b create_temp_file | |
+b create_temp_file | |
Breakpoint 1 at 0x206c8da: file /home/yoku0825/mysql-8.0.38/mysys/mf_tempfile.cc, line 277. | |
(gdb) c | |
+c | |
Continuing. | |
[Switching to Thread 0x7f2da46f6700 (LWP 2201)] | |
Breakpoint 1, create_temp_file (to=to@entry=0x7f2da46efa30 "\240\372n\244-\177", dir=dir@entry=0x50262f0 "/tmp", prefix=prefix@entry=0x315be9f "ib", mode=mode@entry=194, | |
unlink_or_keep=unlink_or_keep@entry=UNLINK_FILE, MyFlags=MyFlags@entry=16) at /home/yoku0825/mysql-8.0.38/mysys/mf_tempfile.cc:277 |
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) |
NewerOlder