bug #1198156, exporting without enclosing with backquotes
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2005-05-10 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
|
* libraries/sqlparser.lib.php: bug #1198156, undefined variable
|
||||||
|
when exporting without enclosing with backquotes
|
||||||
|
|
||||||
2005-05-08 Marc Delisle <lem9@users.sourceforge.net>
|
2005-05-08 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* db_details_links.php: patch #1196806, add a Privileges tab
|
* db_details_links.php: patch #1196806, add a Privileges tab
|
||||||
in db view, thanks to Herman van Rink - helmo
|
in db view, thanks to Herman van Rink - helmo
|
||||||
|
@@ -1663,30 +1663,28 @@ if ($is_minimum_common == FALSE) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (($arr[$i]['type'] == 'quote_backtick')) {
|
if ($arr[$i]['type'] == 'quote_backtick' || $arr[$i]['type'] == 'alpha_identifier') {
|
||||||
|
|
||||||
// TODO: one set of IFs to remove backquotes
|
if ($arr[$i]['type'] == 'quote_backtick') {
|
||||||
|
|
||||||
if ($seen_create_table && $in_create_table_fields) {
|
|
||||||
// remove backquotes
|
// remove backquotes
|
||||||
$identifier = str_replace('`','',$arr[$i]['data']);
|
$identifier = str_replace('`','',$arr[$i]['data']);
|
||||||
|
} else {
|
||||||
|
$identifier = $arr[$i]['data'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($seen_create_table && $in_create_table_fields) {
|
||||||
$current_identifier = $identifier;
|
$current_identifier = $identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($seen_constraint) {
|
if ($seen_constraint) {
|
||||||
// remove backquotes
|
|
||||||
$identifier = str_replace('`','',$arr[$i]['data']);
|
|
||||||
$foreign[$foreign_key_number]['constraint'] = $identifier;
|
$foreign[$foreign_key_number]['constraint'] = $identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($seen_foreign && $brackets_level > 0) {
|
if ($seen_foreign && $brackets_level > 0) {
|
||||||
// remove backquotes
|
|
||||||
$identifier = str_replace('`','',$arr[$i]['data']);
|
|
||||||
$foreign[$foreign_key_number]['index_list'][] = $identifier;
|
$foreign[$foreign_key_number]['index_list'][] = $identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($seen_references) {
|
if ($seen_references) {
|
||||||
// remove backquotes
|
|
||||||
$identifier = str_replace('`','',$arr[$i]['data']);
|
|
||||||
// here, the first bracket level corresponds to the
|
// here, the first bracket level corresponds to the
|
||||||
// bracket of CREATE TABLE
|
// bracket of CREATE TABLE
|
||||||
// so if we are on level 2, it must be the index list
|
// so if we are on level 2, it must be the index list
|
||||||
@@ -1696,8 +1694,8 @@ if ($is_minimum_common == FALSE) {
|
|||||||
} else {
|
} else {
|
||||||
// for MySQL 4.0.18, identifier is
|
// for MySQL 4.0.18, identifier is
|
||||||
// `table` or `db`.`table`
|
// `table` or `db`.`table`
|
||||||
// first pass will pick the db name
|
// the first pass will pick the db name
|
||||||
// next pass will execute the else and pick the
|
// the next pass will execute the else and pick the
|
||||||
// db name in $db_table[0]
|
// db name in $db_table[0]
|
||||||
if ($arr[$i+1]['type'] == 'punct_qualifier') {
|
if ($arr[$i+1]['type'] == 'punct_qualifier') {
|
||||||
$foreign[$foreign_key_number]['ref_db_name'] = $identifier;
|
$foreign[$foreign_key_number]['ref_db_name'] = $identifier;
|
||||||
|
Reference in New Issue
Block a user