The branch, master has been updated
via d1bebc67f6309fcc6fda946953816951d3799bc7 (commit)
via 1c49cd3d6422630be2549ce925cd91971565c5c7 (commit)
via 1623c7e06593a7b95b9654c51537e29602c5b3a4 (commit)
from e91e87861b7e7dff68780fcfc056ac0f0c35885d (commit)
- Log -----------------------------------------------------------------
commit d1bebc67f6309fcc6fda946953816951d3799bc7
Merge: e91e87861b7e7dff68780fcfc056ac0f0c35885d 1c49cd3d6422630be2549ce925cd91971565c5c7
Author: Marc Delisle <marc(a)infomarc.info>
Date: Sun Oct 3 09:42:40 2010 -0400
fix merge conflicts
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 1 +
libraries/dbi/mysqli.dbi.lib.php | 2 +-
libraries/display_tbl.lib.php | 10 ++++++++--
tbl_change.php | 6 +++++-
4 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8d5e79a..49dac18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -124,6 +124,7 @@
- bug #3062455 [core] copy procedures and routines before tables
- bug #3062455 [export] with SQL, export procedures and routines before tables
- bug #3056023 [import] USE query not working
+- bug #3038193 [display] Error when editing row with GEOMETRY column
3.3.7.0 (2010-09-07)
- patch #3050492 [PDF scratchboard] Cannot drag table box to the edge after
diff --git a/libraries/dbi/mysqli.dbi.lib.php b/libraries/dbi/mysqli.dbi.lib.php
index 086b47a..e027f23 100644
--- a/libraries/dbi/mysqli.dbi.lib.php
+++ b/libraries/dbi/mysqli.dbi.lib.php
@@ -524,7 +524,7 @@ function PMA_DBI_get_fields_meta($result)
// so this would override TINYINT and mark all TINYINT as string
//
https://sf.net/tracker/?func=detail&aid=1532111&group_id=23067&…
//$typeAr[MYSQLI_TYPE_CHAR] = 'string';
- $typeAr[MYSQLI_TYPE_GEOMETRY] = 'unknown';
+ $typeAr[MYSQLI_TYPE_GEOMETRY] = 'geometry';
$typeAr[MYSQLI_TYPE_BIT] = 'bit';
$fields = mysqli_fetch_fields($result);
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index 3520257..c3d833d 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -1330,7 +1330,13 @@ function PMA_displayTableBody(&$dt_result, &$is_display,
$map, $analyzed_sql) {
$vertical_display['data'][$row_no][$i] = '
<td' . $mouse_events . ' class="' . $class . ($condition_field ? '
condition' : '') . '"> </td>' .
"\n";
}
}
- // n o t n u m e r i c a n d n o t B L O B
+ // g e o m e t r y
+ } elseif ($meta->type == 'geometry') {
+ $geometry_text = PMA_handle_non_printable_contents('GEOMETRY',
(isset($row[$i]) ? $row[$i] : ''), $transform_function, $transform_options,
$default_function, $meta);
+ $vertical_display['data'][$row_no][$i] = ' <td
align="left"' . $mouse_events . ' class="' . $class .
($condition_field ? ' condition' : '') . '">' .
$geometry_text . '</td>';
+ unset($geometry_text);
+
+ // n o t n u m e r i c a n d n o t B L O B
} else {
if (!isset($row[$i]) || is_null($row[$i])) {
$vertical_display['data'][$row_no][$i] = '
<td' . $mouse_events . ' class="' . $class . ($condition_field ? '
condition' : '') . '"><i>NULL</i></td>' .
"\n";
@@ -2266,7 +2272,7 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql)
{
* @uses PMA_formatByteDown()
* @uses strpos()
* @uses str_replace()
- * @param string $category BLOB|BINARY
+ * @param string $category BLOB|BINARY|GEOMETRY
* @param string $content the binary content
* @param string $transform_function
* @param string $transform_options
diff --git a/tbl_change.php b/tbl_change.php
index 54e0d7f..bcc0b76 100644
--- a/tbl_change.php
+++ b/tbl_change.php
@@ -509,7 +509,7 @@ foreach ($rows as $row_id => $vrow) {
if (($cfg['ProtectBinary'] && $field['is_blob']
&& !$is_upload)
|| ($cfg['ProtectBinary'] == 'all' &&
$field['is_binary'])) {
echo ' <td align="center">' .
__('Binary') . '</td>' . "\n";
- } elseif (strstr($field['True_Type'], 'enum') ||
strstr($field['True_Type'], 'set')) {
+ } elseif (strstr($field['True_Type'], 'enum') ||
strstr($field['True_Type'], 'set') || 'geometry' ==
$field['pma_type']) {
echo ' <td align="center">--</td>' .
"\n";
} else {
?>
@@ -934,6 +934,10 @@ foreach ($rows as $row_id => $vrow) {
}
} // end if (web-server upload directory)
} // end elseif (binary or blob)
+
+ elseif ('geometry' == $field['pma_type']) {
+ // ignore this column to avoid changing it
+ }
else {
// field size should be at least 4 and max 40
$fieldsize = min(max($field['len'], 4), 40);
hooks/post-receive
--
phpMyAdmin