• Daniel Theophanes's avatar
    database/sql: check for arg counts after eliminating arguments · 262141a1
    Daniel Theophanes authored
    Check for the expected number of arguments in a SQL statement
    after arguments are eliminated in the argument converter.
    
    This situation was already tested for in TestNamedValueChecker.
    However the test used Exec which didn't have any check for
    NumInput on it at all, thus this issue was never caught.
    
    In addition to moving the NumInput check on the Query
    methods after the converter, add the NumInput check
    to the Exec methods as well.
    
    Fixes #22630
    
    Change-Id: If45920c6e1cf70dca63822a0cedec2cdc5cc611c
    Reviewed-on: https://go-review.googlesource.com/76732
    Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    262141a1
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...