The issue seems to be that even though the structures are unlonglong and longlong is stored, the schema seems to be MYSQL_TYPE_LONG
{"BYTES_RECEIVED", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONG, 0, 0, "Bytes_received", SKIP_OPEN_TABLE}, {"BYTES_SENT", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONG, 0, 0, "Bytes_sent", SKIP_OPEN_TABLE}, {"BINLOG_BYTES_WRITTEN", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONG, 0, 0, "Binlog_bytes_written", SKIP_OPEN_TABLE},
Also,
table->field[6]->store((longlong)user_stats->bytes_received); table->field[7]->store((longlong)user_stats->bytes_sent); table->field[8]->store((longlong)user_stats->binlog_bytes_written);
So, MYSQL_TYPE_LONGLONG needs to used instead of MYSQL_TYPE_LONG and ulonglong instead of longlong in ->store()
Same for other fields and other similar tables.
The issue seems to be that even though the structures are unlonglong and longlong is stored, the schema seems to be MYSQL_TYPE_LONG
{"BYTES_ RECEIVED" , MY_INT64_ NUM_DECIMAL_ DIGITS, MYSQL_TYPE_LONG, 0, 0, "Bytes_received", SKIP_OPEN_TABLE}, NUM_DECIMAL_ DIGITS, MYSQL_TYPE_LONG, 0, 0, "Bytes_sent", SKIP_OPEN_TABLE}, BYTES_WRITTEN" , MY_INT64_ NUM_DECIMAL_ DIGITS, MYSQL_TYPE_LONG, 0, 0, "Binlog_ bytes_written" , SKIP_OPEN_TABLE},
{"BYTES_SENT", MY_INT64_
{"BINLOG_
Also,
table- >field[ 6]->store( (longlong) user_stats- >bytes_ received) ; >field[ 7]->store( (longlong) user_stats- >bytes_ sent); >field[ 8]->store( (longlong) user_stats- >binlog_ bytes_written) ;
table-
table-
So, MYSQL_TYPE_LONGLONG needs to used instead of MYSQL_TYPE_LONG and ulonglong instead of longlong in ->store()
Same for other fields and other similar tables.