go-mysql icon indicating copy to clipboard operation
go-mysql copied to clipboard

fix Fingerprint fi overflow cause index out of range panic

Open martianzhang opened this issue 6 years ago • 5 comments

sql: insert into tb values(1)
Fingerprint(sql) got panic: index out of range

image

martianzhang avatar Mar 29 '18 07:03 martianzhang

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 29 '18 07:03 CLAassistant

Codecov Report

Merging #30 into master will decrease coverage by 0.09%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #30     +/-   ##
=========================================
- Coverage   63.91%   63.82%   -0.1%     
=========================================
  Files           8        8             
  Lines        1416     1418      +2     
=========================================
  Hits          905      905             
- Misses        400      401      +1     
- Partials      111      112      +1
Impacted Files Coverage Δ
query/query.go 65.5% <0%> (-0.23%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 847a20d...9e53ee8. Read the comment docs.

codecov[bot] avatar Mar 29 '18 07:03 codecov[bot]

Codecov Report

Merging #30 into master will increase coverage by 0.04%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #30      +/-   ##
==========================================
+ Coverage   67.02%   67.07%   +0.04%     
==========================================
  Files           7        7              
  Lines        1389     1391       +2     
==========================================
+ Hits          931      933       +2     
  Misses        348      348              
  Partials      110      110
Impacted Files Coverage Δ
query/query.go 65.91% <100%> (+0.11%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f5cfaf6...0ec5ea7. Read the comment docs.

codecov[bot] avatar Nov 08 '18 08:11 codecov[bot]

Thanks for contributing @martianzhang! Let us check this and get back to you soon

rnovikovP avatar Nov 09 '18 11:11 rnovikovP

@percona-csalguero I update the test case, no space between values and the left bracket will raise a panic.

martianzhang avatar Nov 21 '18 15:11 martianzhang