Description:
libmysql/libmysql.cc:3101:59: runtime error: 1.84467e+19 is outside the range of representable values of type 'unsigned long long'
#0 0x65dce0 in fetch_long_with_conversion(MYSQL_BIND*, MYSQL_FIELD*, long long, bool) libmysql/libmysql.cc:3101:59
#1 0x652960 in fetch_result_with_conversion(MYSQL_BIND*, MYSQL_FIELD*, unsigned char**) libmysql/libmysql.cc:3359:7
#2 0x651b3f in stmt_fetch_row(MYSQL_STMT*, unsigned char*) libmysql/libmysql.cc:3886:7
#3 0x65146a in mysql_stmt_fetch libmysql/libmysql.cc:3930:14
#4 0x4ca985 in test_bug3035() testclients/mysql_client_test.cc:9522:8
#5 0x4a594d in main testclients/mysql_client_fw.cc:1253:52
libmysql/libmysql.cc:3200:37: runtime error: -1.23457e+10 is outside the range of representable values of type 'unsigned long long'
#0 0x65ece7 in fetch_float_with_conversion(MYSQL_BIND*, MYSQL_FIELD*, double, my_gcvt_arg_type) libmysql/libmysql.cc:3200:37
#1 0x6528e6 in fetch_result_with_conversion(MYSQL_BIND*, MYSQL_FIELD*, unsigned char**) libmysql/libmysql.cc:3375:7
#2 0x651b3f in stmt_fetch_row(MYSQL_STMT*, unsigned char*) libmysql/libmysql.cc:3887:7
#3 0x65146a in mysql_stmt_fetch libmysql/libmysql.cc:3931:14
#4 0x4d5e54 in test_truncation() testclients/mysql_client_test.cc:11915:8
#5 0x4a594d in main testclients/mysql_client_fw.cc:1253:52
How to repeat:
build with clang/ubsan
/mtr --mem --sanitize main.mysql_client_test
Suggested fix:
check for overflow