1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-19275 Provide SQL service to plugins.

SQL service added.
It provides the limited set of client library functions
to be used by plugin.
This commit is contained in:
Alexey Botchkov
2021-09-06 22:34:35 +04:00
committed by Oleksandr Byelkin
parent 401ff6994d
commit 0a0dfd63d9
25 changed files with 701 additions and 253 deletions

View File

@@ -1131,6 +1131,7 @@ struct THD_count
{
static Atomic_counter<uint32_t> count;
static uint value() { return static_cast<uint>(count); }
static uint connection_thd_count();
THD_count() { count++; }
~THD_count() { count--; }
};
@@ -3918,6 +3919,11 @@ public:
user_time= t;
set_time();
}
inline void force_set_time(my_time_t t, ulong sec_part)
{
start_time= system_time.sec= t;
start_time_sec_part= system_time.sec_part= sec_part;
}
/*
this is only used by replication and BINLOG command.
usecs > TIME_MAX_SECOND_PART means "was not in binlog"
@@ -3929,15 +3935,9 @@ public:
else
{
if (sec_part <= TIME_MAX_SECOND_PART)
{
start_time= system_time.sec= t;
start_time_sec_part= system_time.sec_part= sec_part;
}
force_set_time(t, sec_part);
else if (t != system_time.sec)
{
start_time= system_time.sec= t;
start_time_sec_part= system_time.sec_part= 0;
}
force_set_time(t, 0);
else
{
start_time= t;