Mysql4.1 specific fix in function PMA_displayTableBody() (character set convertions).

This commit is contained in:
Marcel Tschopp
2004-03-26 19:09:09 +00:00
parent 736b182dad
commit 19c9f98a04
3 changed files with 21 additions and 1 deletions

View File

@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
$Id$
$Source$
2004-03-25 Marcel Tschopp <marcel.tschopp@gmx.net>
* libraries/display_tpl.lib.php, mysqli.dbi.lib.php:
Mysql4.1 specific fix in function PMA_displayTableBody() (character set
conversions).
2004-03-25 Marcel Tschopp <marcel.tschopp@gmx.net>
* tbl_change.php, libraries/dbi/mysql.inc.php, libraries/dbi/mysqli.inc.php:
Added wrapping function PMA_DBI_field_len.

View File

@@ -267,6 +267,7 @@ function PMA_DBI_get_fields_meta($result) {
}
if (floor($f / 32768)) {
$flags .= 'num ';
$fields[$k]->numeric = 1;
$f -= 32768;
continue;
}
@@ -301,36 +302,43 @@ function PMA_DBI_get_fields_meta($result) {
}
if (floor($f / 64)) {
$flags .= 'zerofill ';
$fields[$k]->zerofill = 1;
$f -= 64;
continue;
}
if (floor($f / 32)) {
$flags .= 'unsigned ';
$fields[$k]->unsigned = 1;
$f -= 32;
continue;
}
if (floor($f / 16)) {
$flags .= 'blob ';
$fields[$k]->blob = 1;
$f -= 16;
continue;
}
if (floor($f / 8)) {
$flags .= 'multiple_key ';
$fields[$k]->multiple_key = 1;
$f -= 8;
continue;
}
if (floor($f / 4)) {
$flags .= 'unique_key ';
$fields[$k]->unique_key = 1;
$f -= 4;
continue;
}
if (floor($f / 2)) {
$flags .= 'primary_key ';
$fields[$k]->primary_key = 1;
$f -= 2;
continue;
}
if (floor($f / 1)) {
$flags .= 'not_null ';
$fields[$k]->not_null = 1;
$f -= 1;
continue;
}

View File

@@ -1058,8 +1058,15 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
// that we need on the next "if" will work)
if ($meta->type == 'real') {
$condition = ' CONCAT(' . PMA_backquote($column_for_condition) . ') ';
} else {
// string and blob fields have to be converted using
// the system character set (always utf8) since
// mysql4.1 can use different charset for fields.
if (PMA_MYSQL_INT_VERSION >= 40100 && ($meta->type == 'string' || $meta->type == 'blob')) {
$condition = ' CONVERT(' . PMA_backquote($column_for_condition) . ' USING utf8) ';
} else {
$condition = ' ' . PMA_backquote($column_for_condition) . ' ';
}
} // end if... else...
// loic1: To fix bug #474943 under php4, the row