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

fix(common): limit min signed int64 value to -9223372036854775806 #1206 #1349

Conversation

hustjieke
Copy link
Collaborator

@hustjieke hustjieke commented Mar 2, 2023

Summary about this PR

[summary]
In Tianmu engine:
For int64, -9223372036854775807 is reserved to indicate as NULL_64 flag, so we limit min value of int64 to -9223372036854775806.

For int32, -2147483648 is reserved to indicate as NULL_32 flag, we limit min value of int32 to -2147483647.

Issue Number: close #1206

Tests Check List

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Changelog

  • New Feature
  • Bug Fix
  • Performance Improvement
  • Build/Testing/CI/CD
  • Documentation
  • Not for changelog (changelog entry is not required)

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features

…neatom#1206

[summary]
In Tianmu engine:
For int64, -9223372036854775807 is reserved to indicate as `NULL_64` flag, so we limit
min value of int64 to -9223372036854775806.

For int32, -2147483648 is reserved to indicate as `NULL_32` flag, we limit min value of int32
to -2147483647.
@hustjieke hustjieke requested review from RingsC and duanfuxiang0 March 2, 2023 02:59
@mergify
Copy link
Contributor

mergify bot commented Mar 2, 2023

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

@mergify mergify bot added the PR-bug bug for pull request label Mar 2, 2023
@hustjieke hustjieke requested review from wisehead and konghaiya March 2, 2023 02:59
@codecov
Copy link

codecov bot commented Mar 2, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change

Comparison is base (f8df638) 43.11% compared to head (f35ca9a) 43.12%.

❗ Current head f35ca9a differs from pull request most recent head 75294a3. Consider uploading reports for the commit 75294a3 to get more accurate results

Additional details and impacted files
@@               Coverage Diff                @@
##           stonedb-5.7-dev    #1349   +/-   ##
================================================
  Coverage            43.11%   43.12%           
================================================
  Files                 1830     1830           
  Lines               396395   396395           
================================================
+ Hits                170915   170934   +19     
+ Misses              225480   225461   -19     
Impacted Files Coverage Δ
storage/tianmu/common/common_definitions.cpp 60.65% <100.00%> (+24.59%) ⬆️
storage/innobase/buf/buf0buddy.cc 33.76% <0.00%> (-2.60%) ⬇️
storage/tianmu/core/pack_str.h 88.37% <0.00%> (-2.33%) ⬇️
storage/myisam/mi_dynrec.c 57.47% <0.00%> (-0.87%) ⬇️
strings/ctype-simple.c 60.86% <0.00%> (-0.51%) ⬇️
sql/sql_profile.cc 10.30% <0.00%> (-0.43%) ⬇️
storage/innobase/include/ib0mutex.h 71.45% <0.00%> (-0.38%) ⬇️
sql/sql_error.cc 77.39% <0.00%> (-0.35%) ⬇️
storage/perfschema/pfs_stat.h 58.24% <0.00%> (-0.26%) ⬇️
storage/innobase/buf/buf0flu.cc 85.35% <0.00%> (-0.22%) ⬇️
... and 15 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@hustjieke hustjieke marked this pull request as ready for review March 2, 2023 03:36
@hustjieke hustjieke changed the title fix(common): limit min signed int64 value to -9223372036854775807 #1206 fix(common): limit min signed int64 value to -9223372036854775806 #1206 Mar 2, 2023
Copy link
Contributor

@duanfuxiang0 duanfuxiang0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mergify mergify bot merged commit bc15bbe into stoneatom:stonedb-5.7-dev Mar 6, 2023
@Nliver Nliver added this to the StoneDB_5.7_v1.0.2 milestone Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-bug bug for pull request
Projects
Development

Successfully merging this pull request may close these issues.

bug: The data type of the field is bigint,when you insert a value,maybe inserted with a null value.
4 participants