The branch, master has been updated
via 89552c74c4fe7585e595d30c6b3553c21b89ae61 (commit)
via 31cd4bdd6a7c42527b2011201d378e3c9accce8a (commit)
from 7411f7cca83af4e763fb6bf1eb08e67800bda770 (commit)
- Log -----------------------------------------------------------------
commit 89552c74c4fe7585e595d30c6b3553c21b89ae61
Merge: 7411f7cca83af4e763fb6bf1eb08e67800bda770
31cd4bdd6a7c42527b2011201d378e3c9accce8a
Author: Marc Delisle <[email protected]>
Date: Wed Jan 12 08:05:40 2011 -0500
Merge branch 'QA_3_3'
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 1 +
libraries/dbi/mysql.dbi.lib.php | 4 +---
libraries/dbi/mysqli.dbi.lib.php | 8 +++++++-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2f30df3..889c140 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -135,6 +135,7 @@
- patch #3150164 [structure] Ordering by size gives incorrect results,
thanks to Madhura Jayaratne - madhuracj
- bug #3153409 [core] 0 row(s) affected
+- bug #3155842 [core] Edit relational page and page number
3.3.9.0 (2011-01-03)
- bug [doc] Fix references to MySQL doc
diff --git a/libraries/dbi/mysql.dbi.lib.php b/libraries/dbi/mysql.dbi.lib.php
index 1db4f1e..2ddd765 100644
--- a/libraries/dbi/mysql.dbi.lib.php
+++ b/libraries/dbi/mysql.dbi.lib.php
@@ -392,13 +392,11 @@ function PMA_DBI_insert_id($link = null)
return false;
}
}
- //$insert_id = mysql_insert_id($link);
- // if the primary key is BIGINT we get an incorrect result
+ // If the primary key is BIGINT we get an incorrect result
// (sometimes negative, sometimes positive)
// and in the present function we don't know if the PK is BIGINT
// so better play safe and use LAST_INSERT_ID()
//
- // by the way, no problem with mysqli_insert_id()
return PMA_DBI_fetch_value('SELECT LAST_INSERT_ID();', 0, 0, $link);
}
diff --git a/libraries/dbi/mysqli.dbi.lib.php b/libraries/dbi/mysqli.dbi.lib.php
index 8022c77..71693ab 100644
--- a/libraries/dbi/mysqli.dbi.lib.php
+++ b/libraries/dbi/mysqli.dbi.lib.php
@@ -452,7 +452,13 @@ function PMA_DBI_insert_id($link = '')
return false;
}
}
- return mysqli_insert_id($link);
+ // When no controluser is defined, using mysqli_insert_id($link)
+ // does not always return the last insert id due to a mixup with
+ // the tracking mechanism, but this works:
+ return PMA_DBI_fetch_value('SELECT LAST_INSERT_ID();', 0, 0, $link);
+ // Curiously, this problem does not happen with the mysql extension but
+ // there is another problem with BIGINT primary keys so PMA_DBI_insert_id()
+ // in the mysql extension also uses this logic.
}
/**
hooks/post-receive
--
phpMyAdmin
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Phpmyadmin-git mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/phpmyadmin-git