Skip to content

Commit 6b860d2

Browse files
author
Dan Ungureanu
committed
Improved partition support.
1 parent 8f19b8f commit 6b860d2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Components/PartitionDefinition.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class PartitionDefinition extends Component
3838
public static $OPTIONS = array(
3939
'STORAGE' => array(1, 'var'),
4040
'STORAGE ENGINE' => array(1, 'var'),
41+
'ENGINE' => array(1, 'var'),
4142
'COMMENT' => array(2, 'var'),
4243
'DATA DIRECTORY' => array(3, 'var'),
4344
'INDEX DIRECTORY' => array(4, 'var'),
@@ -201,13 +202,13 @@ public static function build($component, array $options = array())
201202
return "(\n" . implode(",\n", $component) . "\n)";
202203
} else {
203204
if ($component->isSubpartition) {
204-
return 'SUBPARTITION ' . $component->name;
205+
return 'SUBPARTITION ' . $component->name . ' ' . $component->options;
205206
} else {
206207
$subpartitions = empty($component->subpartitions)
207208
? '' : ' ' . PartitionDefinition::build($component->subpartitions);
208209
return 'PARTITION ' . $component->name
209210
. ' VALUES ' . $component->type . ' ' . $component->expr
210-
. $subpartitions;
211+
. $component->options . $subpartitions;
211212
}
212213
}
213214
}

0 commit comments

Comments
 (0)