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] Unsigned datatypes, Double precision cannot be migrated #188

Closed
chetank-yb opened this issue Jul 21, 2022 · 2 comments
Closed

[MySQL] Unsigned datatypes, Double precision cannot be migrated #188

chetank-yb opened this issue Jul 21, 2022 · 2 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@chetank-yb
Copy link
Contributor

No description provided.

@chetank-yb
Copy link
Contributor Author

chetank-yb commented Jul 22, 2022

data which could not be migrated successfully

  1. Double precision - COPY "floating_point_types" FROM file "/home/ubuntu/export-dir/metainfo/data/floating_point_types.0.5.5.439.P": ERROR: "-1.79769313486232e+308" is out of range for type double precision (SQLSTATE 22003)

MySQL queries
create table if not exists floating_point_types(float_type float,double_type double,double_precision_type DOUBLE PRECISION,real_type REAL);
insert into floating_point_types values (-3.402823466E+38,-1.7976931348623157E+308,-1.7976931348623157E+308,-1.7976931348623157E+308);


  1. Small Int - COPY "int_types" FROM file "/home/ubuntu/export-dir/metainfo/data/int_types.0.4.4.656.P": ERROR: value "65535" is out of range for type smallint (SQLSTATE 22003)

MySQL queries
create table if not exists int_types (tint_s tinyint signed, tint_u tinyint unsigned zerofill,
sint_s smallint signed, sint_u smallint unsigned zerofill,
mint_s mediumint signed, mint_u mediumint unsigned zerofill,
iINT_s int signed, iINT_u int unsigned zerofill,
iINTEGER_s INTEGER signed, iINTEGER_u INTEGER unsigned zerofill,
bint_s bigint signed,bint_u bigint unsigned zerofill);
insert into int_types values (127,255,32767,65535,8388607,16777215,2147483647,4294967295,2147483647,4294967295,9223372036854775807,18446744073709551615);

NOTE : Migration of data for any field which is of type unsigned is not possible as of now


@chetank-yb chetank-yb changed the title [MySQL] Cannot migrate unsigned smallint with values > 32k [MySQL] Unsigned datatypes, Double precision cannot be migrated Jul 22, 2022
@kneeraj kneeraj added GA1.0 documentation Improvements or additions to documentation labels Aug 17, 2022
@amit-yb amit-yb assigned rahulb-yb and unassigned amit-yb Aug 19, 2022
@rahulb-yb
Copy link
Collaborator

  1. Float-based data types are always approximations of the values they represent- any values exported near MAX or MIN values may be out of range due to this nature of the datatype.
  2. Unsigned datatypes are not native to YB, they are usually enforced by check constraints if the user so wishes to include them.

Any other suggested solutions may be explored as per the manual review doc: https://docs.google.com/document/d/1ZzPGdn2tSHdbqzQ4b-WdXFRedLaiQqun5osV1vAG-CY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants