bugphpGroupWare - Bugs: bug #7253, contacts - table lock problem

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #7253: contacts - table lock problem

Submitted by:  Dirk Schaller <dschaller>
Submitted on:  Wed 14 Jan 2004 03:14:28 PM UTC  
 
Item Group: SVN trunk (dev code)Category: API - phpGroupware API
Severity: 1 - WishPriority: 9 - Immediate
Status: FixedPrivacy: Public
Assigned to: Jonathan Rivera <jarg>Open/Closed: Closed
Component Version: SVNOperating System: MS Windows
Reproducibility: NonePlanned Release: None
Fixed Release: 

Tue 03 Feb 2004 04:49:09 PM UTC, comment #3:

This has been corrected in CVS.

To grab a complete update of all fixes:

1) Check to see if you have cvs installed: 'cvs --help'.
1a) If not, install a copy of cvs-cli from your favorite
distro.

2) Then just type:
'cd <your phpgroupware dir>; cvs update -dP'.

You can do step 2 as many times in a day as you wish, and
will always get the most current bug fixes.

Thanks,

Jonathan Rivera <jarg>In charge of this item.
Fri 16 Jan 2004 06:51:37 AM UTC, comment #2:

yes, I use mysql

Anonymous
Thu 15 Jan 2004 06:25:48 PM UTC, comment #1:

this error is with mysql??

Jonathan Rivera <jarg>In charge of this item.
Wed 14 Jan 2004 03:14:28 PM UTC, original submission:

When inserting more than one location, comms, notes or others to a contact I get a table lock error.
I need this when we insert contacts over xmlrpc and ipc layer e.g. for sync.

Background:
- see class contacts_sql
- lines 2109-2141
- in the foreach the insert method for adding data is called
- these methods lock the tables and insert the data (eg the first location)
- than the next data (second location) will be inserted: the table is still locked and now the "has_prefered" method will be called and read date from the locked table -> mysql error

Solution:
After inserting a data (eg location) unlock the tables:
Move the "$this->unlock_table();" from the outside of the foreach into the foreach

if(is_array($locations))
{
foreach($locations as $location)
{
$this->add_location($location, $cid, PHPGW_SQL_RUN_SQL);
$this->unlock_table();
}
}

Thanks
Dirk Schaller

Dirk Schaller <dschaller>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 13 Feb 2004 12:57:19 AM UTCjargOpen/ClosedOpen=>Closed
Tue 03 Feb 2004 04:49:09 PM UTCjargStatusNone=>Fixed
Thu 15 Jan 2004 03:12:05 PM UTCpowerstatAssigned toNone=>jarg

Back to the top


Powered by Savane 3.1-cleanup1