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 misc bugs #68

Merged
merged 4 commits into from
Jun 18, 2015
Merged

fix misc bugs #68

merged 4 commits into from
Jun 18, 2015

Conversation

osheroff
Copy link
Collaborator

address #64, #65, #66, #67

  • YEAR type may have a length
  • TRUNCATE TABLE must be ignored
  • BOOL / BOOLEAN / REAL type aliases

@vanchi-zendesk @akshayi1

Ben Osheroff added 4 commits June 18, 2015 14:13
these two are SQL-syntax-only aliases for a TINYINT(1) column
these are sql-syntax aliases for 'double' types
@@ -35,6 +35,8 @@
SQL_BLACKLIST.add(Pattern.compile("^ANALYZE\\s+TABLE", Pattern.CASE_INSENSITIVE));
SQL_BLACKLIST.add(Pattern.compile("^SET\\s+PASSWORD", Pattern.CASE_INSENSITIVE));
SQL_BLACKLIST.add(Pattern.compile("^(CREATE|DROP|RENAME)\\s+USER", Pattern.CASE_INSENSITIVE));

SQL_BLACKLIST.add(Pattern.compile("^TRUNCATE\\s+TABLE", Pattern.CASE_INSENSITIVE));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest we add this to a Caveat section, and explain our limitation there.

Choose a reason for hiding this comment

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

Need another rule to catch truncate of partitions similar to:

            SQL_BLACKLIST.add(Pattern.compile("^ALTER\\sTABLE.*TRUNCATE"));

For SQL such as ALTER TABLE foo TRUNCATE PARTITION p4;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sorry for the lag @rhamnett. Yeah, maxwell needs to be able to parse PARTITION stuff in general. It's currently simply not supported, and is one of the last cleanups left in the sql parser section.

@vanchi-zendesk
Copy link
Contributor

👍

@Test
public void testYearWithLength() throws Exception {
String sql[] = {
"create TABLE `test_year` ( id year(4) )"
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering what made them create a YEAR type. What do they do for BC years? negative? Are there no paleontologist+DBAs?

@akshayi1
Copy link

I was just wondering if there is going to be support for GTID instead of
position based binlog reference for maxwell.

On Thu, Jun 18, 2015 at 2:59 PM, Ben Osheroff notifications@github.com
wrote:

address #64 #64, #65
#65, #66
#66, #67
#67

  • YEAR type may have a length
  • TRUNCATE TABLE must be ignored
  • BOOL / BOOLEAN / REAL type aliases

@vanchi-zendesk https://github.com/vanchi-zendesk @akshayi1

https://github.com/akshayi1

You can view, comment on, or merge this pull request online at:

#68
Commit Summary

  • ignore TRUNCATE TABLE
  • YEAR columns can have a length field
  • support BOOL, BOOLEAN
  • support REAL column types

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#68.

@osheroff
Copy link
Collaborator Author

GTID: yeah, at some point, but it's not on any short-term roadmap. it'll be quite a bit of work down in open-replicator.

osheroff pushed a commit that referenced this pull request Jun 18, 2015
@osheroff osheroff merged commit b361e0c into master Jun 18, 2015
@osheroff osheroff deleted the ben/bugs branch June 18, 2015 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants