~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/user_locks/release_locks.cc

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include <config.h>
22
 
#include <plugin/user_locks/module.h>
23
 
#include <plugin/user_locks/lock_storage.h>
 
21
#include "config.h"
 
22
#include "plugin/user_locks/module.h"
 
23
#include "plugin/user_locks/lock_storage.h"
24
24
 
25
25
#include <string>
26
26
 
28
28
 
29
29
int64_t ReleaseLocks::val_int()
30
30
{
31
 
  user_locks::Storable *list= getSession().getProperty<user_locks::Storable>("user_locks");
 
31
  int64_t count= 0;
 
32
 
 
33
  user_locks::Storable *list= static_cast<user_locks::Storable *>(getSession().getProperty("user_locks"));
32
34
  if (list) // To be compatible with MySQL, we will now release all other locks we might have.
33
 
    return list->erase_all();
 
35
    count= list->erase_all();
34
36
 
35
 
  return 0;
 
37
  return count;
36
38
}
37
39
 
38
40
} /* namespace user_locks */