Skip to content
New issue

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

MYSQL: Issue recognizing FLOAT / DECIMAL column type #25

Open
maksimovic opened this issue Apr 24, 2021 · 0 comments
Open

MYSQL: Issue recognizing FLOAT / DECIMAL column type #25

maksimovic opened this issue Apr 24, 2021 · 0 comments
Labels
bug Something isn't working hacktoberfest help wanted Extra attention is needed

Comments

@maksimovic
Copy link

maksimovic commented Apr 24, 2021

sqlfuzz complains with unknown field type when it stumbles upon a column defined as FLOAT which doesn't have explicit length defined.

I also suspect that it has problems when it's actually defined. For example, I get this error on a table having DECIMAL(25,6):

panic: strconv.Atoi: parsing "6unsigned": invalid syntax

goroutine 25 [running]:
github.com/PumpkinSeed/sqlfuzz/drivers.length(0xc000144e60, 0x16, 0x13b1150, 0x7, 0xc00012d15a, 0x1, 0x1)
	/Users/loow/gopath/src/github.com/PumpkinSeed/sqlfuzz/drivers/helpers.go:24 +0x4b7
github.com/PumpkinSeed/sqlfuzz/drivers.MySQL.MapField(0x7ffeefbffaa3, 0x8, 0x7ffeefbffaaf, 0x6, 0x7ffeefbffab9, 0x15, 0x7ffeefbffad2, 0x9, 0x7ffeefbffadf, 0x4, ...)
	/Users/loow/gopath/src/github.com/PumpkinSeed/sqlfuzz/drivers/mysql.go:128 +0x9d3
github.com/PumpkinSeed/sqlfuzz/pkg/action.generateData(0x1457160, 0xc00012b620, 0xc000144e40, 0x15, 0xc000144e60, 0x16, 0xc00012ce79, 0x3, 0x0, 0x0, ...)
	/Users/loow/gopath/src/github.com/PumpkinSeed/sqlfuzz/pkg/action/action.go:117 +0x79
github.com/PumpkinSeed/sqlfuzz/pkg/action.SQLInsertInput.singleInsert(0xc0001548c0, 0x0, 0x13aac01, 0x101)
	/Users/loow/gopath/src/github.com/PumpkinSeed/sqlfuzz/pkg/action/action.go:107 +0x338
github.com/PumpkinSeed/sqlfuzz/pkg/action.SQLInsertInput.Insert(0xc0001548c0, 0x0, 0x7ffeefbffa01, 0x8)
	/Users/loow/gopath/src/github.com/PumpkinSeed/sqlfuzz/pkg/action/action.go:42 +0xb8
github.com/PumpkinSeed/sqlfuzz/pkg/fuzzer.worker(0xc0001025a0, 0xc00012d130, 0x7ffeefbffaa3, 0x8, 0x7ffeefbffaaf, 0x6, 0x7ffeefbffab9, 0x15, 0x7ffeefbffad2, 0x9, ...)
	/Users/loow/gopath/src/github.com/PumpkinSeed/sqlfuzz/pkg/fuzzer/runner.go:50 +0x145
created by github.com/PumpkinSeed/sqlfuzz/pkg/fuzzer.runHelper
	/Users/loow/gopath/src/github.com/PumpkinSeed/sqlfuzz/pkg/fuzzer/runner.go:28 +0x138
@maksimovic maksimovic changed the title Issue recognizing FLOAT column type (MySQL) MYSQL: Issue recognizing FLOAT / DECIMAL column type Apr 24, 2021
@PumpkinSeed PumpkinSeed added the bug Something isn't working label Apr 24, 2021
@PumpkinSeed PumpkinSeed added help wanted Extra attention is needed hacktoberfest labels Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants