[EOSIO/eos] SQL plugin (#3882)

Some sql error exists in the nodeos log, and the nodeos force quit. Yet I have to delete blocks file of EOS blockchain and eos database in MySQL to force resync, how to avoid and solve this problem?

When sync to `zhengjinhua1`, and nodoes exit. The log as follows:

«` bash
terminate called after throwing an instance of ‘soci::mysql_soci_error’
what(): Out of range value for column ‘amount’ at row 1 while executing «INSERT INTO tokens(account, amount, symbol) VALUES (:ac, :am, :as) » with :ac=»zhengjinhua1″, :am=1e+10, :as=»UXB».
«`

The amount filed of tokens table defines double(14,4), but 1e+10 means 10 billion, it exceed the maximum. It should change to double(64,4), the command as follows:

«` sql
ALTER TABLE tokens CHANGE amount amount double(64,4) DEFAULT NULL;
«`

Добавить комментарий