fix merge conflicts

This commit is contained in:
Marc Delisle
2010-07-08 07:52:47 -04:00
3 changed files with 12 additions and 11 deletions

View File

@@ -96,6 +96,7 @@ $Id$
- bug [js] Avoid loading twice a js file
- bug #3024344 [setup] Setup forces numeric MemoryLimit
- bug #3025975 [auth] Odd LoginCookieValidity default value
- bug #3026400 [PHP] ereg functions are deprecated
3.3.4.0 (2010-06-28)
- bug #2996161 [import] properly escape import value

View File

@@ -361,7 +361,7 @@ foreach ($tables as $keyname => $each_table) {
$do = true;
}
foreach ($server_slave_Wild_Do_Table as $table) {
if (($db == PMA_replication_strout($table)) && (ereg("^".substr(PMA_replication_strout($table, true), 0, strlen(PMA_replication_strout($table, true))-1), $truename)))
if (($db == PMA_replication_strout($table)) && (preg_match("@^" . substr(PMA_replication_strout($table, true), 0, strlen(PMA_replication_strout($table, true)) - 1) . "@", $truename)))
$do = true;
}
////////////////////////////////////////////////////////////////////
@@ -369,7 +369,7 @@ foreach ($tables as $keyname => $each_table) {
$ignored = true;
}
foreach ($server_slave_Wild_Ignore_Table as $table) {
if (($db == PMA_replication_strout($table)) && (ereg("^".substr(PMA_replication_strout($table, true), 0, strlen(PMA_replication_strout($table, true))-1), $truename)))
if (($db == PMA_replication_strout($table)) && (preg_match("@^" . substr(PMA_replication_strout($table, true), 0, strlen(PMA_replication_strout($table, true)) - 1) . "@", $truename)))
$ignored = true;
}
}/* elseif ($server_master_status) {

View File

@@ -831,8 +831,8 @@ $import_notice = NULL;
* @uses SIZES
* @uses strcmp()
* @uses count()
* @uses ereg()
* @uses ereg_replace()
* @uses preg_match()
* @uses preg_replace()
* @uses PMA_isView()
* @uses PMA_backquote()
* @uses PMA_importRunQuery()
@@ -903,17 +903,17 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
*
* $pattern = 'CREATE (TABLE|VIEW|TRIGGER|FUNCTION|PROCEDURE)';
*/
$pattern = 'CREATE .*(TABLE)';
$pattern = '/CREATE .*(TABLE)/';
$replacement = 'CREATE \\1 IF NOT EXISTS';
/* Change CREATE statements to CREATE IF NOT EXISTS to support inserting into existing structures */
for ($i = 0; $i < $additional_sql_len; ++$i) {
$additional_sql[$i] = ereg_replace($pattern, $replacement, $additional_sql[$i]);
$additional_sql[$i] = preg_replace($pattern, $replacement, $additional_sql[$i]);
/* Execute the resulting statements */
PMA_importRunQuery($additional_sql[$i], $additional_sql[$i]);
}
}
if ($analyses != NULL) {
$type_array = array(NONE => "NULL", VARCHAR => "varchar", INT => "int", DECIMAL => "decimal");
@@ -1038,8 +1038,8 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
/* Add the viewable structures from $additional_sql to $tables so they are also displayed */
$view_pattern = 'VIEW `[^`]+`\.`([^`]+)';
$table_pattern = 'CREATE TABLE IF NOT EXISTS `([^`]+)`';
$view_pattern = '@VIEW `[^`]+`\.`([^`]+)@';
$table_pattern = '@CREATE TABLE IF NOT EXISTS `([^`]+)`@';
/* Check a third pattern to make sure its not a "USE `db_name`;" statement */
$regs = array();
@@ -1048,10 +1048,10 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
$additional_sql_len = count($additional_sql);
for ($i = 0; $i < $additional_sql_len; ++$i) {
ereg($view_pattern, $additional_sql[$i], $regs);
preg_match($view_pattern, $additional_sql[$i], $regs);
if (count($regs) == 0) {
ereg($table_pattern, $additional_sql[$i], $regs);
preg_match($table_pattern, $additional_sql[$i], $regs);
}
if (count($regs)) {