Open wildwind123 opened 6 months ago
on this mysql query, does not return error, and return empty rows, if query is locked for update
rows, err := sqlx.Query("select id from payment where status in (1, 2) for update nowait;")
should return error like
SQL Error [3572] [HY000]: Statement aborted because lock(s) could not be acquired immediately and NOWAIT is set.
but error is return on QueryRow
row := sqlx.QueryRow("select id from payment where status in (1, 2) for update nowait;") var id int err = row.Scan(&id) if err != nil { t.Error(err) }
how make get err on sqlx.Query ?
on this mysql query, does not return error, and return empty rows, if query is locked for update
should return error like
but error is return on QueryRow
how make get err on sqlx.Query ?