You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Unknown table flag Modyllic_Token_Bareword:'PARTITION', expected ENGINE, ROW_FORMAT, CHARSET or COLLATE while parsing SQL in nan_rollup.placement_performance_fivemin on line 78 at col 19:
...
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION<---HERE---> BY RANGE (to_days(fivemin))
(PARTITION p735233 VALUES LESS THAN (735233) ENGINE = InnoDB,
...
The text was updated successfully, but these errors were encountered:
I should have some time tomorrow to look into this. Thanks for pointing me in the correct places to look. I'll push out a commit if I can get this resolved.
The only complicating factor is that partition names, if not provided, will be inferred by MySQL. But that's something that's not any different then index naming. Overall it shouldn't be too bad, particularly since you don't have to pick it apart to do a diff as the alter command requires the complete partition declaration (just like with other table options).
Did this in my sandbox to get PARTITION to be ignored while I work on this. May take a bit to fully understand all that's going on and the correct way to support this.
diff --git a/Modyllic/Parser.php b/Modyllic/Parser.php
index 7383436..61122b3 100644
--- a/Modyllic/Parser.php
+++ b/Modyllic/Parser.php
@@ -899,7 +899,11 @@ class Modyllic_Parser {
// Load table flags
while ( ! $this->peek_next() instanceOf Modyllic_Token_EOC ) {
- $this->next();
+ // Ignore PARTITION FOR NOW.
+ $next = $this->next();
+ if ($next->token() == 'PARTITION') {
+ break;
+ }
if ( $this->maybe_table_option() ) { }
else {
throw $this->error("Unknown table flag ".$this->cur()->debug().", expected ENGINE, ROW_FORMAT, CHARSET or COLLATE");
Running:
scripts/modyllic dump --verbose mysql:host=server.nanigans.com:dbname=nan_rollup:username=foo:password=bar
Error: Unknown table flag Modyllic_Token_Bareword:'PARTITION', expected ENGINE, ROW_FORMAT, CHARSET or COLLATE while parsing SQL in nan_rollup.placement_performance_fivemin on line 78 at col 19:
...
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION<---HERE---> BY RANGE (to_days(fivemin))
(PARTITION p735233 VALUES LESS THAN (735233) ENGINE = InnoDB,
...
The text was updated successfully, but these errors were encountered: