We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
centos7.9 gcc 4.8.5 obconnector-c v2.2.1 Prepared Statement 接口
使用stmt接口查询time类型数据,出现数据丢失问题
CREATE TABLE `c_time1` ( `c_time` time(6) DEFAULT NULL ); insert into c_time2 values ('511:2:3.0');
使用gdb查看数据,收到的数据为255:2:3.0
(gdb) s ma_net_safe_read (mysql=0x694440) at /root/obconnector-c/libmariadb/mariadb_lib.c:281 281 { (gdb) n 283 ulong len=0; (gdb) n 281 { (gdb) n 289 if (len == packet_error || len == 0) (gdb) n 281 { (gdb) n 311 if (cli_report_progress(mysql, (uchar *)pos, (uint) (len-1))) (gdb) n 286 if (net->pvio != 0) (gdb) n 287 len=ma_net_read(net); (gdb) n 289 if (len == packet_error || len == 0) (gdb) p *(net->buff+3)@10 $164 = "\000\000\000\000\000\377\002\003\000" (gdb) p /t *(net->buff+3)@10 $165 = {0, 0, 0, 0, 0, 11111111, 10, 11, 0, 0} (gdb) p /t *(net->buff)@10 $166 = {0, 0, 1100, 0, 0, 0, 0, 0, 11111111, 10} (gdb) p *(net->buff+2) $167 = 12 '\f' (gdb) (gdb) p /t *(net->buff)@16 $188 = {0, 0, 1100, 0, 0, 0, 0, 0, 11111111, 10, 11, 0, 0, 0, 0, 0} (gdb) p /d *(net->buff)@16 $189 = {0, 0, 12, 0, 0, 0, 0, 0, 255, 2, 3, 0, 0, 0, 0, 0} (gdb)
mysql模式下time类型的数据,数据库中的数据为511:2:3.0 使用stmt接口时,收到的数据为255:2:3.0
No response
(gdb) p /d (net->buff)@12 $5 = {0, 0, 8, 0, 21, 0, 0, 0, 7, 2, 3, 0} 在mysql数据库中将时间转换成了天数,511=2124+7
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Check Before Asking
Environment
Fast Reproduce Steps
使用stmt接口查询time类型数据,出现数据丢失问题
使用gdb查看数据,收到的数据为255:2:3.0
Actual Behavior
mysql模式下time类型的数据,数据库中的数据为511:2:3.0
使用stmt接口时,收到的数据为255:2:3.0
Expected Behavior
No response
Other Information
(gdb) p /d (net->buff)@12
$5 = {0, 0, 8, 0, 21, 0, 0, 0, 7, 2, 3, 0}
在mysql数据库中将时间转换成了天数,511=2124+7
The text was updated successfully, but these errors were encountered: