Backquote table name (bug #1050441).
This commit is contained in:
@@ -7,6 +7,7 @@ $Source$
|
|||||||
|
|
||||||
2004-10-20 Michal Čihař <michal@cihar.com>
|
2004-10-20 Michal Čihař <michal@cihar.com>
|
||||||
* lang/czech: Update.
|
* lang/czech: Update.
|
||||||
|
* tbl_relation.php: Backquote table name (bug #1050441).
|
||||||
|
|
||||||
2004-10-19 Marc Delisle <lem9@users.sourceforge.net>
|
2004-10-19 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* libraries/database_interface.lib.php: bug #1041667, correctly
|
* libraries/database_interface.lib.php: bug #1041667, correctly
|
||||||
|
@@ -128,7 +128,7 @@ if (isset($submit_rel) && $submit_rel == 'true') {
|
|||||||
// backquotes but MySQL 4.0.16 did not like the syntax
|
// backquotes but MySQL 4.0.16 did not like the syntax
|
||||||
// (for example: `base2`.`table1` )
|
// (for example: `base2`.`table1` )
|
||||||
|
|
||||||
$upd_query = 'ALTER TABLE ' . $table
|
$upd_query = 'ALTER TABLE ' . PMA_backquote($table)
|
||||||
. ' ADD FOREIGN KEY ('
|
. ' ADD FOREIGN KEY ('
|
||||||
. PMA_backquote(PMA_sqlAddslashes($master_field)) . ')'
|
. PMA_backquote(PMA_sqlAddslashes($master_field)) . ')'
|
||||||
. ' REFERENCES '
|
. ' REFERENCES '
|
||||||
@@ -155,7 +155,7 @@ if (isset($submit_rel) && $submit_rel == 'true') {
|
|||||||
|
|
||||||
// remove existing key
|
// remove existing key
|
||||||
if (PMA_MYSQL_INT_VERSION >= 40013) {
|
if (PMA_MYSQL_INT_VERSION >= 40013) {
|
||||||
$upd_query = 'ALTER TABLE ' . $table
|
$upd_query = 'ALTER TABLE ' . PMA_backquote($table)
|
||||||
. ' DROP FOREIGN KEY '
|
. ' DROP FOREIGN KEY '
|
||||||
. PMA_backquote($existrel_innodb[$master_field]['constraint']);
|
. PMA_backquote($existrel_innodb[$master_field]['constraint']);
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ if (isset($submit_rel) && $submit_rel == 'true') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add another
|
// add another
|
||||||
$upd_query = 'ALTER TABLE ' . $table
|
$upd_query = 'ALTER TABLE ' . PMA_backquote($table)
|
||||||
. ' ADD FOREIGN KEY ('
|
. ' ADD FOREIGN KEY ('
|
||||||
. PMA_backquote(PMA_sqlAddslashes($master_field)) . ')'
|
. PMA_backquote(PMA_sqlAddslashes($master_field)) . ')'
|
||||||
. ' REFERENCES '
|
. ' REFERENCES '
|
||||||
@@ -182,7 +182,7 @@ if (isset($submit_rel) && $submit_rel == 'true') {
|
|||||||
} // end if... else....
|
} // end if... else....
|
||||||
} else if (isset($existrel_innodb[$master_field])) {
|
} else if (isset($existrel_innodb[$master_field])) {
|
||||||
if (PMA_MYSQL_INT_VERSION >= 40013) {
|
if (PMA_MYSQL_INT_VERSION >= 40013) {
|
||||||
$upd_query = 'ALTER TABLE ' . $table
|
$upd_query = 'ALTER TABLE ' . PMA_backquote($table)
|
||||||
. ' DROP FOREIGN KEY '
|
. ' DROP FOREIGN KEY '
|
||||||
. PMA_backquote($existrel_innodb[$master_field]['constraint']);
|
. PMA_backquote($existrel_innodb[$master_field]['constraint']);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user