mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Changed SQL variable delay_key_write to an enum
able delay_key_write as default (as it was in 4.0.2)
This commit is contained in:
@ -265,51 +265,60 @@ the prototype for this function! */
|
||||
void
|
||||
innobase_mysql_print_thd(
|
||||
/*=====================*/
|
||||
char* buf, /* in/out: buffer where to print, must be at least
|
||||
300 bytes */
|
||||
void* input_thd)/* in: pointer to a MySQL THD object */
|
||||
char* buf, /* in/out: buffer where to print, must be at least
|
||||
400 bytes */
|
||||
void* input_thd)/* in: pointer to a MySQL THD object */
|
||||
{
|
||||
THD* thd;
|
||||
THD* thd;
|
||||
char* old_buf = buf;
|
||||
|
||||
thd = (THD*) input_thd;
|
||||
thd = (THD*) input_thd;
|
||||
|
||||
/* We can't use value of sprintf() as this is not portable */
|
||||
buf+= my_sprintf(buf,
|
||||
/* We cannot use the return value of normal sprintf() as this is
|
||||
not portable to some old non-Posix Unixes, e.g., some old SCO
|
||||
Unixes */
|
||||
|
||||
buf += my_sprintf(buf,
|
||||
(buf, "MySQL thread id %lu, query id %lu",
|
||||
thd->thread_id, thd->query_id));
|
||||
if (thd->host)
|
||||
{
|
||||
*buf++=' ';
|
||||
buf=strnmov(buf, thd->host, 30);
|
||||
if (thd->host) {
|
||||
*buf = ' ';
|
||||
buf++;
|
||||
buf = strnmov(buf, thd->host, 30);
|
||||
}
|
||||
|
||||
if (thd->ip)
|
||||
{
|
||||
*buf++=' ';
|
||||
buf=strnmov(buf, thd->ip, 20);
|
||||
if (thd->ip) {
|
||||
*buf = ' ';
|
||||
buf++;
|
||||
buf=strnmov(buf, thd->ip, 20);
|
||||
}
|
||||
|
||||
if (thd->user)
|
||||
{
|
||||
*buf++=' ';
|
||||
buf=strnmov(buf, thd->user, 20);
|
||||
if (thd->user) {
|
||||
*buf = ' ';
|
||||
buf++;
|
||||
buf=strnmov(buf, thd->user, 20);
|
||||
}
|
||||
|
||||
if (thd->proc_info)
|
||||
{
|
||||
*buf++=' ';
|
||||
buf=strnmov(buf, thd->proc_info, 50);
|
||||
if (thd->proc_info) {
|
||||
*buf = ' ';
|
||||
buf++;
|
||||
buf=strnmov(buf, thd->proc_info, 50);
|
||||
}
|
||||
|
||||
if (thd->query)
|
||||
{
|
||||
*buf++=' ';
|
||||
buf=strnmov(buf, thd->query, 150);
|
||||
if (thd->query) {
|
||||
*buf = '\n';
|
||||
buf++;
|
||||
buf=strnmov(buf, thd->query, 150);
|
||||
}
|
||||
buf[0]='\n';
|
||||
buf[1]=0;
|
||||
|
||||
ut_a(strlen(buf) < 400);
|
||||
buf[0] = '\n';
|
||||
buf[1] = '\0'; /* Note that we must put a null character here to end
|
||||
the printed string */
|
||||
|
||||
/* We test the printed length did not overrun the buffer length of
|
||||
400 bytes */
|
||||
|
||||
ut_a(strlen(old_buf) < 400);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user