7.3.28. lock_clear# Summary#

New in version 4.0.9.

lock_clear command clear the lock of the target object recursively. The target object is one of database, table and column.


This is a dangerous command. You must not use this command while other process or thread is doing a write operation to the target object. If you do it, your database may be broken and/or your process may be crashed. Syntax#

This command takes only one optional parameter:

lock_clear [target_name=null]

If target_name parameters is omitted, database is used for the target object. It means that all locks in the database are cleared. Usage#

Here is an example to clear all locks in the database:

Execution example:

# [[0,1337566253.89858,0.000355720520019531],true]

Here is an example to clear locks of Entries table and Entries table columns:

Execution example:

table_create Entries TABLE_NO_KEY
# [[0,1337566253.89858,0.000355720520019531],true]
column_create Entries body COLUMN_SCALAR Text
# [[0,1337566253.89858,0.000355720520019531],true]
lock_clear Entries
# [[0,1337566253.89858,0.000355720520019531],true]

Here is an example to clear the lock of Sites.title column:

Execution example:

table_create Sites TABLE_HASH_KEY ShortText
# [[0,1337566253.89858,0.000355720520019531],true]
column_create Sites title COLUMN_SCALAR ShortText
# [[0,1337566253.89858,0.000355720520019531],true]
lock_clear Sites.title
# [[0,1337566253.89858,0.000355720520019531],true] Parameters#

This section describes all parameters. target_name#

Specifies the name of table or column.

If you don’t specify it, database is used for the target object.

The default is none. It means that the target object is database. Return value#

lock_clear command returns whether lock is cleared successfully or not:



See Output format about HEADER.


If command succeeded, it returns true, otherwise it returns false on error.