~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/user_locks/release_locks.cc

  • Committer: Mark Atwood
  • Date: 2011-10-27 05:08:12 UTC
  • mfrom: (2445.1.11 rf)
  • Revision ID: me@mark.atwood.name-20111027050812-1icvs72lb0u4xdc4
mergeĀ lp:~olafvdspek/drizzle/refactor8

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
 
  int64_t count= 0;
32
 
 
33
 
  user_locks::Storable *list= static_cast<user_locks::Storable *>(getSession().getProperty("user_locks"));
 
31
  user_locks::Storable *list= getSession().getProperty<user_locks::Storable>("user_locks");
34
32
  if (list) // To be compatible with MySQL, we will now release all other locks we might have.
35
 
    count= list->erase_all();
 
33
    return list->erase_all();
36
34
 
37
 
  return count;
 
35
  return 0;
38
36
}
39
37
 
40
38
} /* namespace user_locks */