Link help of partitioning types
This commit is contained in:
parent
3b3d169c72
commit
0be7532b70
|
@ -1,6 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
$TABLE = $_GET["create"];
|
$TABLE = $_GET["create"];
|
||||||
$partition_by = array('HASH', 'LINEAR HASH', 'KEY', 'LINEAR KEY', 'RANGE', 'LIST');
|
$partition_by = array();
|
||||||
|
foreach (array('HASH', 'LINEAR HASH', 'KEY', 'LINEAR KEY', 'RANGE', 'LIST') as $key) {
|
||||||
|
$partition_by[$key] = $key;
|
||||||
|
}
|
||||||
|
|
||||||
$referencable_primary = referencable_primary($TABLE);
|
$referencable_primary = referencable_primary($TABLE);
|
||||||
$foreign_keys = array();
|
$foreign_keys = array();
|
||||||
|
@ -71,7 +74,7 @@ if ($_POST && !process_fields($row["fields"]) && !$error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$partitioning = "";
|
$partitioning = "";
|
||||||
if (in_array($row["partition_by"], $partition_by)) {
|
if ($partition_by[$row["partition_by"]]) {
|
||||||
$partitions = array();
|
$partitions = array();
|
||||||
if ($row["partition_by"] == 'RANGE' || $row["partition_by"] == 'LIST') {
|
if ($row["partition_by"] == 'RANGE' || $row["partition_by"] == 'LIST') {
|
||||||
foreach (array_filter($row["partition_names"]) as $key => $val) {
|
foreach (array_filter($row["partition_names"]) as $key => $val) {
|
||||||
|
@ -197,7 +200,7 @@ if (support("partitioning")) {
|
||||||
print_fieldset("partition", lang('Partition by'), $row["partition_by"]);
|
print_fieldset("partition", lang('Partition by'), $row["partition_by"]);
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<?php echo html_select("partition_by", array(-1 => "") + $partition_by, $row["partition_by"], "partitionByChange(this);") . doc_link("partitioning-types.html"); ?>
|
<?php echo "<select name='partition_by' onchange='partitionByChange(this);'" . on_help("getTarget(event).value.replace(/./, 'PARTITION BY \$&')", 1) . ">" . optionlist(array("" => "") + $partition_by, $row["partition_by"]) . "</select>"; ?>
|
||||||
(<input name="partition" value="<?php echo h($row["partition"]); ?>">)
|
(<input name="partition" value="<?php echo h($row["partition"]); ?>">)
|
||||||
<?php echo lang('Partitions'); ?>: <input type="number" name="partitions" class="size<?php echo ($partition_table || !$row["partition_by"] ? " hidden" : ""); ?>" value="<?php echo h($row["partitions"]); ?>">
|
<?php echo lang('Partitions'); ?>: <input type="number" name="partitions" class="size<?php echo ($partition_table || !$row["partition_by"] ? " hidden" : ""); ?>" value="<?php echo h($row["partitions"]); ?>">
|
||||||
<table cellspacing="0" id="partition-table"<?php echo ($partition_table ? "" : " class='hidden'"); ?>>
|
<table cellspacing="0" id="partition-table"<?php echo ($partition_table ? "" : " class='hidden'"); ?>>
|
||||||
|
|
|
@ -443,6 +443,7 @@ function partitionByChange(el) {
|
||||||
var partitionTable = /RANGE|LIST/.test(selectValue(el));
|
var partitionTable = /RANGE|LIST/.test(selectValue(el));
|
||||||
alterClass(el.form['partitions'], 'hidden', partitionTable || !el.selectedIndex);
|
alterClass(el.form['partitions'], 'hidden', partitionTable || !el.selectedIndex);
|
||||||
alterClass(document.getElementById('partition-table'), 'hidden', !partitionTable);
|
alterClass(document.getElementById('partition-table'), 'hidden', !partitionTable);
|
||||||
|
helpClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Add next partition row
|
/** Add next partition row
|
||||||
|
|
2
externals/jush
vendored
2
externals/jush
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 7df46998eca7ae1fd56f6ec48d7bf08dea09127d
|
Subproject commit 9493dcc08e23313562d6860d3fa0592e40ed2cf8
|
Loading…
Reference in a new issue