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

importccl: parse zero mysql dates as null #31288

Merged
merged 1 commit into from Oct 12, 2018

Conversation

Projects
None yet
3 participants
@dt
Member

dt commented Oct 11, 2018

these nonsense values are permitted by older / less strict mysql versions but have no cockroach counterpart -- a date is either null, or an actual date, which cannot have a zero day or month. Mapping these values to null is the closest we can get them, and in schemas that allow null values, hopefully makes migration easier. In schemas that do not allow nulls these will of course produce errors but we do not really have another option in those cases.

Release note: none.

@dt dt requested a review from mjibson Oct 11, 2018

@dt dt requested a review from cockroachdb/sql-bulk-prs as a code owner Oct 11, 2018

@cockroach-teamcity

This comment has been minimized.

Show comment
Hide comment
@cockroach-teamcity

cockroach-teamcity Oct 11, 2018

Member

This change is Reviewable

Member

cockroach-teamcity commented Oct 11, 2018

This change is Reviewable

importccl: parse zero mysql dates as null
these nonsense values are permitted by older / less strict mysql
versions but have no cockroach counterpart -- a date is either null, or
an actual date, which cannot have a zero day or month. Mapping these
values to null is the closest we can get them, and in schemas that allow
null values, hopefully makes migration easier. In schemas that do not
allow nulls these will of course produce errors but we do not really
have another option in those cases.

Fixes #29298.

Release note: none.
@dt

This comment has been minimized.

Show comment
Hide comment
@dt

dt Oct 12, 2018

Member

bors r+

Member

dt commented Oct 12, 2018

bors r+

craig bot pushed a commit that referenced this pull request Oct 12, 2018

Merge #31288
31288: importccl: parse zero mysql dates as null r=dt a=dt

these nonsense values are permitted by older / less strict mysql versions but have no cockroach counterpart -- a date is either null, or an actual date, which cannot have a zero day or month. Mapping these values to null is the closest we can get them, and in schemas that allow null values, hopefully makes migration easier. In schemas that do not allow nulls these will of course produce errors but we do not really have another option in those cases.

Release note: none.

Co-authored-by: David Taylor <tinystatemachine@gmail.com>
@craig

This comment has been minimized.

Show comment
Hide comment
@craig

craig bot commented Oct 12, 2018

Build succeeded

@craig craig bot merged commit b558b66 into cockroachdb:master Oct 12, 2018

3 checks passed

GitHub CI (Cockroach) TeamCity build finished
Details
bors Build succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@dt dt deleted the dt:zero branch Oct 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment