YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
#include <my_global.h>
/* This C++ file's header file */ #include"./rdb_mutex_wrapper.h"
/* The following are for THD_ENTER_COND: */ #define MYSQL_SERVER 1 #include"sql_priv.h" #include"my_decimal.h" #include"sql_class.h" //psergey-merge-todo: does MariaDB have/need: #include "../sql/replication.h"
static PSI_stage_info stage_waiting_on_row_lock2 = {0, "Waiting for row lock", 0};
staticconst int64_t ONE_SECOND_IN_MICROSECS = 1000 * 1000; // A timeout as long as one full non-leap year worth of microseconds is as // good as infinite timeout. staticconst int64_t ONE_YEAR_IN_MICROSECS =
ONE_SECOND_IN_MICROSECS * 60 * 60 * 24 * 365;
Status Rdb_mutex::Lock() {
RDB_MUTEX_LOCK_CHECK(m_mutex);
DBUG_ASSERT(m_old_stage_info.count(current_thd) == 0); return Status::OK();
}
// Attempt to acquire lock. If timeout is non-negative, operation may be // failed after this many milliseconds. // If implementing a custom version of this class, the implementation may // choose to ignore the timeout. // Return OK on success, or other Status on failure.
Status Rdb_mutex::TryLockFor(int64_t timeout_time MY_ATTRIBUTE((__unused__))) { /* Note:PThreadsAPIhaspthread_mutex_timedlock(),butmysql's mysql_mutex_*wrappersdonotwrapthatfunction.
*/
RDB_MUTEX_LOCK_CHECK(m_mutex); return Status::OK();
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.