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
I find that the length of h_data field in the history table is 24.
h_data
mysql> desc history1; +----------+--------------+------+------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+--------------+------+------+---------+-------+ | h_c_id | int(11) | YES | | NULL | | | h_c_d_id | tinyint(4) | YES | | NULL | | | h_c_w_id | smallint(6) | YES | MUL | NULL | | | h_d_id | tinyint(4) | YES | | NULL | | | h_w_id | smallint(6) | YES | MUL | NULL | | | h_date | datetime | YES | | NULL | | | h_amount | decimal(6,2) | YES | | NULL | | | h_data | varchar(24) | YES | | NULL | | +----------+--------------+------+------+---------+-------+ 8 rows in set (0.00 sec)
but https://github.com/Percona-Lab/sysbench-tpcc/blob/master/tpcc_run.lua#L406 inserts a data which length is 25, so here we will meet a warning, I reproduce it in MySQL 5.7.
mysql> INSERT INTO history1 (h_c_d_id, h_c_w_id, h_c_id, h_d_id, h_w_id, h_date, h_amount, h_data) VALUES (6,1,642,6,1,NOW(),5,'name-ussgn name-zamed '); Query OK, 1 row affected, 1 warning (0.00 sec) mysql> SHOW WARNINGS; +-------+------+---------------------------------------------+ | Level | Code | Message | +-------+------+---------------------------------------------+ | Note | 1265 | Data truncated for column 'h_data' at row 1 | +-------+------+---------------------------------------------+ 1 row in set (0.00 sec)
Do we need to adjust to insert 24 chars or alert the history field length?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I find that the length of
h_data
field in the history table is 24.but https://github.com/Percona-Lab/sysbench-tpcc/blob/master/tpcc_run.lua#L406 inserts a data which length is 25, so here we will meet a warning, I reproduce it in MySQL 5.7.
Do we need to adjust to insert 24 chars or alert the history field length?
The text was updated successfully, but these errors were encountered: