PoC-Consortium / Nogrod

The all-new PoCC pool software; "Fortunes are mined here"
Other
47 stars 33 forks source link

Nogrod 1.4.0 You have an error in your SQL syntax #42

Closed TateA closed 5 years ago

TateA commented 5 years ago
# go version
go version go1.11.2 linux/amd64
mysql -v
Server version: 10.0.36-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04

Running on Ubuntu Server 16.04.5 LTS

This is a new database that Nogrod is running on. I created the database with Collation set to utf8mb4_general_ci. When I start Nogrod it created the tables. Ran good for about a day now im getting this, and then it dies.

{"level":"info","ts":1544463455.2362452,"caller":"wallethandler/wallethandler.go:216","msg":"checking if block was won","generator":6870823970895666698,"nonce":12579318641387556672,"expected generator":3738294266252060771,"expected nonce":16151709031885217736,"was won":false,"height":565328}
panic: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IF EXISTS(SELECT 1 FROM block WHERE height = ?) THEN
                        UPD' at line 1

goroutine 59 [running]:
github.com/jmoiron/sqlx.MustExec(0xb606e0, 0xc0002680c0, 0xad2c95, 0x122, 0xc001f00680, 0x4, 0x4, 0xc001e1ce00, 0xc001f25f38)
    /root/go/pkg/mod/github.com/jmoiron/sqlx@v1.2.0/sqlx.go:718 +0xba
github.com/jmoiron/sqlx.(*DB).MustExec(0xc0002680c0, 0xad2c95, 0x122, 0xc001f00680, 0x4, 0x4, 0x0, 0x0)
    /root/go/pkg/mod/github.com/jmoiron/sqlx@v1.2.0/sqlx.go:370 +0x70
github.com/PoC-Consortium/Nogrod/pkg/modelx.(*Modelx).validateTransactions(0xc0002b2090)
    /root/nogrod-1.4.0/pkg/modelx/modelx.go:942 +0x472
github.com/PoC-Consortium/Nogrod/pkg/modelx.(*Modelx).Payout(0xc0002b2090)
    /root/nogrod-1.4.0/pkg/modelx/modelx.go:1006 +0x39
github.com/PoC-Consortium/Nogrod/pkg/pool.(*Pool).jobs(0xc0002f5920)
    /root/nogrod-1.4.0/pkg/pool/pool.go:170 +0x195
created by github.com/PoC-Consortium/Nogrod/pkg/pool.(*Pool).Run
    /root/nogrod-1.4.0/pkg/pool/pool.go:410 +0x3f
TateA commented 5 years ago

Updated MariaDB, so far running good! Server version: 10.1.37-MariaDB-1~xenial mariadb.org binary distribution