|
when adding a breakpoint to the function mariadb_reconnect
my_bool STDCALL mariadb_reconnect(MYSQL *mysql)
|
the first call as an extension clean
(gdb) p * (mysql->extension)
|
$5 = {
|
conn_hdlr = 0x133b140,
|
session_state = {[0] = {
|
list = 0x0,
|
current = 0x0
|
},
|
[1] = {
|
list = 0x0,
|
current = 0x0
|
},
|
[2] = {
|
list = 0x0,
|
current = 0x0
|
},
|
[3] = {
|
list = 0x0,
|
current = 0x0
|
},
|
[4] = {
|
list = 0x0,
|
current = 0x0
|
},
|
[5] = {
|
list = 0xffffffff,
|
current = 0x0
|
}},
|
mariadb_client_flag = 13344912537984083775,
|
mariadb_server_capabilities = 0
|
}
|
but the second call to mariadb_reconnect chas a corrupted extension...
|
(gdb) p * (mysql->extension)
|
$8 = {
|
conn_hdlr = 0x202020202020200a,
|
session_state = {[0] = {
|
list = 0x7465722420796d20,
|
current = 0x43203d20206c6176
|
},
|
[1] = {
|
list = 0x65706f3a3a45524f,
|
current = 0x2c5d305b5f24286e
|
},
|
[2] = {
|
list = 0x202c5d315b5f2420,
|
current = 0x23242e2e325b5f40
|
},
|
[3] = {
|
list = 0x2020200a3b295d5f,
|
current = 0x20796d2020202020
|
},
|
[4] = {
|
list = 0x747865746e6f6324,
|
current = 0x6c61637322203d20
|
},
|
[5] = {
|
list = 0x2020200a3b227261,
|
current = 0x6d67617270200020
|
}},
|
mariadb_client_flag = 34745805432496225,
|
mariadb_server_capabilities = 128
|
}
|
the mysql object itself seems valid
|
p *mysql
|
$9 = {
|
net = {
|
pvio = 0x0,
|
buff = 0x0,
|
buff_end = 0x1339b00 "autodie",
|
write_pos = 0x1337b00 "s;\n }\n \n my $retval = CORE::open($_[0]);\n my $context = \"scalar\";\n \n\n \n die autodie->throw(\n", ' ' <repeats 12 times>, "function => q{CORE::open}, args => [ $_[0] ],\n "...,
|
read_pos = 0x1337b00 "s;\n }\n \n my $retval = CORE::open($_[0]);\n my $context = \"scalar\";\n \n\n \n die autodie->throw(\n", ' ' <repeats 12 times>, "function => q{CORE::open}, args => [ $_[0] ],\n "...,
|
fd = -1,
|
remain_in_buf = 0,
|
length = 0,
|
buf_length = 0,
|
where_b = 0,
|
max_packet = 8192,
|
max_packet_size = 1073741824,
|
pkt_nr = 1,
|
compress_pkt_nr = 0,
|
write_timeout = 0,
|
read_timeout = 30,
|
retry_count = 0,
|
fcntl = 0,
|
return_status = 0x0,
|
reading_or_writing = 0 '\000',
|
save_char = 0 '\000',
|
unused_1 = 0 '\000',
|
unused_2 = 0 '\000',
|
compress = 0 '\000',
|
unused_3 = 0 '\000',
|
unused_4 = 0x0,
|
last_errno = 0,
|
error = 0 '\000',
|
unused_5 = 0 '\000',
|
unused_6 = 0 '\000',
|
last_error = '\000' <repeats 511 times>,
|
sqlstate = "00000",
|
extension = 0x133b760
|
},
|
unused_0 = 0x0,
|
host = 0x0,
|
user = 0x0,
|
passwd = 0x0,
|
unix_socket = 0x0,
|
server_version = 0x0,
|
host_info = 0x0,
|
info = 0x0,
|
db = 0x0,
|
charset = 0x7fffeef5d428 <mariadb_compiled_charsets+360>,
|
fields = 0x0,
|
field_alloc = {
|
free = 0x0,
|
used = 0x0,
|
pre_alloc = 0x0,
|
min_malloc = 32,
|
block_size = 8168,
|
block_num = 4,
|
first_block_usage = 0,
|
error_handler = 0x0
|
},
|
affected_rows = 18446744073709551615,
|
insert_id = 0,
|
extra_info = 0,
|
thread_id = 5250,
|
packet_length = 0,
|
port = 3306,
|
client_flag = 10461711,
|
server_capabilities = 2155870207,
|
protocol_version = 10,
|
field_count = 0,
|
server_status = 2,
|
server_language = 8,
|
warning_count = 0,
|
options = {
|
connect_timeout = 0,
|
read_timeout = 0,
|
write_timeout = 0,
|
port = 0,
|
protocol = 0,
|
client_flag = 0,
|
host = 0x0,
|
user = 0x0,
|
password = 0x0,
|
unix_socket = 0x0,
|
db = 0x0,
|
init_command = 0x0,
|
my_cnf_file = 0x0,
|
my_cnf_group = 0x0,
|
charset_dir = 0x0,
|
charset_name = 0x0,
|
ssl_key = 0x0,
|
ssl_cert = 0x0,
|
ssl_ca = 0x0,
|
ssl_capath = 0x0,
|
ssl_cipher = 0x0,
|
shared_memory_base_name = 0x0,
|
max_allowed_packet = 0,
|
use_ssl = 0 '\000',
|
compress = 0 '\000',
|
named_pipe = 0 '\000',
|
reconnect = 0 '\000',
|
unused_1 = 0 '\000',
|
unused_2 = 0 '\000',
|
unused_3 = 0 '\000',
|
methods_to_use = MYSQL_OPT_CONNECT_TIMEOUT,
|
bind_address = 0x0,
|
secure_auth = 0 '\000',
|
report_data_truncation = 0 '\000',
|
local_infile_init = 0x0,
|
local_infile_read = 0x0,
|
local_infile_end = 0x0,
|
local_infile_error = 0x0,
|
local_infile_userdata = 0x0,
|
extension = 0x0
|
},
|
status = MYSQL_STATUS_READY,
|
free_me = 0 '\000',
|
unused_1 = 0 '\000',
|
scramble_buff = "lv,s!F~it-|LFZqJ[m3R",
|
unused_2 = 0 '\000',
|
unused_3 = 0x0,
|
unused_4 = 0x0,
|
unused_5 = 0x0,
|
unused_6 = 0x0,
|
stmts = 0x0,
|
methods = 0x7fffeef65920 <MARIADB_DEFAULT_METHODS>,
|
thd = 0x0,
|
unbuffered_fetch_owner = 0x0,
|
info_buffer = 0x0,
|
extension = 0x1333830
|
}
|
the extension address is the same between the two calls but something clear it or corrupt it
|