Open bsom opened 10 years ago
got the same problem
edit: just changed MAX_SCRIPT to 65000 (line 92 in DataStore.py) as a temp. workaround. I don't know if this has any negative effects. The blocks are parsing to my DB now.
is this still the recommended solution? Im trying to get abe working on windows, using pymysql
If you are working with a version of MySQL of 5.7.5 or greater then they made "STRICT_TRANS_TABLES" a default setting in the config file. So you have a couple options,
Then check by "show variables;"
Will fix the problem.
I think the proper fix would be setting up the column to use MEDIUMBLOB
, as suggested by the error message (MEDIUMBLOB
supports up to 16MiB values and costs one more byte over BLOB
which is limited to 64k like VARBINARY
).
In the mean time removing the STRICT_TRANS_TABLES
mode will issue a warning and create the column as MEDIUMBLOB
.
Namecoin is known to fail loading due to the scriptPubKey limit with MAX_SCRIPT=10000
(the old default); AFAIK as long as blocks are loading fine there is no drawbacks of running with a smaller column size, except one day it may fail and you may have to alter your table with a longer scriptPubKey (Better do it early while the table is smaller).
where this document datastore.py
The following error occurs when trying to create a new database:
_mysql_exceptions.OperationalError: (1074, "Column length too big for column 'txout_scriptPubKey' (max = 65535); use BLOB or TEXT instead")
Appears to be a problem with line 90 in DataStore.py: MAX_SCRIPT = 1000000
The comment before this line indicates that this number is the number of bytes for the script column, but the database appears interpret this as the raw length in characters.