~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/user_locks/is_free_lock.cc

  • Committer: Brian Aker
  • Date: 2010-11-27 18:24:26 UTC
  • mfrom: (1956 quick)
  • mto: This revision was merged to the branch mainline in revision 1958.
  • Revision ID: brian@tangent.org-20101127182426-ajc6g4v2346t4yn3
Mrge Trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
{
30
30
  drizzled::String *res= args[0]->val_str(&value);
31
31
 
32
 
  if (not res)
 
32
  if (not res || not res->length())
33
33
  {
34
 
    null_value= true;
 
34
    my_error(drizzled::ER_USER_LOCKS_INVALID_NAME_LOCK, MYF(0));
35
35
    return 0;
36
36
  }
37
37
  null_value= false;
38
38
 
39
 
  if (not res->length())
40
 
    return 0;
41
 
 
42
39
  drizzled::session_id_t id= getSession().getSessionId();
43
40
  bool result= user_locks::Locks::getInstance().release(user_locks::Key(getSession().getSecurityContext(), res->c_str()), id);
44
41