mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-28 04:09:56 +03:00
merge r12747 from branch 2.3 to trunk
bug 2534 fixed: clean (as clean as possible with MySQL+MyISAM) handle of concurrency on user cache refresh. No more error when regenerating several thumbnails at once. git-svn-id: http://piwigo.org/svn/trunk@12748 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
c92140a9ff
commit
d827eacab4
3 changed files with 16 additions and 10 deletions
|
@ -416,8 +416,14 @@ UPDATE '.$tablename.'
|
|||
* @param array inserts
|
||||
* @return void
|
||||
*/
|
||||
function mass_inserts($table_name, $dbfields, $datas)
|
||||
function mass_inserts($table_name, $dbfields, $datas, $options=array())
|
||||
{
|
||||
$ignore = '';
|
||||
if (isset($options['ignore']) and $options['ignore'])
|
||||
{
|
||||
$ignore = 'IGNORE';
|
||||
}
|
||||
|
||||
if (count($datas) != 0)
|
||||
{
|
||||
$first = true;
|
||||
|
@ -438,7 +444,7 @@ function mass_inserts($table_name, $dbfields, $datas)
|
|||
if ($first)
|
||||
{
|
||||
$query = '
|
||||
INSERT INTO '.$table_name.'
|
||||
INSERT '.$ignore.' INTO '.$table_name.'
|
||||
('.implode(',', $dbfields).')
|
||||
VALUES';
|
||||
$first = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue